[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113901044A - Data configuration method and device - Google Patents

Data configuration method and device Download PDF

Info

Publication number
CN113901044A
CN113901044A CN202010573160.0A CN202010573160A CN113901044A CN 113901044 A CN113901044 A CN 113901044A CN 202010573160 A CN202010573160 A CN 202010573160A CN 113901044 A CN113901044 A CN 113901044A
Authority
CN
China
Prior art keywords
name
node
attribute value
rule
record
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.)
Pending
Application number
CN202010573160.0A
Other languages
Chinese (zh)
Inventor
王磊
郑圣
朱律韵
潘海兵
李叶强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202010573160.0A priority Critical patent/CN113901044A/en
Publication of CN113901044A publication Critical patent/CN113901044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种数据配置方法及装置,本实施例提供的数据配置方法,包括:获取第一数据所在的第一节点和以所述第一节点为父节点的所有子节点的第一字段;根据所述第一字段,生成第一规则表;根据所述第一字段和所述第一规则表,生成第一规则设置表;根据所述第一规则表和所述第一规则设置表,对所述第一数据进行配置。通过本公开实施例提供的数据配置方法,实现在配置数据时自动提取关键字段,以更好地缩短处理时间,提高工作效率。

Figure 202010573160

The present invention provides a data configuration method and device. The data configuration method provided by this embodiment includes: acquiring a first node where first data is located and first fields of all child nodes whose parent nodes are the first node; According to the first field, a first rule table is generated; according to the first field and the first rule table, a first rule setting table is generated; according to the first rule table and the first rule setting table, The first data is configured. With the data configuration method provided by the embodiments of the present disclosure, it is possible to automatically extract key fields when configuring data, so as to better shorten processing time and improve work efficiency.

Figure 202010573160

Description

Data configuration method and device
Technical Field
The invention relates to the field of big data application, in particular to a data configuration method and device.
Background
With the rapid development of science and technology, people can not leave a mobile network, various applications borne on the mobile network enable people to work and live more conveniently and efficiently, more and more people are used, and meanwhile, the addresses accessed by people are different and the contents are different when the users use the mobile network, so that communication operators providing basic network support for the applications face a new problem in operation and expense, namely how to efficiently and accurately configure data to realize content charging.
The data configuration method adopted in the prior art is to configure data in a manual background, and the manual workload is very large when the data volume level is increased; the current data volume is often tens of thousands, and meanwhile, due to frequent need of modification according to the change of service requirements, errors are easy to occur during configuration.
Therefore, the data configuration method in the prior art is a problem to be solved urgently when the data amount reaches more than ten thousand levels, the time consumption is long, and the efficiency is low.
Disclosure of Invention
The invention provides a data configuration method, which is used for realizing the automatic extraction of key fields of data to carry out configuration work, and can better shorten the processing time and improve the working efficiency.
In a first aspect, the present disclosure provides a data configuration method, including:
acquiring a first node where first data is located and first fields of all child nodes taking the first node as a father node;
generating a first rule table according to the first field;
generating a first rule setting table according to the first field and the first rule table;
and configuring the first data according to the first rule table and the first rule setting table.
In one possible design, the first field includes: the first node comprises a first line number of a first node, a second line number of a father node of the first node, a first hierarchy of the first node, a first name of the first node and a first attribute value corresponding to the first name;
the second field of the first rule table includes: the first node comprises a first attribute value corresponding to a first name of a first node when the first name is a first rule, a first attribute value corresponding to a first item number when the first node is used as a first father node, a first attribute value corresponding to the first name when the first father node is used as a father node of a second node, a first method value, a first attribute value corresponding to the first method value when the first name is a first load number, and a first network element name where the first node is located, wherein the first method value is a value in the first name;
the third field of the first rule setting table includes: the first name of the third node is a first attribute value corresponding to the first rule when the first rule is set, the first attribute value corresponding to the first name when the third node is used as a second father node, the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node, and the first network element name where the third node is located, wherein the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node is equal to the first attribute value corresponding to the first name of the first node in the second field when the first name of the first node is the first rule.
In one possible design, the method includes:
acquiring first data needing to be newly added, wherein the first data comprises a second attribute value; inquiring a first rule table, and when a second attribute value is found in a first attribute value corresponding to a first name of a first rule; inquiring a first attribute value corresponding to the first name of the second attribute value in the first rule table, namely the first item number;
inquiring a maximum value M in first attribute values corresponding to the first name with the first item number, taking x as increment, and taking a first attribute value corresponding to the newly added first name with the first item number as M + x;
newly adding a first record in the first rule table, wherein the first record comprises: the second attribute value and a first attribute value M + x corresponding to the first name of the first item; wherein M, x is an integer greater than 0;
when the second attribute value is not found in the corresponding first attribute value when the first name is the first rule; and after the first record is newly added, taking a first attribute value corresponding to the first name when the first name is the first rule as a first attribute value corresponding to the first name when a second father node in the third field is taken as a father node of the fourth node, and generating a second record newly added in the first rule setting table.
In one possible design, the method further includes:
acquiring second data, wherein the second data comprises a third attribute value to be deleted; and querying the first rule table, determining a third record of which the corresponding first attribute value is equal to the third attribute value when the first name is the first rule, and deleting the third record.
In one possible design, the method further includes:
acquiring third data to be deleted, wherein the third data comprises a fourth attribute, inquiring the first rule table, determining a fourth record of which the corresponding first attribute value is equal to the fourth attribute value when the first name is the first rule, and deleting the fourth record;
and inquiring a corresponding fifth record in the first rule setting table according to the fourth attribute, and deleting the fifth record.
In one possible design, after determining the third record for which the corresponding first attribute value is equal to the third attribute value when the first name is the first rule, the method further includes:
acquiring a first attribute value corresponding to the first name in the third record when the first name is the first item number; when the first name is a first item number, the number of records which can be marked by the corresponding first attribute value is L, and L is an integer which is greater than 0;
and deleting the third record, and deleting all records corresponding to the first attribute value corresponding to the first name when the number of the query records is null.
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:
comparing the first rule tables one by one and comparing the first rule setting tables one by one according to the first network element names;
when the sixth record in the first rule table is different, saving the sixth record;
when the seventh record is different in the first rule setting table, the seventh record is saved.
In a second aspect, the present disclosure also provides a data configuration apparatus, including:
the acquisition module is used for acquiring a first node where the first data is located and first fields of all child nodes taking the first node as a father node;
the first determining module is used for generating a first rule table according to the first field; the first rule setting table is also used for generating a first rule setting table according to the first field and the first rule table;
and the second determining module is used for configuring the first data according to the first rule table and the first rule setting table.
In a third aspect, the present disclosure also provides a database, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any of the data configuration methods of the first aspect via execution of the executable instructions.
In a fourth aspect, the disclosed embodiments also provide a storage medium, on which a computer program is stored, where the program, when executed by a processor, implements any one of the data configuration methods in the first aspect.
The disclosure provides a data configuration method and a device, wherein first fields of a first node where first data are located and all child nodes taking the first node as a father node are obtained; generating a first rule table according to the first field; generating a first rule setting table according to the first field and the first rule table; and configuring the first data according to the first rule table and the first rule setting table, thereby realizing the configuration work of automatically extracting the key fields of the data, better shortening the processing time and improving the working efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram illustrating an application scenario of a data configuration method according to an example embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a data configuration method according to an example embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a record screenshot extracted in a data configuration method according to an example embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a first rule table generating screenshot in a data configuration method according to an example embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating a first rule setting table generating screenshot in a data configuration method according to an example embodiment of the present disclosure;
FIG. 6 is a schematic block diagram of a data configuration apparatus according to an example embodiment of the present disclosure;
FIG. 7 is a block diagram illustrating a database according to an example embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 1 is an application scenario diagram of a data configuration method according to an example embodiment of the present disclosure, as shown in fig. 1, there are n PDN GateWay (PDN GateWay, PGW) network elements, which are the 1 st PGW101, the 2 nd PGW102, the 3 rd PGW103 to the nth PGWn, nodes, parent nodes, hierarchies, and node attribute information related to content charging data on all PGW network elements are extracted as configuration data into a database 104, when a user needs to configure data, first a system platform logs in each PGW network element through a Secure Shell (SSH) protocol, reads data in the configuration file by running a configuration file in a script acquisition network element, extracts nodes, parent nodes, hierarchies, and node attribute information related to content charging data as fields of the configuration data, and generates a first line number of a first node, a second line number of a parent node of the first node, a second line number of the parent node, and a second line number 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 are records of the first field. The records are stored in a database, the node detailed information recorded in the database is expanded, records of key fields for the node detailed information are extracted, wherein the key fields comprise a first attribute value corresponding to the first name of a first node when the first name of the first node is a first rule, a first attribute value corresponding to the first name when the first node is a first father node, a first attribute value corresponding to the first name when the first father node is a father node of a second node, a first method value, a first attribute value corresponding to the first name when the first name is a first load number, and a first network element name where the first node is located, and the records of the key fields are collected into a first rule table 105. Generating a first rule setting table 106 according to the first field and the first rule table 105, wherein the fields of the first rule setting table 106 comprise: the first name of the third node is a first attribute value corresponding to the first rule when the first rule is set, the first attribute value corresponding to the first name when the third node is used as a second father node, the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node, and the first network element name where the third node is located, wherein the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node is equal to the first attribute value corresponding to the first name of the first node in the second field when the first name of the first node is the first rule. Then, according to the first rule table 105 and the first rule setting table 106, the first data is configured to be added or deleted. The processing mode can realize automatic acquisition, extraction and configuration of configuration data, thereby greatly reducing the configuration workload.
FIG. 2 is a flow diagram illustrating a data configuration method according to an example embodiment of the present disclosure; as shown in fig. 2, the data configuration method provided in this embodiment includes:
step 201, acquiring a first node where first data is located and first fields of all child nodes taking the first node as a father node;
specifically, the login system platform logs in a PGW network element through a secure shell protocol, acquires a configuration file in the network element by running a script, reads data in the configuration file line by line, extracts node, parent node, hierarchy and node attribute information related to content charging data as fields of the configuration data, generates a record in which a first line number of a first node, a second line number of the parent node of the first node, a first hierarchy of the first node, a first name of the first node, and a first attribute value corresponding to the first name are first fields, and stores the record in a database. The PGW network element is divided into a 1.x version and a 2.0 version according to the software version, for the PGW network element of the 1.x version, "managed element" 1, Epg "1, Pgw" 1, ServiceIdentification "1" in the Operation Maintenance and Administration (OAM) state, and the returned report is stored as a file for storage. For the network element of version 2.0, the ericsson.xml File is directly acquired through an SSH File Transfer Protocol (SFTP). The following processing steps take the network element of version 1.x as an example, and the processing manner of the network element of version 2.0 is not described herein again.
For example, a record stored in a database table includes a first field having: the first node comprises a first line number id of the first node, a second line number pid of a father node of the first node, a first level of the first node, a first name node of the first node and a first attribute value attr corresponding to the first name. As shown in fig. 3. The generation method of each field is as follows:
(1) id: the number is counted from the line "ServiceIdentification 1", and the line number is incremented by 1 from 1000000.
(2) level: based on the indentation of the line "ServiceIdentification 1", every subsequent line is indented with 3 more spaces, and then level + 1.
(3) pid: the first time before the line is located, the level is lower than the node id number of the line.
The pid value and the id value of the "ServiceIdentification ═ 1" line coincide.
(4) And (3) a node: the node name of the row in which it resides.
(5) attr: and attribute values corresponding to the node names.
Step 202, generating a first rule table according to the first field;
specifically, the node detailed information recorded in the database is expanded, and a record of a key field for the node detailed information is extracted, where the key field includes a first attribute value corresponding to a first name of a first node when the first name is a first rule, a first attribute value corresponding to a first name and a first item number when the first node is a first parent node, a first attribute value corresponding to the first name when the first parent node is a parent node of a second node, a first method value, a first attribute value corresponding to the first name and a first network element name where the first node is located, where the first method value is a value in the first name. The records of these key fields are assembled into a first rule table. The first rule table may be divided into 3 tables according to a difference of the first attribute value, where the 3 tables are a rule table for storing an Internet Protocol (IP) address, a rule table for storing a website address, and a rule table for storing a security encryption authentication. In the following, a rule setting table for storing IP addresses is taken as an example, and other rule tables are not described herein again.
For example, as shown in fig. 4, when the first rule of the first name in the first field is header rule, the corresponding first attribute value UN-CCTV is read, and the node where the header rule is located is taken as a parent node, and 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 found out to be used as a father node, the first name is a first attribute value 1 corresponding to the first name; finding a first method value network-prefix and a first attribute value corresponding to the network-prefix in a first name column, wherein the first attribute value has a plurality of IP addresses, and each IP address is taken as a record in a first rule table, such as 1.189.177.0/24, 1.31.110.0/25 and the like; find the corresponding first attribute value 1291846378 when the first name is the first load number payload, and the first network element name SAEGW06 where the node is located.
Step 203, generating a first rule setting table according to the first field and the first rule table;
since the first rule table may be divided into 3 tables according to the difference of the first attribute value, which are a rule table for storing an Internet Protocol (IP) address, a rule table for storing a website address, and a rule table for storing security encryption authentication, the corresponding first rule setting table may also be divided into 3 tables, which are a rule setting table for storing an IP address, a rule setting table for storing a website address, and a rule setting table for storing security encryption authentication, for example, the rule setting table for storing an IP address is taken as an example, and the other rule setting tables are not described herein again.
Specifically, the node detailed information recorded in the database is expanded, and a record of a key field for the node detailed information is extracted, where the key field includes a first attribute value corresponding to a first name of a third node when the first name of the third node is set as a first rule, a first attribute value corresponding to the first name when the third node is used as a second parent node, a first attribute value corresponding to the first name when the second parent node is used as a parent node of a fourth node, and a first network element name where the third node is located, where the first attribute value corresponding to the first name when the first name of the first node is equal to the first attribute value corresponding to the first name of the first node in the second field when the second parent node is used as the parent node of the fourth node. The records of these key fields are assembled into a first rule set table. Similarly, the first rule setting table may be correspondingly divided into 3 tables, which are a rule setting table for storing an Internet Protocol (IP) address, a rule setting table for storing a website address, and a rule setting table for storing a security encryption authentication.
For example, as shown in fig. 5, the first rule reading the first name in the first field is set to the first attribute value net-hrs corresponding to the headerfulleset, the node where the headerfulleset is located is taken as the parent node, the first attribute value 17800 corresponding to the child node where the first name is the priority of the first rule is found, the first attribute value UN-CCTV corresponding to the child node where the first name is taken as the parent node is found, and the first network element name SAEGW06 where the node is located.
And 204, configuring the first data according to the first rule table and the first rule setting table.
Specifically, when the platform receives the configuration data instruction, first, a first rule table and a first rule setting table stored in the database are read. When the data configuration instruction is newly added first data, a first rule table is inquired, and when a second attribute value is found in first attribute values corresponding to a first name of a first rule; inquiring a first attribute value corresponding to the first name of the second attribute value in the first rule table, namely the first item number; inquiring a maximum value M in first attribute values corresponding to the first name with the first item number, taking x as increment, and taking a first attribute value corresponding to the newly added first name with the first item number as M + x; newly adding a first record in the first rule table, wherein the first record comprises: the second attribute value and a first attribute value M + x corresponding to the first name of the first item; wherein M, x is an integer greater than 0; when the second attribute value is not found in the corresponding first attribute value when the first name is the first rule; and after the first record is newly added, taking a first attribute value corresponding to the first name when the first name is the first rule as a first attribute value corresponding to the first name when a second father node in the third field is taken as a father node of the fourth node, and generating a second record newly added in the first rule setting table.
For example, when a data record with an IP address of 1.189.223.0 and an attribute value of UN-CCTV is newly added, it is queried whether the attribute value exists in the first rule table, if so, the maximum Term number in the first rule table is obtained, for example, 100, each Term number marks 10 records, and the newly added first record is added to the newly created Term number 200 in the first rule table by an increment of 100 as the Term number. If the attribute value is not inquired in the first rule table, after a first record is newly added in the first rule table, the attribute value UN-CCTV is obtained in the first record, and a record is newly added in the first rule setting table according to the corresponding relation that the attribute value is the same as the third field in the first rule setting table.
More specifically, when the data configuration instruction is to delete the third attribute value of the second data, the first rule table is queried, the third record of which the corresponding first attribute value is equal to the third attribute value is determined when the first name is the first rule, and the third record is deleted.
Further specifically, when the data configuration instruction is to delete third data, where the third data includes a fourth attribute, the first rule table is queried, a fourth record is determined, where a first attribute value corresponding to the first name is equal to the fourth attribute value, and the fourth record is deleted; and inquiring a corresponding fifth record in the first rule setting table according to the fourth attribute, and deleting the fifth record.
Further specifically, after determining a third record of which the corresponding first attribute value is equal to the third attribute value when the first name is the first rule, obtaining a first attribute value corresponding to the first name in the third record when the first name is the first item number; when the first name is a first item number, the number of records which can be marked by the corresponding first attribute value is L, and L is an integer which is greater than 0;
and when the third record is deleted, inquiring whether the record number L is empty, and when the record number L is empty, deleting all records with the first name being the first attribute value corresponding to the first item number.
The method extracts the node, father node, level and node attribute information related to the content charging data as the field of the configuration data, and then extracts the first rule table and the first rule setting table corresponding to the IP address, the website and the security encryption authentication from the association relation of the node and the father node in the field. Therefore, when the data is configured, the data can be newly added and deleted according to the extracted first rule table and the first rule setting table, so that the processing time is better shortened, and the working efficiency is improved.
Further specifically, before configuring the first data according to 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 may be read, and the first rule tables may be compared one by one and the first rule setting tables may be compared one by one; when the sixth record in the first rule table is different, saving the sixth record; when the seventh record is different in the first rule setting table, the seventh record is saved. Or, one PGW network element may be selected from all PGW network elements as a standard, and the other PGW network elements are compared with the PGW network element and recorded. The recorded differences may be used for maintenance checks to ensure the accuracy of subsequent configuration data.
Fig. 6 is a schematic structural diagram of a data configuration apparatus according to an example embodiment of the present disclosure. As shown in fig. 6, the data copying apparatus 60 according to the present embodiment includes:
an obtaining module 601, configured to obtain a first node where the first data is located and first fields of all child nodes using the first node as a parent node;
a first determining module 602, configured to generate a first rule table according to the first field; the first rule setting table is also used for generating a first rule setting table according to the first field and the first rule table;
the second determining module 603 is configured to configure the first data according to the first rule table and the first rule setting table.
In one possible design, the first field includes: the first node comprises a first line number of a first node, a second line number of a father node of the first node, a first hierarchy of the first node, a first name of the first node and a first attribute value corresponding to the first name;
the second field of the first rule table includes: the first node comprises a first attribute value corresponding to a first name of a first node when the first name is a first rule, a first attribute value corresponding to a first item number when the first node is used as a first father node, a first attribute value corresponding to the first name when the first father node is used as a father node of a second node, a first method value, a first attribute value corresponding to the first method value when the first name is a first load number, and a first network element name where the first node is located, wherein the first method value is a value in the first name;
the third field of the first rule setting table includes: the first name of the third node is a first attribute value corresponding to the first rule when the first rule is set, the first attribute value corresponding to the first name when the third node is used as a second father node, the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node, and the first network element name where the third node is located, wherein the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node is equal to the first attribute value corresponding to the first name of the first node in the second field when the first name of the first node is the first rule.
In one possible design, the second determining module 603 is configured to: acquiring first data needing to be newly added, wherein the first data comprises a second attribute value; inquiring a first rule table, and when a second attribute value is found in a first attribute value corresponding to a first name of a first rule; inquiring a first attribute value corresponding to the first name of the second attribute value in the first rule table, namely the first item number;
inquiring a maximum value M in first attribute values corresponding to the first name with the first item number, taking x as increment, and taking a first attribute value corresponding to the newly added first name with the first item number as M + x;
newly adding a first record in the first rule table, wherein the first record comprises: the second attribute value and a first attribute value M + x corresponding to the first name of the first item; wherein M, x is an integer greater than 0;
when the second attribute value is not found in the corresponding first attribute value when the first name is the first rule; and after the first record is newly added, taking a first attribute value corresponding to the first name when the first name is the first rule as a first attribute value corresponding to the first name when a second father node in the third field is taken as a father node of the fourth node, and generating a second record newly added in the first rule setting table.
In one possible design, the second determining module 603 is further configured to: acquiring second data, wherein the second data comprises a third attribute value to be deleted; and querying the first rule table, determining a third record of which the corresponding first attribute value is equal to the third attribute value when the first name is the first rule, and deleting the third record.
In one possible design, the second determining module 603 is further configured to: acquiring third data to be deleted, wherein the third data comprises a fourth attribute, inquiring the first rule table, determining a fourth record of which the corresponding first attribute value is equal to the fourth attribute value when the first name is the first rule, and deleting the fourth record;
and inquiring a corresponding fifth record in the first rule setting table according to the fourth attribute, and deleting the fifth record.
In one possible design, after determining the third record whose corresponding first attribute value is equal to the third attribute value when the first name is the first rule, the second determining module 603 is further configured to:
acquiring a first attribute value corresponding to the first name in the third record when the first name is the first item number; when the first name is a first item number, the number of records which can be marked by the corresponding first attribute value is L, and L is an integer which is greater than 0;
and deleting the third record, and deleting all records corresponding to the first attribute value corresponding to the first name when the number of the query records is null.
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:
comparing the first rule tables one by one and comparing the first rule setting tables one by one according to the first network element names;
when the sixth record in the first rule table is different, saving the sixth record;
when the seventh record is different in the first rule setting table, the seventh record is saved.
FIG. 7 is a block diagram illustrating a database according to an example embodiment of the present disclosure. As shown in fig. 7, the present embodiment provides a database 70, which includes:
a processor 701; and the number of the first and second groups,
a memory 702 for storing executable instructions of the processor, which may also be a flash (flash memory);
wherein the processor 701 is configured to perform the respective steps of the above-described method via execution of executable instructions. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 702 may be separate or integrated with the processor 701.
When the memory 702 is a device independent from the processor 701, the database 70 may further include:
the bus 703 is used to connect the processor 701 and the memory 702.
In addition, embodiments of the present application further provide a computer-readable storage medium, in which computer-executable instructions are stored, and when at least one processor of the user equipment executes the computer-executable instructions, the user equipment performs the above-mentioned various possible methods.
Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in user equipment. Of course, the processor and the storage medium may reside as discrete components in a communication device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for configuring data, comprising:
acquiring a first node where first data is located and first fields of all child nodes taking the first node as a father node;
generating a first rule table according to the first field;
generating a first rule setting table according to the first field and the first rule table;
and configuring the first data according to the first rule table and the first rule setting table.
2. The method of claim 1, wherein the first field comprises: a first line number of the first node, a second line number of a parent node of the first node, a first hierarchy of the first node, a first name of the first node, and a first attribute value corresponding to the first name;
the second field of the first rule table includes: a first attribute value corresponding to a first name of the first node when the first name is a first rule, a first attribute value corresponding to a first item number when the first node is used as a first father node, a first attribute value corresponding to a first name when the first father node is used as a father node of a second node, a first method value, a first attribute value corresponding to the first name when the first name is a first load number, and a first network element name where the first node is located, wherein the first method value is a value in the first name;
a third field of the first rule setting table includes: the first name of the third node is a first attribute value corresponding to the first rule setting, the first attribute value corresponding to the first name when the third node is used as a second father node, the first attribute value corresponding to the first name when the second father node is used as a father node of a fourth node, and the first network element name where the third node is located, wherein the first attribute value corresponding to the first name when the second father node is used as a father node of the fourth node is equal to the first attribute value corresponding to the first name of the first node in the second field when the first name of the first node is the first rule.
3. The method of claim 2, wherein the method comprises:
acquiring first data needing to be added newly, wherein the first data comprises a second attribute value; querying the first rule table, and when the second attribute value is found in the first attribute value corresponding to the first name of the first rule; inquiring a first attribute value corresponding to the second attribute value when the first name corresponding to the second attribute value in the first rule table is a first item number;
inquiring a maximum value M in first attribute values corresponding to the first name with the first item number, taking x as increment, and adding the first name with the first item number with the corresponding first attribute value being M + x;
newly adding a first record in the first rule table, wherein the first record comprises: the second attribute value and a corresponding first attribute value M + x when the first name is a first item number; wherein M, x is an integer greater than 0;
when the second attribute value is not found in the corresponding first attribute value when the first name is the first rule; and after the first record is newly added, taking the first attribute value corresponding to the first name when the first name is the first rule as the first attribute value corresponding to the first name when the second father node in the third field is the father node of the fourth node, and generating a second record newly added in the first rule setting table.
4. The method of claim 2, further comprising:
acquiring second data, wherein the second data comprises a third attribute value to be deleted; and querying the first rule table, determining a third record of which the corresponding first attribute value is equal to the third attribute value when the first name is the first rule, and deleting the third record.
5. The method of claim 2, further comprising:
acquiring third data to be deleted, wherein the third data comprises a fourth attribute, inquiring the first rule table, determining a fourth record with a corresponding first attribute value equal to the fourth attribute value when the first name is the first rule, and deleting the fourth record;
and inquiring a corresponding fifth record in the first rule setting table according to the fourth attribute, and deleting the fifth record.
6. The method of claim 4, wherein after determining the first name as the third rule, the method further comprises, after determining the third record for which the corresponding first attribute value is equal to the third attribute value:
acquiring a first attribute value corresponding to the first name in the third record when the first name is a first item number; when the first name is a first item number, the number of records which can be marked by the corresponding first attribute value is L, and L is an integer which is greater than 0;
and deleting the third record, and deleting all records corresponding to the first attribute value corresponding to the first name when the number of the inquired records is null.
7. The method of claim 1, wherein prior to configuring the first data according to the first rule table and the first rule setting table, the method further comprises:
comparing the first rule tables one by one and comparing the first rule setting tables one by one according to the first network element name;
when a sixth record in the first rule table is different, saving the sixth record;
and when a seventh record in the first rule setting table is different, saving the seventh record.
8. A data configuration apparatus, comprising:
the acquisition module is used for acquiring a first node where first data is located and first fields of all child nodes taking the first node as a father node;
the first determining module is used for generating a first rule table according to the first field; the first rule setting table is also used for generating a first rule setting table according to the first field and the first rule table;
and the second determining module is used for configuring the first data according to the first rule table and the first rule setting table.
9. A database, comprising:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the data configuration method of any of claims 1 to 7 via execution of the executable instructions.
10. A storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the data arrangement method of any one of claims 1 to 7.
CN202010573160.0A 2020-06-22 2020-06-22 Data configuration method and device Pending CN113901044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010573160.0A CN113901044A (en) 2020-06-22 2020-06-22 Data configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010573160.0A CN113901044A (en) 2020-06-22 2020-06-22 Data configuration method and device

Publications (1)

Publication Number Publication Date
CN113901044A true CN113901044A (en) 2022-01-07

Family

ID=79186120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010573160.0A Pending CN113901044A (en) 2020-06-22 2020-06-22 Data configuration method and device

Country Status (1)

Country Link
CN (1) CN113901044A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902811A (en) * 2012-10-19 2013-01-30 北京金和软件股份有限公司 Database design method for quickly generating tree structure
CN103106198A (en) * 2011-11-09 2013-05-15 金蝶软件(中国)有限公司 Tree structure implementation method and tree structure implementation device
CN104408067A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Multi-tree structure database design method and device
CN106446086A (en) * 2016-09-09 2017-02-22 中国南方电网有限责任公司电网技术研究中心 Tree structure operation method and system for cloud computing environment
CN106487769A (en) * 2015-09-01 2017-03-08 深圳市中兴微电子技术有限公司 A kind of implementation method of access control list ACL and device
CN109741034A (en) * 2019-01-03 2019-05-10 中国农业银行股份有限公司 A kind of tree-like organization and management method of grid and device
CN110581823A (en) * 2018-06-07 2019-12-17 中国科学院声学研究所 A Method for Parsing Request Packet of Non-public Database Protocol
CN111291024A (en) * 2020-02-19 2020-06-16 京东方科技集团股份有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106198A (en) * 2011-11-09 2013-05-15 金蝶软件(中国)有限公司 Tree structure implementation method and tree structure implementation device
CN102902811A (en) * 2012-10-19 2013-01-30 北京金和软件股份有限公司 Database design method for quickly generating tree structure
CN104408067A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Multi-tree structure database design method and device
CN106487769A (en) * 2015-09-01 2017-03-08 深圳市中兴微电子技术有限公司 A kind of implementation method of access control list ACL and device
CN106446086A (en) * 2016-09-09 2017-02-22 中国南方电网有限责任公司电网技术研究中心 Tree structure operation method and system for cloud computing environment
CN110581823A (en) * 2018-06-07 2019-12-17 中国科学院声学研究所 A Method for Parsing Request Packet of Non-public Database Protocol
CN109741034A (en) * 2019-01-03 2019-05-10 中国农业银行股份有限公司 A kind of tree-like organization and management method of grid and device
CN111291024A (en) * 2020-02-19 2020-06-16 京东方科技集团股份有限公司 Data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10618137B2 (en) Automated constructing method of cloud manufacturing service and cloud manufacturing system
WO2017092470A1 (en) Data storage method and device
CN110597708A (en) Test case file conversion method and device, electronic equipment and storage medium
CN110941629B (en) Metadata processing method, apparatus, device and computer readable storage medium
US11074133B2 (en) Method, electronic device and computer readable medium of file management
EP3974960B1 (en) Method and system for automated testing of web service apis
CN102665231A (en) Method of automatically generating parameter configuration file for LTE (Long Term Evolution) system
CN106547646B (en) Data backup and recovery method and data backup and recovery device
CN104750472A (en) Resource bundle management method and device of terminal application
CN111984264A (en) Static library generation method and device
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN116450655A (en) Tree structure data processing method and device, electronic equipment and storage medium
CN112394930A (en) Method, electronic device, and medium for automatically constructing front-end interface
CN113641742B (en) Data extraction method, device, equipment and storage medium
CN115437703A (en) Business process arranging method, device, equipment and storage medium
CN112905467A (en) Test case execution management method, device, equipment and storage medium
CN113778947A (en) Data import method, device and equipment of kafka stream processing platform
CN111176901B (en) HDFS deleted file recovery method, terminal device and storage medium
CN113901044A (en) Data configuration method and device
CN112905847A (en) Tree structure construction method and device
CN109947739B (en) Data source management method and device
CN109068286B (en) Information analysis method, medium and equipment
US20150347402A1 (en) System and method for enabling a client system to generate file system operations on a file system data set using a virtual namespace
CN110727726B (en) Method and system for extracting data from document database to relational database
CN106126313B (en) A kind of method and server integrating Solr based on Ambari

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