CN111045992B - Configuration file checking method and system based on tree structure - Google Patents

Configuration file checking method and system based on tree structure Download PDF

Info

Publication number
CN111045992B
CN111045992B CN201911224945.0A CN201911224945A CN111045992B CN 111045992 B CN111045992 B CN 111045992B CN 201911224945 A CN201911224945 A CN 201911224945A CN 111045992 B CN111045992 B CN 111045992B
Authority
CN
China
Prior art keywords
content
configuration file
configuration
template
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
CN201911224945.0A
Other languages
Chinese (zh)
Other versions
CN111045992A (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.)
Unihub China Information Technology Co Ltd
Original Assignee
Unihub China Information Technology Co Ltd
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 Unihub China Information Technology Co Ltd filed Critical Unihub China Information Technology Co Ltd
Priority to CN201911224945.0A priority Critical patent/CN111045992B/en
Publication of CN111045992A publication Critical patent/CN111045992A/en
Application granted granted Critical
Publication of CN111045992B publication Critical patent/CN111045992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/144Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a configuration file checking method and system based on a tree structure, wherein the method comprises the following steps: acquiring equipment information, building a configuration file model tree according to the equipment information, wherein each leaf item is respectively provided with a standard configuration file; according to the specification configuration file, configuring a content extraction template and a specification comparison template for each leaf item; scanning the whole network configuration file, and extracting the content of the configuration file by using a content extraction template to obtain the content of the configuration file; performing standard verification on the content of the configuration file by using a standard comparison template to obtain nonstandard content; and matching the nonstandard content to the corresponding leaf item, and displaying the nonstandard content through a configuration file model tree. The method and the system can realize the automatic inspection of the normalization of the configuration file of the network equipment, report the nonstandard content to the user through the tree structure, enable the user to know the nonstandard content, the change and the change reason of the configuration file in time, correspondingly adjust according to the nonstandard content, and keep the normal operation of the equipment and the network.

Description

Configuration file checking method and system based on tree structure
Technical Field
The present invention relates to the field of network devices, and in particular, to a method and a system for checking a configuration file based on a tree structure.
Background
Currently, device profiles are an important component of network devices, and operators need to ensure the standardization of the profiles, and to know the changes and reasons of the changes in the profiles for the proper operation of the devices and the network. In the face of mass network equipment, a large number of configuration files are generated due to different manufacturers, models and roles, the contents of the configuration files are quite different, and the standardization and the change condition of the configuration files cannot be checked manually; moreover, when the configuration file is changed, the reason of the change of the configuration file cannot be traced back in time.
In view of the foregoing, a technical solution is needed that can automatically review the normalization of the configuration file and trace the change cause in time.
Disclosure of Invention
In order to solve the problems, the invention provides a tree structure-based configuration file checking method and a tree structure-based configuration file checking system, which can automatically check the standardization of the configuration file, compare the change content of the configuration file and trace the change reason to ensure the normal operation of equipment and a network.
In an embodiment of the present invention, a tree structure-based configuration file checking method is provided, including:
acquiring equipment information, and establishing a configuration file model tree according to the equipment information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file;
configuring a content extraction template and a specification comparison template for each leaf item according to the specification configuration file;
scanning configuration files of the whole network, and extracting the content of the configuration files by utilizing the content extraction template to obtain the content of the configuration files;
performing standard verification on the content of the configuration file by using a standard comparison template to obtain nonstandard content;
and matching the nonstandard content to a corresponding She Zixiang, and displaying the nonstandard content through the configuration file model tree.
In another embodiment of the present invention, a tree structure-based profile inspection system is also provided, including:
the model tree building module is used for obtaining equipment information and building a configuration file model tree according to the equipment information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file;
the template configuration module is used for configuring a content extraction template and a specification comparison template for each leaf item according to the specification configuration file;
the content extraction module is used for scanning the configuration file of the whole network, and extracting the content of the configuration file by utilizing the content extraction template to obtain the content of the configuration file;
the standard verification module is used for carrying out standard verification on the content of the configuration file by using a standard comparison template to obtain nonstandard content;
and the tree-shaped display module is used for matching the nonstandard content to the corresponding She Zixiang and displaying the nonstandard content through the configuration file model tree.
In another embodiment of the present invention, a computer device is also presented, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a tree-structure-based profile checking method when executing the computer program.
In another embodiment of the present invention, a computer-readable storage medium storing a computer program which, when executed by a processor, implements a tree-structure-based profile inspection method is also presented.
The tree structure-based configuration file checking method and system provided by the invention realize automatic checking of the normalization of the configuration file, have high checking speed and high accuracy, and can report the nonstandard content to the user through the tree structure, so that the user can timely know the nonstandard content, the configuration file change and the change reason, and accordingly adjust according to the nonstandard content, and the normal operation of the equipment and the network is maintained.
Drawings
Fig. 1 is a flowchart of a tree structure-based profile inspection method according to an embodiment of the present invention.
FIG. 2 is a detailed flow chart of the steps of model tree creation according to an embodiment of the present invention.
FIG. 3 is a partial schematic diagram of a plant model tree in accordance with an embodiment of the present invention.
FIG. 4 is a diagram of a display interface of a specification profile according to an embodiment of the present invention.
FIG. 5 is a configuration content sample illustration of a specification configuration file in accordance with an embodiment of the present invention.
FIG. 6 is a detailed flow chart of the configuration template according to an embodiment of the present invention.
FIG. 7 is a schematic diagram of a display interface of a content extraction template and a specification contrast template according to an embodiment of the present invention.
Fig. 8 is a schematic diagram of a content extraction template according to an embodiment of the invention.
FIG. 9 is a diagram of a specification comparison template in accordance with an embodiment of the present invention.
FIG. 10 is a flowchart illustrating the detailed steps of content extraction according to an embodiment of the present invention.
Fig. 11 is a schematic diagram of a configuration file of a network management configuration according to an embodiment of the present invention.
FIG. 12 is a schematic diagram of profile content according to an embodiment of the present invention.
Fig. 13 is a schematic diagram of the remaining content of an embodiment of the present invention.
FIG. 14 is a detailed flow chart illustrating the specification verification process according to one embodiment of the present invention.
FIG. 15 is a schematic diagram of a display interface showing non-canonical details of a model tree in accordance with an embodiment of the invention.
FIG. 16 is a schematic diagram of a tree-based profile inspection system architecture according to an embodiment of the present invention.
FIG. 17 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the invention and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a configuration file checking method and system based on a tree structure are provided. The method and the system mainly build a configuration file model tree for each manufacturer, model and role device; configuring a content extraction template and a specification comparison template for each item of the model tree; the method comprises the steps of regularly scanning a full-network configuration file, extracting configuration file content by using a content extraction template, and after the content extraction is finished, performing standard verification by using a standard comparison template to generate an nonstandard report; finally, the user checks the nonstandard content according to the model tree, and can compare the prior configuration file, locate the change time of the configuration file and trace the source of the change operation.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments thereof.
Fig. 1 is a flowchart of a tree structure-based profile inspection method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101, equipment information is acquired, and a configuration file model tree is established according to the equipment information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file.
Step S102, configuring a content extraction template and a specification comparison template for each leaf item according to the specification configuration file;
step S103, scanning configuration files of the whole network, and extracting the content of the configuration files by using the content extraction template to obtain the content of the configuration files;
step S104, carrying out standard verification on the content of the configuration file by using a standard comparison template to obtain non-standard content;
step S105, matching the nonstandard content to the corresponding She Zixiang, and displaying through the configuration file model tree.
In order to more clearly explain the above tree structure-based profile inspection method, a specific embodiment will be described below.
In an embodiment, in combination with step S101, as shown in fig. 2, the process may include the following detailed steps:
step S1011, obtaining equipment information including equipment manufacturer, equipment model, equipment role information and configuration items;
step S1012, abstracting the equipment information into configuration file models of different levels, and building a configuration file model tree; wherein She Zixiang on the profile model tree corresponds to equipment vendor, equipment model, equipment role information and configuration items.
Taking Cisco's equipment as an example: the equipment manufacturer is "cisco", the equipment model is "GSR", and the equipment role is "F". (this example is only for the purpose of better illustrating the invention and is not to be construed as unduly limiting the invention.)
Referring to FIG. 3, a partial schematic diagram of a profile model tree is shown, in accordance with one embodiment. As shown in fig. 3, a profile model tree of "cisco-GSR-F" is built according to its configuration items, wherein,
the leaf items include "boot configuration", "NTP configuration", "Syslog configuration", "AAA configuration" and "GE port".
The next layer of the Cisco-GSR-F node comprises three nodes of basic configuration, network management configuration and port configuration, and five leaf nodes are arranged on the next layer.
Starting configuration and NTP configuration as leaf items of basic configuration;
the Syslog configuration and AAA configuration belong to She Zixiang of the network management configuration;
the GE port belongs to the She Zixiang port configuration.
After the model tree is built, a specification configuration file can be set for each leaf item according to the network equipment specification configuration file of the operator.
A schematic diagram of a display interface of a canonical configuration file is shown in connection with fig. 4.
As shown in fig. 4, after the "start-up configuration" is selected She Zixiang, the current device configuration item is displayed as the start-up configuration; in the lower configuration content, the configuration content may be input according to a network device specification configuration file of an operator, where the configuration content is actually a sample, and may be processed in a subsequent processing procedure.
The configuration content can be changed according to actual conditions, for example, due to configuration project configuration specification change, service change and other reasons, an operator can make certain adjustment to the configuration specification, and the configuration specification adjustment history is mainly used for recording the configuration specification adjustment history; in this regard, the system may modify the specification profile by receiving a configuration change instruction and store a change record; that is, after the configuration content is changed, the change cause needs to be entered for the convenience of other staff to check.
Taking "network management configuration" on the tree structure as an example, a specification configuration file of a configuration item in "network management configuration" is set according to a related network device specification configuration file, as shown in fig. 5, which is a configuration content sample of the specification configuration file of a specific embodiment. The specification configuration file of the configuration item is shown in the figure, wherein the specification configuration file comprises keywords such as 'snmp-server', 'acl_netmanagement', and the keywords are important contents of a subsequent production content extraction template and a specification comparison template.
In one embodiment, in conjunction with step S102, as shown in fig. 6, the specific process of configuring the template is:
step S1021, extracting template keywords according to the specification configuration file;
step S1022, configuring a corresponding item to be extracted by using the template keyword, and constructing a content extraction template according to the item to be extracted, wherein the initial content of the item to be extracted is empty;
step S1023, setting a difference comparison logic according to the content of the specification configuration file and the template keywords, and constructing a specification comparison template; the difference comparison logic determines whether there are redundant lines or missing lines between the two configuration text contents, whether there are keywords, and so on, and in this embodiment, specifically compares (using the content extraction template) the differences between the extracted configuration file contents and the specification configuration file.
FIG. 7 is a schematic diagram of a display interface of a content extraction template and a specification comparison template. As shown in fig. 7, after the "start-up configuration" is selected She Zixiang, the current device configuration item is displayed as the start-up configuration. The dialog box in the interface can display and save the content of the content extraction template and the specification comparison template.
For the content extraction template, which contains a plurality of items to be extracted, the specific configuration file content of each item to be extracted needs to be scanned and extracted through the subsequent steps.
In a specific embodiment, referring to the canonical configuration file shown in fig. 5, the content extraction template of the configuration item is configured to obtain the content extraction template shown in fig. 8, where the template may be used to obtain the configuration file content by extracting the line at the beginning of the snmp-server, extracting the acl_netmanagement line, and extracting the segments included in the ip access-list standard acl _netmanagement.
For the specification comparison templates, which are used in subsequent steps to verify the content of the configuration file obtained as described above, there are typically either simple comparisons (direct and configuration specification comparisons) or complex comparisons (comparisons made by special processing logic and configuration specifications).
In a specific embodiment, referring to the specification configuration file shown in fig. 5, a specification comparison template of the configuration item is configured to obtain a specification comparison template as shown in fig. 9, where the template is mainly used for judging whether a configuration row specified by a specification exists, and judging whether a configuration end specified by the specification exists to perform specification verification.
In one embodiment, in conjunction with step S103, as shown in fig. 10, the specific process of content extraction is:
step S1031, regularly scanning configuration files of the whole network;
step S1032, inquiring the leaf item corresponding to the configuration file;
step S1033, extracting configuration file contents from the configuration file by using the content extraction template of the corresponding leaf item.
Referring to fig. 11, a schematic diagram of a configuration file of a network management configuration according to an embodiment is shown. As shown in fig. 11, a configuration file of the network management configuration is obtained through scanning, wherein the configuration file contains a plurality of configuration items. Content extraction is performed from the profile of fig. 11 using the content extraction template shown in fig. 8, resulting in profile content as shown in fig. 12.
After the content extraction, the rest of the content is shown in fig. 13, and is a configuration file of other configuration items, and can be used for extraction and specification verification of other configuration items.
In one embodiment, in conjunction with step S104, as shown in fig. 14, the detailed steps of the specification verification are:
step S1041, removing the annotation content in the specification comparison template;
step S1042, deleting the variable in the content of the configuration file;
step S1043, judging whether the content of the configuration file contains all rows in the specification comparison template by using the specification comparison template;
if not all the rows are contained, judging that the configuration is out of specification, abnormally configuring the configuration to be lack of configuration, and recording the out-of-specification content at the end of the configuration file content.
Step S1044, judging whether the content of the configuration file has the content exceeding the range of the specification comparison template by using the specification comparison template;
if yes, judging that the content is not standard, and if the abnormal configuration is redundant, marking the content exceeding the standard comparison template range to obtain the non-standard content.
Specifically, the comment part in the standard comparison template is removed during comparison, and the format # xxx#; the configuration file content is then adjusted to remove the variables for rows with variables.
The process of the specification verification comprises the following steps:
and judging whether the adjusted configuration file content contains all rows of the specification comparison template, if not, not normalizing, and abnormally configuring to lack configuration. Using html label red to highlight non-standard configuration row and additional text, and adding text after configuration row: "unnormal: redundant configuration).
Judging whether the content of the adjusted configuration file exceeds the content of the standard comparison template or not: if the content is available, the abnormal configuration is not standardized, the abnormal configuration is redundant, the text prompt information is added in the last line feed of the extracted content, and the html label is used for highlighting the text prompt information in blue: "… does not specify: lack of configuration).
According to the specification comparison template of fig. 9, the specification verification is performed on the content of the configuration file of fig. 12, so that redundant configuration can be obtained: "snmp-sever trap type base-trap" is the redundant row; no lack of configuration was found.
Further, in connection with step S105, the nonstandard content may be displayed on the tree structure, and the "snmp-sever trap type base-trap" is highlighted in html tag red, and the word "nonstandard" is added: redundant configuration ", for viewing by the user.
After all the check items are processed, if the unanalyzed content is still in the configuration file, the configuration item is used as the rest configuration.
In one embodiment, after normalization inspection, the following non-normalized report may be obtained, as shown in table 1:
table 1 non-canonical report
In an embodiment, in combination with step S105, the user may view the nonstandard content according to the model tree, and may compare the previous configuration file, locate the modification time of the configuration file, and trace the source of the modification operation.
Specifically, after the irregular content is obtained, obtaining a device configuration log and a user operation log which are earlier than the standard verification time; and comparing the device configuration log with the user operation log according to the nonstandard configuration row corresponding to the nonstandard content to obtain corresponding device configuration log and user operation log, and displaying the corresponding device configuration log and user operation log through the configuration file model tree.
In connection with FIG. 15, non-canonical details are shown in a manner that configures a model tree; fig. 15 shows a standard verification result of a port configuration, where the text label information "not standard" in the GE port: redundant configuration ", the behavior is redundant configuration. The POS port does not find unnormalized content.
The user can extract an irregular configuration row from the irregular configuration content, extract a device operation log of which the time range is one day before the regular comparison time from an 'AH-AQ-RML-A-1.CN2' device configuration log or a user operation log (comprising an operation ip, an operation user, an operation time and an operation command), compare the irregular configuration row content with the device operation log, list the corresponding device operation log or the user operation log if intersection occurs, and provide an irregular operation traceability reference for the user.
By using the configuration file checking method based on the tree structure, the automatic checking of the normalization of the configuration file of the network equipment can be realized, and the unnormalized content is reported to the user through the tree structure, so that the user can know the unnormalized content, the change and the change reason of the configuration file in time, and the normal operation of the equipment and the network is maintained by correspondingly adjusting the unnormalized content.
It should be noted that although the operations of the method of the present invention are described in a particular order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the particular order or that all of the illustrated operations be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Having described the method of the exemplary embodiment of the present invention, next, a tree structure-based profile inspection system of the exemplary embodiment of the present invention will be described with reference to fig. 16.
The implementation of the tree-structure-based configuration file checking system can be referred to the implementation of the above method, and the repetition is not repeated. The term "module" as used below may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Based on the same inventive concept, the invention also provides a configuration file checking system based on a tree structure, as shown in fig. 16, the system comprises:
a model tree building module 1610, configured to obtain device information, and build a profile model tree according to the device information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file;
a template configuration module 1620, configured to configure a content extraction template and a specification comparison template for each of the leaf items according to the specification configuration file;
the content extraction module 1630 is configured to scan a configuration file of the whole network, and perform content extraction on the configuration file by using the content extraction template to obtain configuration file content;
the specification verification module 1640 is configured to perform specification verification on the configuration file content by using a specification comparison template to obtain non-specification content;
the tree display module 1650 is configured to match the nonstandard content to a corresponding She Zixiang, and display the nonstandard content through the profile model tree.
It should be noted that although several modules of a tree-based profile inspection system are mentioned in the detailed description above, such partitioning is merely exemplary and not mandatory. Indeed, the features and functions of two or more modules described above may be embodied in one module in accordance with embodiments of the present invention. Conversely, the features and functions of one module described above may be further divided into a plurality of modules to be embodied.
Based on the foregoing inventive concept, as shown in fig. 17, the present invention further proposes a computer device 1700, including a memory 1710, a processor 1720, and a computer program 1730 stored in the memory 1710 and executable on the processor 1720, where the processor 1720 implements the foregoing tree structure-based profile inspection method when executing the computer program 1730.
Based on the foregoing inventive concept, the present invention also proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements a tree-structure-based profile inspection method.
The tree structure-based configuration file checking method and system provided by the invention realize automatic checking of the normalization of the configuration file, have high checking speed and high accuracy, and can report the nonstandard content to the user through the tree structure, so that the user can timely know the nonstandard content, the configuration file change and the change reason, and accordingly adjust according to the nonstandard content, and the normal operation of the equipment and the network is maintained.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods and computer program products according to embodiments of the invention. 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.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A tree structure-based profile inspection method, the method comprising:
acquiring equipment information, and establishing a configuration file model tree according to the equipment information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file;
configuring a content extraction template and a specification comparison template for each leaf item according to the specification configuration file;
scanning configuration files of the whole network, and extracting the content of the configuration files by utilizing the content extraction template to obtain the content of the configuration files;
performing standard verification on the content of the configuration file by using a standard comparison template to obtain nonstandard content;
matching the nonstandard content to a corresponding She Zixiang, and displaying through the configuration file model tree;
according to the specification configuration file, configuring a content extraction template and a specification comparison template for each leaf item, including:
extracting template keywords according to the specification configuration file;
configuring a corresponding item to be extracted by using the template keyword, and constructing a content extraction template according to the item to be extracted, wherein the initial content of the item to be extracted is empty;
setting a difference comparison logic according to the content of the specification configuration file and the template keywords, and constructing a specification comparison template;
the method for verifying the configuration file content by using the specification comparison template to obtain the nonstandard content comprises the following steps:
removing annotation content in the specification comparison template;
deleting variables in the configuration file content;
judging whether the configuration file content contains all rows in the specification comparison template or not by utilizing the specification comparison template;
if not all the rows are contained, judging that the configuration is out of specification, abnormally configuring the configuration to be lack of configuration, and recording out-of-specification content at the end of the configuration file content;
judging whether the content of the configuration file exceeds the range of the specification comparison template or not by utilizing the specification comparison template;
if yes, judging that the content is not standard, and if the abnormal configuration is redundant, marking the content exceeding the standard comparison template range to obtain the non-standard content.
2. The tree structure-based profile inspection method of claim 1, wherein obtaining device information, building a profile model tree from the device information, comprises:
acquiring equipment information including equipment manufacturer, equipment model, equipment role information and configuration items;
abstracting the equipment information into configuration file models of different levels, and establishing a configuration file model tree; wherein a configuration item of a device corresponds to a leaf item on the profile model tree.
3. The tree structure based profile inspection method of claim 2, further comprising:
and receiving a configuration change instruction, modifying the standard configuration file, and storing a change record.
4. The tree structure-based profile inspection method according to claim 2, wherein scanning a profile of a whole network, extracting content from the profile using the content extraction template, obtaining profile content, comprises:
regularly scanning configuration files of the whole network;
inquiring a leaf item corresponding to the configuration file;
and extracting configuration file contents from the configuration file by using a content extraction template of the corresponding leaf item.
5. The tree structure based profile inspection method of claim 1, further comprising:
after the irregular content is obtained, obtaining a device configuration log and a user operation log which are earlier than the standard verification time;
and comparing the device configuration log with the user operation log according to the nonstandard configuration row corresponding to the nonstandard content to obtain corresponding device configuration log and user operation log, and displaying the corresponding device configuration log and user operation log through the configuration file model tree.
6. A tree-structure-based profile inspection system, the system comprising:
the model tree building module is used for obtaining equipment information and building a configuration file model tree according to the equipment information; the configuration file model tree comprises a plurality of leaf items, and each leaf item is provided with a standard configuration file;
the template configuration module is used for configuring a content extraction template and a specification comparison template for each leaf item according to the specification configuration file;
the content extraction module is used for scanning the configuration file of the whole network, and extracting the content of the configuration file by utilizing the content extraction template to obtain the content of the configuration file;
the standard verification module is used for carrying out standard verification on the content of the configuration file by using a standard comparison template to obtain nonstandard content;
the tree-shaped display module is used for matching the nonstandard content to the corresponding She Zixiang and displaying the nonstandard content through the configuration file model tree;
the template configuration module is specifically configured to:
extracting template keywords according to the specification configuration file;
configuring a corresponding item to be extracted by using the template keyword, and constructing a content extraction template according to the item to be extracted, wherein the initial content of the item to be extracted is empty;
setting a difference comparison logic according to the content of the specification configuration file and the template keywords, and constructing a specification comparison template;
the standard checking module is specifically configured to:
removing annotation content in the specification comparison template;
deleting variables in the configuration file content;
judging whether the configuration file content contains all rows in the specification comparison template or not by utilizing the specification comparison template;
if not all the rows are contained, judging that the configuration is out of specification, abnormally configuring the configuration to be lack of configuration, and recording out-of-specification content at the end of the configuration file content;
judging whether the content of the configuration file exceeds the range of the specification comparison template or not by utilizing the specification comparison template;
if yes, judging that the content is not standard, and if the abnormal configuration is redundant, marking the content exceeding the standard comparison template range to obtain the non-standard content.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 5 when executing the computer program.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 5.
CN201911224945.0A 2019-12-04 2019-12-04 Configuration file checking method and system based on tree structure Active CN111045992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911224945.0A CN111045992B (en) 2019-12-04 2019-12-04 Configuration file checking method and system based on tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911224945.0A CN111045992B (en) 2019-12-04 2019-12-04 Configuration file checking method and system based on tree structure

Publications (2)

Publication Number Publication Date
CN111045992A CN111045992A (en) 2020-04-21
CN111045992B true CN111045992B (en) 2023-07-25

Family

ID=70234439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911224945.0A Active CN111045992B (en) 2019-12-04 2019-12-04 Configuration file checking method and system based on tree structure

Country Status (1)

Country Link
CN (1) CN111045992B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726249B (en) * 2020-06-02 2022-10-04 中盈优创资讯科技有限公司 Configuration file processing method and device of network equipment
CN111967137B (en) * 2020-07-15 2024-05-17 北京北方华创微电子装备有限公司 Modeling method and device for semiconductor equipment
CN112600685B (en) * 2020-10-30 2022-07-15 中盈优创资讯科技有限公司 Automatic detection and issuing method for IP RAN network equipment configuration specification
CN113114487B (en) * 2021-03-29 2022-12-20 中盈优创资讯科技有限公司 Method and device for checking metro network equipment configuration normalization

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220072A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 Configuration file method of calibration and device based on serialization format

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7191119B2 (en) * 2002-05-07 2007-03-13 International Business Machines Corporation Integrated development tool for building a natural language understanding application
US10120725B2 (en) * 2012-06-22 2018-11-06 Microsoft Technology Licensing, Llc Establishing an initial configuration of a hardware inventory

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220072A (en) * 2016-03-21 2017-09-29 阿里巴巴集团控股有限公司 Configuration file method of calibration and device based on serialization format

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘俊 ; 潘滢伊 ; 曾少华 ; .电力数据通信网配置核查系统设计与实现.计算技术与自动化.2018,(03),全文. *

Also Published As

Publication number Publication date
CN111045992A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN111045992B (en) Configuration file checking method and system based on tree structure
US10261967B2 (en) Data extraction
CN107797916B (en) DDL statement auditing method and device
CN108171088B (en) Server hardware credibility protection method and device based on BMC
WO2017081865A1 (en) Log analysis system and method, and recording medium
WO2020000806A1 (en) Configuration file comparison method and configuration file comparison device
US11567962B2 (en) Computer network controlled data orchestration system and method for data aggregation, normalization, for presentation, analysis and action/decision making
WO2017041578A1 (en) Method and device for acquiring database change information
WO2019242113A1 (en) Service data table filing correction method, device, computer equipment and storage medium
US10169218B2 (en) Method for automatically validating data against a predefined data specification
CN114153980A (en) Knowledge graph construction method and device, inspection method and storage medium
WO2021012909A1 (en) Data export method and apparatus, computer device, and storage medium
CN106547726A (en) A kind of automation checking method and checking device based on document
CN112905323A (en) Data processing method and device, electronic equipment and storage medium
CN105469175A (en) Semiconductor process scheme management system and method
CN106682210B (en) Log file query method and device
US20190340540A1 (en) Adaptive continuous log model learning
CN116248393A (en) Intranet data transmission loophole scanning device and system
CN116032581A (en) Network equipment security management method and electronic equipment
CN114268569A (en) Configurable network operation, maintenance, acceptance and test method and device
WO2015184750A1 (en) Data maintenance method and device of network element device
CN112787839B (en) Port description modification method and device
CN112052184A (en) Automatic generation method and device for test script and storage medium
CN115221035A (en) Software testing method and device and related equipment
CN112035332A (en) Server monitoring method and system and readable 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