A general tree structure storage and parsing method

A technology of storage analysis and tree structure, which is applied in the field of general tree structure storage analysis, can solve problems such as complex logic, unintuitive tree structure, complex storage code, etc., and achieves strong operability and simple and easy-to-use implementation Effect

Active Publication Date: 2021-05-28
成都优易数据有限公司
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0023] In view of the above-mentioned prior art, the purpose of the present invention is to provide a general tree structure storage and analysis method, which solves the problems of huge calculation, complex storage code and complex logic in the prior art due to the use of recursive method to analyze tree structure data. Technical problems such as the tree structure of the data is not intuitive enough

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A general tree structure storage and parsing method
  • A general tree structure storage and parsing method
  • A general tree structure storage and parsing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0064] The table structure of the present invention is designed as {id, name, treeCode}. First put figure 1 The data in is organized, and the storage format is shown in Table 3.

[0065]

[0066] Table 3 tree coding stores part of the regional information

[0067] In this table structure, the process of CRUD is as follows:

[0068] To add a node, to add a new node in the table, such as Xindu District under Chengdu City, Sichuan Province, you only need to observe the maximum number of the child node under Chengdu City. The maximum number in Table 3 is Jinniu District 020105, so code the Xindu District tree as 020106. Execute the insert statement as follows:

[0069] INSERT INTO tree(name,treeCode)VALUES('Xindu District','020106').

[0070] The data after insertion is Table 4, and the relationship between the data is automatically formed after the data is inserted through the tree coding method, and the newly inserted data has no effect on other data.

[0071]

[007...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a general tree structure storage and analysis method. The invention relates to the field of computer applications and solves the problems of huge calculation, complicated storage code, complex logic and data analysis caused by using a recursive method to analyze tree structure data in the prior art. The tree structure is not intuitive enough and other technical problems. It mainly includes cyclically traversing the data list generated by hierarchical associated data through temporary variables, reading the root data of the data list, using the characteristics of the tree nodes in the data list, and combining the temporary data set to construct the threshold condition, and incrementing the tree nodes that meet the threshold condition in order Set the tree code, and then store the tree code corresponding to the current tree node in the data list into the temporary data set. At the end of the loop, a complete tree-shaped temporary data set relative to the data list is obtained; the corresponding root data searches the temporary data set to obtain a tree-shaped The root tree node and all subtree nodes of the structure. The invention has the characteristics of simple and easy to use, maintainability and strong operability.

Description

technical field [0001] The invention relates to the field of computer applications, in particular to a general tree structure storage analysis method. Background technique [0002] In the field of application software, a tree structure is often used to represent the relationship of some data, such as the upper and lower departments of the enterprise, product classification, regional information, navigation column structure information, role authority information, resource relationship information, etc. The storage, analysis, and maintenance of these data are very complex. [0003] At present, the storage of tree structure data is mainly based on database storage. There are mainly two implementation methods. [0004] The first implementation method adopts the method of parent node id association to store the tree structure. [0005] Data based on tree structure figure 1 (Take part of the regional information as an example): [0006] This way of storing the tree structure...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/22
CPCG06F16/2246G06F16/2282
Inventor 傅玉生杨毅
Owner 成都优易数据有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products