CN108599985A - Field rule generation system and method - Google Patents

Field rule generation system and method Download PDF

Info

Publication number
CN108599985A
CN108599985A CN201810215045.9A CN201810215045A CN108599985A CN 108599985 A CN108599985 A CN 108599985A CN 201810215045 A CN201810215045 A CN 201810215045A CN 108599985 A CN108599985 A CN 108599985A
Authority
CN
China
Prior art keywords
field
rule
network element
configuration data
type
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
CN201810215045.9A
Other languages
Chinese (zh)
Other versions
CN108599985B (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201810215045.9A priority Critical patent/CN108599985B/en
Publication of CN108599985A publication Critical patent/CN108599985A/en
Application granted granted Critical
Publication of CN108599985B publication Critical patent/CN108599985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • 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

Landscapes

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

Abstract

The invention discloses a kind of field rule generation system and methods, are related to telecommunication transmission net management domain.This approach includes the following steps:Universal model generation module goes out general network element configuration from the configuration data analysis and arrangement of plurality of devices file, generates field mapping table, preserves the field correspondence of general network element configuration and the configuration data of device file;Default rule generation module is the field rule that general network first wife installs acquiescence;Equipment Regulation generation module is regular with the field of network element or the relevant configuration data of single-deck type from device file extraction;Compatible rule merging module merges the field rule of the field rule of acquiescence and equipment according to the network element and single-deck type where it for some type of network element configuration, exports general field rule.The present invention generates field rule using unified method, and the equipment otherness of shield configuration data can guarantee the stability, maintainability and scalability of system.

Description

Field rule generation system and method
Technical field
The present invention relates to telecommunication transmission net management domain, it is specifically related to a kind of field rule generation system and side Method.
Background technology
In the management of telecommunication transmission net, need to manage the configuration data on various types of network element and single-deck.Each The network element of type or the device file of single-deck describe the configuration data on network element or single-deck.In management process, needed on webmaster Network element configuration is taken out, the configuration data on managed network element and single-deck is carried out.Network element configuration and configuration data all include multiple words Section, the field of network element configuration can find corresponding field in some configuration data, and need to know during management The rule (such as type, value range) of field.Same network element configuration, the network element or single-deck type at place are different, field pair The configuration data answered is also different, and field rule is also different.Same network element configuration, different fields are possible to correspond to not With the field of configuration data.
Since the field rule of network element configuration is related to network element or the specific configuration data of single-deck, existing management method It is the network element configuration different with the type definition of single-deck according to different network elements, is corresponded with specific configuration data.It is this Method haves the shortcomings that apparent:First, the identical configuration data of function may merely because certain several field difference, just taken out As for different network element configurations, leading to network element configuration redundancy and not general;Secondly, ununified field rule generation side Method when increasing new single-deck, network element or configuration data, needs to modify to the existing system for obtaining rule, reduce The stability and maintainability of system.
Invention content
The purpose of the invention is to overcome the shortcomings of above-mentioned background technology, a kind of field rule generation system is provided And method, field rule is generated using unified method, the equipment otherness of shield configuration data can ensure the stabilization of system Property, maintainability and scalability.
The present invention provides a kind of field rule generation system, which includes universal model generation module, acquiescence rule Then generation module, equipment Regulation generation module and compatible rule merging module, wherein:
Universal model generation module is used for:Analysis and arrangement goes out general network element and matches from the configuration data of plurality of devices file It sets, generates field mapping table, preserve the field correspondence of general network element configuration and the configuration data of device file;
Default rule generation module is used for:The field rule of acquiescence is installed for general network first wife;
Equipment Regulation generation module is used for:Extraction and network element or the relevant configuration data of single-deck type from device file Field rule;
Compatible rule merging module is used for:It will be write from memory according to the network element and single-deck type where it for some type of network element configuration The field rule of the field rule and equipment recognized merges, and exports general field rule.
Based on the above technical solution, the input of the universal model generation module is multiple equipment file, output It is that general network element configuration and field mapping table, workflow are as follows:
S11, setting and the general relevant configuration data type of network element configuration set, go to step S12;
S12, judge whether to have traversed device file, be, terminate, otherwise go to step S13;
S13, judge whether to have traversed configuration data in device file, be then return to step S12, otherwise go to step S14;
S14, it checks that the type of current configuration data whether there is in the set being arranged in S11, exists, go to step S15, otherwise return to step S13;
S15, judge whether to have traversed the field of current configuration data, be then return to step S13, otherwise go to step S16;
If S16, present field exist in general network element configuration, step S18 is gone to;Otherwise step S17 is gone to;
S17, present field is added in general network element configuration, goes to step S18;
S18, it is added an entry in field mapping table, including respective field in general network element configuration, currently matches The type and the type of single-deck and the field of current configuration data of network element where setting data, return to step S15.
Based on the above technical solution, the input of the default rule generation module is general network element configuration, defeated It is the field rule given tacit consent to go out<General network element configuration field, default fields rule>, workflow is as follows:
S21, the default rule for defining simple field, go to step S22;
S22, the sub-process that complex fields obtain default rule is defined, goes to step S23;
S23, judge whether to have traversed the field of current general network element configuration, be to terminate, otherwise go to step S24;
S24, judge whether present field is simple field, be to go to step S25, otherwise go to step S26;
S25, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S23;
S26, present field are complicated types, and complex fields is called to obtain the sub-process of default rule, return to step S23.
Based on the above technical solution, the complex fields defined in step S22 obtain the subflow of default rule Cheng Wei:
S221, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S222;
S222, judge whether present field is simple field, be to go to step S223, otherwise go to step S224;
S223, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step Rapid S221;
S224, present field are complex fields, and the complex fields that recursive call step S22 is defined obtain the son of default rule Flow, return to step S221.
Based on the above technical solution, the equipment Regulation generation module is used for:Extraction and net from device file The field of member or the relevant configuration data of single-deck type rule:<NE type, single-deck type, configuration data field, device field (DFLD) Rule>, specific workflow is as follows:
S31, judge whether to have traversed device file, be, terminate, otherwise go to step S32;
S32, judge whether to have traversed configuration data in device file, be then return to step S31, otherwise go to step S33;
S33, judge whether to have traversed the field of current configuration data, be then return to step S32, otherwise go to step S34;
S34, judge whether the field of current configuration data is simple field, is to go to step S35, otherwise goes to step S36;
The rule of current configuration data field is added to defeated together with network element and single-deck type in S35, taking equipment file In the device field (DFLD) rule gone out, return to step S33;
S36, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return Return step S33.
Based on the above technical solution, the sub-process of the acquisition of complex fields described in step S36 equipment Regulation is:
S361, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S362;
S362, judge whether present field is simple field, be to go to step S363, otherwise go to step S364;
The rule of present field is added to the equipment of output together with network element and single-deck type in S363, taking equipment file In field rule, return to step S361;
S364, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return Return step S361.
Based on the above technical solution, the specific workflow of the compatible rule merging module is as follows:
S41, the network element and single-deck type that current network element configuration type and its place is arranged, go to step S42;
S42, judge whether to have traversed the field of this network element configuration, be to terminate, otherwise go to step S43;
S43, according to network element configuration field, NE type, single-deck type, matching in equipment is found in field mapping table Data field is set, step S44 is gone to;
S44, judge whether to find corresponding configuration data field, be to go to step S45, otherwise go to step S46;
S45, according to NE type, single-deck type, configuration data field, corresponding equipment word is found in the rule of equipment Section rule, is added in general field rule, return to step S42;
S46, according to NE type, single-deck type, network element configuration field, corresponding acquiescence word is found in the rule of acquiescence Section rule, is added in general field rule, return to step S42.
The present invention also provides a kind of field rule generation methods, include the following steps:
S1, universal model the generation module analysis and arrangement from the configuration data of plurality of devices file go out general network element and match It sets, generates field mapping table, preserve the field correspondence of general network element configuration and the configuration data of device file;
S2, default rule generation module are the field rule that general network first wife installs acquiescence;
S3, equipment Regulation generation module extract the word with network element or the relevant configuration data of single-deck type from device file Section rule;
S4, compatible rule merging module will be given tacit consent to for some type of network element configuration according to the network element and single-deck type where it Field rule and the field rule of equipment merge, export general field rule.
Based on the above technical solution, in step S1, the input of the universal model generation module is multiple equipment File, output are that general network element configuration and field mapping table, workflow are as follows:
S11, setting and the general relevant configuration data type of network element configuration set, go to step S12;
S12, judge whether to have traversed device file, be, terminate, otherwise go to step S13;
S13, judge whether to have traversed configuration data in device file, be then return to step S12, otherwise go to step S14;
S14, it checks that the type of current configuration data whether there is in the set being arranged in S11, exists, go to step S15, otherwise return to step S13;
S15, judge whether to have traversed the field of current configuration data, be then return to step S13, otherwise go to step S16;
If S16, present field exist in general network element configuration, step S18 is gone to;Otherwise step S17 is gone to;
S17, present field is added in general network element configuration, goes to step S18;
S18, it is added an entry in field mapping table, including respective field in general network element configuration, currently matches The type and the type of single-deck and the field of current configuration data of network element where setting data, return to step S15.
Based on the above technical solution, in step S2, the input of the default rule generation module is general net Member configuration, output are the field rules of acquiescence<General network element configuration field, default fields rule>, workflow is as follows:
S21, the default rule for defining simple field, go to step S22;
S22, the sub-process that complex fields obtain default rule is defined, goes to step S23;
S23, judge whether to have traversed the field of current general network element configuration, be to terminate, otherwise go to step S24;
S24, judge whether present field is simple field, be to go to step S25, otherwise go to step S26;
S25, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S23;
S26, present field are complicated types, and complex fields is called to obtain the sub-process of default rule, return to step S23.
Based on the above technical solution, the complex fields defined in step S22 obtain the subflow of default rule Cheng Wei:
S221, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S222;
S222, judge whether present field is simple field, be to go to step S223, otherwise go to step S224;
S223, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step Rapid S221;
S224, present field are complex fields, and the complex fields that recursive call step S22 is defined obtain the son of default rule Flow, return to step S221.
Based on the above technical solution, in step S3, the equipment Regulation generation module is used for:From device file Extraction and the field of network element or the relevant configuration data of single-deck type rule:<NE type, single-deck type, configuration data field, Device field (DFLD) rule>, specific workflow is as follows:
S31, judge whether to have traversed device file, be, terminate, otherwise go to step S32;
S32, judge whether to have traversed configuration data in device file, be then return to step S31, otherwise go to step S33;
S33, judge whether to have traversed the field of current configuration data, be then return to step S32, otherwise go to step S34;
S34, judge whether the field of current configuration data is simple field, is to go to step S35, otherwise goes to step S36;
The rule of current configuration data field is added to defeated together with network element and single-deck type in S35, taking equipment file In the device field (DFLD) rule gone out, return to step S33;
S36, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return Return step S33.
Based on the above technical solution, the sub-process of the acquisition of complex fields described in step S36 equipment Regulation is:
S361, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S362;
S362, judge whether present field is simple field, be to go to step S363, otherwise go to step S364;
The rule of present field is added to the equipment of output together with network element and single-deck type in S363, taking equipment file In field rule, return to step S361;
S364, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return Return step S361.
Based on the above technical solution, in step S4, the specific workflow of the compatible rule merging module is as follows:
S41, the network element and single-deck type that current network element configuration type and its place is arranged, go to step S42;
S42, judge whether to have traversed the field of this network element configuration, be to terminate, otherwise go to step S43;
S43, according to network element configuration field, NE type, single-deck type, matching in equipment is found in field mapping table Data field is set, step S44 is gone to;
S44, judge whether to find corresponding configuration data field, be to go to step S45, otherwise go to step S46;
S45, according to NE type, single-deck type, configuration data field, corresponding equipment word is found in the rule of equipment Section rule, is added in general field rule, return to step S42;
S46, according to NE type, single-deck type, network element configuration field, corresponding acquiescence word is found in the rule of acquiescence Section rule, is added in general field rule, return to step S42.
Compared with prior art, advantages of the present invention is as follows:
(1) present invention can analyze the configuration data in the device file of single-deck and network element, generate general network element configuration, Field rule is generated using unified method.Network element configuration is more abstract, and the configuration data of identical function can be used same in equipment One network element configuration is expressed, and the equipment otherness of configuration data is shielded.
(2) present invention increases NE type, single-deck type only needs to change device file, and increases network element configuration type only The product process of operation field algorithm is needed, it is not necessary to modify systems itself, ensure that stability, the maintainability of system And scalability.
(3) the field rule of network element configuration is more flexible in the present invention, can be according to network element and single-deck type Auto-matching To corresponding device field (DFLD) rule.
(4) present invention to can not matching unit field rule field provide default rule as supplement, ensure that system Integrality.
Description of the drawings
Fig. 1 is the structure diagram of field rule generation system in the embodiment of the present invention 1.
Fig. 2 is the flow chart of field rule generation method in the embodiment of the present invention 2.
Fig. 3 is the work flow diagram of universal model generation module in the embodiment of the present invention 3.
Fig. 4 is the work flow diagram of default rule generation module in the embodiment of the present invention 4.
Fig. 5 is the sub-process figure that complex fields obtain default rule in the embodiment of the present invention 5.
Fig. 6 is the work flow diagram of equipment Regulation generation module in the embodiment of the present invention 6.
Fig. 7 is the sub-process figure that complex fields obtain equipment Regulation in the embodiment of the present invention 7.
Fig. 8 is the work flow diagram of compatible rule merging module in the embodiment of the present invention 8.
Specific implementation mode
Below in conjunction with the accompanying drawings and specific embodiment the present invention is described in further detail.
Embodiment 1
Shown in Figure 1, the embodiment of the present invention 1 provides a kind of field rule generation system, including universal model life At module, default rule generation module, equipment Regulation generation module and compatible rule merging module.
Universal model generation module is used for:Generate general network element configuration, the difference of configuration data between shielding device file It is different.Universal model generation module analysis and arrangement from the configuration data of plurality of devices file goes out general network element configuration, i.e., general Model, and field mapping table is generated, preserve the field correspondence of general network element configuration and the configuration data of device file.
The structure of field mapping table is as follows:<General network element configuration field, NE type, single-deck type, configuration data field >.Above structure indicates:Field in general network element configuration can correspond to difference according to the difference of NE type and single-deck type Configuration data field.
The field of network element configuration is divided into simple field and complex fields.Simple field refers to the field that can not be subdivided, multiple Miscellaneous field refers to that can be sub-divided into the field of multiple fields.Correspondence in field mapping table must be that simple field corresponds to Simple field, complex fields correspond to complex fields.
Default rule generation module is used for:The field rule of acquiescence is installed for general network first wife.It is generated from universal model The workflow of module can be seen that the field of general network element configuration, in the device file of certain form of network element and single-deck, Corresponding configuration data field may be can not find.It is therefore desirable to pre-set the default rule of the field of general network element configuration, Prevent the situation that can not find field rule.
Equipment Regulation generation module is used for:Extraction and network element or the relevant configuration data of single-deck type from device file Field rule:<NE type, single-deck type, configuration data field, device field (DFLD) rule>.
Compatible rule merging module is used for:It will be write from memory according to the network element and single-deck type where it for some type of network element configuration The field rule of the field rule and equipment recognized merges, and exports general field rule.This universal field rule is met It is following to require:The field rule of differentiation can be arranged in same field according to specific network element and single-deck type;The field rule of equipment In the absence of, there is the field rule of acquiescence as supplement;Field rule is generated by unified flow.
Embodiment 2
Shown in Figure 2, the embodiment of the present invention 2 provides a kind of field rule generation method, includes the following steps:
S1, universal model generation module generate general network element configuration, the difference of configuration data between shielding device file. Universal model generation module analysis and arrangement from the configuration data of plurality of devices file goes out general network element configuration, i.e. Universal Die Type, and field mapping table is generated, preserve the field correspondence of general network element configuration and the configuration data of device file.
The structure of field mapping table is as follows:<General network element configuration field, NE type, single-deck type, configuration data field >.Above structure indicates:Field in general network element configuration can correspond to difference according to the difference of NE type and single-deck type Configuration data field.
The field of network element configuration is divided into simple field and complex fields.Simple field refers to the field that can not be subdivided, multiple Miscellaneous field refers to that can be sub-divided into the field of multiple fields.Correspondence in field mapping table must be that simple field corresponds to Simple field, complex fields correspond to complex fields.
S2, default rule generation module are the field rule that general network first wife installs acquiescence.Mould is generated from universal model The workflow of block can be seen that the field of general network element configuration, can in the device file of certain form of network element and single-deck Corresponding configuration data field can be can not find.It is therefore desirable to pre-set the default rule of the field of general network element configuration, prevent Only occur can not find the situation of field rule.
S3, equipment Regulation generation module extract the word with network element or the relevant configuration data of single-deck type from device file Section rule:<NE type, single-deck type, configuration data field, device field (DFLD) rule>.
S4, compatible rule merging module will be given tacit consent to for some type of network element configuration according to the network element and single-deck type where it Field rule and the field rule of equipment merge, export general field rule.This universal field rule meet as Lower requirement:The field rule of differentiation can be arranged in same field according to specific network element and single-deck type;The field rule of equipment is not In the presence of, there is the field rule of acquiescence as supplement;Field rule is generated by unified flow.
Embodiment 3
On the basis of embodiment 1 or 2, the input of universal model generation module is plurality of devices file, can use XML File defines, and as follows, is<NE type 1, single-deck Class1>Device file:
XML as above defines two configuration datas eth_interface and l2_attribute, field there are two the former, Port_mode is simple field, and l2_attr is complex fields and corresponding types are l2_attribute;Two fields of the latter All it is simple field.
The configuration data of distinct device file might have difference, such as<NE type 2, single-deck type 2>Equipment text Part is as follows:
XML as above, with<NE type 1, single-deck Class1>XML compare, be similarly the configuration of eth_interface Data, the more l3_attr of field;And the configuration data of l2_attribute, field have been adapted into svlanid and cvlanid.
The input of universal model generation module is multiple equipment file, and output is that general network element configuration and field map Table, shown in Figure 3, workflow is as follows:
S11, setting and the general relevant configuration data type of network element configuration set, go to step S12.
Here general eth_interface network element configurations can be obtained, setting is therewith by taking eth_interface as an example Relevant configuration data type is eth_interface, l2_attribute and l3_attribute.
S12, judge whether to have traversed device file, be, terminate, otherwise go to step S13.Be equivalent to traverse it is above-mentioned Two XML files.
S13, judge whether to have traversed configuration data in device file, be then return to step S12, otherwise go to step S14.And traverse 2 eth_interface in above-mentioned two XML file, 2 l2_attribute and 1 l3_ Attribute, altogether 5 configuration datas.
S14, it checks that the type of current configuration data whether there is in the set being arranged in S11, exists, go to step S15, otherwise return to step S13.This refers to check the configuration data in above-mentioned two XML file whether be all and eth_ Interface is relevant.
S15, judge whether to have traversed the field of current configuration data, be then return to step S13, otherwise go to step S16. 5 configuration datas in above-mentioned two XML file are traversed respectively.
If S16, present field exist in general network element configuration, step S18 is gone to;Otherwise, step is gone to S17。
S17, present field is added in general network element configuration, goes to step S18.
To in two XML files, the field of 2 eth_interface merges, to the word of 2 l2_attribute Section merges, and for 1 l3_attribute, then whole fields are merged into network element configuration.
General eth_interface network element configurations after merging are as follows:
<NeConfig>
<Block Type=" eth_interface " index=" 01 ">
<Parameter Data=" port_mode " type=" DWROD "/>
<Parameter Data=" l2_attr " type=" l2_attribute "/>
<Parameter Data=" l3_attr " type=" l3_attribute "/>
</Block>
<Block Type=" l2_attribute " index=" 02 ">
<Parameter Data=" vlanid " type=" DWROD "/>
<Parameter Data=" svlanid " type=" DWROD "/>
<Parameter Data=" cvlanid " type=" DWROD "/>
<Parameter Data=" vlan_mode " type=" DWORD "/>
</Block>
<Block Type=" l3_attribute " index=" 03 ">
<Parameter Data=" ip_addr " type=" ip_address "/>
<Parameter Data=" ip_mode " type=" DWORD "/>
</Block>
<Block Type=" ip_address " index=" 04 ">
<Parameter Data=" ip_v4 " type=" STRING "/>
<Parameter Data=" ip_mask " type=" DWORD "/>
</Block>
</NeConfig>
S18, it is added an entry in field mapping table, including respective field in general network element configuration, currently matches The type and the type of single-deck and the field of current configuration data of network element where setting data, return to step S15.
The field mapping table of generation is as shown in table 1:
Table 1, the field mapping table generated
Embodiment 4
On the basis of embodiment 1 or 2, the input of default rule generation module is general network element configuration, and output is silent The field rule recognized<General network element configuration field, default fields rule>, shown in Figure 4, workflow is as follows:
S21, the default rule for defining simple field, go to step S22.
General network element configuration XML as described above, has used altogether two kinds of simple fields of WORD and STRING, can define silent Recognize regular WORD be R (w)=<Default=" 0 ", value=" [0-4096] ">, STRING be R (s)=<default =" ", value=" [-] ">.
S22, the sub-process (the step S221 to step S224 for seeing below text) that complex fields obtain default rule is defined, gone to Step S23.
S23, judge whether to have traversed the field of current general network element configuration, be to terminate, otherwise go to step S24.
For example, traversing the eth_interface of general network element configuration XML, port_mode is simple field, l2_attr It is complex fields.
S24, judge whether present field is simple field, be to go to step S25, otherwise go to step S26.
I.e. port_mode fields go to step S25, l2_attr and go to step S26.
S25, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S23。
That is port_mode takes the default rule R (w) of WORD in S21.
S26, present field are complicated types, and complex fields is called to obtain the sub-process of default rule, return to step S23.
The default rule of complex fields is the set of the default rule of multiple simple fields or complex fields.Such as l2_attr The rule of field is exactly the set of the simple field rule of vlanid, svlanid, cvlanid and vlan_mode, l3_attr's Field rule is exactly the set of ip_addr complex fields rule and ip_mode simple field rules.
Embodiment 5
Shown in Figure 5 on the basis of embodiment 4, the complex fields defined in step S22 obtain the son of default rule Flow is:
S221, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S222。
S222, judge whether present field is simple field, be to go to step S223, otherwise go to step S224.
S223, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step Rapid S221.
S224, present field are complex fields, and the complex fields that recursive call step S22 is defined obtain the son of default rule Flow, return to step S221.
The default rule of simple field X can be denoted as R (X), including the default rule of the complex fields C of field Y and Z can be denoted as R (C)={ R (Y), R (Z) }.Particularly define two constants:R (w)=<Default=" 0 ", value=" [0-4096] ">, R (s)=<Default=" ", value=" [-] ">.The default rule such as following table that so above-mentioned S22 to S26 processes generate:
Table 2, the default rule generated
Embodiment 6
On the basis of embodiment 1 or 2, equipment Regulation generation module is used for:Extraction and network element or list from device file The field rule of the relevant configuration data of disc-type:<NE type, single-deck type, configuration data field, device field (DFLD) rule>, Shown in Figure 6, specific workflow is as follows:
S31, judge whether to have traversed device file, be, terminate, otherwise go to step S32.
It traverses above-mentioned<NE type 1, single-deck Class1>With<NE type 2, single-deck type 2>Two XML texts Part.
S32, judge whether to have traversed configuration data in device file, be then return to step S31, otherwise go to step S33。
Traverse 2 eth_interface, 2 l2_attribute and 1 l3_ in above-mentioned two XML file Attribute, altogether 5 configuration datas.
S33, judge whether to have traversed the field of current configuration data, be then return to step S32, otherwise go to step S34.
For example,<NE type 1, single-deck Class1>XML file in eth_interface it is necessary to traversing port_ Tri- fields of mode, l2_attr and l3_attr.
S34, judge whether the field of current configuration data is simple field, is to go to step S35, otherwise goes to step S36。
For example,<NE type 1, single-deck Class1>XML file in eth_interface port_mode fields, It is exactly simple field, it is complex fields to go to step S35, l2_attr and l3_attr, goes to step S36.
The rule of current configuration data field is added to defeated together with network element and single-deck type in S35, taking equipment file In the device field (DFLD) rule gone out, return to step S33.
For example, above-mentioned port_mode fields, the rule got are exactly<NE type 1, single-deck Class1>XML file Defined in<Default=" 0 ", value=" [0-1] ">.
If the field of S36, current configuration data is complex fields, complex fields is called to obtain the sub-process of equipment Regulation (this sub-process is specifically described by step S361~S364), return to step S33.
For example, above-mentioned l2_attr and l3_attr fields, it is necessary to the sub-process of S361 to S364 be adjusted to obtain equipment Rule.
Embodiment 7
Shown in Figure 7 on the basis of embodiment 6, complex fields obtain the sub-process of equipment Regulation in step S36 For:
S361, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S362。
S362, judge whether present field is simple field, be to go to step S363, otherwise go to step S364.
The rule of present field is added to the equipment of output together with network element and single-deck type in S363, taking equipment file In field rule, return to step S361.
If the field of S364, current configuration data is complex fields, complex fields is called to obtain the subflow of equipment Regulation Journey S36 itself, return to step S361.
The sub-process of above-mentioned S361 to S364 is actually to obtain simple field rule successively from top to bottom, and form The process of complex fields rule.
Similar to the above, for the device file of NE type i and single-deck type j, the equipment Regulation of simple field X can It is denoted as Ri,j(X), including the equipment Regulation of the complex fields C of field Y and Z can be denoted as Ri,j(C)={ Ri,j(Y),Ri,j(Z) } on, The equipment Regulation for stating the generation of S31 to S36 processes is as shown in table 3:
Table 3, the equipment Regulation generated
Embodiment 8
Shown in Figure 8 on the basis of embodiment 1 or 2, the specific workflow of compatible rule merging module is as follows:
S41, the network element and single-deck type that current network element configuration type and its place is arranged, go to step S42.
Such as above-mentioned general network element configuration eth_interface, for<NE type 1, single-deck Class1>With<Network element class Type 2, single-deck type 2>, acquisition rule it is also different.
S42, judge whether to have traversed the field of this network element configuration, be to terminate, otherwise go to step S43.I.e. traversal is logical 11 fields of network element configuration eth_interface.
S43, according to network element configuration field, NE type, single-deck type, matching in equipment is found in field mapping table Data field is set, step S44 is gone to.
This stage finds last in table 1 according to first three items.Pay attention to first item in table 1 and last, i.e. net First configuration field and configuration data field are although identical, but can also be different, and table 1 is built in two different interfields of mapping Mapping relations are found.
S44, judge whether to find corresponding configuration data field, be to go to step S45, otherwise go to step S46.
Have equipment Regulation uses equipment Regulation, does not use default rule then.
S45, according to NE type, single-deck type, configuration data field, corresponding equipment word is found in the rule of equipment Section rule, is added in general field rule, return to step S42.
Corresponding equipment Regulation is found in table 3.
S46, according to NE type, single-deck type, network element configuration field, corresponding acquiescence word is found in the rule of acquiescence Section rule, is added in general field rule, return to step S42.
Corresponding default rule is found in table 2.
Above-mentioned S41 to S46 flows generate corresponding general rule according to NE type and single-deck type, as follows,< NE type 1, single-deck Class1>General rule ginseng be shown in Table 4,<NE type 2, single-deck type 2>General rule referring to Shown in table 5.
Table 4,<NE type 1, single-deck Class1>General rule
Table 5,<NE type 2, single-deck type 2>General rule
In above-mentioned two tables, field rule, band "=" number is to indicate to have used default rule, other then use Equipment Regulation.
Those skilled in the art can be carry out various modifications to the embodiment of the present invention and modification, if these modifications and change For type within the scope of the claims in the present invention and its equivalent technologies, then these modifications and variations are also in protection scope of the present invention Within.
The prior art that the content not being described in detail in specification is known to the skilled person.

Claims (14)

1. a kind of field rule generation system, it is characterised in that:The system includes universal model generation module, default rule Generation module, equipment Regulation generation module and compatible rule merging module, wherein:
Universal model generation module is used for:Analysis and arrangement goes out general network element configuration from the configuration data of plurality of devices file, Field mapping table is generated, the field correspondence of general network element configuration and the configuration data of device file is preserved;
Default rule generation module is used for:The field rule of acquiescence is installed for general network first wife;
Equipment Regulation generation module is used for:Extraction and network element or the field of the relevant configuration data of single-deck type from device file Rule;
Compatible rule merging module is used for:For some type of network element configuration, according to the network element and single-deck type where it, by acquiescence The field rule of field rule and equipment merges, and exports general field rule.
2. field rule generation system as described in claim 1, it is characterised in that:The universal model generation module Input is multiple equipment file, and output is that general network element configuration and field mapping table, workflow are as follows:
S11, setting and the general relevant configuration data type of network element configuration set, go to step S12;
S12, judge whether to have traversed device file, be, terminate, otherwise go to step S13;
S13, judge whether to have traversed configuration data in device file, be then return to step S12, otherwise go to step S14;
S14, it checks that the type of current configuration data whether there is in the set being arranged in S11, exists, go to step S15, Otherwise return to step S13;
S15, judge whether to have traversed the field of current configuration data, be then return to step S13, otherwise go to step S16;
If S16, present field exist in general network element configuration, step S18 is gone to;Otherwise step S17 is gone to;
S17, present field is added in general network element configuration, goes to step S18;
S18, an entry, including the respective field in general network element configuration, current-configuration number are added in field mapping table According to the field of the type of place network element and the type of single-deck and current configuration data, return to step S15.
3. field rule generation system as described in claim 1, it is characterised in that:The default rule generation module Input is general network element configuration, and output is the field rule of acquiescence<General network element configuration field, default fields rule>, Workflow is as follows:
S21, the default rule for defining simple field, go to step S22;
S22, the sub-process that complex fields obtain default rule is defined, goes to step S23;
S23, judge whether to have traversed the field of current general network element configuration, be to terminate, otherwise go to step S24;
S24, judge whether present field is simple field, be to go to step S25, otherwise go to step S26;
S25, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S23;
S26, present field are complicated types, and complex fields is called to obtain the sub-process of default rule, return to step S23.
4. field rule generation system as claimed in claim 3, it is characterised in that:It is described multiple defined in step S22 The sub-process that miscellaneous field obtains default rule is:
S221, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S222;
S222, judge whether present field is simple field, be to go to step S223, otherwise go to step S224;
S223, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S221;
S224, present field are complex fields, and the complex fields that recursive call step S22 is defined obtain the subflow of default rule Journey, return to step S221.
5. field rule generation system as described in claim 1, it is characterised in that:The equipment Regulation generation module is used In:Extraction and the field of network element or the relevant configuration data of single-deck type rule from device file:<NE type, single-deck class Type, configuration data field, device field (DFLD) rule>, specific workflow is as follows:
S31, judge whether to have traversed device file, be, terminate, otherwise go to step S32;
S32, judge whether to have traversed configuration data in device file, be then return to step S31, otherwise go to step S33;
S33, judge whether to have traversed the field of current configuration data, be then return to step S32, otherwise go to step S34;
S34, judge whether the field of current configuration data is simple field, is to go to step S35, otherwise goes to step S36;
The rule of current configuration data field is added to output together with network element and single-deck type in S35, taking equipment file In device field (DFLD) rule, return to step S33;
S36, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return step Rapid S33.
6. field rule generation system as claimed in claim 5, it is characterised in that:Complex fields described in step S36 Obtain equipment Regulation sub-process be:
S361, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S362;
S362, judge whether present field is simple field, be to go to step S363, otherwise go to step S364;
The rule of present field is added to the device field (DFLD) of output together with network element and single-deck type in S363, taking equipment file In rule, return to step S361;
S364, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return step Rapid S361.
7. field rule generation system as described in claim 1, it is characterised in that:The compatible rule merging module it is specific Workflow is as follows:
S41, the network element and single-deck type that current network element configuration type and its place is arranged, go to step S42;
S42, judge whether to have traversed the field of this network element configuration, be to terminate, otherwise go to step S43;
S43, according to network element configuration field, NE type, single-deck type, the configuration number in equipment is found in field mapping table According to field, step S44 is gone to;
S44, judge whether to find corresponding configuration data field, be to go to step S45, otherwise go to step S46;
S45, according to NE type, single-deck type, configuration data field, corresponding device field (DFLD) rule are found in the rule of equipment Then, it is added in general field rule, return to step S42;
S46, according to NE type, single-deck type, network element configuration field, corresponding default fields rule are found in the rule of acquiescence Then, it is added in general field rule, return to step S42.
8. a kind of field rule generation method, which is characterized in that include the following steps:
S1, universal model the generation module analysis and arrangement from the configuration data of plurality of devices file go out general network element configuration, raw At field mapping table, the field correspondence of general network element configuration and the configuration data of device file is preserved;
S2, default rule generation module are the field rule that general network first wife installs acquiescence;
S3, equipment Regulation generation module are extracted from device file advises with the field of network element or the relevant configuration data of single-deck type Then;
S4, compatible rule merging module are directed to some type of network element configuration, according to the network element and single-deck type where it, by the word of acquiescence The field rule of section rule and equipment merges, and exports general field rule.
9. field rule generation method as claimed in claim 8, it is characterised in that:In step S1, the universal model The input of generation module is multiple equipment file, and output is that general network element configuration and field mapping table, workflow are as follows:
S11, setting and the general relevant configuration data type of network element configuration set, go to step S12;
S12, judge whether to have traversed device file, be, terminate, otherwise go to step S13;
S13, judge whether to have traversed configuration data in device file, be then return to step S12, otherwise go to step S14;
S14, it checks that the type of current configuration data whether there is in the set being arranged in S11, exists, go to step S15, Otherwise return to step S13;
S15, judge whether to have traversed the field of current configuration data, be then return to step S13, otherwise go to step S16;
If S16, present field exist in general network element configuration, step S18 is gone to;Otherwise step S17 is gone to;
S17, present field is added in general network element configuration, goes to step S18;
S18, an entry, including the respective field in general network element configuration, current-configuration number are added in field mapping table According to the field of the type of place network element and the type of single-deck and current configuration data, return to step S15.
10. field rule generation method as claimed in claim 8, it is characterised in that:In step S2, the default rule The input of generation module is general network element configuration, and output is the field rule of acquiescence<General network element configuration field gives tacit consent to word Section rule>, workflow is as follows:
S21, the default rule for defining simple field, go to step S22;
S22, the sub-process that complex fields obtain default rule is defined, goes to step S23;
S23, judge whether to have traversed the field of current general network element configuration, be to terminate, otherwise go to step S24;
S24, judge whether present field is simple field, be to go to step S25, otherwise go to step S26;
S25, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S23;
S26, present field are complicated types, and complex fields is called to obtain the sub-process of default rule, return to step S23.
11. field rule generation method as claimed in claim 10, it is characterised in that:It is described defined in step S22 Complex fields obtain default rule sub-process be:
S221, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S222;
S222, judge whether present field is simple field, be to go to step S223, otherwise go to step S224;
S223, the default rule for taking present field in step S21, are added in the default fields rule of output, return to step S221;
S224, present field are complex fields, and the complex fields that recursive call step S22 is defined obtain the subflow of default rule Journey, return to step S221.
12. field rule generation method as claimed in claim 8, it is characterised in that:In step S3, the equipment Regulation Generation module is used for:Extraction and the field of network element or the relevant configuration data of single-deck type rule from device file:<Network element class Type, single-deck type, configuration data field, device field (DFLD) rule>, specific workflow is as follows:
S31, judge whether to have traversed device file, be, terminate, otherwise go to step S32;
S32, judge whether to have traversed configuration data in device file, be then return to step S31, otherwise go to step S33;
S33, judge whether to have traversed the field of current configuration data, be then return to step S32, otherwise go to step S34;
S34, judge whether the field of current configuration data is simple field, is to go to step S35, otherwise goes to step S36;
The rule of current configuration data field is added to output together with network element and single-deck type in S35, taking equipment file In device field (DFLD) rule, return to step S33;
S36, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return step Rapid S33.
13. field rule generation method as claimed in claim 12, it is characterised in that:Complicated word described in step S36 Section obtain equipment Regulation sub-process be:
S361, judge whether to have traversed each subdivision field of current complex fields, be to terminate, otherwise go to step S362;
S362, judge whether present field is simple field, be to go to step S363, otherwise go to step S364;
The rule of present field is added to the device field (DFLD) of output together with network element and single-deck type in S363, taking equipment file In rule, return to step S361;
S364, current configuration data field be complex fields, call complex fields obtain equipment Regulation sub-process, return step Rapid S361.
14. field rule generation method as claimed in claim 8, it is characterised in that:In step S4, the compatible rule merging The specific workflow of module is as follows:
S41, the network element and single-deck type that current network element configuration type and its place is arranged, go to step S42;
S42, judge whether to have traversed the field of this network element configuration, be to terminate, otherwise go to step S43;
S43, according to network element configuration field, NE type, single-deck type, the configuration number in equipment is found in field mapping table According to field, step S44 is gone to;
S44, judge whether to find corresponding configuration data field, be to go to step S45, otherwise go to step S46;
S45, according to NE type, single-deck type, configuration data field, corresponding device field (DFLD) rule are found in the rule of equipment Then, it is added in general field rule, return to step S42;
S46, according to NE type, single-deck type, network element configuration field, corresponding default fields rule are found in the rule of acquiescence Then, it is added in general field rule, return to step S42.
CN201810215045.9A 2018-03-15 2018-03-15 Automatic field rule generating system and method Active CN108599985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810215045.9A CN108599985B (en) 2018-03-15 2018-03-15 Automatic field rule generating system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810215045.9A CN108599985B (en) 2018-03-15 2018-03-15 Automatic field rule generating system and method

Publications (2)

Publication Number Publication Date
CN108599985A true CN108599985A (en) 2018-09-28
CN108599985B CN108599985B (en) 2021-03-23

Family

ID=63626400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810215045.9A Active CN108599985B (en) 2018-03-15 2018-03-15 Automatic field rule generating system and method

Country Status (1)

Country Link
CN (1) CN108599985B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022001269A1 (en) * 2020-06-30 2022-01-06 中兴通讯股份有限公司 Configuration data merging method and apparatus, system, electronic device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888655A (en) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 Method and device for configuring network element data in template way in network management system
US20140082122A1 (en) * 2012-09-14 2014-03-20 International Business Machines Corporation Using special-case hardware units for facilitating access control lists on a networking element
CN104052626A (en) * 2014-07-02 2014-09-17 大唐移动通信设备有限公司 Method, device and system for configuring network element data
CN105429786A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Realization method for network management configuration module based on TLV structure and network management configuration module
US20160112317A1 (en) * 2014-10-20 2016-04-21 Telefonaktiebolaget L M Ericsson (Publ) Pre-built match-action tables
CN105959135A (en) * 2016-04-28 2016-09-21 烽火通信科技股份有限公司 PTN equipment single-disk configuration system and method based on common business model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888655A (en) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 Method and device for configuring network element data in template way in network management system
US20140082122A1 (en) * 2012-09-14 2014-03-20 International Business Machines Corporation Using special-case hardware units for facilitating access control lists on a networking element
CN104052626A (en) * 2014-07-02 2014-09-17 大唐移动通信设备有限公司 Method, device and system for configuring network element data
US20160112317A1 (en) * 2014-10-20 2016-04-21 Telefonaktiebolaget L M Ericsson (Publ) Pre-built match-action tables
CN105429786A (en) * 2015-10-30 2016-03-23 上海斐讯数据通信技术有限公司 Realization method for network management configuration module based on TLV structure and network management configuration module
CN105959135A (en) * 2016-04-28 2016-09-21 烽火通信科技股份有限公司 PTN equipment single-disk configuration system and method based on common business model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李鑫: "网元配置管理系统设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022001269A1 (en) * 2020-06-30 2022-01-06 中兴通讯股份有限公司 Configuration data merging method and apparatus, system, electronic device and medium

Also Published As

Publication number Publication date
CN108599985B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
CN103810212B (en) Automated database index creation method and system
CN103761276B (en) Methods of exhibiting and device that a kind of tree structure data compares
CN106022568A (en) Workflow processing method and apparatus
CN106649050B (en) Sequential system multi-parameter operation situation graphical representation method
CN107169007A (en) The display interface method to set up and device of a kind of mobile terminal
CN104536997A (en) Method and device for data batch processing of client interface
CN110188568A (en) Confidential information identification method, device, equipment and computer readable storage medium
US6389407B1 (en) Method for documenting engineering rules
CN102915423A (en) System and method for filtering electric power business data on basis of rough sets and gene expressions
CN108599985A (en) Field rule generation system and method
CN104503984B (en) The processing method and processing device of operation note to data
CN103617265B (en) A kind of ontology query engine based on ontology semantic information optimizes system
CN104021002B (en) A kind of PDM system standards part storage method
CN107784091A (en) A kind of operating right querying method and terminal device
DE112018004687T5 (en) A PREDICTION PROCESSING UNIT FOR MULTIPLE STAGE PATTERN RECOGNITION AND RECOMMENDATIONS FOR VISUAL ANALYTICS
CN103955369B (en) Software fuzzy self-adaptation modeling tool construction method based on expanded UML (Unified Modeling Language)
CN105512001A (en) Monitoring template realizing method for operation and maintenance management system
CN108108444B (en) Enterprise business unit self-adaptive system and implementation method thereof
CN111046115B (en) Heterogeneous database interconnection management method based on knowledge graph
CN104317590B (en) The method of embedded configuration system and embedded configuration audit flow
CN114862099B (en) Continuous casting quality prejudging model online system based on rule engine
CN107194278A (en) A kind of data generaliza-tion method based on Skyline
Sinkala et al. Hierarchical code-to-architecture mapping
CN104753934A (en) Method for separating known protocol multi-communication-parties data stream into point-to-point data stream
CN106776885A (en) A kind of data export method and device

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