A verification method and device for modifying the configuration of BAS devices based on a matching algorithm

By adopting an automated verification method based on matching algorithm in the verification of BAS equipment configuration file, the problem of inefficient relying on manual verification in the existing technology is solved, efficient and automated configuration verification is achieved, and the guarantee of network service quality is improved.

CN114090576BActive Publication Date: 2025-05-30CHINA UNITECHS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111281463.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2025-05-30
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

The verification of existing BAS equipment configuration files mainly relies on manual inspection, which is inefficient and wasteful, making it difficult to effectively ensure the quality of network services.

Method used

Using a method based on the matching algorithm, the configuration parameter range and command rules of the current network environment are obtained through parameter matching and command matching, and the modified configuration content is checked, and the verification process is completed automatically.

Benefits of technology

It realizes automated verification, saves labor costs, improves verification efficiency, and has broader application conditions and strong migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090576B_ABST
    Figure CN114090576B_ABST
Patent Text Reader

Abstract

The present invention discloses a verification method and device for modifying the configuration of BAS devices based on a matching algorithm. The method includes: obtaining the configuration files of all BAS devices in the same area in the existing network environment; matching the configuration files of the BAS devices before and after modification to obtain the different parts between the two; performing parameter matching on the configuration contents of the configuration files of all BAS devices in the existing network environment to obtain a configuration parameter value range table; traversing the configuration files of all BAS devices in the existing network environment to obtain the horizontal differences of the configuration files of the BAS devices in the existing network environment, and then obtaining a list of frequently changed commands through keyword extraction and word frequency statistics; verifying the configuration parameters and configuration commands of the obtained configuration modification content; and statistically outputting the verification results in segments. The method and device verify the modified configuration content by obtaining the configuration parameter range and configuration command rules in the existing network environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of BAS device configuration file verification, and in particular to a verification method and device for BAS device configuration modification based on a matching algorithm. Background Art

[0002] As an important part of the metropolitan area network, the BAS (Broadband Access Server) device provides services mainly by configuring corresponding service contents in the configuration file. Therefore, the correctness of the BAS device configuration file directly affects the quality of network services. However, the BAS device configuration file is complex and changeable, and the modification frequency is high, which brings certain potential risks to the quality of network services.

[0003] The existing verification of the BAS device configuration file mainly relies on manual troubleshooting by testers. The BAS device configuration file is deployed to the test environment. If the network service can run normally, the configuration is considered correct; otherwise, the configuration is troubleshot according to the error reason. However, frequent manual verification leads to low efficiency and resource waste. Summary of the Invention

[0004] In order to solve the above problems existing in the existing verification of the BAS device configuration file, the present invention provides a verification method and device for BAS device configuration modification based on a matching algorithm. By parameter matching and command matching, the parameter range and command rules configured in the live network environment are obtained, and the modified configuration content is verified.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] In an embodiment of the present invention, a verification method for BAS device configuration modification based on a matching algorithm is proposed. The method includes:

[0007] Obtain the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and obtain the configuration files of all BAS devices in the live network environment of the area;

[0008] Match the configuration file of the modified BAS device with the live network configuration file of the BAS device to obtain the different parts of the two, which are the modified contents of the configuration;

[0009] Perform parameter matching on the configuration contents of the configuration files of all BAS devices in the live network environment to obtain a configuration parameter value range table;

[0010] Traverse the configuration files of all BAS devices in the live network environment, obtain the optimal matching files for the configuration files of each BAS device, summarize the differences between the configuration files of each BAS device and the optimal matching files to obtain horizontal differences; extract keywords and perform word frequency statistics on the horizontal difference parts of the configuration to obtain a list of frequently changed commands;

[0011] Verify the configuration parameters and configuration commands for the obtained configuration modification content, and mark the configurations that do not meet the requirements;

[0012] Statistically analyze the verification results in segments and output the final verification results.

[0013] Furthermore, perform parameter matching on the configuration content of the configuration files of all BAS devices in the live network environment to obtain a configuration parameter value range table, including:

[0014] Construct a parameter matching method, and sequentially perform parameter matching on the configuration content of the configuration files of all BAS devices in the live network environment to obtain all configuration commands and their corresponding parameter value ranges;

[0015] Store the configuration commands after parameter replacement and the matched parameter value ranges in pairs to obtain a configuration parameter value range table.

[0016] Furthermore, extract keywords and perform word frequency statistics on the horizontal difference parts of the configuration to obtain a list of frequently changed commands, including:

[0017] Extract keywords from the configuration command information in each line of the horizontal difference part of the configuration according to the line break identifier, and convert the original command lines into a keyword list;

[0018] Traverse the keyword list, record the frequency of occurrence of each command keyword, and obtain a command keyword frequency information table;

[0019] Divide the frequency of occurrence of each command keyword by the total number of command keywords to obtain a command keyword frequency information table;

[0020] Set a minimum frequency threshold, and obtain a list of command keywords with a frequency of occurrence greater than the threshold, which is the list of frequently changed commands.

[0021] Furthermore, verify the configuration parameters and configuration commands for the obtained configuration modification content, and mark the configurations that do not meet the requirements, including:

[0022] Match the configuration parameter for the obtained configuration modification content, obtain the parameter value of the configuration modification content and the configuration command after parameter substitution, then query the configuration parameter value range table to verify whether the parameter is within the value range. If the parameter is not within the value range, it is considered that there is an abnormality in this parameter, and this configuration is marked; otherwise, this configuration parameter is considered normal.

[0023] Extract keywords from the configuration command of the obtained configuration modification content, query the high-frequency change command list, and verify whether the command is in the list. If the command is not in the list, it is considered that there is an abnormality in this command, and this command is marked; otherwise, this command is considered normal.

[0024] Furthermore, statistically analyze the verification results in segments and output the final verification results, including:

[0025] According to the segment identifier of the BAS configuration, statistically analyze the configuration modification content in segments, count the number of parameter abnormalities and command abnormalities in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification results including the statistical information.

[0026] In an embodiment of the present invention, a verification device for modifying the BAS device configuration based on a matching algorithm is also proposed. The device includes:

[0027] A data acquisition module, configured to acquire the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and acquire the configuration files of all BAS devices in the current network environment of this area;

[0028] A difference acquisition module, configured to match the configuration file of the modified BAS device with the current network configuration file of the BAS device to obtain the different parts of the two, which are the configuration modification content;

[0029] A parameter rule acquisition module, configured to perform parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain the configuration parameter value range table;

[0030] A command rule acquisition module, configured to traverse the configuration files of all BAS devices in the current network environment, obtain the horizontal difference through the optimal matching and horizontal difference acquisition sub-module; obtain the high-frequency change command list by extracting keywords and counting word frequencies from the configuration horizontal difference part;

[0031] A configuration verification module, configured to verify the configuration parameters and configuration commands of the obtained configuration modification content, and mark the configurations that do not meet the requirements;

[0032] A result output module, configured to statistically analyze the verification results in segments and output the final verification results.

[0033] Further, the parameter rule acquisition module is specifically configured to:

[0034] Construct a parameter matching method, and sequentially perform parameter matching on the configuration contents of the configuration files of all BAS devices in the existing network environment to obtain all configuration commands and their corresponding parameter value ranges;

[0035] Pairwise store the configuration commands after parameter replacement and the matched parameter value ranges to obtain a configuration parameter value range table.

[0036] Further, the optimal matching and horizontal difference acquisition sub-module is specifically configured to:

[0037] Use the optimal matching algorithm to obtain the optimal matching file for the configuration file of each BAS device;

[0038] Summarize the different parts between the configuration file of each BAS device and the optimal matching file to obtain the horizontal difference.

[0039] Further, the keyword extraction and word frequency statistics sub-module is specifically configured to:

[0040] Extract keywords from the configuration command information of each line of the configuration horizontal difference part according to the line break identifier, and convert the original command line into a keyword list;

[0041] Traverse the keyword list, record the frequency of occurrence of each command keyword, and obtain a command keyword frequency information table;

[0042] Divide the frequency of occurrence of each command keyword by the total number of command keywords to obtain a command keyword frequency information table;

[0043] Set a minimum frequency threshold, and obtain a list of command keywords with a frequency greater than the threshold, which is the high-frequency change command list.

[0044] Further, the configuration verification module is specifically configured to:

[0045] Perform parameter matching on the obtained configuration modification content to obtain the parameter value of the configuration modification content and the configuration command after parameter replacement, and then query the configuration parameter value range table to verify whether the parameter is within the value range. If the parameter is not within the value range, it is considered that this parameter is abnormal, and this configuration is marked; otherwise, it is considered that this configuration parameter is normal.

[0046] Extract keywords from the configuration command of the obtained configuration modification content, query the high-frequency change command list, and verify whether the command is in the list. If the command is not in the list, it is considered that this command is abnormal, and this command is marked; otherwise, it is considered that this command is normal.

[0047] Further, a result output module is specifically configured to:

[0048] According to the segmentation identifiers configured in the BAS, perform segmented statistics on the configuration modification content, count the number of parameter anomalies and command anomalies in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification result including the statistical information.

[0049] In an embodiment of the present invention, a computer device is further proposed, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the verification method for the BAS device configuration modification based on the matching algorithm described above is implemented.

[0050] In an embodiment of the present invention, a computer-readable storage medium is further proposed. The computer-readable storage medium stores a computer program for executing the verification method for the BAS device configuration modification based on the matching algorithm.

[0051] Beneficial effects:

[0052] 1. By obtaining the configuration parameter range and configuration command rules in the live network environment, the present invention verifies the modified configuration content, has broader application conditions, and has strong migration ability.

[0053] 2. The present invention adopts automated verification, does not require human participation, saves labor costs; at the same time, the verification speed is fast, improving the verification efficiency. Description of the drawings

[0054] Figure 1 is a schematic flowchart of the verification method for the BAS device configuration modification based on the matching algorithm of the present invention;

[0055] Figure 2 is a schematic flowchart of the parameter rule extraction of the present invention;

[0056] Figure 3 is a schematic flowchart of the command rule extraction of the present invention;

[0057] Figure 4 is a schematic structural diagram of the verification device for the BAS device configuration modification based on the matching algorithm of the present invention;

[0058] Figure 5 is a schematic structural diagram of the computer device of the present invention. Detailed implementation manners

[0059] 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 provided only to enable those skilled in the art to better understand and then implement the present invention, rather than limiting the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to fully convey the scope of the present disclosure to those skilled in the art.

[0060] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, method, or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0061] According to an embodiment of the present invention, a verification method and device for modifying the configuration of a BAS device based on a matching algorithm are proposed. For the configuration file of the modified BAS device, all configuration files including this device in the existing network environment are obtained; through parameter matching and command matching, the configuration parameter range and configuration command rules of the configuration files in the existing network environment are obtained, and the content of the modified configuration file is verified one by one according to the obtained rules, the configurations that do not meet the requirements are marked, and the verification results are promptly fed back to the operation and maintenance personnel. Based on this method and device, network operation and maintenance personnel can immediately obtain the verification results of the modified content after configuration modification. If there are abnormal configurations, the content of the abnormal configurations can be adjusted in time, greatly improving the work efficiency.

[0062] The principles and spirit of the present invention will be elaborated in detail below with reference to several representative embodiments of the present invention.

[0063] Figure 1 It is a schematic flowchart of a verification method for modifying the configuration of a BAS device based on a matching algorithm according to an embodiment of the present invention. As Figure 1 shown, the method includes:

[0064] 1. Obtain the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and obtain the configuration files of all BAS devices in the existing network environment of this area;

[0065] Obtain the configuration file of the modified BAS device and determine the area information to which the BAS device belongs;

[0066] According to the area information to which the BAS device belongs, enter the working directory where the configuration files are stored in this area, and sequentially query the working directories where each BAS device is stored to obtain the latest configuration file in the current working directory, which is the existing network configuration file of the BAS device.

[0067] 2. Match the configuration file of the modified BAS device with the in-network configuration file of this BAS device to obtain the different parts between the two, which are the modified contents of the configuration.

[0068] Use a text matching algorithm (prior art) to compare the configuration file of the modified BAS device with the in-network configuration file of this BAS device to obtain the different parts between the two. Taking File A and File B as examples, the different parts include three types: the parts that are redundant in File A compared to File B, the parts that are modified in File A compared to File B, and the parts that are missing in File A compared to File B.

[0069] 3. Perform parameter matching on the configuration contents of the configuration files of all BAS devices in the in-network environment to obtain a configuration parameter value range table; as Figure 2 shown:

[0070] Construct a parameter matching method (prior art, using a regular matching method) for matching configuration parameters including addresses, device numbers, and interface information, and perform parameter matching on the configuration contents of the configuration files of all BAS devices in the in-network environment in sequence to obtain all configuration commands and their corresponding parameter value ranges;

[0071] Store the configuration commands after parameter replacement and the matched parameter value ranges in pairs to obtain a configuration parameter value range table.

[0072] 4. Traverse the configuration files of all BAS devices in the in-network environment to obtain the optimal matching file for the configuration file of each BAS device, and summarize the different parts between the configuration file of each BAS device and the optimal matching file to obtain a horizontal difference; as Figure 3 shown:

[0073] For the configuration files of all BAS devices in the in-network environment, use the optimal matching algorithm to perform pairwise matching to obtain the optimal matching file for the configuration file of each BAS device, calculate the difference between the configuration file of this BAS device and its optimal matching file, and summarize the differences between the configuration files of all BAS devices and their optimal matching files to obtain the horizontal difference of the concurrent configuration files. The horizontal difference represents the parts that are often modified in the configuration files during this period.

[0074] Optimal matching algorithm: For a certain configuration file, traverse all other configuration files in the directory in sequence, calculate the difference between this configuration file and other configuration files, divide the number of different lines of the two files by the total number of lines of the two files to obtain the difference degree between the two files, and the file with the smallest difference degree is the optimal matching file for this configuration file;

[0075] Extract keywords and perform word frequency statistics on the horizontal difference part of the configuration to obtain a list of frequently changed commands;

[0076] Extract keywords from the configuration command information of each line in the horizontally different part of the configuration according to the line break identifier, and convert the original command line into a keyword list;

[0077] Traverse the keyword list, record the frequency of occurrence of each command keyword, and obtain the command keyword frequency information table;

[0078] Divide the frequency of occurrence of each command keyword by the total number of command keywords to obtain the command keyword frequency information table;

[0079] Set the minimum frequency threshold, and obtain the list of command keywords with a frequency greater than the threshold, which is the high-frequency change command list.

[0080] 5. Check the configuration parameters and configuration commands for the obtained configuration modification content, and mark the configurations that do not meet the requirements;

[0081] Match the configuration parameters for the obtained configuration modification content, obtain the parameter values of the configuration modification content and the configuration commands after parameter substitution, then query the configuration parameter value range table to check whether the parameter is within the value range. If the parameter is not within the value range, it is considered that there is an abnormality in this parameter, and this configuration is marked as <abnormal parameters>; otherwise, this configuration parameter is considered normal.

[0082] Extract keywords from the configuration commands of the obtained configuration modification content, query the high-frequency change command list, and check whether the command is in the list. If the command is not in the list, it is considered that there is an abnormality in this command, and this command is marked as <abnormal orders>; otherwise, this command is considered normal.

[0083] 6. Statistically analyze the verification results in segments and output the final verification results;

[0084] According to the segment identifier of the BAS configuration, perform segment statistics on the configuration modification content, count the number of parameter abnormalities and command abnormalities in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification results including the statistical information.

[0085] It should be noted that although the operations of the method of the present invention are described in a specific order in the above embodiments and accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.

[0086] To more clearly explain the above method for quickly generating function configurations based on the new metropolitan area network topology, a specific embodiment will be described below. However, it should be noted that this embodiment is only for better illustrating the present invention and does not constitute an improper limitation of the present invention.

[0087] Embodiment:

[0088] 1. Obtain the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and obtain the configuration files of all BAS devices in the current network environment of this area;

[0089] 2. Match the configuration file of the modified BAS device with its current network configuration file, and obtain the different parts of the two, which are the modified contents of the configuration;

[0090] 3. Perform parameter matching on the configuration contents of the configuration files of all BAS devices in the current network environment to obtain a configuration parameter value range table, and implement as follows:

[0091] ′remark dscp tailNUM′: [[′1′], [′11′], [′29′], [′53′]],

[0092] ′classifier VIM behavior net-cdn-permit precedence tailNUM′: [[′8′,

[0093] ′net-1-cdn′],

[0094] [′13′, ′net-2-cdn′],

[0095] [′18′, ′net-3-cdn′],

[0096] [′23′, ′net-4-cdn′]],

[0097] ′HTTP enable′: [[′http-redirect′],

[0098] [′http-redirect-profile′],

[0099] [′http-reply′],

[0100] [′http-hostcar′]],

[0101] ′user-priorityupstreamtailNUM′: [[′0′], [′1′], [′3′], [′6′]],

[0102] 'qos-profile LIMIT inbound identifier none': ['20M',

[0103] ['1500M'],

[0104] ['7000M'],

[0105] ['2500M']],

[0106] 'qos-profile LIMIT outbound identifier none': ['20M',

[0107] ['1500M'],

[0108] ['7000M'],

[0109] ['2500M']],

[0110] 'start VIM ip IP': ['222.33.38.122', 'I2tp'],

[0111] ['222.62.193.217', 'I2tp'],

[0112] ['222.33.38.102', 'I2tp'],

[0113] ['218.24.105.54', 'I2tp']],

[0114] 'import-route static route-policy DEV': ['LNSY_PON_ _HuaWei-onu'],

[0115] ['LNSY_PON_ ,

[0116] ['LNSY_PON_ONU_ _HuaWei'],

[0117] ['LNSY_PON_ONU_ ,

[0118] 'route-policy unr-to- permit node tailNUM': ['10'],

[0119] ['20'],

[0120] [′30′],

[0121] [′15′]],

[0122] 4. Traverse the configuration files of all BAS devices in the live network environment, obtain the optimal matching files for the configuration files of each BAS device, summarize the different parts between the configuration files of each BAS device and the optimal matching files to obtain the horizontal differences; extract keywords and perform word frequency statistics on the horizontal difference parts of the configuration to obtain a list of frequently changed commands, and implement as follows:

[0123] {′vrrp vrid′: 0.15459802275694834,

[0124] ′description′: 0.13475097929490767,

[0125] ′ip address′: 0.12173102033202761,

[0126] ′interface′: 0.09452216626251321,

[0127] ′carrier′: 0.051594851706771125,

[0128] ′undoenablesnmptrapupdown′: 0.044991606043648574,

[0129] ′mac-address′: 0.03960703848784431,

[0130] ′pim′: 0.03600074612945346,

[0131] ′rule′: 0.031138469191071317,

[0132] ′shutdown′: 0.029695952247714978,

[0133] ′vlan-type′: 0.029335323011875893,

[0134] ′I2 bindingvsi′: 0.026860660324566313,

[0135] ′eth-trunk′: 0.02089162469688491,

[0136] 'user-vlan': 0.020655350369955854,

[0137] 'undo shutdown': 0.017384816265622084,

[0138] 'undodcn': 0.016564073866815892,

[0139] 'statistic enable': 0.014872847105639495,

[0140] 'bas': 0.012099732636945843,

[0141] 'snmp- : 0.01017223154884039,

[0142] 'statistic mode forward': 0.009438537586271218,

[0143] 'ipv6 address': 0.007225020207672698,

[0144] 'nas': 0.005198035192439222,

[0145] 'mode': 0.004663309084126096,

[0146] 'pppoe-server bind': 0.004464341229870049,

[0147] 'peer': 0.0037803892308648883,

[0148] 'arp broadcast enable': 0.0032705341043337685,

[0149] 'ipv6 enable': 0.0031213082136417334,

[0150] 'ipv6 address auto': 0.0030964372318597277,

[0151] 'vrrp6 vrid': 0.003059130759186719,

[0152] 'isis': 0.0026611950506746254,

[0153] 'port-queue': 0.0026363240688926197,

[0154] 'description LNSY_PON_ _Huawei': 0.0023378722875085495,

[0155] 'ipv6 nd : 0.0019896785425604674,

[0156] 'remote-backup-profile': 0.0018404526518684325,

[0157] 'pim sm': 0.0018280171609774297,

[0158] 'encapsulation': 0.0018155816700864266,

[0159] 5. Check the configuration parameters and configuration commands for the obtained configuration modification content, and mark the configurations that do not meet the requirements;

[0160] 6. Statistically analyze the verification results in segments and output the final verification results as follows:

[0161] Lines 15 to 20 of the file. 0 abnormal parameters, 1 abnormal order.

[0162]

[15] #

[0163]

[16] info-center 221.180.171.69 facility local1

[0164]

[17] info-center 221.180.191.7 facility local1 local-time

[0165]

[18] info-center size 1024

[0166]

[19] <abnormal orders>switchover mode

[0167]

[20] #

[0168] Lines 109 to 115 of the file. 0 abnormal parameters, 1 abnormal orders.

[0169]

[109] #

[0170]

[110] undo telnet ipv6 server enable

[0171]

[111] telnet server - source all - interface

[0172]

[112] <abnormal orders>undo telnet ipv6 server - source all - interface

[0173]

[113] telnet server acl 2014

[0174]

[114] telnet ipv6 server acl 2014

[0175]

[115] #

[0176] Lines 1413 to 1419 of the file. 1 abnormal parameters, 0 abnormal orders.

[1413] #

[1414] interface

[1415] <abnormal parameters》》arrier down - hold - time 600

[1416] description To - [LNSY - ditanjie64hao - ZH - OLTO86 - MA5680T]GE - 1 - 0 - 19 - O

[1417] undo shutdown

[1418] eth - trunk 18|

[1419] # Lines 2513 to 2516 of the file. 1 abnormal parameters, 0 abnormal orders.

[2513] #

[2514] <abnormal parameters>ipv6 preference 200

[2515] ipv6 import-route static level-1 route-policy ipv6-static-to-isis

[2516] # Based on the same inventive concept, the present invention also provides a verification device for modifying the configuration of a BAS device based on a matching algorithm. The implementation of this device can refer to the implementation of the above method, and the repeated parts will not be described again. The term "module" used hereinafter may be a combination of software and / or hardware that implements a predetermined function. Although the devices 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. Figure 4 is a schematic structural diagram of a verification device for modifying the configuration of a BAS device based on a matching algorithm according to an embodiment of the present invention. As Figure 4 shown, the device includes: A data acquisition module 101, configured to acquire the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and acquire the configuration files of all BAS devices in the current network environment of the area; Acquire the configuration file of the modified BAS device and determine the area information to which the BAS device belongs; According to the area information to which the BAS device belongs, enter the working directory where the area configuration file is stored, query the working directory where each BAS device is stored in turn, and acquire the latest configuration file in the current working directory, which is the current network configuration file of the BAS device. A difference acquisition module 102, configured to match the configuration file of the modified BAS device with the current network configuration file of the BAS device to obtain the different parts of the two, which are the modified contents of the configuration; Using a text matching algorithm (prior art), compare the configuration file of the modified BAS device with the in-network configuration file of the BAS device to obtain the different parts between the two. Taking File A and File B as examples, the different parts include three types: the parts that are redundant in File A compared to File B, the parts that are modified in File A compared to File B, and the parts that are missing in File A compared to File B. The parameter rule acquisition module 103 is used to perform parameter matching on the configuration contents of the configuration files of all BAS devices in the in-network environment to obtain a configuration parameter value range table. Construct a parameter matching method (prior art, using a regular matching method) to match configuration parameters including address, device number, interface information, etc., and sequentially perform parameter matching on the configuration contents of the configuration files of all BAS devices in the in-network environment to obtain all configuration commands and their corresponding parameter value ranges. Store the configuration commands after parameter replacement and the matched parameter value ranges in pairs to obtain a configuration parameter value range table. The command rule acquisition module 104 is used to traverse the configuration files of all BAS devices in the in-network environment, obtain the horizontal difference through the optimal matching and horizontal difference acquisition sub-module, and obtain a list of frequently changed commands by passing the horizontal difference part of the configuration through the keyword extraction and word frequency statistics sub-module. The optimal matching and horizontal difference acquisition sub-module is used to pairwise match all configuration files to obtain the optimal matching file for each configuration file, and summarize the differences between each configuration file and its optimal matching file, which is the horizontal difference. Traverse the configuration files of all BAS devices in the in-network environment, perform pairwise matching using the optimal matching algorithm to obtain the optimal matching file for the configuration file of each BAS device, calculate the difference between the configuration file of the BAS device and its optimal matching file, and summarize the differences between the configuration files of all BAS devices and their optimal matching files to obtain the horizontal difference of the contemporaneous configuration files. The horizontal difference represents the parts that are frequently modified in the configuration files during this period. Optimal matching algorithm: For a certain configuration file, sequentially traverse all other configuration files in the directory, calculate the difference between the configuration file and other configuration files, divide the number of different lines of the two files by the total number of lines of the two files to obtain the difference degree between the two files, and the file with the smallest difference degree is the optimal matching file for the configuration file. The keyword extraction and word frequency statistics sub-module is used to extract keywords from text information using keyword extraction rules and summarize and count the extracted keywords. Extract keywords from the configuration command information of each line of the horizontal difference part of the configuration according to the line break identifier, and convert the original command line into a keyword list. Traverse the keyword list, record the frequency of occurrence of each command keyword, and obtain the command keyword frequency information table; Divide the frequency of occurrence of each command keyword by the total number of command keywords to obtain the command keyword frequency information table; Set the minimum frequency threshold, and obtain the list of command keywords with a frequency greater than the threshold, which is the high-frequency change command list. Configure the verification module 105 to verify the configuration parameters and configuration commands for the obtained configuration modification content, and mark the configurations that do not meet the requirements; The configuration verification includes two aspects. On the one hand, verify whether the configured parameters exceed the range according to the configuration parameter value range table. On the other hand, verify whether the configuration command is a frequently modified command according to the high-frequency change command list; Perform configuration parameter matching on the obtained configuration modification content, obtain the parameter value of the configuration modification content and the configuration command after parameter replacement, then query the configuration parameter value range table to verify whether the parameter is within the value range. If the parameter is not within the value range, it is considered that there is an abnormality in this parameter, and this configuration is marked as <abnormal parameters>; otherwise, this configuration parameter is considered normal. Extract keywords from the configuration command of the obtained configuration modification content, query the high-frequency change command list, and verify whether the command is in the list. If the command is not in the list, it is considered that there is an abnormality in this command, and this command is marked as <abnormal orders>; otherwise, this command is considered normal. The result output module 106 is used to statistically analyze the verification results in segments and output the final verification results; According to the segmentation identifier configured by BAS, perform segmented statistics on the configuration modification content, count the number of parameter abnormalities and command abnormalities in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification results including the statistical information. It should be noted that although several modules of the verification device for BAS device configuration modification based on the matching algorithm are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present invention, the features and functions of the two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules. Based on the foregoing inventive concept, as Figure 5As shown in the figure, the present invention also provides a computer device 200, which includes a memory 210, a processor 220, and a computer program 230 stored in the memory 210 and executable on the processor 220. When the processor 220 executes the computer program 230, it implements the foregoing verification method for modifying the BAS device configuration based on the matching algorithm. Based on the foregoing inventive concept, the present invention also provides a computer-readable storage medium storing a computer program for executing the foregoing verification method for modifying the BAS device configuration based on the matching algorithm. The verification method and device for modifying the BAS device configuration based on the matching algorithm proposed by the present invention verify the modified configuration content by obtaining the configuration parameter range and configuration command rules in the existing network environment. Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefits. This division is only for the convenience of expression. The present invention aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. Regarding the limitations on the protection scope of the present invention, those skilled in the art should understand that based on the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative efforts are still within the protection scope of the present invention.

Claims

1. A verification method for modifying the configuration of BAS devices based on a matching algorithm, characterized in that, the method includes: Obtain the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and obtain the configuration files of all BAS devices in the current network environment of this area; Match the configuration file of the modified BAS device with the current network configuration file of the BAS device to obtain the different parts of the two, which are the modified content of the configuration; Perform parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain a configuration parameter value range table; Traverse the configuration files of all BAS devices in the current network environment, obtain the optimal matching file for the configuration file of each BAS device, summarize the different parts between the configuration file of each BAS device and the optimal matching file to obtain a horizontal difference; Extract keywords and perform word frequency statistics on the horizontal difference part of the configuration to obtain a list of frequently changed commands; Verify the configuration parameters and configuration commands of the obtained configuration modification content, and mark the configurations that do not meet the requirements; Statistically analyze the verification results in segments and output the final verification results.

2. The verification method for modifying the configuration of BAS devices based on a matching algorithm according to claim 1, characterized in that, Performing parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain a configuration parameter value range table includes: Construct a parameter matching method, and sequentially perform parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain all configuration commands and their corresponding parameter value ranges; Store the configuration commands after parameter replacement and the matched parameter value ranges in pairs to obtain a configuration parameter value range table.

3. The verification method for modifying the configuration of BAS devices based on a matching algorithm according to claim 1, characterized in that, Extracting keywords and performing word frequency statistics on the horizontal difference part of the configuration to obtain a list of frequently changed commands includes: Extract keywords from the configuration command information of each line of the horizontal difference part of the configuration according to the line break identifier, and convert the original command line into a keyword list; Traverse the keyword list, record the frequency of occurrence of each command keyword, and obtain a command keyword frequency information table; Divide the frequency of occurrence of each command keyword by the total number of command keywords to obtain a command keyword frequency information table; Set a minimum frequency threshold, and obtain a list of command keywords with a frequency of occurrence greater than the threshold, which is the list of frequently changed commands.

4. The verification method for modifying the configuration of BAS devices based on a matching algorithm according to claim 1, characterized in that, Verifying the configuration parameters and configuration commands of the obtained configuration modification content, and marking the configurations that do not meet the requirements includes: Perform parameter matching on the obtained configuration modification content, obtain the parameter value and the configuration command after parameter replacement of the configuration modification content, and then query the configuration parameter value range table to verify whether the parameter is within the value range. If the parameter is not within the value range, it is considered that there is an abnormality in this parameter, and this configuration is marked; otherwise, this configuration parameter is considered normal; Extract keywords from the configuration commands of the obtained configuration modification content, query the list of frequently changed commands, and verify whether the command is in the list. If the command is not in the list, it is considered that the command is abnormal and the command is marked; otherwise, the command is considered normal.

5. The verification method for BAS device configuration modification based on the matching algorithm according to claim 1, wherein, statistically analyze the verification results in segments and output the final verification results, including: According to the segment identifier of the BAS configuration, statistically analyze the configuration modification content in segments, count the number of parameter anomalies and command anomalies in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification results including the statistical information.

6. A verification device for BAS device configuration modification based on the matching algorithm, wherein, the device includes: A data acquisition module, used to acquire the configuration file of the modified BAS device, determine the area information to which the BAS device belongs, and acquire the configuration files of all BAS devices in the current network environment of the area; A difference acquisition module, used to match the configuration file of the modified BAS device with the current network configuration file of the BAS device, and obtain the different part between the two, which is the configuration modification content; A parameter rule acquisition module, used to perform parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain a configuration parameter value range table; A command rule acquisition module, used to traverse the configuration files of all BAS devices in the current network environment, obtain the horizontal difference through the optimal matching and horizontal difference acquisition sub-module; obtain the list of frequently changed commands by passing the horizontal difference part of the configuration through the keyword extraction and word frequency statistics sub-module; A configuration verification module, used to verify the configuration parameters and configuration commands of the obtained configuration modification content, and mark the configurations that do not meet the requirements; A result output module, used to statistically analyze the verification results in segments and output the final verification results.

7. The verification device for BAS device configuration modification based on the matching algorithm according to claim 6, wherein, The parameter rule acquisition module is specifically used for: Construct a parameter matching method, and sequentially perform parameter matching on the configuration content of the configuration files of all BAS devices in the current network environment to obtain all configuration commands and their corresponding parameter value ranges; Pairwise store the configuration commands after parameter replacement and the matched parameter value ranges to obtain a configuration parameter value range table.

8. The verification device for BAS device configuration modification based on the matching algorithm according to claim 6, wherein, The optimal matching and horizontal difference acquisition sub-module is specifically used for: Use the optimal matching algorithm to obtain the optimal matching file of the configuration file of each BAS device; Summarize the different parts between the configuration file of each BAS device and the optimal matching file to obtain the horizontal difference.

9. The verification device for BAS device configuration modification based on the matching algorithm according to claim 6, wherein, The keyword extraction and word frequency statistics sub-module is specifically used for: Extract keywords from the configuration command information of each line in the horizontally different part of the configuration according to the line identifier, and convert the original command line into a keyword list; Traverse the keyword list, record the frequency of each command keyword, and obtain the command keyword frequency information table; Divide the frequency of each command keyword by the total number of command keywords to obtain the command keyword frequency information table; Set the minimum frequency threshold, and obtain the list of command keywords with a frequency greater than the threshold, which is the high-frequency change command list.

10. The verification device for modifying the BAS device configuration based on the matching algorithm according to claim 6, wherein, the configuration verification module is specifically used for: Perform configuration parameter matching on the obtained configuration modification content, obtain the parameter value of the configuration modification content and the configuration command after parameter replacement, then query the configuration parameter value range table to verify whether the parameter is within the value range. If the parameter is not within the value range, it is considered that there is an abnormality in this parameter, and this configuration is marked; Otherwise, it is considered that this configuration parameter is normal; Extract keywords from the configuration command of the obtained configuration modification content, query the high-frequency change command list, and verify whether the command is in the list. If the command is not in the list, it is considered that there is an abnormality in this command, and this command is marked; Otherwise, it is considered that this command is normal.

11. The verification device for modifying the BAS device configuration based on the matching algorithm according to claim 6, wherein, the result output module is specifically used for: According to the segmentation identifier of the BAS configuration, perform segmented statistics on the configuration modification content, count the number of parameter abnormalities and command abnormalities in each segment, add the statistical information to the beginning of each segment of the configuration modification content, and output the verification result including the statistical information.

12. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the computer program, the method described in any one of claims 1-5 is implemented.

13. A computer-readable storage medium, wherein, the computer-readable storage medium stores a computer program for executing the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Product configuration data monitoring method and device, apparatus and storage medium

    CN110245049A

  • Intelligent number calculation method and device, equipment terminal and computer readable storage medium

    CN110688149A