CN111901160A - Method and device for combing network equipment garbage strategy configuration - Google Patents

Method and device for combing network equipment garbage strategy configuration Download PDF

Info

Publication number
CN111901160A
CN111901160A CN202010678923.8A CN202010678923A CN111901160A CN 111901160 A CN111901160 A CN 111901160A CN 202010678923 A CN202010678923 A CN 202010678923A CN 111901160 A CN111901160 A CN 111901160A
Authority
CN
China
Prior art keywords
keywords
configuration
policy
matching
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010678923.8A
Other languages
Chinese (zh)
Other versions
CN111901160B (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.)
Zhongying Youchuang Information Technology Co Ltd
Original Assignee
Zhongying Youchuang 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 Zhongying Youchuang Information Technology Co Ltd filed Critical Zhongying Youchuang Information Technology Co Ltd
Priority to CN202010678923.8A priority Critical patent/CN111901160B/en
Publication of CN111901160A publication Critical patent/CN111901160A/en
Application granted granted Critical
Publication of CN111901160B publication Critical patent/CN111901160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0883Semiautomatic configuration, e.g. proposals from system
    • 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/0889Techniques to speed-up the configuration process
    • 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/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for combing network equipment garbage strategy configuration, wherein the method comprises the following steps: collecting configuration data of network equipment and storing the configuration data as a text file; manually giving a standard configuration template of an acquisition strategy, and customizing keywords in each row of data of each standard configuration template; reading the configured text files line by line, and processing the keywords identified in the previous step; matching the content in the configured text file line by using the keywords and matching with conditional statements, and storing the configuration meeting the conditions into a list 1; and matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complement set, and verifying whether the definition is called or not, thereby determining which defined strategies are garbage strategies. The method and the device can quickly and accurately finish the carding of the defined but not called strategy, improve the working efficiency and reduce the labor cost and the error rate.

Description

Method and device for combing network equipment garbage strategy configuration
Technical Field
The invention relates to the field of network operation and maintenance or cutover, in particular to a method and a device for combing network equipment garbage strategy configuration.
Background
Due to the requirements of network prevention and control and the like, a large number of various strategies need to be configured in the network, various information such as configuration names and sequences are inconsistent and the repeatability problem is obvious due to the strategies configured by different people in different periods, and the conventional method is characterized in that the comparison is carried out manually one by one, so that the searching efficiency is very low. In particular, some strategies are not deleted necessarily after network cutover, so that a large amount of garbage strategy configuration is reserved, and unnecessary troubles are added for subsequent cutover and maintenance.
Example policy templates 1:
acl number 2001
rule 0 permit source X.X.X.X 0.0.0.255
rule 5 permit source X.X.X.X 0.0.0.255
rule 10 permit source X.X.X.X 0.0.0.255
rule 15 permit source X.X.X.X 0.0.0.255
#
traffic classifier XXX-IP-ZHONGYAO operator or
if-match ACL 2001// can also be ip-prefix (similar to ACL, also defining matching address)
#
traffic behavior XXX-IP-ZHONGYAO
remark dscp 53
#
traffic policy ttred
classifier ttred behavior ttred
#
interface Eth-Trunk1
ip address X.X.X.X 255.255.255.252
isis enable 1
isis circuit-level level-2
traffic-policy bingdu inbound
Example policy templates 2:
interface referencing
interface Vlan4
ip address 10.2.4.1 255.255.255.0
ip helper-address 10.2.3.5
ip policy route-map×××
| A Access control policy
access-list 101permit ip 10.2.4.00.0.0.255 192.168.10.00.0.0.255
access-list 102permit ip 10.2.4.00.0.0.255any
| A Routing graph
route-map×××permit 10
match ip address 101
set ip default next-hop 10.2.3.254
Disclosure of Invention
In order to solve the problems of increased maintenance or cutting difficulty and increased cutting risk caused by a large number of non-carding strategies in the network operation and maintenance or cutting working process, the invention provides a method and a device for carding network equipment garbage strategy configuration.
In order to achieve the purpose, the invention adopts the following technical scheme:
in an embodiment of the present invention, a method for combing network device spam policy configuration is provided, where the method includes:
collecting configuration data of network equipment and storing the configuration data as a text file;
manually giving a standard configuration template of an acquisition strategy, and customizing keywords in each row of data of each standard configuration template;
reading the configured text files line by line, and processing the keywords identified in the previous step;
matching the content in the configured text file line by using the keywords and matching with conditional statements, and storing the configuration meeting the conditions into a list 1;
and matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complement set, and verifying whether the definition is called or not, thereby determining which defined strategies are garbage strategies.
Further, the standard configuration template of the policy is divided into four parts, the first part is to define the matching condition, the second part is to define the policy body, the third part is to call the defined matching condition in the policy body, and the fourth part is to finally call the defined policy.
Further, processing the keywords identified in the previous step includes:
the key words are directly used for three; two, automatically adding a third keyword as a condition for satisfying NO; to be one, a YES condition is copied and a third keyword is automatically added as a condition to satisfy NO.
Further, the configuration stored in the list1 includes matching conditions, policy body names, conditions for policy invocation, and other configurations where policies are invoked.
Further, matching the keywords of the definition part with the keywords of the calling part as required to obtain a complement, verifying whether the definition is called or not, and determining which defined policies are spam policies, including:
respectively grabbing corresponding parts of the matched line data in the text file configured in the previous step by using the keywords defining the strategy and the configuration keywords calling the strategy, and then solving a complementary set so as to determine which defined strategies are not used;
outputting a complementary set according to the result of the previous step and the strategy name;
respectively grabbing corresponding parts of the matched line data in the text file configured in the previous step by using the keywords defining the conditions and the configuration keywords calling the conditions, and then solving a complementary set so as to determine which defined conditions are not called;
outputting a complementary set according to the result of the previous step and the strategy name;
and combining the obtained complementary sets, and finally combing out the complementary sets to obtain the garbage information which is not called.
Further, the self-defined keyword in each row of data of each configuration template is a keyword for uniquely identifying the row of data.
Further, the text file is a txt format file.
In an embodiment of the present invention, an apparatus for combing network device spam policy configuration is further provided, where the apparatus includes:
the data acquisition module is used for acquiring the configuration data of the network equipment and storing the configuration data as S1. txt;
the keyword self-defining module is used for manually giving a standard configuration template of an acquisition strategy and self-defining keywords in each row of data of each standard configuration template;
the keyword processing module is used for reading the configured S1.txt line by line and processing the keywords identified in the previous step;
a keyword matching module, configured to match the content in the configured s1.txt line by line with a conditional statement using the keyword, and store the configuration meeting the condition into a list 1;
and the strategy verification module is used for matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complementary set, verifying whether the definition is called or not, and determining which defined strategies are garbage strategies.
In an embodiment of the present invention, a computer device is further provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method for configuring the spam policy of the card network device is implemented.
In an embodiment of the present invention, a computer-readable storage medium is further proposed, in which a computer program for executing the method for combing network device spam policy configuration is stored.
Has the advantages that:
the method and the device for combing the garbage strategy configuration of the network equipment can rapidly determine which defined strategy data in the configuration are not used according to the defined strategy template and the collected network configuration information, and provide a basis for rapidly clearing the garbage configuration.
Drawings
FIG. 1 is a flow chart of a method for combing network device spam policy configuration according to an embodiment of the present invention;
FIG. 2is a schematic diagram of an apparatus for combing network device spam policy configuration according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments, which should be understood to be presented only to enable those skilled in the art to better understand and implement the present invention, and not to limit the scope of the present 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, on the basis of collecting network equipment configuration data (stored in S1.txt), an engineer collecting the data gives a standard configuration template of a strategy to be collected according to the inherent configuration steps of the strategy, and keys (which can uniquely identify the row data, for example, keys (such as route-policy, node and non |) of strategy main bodies can uniquely identify the row similar to route-policy rp _ VNH2ISIS permit node 10, configuration keys (route-policy, route-policy and non-node) for calling the strategy, keys (if-match, ip-prefix and non-node) for matching strategy conditions, and condition keys (ip-prefix and non-node) are defined, and the powerful processing capability of a computer is utilized, combining with an effective logic algorithm in a program, automatically searching out the configuration meeting the keywords, wherein the configuration comprises a matching condition, a policy subject name, a policy calling condition and a condition that the policy is called by other configurations, then matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complement, and verifying whether the definition is called so as to determine which defined policies are garbage policies.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Fig. 1 is a flowchart illustrating a method for combing the configuration of spam policies of a network device according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101, collecting network equipment configuration data and storing the data as S1. txt;
step S102, manually giving a standard configuration template of an acquisition strategy, wherein the standard configuration template of the strategy is basically and fixedly divided into four parts, the first part is to define a matching condition, the second part is to define a strategy main body, the third part is to call the defined matching condition in the strategy main body, and the fourth part is to finally call the defined strategy, and to self-define a keyword uniquely identifying the row in each row of data;
step S103, reading the configured S1.txt line by line, and processing the keywords identified in the previous step, wherein three keywords are directly used; two, a third keyword is automatically added as a condition for satisfying NO, such as that { if-match ip-prefix } is changed to { if-match ip-prefix _ }; for one, copy one and satisfy YES condition, automatically add a third keyword as the condition satisfying NO, for example, { import-route } changes to { import-route immediate-route NO _ };
step S104, matching the keywords with conditional statements, matching the contents in the configured S1.txt line by line, storing the configuration meeting the conditions into a list1, wherein the information comprises matching conditions, policy body names, conditions for policy calling and the calling condition of the policy by other configurations;
step S105-step S109, matching the keywords of the definition part and the keywords of the calling part as required to obtain a complement, and verifying whether the definition is called or not, thereby determining which defined policies are spam policies.
Specifically, step S105 determines which defined policies are not used, and the method: searching the called configuration by using the defined key words, for example, using the key word { route-policy node no _ } which defines the policy and the configuration key word { peer route-policy node } which calls the policy, respectively capturing the corresponding parts of the row data matched in the configuration file in the step S104, and then solving the complement;
step 106, outputting a complement set according to the result of step 105 and the policy name (the field after route-policy, such as MAN _2_ in);
step 107, the method determines, as in step S105, which defined conditions are not called, the method: respectively grabbing corresponding parts of the matched line data in the configuration file in the step S104 by using a keyword { ipip-prefix _ } defining a condition and a configuration keyword { if-match ip-prefix _ } calling the condition, and then solving a complementary set;
step 108, outputting a complementary set according to the result of step 107 and the policy name (the field after ip-prefix, such as pl _ Private _ Default);
and step 109, combining the obtained complementary sets, and finally combing out the complementary sets to obtain the garbage information which is not called.
It should be noted that although the operations of the method of the present invention have been described in the above embodiments and the accompanying drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed, to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
For a clearer explanation of the method for configuring the spam policy of the combing network device, a specific embodiment is described below, but it should be noted that the embodiment is only for better explaining the present invention and should not be construed as an undue limitation to the present invention.
Taking a metropolitan area network as an example, the network device spam policy configuration needs to be combed, and the specific process is as follows:
step S101: the configuration storage of the acquisition equipment is S1.txt, and the information stored in the acquired equipment configuration file is assumed as follows:
sysname XXXX.163
#
acl number 3999
rule 1permit icmp source Y.Y.Y.Y 0 destination X.X.X.X 0
rule 2permit icmp source Y.Y.Y.145 0destination X.X.X.220
rule 50deny 255
#
traffic classifier MAN_IN operator or
if-match acl 3999
#
traffic behavior MAN_IN
#
traffic policy MAN_IN
share-mode
classifier MAN_INbehavior MAN_IN precedence 1
#
interface Ip-Trunk1
ipv6 enable
ipv6 address XXX:E:XXX:101::2/127
ip netstream inbound
traffic-policy MAN_IN inbound
#
route-policy MAN_1_in deny node 10
if-match ip-prefix pl_Illegal
#
route-policy MAN_1_in deny node 20
if-match as-path-filter 100
#
route-policy MAN_2_in permit node 290
if-match ip-prefix pl_PermitMask_Length
ip ip-prefix pl_Illegal index 5permit 10.0.0.0 8greater-equal 8less-equal 32
ip ip-prefix pl_Illegal index 10permit 127.0.0.0 8greater-equal8less-equal 32
ip ip-prefix pl_PermitMask_Length index 10permit 0.0.0.08 greater-equal 8less-equal 24
ip ip-prefix pl_Private_Default index 5permit 0.0.0.00
ip ip-prefix pl_Private_Default index 10permit 10.0.0.08greater-equal8less-equal 32
...
#
ipv4-family unicast
undo synchronization
peer 21.144.111.219 enable
peer 21.144.111.219 route-policy MAN_1_in import
....
step S102: manually giving a policy configuration template, wherein the policy configuration is basically fixedly divided into four parts, the first part is to define a matching condition, the second part is to define a policy body, the third part is to call the defined matching condition, the fourth part is to call the defined policy finally, and the keyword which uniquely identifies the row is self-defined in each row of data, taking route-policy as an example, the format of the template is as follows:
ip ip-prefix pl_VNH2ISIS index 5permit 118.84.111.128 32{ip ip-prefix}
route-policy rp_VNH2ISIS permit node 10{route-policy node}
if-match ip-prefix pl_VNH2ISIS{if-match ip-prefix}
apply tag 4134
import-route static route-policy rp_VNH2ISIS{route-policy}
the content in the { } is keywords of each row, spaces are needed among different keywords, meanwhile, the number of the keywords cannot be more than three tentatively, the first two keywords are keywords meeting YES (requirement matching), the last keyword is a keyword meeting NO (requirement mismatching), the keywords meeting YES can be repeated, and the keywords meeting NO can be absent.
Step S103: reading the configured S1.txt text file line by line, processing the keywords identified in step S102, where three keywords are directly used, and two keywords are used, and automatically adding a third keyword as a condition meeting NO, for example, { if-match ip-prefix } is changed to { if-match ip-prefix NO }, and one keyword is copied as a condition meeting YES, and automatically adding a third keyword as a condition meeting NO, for example, { import-route } is changed to { import-route import-route NO }, and finally the text in step S102 is changed to:
ip ip-prefixpl_VNH2ISIS index 5permit 118.84.111.128 32{ip ip-prefixno_}
route-policy rp_VNH2ISIS permit node 10{route-policy node no_}
if-match ip-prefix pl_VNH2ISIS{if-match ip-prefix no_}
peer 21.145.6.219 route-policy MAN_1_in import{peer route-policy no_}
step S104: matching the content in the S1.txt file line by using the keywords and matching with conditional statements, and storing data meeting the conditions into a list1, wherein the information is as follows:
route-policy MAN_1_in deny node 10
if-match ip-prefix pl_Illegal
route-policy MAN_1_in deny node 20
if-match as-path-filter 100
route-policy MAN_2_in permit node 290
if-match ip-prefix pl_PermitMask_Length
ip ip-prefix pl_Illegal index 5permit 10.0.0.0 8greater-equal 8less-equal 32
ip ip-prefix pl_Illegal index 10permit 127.0.0.0 8greater-equal8less-equal 32
ip ip-prefix pl_PermitMask_Length index 10permit 0.0.0.08greater-equal 8less-equal 24
ip ip-prefix pl_Private_Default index 5permit 0.0.0.00
ip ip-prefix pl_Private_Default index 10permit 10.0.0.08greater-equal8less-equal 32
peer 21.145.6.219route-policy MAN_1_in import
step S105: determining which of the defined policies are not used, the method: using the defined key words to search the called configuration, for example, using the key word { route-policy node no _ } defining the policy and the configuration key word { peer route-policy node } calling the policy, respectively capturing the corresponding parts of the row data matched in the configuration file in step S104:
defining a strategy:
route-policy MAN_1_in deny node 10
route-policy MAN_1_in deny node 20
route-policy MAN_2_in permit node 290
calling a strategy:
peer 21.145.6.219 route-policy MAN_1_in import
step S106: the complement is output according to the result of step S105 and the policy name (the field following route-policy, e.g., MAN _2_ in):
[route-policy MAN_2_in permit node 290]
step S107: the method, like step S105, determines which defined conditions are not invoked: the method comprises the following steps: respectively grabbing corresponding parts of the matched line data in the configuration file in the step S104 by using a keyword { ip-prefix _ } defining a condition and a configuration keyword { if-match ip-prefix _ } calling the condition:
defining conditions:
ip ip-prefix pl_Illegal index 5permit 10.0.0.0 8greater-equal 8less-equal 32
ip ip-prefix pl_Illegal index 10permit 127.0.0.0 8greater-equal8less-equal 32
ip ip-prefix pl_PermitMask_Length index 10permit 0.0.0.0 8greater-equal 8less-equal 24
ip ip-prefix pl_Private_Default index 5permit 0.0.0.00
ip ip-prefix pl_Private_Default index 10permit 10.0.0.0 8greater-equal 8less-equal 32
calling conditions:
if-match ip-prefix pl_Illegal
if-match ip-prefix pl_PermitMask_Length
step S108: the complement is output according to the result of step S107 and the policy name (the field following ip-prefix, e.g., pl _ Private _ Default):
[‘ip ip-prefix pl_Private_Default index 5permit 0.0.0.00’,
‘ip ip-prefix pl_Private_Default index 10permit 10.0.0.08greater-equal 8less-equal 32’]
the same method is used for other definitions and called relations, and the description is omitted.
Step S109, the obtained complement sets are merged, and the garbage information which is not called and finally combed out is as follows:
[route-policy MAN_2_in permit node 290]
[‘ip ip-prefix pl_Private_Default index 5permit 0.0.0.00’,
‘ip ip-prefix pl_Private_Default index 10permit 10.0.0.08greater-equal 8less-equal 32’]
based on the same inventive concept, the invention also provides a device for combing the garbage strategy configuration of the network equipment. The implementation of the device can be referred to the implementation of the method, and repeated details are not repeated. The term "module," as used below, may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 2is a schematic structural diagram of an apparatus for combing network device spam policy configuration according to an embodiment of the present invention. As shown in fig. 2, the apparatus includes:
the data acquisition module 201 is used for acquiring the configuration data of the network equipment and storing the configuration data as S1. txt;
the keyword self-defining module 202 is used for manually providing a standard configuration template for acquiring the strategy, the standard configuration template for the strategy is basically fixedly divided into four parts, the first part is used for defining a matching condition, the second part is used for defining a strategy main body, the third part is used for calling the defined matching condition in the strategy main body, and the fourth part is used for finally calling the defined strategy and self-defining the keywords which uniquely identify the row in each row of data;
the keyword processing module 203 reads the configured S1.txt line by line, processes the keywords identified in the previous step, and directly uses three keywords; two, automatically adding a third keyword as a condition for satisfying NO; for one, copying a condition meeting YES, and automatically adding a third keyword as a condition meeting NO;
the keyword matching module 204 is configured to match the content in the configured s1.txt line by using the keywords and matching with the conditional statements, store the configuration meeting the conditions into the list1, and obtain information including matching conditions, policy body names, conditions for policy calling and other configuration calling situations of policies;
the policy verification module 205 matches the keywords of the definition part with the keywords of the calling part as needed to obtain a complement, verifies whether the definition is called or not, and determines which defined policies are spam policies.
Specifically, it is determined which defined policies are not used, the method: searching the called configuration and the configuration key words calling the strategy by using the defined key words, respectively capturing corresponding parts of the matched row data in the configuration file in the previous step, and then solving a complementary set;
outputting a complementary set according to the result of the previous step and the strategy name;
method as above, determine which defined conditions are not called, method: respectively capturing corresponding parts of the matched line data in the configuration file in the previous step by using the keywords defining the condition and the configuration keywords calling the condition, and then solving a complementary set;
outputting a complementary set according to the result of the last step and the strategy name;
and combining the obtained complementary sets, and finally combing out the complementary sets to obtain the garbage information which is not called.
It should be noted that although several modules of the apparatus for grooming a network device spam policy configuration are mentioned in the above detailed description, such partitioning is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module according to embodiments of the invention. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
Based on the aforementioned inventive concept, as shown in fig. 3, the present invention further provides a computer device 300, which includes a memory 310, a processor 320 and a computer program 330 stored in the memory 310 and operable on the processor 320, wherein the processor 320 executes the computer program 330 to implement the aforementioned method for configuring the spam policy of the card network device.
Based on the above inventive concept, the present invention further provides a computer readable storage medium storing a computer program for executing the method for configuring the spam policy of a card network device.
The method and the device for combing the garbage strategy configuration of the network equipment can quickly and accurately finish combing the defined but not called strategy, improve the working efficiency and reduce the labor cost and the error rate.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
The limitation of the protection scope of the present invention is understood by those skilled in the art, and various modifications or changes which can be made by those skilled in the art without inventive efforts based on the technical solution of the present invention are still within the protection scope of the present invention.

Claims (10)

1. A method for combing network device spam policy configuration, the method comprising:
collecting configuration data of network equipment and storing the configuration data as a text file;
manually giving a standard configuration template of an acquisition strategy, and customizing keywords in each row of data of each standard configuration template;
reading the configured text files line by line, and processing the keywords identified in the previous step;
matching the content in the configured text file line by using the keywords and matching with conditional statements, and storing the configuration meeting the conditions into a list 1;
and matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complement set, and verifying whether the definition is called or not, thereby determining which defined strategies are garbage strategies.
2. A method for grooming network device spam policy configuration as claimed in claim 1 wherein the standard configuration template of the policy is divided into four parts, the first part is to define matching conditions, the second part is to define policy body, the third part is to invoke the defined matching conditions in the policy body, and the fourth part is to finally invoke the defined policy.
3. A method of grooming network device spam policy configuration in accordance with claim 1 wherein processing the keywords identified in the previous step comprises:
the key words are directly used for three; two, automatically adding a third keyword as a condition for satisfying NO; to be one, a YES condition is copied and a third keyword is automatically added as a condition to satisfy NO.
4. A method for combing network device spam policy configuration according to claim 1, wherein the configuration stored in the list1 contains matching conditions, policy subject names, conditions for policy invocation, and other configurations where policies are invoked.
5. A method of spam policy configuration according to claim 1 wherein matching keywords of the definition part with keywords of the invocation part as required to find a complement and verifying whether a definition is invoked or not to determine which of the defined policies are spam policies comprises:
respectively grabbing corresponding parts of the matched line data in the text file configured in the previous step by using the keywords defining the strategy and the configuration keywords calling the strategy, and then solving a complementary set so as to determine which defined strategies are not used;
outputting a complementary set according to the result of the previous step and the strategy name;
respectively grabbing corresponding parts of the matched line data in the text file configured in the previous step by using the keywords defining the conditions and the configuration keywords calling the conditions, and then solving a complementary set so as to determine which defined conditions are not called;
outputting a complementary set according to the result of the previous step and the strategy name;
and combining the obtained complementary sets, and finally combing out the complementary sets to obtain the garbage information which is not called.
6. A method of grooming a network device spam policy configuration as in claim 1 wherein the custom keywords in each row of data of each configuration template are keywords that uniquely identify that row of data.
7. A method of grooming network device spam policy configuration in accordance with claim 1 wherein said text file is a txt format file.
8. An apparatus for grooming network device spam policy configuration, the apparatus comprising:
the data acquisition module is used for acquiring the configuration data of the network equipment and storing the configuration data as S1. txt;
the keyword self-defining module is used for manually giving a standard configuration template of an acquisition strategy and self-defining keywords in each row of data of each standard configuration template;
the keyword processing module is used for reading the configured S1.txt line by line and processing the keywords identified in the previous step;
a keyword matching module, configured to match the content in the configured s1.txt line by line with a conditional statement using the keyword, and store the configuration meeting the condition into a list 1;
and the strategy verification module is used for matching the keywords of the definition part with the keywords of the calling part according to needs to obtain a complementary set, verifying whether the definition is called or not, and determining which defined strategies are garbage strategies.
9. 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-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1-7.
CN202010678923.8A 2020-07-15 2020-07-15 Method and device for combing network equipment garbage strategy configuration Active CN111901160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010678923.8A CN111901160B (en) 2020-07-15 2020-07-15 Method and device for combing network equipment garbage strategy configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010678923.8A CN111901160B (en) 2020-07-15 2020-07-15 Method and device for combing network equipment garbage strategy configuration

Publications (2)

Publication Number Publication Date
CN111901160A true CN111901160A (en) 2020-11-06
CN111901160B CN111901160B (en) 2022-09-16

Family

ID=73191334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010678923.8A Active CN111901160B (en) 2020-07-15 2020-07-15 Method and device for combing network equipment garbage strategy configuration

Country Status (1)

Country Link
CN (1) CN111901160B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006036128A1 (en) * 2004-09-29 2006-04-06 Sarkar Pte Ltd System for semantically disambiguating text information
CN102567481A (en) * 2011-12-19 2012-07-11 华为技术有限公司 Data query filter method and device
CN103813279A (en) * 2012-11-14 2014-05-21 中国移动通信集团设计院有限公司 Junk short message detecting method and device
WO2014076559A1 (en) * 2012-11-19 2014-05-22 Ismail Abdulnasir D Keyword-based networking method
CN103902572A (en) * 2012-12-27 2014-07-02 三星电子(中国)研发中心 Mobile terminal and data management method of mobile terminal
CN106528680A (en) * 2016-10-25 2017-03-22 智者四海(北京)技术有限公司 Identification method and device for junk information
CN108540298A (en) * 2017-03-01 2018-09-14 中兴通讯股份有限公司 A kind of method and device of automatic garbage disintegrating business
CN109933571A (en) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 Database design documentation generation method, device and computer readable storage medium
CN110677513A (en) * 2019-10-09 2020-01-10 中盈优创资讯科技有限公司 Method and system for collecting binding domain and domain lower address pool of metropolitan area network private line user
CN110690992A (en) * 2019-09-16 2020-01-14 中盈优创资讯科技有限公司 Network cutover abnormity identification method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006036128A1 (en) * 2004-09-29 2006-04-06 Sarkar Pte Ltd System for semantically disambiguating text information
CN102567481A (en) * 2011-12-19 2012-07-11 华为技术有限公司 Data query filter method and device
CN103813279A (en) * 2012-11-14 2014-05-21 中国移动通信集团设计院有限公司 Junk short message detecting method and device
WO2014076559A1 (en) * 2012-11-19 2014-05-22 Ismail Abdulnasir D Keyword-based networking method
CN103902572A (en) * 2012-12-27 2014-07-02 三星电子(中国)研发中心 Mobile terminal and data management method of mobile terminal
CN106528680A (en) * 2016-10-25 2017-03-22 智者四海(北京)技术有限公司 Identification method and device for junk information
CN108540298A (en) * 2017-03-01 2018-09-14 中兴通讯股份有限公司 A kind of method and device of automatic garbage disintegrating business
CN109933571A (en) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 Database design documentation generation method, device and computer readable storage medium
CN110690992A (en) * 2019-09-16 2020-01-14 中盈优创资讯科技有限公司 Network cutover abnormity identification method and device
CN110677513A (en) * 2019-10-09 2020-01-10 中盈优创资讯科技有限公司 Method and system for collecting binding domain and domain lower address pool of metropolitan area network private line user

Also Published As

Publication number Publication date
CN111901160B (en) 2022-09-16

Similar Documents

Publication Publication Date Title
US10083200B2 (en) Batch incremental update
CN112367211B (en) Method, device and storage medium for generating configuration template by device command line
US8285874B2 (en) Routing systems and methods for implementing routing policy with reduced configuration and new configuration capabilities
CN113794636A (en) Dynamic routing arrangement method and system based on Spring Cloud Gateway
CN111614777B (en) Cross-organization account mobile phone number sharing method based on Ether house block chain
CN114025000B (en) Method, device, equipment and storage medium for establishing network access relationship
CN111901160B (en) Method and device for combing network equipment garbage strategy configuration
CN112866139A (en) Method, equipment and storage medium for realizing multi-rule flow classification
US7181567B2 (en) Hitless restart of access control module
CN112235197B (en) Parallel route searching method and system
JP2005284608A (en) System and method for data search
CN114816170A (en) Rule scheme generation method, device, medium and electronic equipment
CN108551439B (en) Method and device for improving policy template application
US7519731B1 (en) Comparing configuration information for a data forwarding device
US8972935B2 (en) Application server and method for managing a service
CN110311868B (en) Service processing method, device, member equipment and machine-readable storage medium
JP3708146B2 (en) File system and attribute structure of information managed by the file system
CN112883010A (en) Redis-based IP library management method and device, computer equipment and storage medium
US7328278B2 (en) Method for sharing routing information and network element using the same
US20040193718A1 (en) Dynamic searching method of provisioning instance identifiers
Liu et al. Removing redundancy from packet classifiers
CN115858551B (en) Memory management method, device, equipment and storage medium based on LDAP
CN114301680B (en) Security policy matching method and device and storage medium
JP3591426B2 (en) Method and apparatus for searching for associative information using a plurality of addresses including a prefix
JP2005165737A (en) Data providing system and data providing method

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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 200000 room 702-2, No. 4811 Cao'an Road, Jiading District, Shanghai

Patentee after: CHINA UNITECHS

Address before: Room 1004-4, 10 / F, 1112 Hanggui Road, Anting Town, Jiading District, Shanghai

Patentee before: CHINA UNITECHS