CN110990403A - Business data storage method, system, computer equipment and storage medium - Google Patents
Business data storage method, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110990403A CN110990403A CN201911175270.5A CN201911175270A CN110990403A CN 110990403 A CN110990403 A CN 110990403A CN 201911175270 A CN201911175270 A CN 201911175270A CN 110990403 A CN110990403 A CN 110990403A
- Authority
- CN
- China
- Prior art keywords
- node
- data
- nodes
- tree
- sequence value
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000013500 data storage Methods 0.000 title claims abstract description 26
- 238000013499 data model Methods 0.000 claims abstract description 44
- 238000004364 calculation method Methods 0.000 claims abstract description 19
- 238000012217 deletion Methods 0.000 claims description 12
- 230000037430 deletion Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 230000001960 triggered effect Effects 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000012384 transportation and delivery Methods 0.000 description 3
- 238000012550 audit Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000013079 data visualisation Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for storing service data, the method comprising: acquiring a service data set input by each port; according to a preset tree data generation rule, performing data storage on the obtained service data set to obtain a tree data model; and calculating the sequence value of each node in the tree data model, and forming the sequence value generated by calculation into a new associated item of the corresponding node for storage. Compared with the traditional recursive query, the query efficiency of the storage scheme is higher when the query is performed.
Description
Technical Field
The present invention relates to the field of data storage, and in particular, to a method, a system, a computer device, and a computer-readable storage medium for storing business data.
Background
The business data visualization system with more applications in the existing enterprise utilizes the computer technology to enable a plurality of objects needing to be managed to be clear at a glance and to embody data through a screen, and a manager can accurately, efficiently, simply and comprehensively master the associated information of the objects, so that the important effects of reducing the error rate of a business chain and improving the service quality of the business chain are achieved.
In the existing visualization system, when a service chain with high complexity of flow and redundant nodes exists, the traditional recursive query has the problem of low query efficiency, and the underlying service data storage technology needs to be further improved.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, a system, a computer device, and a computer storage medium for storing business data, so as to solve the problem of low query efficiency of the existing business data storage system.
In order to achieve the above object, an embodiment of the present invention provides a method for storing service data, including the following steps:
acquiring a service data set input by each port;
according to a preset tree data generation rule, performing data processing on the obtained service data set to obtain a tree data model, and storing the tree data model;
and calculating the sequence value of each node in the tree data model, and forming the sequence value generated by calculation into a new associated item of the corresponding node for storage.
Preferably, the service data set includes each key field and its corresponding type tag, and parent-child relationships exist between the type tags.
Preferably, reading the service data set, and acquiring each key field and a type tag corresponding to the field;
correspondingly generating a node by taking a key field as a basic unit, and performing nodularization conversion on the service data set to obtain a plurality of nodes containing corresponding key fields;
and performing top-and-bottom sequencing on the nodes and giving association to the nodes by referring to the generated type labels corresponding to the key fields in the nodes to form the tree data model.
Preferably, the step of calculating the ordinal value of each node in the tree-like data model, and forming the ordinal value generated by calculation into a new associated item of the corresponding node to store includes:
traversing each node in the tree data model according to a preset path plan, giving a front sequence value and a rear sequence value to each node, and forming the front sequence value and the rear sequence value generated by calculation into new associated items of the corresponding nodes for storage.
Preferably, after the step of traversing each node in the tree-like data model according to a preset path plan and assigning a front-order value and a back-order value to each node, and forming the front-order value and the back-order value generated by calculation into new associated items of the corresponding nodes thereof for storage, the method further includes:
when a node data adding event is triggered, acquiring a key field of node data to be added and a type label corresponding to the field, searching a node corresponding to a parent label according to the parent label corresponding to the type label, inserting a child node into the node as newly added node data, giving a forward and backward sequence value of the newly added node, and adjusting the forward and backward sequence values of the rest nodes;
when a node data deletion event is triggered, acquiring a node to be deleted specified by the deletion event, deleting the specified node and adjusting the front and back sequence values of the other nodes.
Preferably, the step of assigning the pre-and-post order values to the newly added node and adjusting the pre-and-post order values of the remaining nodes comprises:
and selecting the nodes with the subsequent values larger than the reference value by taking the subsequent values of the newly added nodes as the reference value, and adding two to the previous and subsequent values.
Preferably, the step of deleting the designated node and adjusting the front-back order values of the remaining nodes comprises:
and taking the backward value of the designated node as a reference, selecting the node with the backward value larger than the reference value, and subtracting two from the forward and backward values.
In order to achieve the above object, an embodiment of the present invention further provides a data storage system based on a service data storage system, including:
the acquisition module is used for acquiring the service data set input by each port;
the storage module is used for performing data storage on the obtained service data set according to a preset tree data generation rule to obtain a tree data model;
and the calculation module is used for calculating the sequence value of each node in the tree-shaped data model, and forming the sequence value generated by calculation into a new associated item of the corresponding node for storage.
To achieve the above object, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for storing business data according to any one of claims 1 to 7.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executable by at least one processor to cause the at least one processor to execute the steps of the method for storing business data according to any one of claims 1 to 7.
Compared with the prior art, the method, the system, the computer device and the computer-readable storage medium for storing the service data provided by the embodiment of the invention provide a new design mode specially for specific data storage, introduce a new association item-sequence value of the node for auxiliary query, have higher query efficiency compared with a recursive query method in the prior art, and can save the operation resources of the system.
Drawings
Fig. 1 is a flowchart of a method for storing service data according to the present invention;
fig. 2 is a schematic diagram of a binary tree type structure of a tree data model in step S200 of the method for storing service data according to the present invention;
fig. 3 is a schematic diagram of a node sequence value in the first embodiment of the method for storing service data according to the present invention;
fig. 4 is a schematic flowchart of step S200 in a first embodiment of a method for storing service data;
fig. 5 is a flowchart of steps after step S300 in the first embodiment of the method for storing service data according to the present invention;
fig. 6 is a schematic view illustrating node addition in a first embodiment of the method for storing service data according to the present invention;
fig. 7 is a schematic diagram illustrating deletion of a node in a first embodiment of a method for storing service data according to the present invention;
FIG. 8 is a schematic diagram of program modules of a second embodiment of a business data storage system according to the present invention;
fig. 9 is a schematic diagram of a hardware structure of a third embodiment of the computer apparatus according to the present invention.
Detailed Description
For better understanding of the technical solutions of the present invention, the following detailed description of the embodiments of the present invention is provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. 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 terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, etc. may be used to describe the designated key in embodiments of the present invention, the designated key should not be limited to these terms. These terms are only used to distinguish specified keywords from each other. For example, the first specified keyword may also be referred to as the second specified keyword, and similarly, the second specified keyword may also be referred to as the first specified keyword, without departing from the scope of embodiments of the present invention.
The word "if" as used herein may be interpreted as referring to "at … …" or "when … …" or "corresponding to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (a stated condition or time)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
Example one
Referring to fig. one, a flowchart illustrating a method for storing service data according to an embodiment of the present invention is shown. It is to be understood that the flow charts in the embodiments of the present invention do not limit the order of executing the steps.
The method comprises the following specific steps:
step S100, acquiring a service data set input by each port;
a mature service chain includes many intermediate points, as in the case of nodes in the computer arts, each of which produces a certain amount of data.
For example, a customer's loan buying behavior includes at least: the loan approval intermediate point, the loan approval intermediate point and the article delivery intermediate point.
In the loan application intermediate point, in the link, a supplier can match an order number for the loan purchasing behavior of the client, and record the name, the certificate number, the mobile phone number, the application time, the loan application amount and the like of a borrower.
The loan approval intermediate point can generate data such as loan summary, credit worthiness audit, inspection opinion, primary audit opinion, review opinion and the like.
The intermediate point of delivery of the article can generate data such as the city of the incoming article, the delivery days, the receiving address and the like.
In the above three intermediate points, the supplier personnel can enter and upload various data generated therein to the server side usually in a data set manner, and the server side obtains the data sets uploaded by different terminals and starts to perform the storage step. The data set is a set of logging data, and the uploading form of the data set is not limited in the present invention, and the uploading may be in the form of a single data packet or a packet data packet.
Step S200, according to a preset tree data generation rule, performing data storage on the obtained service data set to obtain a tree data model;
the tree data generation rule is a tree generation method preset by technicians to generate a tree data model, and a tree data model which comprises a plurality of nodes and has a certain incidence relation with each node is generated according to uploaded input data by using a tree function, a function set, a program set and the like. Due to the diversity of the platform, the present invention does not limit the tree data generation function.
In computer technology, a tree-like data model is a collection of data that is in the nature of a tree structure, which is represented by n (n > 0). It is a set with hierarchy relationship composed of n (n >0) finite nodes. It is called a "tree" because it looks like an inverted tree, i.e., it is root up and leaf down. It has the following characteristics: each node has zero or more child nodes; nodes without parents are called root nodes; each non-root node has only one father node; each child node, except the root node, may be divided into a plurality of disjoint sub-trees.
In the generated tree data model, each node records its corresponding key field in the service data set, which is exemplified by:
the uploaded business data set comprises three key fields of ' three years ', total loan amount ' and ' one million ', and the corresponding storage representation of the tree-shaped data model is that a father node ' three years ', a second-level child node is ' total loan amount ', and a third-level child node ' one million ' is arranged under the second-level child node ' total loan amount '.
In the SQL database, the tree structure can also be represented in the form of a specific table, such as table 1.
TABLE 1
Of course, the "total loan amount" may also be deleted from the above table, so that the node "zhang san" is directly associated with the node "one million", and the "total loan amount" is used as an additional attribute or type tag of the node "one million", which is the same form as that of table 1, but the present invention is not limited thereto.
In addition, the following explains the generation rule of the tree data model with a C language environment and a binary tree structure.
Referring to fig. 2, a conventional chain-type stored binary tree is shown.
When a chain type storage binary tree is adopted, the node structure of the binary tree is composed of 3 parts:
Lchild | data | rchild |
lchild is a pointer to the left child node;
data stored by a node
And (3) Rchild: a pointer to the right child node.
Illustratively, the C language code representing the node structure is:
the C language code created by creating the chain storage structure is as follows:
generally, the service data uploaded by each port is usually in the form of a form to cooperate with the generation of the tree data model.
The form fitting the above example is as follows:
A1 | A2 | |
B1 | zhang three | |
B2 | Total amount of |
1 |
Specifically, in accordance with the form, "(xt) - > data ═ 1" may be changed to "(xt) - > data ═ a 1: b1} ", then the parent node" zhang san "is generated, and" (xt) - > lchild- > data ═ 2 "is modified to" (xt) - > lchild- > data ═ a 1: b2} ", { a 1: b2, if the data in the form is 'total loan amount', the child node 'total loan amount' of the father node 'Zhang III' is generated, and the whole tree-shaped data model is built in the same way.
After the form data is uploaded by the supplier personnel of each port, automatically pulling each data in the form and generating each node according to the codes until the whole tree-shaped data model is completed and stored.
Because the establishment of the tree data model is the prior art, the invention is not repeated for how the tree data model is established in other environments or languages.
Step S300, sequence value calculation is carried out on each node in the tree data model, and the sequence values generated by calculation form new association items of the corresponding nodes and are stored.
The order value is key integer data designed by the invention to avoid the existing recursive query, and reflects the position of a certain node in a node set with a certain order. The sequence value is divided into a front sequence value and a rear sequence value, wherein the front end of the node is the front sequence value, and the rear end of the node is the rear sequence value.
After the tree-shaped data model is built, traversal access is carried out on all nodes in the tree-shaped data model through path planning preset by technicians, and in the process of accessing each node, a sequence value in a proportional relation with the accumulated access times is given to the node in the access process, wherein the invention provides a better proportional relation, and the proportional relation between the node sequence value and the accumulated access times is 1: 1.
Specifically, in the SQL database, after the calculation of the ordinal value is generated, the ordinal value may be used as a new entry of the form data, so as to complete a new associated item storage step of the corresponding node, for example, refer to table 2 and fig. 2:
TABLE 2
In addition, after the forward value and the backward value of each node are obtained, the parent _ id column described as the parent-child relationship can be deleted, so that the number of query items is less, and the query efficiency is higher.
According to the invention, sequence values are designed as association items of nodes in tree data, related information such as sub-nodes, genealogy paths and the like can be directly inquired through select sentences, and inquiry can be obtained only by 2 times of inquiry at most, so that the method has higher hierarchical efficiency for original recursive inquiry in a visual management system.
In the embodiment of the present invention, optionally, the service data set includes each key field and its corresponding type tag, and a parent-child relationship exists between the type tags.
Key fields in the business data set are valid contents of data entered by the provider personnel. For example, the supplier personnel enters data "three times by borrower" through the computer client, and then three times is a key field in the business data set. And "borrower" is the corresponding type tag.
In addition, in the information input link, due to the convenience design of an input interface, a supplier may only input three types of labels, type a and million, the type labels corresponding to the three types can be automatically added by the client and sent to the server, or the server can automatically add a loan person label to the three types of labels, and the type a adds a loan type label.
A parent-child relationship exists between the type tags uploaded together with the key fields, for example, the "borrower" tag is a parent tag of the "loan type", the "loan type" is a parent tag of the "loan amount", a relationship list is correspondingly arranged according to the parent-child relationship between the tags, and the relationship list can be preset at a server end or can be sent to the server end by a client end in real time.
In addition, non-critical field integer data may also be used for type tagging, e.g., "borrower" adds a first level tag of "1", "loan type" adds a second level tag of "2", and so on. The type label setting corresponding to the key field and the parent-child association list exist between the type labels, so that a reference basis is provided for subsequent node sequencing and parent-child relationship endowing, compared with node random sequencing in the prior art, the method can be more suitable for practical application scenes, and the problem of upper and lower level confusion of the nodes is avoided.
Referring to fig. 4, in the embodiment of the present invention, optionally, step 200 includes:
step 210, reading the service data set, and acquiring each key field and a type tag corresponding to the field;
generally, data uploaded at each intermediate point in a service chain is transmitted in a transmission link in the form of a data packet, and a server receives the data packet to parse a packet file and read an effective field, that is, a service data set, in the packet file. The service data set may be transmitted by one data packet, or may be transmitted by a plurality of data packets, which is not limited herein.
In addition, the content obtained after the server side disassembles the data packet may be unordered, the key field in the unordered content may be identified by presetting the key field list, and the server side identifies the key field in the unordered content by presetting the list, or performs auxiliary identification by adding byte bits to the key field when uploading the data packet, which is not limited in the present invention.
Step 220, performing nodalization conversion on the service data set on the principle that one key field is used as a basic unit to generate one corresponding node to obtain a plurality of nodes containing corresponding key fields;
specifically, a key field generates a node, and the key field is used as the name of the node for assignment.
Illustratively, the service data set includes nine key fields of "borrower", "loan information", "loan type", "type a", "loan amount", "one million", "goods name", "goods amount", and nine nodes are generated correspondingly, and the specific form can be as shown in table 3
TABLE 3
Step 230 refers to the generated type label corresponding to the key field in each node, and performs top-bottom ordering and association on each node to form the tree data model.
Illustratively, in view of the existence of parent-child relationship among the type tags, the nodes generated in the preceding steps are sorted by referring to a preset type tag parent-child relationship table, illustratively, the protocol agrees that the type tag priority is represented in the form of arabic numerals, "borrower" is a node having a first-level type tag "1" and is set as a root node, "loan information" is set as having a second-level type tag "2", the subnodes set as "borrower" are processed in the same way, and finally a tree-shaped data model is formed, and the table 2 can be referred to by the form corresponding to the tree-shaped data model in the SQL database.
Referring to fig. 5 and fig. 6, in the embodiment of the present invention, optionally, after the step 300, a node addition and deletion processing step is further included, including:
step 310, when a node data adding event is triggered, obtaining a key field of node data to be added and a type tag corresponding to the field, searching a node corresponding to a parent tag according to the parent tag corresponding to the type tag, inserting a child node into the node as new node data, giving a front-back sequence value of the new node and adjusting the front-back sequence values of the rest nodes;
in the service chain, part of the data of the intermediate points may change due to the demands of the customers, and therefore, the subsequent node adding and deleting steps must be considered.
Specifically, a supplier sends a data adding request to a server through a client, the server pulls node data to be added, key fields and corresponding type labels of the node data are analyzed, a preset type label parent-child relation table is searched, parent labels of the node data are found, corresponding nodes of a tree-shaped data model are positioned, child nodes are added to the nodes, the name of each child node is called a key field of the added node, and assignment of a front-back sequence value of the new node is completed according to brother nodes. Finally, the pre-and post-order values of the remaining nodes are adjusted to avoid overlapping with the pre-and post-order values of the new node.
Step 320, when a node data deletion event is triggered, acquiring the node to be deleted specified by the deletion event, deleting the specified node, and adjusting the front and back order values of the other nodes.
Referring to fig. 7, following the above, the new node adding process is also designed with the opposite node deleting process. Specifically, according to a node deletion request sent by a client port, namely, a node data deletion event is triggered, information corresponding to the uploaded node to be deleted is pulled, and the node to be deleted in the tree data model is positioned according to the corresponding information, so that the node is deleted.
Node deletion is different from node addition, node deletion can only pull the front and back order values of the nodes to be deleted to quickly locate the nodes to be deleted, and can also pull the names of the nodes to carry out traditional recursive query to locate.
In this embodiment of the present invention, optionally, in the step 310, the step of adjusting the front-back order values of the remaining nodes is to use the rear order value of the newly added node as a reference value, select a node whose rear order value is greater than the reference value, and add two to the front-back order value.
In this embodiment of the present invention, optionally, in the step 320, the step of adjusting the front-back order values of the other nodes is to select a node whose front-back order value is greater than the reference value based on the designated node front-back order value, and perform a subtraction processing on the front-back order value.
Example two
Referring to FIG. 8, a schematic diagram of the program modules of the business data storage system of the present invention is shown. In the embodiment, the service data storage system 20 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the present invention and implement the storage method of the service data. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the service data storage system 20 in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
an obtaining module 200, configured to obtain a service data set recorded by each port;
the storage module 300 is configured to perform data storage on the obtained service data set according to a preset tree data generation rule to obtain a tree data model;
and the calculating module 400 is configured to perform order value calculation on each node in the tree data model, and form a new association item of the corresponding node with the order value generated by calculation and store the new association item.
EXAMPLE III
Fig. 9 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a business data storage system 20, communicatively coupled to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 20. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system installed in the computer device 2 and various application software, such as the program codes of the business data storage system 20 in the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the computer device 2 and other electronic apparatuses. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 8 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the business data storage system 20 stored in the memory 21 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 8 shows a schematic diagram of the program modules for implementing the second embodiment of the service data storage system 20, in this embodiment, the service data storage system 20 may be divided into an acquisition module 200, a storage module 300, and a computation module 400, where the program modules referred to in this invention refer to a series of instruction segments of a computer program capable of performing specific functions, and are more suitable than programs for describing the execution process of the insurance product data push system 20 based on big data in the computer device 2. The specific functions of the program module have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing the service data storage system 20, and when being executed by a processor, the storage method of the service data of the first embodiment is implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method for storing service data is characterized by comprising the following steps:
acquiring a service data set input by each port;
according to a preset tree data generation rule, performing data processing on the obtained service data set to obtain a tree data model, and storing the tree data model;
and calculating the sequence value of each node in the tree data model, and forming the sequence value generated by calculation into a new associated item of the corresponding node for storage.
2. The method according to claim 1, wherein the service data set includes key fields and their corresponding type tags, and parent-child relationships exist between the type tags.
3. The method for storing business data according to claim 2, wherein the step of storing the obtained port entry data according to a preset tree data generation rule to obtain a tree data model comprises:
reading the service data set, and acquiring each key field and a type label corresponding to the field;
correspondingly generating a node by taking a key field as a basic unit, and performing nodularization conversion on the service data set to obtain a plurality of nodes containing corresponding key fields;
and performing top-and-bottom sequencing on the nodes and giving association to the nodes by referring to the generated type labels corresponding to the key fields in the nodes to form the tree data model.
4. The method for storing business data according to claim 2, wherein the step of calculating the ordinal value of each node in the tree-like data model, and storing the ordinal value generated by calculation as a new associated item of the corresponding node comprises:
traversing each node in the tree data model according to a preset path plan, giving a front sequence value and a rear sequence value to each node, and forming the front sequence value and the rear sequence value generated by calculation into new associated items of the corresponding nodes for storage.
5. The method for storing business data according to claim 4, wherein after the step of traversing each node in the tree data model according to a preset path plan and assigning a front sequence value and a rear sequence value to each node, and forming the front sequence value and the rear sequence value generated by calculation into new associated items of the corresponding nodes for storage, the method further comprises:
when a node data adding event is triggered, acquiring a key field of node data to be added and a type label corresponding to the field, searching a node corresponding to a parent label according to the parent label corresponding to the type label, inserting a child node into the node as newly added node data, giving a forward and backward sequence value of the newly added node, and adjusting the forward and backward sequence values of the rest nodes;
when a node data deletion event is triggered, acquiring a node to be deleted specified by the deletion event, deleting the specified node and adjusting the front and back sequence values of the other nodes.
6. The method for storing service data according to claim 5, wherein the step of assigning a pre-sequence value to the newly added node and adjusting the pre-sequence values of the remaining nodes comprises:
and selecting the nodes with the subsequent values larger than the reference value by taking the subsequent values of the newly added nodes as the reference value, and adding two to the previous and subsequent values.
7. The method for storing service data according to claim 5, wherein the step of deleting the designated node and adjusting the front-back order values of the remaining nodes comprises:
and taking the backward value of the designated node as a reference, selecting the node with the backward value larger than the reference value, and subtracting two from the forward and backward values.
8. A business data storage system, the system comprising:
the acquisition module is used for acquiring the service data set input by each port;
the storage module is used for performing data storage on the obtained service data set according to a preset tree data generation rule to obtain a tree data model;
and the calculation module is used for calculating the sequence value of each node in the tree-shaped data model, and forming the sequence value generated by calculation into a new associated item of the corresponding node for storage.
9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program, when executed by the processor, implements the steps of the method of storing business data according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor to cause the at least one processor to perform the steps of the method of storing traffic data according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911175270.5A CN110990403A (en) | 2019-11-26 | 2019-11-26 | Business data storage method, system, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911175270.5A CN110990403A (en) | 2019-11-26 | 2019-11-26 | Business data storage method, system, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110990403A true CN110990403A (en) | 2020-04-10 |
Family
ID=70087188
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911175270.5A Pending CN110990403A (en) | 2019-11-26 | 2019-11-26 | Business data storage method, system, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110990403A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131211A (en) * | 2020-09-15 | 2020-12-25 | 贝壳技术有限公司 | Method, device and storage medium for clearing redundant service data |
CN112214662A (en) * | 2020-10-12 | 2021-01-12 | 深圳壹账通智能科技有限公司 | Service relationship query method and device, electronic equipment and storage medium |
CN112328688A (en) * | 2020-11-09 | 2021-02-05 | 广州虎牙科技有限公司 | Data storage method and device, computer equipment and storage medium |
CN112817967A (en) * | 2020-12-30 | 2021-05-18 | 北京天融信网络安全技术有限公司 | Flow data storage method and device, electronic equipment and storage medium |
CN113722548A (en) * | 2021-08-30 | 2021-11-30 | 北京天空卫士网络安全技术有限公司 | Method and device for processing reference relationship in business system |
CN114936040A (en) * | 2022-05-31 | 2022-08-23 | 北京达佳互联信息技术有限公司 | Program data processing method, program data processing device, electronic device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1211612A2 (en) * | 2000-11-29 | 2002-06-05 | Hewlett-Packard Company (a Delaware corporation) | A data structure and storage and retrieval method supporting ordinality based searching and data retrieval |
CN104021223A (en) * | 2014-06-25 | 2014-09-03 | 国家电网公司 | Method and device for accessing survey point of cluster database |
CN104598517A (en) * | 2014-12-09 | 2015-05-06 | 北京网梯科技发展有限公司 | Storage and inquiry technology for tree structure table based on ordinary database |
CN110134681A (en) * | 2019-04-15 | 2019-08-16 | 平安科技(深圳)有限公司 | Data storage and querying method, device, computer equipment and storage medium |
-
2019
- 2019-11-26 CN CN201911175270.5A patent/CN110990403A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1211612A2 (en) * | 2000-11-29 | 2002-06-05 | Hewlett-Packard Company (a Delaware corporation) | A data structure and storage and retrieval method supporting ordinality based searching and data retrieval |
CN104021223A (en) * | 2014-06-25 | 2014-09-03 | 国家电网公司 | Method and device for accessing survey point of cluster database |
CN104598517A (en) * | 2014-12-09 | 2015-05-06 | 北京网梯科技发展有限公司 | Storage and inquiry technology for tree structure table based on ordinary database |
CN110134681A (en) * | 2019-04-15 | 2019-08-16 | 平安科技(深圳)有限公司 | Data storage and querying method, device, computer equipment and storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131211A (en) * | 2020-09-15 | 2020-12-25 | 贝壳技术有限公司 | Method, device and storage medium for clearing redundant service data |
CN112214662A (en) * | 2020-10-12 | 2021-01-12 | 深圳壹账通智能科技有限公司 | Service relationship query method and device, electronic equipment and storage medium |
CN112328688A (en) * | 2020-11-09 | 2021-02-05 | 广州虎牙科技有限公司 | Data storage method and device, computer equipment and storage medium |
CN112328688B (en) * | 2020-11-09 | 2023-10-13 | 广州虎牙科技有限公司 | Data storage method, device, computer equipment and storage medium |
CN112817967A (en) * | 2020-12-30 | 2021-05-18 | 北京天融信网络安全技术有限公司 | Flow data storage method and device, electronic equipment and storage medium |
CN112817967B (en) * | 2020-12-30 | 2023-09-29 | 北京天融信网络安全技术有限公司 | Flow data storage method and device, electronic equipment and storage medium |
CN113722548A (en) * | 2021-08-30 | 2021-11-30 | 北京天空卫士网络安全技术有限公司 | Method and device for processing reference relationship in business system |
CN114936040A (en) * | 2022-05-31 | 2022-08-23 | 北京达佳互联信息技术有限公司 | Program data processing method, program data processing device, electronic device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110990403A (en) | Business data storage method, system, computer equipment and storage medium | |
CN107958016B (en) | Function page customization method and application server | |
US7953766B2 (en) | Generation of attribute listings for unique identification of data subsets | |
US8751216B2 (en) | Table merging with row data reduction | |
US9870382B2 (en) | Data encoding and corresponding data structure | |
US10599395B1 (en) | Dynamically merging database tables | |
CN113791586A (en) | Novel industrial APP and identification registration analysis integration method | |
WO2007060092A1 (en) | Generation of a categorisation scheme | |
CN114253939A (en) | Data model construction method and device, electronic equipment and storage medium | |
CN109636303B (en) | Storage method and system for semi-automatically extracting and structuring document information | |
CN110704432A (en) | Data index establishing method and device, readable storage medium and electronic equipment | |
CN110737432A (en) | script aided design method and device based on root list | |
CN111444368B (en) | Method and device for constructing user portrait, computer equipment and storage medium | |
CN112784113A (en) | Data processing method and device, computer readable storage medium and electronic equipment | |
CN110928928A (en) | Data statistics method and device for investment subject, electronic equipment and storage medium | |
CN112258244B (en) | Method, device, equipment and storage medium for determining task to which target object belongs | |
CN111198879A (en) | Intelligent community-based business data storage method and system | |
CN113761102A (en) | Data processing method, device, server, system and storage medium | |
CN112015916A (en) | Completion method and device of knowledge graph, server and computer storage medium | |
JP2017010376A (en) | Mart-less verification support system and mart-less verification support method | |
US10387466B1 (en) | Window queries for large unstructured data sets | |
US9208224B2 (en) | Business content hierarchy | |
US11551464B2 (en) | Line based matching of documents | |
CN113434505B (en) | Transaction information attribute retrieval method, device, computer equipment and storage medium | |
US20230067956A1 (en) | Multiple product identification assistance in an electronic marketplace application |
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 |