CN108599985B - Automatic field rule generating system and method - Google Patents
Automatic field rule generating system and method Download PDFInfo
- Publication number
- CN108599985B CN108599985B CN201810215045.9A CN201810215045A CN108599985B CN 108599985 B CN108599985 B CN 108599985B CN 201810215045 A CN201810215045 A CN 201810215045A CN 108599985 B CN108599985 B CN 108599985B
- Authority
- CN
- China
- Prior art keywords
- field
- rule
- network element
- turning
- default
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration 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 system and a method for automatically generating field rules, and relates to the field of telecommunication transmission network management. The method comprises the following steps: the general model generation module analyzes and arranges general network element configuration from the configuration data of various equipment files, generates a field mapping table and stores the field corresponding relation between the general network element configuration and the configuration data of the equipment files; the default rule generation module sets default field rules for the general network element configuration; the equipment rule generation module extracts field rules of configuration data related to the network element or the single disk type from the equipment file; and the rule merging module merges the default field rule and the field rule of the equipment according to the network element and the single disc type of the network element configuration of a certain type and outputs a universal field rule. The invention uses a uniform method to generate the field rule, shields the equipment difference of the configuration data, and can ensure the stability, maintainability and expandability of the system.
Description
Technical Field
The invention relates to the field of telecommunication transmission network management, in particular to a field rule automatic generation system and a field rule automatic generation method.
Background
In the management of telecommunications transport networks, there is a need to manage various types of network elements and configuration data on a single disk. Each type of device file for a network element or single disk describes configuration data on the network element or single disk. In the management process, the network element configuration needs to be abstracted from the network manager to manage the configuration data on the network element and the single disk. The network element configuration and the configuration data both comprise a plurality of fields, the fields of the network element configuration can find corresponding fields in certain configuration data, and the rules (such as types, value ranges and the like) of the fields need to be known in the management process. The same network element configuration, the network elements or single disks of different types, the configuration data corresponding to the fields of different types, and the field rules of different types. Different fields may correspond to fields of different configuration data for the same network element configuration.
Because the field rule of the network element configuration is related to the specific configuration data of the network element or the single disc, the existing management method defines different network element configurations according to the types of different network elements and single discs, and the different network element configurations correspond to the specific configuration data one to one. This method has significant disadvantages: firstly, configuration data with the same function may be abstracted into different network element configurations only due to the difference of some fields, so that the network element configurations are redundant and not universal; secondly, there is no uniform field rule generation method, and when a new single disk, a new network element or new configuration data is added, the existing rule acquisition system needs to be modified, so that the stability and maintainability of the system are reduced.
Disclosure of Invention
The present invention aims to overcome the defects of the background art, and provides an automatic field rule generation system and method, wherein a unified method is used to generate field rules, the device differences of configuration data are shielded, and the stability, maintainability and expandability of the system can be ensured.
The invention provides an automatic field rule generating system, which comprises a general model generating module, a default rule generating module, an equipment rule generating module and a rule merging module, wherein the general model generating module comprises:
the generic model generation module is to: analyzing and sorting out universal network element configuration from configuration data of various equipment files, generating a field mapping table, and storing the field corresponding relation between the universal network element configuration and the configuration data of the equipment files;
the default rule generation module is used for: setting default field rules for the general network element configuration;
the device rule generation module is to: extracting field rules of configuration data related to network elements or single disk types from the equipment files;
the rule merging module is used for: and aiming at certain type of network element configuration, combining the default field rule and the field rule of the equipment according to the network element and the single-disk type where the network element is located, and outputting a general field rule.
On the basis of the technical scheme, the input of the universal model generation module is a plurality of equipment files, the output is universal network element configuration and a field mapping table, and the working process is as follows:
s11, setting the set of the configuration data type related to the general network element configuration, and going to step S12;
s12, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S13;
s13, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S12, and if not, turning to the step S14;
s14, checking whether the type of the current configuration data exists in the set in S11, if yes, turning to the step S15, otherwise, returning to the step S13;
s15, judging whether traversing the field of the current configuration data, if yes, returning to the step S13, otherwise, turning to the step S16;
s16, if the current field exists in the general network element configuration, go to step S18; otherwise go to step S17;
s17, adding the current field into the general network element configuration, and going to step S18;
s18, adding an entry in the field mapping table, including the corresponding field in the general network element configuration, the type of the network element where the current configuration data is located and the type of the single disc, and the field of the current configuration data, and returning to step S15.
On the basis of the above technical solution, the default rule generating module has the input of a general network element configuration and the output of a default field rule < general network element configuration field, default field rule >, and the work flow thereof is as follows:
s21, defining default rules of the simple fields, and turning to the step S22;
s22, defining a sub-process of the complex field to obtain the default rule, and turning to the step S23;
s23, judging whether the field of the current universal network element configuration is traversed, if yes, ending, otherwise, turning to the step S24;
s24, judging whether the current field is a simple field, if yes, going to step S25, otherwise, going to step S26;
s25, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the step S23 is returned to;
s26, calling the complex field to obtain the sub-flow of the default rule if the current field is the complex type, and returning to the step S23.
On the basis of the above technical solution, the sub-process of the complex field acquiring default rule defined in step S22 is as follows:
s221, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S222;
s222, judging whether the current field is a simple field, if so, turning to the step S223, otherwise, turning to the step S224;
s223, the default rule of the current field in the step S21 is taken, added to the output default field rule, and the step S221 is returned;
s224, the current field is a complex field, the sub-flow of the default rule is obtained by recursively calling the complex field defined in step S22, and the process returns to step S221.
On the basis of the above technical solution, the device rule generating module is configured to: extracting field rules of configuration data related to network elements or single-disk types from the device file: the specific working procedures of the network element type, the single disk type, the configuration data field and the equipment field rule are as follows:
s31, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S32;
s32, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S31, and if not, turning to the step S33;
s33, judging whether traversing the field of the current configuration data, if yes, returning to the step S32, otherwise, turning to the step S34;
s34, judging whether the field of the current configuration data is a simple field, if yes, turning to the step S35, otherwise, turning to the step S36;
s35, the rule of the current configuration data field in the device file is taken, and the rule, the network element and the single disc type are added into the output device field rule, and the step S33 is returned;
s36, if the field of the current configuration data is a complex field, calling the complex field to obtain the sub-flow of the device rule, and returning to the step S33.
On the basis of the above technical solution, the sub-process of obtaining the device rule from the complex field in step S36 is as follows:
s361, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S362;
s362, judging whether the current field is a simple field, if so, turning to the step S363, otherwise, turning to the step S364;
s363, taking the rule of the current field in the equipment file, adding the rule, the network element and the single disk type together into the output equipment field rule, and returning to the step S361;
s364, if the field of the current configuration data is a complex field, invoking a sub-process of the complex field obtaining device rule, and returning to step S361.
On the basis of the technical scheme, the specific work flow of the rule merging module is as follows:
s41, setting the current network element configuration type, the network element and the single-disk type, and going to step S42;
s42, judging whether the field configured by the network element is traversed, if yes, ending, otherwise, turning to the step S43;
s43, finding the configuration data field on the equipment in the field mapping table according to the network element configuration field, the network element type and the single disc type, and turning to the step S44;
s44, judging whether a corresponding configuration data field is found, if yes, turning to the step S45, otherwise, turning to the step S46;
s45, according to the network element type, single disc type, configuration data field, finding out the corresponding equipment field rule in the equipment rule, adding to the general field rule, returning to the step S42;
s46, according to the network element type, single disc type, network element configuration field, finding out the corresponding default field rule in the default rule, adding to the general field rule, returning to step S42.
The invention also provides a field rule automatic generation method, which comprises the following steps:
s1, the general model generation module analyzes and sorts out general network element configuration from the configuration data of various equipment files, generates a field mapping table, and stores the corresponding relation between the general network element configuration and the field of the configuration data of the equipment files;
s2, the default rule generating module sets default field rules for the general network element configuration;
s3, the device rule generating module extracts the field rule of the configuration data related to the network element or the single disc type from the device file;
s4, the rule merging module merges the default field rule and the field rule of the device according to the network element and the single disc type of the network element configuration of a certain type, and outputs the universal field rule.
On the basis of the above technical solution, in step S1, the input of the generic model generation module is a plurality of device files, and the output is a generic network element configuration and field mapping table, and the work flow thereof is as follows:
s11, setting the set of the configuration data type related to the general network element configuration, and going to step S12;
s12, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S13;
s13, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S12, and if not, turning to the step S14;
s14, checking whether the type of the current configuration data exists in the set in S11, if yes, turning to the step S15, otherwise, returning to the step S13;
s15, judging whether traversing the field of the current configuration data, if yes, returning to the step S13, otherwise, turning to the step S16;
s16, if the current field exists in the general network element configuration, go to step S18; otherwise go to step S17;
s17, adding the current field into the general network element configuration, and going to step S18;
s18, adding an entry in the field mapping table, including the corresponding field in the general network element configuration, the type of the network element where the current configuration data is located and the type of the single disc, and the field of the current configuration data, and returning to step S15.
On the basis of the above technical solution, in step S2, the default rule generating module inputs a general network element configuration and outputs a default field rule < general network element configuration field, default field rule >, and the work flow thereof is as follows:
s21, defining default rules of the simple fields, and turning to the step S22;
s22, defining a sub-process of the complex field to obtain the default rule, and turning to the step S23;
s23, judging whether the field of the current universal network element configuration is traversed, if yes, ending, otherwise, turning to the step S24;
s24, judging whether the current field is a simple field, if yes, going to step S25, otherwise, going to step S26;
s25, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the step S23 is returned to;
s26, calling the complex field to obtain the sub-flow of the default rule if the current field is the complex type, and returning to the step S23.
On the basis of the above technical solution, the sub-process of the complex field acquiring default rule defined in step S22 is as follows:
s221, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S222;
s222, judging whether the current field is a simple field, if so, turning to the step S223, otherwise, turning to the step S224;
s223, the default rule of the current field in the step S21 is taken, added to the output default field rule, and the step S221 is returned;
s224, the current field is a complex field, the sub-flow of the default rule is obtained by recursively calling the complex field defined in step S22, and the process returns to step S221.
On the basis of the above technical solution, in step S3, the device rule generating module is configured to: extracting field rules of configuration data related to network elements or single-disk types from the device file: the specific working procedures of the network element type, the single disk type, the configuration data field and the equipment field rule are as follows:
s31, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S32;
s32, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S31, and if not, turning to the step S33;
s33, judging whether traversing the field of the current configuration data, if yes, returning to the step S32, otherwise, turning to the step S34;
s34, judging whether the field of the current configuration data is a simple field, if yes, turning to the step S35, otherwise, turning to the step S36;
s35, the rule of the current configuration data field in the device file is taken, and the rule, the network element and the single disc type are added into the output device field rule, and the step S33 is returned;
s36, if the field of the current configuration data is a complex field, calling the complex field to obtain the sub-flow of the device rule, and returning to the step S33.
On the basis of the above technical solution, the sub-process of obtaining the device rule from the complex field in step S36 is as follows:
s361, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S362;
s362, judging whether the current field is a simple field, if so, turning to the step S363, otherwise, turning to the step S364;
s363, taking the rule of the current field in the equipment file, adding the rule, the network element and the single disk type together into the output equipment field rule, and returning to the step S361;
s364, if the field of the current configuration data is a complex field, invoking a sub-process of the complex field obtaining device rule, and returning to step S361.
On the basis of the above technical solution, in step S4, the specific work flow of the rule merging module is as follows:
s41, setting the current network element configuration type, the network element and the single-disk type, and going to step S42;
s42, judging whether the field configured by the network element is traversed, if yes, ending, otherwise, turning to the step S43;
s43, finding the configuration data field on the equipment in the field mapping table according to the network element configuration field, the network element type and the single disc type, and turning to the step S44;
s44, judging whether a corresponding configuration data field is found, if yes, turning to the step S45, otherwise, turning to the step S46;
s45, according to the network element type, single disc type, configuration data field, finding out the corresponding equipment field rule in the equipment rule, adding to the general field rule, returning to the step S42;
s46, according to the network element type, single disc type, network element configuration field, finding out the corresponding default field rule in the default rule, adding to the general field rule, returning to step S42.
Compared with the prior art, the invention has the following advantages:
(1) the invention can analyze the configuration data in the single disk and the equipment file of the network element, generate the universal network element configuration and generate the field rule by using a uniform method. The network element configuration is more abstract, the configuration data of the same function on the equipment can be expressed by using the same network element configuration, and the equipment difference of the configuration data is shielded.
(2) The invention only needs to modify the equipment file when the network element type and the single disk type are increased, and only needs to run the generation process of the field rule system when the network element configuration type is increased, and the system does not need to be modified, thereby ensuring the stability, maintainability and expandability of the system.
(3) The field rule configured by the network element is more flexible, and the corresponding equipment field rule can be automatically matched according to the network element and the single-disk type.
(4) The invention provides the default rule for the field which can not be matched with the field rule of the equipment as supplement, thereby ensuring the integrity of the system.
Drawings
Fig. 1 is a block diagram of a field rule automatic generation system in embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for automatically generating a field rule in embodiment 2 of the present invention.
Fig. 3 is a flowchart of the operation of the generic model generation module in embodiment 3 of the present invention.
Fig. 4 is a flowchart of a default rule generating module in embodiment 4 of the present invention.
Fig. 5 is a sub-flowchart of complex field default rule acquisition in embodiment 5 of the present invention.
Fig. 6 is a flowchart of a device rule generating module in embodiment 6 of the present invention.
Fig. 7 is a sub-flowchart of complex field acquisition device rules in embodiment 7 of the present invention.
Fig. 8 is a flowchart of the operation of the rule merging module in embodiment 8 of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the embodiments.
Example 1
Referring to fig. 1, embodiment 1 of the present invention provides an automatic field rule generation system, which includes a general model generation module, a default rule generation module, an equipment rule generation module, and a rule merging module.
The generic model generation module is to: and generating a general network element configuration and shielding the difference of configuration data between the equipment files. The general model generation module analyzes and arranges general network element configuration, namely a general model, from the configuration data of various equipment files, generates a field mapping table and stores the field corresponding relation between the general network element configuration and the configuration data of the equipment files.
The structure of the field mapping table is as follows: < general network element configuration field, network element type, single disc type, configuration data field >. The above structure represents: the fields in the general network element configuration can correspond to different configuration data fields according to the difference between the network element type and the single disc type.
The fields of the network element configuration are divided into simple fields and complex fields. A simple field refers to a field that is not subdividable, and a complex field refers to a field that is subdivided into multiple fields. The corresponding relation in the field mapping table must be that a simple field corresponds to a simple field, and a complex field corresponds to a complex field.
The default rule generation module is used for: and setting default field rules for the general network element configuration. It can be seen from the workflow of the generic model generation module that the fields of the generic network element configuration may not find the corresponding configuration data fields in certain types of network elements and single-disk device files. Therefore, it is necessary to preset default rules of fields of the general network element configuration to prevent the situation that the field rules cannot be found.
The device rule generation module is to: extracting field rules of configuration data related to network elements or single-disk types from the device file: < network element type, single disc type, configuration data field, device field rule >.
The rule merging module is used for: and aiming at certain type of network element configuration, combining the default field rule and the field rule of the equipment according to the network element and the single-disk type where the network element is located, and outputting a general field rule. This general field rule meets the following requirements: the same field can be provided with differentiated field rules according to specific network elements and single disc types; when the field rule of the equipment does not exist, a default field rule is used as supplement; the field rules are generated by a unified flow.
Example 2
Referring to fig. 2, embodiment 2 of the present invention provides an automatic field rule generation method, including the following steps:
s1, the general model generating module generates general network element configuration and shields the difference of configuration data between the device files. The general model generation module analyzes and arranges general network element configuration, namely a general model, from the configuration data of various equipment files, generates a field mapping table and stores the field corresponding relation between the general network element configuration and the configuration data of the equipment files.
The structure of the field mapping table is as follows: < general network element configuration field, network element type, single disc type, configuration data field >. The above structure represents: the fields in the general network element configuration can correspond to different configuration data fields according to the difference between the network element type and the single disc type.
The fields of the network element configuration are divided into simple fields and complex fields. A simple field refers to a field that is not subdividable, and a complex field refers to a field that is subdivided into multiple fields. The corresponding relation in the field mapping table must be that a simple field corresponds to a simple field, and a complex field corresponds to a complex field.
S2, the default rule generating module sets default field rule for the general network element configuration. It can be seen from the workflow of the generic model generation module that the fields of the generic network element configuration may not find the corresponding configuration data fields in certain types of network elements and single-disk device files. Therefore, it is necessary to preset default rules of fields of the general network element configuration to prevent the situation that the field rules cannot be found.
S3, the device rule generating module extracts the field rule of the configuration data related to the network element or the single disc type from the device file: < network element type, single disc type, configuration data field, device field rule >.
S4, the rule merging module merges the default field rule and the field rule of the device according to the network element and the single disc type of the network element configuration of a certain type, and outputs the universal field rule. This general field rule meets the following requirements: the same field can be provided with differentiated field rules according to specific network elements and single disc types; when the field rule of the equipment does not exist, a default field rule is used as supplement; the field rules are generated by a unified flow.
Example 3
On the basis of embodiment 1 or 2, the input of the generic model generation module is a variety of device files, which may be defined using XML files, as shown below, for a device file of < network element type 1, single disk type 1 >:
<ConfigInfo>
<Block Type=”eth_interface”index=”01”>
<Parameter Data=”port_mode”default=”0”value=”[0-1]”
type=”DWROD”/>
<Parameter Data=”l2_attr”default=””value=””type=”l2_attribute”/>
</Block>
<Block Type=”l2_attribute”index=”02”>
<Parameter Data=”vlanid”default=”0”value=”[0-4096]”
type=”DWROD”/>
<Parameter Data=”vlan_mode”default=”0”value=”[0-3]”
type=”DWORD”/>
</Block>
</ConfigInfo>
as in XML above, two configuration data eth _ interface and l2_ attribute are defined, the former has two fields, port _ mode is a simple field, l2_ attr is a complex field and the corresponding type is l2_ attribute; both of the latter fields are simple fields.
The configuration data for different device files may differ, for example, for a device file of < network element type 2, single disc type 2> as follows:
<ConfigInfo>
<Block Type=”eth_interface”index=”01”>
<Parameter Data=”port_mode”default=”0”value=”[0-2]”
type=”DWROD”/>
<Parameter Data=”l2_attr”default=””value=””type=”l2_attribute”/>
<Parameter Data=”l3_attr”default=””value=””type=”l3_attribute”/>
</Block>
<Block Type=”l2_attribute”index=”02”>
<Parameter Data=”svlanid”default=”0”value=”[0-4096]”
type=”DWROD”/>
<Parameter Data=”cvlanid”default=”0”value=”[0-4096]”
type=”DWROD”/>
<Parameter Data=”vlan_mode”default=”1”value=”[1-3]”
type=”DWORD”/>
</Block>
<Block Type=”l3_attribute”index=”03”>
<Parameter Data=”ip_addr”default=””value=””type=”ip_address”/>
<Parameter Data=”ip_mode”default=”0”value=”[0-3]”
type=”DWORD”/>
</Block>
<Block Type=”ip_address”index=”04”>
<Parameter Data=”ip_v4”default=”0.0.0.0”
value=”[0.0.0.0-255.255.255.255]”type=”STRING”/>
<Parameter Data=”ip_mask”default=”0”
value=”[0-32]”type=”DWORD”/>
</Block>
</ConfigInfo>
compared with the XML of the network element type 1 and the single disk type 1, the same XML is the configuration data of the eth interface, and l3_ attr is added to the field; and l2_ attribute configuration data, fields are modified to svlanid and cvlanid.
The input of the general model generation module is a plurality of device files, and the output is a general network element configuration and field mapping table, as shown in fig. 3, the working flow is as follows:
s11, set the set of configuration data types related to the general network element configuration, go to step S12.
Taking the eth _ interface as an example, to obtain a general eth _ interface network element configuration, the types of configuration data related to the eth _ interface network element configuration are set to be eth _ interface, l2_ attribute, and l3_ attribute.
S12, judging whether the device file is traversed or not, if yes, ending, otherwise, turning to the step S13. Which is equivalent to traversing the two XML files described above.
S13, judging whether the configuration data in the device file is traversed, if yes, returning to the step S12, and if not, going to the step S14. And 2 eth _ interface, 2 l2_ attribute and 1 l3_ attribute in the two XML files are traversed for a total of 5 configuration data.
S14, checking whether the type of the current configuration data exists in the set in S11, if yes, going to step S15, otherwise, returning to step S13. This is to check whether the configuration data in the two XML files are related to eth _ interface.
S15, judging whether the field of the current configuration data is traversed, if yes, returning to the step S13, and if not, going to the step S16. And traversing 5 pieces of configuration data in the two XML files respectively.
S16, if the current field exists in the general network element configuration, go to step S18; otherwise, go to step S17.
S17, adding the current field into the universal network element configuration, and going to step S18.
Combining fields of 2 eth _ interface in two XML files, combining fields of 2 l2_ attribute, and combining all fields of 1 l3_ attribute into network element configuration.
The merged universal eth _ interface network element is configured 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, adding an entry in the field mapping table, including the corresponding field in the general network element configuration, the type of the network element where the current configuration data is located and the type of the single disc, and the field of the current configuration data, and returning to step S15.
The generated field mapping table is shown in table 1:
TABLE 1 generated field mapping table
Example 4
On the basis of embodiment 1 or 2, the default rule generating module has the input of the general network element configuration and the output of the default rule generating module is the default field rule < general network element configuration field, default field rule >, as shown in fig. 4, and the work flow thereof is as follows:
s21, define default rules for simple fields, go to step S22.
As described above, the general network element configuration XML uses two simple fields, WORD and STRING, and may define default rules WORD as r (w) < default ═ 0,' [0-4096] >, and STRING as r(s) < default ═ and "[ - ]" >.
S22, define the sub-flow of the complex field acquisition default rule (see later Steps S221 through S224), go to step S23.
S23, judging whether the field of the current general network element configuration is traversed, if yes, ending, otherwise, turning to the step S24.
For example, go through eth _ interface of the general network element configuration XML, port _ mode is a simple field, and l2_ attr is a complex field.
S24, judging whether the current field is a simple field, if yes, going to step S25, otherwise, going to step S26.
I.e., the port _ mode field goes to step S25, and l2_ attr goes to step S26.
S25, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the process returns to the step S23.
I.e., port _ mode, takes the default rule r (w) of WORD in S21.
S26, calling the complex field to obtain the sub-flow of the default rule if the current field is the complex type, and returning to the step S23.
The default rule for a complex field is a set of default rules for a plurality of simple fields or complex fields. Rules like the l2_ attr field are the set of simple field rules for vlan id, svlanid, cvlanid, and vlan _ mode, and field rules for l3_ attr are the set of ip _ addr complex field rules and ip _ mode simple field rules.
Example 5
On the basis of embodiment 4, referring to fig. 5, the sub-flow of the complex field acquiring default rule defined in step S22 is as follows:
s221, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S222.
S222, judging whether the current field is a simple field, if so, turning to the step S223, otherwise, turning to the step S224.
S223, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the process returns to the step S221.
S224, the current field is a complex field, the sub-flow of the default rule is obtained by recursively calling the complex field defined in step S22, and the process returns to step S221.
The default rule for simple field X may be denoted as r (X), and the default rule for complex field C, which includes fields Y and Z, may be denoted as r (C) { r (Y), r (Z) }. Two constants are specifically defined: r (w) < default ═ 0 ", value ═ 0-4096" >, r(s) < default ═ and value [ - ] ">. The default rules generated by the above-described S22-S26 processes are as follows:
TABLE 2 Default rules generated
Example 6
On the basis of embodiment 1 or 2, the device rule generation module is configured to: extracting field rules of configuration data related to network elements or single-disk types from the device file: < network element type, single disc type, configuration data field, device field rule >, see fig. 6, the specific work flow is as follows:
s31, judging whether the device file is traversed or not, if yes, ending, otherwise, turning to the step S32.
I.e. traverse the two XML files of < network element type 1, single disc type 1> and < network element type 2, single disc type 2> described above.
S32, judging whether the configuration data in the device file is traversed, if yes, returning to the step S31, and if not, going to the step S33.
That is, traverse 2 eth _ interface, 2 l2_ attribute and 1 l3_ attribute in the above two XML files, for a total of 5 configuration data.
S33, judging whether the field of the current configuration data is traversed, if yes, returning to the step S32, and if not, going to the step S34.
For example, for eth interface in an XML file of < network element type 1, single disk type 1>, three fields of port _ mode, l2_ attr and l3_ attr are traversed.
S34, judging whether the field of the current configuration data is a simple field, if yes, going to step S35, otherwise going to step S36.
For example, the port _ mode field of eth _ interface in the XML file of < network element type 1, single disc type 1> is a simple field, the transition to step S35, and l2_ attr and l3_ attr are complex fields, and the transition to step S36.
S35, the rule of the current configuration data field in the device file is taken, and the rule, the network element and the single disc type are added into the output device field rule, and the step S33 is returned.
For example, in the port _ mode field, the rule obtained is < default ═ 0 ", value ═ 0-1] >, defined in the XML file of < network element type 1, single disc type 1 >.
S36, if the field of the current configuration data is a complex field, calling the sub-flow of the complex field acquisition device rule (the sub-flow is described by steps S361-S364), and returning to step S33.
For example, the fields l2_ attr and l3_ attr described above require a sub-flow from S361 to S364 to be invoked to obtain device rules.
Example 7
On the basis of embodiment 6, referring to fig. 7, the sub-flow of the complex field acquisition device rule in step S36 is as follows:
and S361, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S362.
S362, judging whether the current field is a simple field, if so, going to step S363, otherwise, going to step S364.
S363, add the rule of the current field in the device file, together with the network element and the single disc type, to the output device field rule, and return to step S361.
S364, if the field of the current configuration data is a complex field, call the sub-process of obtaining the device rule for the complex field S36 itself, and return to step S361.
The sub-flow of S361 to S364 described above is actually a process of sequentially acquiring simple field rules from top to bottom and composing complex field rules.
Similar to the above, for device files of network element type i and single disk type j, the device rule of simple field X can be noted as Ri,j(X), the device rule for complex field C containing fields Y and Z may be denoted as Ri,j(C)={Ri,j(Y),Ri,j(Z) }, the device rules generated by the above-mentioned processes of S31 to S36 are shown in table 3:
TABLE 3 generated device rules
Example 8
On the basis of the embodiment 1 or 2, referring to fig. 8, the specific workflow of the rule merging module is as follows:
s41, setting the current network element configuration type, the network element where the current network element configuration type is located and the single disc type, and going to step S42.
As for the above-mentioned general network element configuration eth _ interface, the obtained rules are different for the < network element type 1, single disc type 1> and the < network element type 2, single disc type 2 >.
S42, judging whether the field configured by the network element is traversed, if yes, ending, otherwise, turning to the step S43. I.e. traverse 11 fields of the universal network element configuration eth _ interface.
S43, according to the network element configuration field, the network element type and the single disc type, finding the configuration data field on the equipment in the field mapping table, and going to step S44.
This stage finds the last entry in table 1 based on the first three entries. Note that the first and last entries in table 1, i.e. the network element configuration field and the configuration data field, may be different, although they are the same, and table 1 establishes a mapping relationship between two different fields.
S44, judging whether finding the corresponding configuration data field, if yes, going to step S45, otherwise going to step S46.
Device rules are used with device rules, and default rules are not used.
S45, according to the network element type, single disc type, configuration data field, finding the corresponding equipment field rule in the equipment rule, adding to the general field rule, returning to step S42.
I.e. find the corresponding device rule in table 3.
S46, according to the network element type, single disc type, network element configuration field, finding out the corresponding default field rule in the default rule, adding to the general field rule, returning to step S42.
I.e. find the corresponding default rule in table 2.
The above-mentioned flows S41 to S46 generate corresponding general rules according to the network element type and the single-disc type, as shown below, the general rules of < network element type 1, single-disc type 1> are shown in table 4, and the general rules of < network element type 2, single-disc type 2> are shown in table 5.
Table 4 general rules of < network element type 1, single disc type 1>
Table 5 general rules of < network element type 2, single disc type 2>
In the above two tables, the field rule with the "═" sign indicates that the default rule is used, and the other is the device rule used.
Various modifications and variations of the embodiments of the present invention may be made by those skilled in the art, and they are also within the scope of the present invention, provided they are within the scope of the claims of the present invention and their equivalents.
What is not described in detail in the specification is prior art that is well known to those skilled in the art.
Claims (12)
1. A field rule automatic generation system is characterized in that: the system comprises a general model generation module, a default rule generation module, an equipment rule generation module and a rule merging module, wherein:
the generic model generation module is to: analyzing and sorting out universal network element configuration from configuration data of various equipment files, generating a field mapping table, and storing the field corresponding relation between the universal network element configuration and the configuration data of the equipment files;
the default rule generation module is used for: setting default field rules for the general network element configuration;
the device rule generation module is to: extracting field rules of configuration data related to network elements or single disk types from the equipment files;
the rule merging module is used for: aiming at certain type of network element configuration, according to the network element where the network element is located and the single disc type, combining the default field rule and the field rule of the equipment, and outputting a general field rule, wherein the specific flow is as follows:
s41, setting the current network element configuration type, the network element and the single-disk type, and going to step S42;
s42, judging whether the field configured by the network element is traversed, if yes, ending, otherwise, turning to the step S43;
s43, finding the configuration data field on the equipment in the field mapping table according to the network element configuration field, the network element type and the single disc type, and turning to the step S44;
s44, judging whether a corresponding configuration data field is found, if yes, turning to the step S45, otherwise, turning to the step S46;
s45, according to the network element type, single disc type, configuration data field, finding the corresponding equipment field rule in the field rule of the equipment, adding to the general field rule, returning to the step S42;
s46, according to the network element type, the single disc type and the network element configuration field, finding out the corresponding default field rule in the default field rule, adding the default field rule into the general field rule, and returning to the step S42.
2. The automatic field rule generation system of claim 1, wherein: the input of the general model generation module is a plurality of device files, the output is a general network element configuration and field mapping table, and the working process is as follows:
s11, setting the set of the configuration data type related to the general network element configuration, and going to step S12;
s12, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S13;
s13, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S12, and if not, turning to the step S14;
s14, checking whether the type of the current configuration data exists in the set in S11, if yes, turning to the step S15, otherwise, returning to the step S13;
s15, judging whether the current configuration data field is traversed, if yes, returning to the step S13, otherwise, turning to the step S16;
s16, if the current field exists in the general network element configuration, go to step S18; otherwise go to step S17;
s17, adding the current field into the general network element configuration, and going to step S18;
s18, adding an entry in the field mapping table, including the corresponding field in the general network element configuration, the network element type and single disc type where the current configuration data is located, and the current configuration data field, and returning to step S15.
3. The automatic field rule generation system of claim 1, wherein: the default rule generating module inputs the general network element configuration and outputs the default field rule < general network element configuration field and default field rule >, and the working process is as follows:
s21, defining default rules of the simple fields, and turning to the step S22;
s22, defining a sub-process of the complex field to obtain the default rule, and turning to the step S23;
s23, judging whether the current universal network element configuration field is traversed, if yes, ending, otherwise, turning to the step S24;
s24, judging whether the current field is a simple field, if yes, going to step S25, otherwise, going to step S26;
s25, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the step S23 is returned to;
s26, calling the complex field to obtain the sub-flow of the default rule if the current field is the complex type, and returning to the step S23.
4. The automatic field rule generation system of claim 3, wherein: the sub-process of the complex field obtaining default rule defined in step S22 is:
s221, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S222;
s222, judging whether the current field is a simple field, if so, turning to the step S223, otherwise, turning to the step S224;
s223, the default rule of the current field in the step S21 is taken, added to the output default field rule, and the step S221 is returned;
s224, the current field is a complex field, the sub-flow of the default rule is obtained by recursively calling the complex field defined in step S22, and the process returns to step S221.
5. The automatic field rule generation system of claim 1, wherein: the device rule generation module is configured to: extracting field rules of configuration data related to network elements or single-disk types from the device file: the specific working procedures of the network element type, the single disk type, the configuration data field and the equipment field rule are as follows:
s31, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S32;
s32, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S31, and if not, turning to the step S33;
s33, judging whether the current configuration data field is traversed, if yes, returning to the step S32, otherwise, turning to the step S34;
s34, judging whether the current configuration data field is a simple field, if yes, turning to the step S35, otherwise, turning to the step S36;
s35, the rule of the current configuration data field in the device file is taken, and the rule, the network element and the single disc type are added into the output device field rule, and the step S33 is returned;
s36, the current configuration data field is a complex field, the sub-process of the complex field acquisition device rule is called, and the step S33 is returned.
6. The automatic field rule generation system of claim 5, wherein: the sub-process of the complex field obtaining device rule in step S36 is as follows:
s361, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S362;
s362, judging whether the current field is a simple field, if so, turning to the step S363, otherwise, turning to the step S364;
s363, taking the rule of the current field in the equipment file, adding the rule, the network element and the single disk type together into the output equipment field rule, and returning to the step S361;
s364, if the field of the current configuration data is a complex field, invoking a sub-process of the complex field obtaining device rule, and returning to step S361.
7. A field rule automatic generation method is characterized by comprising the following steps:
s1, the general model generation module analyzes and sorts out general network element configuration from the configuration data of various equipment files, generates a field mapping table, and stores the corresponding relation between the general network element configuration and the field of the configuration data of the equipment files;
s2, the default rule generating module sets default field rules for the universal network element configuration;
s3, the device rule generating module extracts the field rule of the configuration data related to the network element or the single disc type from the device file;
s4, the rule merging module merges the default field rule and the field rule of the device according to the network element and the single-disk type where the network element is located, and outputs a general field rule, where the specific process is as follows:
s41, setting the current network element configuration type, the network element and the single-disk type, and going to step S42;
s42, judging whether the field configured by the network element is traversed, if yes, ending, otherwise, turning to the step S43;
s43, finding the configuration data field on the equipment in the field mapping table according to the network element configuration field, the network element type and the single disc type, and turning to the step S44;
s44, judging whether a corresponding configuration data field is found, if yes, turning to the step S45, otherwise, turning to the step S46;
s45, according to the network element type, single disc type, configuration data field, finding the corresponding equipment field rule in the field rule of the equipment, adding to the general field rule, returning to the step S42;
s46, according to the network element type, the single disc type and the network element configuration field, finding out the corresponding default field rule in the default field rule, adding the default field rule into the general field rule, and returning to the step S42.
8. The automatic field rule generation method of claim 7, wherein: in step S1, the input of the generic model generation module is a plurality of device files, and the output is a generic network element configuration and field mapping table, and the work flow thereof is as follows:
s11, setting the set of the configuration data type related to the general network element configuration, and going to step S12;
s12, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S13;
s13, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S12, and if not, turning to the step S14;
s14, checking whether the type of the current configuration data exists in the set in S11, if yes, turning to the step S15, otherwise, returning to the step S13;
s15, judging whether the current configuration data field is traversed, if yes, returning to the step S13, otherwise, turning to the step S16;
s16, if the current field exists in the general network element configuration, go to step S18; otherwise go to step S17;
s17, adding the current field into the general network element configuration, and going to step S18;
s18, adding an entry in the field mapping table, including the corresponding field in the general network element configuration, the network element type and single disc type where the current configuration data is located, and the current configuration data field, and returning to step S15.
9. The automatic field rule generation method of claim 7, wherein: in step S2, the default rule generating module inputs the general network element configuration and outputs the default field rule < general network element configuration field, default field rule >, and the work flow thereof is as follows:
s21, defining default rules of the simple fields, and turning to the step S22;
s22, defining a sub-process of the complex field to obtain the default rule, and turning to the step S23;
s23, judging whether the current universal network element configuration field is traversed, if yes, ending, otherwise, turning to the step S24;
s24, judging whether the current field is a simple field, if yes, going to step S25, otherwise, going to step S26;
s25, the default rule of the current field in the step S21 is taken and added to the output default field rule, and the step S23 is returned to;
s26, calling the complex field to obtain the sub-flow of the default rule if the current field is the complex type, and returning to the step S23.
10. The automatic field rule generation method of claim 9, wherein: the sub-process of the complex field obtaining default rule defined in step S22 is:
s221, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S222;
s222, judging whether the current field is a simple field, if so, turning to the step S223, otherwise, turning to the step S224;
s223, the default rule of the current field in the step S21 is taken, added to the output default field rule, and the step S221 is returned;
s224, the current field is a complex field, the sub-flow of the default rule is obtained by recursively calling the complex field defined in step S22, and the process returns to step S221.
11. The automatic field rule generation method of claim 7, wherein: in step S3, the device rule generating module is configured to: extracting field rules of configuration data related to network elements or single-disk types from the device file: the specific working procedures of the network element type, the single disk type, the configuration data field and the equipment field rule are as follows:
s31, judging whether the device file is traversed or not, if so, ending, otherwise, turning to the step S32;
s32, judging whether the configuration data in the device file is traversed or not, if yes, returning to the step S31, and if not, turning to the step S33;
s33, judging whether the current configuration data field is traversed, if yes, returning to the step S32, otherwise, turning to the step S34;
s34, judging whether the current configuration data field is a simple field, if yes, turning to the step S35, otherwise, turning to the step S36;
s35, the rule of the current configuration data field in the device file is taken, and the rule, the network element and the single disc type are added into the output device field rule, and the step S33 is returned;
s36, the current configuration data field is a complex field, the sub-process of the complex field acquisition device rule is called, and the step S33 is returned.
12. The automatic field rule generation method of claim 11, wherein: the sub-process of the complex field obtaining device rule in step S36 is as follows:
s361, judging whether each subdivided field of the current complex field is traversed, if so, ending, otherwise, turning to the step S362;
s362, judging whether the current field is a simple field, if so, turning to the step S363, otherwise, turning to the step S364;
s363, taking the rule of the current field in the equipment file, adding the rule, the network element and the single disk type together into the output equipment field rule, and returning to the step S361;
s364, if the field of the current configuration data is a complex field, invoking a sub-process of the complex field obtaining device rule, and returning to step S361.
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 CN108599985A (en) | 2018-09-28 |
CN108599985B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113873540A (en) * | 2020-06-30 | 2021-12-31 | 中兴通讯股份有限公司 | Network element configuration data merging method, device, system, electronic equipment and medium |
Citations (3)
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 |
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 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9225644B2 (en) * | 2012-09-14 | 2015-12-29 | 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 |
US11018977B2 (en) * | 2014-10-20 | 2021-05-25 | Telefonaktiebolaget Lm Ericsson (Publ) | Pre-built match-action tables |
-
2018
- 2018-03-15 CN CN201810215045.9A patent/CN108599985B/en active Active
Patent Citations (3)
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 |
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)
Title |
---|
网元配置管理系统设计与实现;李鑫;《中国优秀硕士学位论文全文数据库(电子期刊)》;20100915;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN108599985A (en) | 2018-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647883B (en) | Business approval method, device, equipment and medium | |
US7693699B2 (en) | Incremental update of virtual devices in a modeled network | |
US8099781B2 (en) | Method of managing and mitigating security risks through planning | |
US11893066B2 (en) | Binding traits to case nodes | |
CN110650037B (en) | Heterogeneous network device configuration method and device | |
MXPA01011034A (en) | Telecommunications network resource handling arrangement and method. | |
US20080059563A1 (en) | Methods and Systems for Automated Data Processing | |
CN108599985B (en) | Automatic field rule generating system and method | |
CN115858810A (en) | Method, system, computer device and storage medium for automatically constructing knowledge graph | |
US7739660B2 (en) | Code management in a distributed software development environment | |
CN109976870A (en) | Creation method, device, equipment and the medium of virtual machine | |
CN108074074A (en) | Integration device and integration method thereof | |
US20080155495A1 (en) | Methods and apparatus for modeling a workflow process in an offline environment | |
CN108108444B (en) | Enterprise business unit self-adaptive system and implementation method thereof | |
US20100037126A1 (en) | Methods, systems, and storage mediums for providing database management services for a telecommunications system | |
CN116679910B (en) | Engineering scaffold generation method, device and equipment based on field driving design | |
CN111125642B (en) | Method and device for managing API, storage medium and computer equipment | |
CN116342171B (en) | Method, device and equipment for monitoring supply price of multistage component of communication product | |
CN109150577B (en) | Service management method and network management system | |
CN109088885B (en) | Method for automatically modifying authentication information by local side node of passive optical network OLT | |
CN117670004A (en) | Service homing configuration method, device and medium based on custom routing strategy | |
US20080065657A1 (en) | Resource management system using pre-established hierarchical structure | |
CN116882916A (en) | Cash flow calculating method and cash flow calculating system | |
CN113553237A (en) | Emergency processing method and device for abnormal scene | |
CN116362921A (en) | Intellectual property information management method, device and system |
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 |