CN114070737B - 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
CN114070737B
CN114070737B CN202111425029.0A CN202111425029A CN114070737B CN 114070737 B CN114070737 B CN 114070737B CN 202111425029 A CN202111425029 A CN 202111425029A CN 114070737 B CN114070737 B CN 114070737B
Authority
CN
China
Prior art keywords
configuration
attribute information
configuration data
target
standard
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.)
Active
Application number
CN202111425029.0A
Other languages
Chinese (zh)
Other versions
CN114070737A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

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 science and 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 plurality of 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 present invention relates to the field of financial science and technology, and in particular, to a method and apparatus for checking configuration data of a device, a storage medium, and an electronic device.
Background
With the rapid expansion of the network scale, the number and variety of network devices required to be used in enterprises also increase, and at this time, the variety and number of each item of configuration information in the network devices also increase greatly. The increase of the quantity and the variety of the configuration information can cause the situation that part of the configuration information does not accord with the configuration specification of the enterprise equipment, so that the equipment cannot be used in a normal networking mode, even the leakage of the enterprise production information can be caused, and great hidden danger is brought to the normal production of the enterprise.
In order to ensure compliance and security of network device configuration information, it is necessary to implement quick, efficient and accurate inspection of configuration information in a large-scale network environment, so as to timely and accurately obtain non-standard network device configuration information. In the related art, whether the configuration information of the equipment accords with the specification is checked by a manual method, the checking efficiency and accuracy are very low, and the requirement of a large number of equipment and large-scale network environment of the equipment 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, no effective solution is proposed 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, and aims to solve 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, a method of checking configuration data of a device is provided. 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 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 checking result of the configuration file of the equipment to be checked according to the plurality of 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 standard attribute information; 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 in the preset proportion in the front of the sequencing result; and determining a configuration template according to standard configuration data of preset proportion in each group of standard configuration data and preset attribute information fields adopted by the groups 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 to obtain a plurality of 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 are 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 file are not abnormal.
Optionally, when target configuration data that does not match configuration data in the configuration file exists in the target configuration template, determining that a set of matching results of the configuration file has an exception includes: when the configuration data in the configuration file corresponding to the target configuration template has an encryption identifier, determining that the configuration file has encryption data; when the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identification, determining that the target configuration data fails to match, and recording the target configuration data.
Optionally, in the process of acquiring all configuration files of the device to be inspected, the method further includes: and stopping executing the step of 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 file cannot be acquired or the configuration file does not exist, and determining that the checking result of the configuration file of the equipment to be checked 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 configuration file does not have the target configuration template, determining that the checking result of the configuration file of the equipment to be checked is a non-configuration template.
Optionally, before acquiring all the 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 the device to be inspected; when the inspection type is periodic inspection, acquiring a configuration file through a preset interface on the equipment to be inspected at intervals of preset time; and when the checking type is the temporary checking type, receiving a query instruction of the configuration file input by the user, and acquiring the configuration file according to the query instruction.
According to another aspect of the present application, there is provided an inspection apparatus of configuration data of a device. The device comprises: the first acquisition unit is used for acquiring all configuration files of the equipment to be checked and reading attribute information of each configuration file, wherein each configuration file comprises the attribute information and at least one configuration data; the first determining unit is used for 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; 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 plurality of groups of matching results.
According to another aspect of the embodiments of the present invention, there is also provided a nonvolatile storage medium including a stored program, where the program when executed controls a device in which the nonvolatile storage medium is located to execute a method of checking configuration data of the device.
According to another aspect of 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 for execution by the processor, wherein the computer readable instructions when executed perform a method of 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 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 checking result of the configuration file of the equipment to be checked according to the plurality of groups of matching results. The method solves the problem that whether the configuration information of the network equipment meets the requirement cannot be accurately and efficiently determined in the related art. By setting the equipment configuration template in the server, the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the network equipment configuration information meets the requirements is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a flow chart of a method of checking configuration data of a device provided in accordance with 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 diagram of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. 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 equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
According to an embodiment of the application, a method for checking configuration data of a device is provided.
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 device 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 configuration data.
Specifically, the device to be inspected may be one or more devices to be inspected, and each device to be inspected may have one or more configuration files, where the configuration files may be configuration files of different modules or different software in the device to be inspected, for example, a configuration file of a network port of the device or a configuration file of a system in the device, where multiple pieces of configuration data are recorded in the configuration files, for example, one piece of configuration data of the system a may be: and B antivirus software is installed in the A system.
It should be noted that, the attribute information in each configuration file is the minimum attribute information corresponding to the software or the module corresponding to the configuration file, for example, the attribute information in the configuration file of the a system is a system of version D in the C type device in the B type device of the a manufacturer, and at this time, the version D in the C type device in the B type device of the a manufacturer is the attribute information of the configuration file of the a system, and the configuration acquisition of the device to be checked is completed before the 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 preset attribute information and at least one preset configuration data.
Specifically, the configuration template is a preset standardized template, and a plurality of configuration template files with different preset attribute information, namely configuration templates, are stored in the configuration template. After a certain configuration file in a certain device to be checked is obtained, the server reads 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 way, and sets the configuration template corresponding to the preset attribute information as a target configuration template corresponding to the configuration file. And finding out template files which are the same as the attribute information of the configuration files of the equipment to be checked from the plurality of configuration templates, and carrying out subsequent comparison operation.
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 determining target configuration templates corresponding to all configuration files in a certain device to be checked, matching each configuration file with one target configuration template corresponding to each configuration file to obtain a plurality of matching groups, and performing traversal matching on each preset configuration information in the target configuration templates in each group and all configuration information in the configuration files in the group until the configuration information identical to the preset configuration information is matched. And after all the preset configuration information in the configuration template is traversed, taking the traversing result as the matching result of the matching group to obtain a plurality of groups of matching results. 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.
Step S104, determining the checking result of the configuration file of the equipment to be checked according to the plurality of groups of matching results.
Specifically, after a plurality of groups of matching results are obtained, all the matching results can be generated into a table, wherein the matching results are displayed as matching groups with successful matching of preset configuration information in the configuration template and configuration information in the configuration file, and the configuration file is free of abnormality; and part of the preset configuration information in the configuration template and the configuration information in the configuration file are not matched successfully to form a matching group, the matching result is displayed as abnormal, the cause of the abnormal is displayed, and meanwhile, the matching group can be used for displaying the abnormal cause according to different dimensions, for example: and (3) calculating structured data under various conditions by statistics to generate standard inspection images under various dimensions, wherein the network equipment belongs to a professional group, a network equipment category and the like. And (3) after the inspection results are arranged, a summary table of all information to be inspected is obtained, and the inspection results of a plurality of devices to be inspected are visually displayed. Table 1 is an alternative profile inspection results table, as shown in table 1.
TABLE 1
According to the checking method for the configuration data of the equipment, all configuration files of the equipment to be checked are obtained through the steps, and attribute information of each configuration file is read, wherein each configuration file comprises the attribute information and at least one 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 checking result of the configuration file of the equipment to be checked according to the plurality of groups of matching results. The method solves the problem that whether the configuration information of the network equipment meets the requirement cannot be accurately and efficiently determined in the related art. By setting the equipment configuration template in the server, the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the network equipment configuration information meets the requirements 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 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 standard attribute information; 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 in the preset proportion in the front of the sequencing result; and determining a configuration template according to standard configuration data of preset proportion in each group of standard configuration data and preset attribute information fields adopted by the groups to obtain a plurality of configuration templates.
Specifically, the configuration template needs to be generated before the target attribute information of the configuration file is confirmed by comparing with the configuration template. The configuration template may be generated by a standard configuration file in a standard device, where the standard device may be a plurality of devices in the enterprise after the configuration file inspection has been performed, and the configuration file of the device may be used for generating the configuration template. After a plurality of standard configuration files are acquired, splitting all the standard configuration files according to attribute information to obtain piece-by-piece standard configuration information, for example: a system: vendor a class a device model a device version a: standard configuration information 1, a system: vendor a class a device model a device version a: standard configuration information 2, etc., after obtaining the piece-by-piece standard configuration information, all the standard configuration information may be classified according to vendor attributes, and the weight of each standard configuration information may be determined 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 vendor B, the standard configuration information 1 may be used at 10 in total, the standard configuration information 2 may be used at 100 in total, and 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, vendor a, class a device, type a device, etc., after determining the weight of each standard configuration information, each standard configuration information is reclassified according to the attribute information field to obtain standard configuration information with different standard configuration attributes, for example, the system a may be: vendor a class a device model a device version a: classifying the standard configuration information 1 to obtain: a system: manufacturer a: standard configuration information 1, a system: vendor a class a device: standard configuration information 1, a system: vendor a class a device model a device: standard configuration information 1, a system: vendor a class a device model a device version a: the standard configuration information 1 is four standard configuration information in total. After classifying according to the preset attribute information fields, grouping all obtained standard configuration information according to attribute information through an adaptive clustering algorithm, and setting each group as a standard configuration data group with characteristic attribute.
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 rest standard configuration data in each standard configuration data group as a 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 checked through the configuration template, so that the checking efficiency of the configuration file is improved.
Optionally, in order to obtain and distinguish a matching result, 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, to obtain a plurality of 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 are 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 file are not abnormal.
Specifically, after determining target configuration templates corresponding to all configuration files in a certain device to be checked, matching each configuration file and the corresponding target configuration template one by one to obtain a plurality of matching groups, and performing traversal matching 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 identical to 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 no abnormality; and when part of 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 the embodiment, the configuration file and the configuration information in the configuration template are subjected to traversal comparison, and whether preset configuration information in the configuration template appears in the configuration file or not is confirmed, so that whether the configuration file is abnormal or not is detected.
Optionally, in order to determine a cause of unsuccessful matching of preset configuration information, in the method for checking configuration data of a device provided in the embodiment of the present application, when target configuration data that does not match configuration data in a configuration file exists in a target configuration template, determining that a group of matching results of the configuration file have an exception includes: when the configuration data in the configuration file corresponding to the target configuration template has an encryption identifier, determining that the configuration file has encryption data; when the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identification, determining that the target configuration data fails to match, and recording the target configuration data.
Specifically, in a certain matching group, when part of target matching information in the target matching template is not successfully matched after all traversal, if the matching result of the configuration file in the matching group is set to be abnormal, the reason of the abnormality needs to be judged, and at the moment, whether the configuration information in the matching group carries an encryption identifier needs to be checked. When the configuration information is detected to carry the encryption identification, the encryption configuration information is recorded into a matching result; when the configuration information is detected to not carry the encryption identification, the unmatched preset configuration information is recorded into a matching result. In this embodiment, whether the configuration information includes the encryption flag is determined, so as to determine a reason why the configuration template is not successfully matched, and when the configuration information is the encryption information, the template file has no authority to check, and then the reason why the configuration information is successfully checked is fed back, and manual check is performed, so that the encryption configuration information is prevented from not being checked.
Optionally, in the method for checking configuration data of a device provided in the embodiment of the present application, in a process of acquiring all configuration files of a device to be checked, the method further includes: and stopping executing the step of 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 file cannot be acquired or the configuration file does not exist, and determining that the checking result of the configuration file of the equipment to be checked is no configuration file.
Specifically, when acquiring configuration files of some devices to be checked, a situation that the configuration files cannot be acquired may occur, or when acquiring the configuration files and reading attribute information of the configuration files, the configuration files do not have the configuration information, at this time, the operation of subsequent operations of reading the attribute information and matching with preset attribute information is stopped, and meanwhile, the checking result of the configuration files of the devices to be checked is set to be without the configuration files for feedback. And when the configuration information corresponding to the equipment to be checked is not obtained, ending the check of the equipment, and feeding back the problem of the equipment to the check 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 attribute information of each configuration file from a plurality of preset attribute information, the method further includes: and when the configuration file does not have the target configuration template, 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 to be without a configuration template for feedback. And when the configuration template corresponding to the equipment to be checked is not obtained, ending the check of the equipment, feeding back that the reason for the abnormal check of the equipment is 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 all configuration files of the device to be checked are acquired and attribute information of each configuration file is read, the method further includes: identifying an inspection type of a configuration file of the device to be inspected; when the inspection type is periodic inspection, acquiring a configuration file through a preset interface on the equipment to be inspected at intervals of preset time; and when the checking type is the temporary checking type, receiving a query instruction of the configuration file input by the user, and acquiring the configuration file according to the query instruction.
Specifically, when a plurality of devices to be inspected are acquired, the devices to be inspected need to be acquired in different modes, and when the devices to be inspected are periodic inspection devices, corresponding configuration files can be acquired directly through a preset device connection interface, wherein the periodic inspection devices can be devices for performing inspection every fixed time, for example, device configuration files are periodically inspected every third, fourth and sixth of the week; when the equipment is temporary checking equipment, a query instruction of the configuration file is required to be manually input, and the configuration file is acquired according to the query instruction, so that the checking condition of the equipment configuration file can be monitored in real time. According to the embodiment, the files to be inspected are classified, the equipment with different inspection types is distinguished, different equipment can be inspected more conveniently, and the working efficiency is improved.
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 other than that illustrated herein.
The embodiment of the application also provides a device for checking the configuration data of the equipment, and it is to be noted that the device for checking the configuration data of the equipment in the embodiment of the application can be used for executing the method for checking the configuration data of the equipment provided in the embodiment of the application. The following describes a device for checking configuration data of a device provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of an inspection apparatus of 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 configuration data;
a first determining unit 20, configured to determine target attribute information corresponding to 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 preset attribute information and at least one preset configuration data;
A first matching unit 30, configured to match the configuration data of each configuration file with the target configuration data in the corresponding target configuration template, so as to obtain multiple sets of matching results;
a second determining unit 40 for determining the checking result of the configuration file of the device to be checked according to the plurality of sets of matching results.
The device for checking configuration data of equipment provided by the embodiment of the application acquires all configuration files of equipment to be checked through the first acquisition unit 10, and reads attribute information of each configuration file, wherein each configuration file comprises the attribute information and at least one configuration data; the first determining unit 20 determines target attribute information corresponding to 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 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 a plurality of groups of matching results; the second determining unit 40 determines the inspection result of the configuration file of the device to be inspected based on the plurality of sets of matching results. The method solves the problem that whether the configuration information of the network equipment meets the requirement cannot be accurately and efficiently determined in the related art. By setting the equipment configuration template in the server, the configuration file in the equipment to be checked is automatically checked, so that the effect of efficiently and accurately determining whether the network equipment configuration information meets the requirements is achieved.
Optionally, in the checking device for configuration data of a device provided in the embodiment of the present application, the device further includes: the second acquisition unit is used for acquiring a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices and determining the weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data; a first grouping unit, configured to group the plurality of standard configuration data according to a preset attribute information field, so as to obtain a plurality of groups of standard configuration data, where the preset attribute information field includes at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information; the first ordering unit is used for ordering each standard configuration data group in each group of standard configuration data according to the weight value to obtain an ordering result, and acquiring the standard configuration data in the preset proportion in the front of the ordering result; and a third determining unit, configured to determine a configuration template according to the standard configuration data of the preset proportion in each set of standard configuration data and the preset attribute information field adopted by the packet, so as to obtain the plurality of configuration templates.
Optionally, in the checking apparatus for 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 file are abnormal when target configuration data which is not matched with the configuration data in the configuration file exists in the target configuration template; and the second determining module is used for determining that a group of matching results of the configuration file are abnormal when each piece of target configuration data in the target configuration template has matched configuration data in the configuration file.
Optionally, in the apparatus for checking configuration data of a device provided in the 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 the encrypted identifier 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 is failed to match when the encryption identifier does not exist in the configuration data in the configuration file corresponding to the target configuration template, and recording the target configuration data.
Optionally, in the checking apparatus for 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 matching the attribute information of each configuration file with a plurality of preset attribute information corresponding to a plurality of configuration templates respectively when the configuration file cannot be acquired or the configuration file does not exist in the configuration file, and determining that the checking result of the configuration file of the equipment to be checked is no configuration file.
Optionally, in the checking device for configuration data of a device provided in the embodiment of the present application, the device further includes: and a fourth determining unit, configured to determine that an inspection result of the configuration file of the device to be inspected is a no-configuration template when the configuration file does not have the target configuration template.
Optionally, in the checking device for configuration data of a device provided in the embodiment of the present application, the device further includes: the identification unit is used for identifying the checking type of the configuration file of the equipment to be checked; the third acquisition unit is used for acquiring the configuration file through a preset interface on the equipment to be inspected at intervals of preset time when the inspection type is periodic inspection; and the receiving unit is used for receiving a query instruction of the configuration file input by a user when the checking type is a temporary checking type, and acquiring the configuration file according to the query instruction.
The checking device of the configuration data of the apparatus includes a processor and a memory, 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 includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, 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, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including 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 is used for controlling the equipment where the nonvolatile storage medium is located to execute a checking method of the configuration data of the equipment when running.
The embodiment of the invention provides a processor which is used for running a program, wherein the program runs to execute a method for checking configuration data of equipment.
Fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present application, as shown in fig. 3, an electronic device 50 includes: a processor, a memory, and a program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program: 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 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 checking result of the configuration file of the equipment to be checked according to the plurality of groups of matching results. It should be noted that the device herein may be a server, a PC, a PAD, a mobile phone, or the like.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: 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 preset alarm conditions or not according to 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 grade to the monitoring equipment.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. 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 storage media for a computer 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, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
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 one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (9)

1. A method of 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 configuration data, and the configuration files are configuration files of different modules or different software in the equipment to be checked;
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 corresponding target configuration data in the target configuration template to obtain a plurality of groups of matching results;
Determining an inspection result of the configuration file of the equipment to be inspected according to the plurality of groups of matching results;
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 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; 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 in the preset proportion in the front of the sequencing result; and determining a configuration template according to the standard configuration data of the preset proportion in each group of standard configuration data and the preset attribute information field adopted by the group to obtain a plurality of configuration templates.
2. The method of claim 1, wherein matching the configuration data of each configuration file with the target configuration data in the corresponding target configuration template to obtain a plurality of 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 are 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 file are not abnormal.
3. The method of claim 2, wherein determining that a set of match results for the configuration file are abnormal 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 an encryption identifier, determining that the configuration file has encryption data;
When the configuration data in the configuration file corresponding to the target configuration template does not have the encryption identification, determining that the target configuration data fails to match, and recording the target configuration data.
4. The method of claim 1, wherein in acquiring all configuration files of the device to be inspected, the method further comprises:
and stopping the step of 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 file cannot be acquired or the configuration file does not exist, and determining that the checking result of the configuration file of the equipment to be checked is no configuration file.
5. 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 configuration file does not have the target configuration template, determining that the checking result of the configuration file of the equipment to be checked is a non-configuration template.
6. The method according to claim 1, wherein before acquiring all the configuration files of the device to be inspected and reading the 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 intervals of preset time;
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.
7. An apparatus for checking configuration data of a device, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring all configuration files of equipment to be checked and reading attribute information of each configuration file, each configuration file comprises attribute information and at least one configuration data, and the configuration files are configuration files of different modules or different software in the equipment to be checked;
a first determining unit, configured to determine target attribute information corresponding to 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 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 corresponding target configuration data in the target configuration template to obtain a plurality of groups of matching results;
A second determining unit, configured to determine an inspection result of the configuration file of the device to be inspected according to the multiple sets of matching results;
the second acquisition unit is used for acquiring a plurality of standard configuration data corresponding to all standard configuration files in a plurality of standard devices and determining the weight of each standard configuration data, wherein each standard configuration file comprises standard attribute information and at least one standard configuration data; a first grouping unit, configured to group the plurality of standard configuration data according to a preset attribute information field, so as to obtain a plurality of groups of standard configuration data, where the preset attribute information field includes at least one attribute feature, and the attribute feature is an attribute feature existing in the standard attribute information; the first ordering unit is used for ordering each standard configuration data group in each group of standard configuration data according to the weight value to obtain an ordering result, and acquiring the standard configuration data in the preset proportion in the front of the ordering result; and the third determining unit is used for determining a configuration template according to the standard configuration data of the preset proportion in each group of standard configuration data and the preset attribute information field adopted by the group to obtain a plurality of configuration templates.
8. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program, when run, controls a device in which the non-volatile storage medium is located to perform a method of checking configuration data of a device according to any one of claims 1 to 6.
9. An electronic device comprising one or more processors and a memory, the memory storing therein one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of checking configuration data of the device of any of claims 1-6.
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 CN114070737A (en) 2022-02-18
CN114070737B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529237A (en) * 2022-10-08 2022-12-27 中国农业银行股份有限公司 Configuration information loading method, device and equipment

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
CN114070737A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN109561326B (en) Data query method and device
CN109934268B (en) Abnormal transaction detection method and system
CN106897342B (en) Data verification method and equipment
CN112732641A (en) Electronic file filing method, device and medium
CN106933823B (en) Data synchronization method and device
CN110909363A (en) Software third-party component vulnerability emergency response system and method based on big data
CN110019298B (en) Data processing method and device
WO2017020725A1 (en) Data detection method and device
CN112224246B (en) Test report generation method and device based on interface test
CN114070737B (en) Method and device for checking configuration data of equipment, storage medium and electronic equipment
CN111026080A (en) Hardware-in-loop test method and device for controller
CN105630656A (en) Log model based system robustness analysis method and apparatus
CN116303380B (en) Data quality checking method, equipment and medium in monitoring service
CN109471901B (en) Data synchronization method and device
CN111444093B (en) Method and device for determining quality of project development process and computer equipment
CN108334524B (en) Storm log error analysis method and device
CN111382069A (en) Data flow testing method and system
CN110019357B (en) Database query script generation method and device
CN116483605A (en) Data processing method, device, system, storage medium and electronic equipment
CN115757318A (en) Log query method and device, storage medium and electronic equipment
CN114416442A (en) Hardware change detection method and device, electronic equipment and readable storage medium
CN112580915A (en) Project milestone determination method and device, storage medium and electronic equipment
TWI828506B (en) System and method for assessing security standard
CN110717131A (en) Page revising monitoring method and related system
CN118195633A (en) Verification method and device for enterprise standard clause, storage medium and electronic equipment

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