CN114070737A - Method and device for checking configuration data of equipment, storage medium and electronic equipment - Google Patents

Method and device for checking configuration data of equipment, storage medium and electronic equipment Download PDF

Info

Publication number
CN114070737A
CN114070737A CN202111425029.0A CN202111425029A CN114070737A CN 114070737 A CN114070737 A CN 114070737A CN 202111425029 A CN202111425029 A CN 202111425029A CN 114070737 A CN114070737 A CN 114070737A
Authority
CN
China
Prior art keywords
configuration
attribute information
target
configuration data
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111425029.0A
Other languages
Chinese (zh)
Other versions
CN114070737B (en
Inventor
宋文娜
袁宁
马凡凡
石建勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111425029.0A priority Critical patent/CN114070737B/en
Publication of CN114070737A publication Critical patent/CN114070737A/en
Application granted granted Critical
Publication of CN114070737B publication Critical patent/CN114070737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The application discloses a method and a device for checking configuration data of equipment, a storage medium and electronic equipment, and relates to the field of financial technology. The method comprises the following steps: acquiring all configuration files of equipment to be checked, and reading attribute information of each configuration file; determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template; matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results. By the method and the device, the problem that whether the configuration information of the network equipment meets the requirements cannot be accurately and efficiently determined in the related technology is solved.

Description

Method and device for checking configuration data of equipment, storage medium and electronic equipment
Technical Field
The application relates to the field of financial science and technology, in particular to a method and a device for checking configuration data of equipment, a storage medium and electronic equipment.
Background
With the rapid expansion of network scale, the number and types of network devices required to be used in enterprises are also increasing, and at this time, the types and numbers of various pieces of configuration information in the network devices are also greatly increasing. The quantity and the types of the configuration information are increased, the situation that part of the configuration information is not in accordance with the configuration specification of enterprise equipment is caused, the equipment cannot be normally used in a networking mode, even the leakage of enterprise production information is caused, and great hidden danger is brought to the normal production of enterprises.
In order to ensure the compliance and security of the configuration information of the network device, the configuration information needs to be checked quickly, efficiently and accurately in a large-scale network environment, so that irregular network device configuration information can be acquired timely and accurately. In the related art, whether the device configuration information meets the specification or not is mainly checked through a manual method, the checking efficiency and accuracy are very low, and the requirements of a large number of devices and a large-scale network environment of the devices cannot be met.
Aiming at the problem that whether the configuration information of the network equipment meets the requirement cannot be accurately and efficiently determined in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The application provides a method and a device for checking configuration data of equipment, a storage medium and electronic equipment, which are used for solving the problem that whether network equipment configuration information meets requirements cannot be accurately and efficiently determined in the related technology.
According to one aspect of the present application, there is provided a method of checking configuration data of a device. The method comprises the following steps: acquiring all configuration files of equipment to be checked, and reading attribute information of each configuration file, wherein each configuration file comprises the attribute information and at least one piece of configuration data; determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data; matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results.
Optionally, before determining the target attribute information corresponding to the attribute information of each configuration file from the plurality of preset attribute information, the method further includes: acquiring a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices, and determining a weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data; grouping the plurality of standard configuration data according to a preset attribute information field to obtain a plurality of groups of standard configuration data, wherein the preset attribute information field comprises at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information; sorting each standard configuration data group in each group of standard configuration data according to the weight to obtain a sorting result, and acquiring standard configuration data in a preset proportion in the sorting result; and determining a configuration template according to the standard configuration data in the preset proportion in each group of standard configuration data and the preset attribute information field adopted in the grouping to obtain a plurality of configuration templates.
Optionally, matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template, and obtaining multiple groups of matching results includes: acquiring target configuration data in a target configuration template, and respectively matching each target configuration data with configuration data in a corresponding configuration file in sequence; when target configuration data which is not matched with the configuration data in the configuration file exists in the target configuration template, determining that a group of matching results of the configuration file is abnormal; and when each target configuration data in the target configuration template has matched configuration data in the configuration file, determining that a group of matching results of the configuration files have no abnormity.
Optionally, when target configuration data that does not match the configuration data in the configuration file exists in the target configuration template, determining that there is an exception in a set of matching results of the configuration file includes: when the configuration data in the configuration file corresponding to the target configuration template has the encryption identifier, determining that the encrypted data exists in the configuration file; and when the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identifier, determining that the target configuration data fails to be matched, and recording the target configuration data.
Optionally, in the process of acquiring all configuration files of the device to be checked, the method further includes: and when the configuration files cannot be acquired or the configuration data does not exist in the configuration files, stopping executing the step of respectively matching the attribute information of each configuration file with a plurality of preset attribute information corresponding to a plurality of configuration templates, and determining that the inspection result of the configuration files of the equipment to be inspected is no configuration file.
Optionally, after determining the target attribute information corresponding to the attribute information of each configuration file from the plurality of preset attribute information, the method further includes: and when the target configuration template does not exist in the configuration file, determining that the checking result of the configuration file of the equipment to be checked is a non-configuration template.
Optionally, before acquiring all configuration files of the device to be checked and reading attribute information of each configuration file, the method further includes: identifying an inspection type of a configuration file of a device to be inspected; when the checking type is regular checking, acquiring a configuration file through a preset interface on equipment to be checked at preset time intervals; and when the checking type is a temporary checking type, receiving a query instruction of the configuration file input by a user, and acquiring the configuration file according to the query instruction.
According to another aspect of the present application, there is provided an apparatus for checking configuration data of a device. The device includes: the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring all configuration files of the device to be inspected and reading attribute information of each configuration file, and each configuration file comprises attribute information and at least one piece of configuration data; the device comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining target attribute information corresponding to attribute information of each configuration file from a plurality of preset attribute information and determining a configuration template corresponding to the target attribute information as a target configuration template, and each configuration template comprises the preset attribute information and at least one preset configuration data; the first matching unit is used for matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and the second determining unit is used for determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium, which includes a stored program, wherein the program controls a device in which the non-volatile storage medium is located to execute a method for checking configuration data of the device when the program is executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions are executed to perform a method for checking configuration data of a device.
Through the application, the following steps are adopted: acquiring all configuration files of equipment to be checked, and reading attribute information of each configuration file, wherein each configuration file comprises the attribute information and at least one piece of configuration data; determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data; matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results. The problem that whether the configuration information of the network equipment meets the requirements cannot be accurately and efficiently determined in the related technology is solved. The server is provided with the equipment configuration template, and the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the configuration information of the network equipment meets the requirement is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a method for checking configuration data of a device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an apparatus for checking configuration data of a device according to an embodiment of the present application;
fig. 3 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
According to an embodiment of the present application, there is provided a method of checking configuration data of a device.
Fig. 1 is a flowchart of a method for checking configuration data of a device according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, all configuration files of the equipment to be checked are obtained, and attribute information of each configuration file is read, wherein each configuration file comprises the attribute information and at least one piece of configuration data.
Specifically, the device to be inspected may be one or more devices to be inspected, each device to be inspected may have one or more configuration files, and the configuration file may be a configuration file of different modules or different software in the device to be inspected, for example, a configuration file of a device internet access or a configuration file of a system in the device, and a plurality of pieces of configuration data are recorded in the configuration file, for example, one piece of configuration data of the system a may be: the system A is provided with antivirus software B.
It should be noted that the attribute information in each configuration file is the minimum attribute information corresponding to the software or module corresponding to the configuration file, for example, the attribute information in the configuration file of the a system is a system of a D version in a C-type device in a B-type device of a vendor, at this time, the D version in the C-type device in the B-type device of the vendor is the attribute information of the configuration file of the a system, and configuration acquisition of the device to be checked is completed before configuration check.
Step S102, determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data.
Specifically, the configuration template is a preset standardized template, in which a plurality of configuration template files with different preset attribute information, that is, configuration templates, are stored. After a certain configuration file in a certain device to be checked is obtained, the server reads the attribute information in the configuration file, searches preset attribute information which is the same as the attribute information in a plurality of configuration templates in a traversing manner, and sets the configuration template corresponding to the preset attribute information as a target configuration template corresponding to the configuration file. And finding out a template file which is the same as the attribute information of the configuration file of the equipment to be checked from the plurality of configuration templates, and carrying out subsequent comparison operation.
And step S103, matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results.
After target configuration templates corresponding to all configuration files in a certain device to be inspected are determined, each configuration file and one target configuration template corresponding to the configuration file are matched in a one-to-one correspondence mode to obtain a plurality of matching groups, and each preset configuration information in the target configuration template in each group is matched with all configuration information in the configuration files in the group in a traversing mode until the configuration information which is the same as the preset configuration information is matched. And when all the preset configuration information in the configuration template is traversed, taking the traversal result as the matching result of the matching group to obtain a plurality of groups of matching results. And traversing and matching each configuration file with the configuration information in the corresponding configuration template to obtain the checking result of the configuration information in the configuration file.
And step S104, determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results.
Specifically, after a plurality of groups of matching results are obtained, all matching results can be generated into a table, wherein the preset configuration information in the configuration template and the configuration information in the configuration file are matched with the matching groups successfully, and the matching results show that the configuration file is abnormal; and configuring a matching group in which part of preset configuration information in the template is not successfully matched with the configuration information in the configuration file, displaying the matching result as abnormal and displaying the reason of the abnormal, and meanwhile, according to different dimensions, for example: and the network equipment belongs to professional groups, network equipment categories and the like, structured data under various conditions are counted and calculated, and standard inspection images under various dimensions are generated. And sorting the inspection results to obtain a summary table of all the information to be inspected, and visually displaying the inspection results of the plurality of devices to be inspected. Table 1 is an optional profile inspection results table, as shown in table 1.
TABLE 1
Figure BDA0003377874910000051
According to the method for checking the configuration data of the equipment, all configuration files of the equipment to be checked are obtained through the steps, and the attribute information of each configuration file is read, wherein each configuration file comprises the attribute information and at least one piece of configuration data; determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data; matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results. The problem that whether the configuration information of the network equipment meets the requirements cannot be accurately and efficiently determined in the related technology is solved. The server is provided with the equipment configuration template, and the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the configuration information of the network equipment meets the requirement is achieved.
Optionally, in order to obtain the configuration template, in the method for checking configuration data of a device provided in the embodiment of the present application, before determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, the method further includes: acquiring a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices, and determining a weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data; grouping the plurality of standard configuration data according to a preset attribute information field to obtain a plurality of groups of standard configuration data, wherein the preset attribute information field comprises at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information; sorting each standard configuration data group in each group of standard configuration data according to the weight to obtain a sorting result, and acquiring standard configuration data in a preset proportion in the sorting result; and determining a configuration template according to the standard configuration data in the preset proportion in each group of standard configuration data and the preset attribute information field adopted in the grouping to obtain a plurality of configuration templates.
Specifically, before confirming the target attribute information of the configuration file by comparison with the configuration template, the configuration template needs to be generated first. The configuration template can be generated through a standard configuration file in a standard device, wherein the standard device can be a plurality of devices which have been subjected to configuration file check in an enterprise, and the configuration file of the device can be used for generating the configuration template. After obtaining a plurality of standard configuration files, splitting all the standard configuration files according to the attribute information to obtain piece-by-piece standard configuration information, for example: a system: manufacturer a type a device version a: standard configuration information 1, system a: manufacturer a type a device version a: after obtaining the respective standard configuration information, the standard configuration information 2 may classify all the standard configuration information according to the manufacturer attribute, and determine the weight of each standard configuration information in each type of standard configuration information, for example, the weight may be determined by the number of each standard configuration information, for example, in the standard configuration information of the manufacturer B, if the standard configuration information 1 is used at 10, and the standard configuration information 2 is used at 100, the weight of the standard configuration information 1 may be set to 10, and the weight of the standard configuration information 2 may be set to 100.
It should be noted that the preset attribute information field may be one or more information fields in the preset attribute information, for example, a manufacturer a, a type equipment, a model equipment, and the like, after determining the weight of each standard configuration information, each standard configuration information is classified again according to the attribute information field to obtain a plurality of standard configuration information with different standard configuration attributes, for example, the system a: manufacturer a type a device version a: classifying the standard configuration information 1 to obtain: a system: a manufacturer: standard configuration information 1, system a: manufacturer a class a device: standard configuration information 1, system a: manufacturer a type a equipment: standard configuration information 1, system a: manufacturer a type a device version a: the standard configuration information 1 is four pieces of standard configuration information. After classification is carried out according to the preset attribute information fields, all the obtained standard configuration information is grouped according to the attribute information through a self-adaptive clustering algorithm, and each group is set as a standard configuration data group with characteristic attributes.
And sorting all the standard configuration data in each standard configuration data group according to the weight, deleting part of the standard configuration data, for example, deleting the standard configuration data with the weight less than 10, and then taking the remaining standard configuration data in each remaining standard configuration data group as the configuration template corresponding to the preset configuration attribute corresponding to the standard configuration data group to obtain a plurality of configuration templates. According to the embodiment, the accurate configuration template is obtained through the standard configuration file in the standard equipment, and the configuration file is confirmed and checked through the configuration template, so that the checking efficiency of the configuration file is improved.
Optionally, in order to obtain and distinguish matching results, in the method for checking configuration data of a device provided in the embodiment of the present application, matching the configuration data of each configuration file with target configuration data in a corresponding target configuration template, and obtaining multiple sets of matching results includes: acquiring target configuration data in a target configuration template, and respectively matching each target configuration data with configuration data in a corresponding configuration file in sequence; when target configuration data which is not matched with the configuration data in the configuration file exists in the target configuration template, determining that a group of matching results of the configuration file is abnormal; and when each target configuration data in the target configuration template has matched configuration data in the configuration file, determining that a group of matching results of the configuration files have no abnormity.
Specifically, after target configuration templates corresponding to all configuration files in a certain device to be inspected are determined, each configuration file and the corresponding target configuration template are matched in a one-to-one correspondence mode to obtain a plurality of matching groups, and traversal matching is performed on each preset configuration information in the target configuration template in each group and all configuration information in the configuration files in the group until the configuration information which is the same as the preset configuration information is matched.
It should be noted that, in a certain matching group, when all the target matching information in the target matching template is successfully matched with the configuration information in the configuration file, the matching result of the configuration file in the matching group is set to be abnormal-free; and when partial target matching information in the target matching template is not successfully matched after all traversal, setting the matching result of the configuration files in the matching group as abnormal, and recording the reason of the abnormal in the matching result. In this embodiment, traversal comparison is performed on the configuration information in the configuration file and the configuration template, and whether preset configuration information in the configuration template appears in the configuration file is determined, so that whether the configuration file is abnormal or not is detected.
Optionally, in order to determine a reason that the preset configuration information is not successfully matched, in the method for checking configuration data of a device provided in the embodiment of the present application, when target configuration data that is not matched with the configuration data in the configuration file exists in the target configuration template, determining that a group of matching results of the configuration file is abnormal includes: when the configuration data in the configuration file corresponding to the target configuration template has the encryption identifier, determining that the encrypted data exists in the configuration file; and when the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identifier, determining that the target configuration data fails to be matched, and recording the target configuration data.
Specifically, in a certain matching group, when part of the target matching information in the target matching template is not successfully matched after all traversal, the matching result of the configuration file in the matching group is set to be abnormal, the reason for the abnormality needs to be judged, and at this time, whether the configuration information in the matching group carries the encryption identifier needs to be checked. When the configuration information is detected to carry the encryption identifier, recording the encryption configuration information into a matching result; and when the configuration information is detected not to carry the encryption identifier, recording the unmatched preset configuration information into the matching result. In the embodiment, the reason why the configuration template is not successfully matched is judged by judging whether the configuration information contains the encryption mark, and when the configuration information is the encryption information and the template file has no authority to check, the reason why the configuration template is not successfully checked is fed back to perform manual check, so that the condition that the encryption configuration information is not checked is avoided.
Optionally, in the method for checking configuration data of a device provided in an embodiment of the present application, in a process of acquiring all configuration files of a device to be checked, the method further includes: and when the configuration files cannot be acquired or the configuration data does not exist in the configuration files, stopping executing the step of respectively matching the attribute information of each configuration file with a plurality of preset attribute information corresponding to a plurality of configuration templates, and determining that the inspection result of the configuration files of the equipment to be inspected is no configuration file.
Specifically, when a configuration file of some equipment to be inspected is acquired, the configuration file may not be acquired, or when the configuration file is acquired and attribute information of the configuration file is read, the configuration file does not have configuration information, at this time, subsequent operations of reading the attribute information and matching preset attribute information are stopped, and meanwhile, an inspection result of the configuration file of the equipment to be inspected is set to be configuration file-free for feedback. And when the configuration information corresponding to the equipment to be inspected is not acquired, ending the inspection of the equipment, and feeding back the problem of the equipment to the inspection result.
Optionally, in the method for checking configuration data of a device provided in the embodiment of the present application, after determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, the method further includes: and when the target configuration template does not exist in the configuration file, determining that the checking result of the configuration file of the equipment to be checked is a non-configuration template.
Specifically, in the process of matching the attribute information of the configuration file with the preset attribute information, the situation that the preset attribute information cannot be successfully matched may occur, at this time, the operation of matching the preset attribute information is stopped, and meanwhile, the checking result of the configuration file of the device to be checked is set as a non-configuration template for feedback. And when the configuration template corresponding to the equipment to be checked is not acquired, finishing the check of the equipment, feeding back the reason of abnormal check of the equipment as the missing configuration template, and sending the reason to the check result.
Optionally, in the method for checking configuration data of a device provided in the embodiment of the present application, before acquiring all configuration files of the device to be checked and reading attribute information of each configuration file, the method further includes: identifying an inspection type of a configuration file of a device to be inspected; when the checking type is regular checking, acquiring a configuration file through a preset interface on equipment to be checked at preset time intervals; and when the checking type is a temporary checking type, receiving a query instruction of the configuration file input by a user, and acquiring the configuration file according to the query instruction.
Specifically, when a plurality of devices to be inspected are obtained, the devices to be inspected need to be obtained in different manners, and when the devices to be inspected are regular inspection devices, corresponding configuration files can be directly obtained through a preset device connection interface, wherein the regular inspection devices can be devices which perform inspection once every fixed time, for example, device configuration files are periodically inspected every two weeks and four weeks; when the equipment is temporarily checked, a query instruction of the configuration file needs to be manually input, the configuration file is obtained according to the query instruction, and the checking condition of the equipment configuration file can be monitored in real time. This embodiment is through classifying the file to be inspected, distinguishes the equipment of different inspection types, and the equipment to the difference that can be more convenient is examined, improves work efficiency.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides an apparatus for checking configuration data of a device, and it should be noted that the apparatus for checking configuration data of a device according to the embodiment of the present application may be used to execute the method for checking configuration data of a device according to the embodiment of the present application. The following describes an apparatus for checking configuration data of a device according to an embodiment of the present application.
Fig. 2 is a schematic diagram of an apparatus for checking configuration data of a device according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
a first obtaining unit 10, configured to obtain all configuration files of a device to be inspected, and read attribute information of each configuration file, where each configuration file includes attribute information and at least one piece of configuration data;
a first determining unit 20, configured to determine target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determine a configuration template corresponding to the target attribute information as a target configuration template, where each configuration template includes the preset attribute information and at least one preset configuration data;
the first matching unit 30 is configured to match the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain multiple groups of matching results;
and the second determining unit 40 is configured to determine an inspection result of the configuration file of the device to be inspected according to the multiple sets of matching results.
According to the device configuration data inspection device provided by the embodiment of the application, all configuration files of a device to be inspected are acquired through the first acquisition unit 10, and attribute information of each configuration file is read, wherein each configuration file comprises the attribute information and at least one piece of configuration data; the first determining unit 20 determines target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determines a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data; the first matching unit 30 matches the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain multiple groups of matching results; the second determining unit 40 determines the inspection result of the configuration file of the device to be inspected according to the plurality of sets of matching results. The problem that whether the configuration information of the network equipment meets the requirements cannot be accurately and efficiently determined in the related technology is solved. The server is provided with the equipment configuration template, and the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the configuration information of the network equipment meets the requirement is achieved.
Optionally, in the apparatus for checking configuration data of a device provided in the embodiment of the present application, the apparatus further includes: the second obtaining unit is used for obtaining a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices and determining a weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data; the first grouping unit is used for grouping the plurality of standard configuration data according to a preset attribute information field to obtain a plurality of groups of standard configuration data, wherein the preset attribute information field comprises at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information; the first sequencing unit is used for sequencing each standard configuration data group in each group of standard configuration data according to the weight to obtain a sequencing result, and acquiring the standard configuration data which is positioned in the front row in the sequencing result and has a preset proportion; and the third determining unit is used for determining a configuration template according to the standard configuration data with the preset proportion in each group of standard configuration data and the preset attribute information field adopted in the grouping to obtain the plurality of configuration templates.
Optionally, in the apparatus for checking configuration data of a device provided in the embodiment of the present application, the first matching unit 30 includes: the first acquisition module is used for acquiring target configuration data in the target configuration template and respectively matching each target configuration data with the corresponding configuration data in the configuration file in sequence; the first determining module is used for determining that a group of matching results of the configuration files have abnormity when target configuration data which is not matched with the configuration data in the configuration files exists in the target configuration template; a second determining module, configured to determine that a set of matching results of the configuration files is not abnormal when each target configuration data in the target configuration template has matching configuration data in the configuration files.
Optionally, in the apparatus for checking configuration data of a device provided in an embodiment of the present application, the first determining module includes: the first determining submodule is used for determining that encrypted data exists in the configuration file when encrypted identification exists in the configuration data in the configuration file corresponding to the target configuration template; and the second determining submodule is used for determining that the target configuration data fails to be matched when the configuration data in the configuration file corresponding to the target configuration template does not have the encrypted identifier, and recording the target configuration data.
Optionally, in the apparatus for checking configuration data of a device provided in the embodiment of the present application, the first obtaining unit 10 includes: and the stopping module is used for stopping executing the step of respectively matching the attribute information of each configuration file with a plurality of preset attribute information corresponding to a plurality of configuration templates when the configuration files cannot be acquired or the configuration data does not exist in the configuration files, and determining that the inspection result of the configuration files of the equipment to be inspected is a non-configuration file.
Optionally, in the apparatus for checking configuration data of a device provided in the embodiment of the present application, the apparatus further includes: a fourth determining unit, configured to determine, when the target configuration template does not exist in the configuration file, that a checking result of the configuration file of the device to be checked is a non-configuration template.
Optionally, in the apparatus for checking configuration data of a device provided in the embodiment of the present application, the apparatus further includes: the identification unit is used for identifying the inspection type of the configuration file of the equipment to be inspected; the third obtaining unit is used for obtaining the configuration file through a preset interface on the equipment to be checked at preset time intervals when the checking type is regular checking; and the receiving unit is used for receiving a query instruction of the configuration file input by a user when the check type is the temporary check type, and acquiring the configuration file according to the query instruction.
The device for checking configuration data of the equipment comprises a processor and a memory, wherein the first acquiring unit 10, the first determining unit 20, the first matching unit 30, the second determining unit 40 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that whether the configuration information of the network equipment meets the requirement cannot be accurately and efficiently determined in the related technology is solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application also provides a nonvolatile storage medium, wherein the nonvolatile storage medium comprises a stored program, and the program controls the device where the nonvolatile storage medium is located to execute a method for checking the configuration data of the device when running.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes a method for checking configuration data of equipment when running.
Fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 3, the electronic device 50 includes: a processor, a memory, and a program stored on the memory and executable on the processor, the processor implementing the steps of: acquiring all configuration files of equipment to be checked, and reading attribute information of each configuration file, wherein each configuration file comprises the attribute information and at least one piece of configuration data; determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises the preset attribute information and at least one preset configuration data; matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results; and determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results. It should be noted that the device in this document may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: intercepting alarm information to be uploaded to monitoring equipment; inputting the alarm information into an alarm classification model, and processing to obtain an alarm type corresponding to the alarm information; determining whether the alarm information meets a preset alarm condition or not through the alarm type; under the condition that the alarm information meets the preset alarm condition, inputting the alarm information and the alarm type into an alarm grading model, and processing to obtain an alarm grade corresponding to the alarm information; and sending the alarm information, the alarm type and the alarm level to the monitoring equipment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for checking configuration data of a device, comprising:
acquiring all configuration files of equipment to be checked, and reading attribute information of each configuration file, wherein each configuration file comprises attribute information and at least one piece of configuration data;
determining target attribute information corresponding to the attribute information of each configuration file from a plurality of preset attribute information, and determining a configuration template corresponding to the target attribute information as a target configuration template, wherein each configuration template comprises preset attribute information and at least one preset configuration data;
matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results;
and determining the inspection result of the configuration file of the equipment to be inspected according to the multiple groups of matching results.
2. The method according to claim 1, wherein before determining the target attribute information corresponding to the attribute information of each profile from the plurality of preset attribute information, the method further comprises:
acquiring a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices, and determining a weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data;
grouping the plurality of standard configuration data according to a preset attribute information field to obtain a plurality of groups of standard configuration data, wherein the preset attribute information field comprises at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information;
sorting each standard configuration data group in each group of standard configuration data according to the weight to obtain a sorting result, and acquiring standard configuration data in a preset proportion in the sorting result;
and determining a configuration template according to the standard configuration data with the preset proportion in each group of standard configuration data and the preset attribute information field adopted in the grouping to obtain a plurality of configuration templates.
3. The method of claim 1, wherein matching the configuration data of each configuration file with the corresponding target configuration data in the target configuration template to obtain multiple sets of matching results comprises:
acquiring target configuration data in the target configuration template, and respectively matching each target configuration data with the configuration data in the corresponding configuration file in sequence;
when target configuration data which is not matched with the configuration data in the configuration file exists in the target configuration template, determining that a group of matching results of the configuration file is abnormal;
when each target configuration data in the target configuration template has matched configuration data in the configuration file, determining that a group of matching results of the configuration files are abnormal.
4. The method of claim 3, wherein determining that there is an anomaly in the set of matching results for the configuration file when there is target configuration data in the target configuration template that does not match configuration data in the configuration file comprises:
when the configuration data in the configuration file corresponding to the target configuration template has the encryption identifier, determining that the encryption data exists in the configuration file;
and when the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identifier, determining that the target configuration data fails to be matched, and recording the target configuration data.
5. The method of claim 1, wherein in acquiring all profiles of the device to be inspected, the method further comprises:
and when the configuration file cannot be acquired or the configuration data does not exist in the configuration file, stopping executing the step of respectively matching the attribute information of each configuration file with a plurality of preset attribute information corresponding to a plurality of configuration templates, and determining that the inspection result of the configuration file of the equipment to be inspected is no configuration file.
6. The method of claim 1, wherein after determining the target attribute information corresponding to the attribute information of each profile from the plurality of preset attribute information, the method further comprises:
and when the target configuration template does not exist in the configuration file, determining that the inspection result of the configuration file of the equipment to be inspected is a non-configuration template.
7. The method of claim 1, wherein before acquiring all configuration files of a device to be inspected and reading attribute information of each of the configuration files, the method further comprises:
identifying the checking type of the configuration file of the equipment to be checked;
when the inspection type is periodic inspection, acquiring the configuration file through a preset interface on the equipment to be inspected at preset time intervals;
and when the checking type is a temporary checking type, receiving a query instruction of the configuration file input by a user, and acquiring the configuration file according to the query instruction.
8. An apparatus for checking configuration data of a device, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring all configuration files of a device to be inspected and reading attribute information of each configuration file, and each configuration file comprises attribute information and at least one piece of configuration data;
the device comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for determining target attribute information corresponding to attribute information of each configuration file from a plurality of preset attribute information and determining a configuration template corresponding to the target attribute information as a target configuration template, and each configuration template comprises preset attribute information and at least one preset configuration data;
the first matching unit is used for matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of groups of matching results;
and the second determining unit is used for determining the checking result of the configuration file of the equipment to be checked according to the multiple groups of matching results.
9. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program controls a device in which the non-volatile storage medium is located to execute the method of checking configuration data of a device according to any one of claims 1 to 7 when running.
10. An electronic device comprising one or more processors and memory, the memory storing one or more programs therein, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of checking configuration data of a device of any one of claims 1 to 7.
CN202111425029.0A 2021-11-26 2021-11-26 Method and device for checking configuration data of equipment, storage medium and electronic equipment Active CN114070737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111425029.0A CN114070737B (en) 2021-11-26 2021-11-26 Method and device for checking configuration data of equipment, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111425029.0A CN114070737B (en) 2021-11-26 2021-11-26 Method and device for checking configuration data of equipment, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114070737A true CN114070737A (en) 2022-02-18
CN114070737B CN114070737B (en) 2024-03-08

Family

ID=80276624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111425029.0A Active CN114070737B (en) 2021-11-26 2021-11-26 Method and device for checking configuration data of equipment, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114070737B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399748A (en) * 2013-08-02 2013-11-20 王力强 Equipment configuration standardization detecting device and method
CN108536485A (en) * 2018-03-30 2018-09-14 全球能源互联网研究院有限公司 Big data platform configuration inspection method, apparatus, terminal and readable storage medium storing program for executing
CN110059491A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Data import monitoring method, device, equipment and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399748A (en) * 2013-08-02 2013-11-20 王力强 Equipment configuration standardization detecting device and method
CN108536485A (en) * 2018-03-30 2018-09-14 全球能源互联网研究院有限公司 Big data platform configuration inspection method, apparatus, terminal and readable storage medium storing program for executing
CN110059491A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Data import monitoring method, device, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN114070737B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
CN109542789B (en) Code coverage rate statistical method and device
CN109934268B (en) Abnormal transaction detection method and system
CN106201886A (en) The Proxy Method of the checking of a kind of real time data task and device
CN104731816A (en) Method and device for processing abnormal business data
CN110909363A (en) Software third-party component vulnerability emergency response system and method based on big data
CN106325826A (en) Configuration file detection method and apparatus
CN111061646A (en) Test management system, equipment and medium based on block chain intelligent contract
CN112487083A (en) Data verification method and equipment
CN111026080A (en) Hardware-in-loop test method and device for controller
Meskas et al. flowCut: An R package for automated removal of outlier events and flagging of files based on time versus fluorescence analysis
CN114070737B (en) Method and device for checking configuration data of equipment, storage medium and electronic equipment
CN114500249B (en) Root cause positioning method and device
CN115757318A (en) Log query method and device, storage medium and electronic equipment
KR20200073824A (en) Method for profiling malware and apparatus thereof
CN111444093B (en) Method and device for determining quality of project development process and computer equipment
CN113919683A (en) Method and device for calculating process man-hour, storage medium and processor
CN110717131B (en) Page revising monitoring method and related system
CN114139853A (en) Steel structure product list processing method and device based on big data
CN108763092B (en) Code defect detection method and device based on cross validation
CN112379656A (en) Processing method, device, equipment and medium for detecting abnormal data of industrial system
CN111932359A (en) Risk monitoring method and system and electronic equipment
CN112580915A (en) Project milestone determination method and device, storage medium and electronic equipment
CN116303380B (en) Data quality checking method, equipment and medium in monitoring service
TWI828506B (en) System and method for assessing security standard
CN112612882B (en) Review report generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant