Data configuration method and device

By generating rule tables and rule setting tables, key fields of data are automatically extracted and configured, solving the problems of long data configuration time and low efficiency in existing technologies, and achieving efficient data configuration.

CN113901044BActive Publication Date: 2025-10-28CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010573160.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-22
Publication Date
2025-10-28
Estimated Expiration
2040-06-22

AI Technical Summary

Technical Problem

Existing data configuration methods are time-consuming, inefficient, and prone to errors when the data volume reaches tens of thousands or more, especially when business requirements change, resulting in a large workload for configuration.

Method used

By obtaining the fields of data nodes and child nodes, rule tables and rule setting tables are generated, enabling automatic extraction and configuration of key fields of data, reducing manual intervention.

Benefits of technology

It automates data configuration, shortens processing time, improves work efficiency, and reduces configuration workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901044B_ABST
    Figure CN113901044B_ABST
Patent Text Reader

Abstract

This invention provides a data configuration method and apparatus. The data configuration method provided in this embodiment includes: obtaining a first field of the first node containing first data and all child nodes whose parent node is the first node; generating a first rule table based on the first field; generating a first rule setting table based on the first field and the first rule table; and configuring the first data based on the first rule table and the first rule setting table. The data configuration method provided by this embodiment automatically extracts key fields when configuring data, thereby shortening processing time and improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data applications, and in particular to a data configuration method and apparatus. Background Technology

[0002] With the rapid development of technology, people are becoming increasingly reliant on mobile networks. Various applications carried on mobile networks make people's work and life more convenient and efficient, and more and more people are using them. At the same time, people access different addresses and access different content when using these applications. This has led to new challenges for telecommunications operators who provide basic network support for these applications in terms of operation and billing, namely, how to efficiently and accurately configure data to achieve content billing.

[0003] The current data configuration method is manual backend configuration. This method becomes very labor-intensive when the data volume increases. Currently, the data volume is often in the tens of thousands, and because it often needs to be modified according to changes in business needs, it is also prone to errors during configuration.

[0004] Therefore, the current data configuration method is time-consuming and inefficient when the data volume reaches tens of thousands or more, which is an urgent problem to be solved. Summary of the Invention

[0005] This invention provides a data configuration method to automatically extract key fields from data for configuration, which can better shorten processing time and improve work efficiency.

[0006] Firstly, this disclosure provides a data configuration method, including:

[0007] Retrieve the first field of the first node containing the first data and all child nodes whose parent node is the first node;

[0008] Generate the first rule table based on the first field;

[0009] Generate the first rule setting table based on the first field and the first rule table;

[0010] Configure the first data according to the first rule table and the first rule setting table.

[0011] In one possible design, the first field includes: the first row number of the first node, the second row number of the parent node of the first node, the first level of the first node, the first name of the first node, and the first attribute value corresponding to the first name;

[0012] The second field of the first rule table includes: the first attribute value corresponding to the first rule when the first name of the first node is the first rule, the first attribute value corresponding to the first item number when the first node is the first parent node, the first attribute value corresponding to the first name when the first parent node is the parent node of the second node, the first method value, the first attribute value corresponding to the first method value, the first attribute value corresponding to the first load number when the first name is the first load number, and the name of the first network element where the first node is located, wherein the first method value is the value in the first name;

[0013] The third field of the first rule setting table includes: the first attribute value corresponding to the first name of the third node when the first name is the first rule setting, the first attribute value corresponding to the first name when the third node is the second parent node and the first rule priority, the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node and the first network element name where the third node is located. Among them, the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node is the same as the first attribute value corresponding to the first name when the first name of the first node is the first rule in the second field.

[0014] In one possible design, the approach includes:

[0015] Retrieve the first data to be added, which contains the second attribute value; query the first rule table, and when the second attribute value is found in the first attribute value corresponding to the first rule with the first name; query the first attribute value corresponding to the first item number with the first name of the second attribute value in the first rule table.

[0016] Query the maximum value M of the first attribute value corresponding to the first name being the first item number, and add the first attribute value M+x corresponding to the first name being the first item number, using x as the increment.

[0017] Add a new record to the first rule table. The first record includes: the second attribute value and the first attribute value M+x corresponding to the first item number when the first name is the first item; where M and x are integers greater than 0.

[0018] When no second attribute value is found in the first attribute value corresponding to the first rule with the first name; after adding the first record, the first attribute value corresponding to the first rule with the first name is used as the second parent node in the third field and the first name is the first attribute value corresponding to the first name when the fourth node is the parent node of the third field, and a new second record is generated in the first rule setting table.

[0019] In one possible design, the method also includes:

[0020] Retrieve the second data, which contains the third attribute value to be deleted; query the first rule table to determine the third record whose first attribute value is equal to the third attribute value when the first name is the first rule, and delete the third record.

[0021] In one possible design, the method also includes:

[0022] Retrieve the third data to be deleted. The third data contains a fourth attribute. Query the first rule table to determine the fourth record where the first attribute value is equal to the fourth attribute value when the first name is the first rule. Delete the fourth record.

[0023] Based on the fourth attribute, query the corresponding fifth record in the first rule setting table and delete the fifth record.

[0024] In one possible design, after determining the third record where the first attribute value is equal to the third attribute value when the first name is the first rule, the method further includes:

[0025] Retrieve the first attribute value corresponding to the first item number in the third record; where the number of records that can be marked with the first attribute value corresponding to the first item number is L, and L is an integer greater than 0;

[0026] Delete the third record. If the query result is empty, delete all records corresponding to the first attribute value when the first name is the first item number.

[0027] In one possible design, before configuring the first data according to the first rule table and the first rule setting table, the method further includes:

[0028] Based on the name of the first network element, compare it one by one against the first rule table and the first rule setting table;

[0029] If the sixth record differs from the first rule table, save the sixth record.

[0030] If the seventh record differs from the first rule setting table, save the seventh record.

[0031] Secondly, this disclosure also provides a data configuration apparatus, comprising:

[0032] The acquisition module is used to retrieve the first field of the first node containing the first data and all child nodes whose parent node is the first node.

[0033] The first determining module is used to generate a first rule table based on the first field; it is also used to generate a first rule setting table based on the first field and the first rule table.

[0034] The second determining module is used to configure the first data according to the first rule table and the first rule setting table.

[0035] Thirdly, this disclosure also provides a database, including:

[0036] Processor; and,

[0037] Memory is used to store the processor's executable instructions;

[0038] The processor is configured to execute any of the data configuration methods in the first aspect by executing executable instructions.

[0039] Fourthly, embodiments of this disclosure also provide a storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the data configuration methods in the first aspect.

[0040] This disclosure provides a data configuration method and apparatus, which obtains the first field of the first node where the first data is located and the first field of all child nodes with the first node as the parent node; generates a first rule table based on the first field; generates a first rule setting table based on the first field and the first rule table; and configures the first data based on the first rule table and the first rule setting table, thereby realizing the automatic extraction of key fields of the data for configuration, so as to better shorten the processing time and improve work efficiency. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is an application scenario diagram illustrating a data configuration method according to an example embodiment of the present disclosure;

[0043] Figure 2 This is a schematic flowchart illustrating a data configuration method according to an example embodiment of the present disclosure;

[0044] Figure 3 This is a schematic diagram illustrating the extraction of record screenshots according to an example embodiment of the data configuration method disclosed herein;

[0045] Figure 4 This is a schematic diagram illustrating the generation of a first rule table in a data configuration method according to an example embodiment of the present disclosure;

[0046] Figure 5 This is a schematic diagram illustrating the generation of a first rule setting table in a data configuration method according to an example embodiment of this disclosure;

[0047] Figure 6 This is a schematic diagram of the structure of a data configuration apparatus according to an example embodiment of the present disclosure;

[0048] Figure 7 This is a schematic diagram of the database structure shown in an example embodiment of the present disclosure. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0051] The technical solutions of the present invention and how they solve the above-mentioned technical problems will be described in detail below with reference to specific embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0052] Figure 1 This is an application scenario diagram illustrating a data configuration method according to an example embodiment of the present disclosure, such as... Figure 1As shown, there are n PDN Gateway (PGW) network elements, namely PGW101, PGW102, PGW103, and so on up to PGWn. The node, parent node, level, and node attribute information related to content billing data on all PGW network elements are extracted as configuration data into database 104. When a user needs to configure data, they first log in to the system platform and log in to each PGW network element through the Secure Shell (SSH) protocol. By running a script, the configuration file in the network element is collected, and the data in the configuration file is read line by line. The node, parent node, level, and node attribute information related to content billing data are extracted as fields of configuration data. The first line number of the first node, the second line number of the parent node of the first node, the first level of the first node, the first name of the first node, and the record with the first attribute value of the first name as the first field are generated. The records are stored in the database. The node details in the database are expanded, and the records of key fields for the node details are extracted. The key fields include the first attribute value corresponding to the first rule when the first name of the first node is the first rule, the first attribute value corresponding to the first item number when the first node is the first parent node, the first attribute value corresponding to the first name when the first parent node is the parent node of the second node, the first method value, the first attribute value corresponding to the first method value, the first attribute value corresponding to the first load number when the first name is the first load number, and the name of the first network element where the first node is located. The records of these key fields are summarized into the first rule table 105. Based on the first field and the first rule table 105, a first rule setting table 106 is generated. The fields of the first rule setting table 106 include: the first attribute value corresponding to the first name of the third node being the first rule setting; the first attribute value corresponding to the first name being the first rule priority when the third node is the second parent node; the first attribute value corresponding to the first name being the first name when the second parent node is the parent node of the fourth node; and the name of the first network element to which the third node resides. The first attribute value corresponding to the first name being the first name when the second parent node is the parent node of the fourth node is equivalent to the first attribute value corresponding to the first name being the first rule in the second field. Then, based on the first rule table 105 and the first rule setting table 106, configurations for adding or deleting first data are performed. This processing method enables automatic collection, extraction, and configuration of configuration data, thereby greatly reducing the workload of configuration.

[0053] Figure 2 This is a flowchart illustrating a data configuration method according to an example embodiment of the present disclosure; as shown below. Figure 2 As shown, the data configuration method provided in this embodiment includes:

[0054] Step 201: Obtain the first field of the first node containing the first data and all child nodes whose parent node is the first node;

[0055] Specifically, the system platform logs into the PGW network element via a secure shell protocol. A script is run to collect configuration files from the network element, reading data line by line. Node, parent node, level, and node attribute information related to content billing data are extracted as fields in the configuration data. This generates the first line number of the first node, the second line number of the parent node, the first level of the first node, the first name of the first node, and records with the first attribute value corresponding to the first name being the first field. These records are stored in the database. The PGW network element is divided into versions 1.x and 2.0. For version 1.x PGW network elements, under the Operation Administration and Maintenance (OAM) state at the level of "ManagedElement=1,Epg=1,Pgw=1,ServiceIdentification=1", "show-config" is executed, and the returned report is saved as a file. For version 2.0 network elements, the ericsson.xml file is directly obtained via the SSH File Transfer Protocol (SFTP). The following processing steps are based on network elements of version 1.x. The processing method for network elements of version 2.0 will not be repeated here.

[0056] For example, a record stored in a database table contains the following as its first field: the first row number (id) of the first node, the second row number (pid) of the parent node of the first node, the first level (level) of the first node, the first name (node) of the first node, and the first attribute value (attr) corresponding to the first name. Figure 3 As shown. The methods for generating each field are as follows:

[0057] (1) id: Start counting from the line “ServiceIdentification=1”, with the line number starting from 1000000 and incrementing by 1 for each line.

[0058] (2) level: Based on the indentation of the line “ServiceIdentification=1”, the level increases by 1 for every additional 3 spaces indented in subsequent lines.

[0059] (3)pid: The first node ID with a level lower than that of the current row.

[0060] The pid value and id value are the same in the line “ServiceIdentification=1”.

[0061] (4) node: The name of the node in the row.

[0062] (5)attr: The attribute value corresponding to the node name.

[0063] Step 202: Generate the first rule table based on the first field;

[0064] Specifically, the node details recorded in the database are expanded, and records containing key fields related to the node details are extracted. These key fields include: the first attribute value corresponding to the first rule when the first name of the first node is the first rule; the first attribute value corresponding to the first item number when the first node is the first parent node; the first attribute value corresponding to the first name when the first parent node is the parent node of the second node; the first method value; the first attribute value corresponding to the first method value; the first attribute value corresponding to the first load number when the first name is the first load number; and the name of the first network element to which the first node belongs. The first method value is the value in the first name. These records containing key fields are summarized into a first rule table. The first rule table can be divided into three types based on the different first attribute values: a rule table storing Internet Protocol (IP) addresses, a rule table storing website addresses, and a rule table storing security encryption authentication. The following example uses the rule setting table storing IP addresses; other rule tables will not be discussed further.

[0065] For example, such as Figure 4 As shown, when the first rule of the first name in the first field is HeaderRule, the first attribute value UN-CCTV is read. Taking the node where the HeaderRule is located as the parent node, the first attribute value corresponding to the first item number of the first name in the corresponding child node is found to be 100. When the corresponding child node is the parent node, the first attribute value corresponding to the first name is the first name name is found to be 1. The first method value network-prefix and the first attribute value corresponding to network-prefix are found in the first name column. It can be seen from the figure that there are multiple IP addresses for the first attribute value here. Each IP address is recorded as a record in the first rule table, such as 1.189.177.0 / 24, 1.31.110.0 / 25, etc. The first attribute value 1291846378 corresponding to the first name is the first load number payload and the first network element name SAEGW06 where the node is located is found.

[0066] Step 203: Generate the first rule setting table based on the first field and the first rule table;

[0067] Since the first rule table can be divided into three types based on the different values ​​of its first attribute, namely the rule table for storing Internet Protocol (IP) addresses, the rule table for storing website addresses, and the rule table for storing security encryption authentication, the corresponding first rule setting table can also be divided into three types: the rule setting table for storing IP addresses, the rule setting table for storing website addresses, and the rule setting table for storing security encryption authentication. The following example uses the rule setting table for storing IP addresses as an example; other rule setting tables will not be discussed further.

[0068] Specifically, the node details recorded in the database are expanded, and records containing key fields related to the node details are extracted. These key fields include the first attribute value corresponding to the first rule setting when the first name of the third node is the first name; the first attribute value corresponding to the first rule priority when the third node is the second parent node; the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node; and the first network element name to which the third node belongs. The first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node is equivalent to the first attribute value corresponding to the first rule setting when the first name of the first node is the first name in the second field. These records containing key fields are summarized into a first rule setting table. Similarly, the first rule setting table can be divided into three types of tables: a rule setting table storing Internet Protocol (IP) addresses, a rule setting table storing website addresses, and a rule setting table storing security encryption authentication.

[0069] For example, such as Figure 5 As shown, when the first rule of the first name in the first field is set to HeaderRuleSet, the first attribute value net-hrs is read. Taking the node where HeaderRuleSet is located as the parent node, the first attribute value 17800 corresponding to the first rule priority in the corresponding child node is found. The first attribute value UN-CCTV corresponding to the first name when the child node is the parent node is found, as well as the first network element name SAEGW06 where the node is located.

[0070] Step 204: Configure the first data according to the first rule table and the first rule setting table.

[0071] Specifically, when the platform receives a configuration data instruction, it first reads the first rule table and the first rule setting table stored in the database. When the configuration data instruction is to add first data, it queries the first rule table. If a second attribute value is found in the first attribute value corresponding to the first rule with the first name, it queries the first attribute value corresponding to the first item number with the second attribute value in the first rule table. It queries the maximum value M among the first attribute values ​​corresponding to the first item number with the first name, and adds the first attribute value M+x with the first item number with the first name as the increment. It adds a first record in the first rule table, which includes: the second attribute value and the first attribute value M+x corresponding to the first item number with the first name; where M and x are integers greater than 0. If no second attribute value is found among the first attribute values ​​corresponding to the first rule with the first name, after adding the first record, it uses the first attribute value corresponding to the first rule with the first name as the second parent node in the third field as the parent node of the fourth node, and generates a new second record in the first rule setting table.

[0072] For example, when adding a new data record with IP address 1.189.223.0 and attribute value UN-CCTV, the system checks if this attribute value exists in the first rule table. If it exists, it retrieves the maximum Term number in the first rule table, for example, 100. Each Term number represents 10 records, and the new record is added to the newly created Term number 200 in the first rule table, incrementing by 100. If the attribute value does not exist in the first rule table, after adding the first record, the system retrieves the attribute value UN-CCTV from the first record and adds a new record to the first rule setting table based on the correspondence between this attribute value and the third field in the first rule setting table.

[0073] More specifically, when the configuration data instruction is to delete the third attribute value of the second data, the first rule table is queried to determine the third record whose first attribute value is equal to the third attribute value when the first name is the first rule, and the third record is deleted.

[0074] More specifically, when the configuration data instruction is to delete the third data, where the third data contains a fourth attribute, the first rule table is queried to determine the fourth record where the first attribute value is equal to the fourth attribute value when the first name is the first rule, and the fourth record is deleted; based on the fourth attribute, the corresponding fifth record is queried in the first rule setting table and the fifth record is deleted.

[0075] More specifically, after determining the third record where the first attribute value corresponding to the first name being the first rule is equal to the third attribute value, the first attribute value corresponding to the first name being the first item number in the third record is obtained; where the number of records that can be marked with the first attribute value corresponding to the first name being the first item number is L, and L is an integer greater than 0;

[0076] When deleting the third record, check if the record count L is empty. If the record count L is empty, delete all records whose first name is the first attribute value corresponding to the first item number.

[0077] The above method first extracts the node, parent node, hierarchy, and node attribute information related to content billing data as fields for configuration data. Then, it extracts the corresponding IP address, URL, and the first rule table and first rule setting table for security encryption authentication from the relationships between nodes and parent nodes in the fields. Therefore, when configuring data, addition and deletion operations can be performed based on the extracted first rule table and first rule setting table to better shorten processing time and improve work efficiency.

[0078] More specifically, before configuring the first data based on the first rule table and the first rule setting table, the first rule table and the first rule setting table on each PGW network element can be read, and each element can be compared with the first rule table and the first rule setting table. If there is a difference in the sixth record in the first rule table, the sixth record is saved; if there is a difference in the seventh record in the first rule setting table, the seventh record is saved. Alternatively, one PGW network element can be selected as the standard, and all other PGW network elements are compared with this element before recording. The recorded differences can be used for maintenance and verification to ensure the accuracy of subsequent configuration data.

[0079] Figure 6 This is a schematic diagram illustrating the structure of a data configuration apparatus according to an example embodiment of the present disclosure. Figure 6 As shown, the data copying device 60 provided in this embodiment includes:

[0080] The acquisition module 601 is used to acquire the first field of the first node where the first data is located and all child nodes whose parent node is the first node;

[0081] The first determining module 602 is used to generate a first rule table based on the first field; and is also used to generate a first rule setting table based on the first field and the first rule table.

[0082] The second determining module 603 is used to configure the first data according to the first rule table and the first rule setting table.

[0083] In one possible design, the first field includes: the first row number of the first node, the second row number of the parent node of the first node, the first level of the first node, the first name of the first node, and the first attribute value corresponding to the first name;

[0084] The second field of the first rule table includes: the first attribute value corresponding to the first rule when the first name of the first node is the first rule, the first attribute value corresponding to the first item number when the first node is the first parent node, the first attribute value corresponding to the first name when the first parent node is the parent node of the second node, the first method value, the first attribute value corresponding to the first method value, the first attribute value corresponding to the first load number when the first name is the first load number, and the name of the first network element where the first node is located, wherein the first method value is the value in the first name;

[0085] The third field of the first rule setting table includes: the first attribute value corresponding to the first name of the third node when the first name is the first rule setting, the first attribute value corresponding to the first name when the third node is the second parent node and the first rule priority, the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node and the first network element name where the third node is located. Among them, the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node is the same as the first attribute value corresponding to the first name when the first name of the first node is the first rule in the second field.

[0086] In one possible design, the second determining module 603 is used to: obtain the first data to be added, the first data containing the second attribute value; query the first rule table, and when the second attribute value is found in the first attribute value corresponding to the first name being the first rule; query the first attribute value corresponding to the first name being the first item number in the first rule table corresponding to the second attribute value;

[0087] Query the maximum value M of the first attribute value corresponding to the first name being the first item number, and add the first attribute value M+x corresponding to the first name being the first item number, using x as the increment.

[0088] Add a new record to the first rule table. The first record includes: the second attribute value and the first attribute value M+x corresponding to the first item number when the first name is the first item; where M and x are integers greater than 0.

[0089] When no second attribute value is found in the first attribute value corresponding to the first rule with the first name; after adding the first record, the first attribute value corresponding to the first rule with the first name is used as the second parent node in the third field and the first name is the first attribute value corresponding to the first name when the fourth node is the parent node of the third field, and a new second record is generated in the first rule setting table.

[0090] In one possible design, the second determining module 603 is further configured to: obtain second data, the second data containing the third attribute value to be deleted; query the first rule table, determine the third record whose first attribute value is equal to the third attribute value when the first name is the first rule, and delete the third record.

[0091] In one possible design, the second determining module 603 is further configured to: obtain the third data to be deleted, the third data containing a fourth attribute, query the first rule table, determine the fourth record whose first attribute value is equal to the fourth attribute value when the first name is the first rule, and delete the fourth record;

[0092] Based on the fourth attribute, query the corresponding fifth record in the first rule setting table and delete the fifth record.

[0093] In one possible design, after determining the third record where the first attribute value corresponding to the first name being the first rule is equal to the third attribute value, the second determining module 603 is further configured to:

[0094] Retrieve the first attribute value corresponding to the first item number in the third record; where the number of records that can be marked with the first attribute value corresponding to the first item number is L, and L is an integer greater than 0;

[0095] Delete the third record. If the query result is empty, delete all records corresponding to the first attribute value when the first name is the first item number.

[0096] In one possible design, before configuring the first data according to the first rule table and the first rule setting table, the first determining module 602 is further configured to:

[0097] Based on the name of the first network element, compare it one by one against the first rule table and the first rule setting table;

[0098] If the sixth record differs from the first rule table, save the sixth record.

[0099] If the seventh record differs from the first rule setting table, save the seventh record.

[0100] Figure 7 This is a schematic diagram of the database structure according to an example embodiment of the present disclosure. Figure 7 As shown, this embodiment provides a database 70, which includes:

[0101] Processor 701; and,

[0102] Memory 702 is used to store executable instructions of the processor, and the memory may also be flash memory;

[0103] The processor 701 is configured to execute the various steps of the above method by executing executable instructions. See the relevant descriptions in the preceding method embodiments for details.

[0104] Alternatively, the memory 702 can be either standalone or integrated with the processor 701.

[0105] When the memory 702 is a device independent of the processor 701, the database 70 may further include:

[0106] Bus 703 is used to connect processor 701 and memory 702.

[0107] Furthermore, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, wherein when at least one processor of a user device executes the computer-executable instructions, the user device performs the various possible methods described above.

[0108] Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of computer programs from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a user device. Of course, the processor and storage medium can also exist as discrete components in a communication device.

[0109] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data configuration method, characterized in that, include: Get the first field of the first node where the content billing data is located and all child nodes whose parent node is the first node; The first field includes: the first row number of the first node, the second row number of the parent node of the first node, the first level of the first node, the first name of the first node, and the first attribute value corresponding to the first name; Based on the first field, key fields are extracted to generate a first rule table; wherein, the key fields include: the first attribute value corresponding to the first rule when the first name is the first rule in the first field; the first attribute value corresponding to the first item number of the first name in the child node corresponding to the node where the first rule is located as the parent node; the first attribute value corresponding to the first name when the corresponding child node is the parent node; the first method value in the first name column, and the first attribute value corresponding to the first method value; and the name of the first network element where the first node is located. A first rule setting table is generated based on the first field and the first rule table. The third field of the first rule setting table includes: the first attribute value corresponding to the first name of the third node when the first name is the first rule setting; the first attribute value corresponding to the first name of the third node when the first name is the first rule priority; the first attribute value corresponding to the first name of the second parent node when the first name is the first name when the second parent node is the parent node of the fourth node; and the name of the first network element where the third node is located. The first attribute value corresponding to the first name of the second parent node when the first name is the first name is the same as the first attribute value corresponding to the first rule in the second field. The third node is any one of the first node or its child nodes. The second parent node is the name of the third node when it acts as a parent node, distinct from the first node acting as the first parent node. The fourth node is a child node of the second parent node, distinct from the child node of the first parent node. The second field is a field included in the first rule table. Configure the content billing data according to the first rule table and the first rule setting table; The step of configuring the content billing data according to the first rule table and the first rule setting table includes: Obtain the content billing data to be added, the content billing data including a second attribute value; query the first rule table, and when the second attribute value is found in the first attribute value corresponding to the first name being the first rule; query the first attribute value corresponding to the second attribute value in the first rule table when the first name is the first item number; Query the maximum value M of the first attribute value corresponding to the first item number when the first name is the first item number, and add the first attribute value M+x when the first name is the first item number, with x as the increment. A new record is added to the first rule table. The first record includes: a second attribute value and a first attribute value M+x corresponding to the first item number when the first name is the first item number; where M and x are integers greater than 0. When the second attribute value is not found in the first attribute value corresponding to the first rule with the first name; after adding the first record, the first attribute value corresponding to the first rule with the first name is used as the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node in the third field, and the newly added second record is generated in the first rule setting table.

2. The method according to claim 1, characterized in that, The method further includes: Obtain second data, which contains a third attribute value to be deleted; query the first rule table to determine a third record where the first attribute value corresponding to the first rule with the first name is equal to the third attribute value, and delete the third record.

3. The method according to claim 1, characterized in that, The step of configuring the content billing data according to the first rule table and the first rule setting table further includes: Obtain the third data to be deleted, the third data containing a fourth attribute; query the first rule table to determine the fourth record where the first attribute value is equal to the fourth attribute value when the first name is the first rule; delete the fourth record. Based on the fourth attribute, query the corresponding fifth record in the first rule setting table and delete the fifth record.

4. The method according to claim 2, characterized in that, After determining the third record where the first attribute value corresponding to the first name being the first rule is equal to the third attribute value, the method further includes: Obtain the first attribute value corresponding to the first item number in the third record; wherein, the number of records that can be marked by the first attribute value corresponding to the first item number is L, and L is an integer greater than 0; Delete the third record. If the number of records is empty, delete all records corresponding to the first attribute value when the first name is the first item number.

5. The method according to claim 1, characterized in that, Before configuring the content billing data according to the first rule table and the first rule setting table, the method further includes: Based on the name of the first network element, compare it one by one against the first rule table and the first rule setting table; If there is a sixth record that is different in the first rule table, save the sixth record; If there is a different seventh record in the first rule setting table, save the seventh record.

6. A data configuration device, characterized in that, include: The acquisition module is used to acquire the first field of the first node where the content billing data is located and all child nodes with the first node as the parent node; The first field includes: the first row number of the first node, the second row number of the parent node of the first node, the first level of the first node, the first name of the first node, and the first attribute value corresponding to the first name; The first determining module is used to extract key fields based on the first field and generate a first rule table; the key fields include: obtaining the first attribute value corresponding to the first name being the first rule in the first field, taking the node where the first rule is located as the parent node, the first attribute value corresponding to the first item number of the first name in the child node corresponding to the parent node; the first attribute value corresponding to the first name when the corresponding child node is the parent node; the first method value in the first name column, and the first attribute value corresponding to the first method value, and the name of the first network element where the first node is located; and is also used to generate a first rule setting table based on the first field and the first rule table; the third field of the first rule setting table includes: the first attribute value corresponding to the first name of the third node being the first rule setting, the third node being the second The parent node is defined as follows: the first attribute value corresponding to the first name when the first name is the first rule priority; the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node; and the name of the first network element where the third node is located. Specifically, the first attribute value corresponding to the first name when the second parent node is the parent node of the fourth node is equivalent to the first attribute value corresponding to the first rule when the first name of the first node is the first name in the second field. The third node is any one of the first node or its child nodes. The second parent node is the name of the third node when it acts as a parent node, distinct from the first node acting as the first parent node. The fourth node is a child node of the second parent node, distinct from the child node of the first parent node. The second field is a field included in the first rule table. The second determining module is used to configure the content billing data according to the first rule table and the first rule setting table; The second determining module is further configured to: obtain the content billing data to be added, the content billing data including a second attribute value; query the first rule table, and when the second attribute value is found in the first attribute value corresponding to the first name being the first rule; query the first attribute value corresponding to the second attribute value in the first rule table when the first name is the first item number; query the maximum value M among the first attribute values ​​corresponding to the first name being the first item number, and add the first attribute value corresponding to the first name being the first item number as M+x with x as the increment; add a first record in the first rule table, the first record including: the second attribute value, the first attribute value M+x corresponding to the first name being the first item number; where M and x are integers greater than 0; when the second attribute value is not found among the first attribute values ​​corresponding to the first name being the first rule; after adding the first record, use the first attribute value corresponding to the first name being the first rule as the first attribute value corresponding to the first name being the first name when the second parent node is the parent node of the fourth node in the third field, and generate a new second record in the first rule setting table.

7. A database, characterized in that, include: processor; as well as, Memory for storing the executable instructions of the processor; The processor is configured to execute the data configuration method of any one of claims 1 to 5 by executing the executable instructions.

8. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data configuration method as described in any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data configuration method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-tree structure database design method and device

    CN104408067A