Method and device for ordering tree structure nodes, and enquiry system

A technology of tree structure and sorting method, applied in the field of data structure, can solve problems such as difficulty in expansion and affecting database performance, and achieve the effect of stable performance and enhanced practicability

Active Publication Date: 2012-12-26
KINGDEE SOFTWARE(CHINA) CO LTD
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present invention provides a method for sorting tree structure nodes, aiming to solve the existing problems of affecting database performance and difficult expansion in the existing tree structure sorting

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
  • Method and device for ordering tree structure nodes, and enquiry system
  • Method and device for ordering tree structure nodes, and enquiry system
  • Method and device for ordering tree structure nodes, and enquiry system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 1 The flowchart of the tree structure construction method provided by the first embodiment of the present invention is shown, and the details are as follows:

[0037] In step S11, the node data of all the nodes forming the tree are obtained, the node data includes the number of layers of the tree structure where the node is located, the number of the parent node of the node, and the number of child nodes of the node.

[0038] Obtain the node data of all nodes that make up the tree, assuming that the tree structure has 3 layers, such as figure 2 shown. The nodes on the first layer are first-level nodes, including A nodes, B nodes and C nodes, the second-level nodes are second-level nodes, and the second-level nodes are A1 nodes, A2 nodes, B1 nodes and B2 nodes. The nodes of the layer are A11 node, A12 node, A21 node, and A22 node. The creation time of the above-mentioned nodes is later in order, and the A node is created the earliest, and the A22 node is create...

Embodiment 2

[0058] image 3 The flowchart of the method for sorting tree structure nodes provided by the second embodiment of the present invention is shown, and the details are as follows:

[0059] On the basis of Embodiment 1, the user can ensure that the nodes obtained by each query are unique according to the sorted nodes in the list.

[0060] Wherein, step S31 to step S34 are the same as step S11 to step S14 in the first embodiment.

[0061] In step S35, the node data and the unique identifier of the node are queried.

[0062] In this embodiment, the node data of the tree stored in the query list and the unique identifiers of the nodes composing the tree are searched. For example, query the layer number of a node, the creation time of the node, etc.

[0063] In step S36, a tree is constructed according to the node data and the unique identifier of the node.

[0064] Among them, the process of constructing the tree is: first construct the first layer of the tree according to the u...

Embodiment 3

[0070] Figure 4 The structure of the device for sorting tree structure nodes provided by the third embodiment of the present invention is shown, and for the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0071] The sorting device of the tree structure nodes can be used for various information processing terminals connected to servers through wired or wireless networks, such as mobile phones, pocket computers (Pocket Personal Computer, PPC), palmtop computers, computers, notebook computers, personal digital assistants (Personal Digital Assistant, PDA), etc., can be a software unit, a hardware unit, or a combination of software and hardware running in these terminals, or can be integrated into these terminals as an independent pendant or run in the application system of these terminals ,in:

[0072] The node data obtaining unit 41 is used to obtain the node data of all the nodes that make up the tree, the node data in...

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 is suitable for the field of a data structure, and provides a method and a device for ordering tree structure nodes, and an enquiry system. The method comprises the following steps of: obtaining node data of all nodes of forming a tree, wherein the node data comprise layers of tree structures on which the nodes are, a father node of the nodes, and quantity of sub-nodes of the nodes; carrying out unique identification on all nodes of forming the tree, wherein the identification is used for unique identification of all the nodes of forming the tree; ordering all the nodes of the tree according to the node data and unique identification of the nodes, and storing the node data and the identification of the nodes. According to the embodiment of the invention, all the nodes can be ordered at correct positions by a traversal operation of table data, therefore, stability of a performance of a database is ensured; free expansion of a multi-level tree structure can be supported under the situation of not increasing expenses, and practicability is enhanced.

Description

technical field [0001] The invention belongs to the field of data structures, and in particular relates to a tree structure node sorting method, device and query system. Background technique [0002] A tree structure refers to a data set in a database and a relationship that exists on that set. Each element in the collection is called a node of the tree, and the relationship between each node on the collection is called a parent-child relationship, which establishes a hierarchical structure between the nodes of the tree. The set usually contains multiple tree structures, and the first-level nodes in the set correspond to the root node of the tree. There is no direct relationship between different first-level nodes, only a certain arrangement order. [0003] In the existing process of building a tree-like structure sorting, firstly, starting from each first-level node, the sub-node records of all levels below it are traversed by recursive query, and then the corresponding su...

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 Applications(China)
IPC IPC(8): G06F17/30
Inventor 黄庆林
Owner KINGDEE SOFTWARE(CHINA) CO LTD
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