CN107679049A - Obtain the method, apparatus and system of the hop of tree structure data two - Google Patents
Obtain the method, apparatus and system of the hop of tree structure data two Download PDFInfo
- Publication number
- CN107679049A CN107679049A CN201610625915.0A CN201610625915A CN107679049A CN 107679049 A CN107679049 A CN 107679049A CN 201610625915 A CN201610625915 A CN 201610625915A CN 107679049 A CN107679049 A CN 107679049A
- Authority
- CN
- China
- Prior art keywords
- node
- father
- root
- mark
- section point
- 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
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
Abstract
A kind of method, apparatus and system for obtaining the hop of tree structure data two of disclosure.This method includes:According to the nodal information digitization table of the tree structure data stored, search respectively and obtain first node to be calculated and the father node of section point is to root node set;And according to the first node of acquisition and the father node of section point to root node set, it is determined that and obtaining the path between first node and section point;Wherein, nodal information digitization table includes:The father node of the identifying of each node, the mark of the father node of each node and each node to root node set;The mark of each node is used for the node described in unique mark in tree structure data.This method can save the occupancy of system resource, and lifting system is ageing.
Description
Technical field
The present invention relates to Computer Applied Technology field, and the node of tree structure data two is obtained in particular to one kind
Between path method, apparatus and system.
Background technology
Workflow much based on tree structure data design, tree form distribution formula system, Enterprise organization system etc. at present,
It is determined that when approval process, data transfer path and common superior relation etc., often it is required for calculating the road between any two node
Footpath.
In the prior art, the node of generally use dynamic calculation two arrives the method in root node (root) path to determine two respectively
Path between node.For example, by taking the tree structure data shown in Fig. 1 as an example, when wanting the path between calculate node A and node B,
The first step, the respective father node AP1 and BP1 of node A and node B are searched respectively, then search father node AP1 and BP1 father respectively
Node AP2 and BP2, by that analogy, iterative search is untill father node is root node, now root=APm=BPn, and root
According to lookup result respectively obtain the respective path relation set of arrays of node A and node B be combined into [A, AP1, AP2 ...,
APx ... ..., APm] and [B, BP1, BP2 ... ..., BPy ... ..., BPn], wherein APm=BPn=root;Second step, inquiry
The identical father node K occurred for the first time in two set, for example, K=APx=BPy, it is hereby achieved that node A and node B
Between path for [A, AP1, AP2 ..., K (i.e. APx or BPy) ..., BP2, BP1, B].
The above method is required for calculating two nodes respectively and each arrives root when needing to calculate two hops each time
The set of paths of node.But with two nodes to the increase of the number of nodes between root node, the number of required iterative cycles
Also more, linear to increase, time complexity is O (m) or O (n).Particularly the operation would generally be related to database manipulation,
The database manipulation that time complexity to be carried out is O (m) or O (n) is also implied that, system thus will be caused to take resource and increased
Add, systematic function reduce, the time increase the problems such as, in some instances it may even be possible to can bring internal memory overflow risk.
In addition, the path relation array set to having calculated, in order to find identical father node K, it is necessary to by this two
Individual array set carries out nested recycle ratio pair, and so as to calculate the crosspoint in two paths, its time complexity is O (m*n), therefore
The problems such as systematic function may also being brought to reduce.
Above- mentioned information is only used for strengthening the understanding of the background to the present invention, therefore it disclosed in the background section
It can include not forming the information to prior art known to persons of ordinary skill in the art.
The content of the invention
In view of this, the present invention provides a kind of method, apparatus and system for obtaining the hop of tree structure data two,
The occupancy of system resource can be saved, lifting system is ageing.
Other characteristics and advantage of the present invention will be apparent from by following detailed description, or partially by the present invention
Practice and acquistion.
According to an aspect of the present invention, there is provided a kind of method for obtaining the hop of tree structure data two, including:Root
According to the nodal information digitization table of the tree structure data stored, search respectively and obtain first node to be calculated and second
The father node of node is to root node set;And according to the first node of acquisition and the father node of section point to root node collection
Close, it is determined that and obtaining the path between first node and section point;Wherein, nodal information digitization table includes:Each node
The set of mark, the mark of father node of each node and the father node of each node to root node;The mark of each node is used
In node described in the unique mark in tree structure data.
According to an embodiment of the present invention, the above method also includes:Establish and store the node letter of tree structure data
Cease digitization table.
According to an embodiment of the present invention, identify with numeral and/or string representation, according to the first node of acquisition and
The father node of section point is to root node set, it is determined that and obtaining the path between first node and section point and including:When first
When the father node of node includes father node to the root node set of section point to root node set, from the father node of first node
The father node of section point is removed into root node set to root node set, obtains the first intermediate result set;In first
Between results set it is last, increase the father node of first node to the father node of root node set and section point to root node set
The first crossover node, and with separator interval, obtain the second intermediate result set;And before the second intermediate result set
Afterwards, increase the mark of first node and the mark of section point respectively, and respectively with separator interval, with obtain first node and
Path between section point.
According to an embodiment of the present invention, identify with numeral and/or string representation, according to the first node of acquisition and
The father node of section point is to root node set, it is determined that and obtaining the path between first node and section point and including:When second
When the father node of node includes father node to the root node set of first node to root node set, from the father node of section point
The father node of first node is removed into root node set to root node set, obtains the first intermediate result set;In first
Between results set it is last, increase the father node of first node to the father node of root node set and section point to root node set
The first crossover node, and with separator interval, obtain the second intermediate result set;Second intermediate result set is carried out reverse
Reversion, obtains the 3rd intermediate result set;And before and after the 3rd intermediate result set, respectively increase first node mark and
The mark of section point, and respectively with separator interval, to obtain the path between first node and section point.
According to an embodiment of the present invention, identify with numeral and/or string representation, according to the first node of acquisition and
The father node of section point is to root node set, it is determined that and obtaining the path between first node and section point and including:When first
When the father node of node to the father node of root node set and section point to root node set does not include mutually, first node is obtained
Father node to the father node of root node set and section point into root node set same node point identify set;From first
The father node of node removes the set of same node point mark to root node set, obtains the first intermediate result set;In first
Between results set it is last, increase the father node of first node to the father node of root node set and section point to root node set
The first crossover node, and with separator interval, obtain the second intermediate result set;From the father node of section point to root node
Set removes the set of same node point mark, obtains the 3rd intermediate result set;3rd intermediate result set is carried out reverse anti-
Turn, obtain the 4th intermediate result set;It is last in the second intermediate result set, increase by the 4th intermediate result set, and to separate
Symbol interval, obtains the 5th intermediate result set;And before and after the 5th intermediate result set, increase the mark of first node respectively
With the mark of section point, and respectively with separator interval, to obtain the path between first node and section point.
According to an embodiment of the present invention, the above method also includes:, will be new when the node increase of tree structure data
Mark, the mark of father node and father node to the root node set of increase node increase to the nodal information number of tree structure data
According in change table;When the node of tree structure data is deleted, by the mark of deleted node, the mark of father node and father node
Deleted to root node set from the nodal information digitization table of tree structure data;And the node quilt when tree structure data
During renewal, if being updated the mark of node, the mark of father node and father node at least one hair of root node set
Changing, then accordingly update the nodal information digitization table of tree structure data;After being updated successfully, whether judgement is updated node
There is child node, when being updated node and having child node, traversal renewal is updated the child node of node.
According to another aspect of the present invention, there is provided a kind of device for obtaining the hop of tree structure data two, bag
Include:Node set searching modul, for the nodal information digitization table according to the tree structure data stored, search respectively simultaneously
The father node of first node to be calculated and section point is obtained to root node set;And path acquisition module, for basis
The first node of acquisition and the father node of section point are to root node set, it is determined that and obtaining between first node and section point
Path;Wherein, nodal information digitization table includes:The identifying of each node, the mark of the father node of each node and each section
Point father node to root node set;The mark of each node is used for the node described in unique mark in tree structure data.
According to an embodiment of the present invention, said apparatus also includes:Digitization table establishes module, for establishing and storing
The nodal information digitization table of tree structure data.
According to an embodiment of the present invention, identify is included with numeral and/or string representation, path acquisition module:The
One submodule, the father node of section point is included to root node set for father node to the root node set when first node
When, it is determined that and obtain the path between first node and section point, including:First subelement, for father's section from first node
Point removes the father node of section point into root node set to root node set, obtains the first intermediate result set;Second son
Unit, for last in the first intermediate result set, increase the father node of first node to root node set and section point
Father node and with separator interval, obtains the second intermediate result set to the first crossover node of root node set;And the 3rd
Subelement, for before and after the second intermediate result set, increasing the mark of first node and the mark of section point respectively, and divide
Not with separator interval, to obtain the path between first node and section point.
According to an embodiment of the present invention, identify is included with numeral and/or string representation, path acquisition module:The
Two submodules, the father node of first node is included to root node set for father node to the root node set when section point
When, it is determined that and obtain the path between first node and section point, including:First subelement, for father's section from section point
Point removes the father node of first node into root node set to root node set, obtains the first intermediate result set;Second son
Unit, for last in the first intermediate result set, increase the father node of first node to root node set and section point
Father node and with separator interval, obtains the second intermediate result set to the first crossover node of root node set;3rd son is single
Member, for the second intermediate result set inversely to be inverted, obtain the 3rd intermediate result set;And the 4th subelement, use
In before and after the 3rd intermediate result set, increase the mark of first node and the mark of section point respectively, and respectively to separate
Symbol interval, to obtain the path between first node and section point.
According to an embodiment of the present invention, identify is included with numeral and/or string representation, path acquisition module:The
Three submodules, it is mutual not to the father node of root node set and section point to root node set for the father node when first node
Comprising when, it is determined that and obtain the path between first node and section point, including:First subelement, for obtaining first node
Father node to the father node of root node set and section point into root node set same node point identify set;Second son
Unit, the set of same node point mark is removed for the father node from first node to root node set, obtain tying among first
Fruit set;3rd subelement, for last in the first intermediate result set, increase the father node of first node to root node set
With the first crossover node of the father node of section point to root node set, and with separator interval, the second intermediate result is obtained
Set;4th subelement, the set of same node point mark is removed for the father node from section point to root node set, is obtained
3rd intermediate result set;5th subelement, for the 3rd intermediate result set inversely to be inverted, obtain tying among the 4th
Fruit set;6th subelement, for last in the second intermediate result set, the 4th intermediate result set of increase, and with separator
Interval, obtains the 5th intermediate result set;And the 7th subelement, before and after the 5th intermediate result set, increase by first respectively
The mark of node and the mark of section point, and respectively with separator interval, to obtain the road between first node and section point
Footpath.
According to an embodiment of the present invention, said apparatus also includes:Digitization table update module, for working as tree structure
When the node of data changes, the nodal information digitization table of tree structure data is updated, including:Node increases submodule,
For when the node increase of tree structure data, the mark of node, the mark of father node and father node will to be newly increased to root section
Point set increases in the nodal information digitization table of tree structure data;Knot removal submodule, for when tree structure number
According to node be deleted when, by the mark of deleted node, the mark of father node and father node to root node set from tree-like knot
Deleted in the nodal information digitization table of structure data;And node updates submodule, for when the node quilt of tree structure data
During renewal, if being updated the mark of node, the mark of father node and father node at least one hair of root node set
Changing, then accordingly update the nodal information digitization table of tree structure data;After being updated successfully, whether judgement is updated node
There is child node, when being updated node and having child node, traversal renewal is updated the child node of node.
According to a further aspect of the invention, there is provided a kind of system for obtaining the hop of tree structure data two, bag
Include:Processor;And memory, for storing the executable instruction of processor;Wherein processor is configured to hold via execution
Row is instructed to perform following operation:According to the nodal information digitization table of the tree structure data stored, search and obtain respectively
The father node of first node to be calculated and section point is taken to root node set;And according to the first node of acquisition and second
The father node of node is to root node set, it is determined that and obtaining the path between first node and section point;Wherein, nodal information number
Include according to change table:The father node of the identifying of each node, the mark of the father node of each node and each node is to root node
Set;The mark of each node is used for the node described in unique mark in tree structure data.
According to the method for the acquisition hop of tree structure data two of the present invention, tree structure is stored by static
The nodal information digitization table of data, avoid Dynamic iterations when calculating two hops every time and calculate two nodes to root node
The operation of set of paths, the purpose quickly calculated is can reach, and the occupancy of system resource can be saved, lifting system is ageing.
In addition, according to some embodiments, the method for the acquisition hop of tree structure data two of the invention, further
Ground, when comparing father node to the root node set of two nodes, by the way that character string is identical, the characteristic such as different, to the father of two nodes
Node to root node set is intercepted, spliced, and further improves the convenience of path computing with ageing, and the realization
Mode is also relatively simple.
According to other embodiments, the method for the acquisition hop of tree structure data two of the invention, further carry
The method for having supplied to manage tree structure data node, when when there is node to change, such as increasing newly, delete or updating, how accordingly
The nodal information digitization table of the tree structure data stored is updated, so as to when calculating two hops, there is provided static
Nodal stored information.
It should be appreciated that the general description and following detailed description of the above are only exemplary, this can not be limited
Invention.
Brief description of the drawings
Its example embodiment is described in detail by referring to accompanying drawing, above and other target of the invention, feature and advantage will
Become more fully apparent.
Fig. 1 is a kind of method of hop of acquisition tree structure data two according to an illustrative embodiments
Flow chart.
Fig. 2 is the tree structure data schematic diagram according to an example.
Fig. 3 is another side for obtaining the hop of tree structure data two according to an illustrative embodiments
The flow chart of method.
Fig. 4 is the side of another acquisition hop of tree structure data two according to an illustrative embodiments
The flow chart of method.
Fig. 5 is the schematic diagram of the node change of the tree structure data according to an example.
Fig. 6 is a kind of device of hop of acquisition tree structure data two according to an illustrative embodiments
Block diagram.
Fig. 7 is another dress for obtaining the hop of tree structure data two according to an illustrative embodiments
The block diagram put.
Fig. 8 is another dress for obtaining the hop of tree structure data two according to an illustrative embodiments
The block diagram put.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, these embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Accompanying drawing is only the present invention
Schematic illustrations, be not necessarily drawn to scale.Identical reference represents same or similar part in figure, thus
Repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be integrated into one or more implementations in any suitable manner
In mode.In the following description, there is provided many details fully understand so as to provide to embodiments of the present invention.So
And it will be appreciated by persons skilled in the art that technical scheme can be put into practice and omit one in the specific detail
Or more, or other methods, constituent element, device, step etc. can be used.In other cases, it is not shown in detail or describes
Known features, method, apparatus, realization or operation are to avoid that a presumptuous guest usurps the role of the host and so that each aspect of the present invention thickens.
Fig. 1 is a kind of method of hop of acquisition tree structure data two according to an illustrative embodiments
Flow chart.As shown in figure 1, this method 10 includes:
In step s 102, according to the nodal information digitization table of the tree structure data stored, search respectively simultaneously
The father nodes of two nodes to be calculated is obtained to root node set.
For a tree structure data, its nodal information digitization table includes:The mark ID of each node, each node
Father node mark parentId, the father node of each node are to root node set parentIds.In addition, the nodal information data
The title nodeName of node can also be included by changing table, such as mark the entitled root of root node.
The mark ID of wherein each node can be expressed as numeral and/or character etc., as long as ensureing it in the tree structure
Uniqueness in data.The father node mark parentID of each node is the mark ID of the father node of the node.Each
The father node of node is identified to the set of root node mark, collection to father nodes of the root node set parentIds including the node
Conjunction order for father node->The father node of the father node->……->Root node, with separator interval between each node ID, such as ", "
Or can also be ";" etc., as long as ensureing stored separator and subsequently parsing the separator definition used unanimously.Separately
Outside, one and only one root node object of each tree structure data.
Fig. 2 is the tree structure data schematic diagram according to an example, and its corresponding nodal information digitization table is such as
Shown in table 1, for simplicity, the mark of its interior joint is for example numerically.
Table 1
ID | parentId | parentIds | nodeName |
0 | null | null | root |
1 | 0 | 0 | |
2 | 0 | 0 | |
3 | 0 | 0 | |
4 | 1 | 1,0 | |
5 | 1 | 1,0 | |
6 | 2 | 2,0 | |
7 | 4 | 4,1,0 | |
8 | 5 | 5,1,0 | |
9 | 6 | 6,2,0 | |
10 | 7 | 7,4,1,0 | |
11 | 9 | 9,6,2,0 | |
12 | 10 | 10,7,4,1,0 |
In step S104, according to the father node of two nodes to be calculated of acquisition to root node set, it is determined that and obtaining
Two hop.
Assuming that the ID of two nodes to be calculated is respectively A and B, the node A and B of acquisition father node to root node set divide
Wei not parentIdsA and parentIdsB.Tree structure data in the present invention for needing to illustrate is not limited by its source
System, can also be obtained from any type of data library inquiry, such as relational data, NoSql databases.
Node A and B father node is obtained again to after root node set parentIdsA and parentIdsB, is compared
ParentIdsA and parentIdsB, to calculate the path between two node A and B.
The method of the acquisition hop of tree structure data two of embodiment of the present invention, is stored tree-like by static
The nodal information digitization table of structured data, avoid Dynamic iterations when calculating two hops every time and calculate two nodes to root
The operation of node path set, the purpose quickly calculated is can reach, and the occupancy of system resource can be saved, lifting system timeliness
Property.
It will be clearly understood that the present disclosure describe how formation and using particular example, but the principle of the present invention is not limited to
Any details of these examples.On the contrary, the teaching based on present disclosure, these principles can be applied to many other
Embodiment.
Fig. 3 is another side for obtaining the hop of tree structure data two according to an illustrative embodiments
The flow chart of method.As shown in figure 3, this method 20 includes:
In step 202, establish and store the nodal information digitization table of tree structure data.
The nodal information digitization table of tree structure data is hereinbefore illustrated in detail, will not be repeated here.
In step S204, according to the nodal information digitization table of the tree structure data stored, search respectively simultaneously
The father nodes of two nodes to be calculated is obtained to root node set.
The step is identical with the step 102 in computational methods 10, will not be repeated here.
In step S206, according to the father node of two nodes to be calculated of acquisition to root node set, it is determined that and obtaining
Two hop.
Assuming that the ID of two nodes to be calculated is respectively A and B, the node A and B of acquisition father node to root node set divide
Wei not parentIdsA and parentIdsB.Tree structure data in the present invention for needing to illustrate is not limited by its source
System, can also be obtained from any type of data library inquiry, such as relational data, NoSql databases.
Node A and B father node is obtained again to after root node set parentIdsA and parentIdsB, is compared
ParentIdsA and parentIdsB, to calculate the path between two node A and B.
When comparing parentIdsA and parentIdsB, three kinds of situations can be divided to be handled:
1.parentIdsA includes parentIdsB
When parentIdsA includes parentIdsB, it may be determined that node A is node B subordinate's Hierarchy nodes.First
ParentIdB is removed from parentIdsA, then in the set after removing parentIdB plus parentIdsA and
ParentIdsB the first crossover node, i.e. first identical node, are finally adding the set of first crossover node
It is front and rear respectively plus node A and node B ID after, you can obtain two node A and B between path.
With parentIdsA=' 44,33,22,11, exemplified by 0 ', parentIdsB=' 22,11,0 ':
The first step, parentIdB is removed from parentIdsA, then the intermediate result obtained is ' 44,33 ', the operation
Such as it can be realized by the StringUtils.remove functions in apache.commons kits;
Second step, parentIdsA and parentIdsB the first crossover node is finally added in the intermediate result of previous step
' 22 ', and be ", " with separator interval, such as blank character, obtain the intermediate result ' 44,33,22 ' of this step;
3rd step, add node A and node B ID respectively before and after the intermediate result of previous step, and with separator interval,
If blank character is ", ", obtain between two node A and B path ' A, 44,33,22, B '.
2.parentIdsB includes parentIdsA
When parentIdsB includes parentIdsA, it may be determined that node B is node A subordinate's Hierarchy nodes.First
ParentIdA is removed from parentIdsB, then the set after parentIdA is removed finally plus parentIdsA and
ParentIdsB the first crossover node, i.e. first identical node, then the set for adding first crossover node is entered
The reverse reversion of row, after finally adding node A and node B ID respectively before and after the set after having carried out reverse reversion, you can
Obtain the path between two node A and B.
With parentIdsA=' 22,11, exemplified by 0 ', parentIdsB=' 44,33,22,11,0 ':
The first step, parentIdA is removed from parentIdsB, then the intermediate result obtained is ' 44,33 ', the operation
Such as it can be realized by the StringUtils.remove functions in apache.commons kits;
Second step, parentIdsA and parentIdsB the first crossover node is finally added in the intermediate result of previous step
' 22 ', and be ", " with separator interval, such as blank character, obtain the intermediate result ' 44,33,22 ' of this step;
3rd step, the intermediate result of previous step is inversely inverted, obtain the intermediate result ' 22,33,44 ' of this step, should
Operation can for example be realized by the StringUtils.reverseDelimited functions in apache.commons kits;
4th step, add node A and node B ID respectively before and after the intermediate result of previous step, and with separator interval,
If blank character is ", ", obtain between two node A and B path ' A, 22,33,44, B '.
3.parentIdsA and parentIdsB do not include mutually
The set of same node point ID in parentIdsA and parentIdsB is obtained, the phase is first removed from parentIdsA
With the set of node ID, then plus the of parentIdsA and parentIdsB in the set for removing same node point ID
One crossover node, i.e. first identical node, remove same node point ID set from parentIdsB again afterwards, then will
The set for removing same node point ID is inversely inverted, and before the set carried out after reverse reversion is increased to
After increasing the set after first crossover node, after the ID for finally adding node A and node B respectively before and after it, you can obtain
Obtain the path between two node A and B.
With parentIdsA=' 66,55,22,11, exemplified by 0 ', parentIdsB=' 44,33,22,11,0 ':
The first step, obtain the set ' 22,11,0 ' of same node point ID in parentIdsA and parentIdsB;
Second step, same node point ID set ' 22,11,0 ' is removed from parentIdsA, obtains ' 66,55 ', the behaviour
Make for example realize by the StringUtils.remove functions in apache.commons kits;
3rd step, parentIdsA and parentIdsB the first crossover node is finally added in the intermediate result of previous step
' 22 ', and be ", " with separator interval, such as blank character, obtain the intermediate result ' 66,55,22 ' of this step;
4th step, same node point ID set ' 22,11,0 ' is removed from parentIdsB, obtain the middle knot of this step
Fruit ' 44,33 ', the operation for example can be real by the StringUtils.remove functions in apache.commons kits
It is existing;
5th step, the intermediate result of previous step is subjected to reverse reverse turn operation, obtains the intermediate result ' 33,44 ' of this step,
The operation for example can be real by the StringUtils.reverseDelimited functions in apache.commons kits
It is existing;
6th step, after the intermediate result of the 3rd step, plus the intermediate result of the 5th step, and with separator interval, obtain
The intermediate result ' 66,55,22,33,44 ' of this step;
7th step, add node A and node B ID respectively before and after the intermediate result of previous step, and with separator interval,
If blank character is ", ", obtain between two node A and B path ' A, 66,55,22,33,44, B '.
The method of the acquisition hop of tree structure data two of embodiment of the present invention, further, comparing two
During the father node of node to root node set, by the way that character string is identical, the characteristic such as different, to the father node of two nodes to root node
Set is intercepted, spliced, and further improves the convenience of path computing with ageing, and the implementation is also more simple
It is single.
Fig. 4 is the side of another acquisition hop of tree structure data two according to an illustrative embodiments
The flow chart of method.When the node that this method is applied to tree structure data changes, such as node increase, renewal, delete, such as
What updates the nodal information digitization table of the tree structure data.As shown in figure 4, this method 30 includes:
In step s 302, when the node increase of tree structure data, the base attribute information that this is increased newly to node is remembered
Record in nodal information digitization table.
Fig. 5 is the schematic diagram of the node change of the tree structure data according to an example.As shown in fig. 5, it is assumed that increase
The node ID added is 13, and his father's node ID is 12, determines that its father node to root node collection is combined into ' 12,10,7,4,1,0 ', then saves
Point information data table is updated to:
Table 2
In step s 304, when the node of tree structure data is deleted, the base attribute that this is deleted to node is believed
Breath is deleted from nodal information digitization table.
Exemplified by being deleted such as the node 8 in Fig. 5, then the base attribute of corresponding deletion of node information data table interior joint 8
Information, then nodal information digitization table be updated to:
Table 3
ID | parentId | parentIds | nodeName |
0 | null | null | root |
1 | 0 | 0 | |
2 | 0 | 0 | |
3 | 0 | 0 | |
4 | 1 | 1,0 | |
5 | 1 | 1,0 | |
6 | 2 | 2,0 | |
7 | 4 | 4,1,0 | |
9 | 6 | 6,2,0 | |
10 | 7 | 7,4,1,0 | |
11 | 9 | 9,6,2,0 | |
12 | 10 | 10,7,4,1,0 | |
13 | 12 | 12,10,7,4,1,0 |
In step S306, when the node of tree structure data is updated, the section in nodal information digitization table is updated
The father node mark and father node of point after being updated successfully, judge whether the node has child node, when the node to root node set
When having child node, the father node mark for updating each child node in nodal information digitization table and father node are traveled through to root node collection
Close.
Each child node carries out as above identical renewal operation.
So that the node 6 in Fig. 5 is updated as an example, its father node is updated to node 3 by node 2, then updates nodal information number
It is 3 according to his father's node identification parentId in table is changed, father node to root node collection is combined into ' 3,0 '.In addition, node 6 also has son
Node 9, renewal his father's node identification parentId is 2, and father node to root node collection is combined into ' 2,0 '.Child node 9 also has child node
11, father node to the root node collection of renewal child node 11 is combined into ' 9,2,0 '.
Nodal information digitization table after renewal is as follows:
Table 4
The method of the acquisition hop of tree structure data two of embodiment of the present invention, it is further provided management tree
The method of shape structured data node, when when there is node to change, such as increasing newly, delete or updating, how accordingly to update and stored
Tree structure data nodal information digitization table, so as to when calculating two hops, there is provided static node stores
Information.
It will be appreciated by those skilled in the art that realize that all or part of step of above-mentioned embodiment is implemented as being held by CPU
Capable computer program.When the computer program is performed by CPU, perform the above method provided by the invention limited it is above-mentioned
Function.Described program can be stored in a kind of computer-readable recording medium, and the storage medium can be read-only storage,
Disk or CD etc..
Further, it should be noted that above-mentioned accompanying drawing is only according to included by the method for exemplary embodiment of the invention
Processing schematically illustrates, rather than limitation purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not intended that or limits these
The time sequencing of processing.In addition, being also easy to understand, these processing can for example either synchronously or asynchronously be performed in multiple modules
's.
Following is apparatus of the present invention embodiment, can be used for performing the inventive method embodiment.It is real for apparatus of the present invention
The details not disclosed in example is applied, refer to the inventive method embodiment.
Fig. 6 is a kind of device of hop of acquisition tree structure data two according to an illustrative embodiments
Block diagram.As shown in fig. 6, the device 40 includes:Node set searching modul 402 and path acquisition module 404.
Wherein, node set searching modul 402 is used for the nodal information digitization according to the tree structure data stored
Table, search respectively and obtain first node to be calculated and the father node of section point is to root node set.
Wherein, nodal information digitization table includes:The identifying of each node, the mark of the father node of each node and each
The father node of node to root node set;The mark of each node is used in tree structure data section described in unique mark
Point.
Path acquisition module 404 is used for according to the first node of acquisition and the father node of section point to root node set,
It is determined that and obtain the path between first node and section point.
In certain embodiments, computing device 40 can also include:Digitization table establishes module 400, for establishing and depositing
Store up the nodal information digitization table of tree structure data.
The device of the acquisition hop of tree structure data two of embodiment of the present invention, is stored tree-like by static
The nodal information digitization table of structured data, avoid Dynamic iterations when calculating two hops every time and calculate two nodes to root
The operation of node path set, the purpose quickly calculated is can reach, and the occupancy of system resource can be saved, lifting system timeliness
Property.
Fig. 7 is another dress for obtaining the hop of tree structure data two according to an illustrative embodiments
The block diagram put.It is that the path acquisition module 504 of the device 50 shown in Fig. 7 includes with the difference of device 40 shown in Fig. 6:
First submodule 5042, the second submodule 5044 and the 3rd submodule 5046.
Wherein, the mark of each node is with numeral and/or string representation.
First submodule 5042 is used for when the father node of first node includes the father node of section point to root node set
To during root node set, it is determined that and obtain the path between first node and section point, including:First subelement 50422, second
The subelement 50426 of subelement 50424 and the 3rd.
First subelement 50422 is used for the father's section for removing section point into root node set from the father node of first node
Point obtains the first intermediate result set to root node set.
Second subelement 50424 is used for last in the first intermediate result set, increases the father node of first node to root section
The father node of point set and section point and with separator interval, is obtained in second to the first crossover node of root node set
Between results set.
3rd subelement 50426 is used for before and after the second intermediate result set, increases the mark and the of first node respectively
The mark of two nodes, and respectively with separator interval, to obtain the path between first node and section point.
Second submodule 5044 is used for when the father node of section point includes the father node of first node to root node set
To during root node set, it is determined that and obtain the path between first node and section point, including:First subelement 50442, second
Subelement 50444, the 3rd subelement 50446 and the 4th subelement 50448.
First subelement 50442 is used for the father's section for removing first node into root node set from the father node of section point
Point obtains the first intermediate result set to root node set.
Second subelement 50444 is used for last in the first intermediate result set, increases the father node of first node to root section
The father node of point set and section point and with separator interval, is obtained in second to the first crossover node of root node set
Between results set.
3rd subelement 50446 is used to inversely be inverted the second intermediate result set, obtains the 3rd intermediate result set
Close.
4th subelement 50448 is used for before and after the 3rd intermediate result set, increases the mark and the of first node respectively
The mark of two nodes, and respectively with separator interval, to obtain the path between first node and section point.
3rd submodule 5046 be used for when first node father node to the father node of root node set and section point extremely
Root node set mutually do not include when, it is determined that and obtain the path between first node and section point, including:First subelement
50462nd, the second subelement 50464, the 3rd subelement 50466, the 4th subelement 50468, of the 5th subelement the 50470, the 6th
The subelement 50474 of unit 50472 and the 7th.
First subelement 50462 is used to obtain the father node of first node to root node set and the father node of section point
The set that same node point identifies into root node set.
Second subelement 50464 is used for the collection that same node point mark is removed from the father node of first node to root node set
Close, obtain the first intermediate result set.
3rd subelement 50466 is used for last in the first intermediate result set, increases the father node of first node to root section
The father node of point set and section point and with separator interval, is obtained in second to the first crossover node of root node set
Between results set.
4th subelement 50468 is used for the collection that same node point mark is removed from the father node of section point to root node set
Close, obtain the 3rd intermediate result set.
5th subelement 50470 is used to inversely be inverted the 3rd intermediate result set, obtains the 4th intermediate result set
Close.
6th subelement 50472 is used for, increase by fourth intermediate result set last in the second intermediate result set, and to divide
It is spaced every symbol, obtains the 5th intermediate result set.
7th subelement 50474 increases the mark and the second section of first node respectively before and after the 5th intermediate result set
The mark of point, and respectively with separator interval, to obtain the path between first node and section point.
The device of the acquisition hop of tree structure data two of embodiment of the present invention, further, comparing two
During the father node of node to root node set, by the way that character string is identical, the characteristic such as different, to the father node of two nodes to root node
Set is intercepted, spliced, and further improves the convenience of path computing with ageing, and the implementation is also more simple
It is single.
Fig. 8 is another dress for obtaining the hop of tree structure data two according to an illustrative embodiments
The block diagram put.It is that the device 60 shown in Fig. 8 also includes with the difference of device 40 shown in Fig. 6:Digitization table update module
606。
For when the node of tree structure data changes, updating the nodal information digitization of tree structure data
Table, including:Node increase submodule 6062, knot removal submodule 6064 and node updates submodule 6066.
Node increase submodule 6062 be used for when the node increase of tree structure data, by newly increase node mark,
The mark of father node and father node to root node set increase in the nodal information digitization table of tree structure data.
Knot removal submodule 6064 is used for when the node of tree structure data is deleted, by the mark of deleted node
Know, deleted in the nodal information digitization table of the mark of father node and father node to root node set from tree structure data.
Node updates submodule 6066 is used for when the node of tree structure data is updated, if being updated the mark of node
Know, the mark of father node and father node to root node set at least one change, then corresponding renewal tree structure
The nodal information digitization table of data;After being updated successfully, judgement is updated whether node has child node, has son when being updated node
During node, traversal renewal is updated the child node of node.
The device of the acquisition hop of tree structure data two of embodiment of the present invention, it is further provided management tree
The method of shape structured data node, when when there is node to change, such as increasing newly, delete or updating, how accordingly to update and stored
Tree structure data nodal information digitization table, so as to when calculating two hops, there is provided static node stores
Information.
It should be noted that the block diagram shown in above-mentioned accompanying drawing is functional entity, not necessarily must with physically or logically
Independent entity is corresponding.These functional entitys can be realized using software form, or in one or more hardware modules or
These functional entitys are realized in integrated circuit, or are realized in heterogeneous networks and/or processor device and/or microcontroller device
These functional entitys.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can be realized by software, can also be realized by way of the necessary hardware of software assembly.Therefore, according to the present invention
The technical scheme of embodiment can be embodied in the form of software product, the software product can be stored in one it is non-volatile
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are to cause a calculating
Equipment (can be personal computer, server, mobile terminal or network equipment etc.) is performed according to embodiment of the present invention
Method.
The illustrative embodiments of the present invention are particularly shown and described above.It should be appreciated that the present invention is unlimited
In detailed construction described herein, set-up mode or implementation method;On the contrary, it is intended to cover included in appended claims
Spirit and scope in various modifications and equivalence setting.
Claims (13)
- A kind of 1. method for obtaining the hop of tree structure data two, it is characterised in that including:According to the nodal information digitization table of the tree structure data stored, search respectively and obtain first node to be calculated With the father node of section point to root node set;AndAccording to the father node of the first node of acquisition and the section point to root node set, it is determined that and obtaining described Path between one node and the section point;Wherein, the nodal information digitization table includes:The identifying of each node, the mark of the father node of each node and each The father node of node to root node set;The mark of each node is used for the unique mark in the tree structure data The node.
- 2. according to the method for claim 1, it is characterised in that also include:Establish and store the tree structure data Nodal information digitization table.
- 3. method according to claim 1 or 2, it is characterised in that the mark is with numeral and/or string representation, root According to the first node of acquisition and the father node of the section point to root node set, it is determined that and obtaining the first node Path between the section point includes:When father node to the root node set of the first node includes the section point Father node to root node set when,The father node of the section point is removed into root node set to root node set from the father node of the first node, Obtain the first intermediate result set;It is last in the first intermediate result set, increase the father node of the first node to root node set and described second The father node of node and with separator interval, obtains the second intermediate result set to the first crossover node of root node set;With AndBefore and after the second intermediate result set, increase the mark of the first node and the mark of the section point respectively Know, and respectively with separator interval, to obtain the path between the first node and the section point.
- 4. method according to claim 1 or 2, it is characterised in that the mark is with numeral and/or string representation, root According to the first node of acquisition and the father node of the section point to root node set, it is determined that and obtaining the first node Path between the section point includes:When father node to the root node set of the section point includes the first node Father node to root node set when,The father node of the first node is removed into root node set to root node set from the father node of the section point, Obtain the first intermediate result set;It is last in the first intermediate result set, increase the father node of the first node to root node set and described second The father node of node and with separator interval, obtains the second intermediate result set to the first crossover node of root node set;The second intermediate result set is inversely inverted, obtains the 3rd intermediate result set;AndBefore and after the 3rd intermediate result set, increase the mark of the first node and the mark of the section point respectively Know, and respectively with separator interval, to obtain the path between the first node and the section point.
- 5. method according to claim 1 or 2, it is characterised in that the mark is with numeral and/or string representation, root According to the first node of acquisition and the father node of the section point to root node set, it is determined that and obtaining the first node Path between the section point includes:When the father node of the first node is to root node set and the section point When father node to root node set does not include mutually,The father node of the first node is obtained to the father node of root node set and the section point to root node collection The set that same node point identifies in conjunction;The set of the same node point mark is removed from the father node of the first node to root node set, is obtained among first Results set;It is last in the first intermediate result set, increase the father node of the first node to root node set and described second The father node of node and with separator interval, obtains the second intermediate result set to the first crossover node of root node set;The set of the same node point mark is removed from the father node of the section point to root node set, is obtained among the 3rd Results set;The 3rd intermediate result set is inversely inverted, obtains the 4th intermediate result set;It is last in the second intermediate result set, increase the 4th intermediate result set, and with separator interval, obtain the Five intermediate result set;AndBefore and after the 5th intermediate result set, increase the mark of the first node and the mark of the section point respectively Know, and respectively with separator interval, to obtain the path between the first node and the section point.
- 6. method according to claim 1 or 2, it is characterised in that also include:When the node of the tree structure data increases Added-time, will newly increase the mark of node, the mark of father node and father node to root node set increases to the tree structure number According to nodal information digitization table in;When the node of the tree structure data is deleted, by the mark of deleted node, the mark of father node and father node Deleted to root node set from the nodal information digitization table of the tree structure data;AndWhen the node of the tree structure data is updated, if being updated the mark of node, the mark of father node and father's section Point at least one of root node set changes, then accordingly updates the nodal information data of the tree structure data Change table;Be updated whether node has child node after being updated successfully, described in judgement, when it is described be updated node and have child node when, time Go through the child node that node is updated described in renewal.
- A kind of 7. device for obtaining the hop of tree structure data two, it is characterised in that including:Node set searching modul, for the nodal information digitization table according to the tree structure data stored, search respectively And the father node of first node to be calculated and section point is obtained to root node set;AndPath acquisition module, for the first node according to acquisition and the father node of the section point to root node collection Close, it is determined that and obtaining the path between the first node and the section point;Wherein, the nodal information digitization table includes:The identifying of each node, the mark of the father node of each node and each The father node of node to root node set;The mark of each node is used for the unique mark in the tree structure data The node.
- 8. device according to claim 7, it is characterised in that also include:Digitization table establishes module, for establishing and depositing Store up the nodal information digitization table of the tree structure data.
- 9. the device according to claim 7 or 8, it is characterised in that the mark is with numeral and/or string representation, institute Stating path acquisition module includes:First submodule, described in being included when father node to the root node set of the first node During the father node of section point to root node set, it is determined that and obtain the path between the first node and the section point, Including:First subelement, father's section of the section point is removed into root node set for the father node from the first node Point obtains the first intermediate result set to root node set;Second subelement, for last in the first intermediate result set, increase the father node of the first node to root section The father node of point set and the section point and with separator interval, obtains the to the first crossover node of root node set Two intermediate result set;And3rd subelement, for before and after the second intermediate result set, increasing mark and the institute of the first node respectively The mark of section point is stated, and respectively with separator interval, to obtain the path between the first node and the section point.
- 10. the device according to claim 7 or 8, it is characterised in that the mark is with numeral and/or string representation, institute Stating path acquisition module includes:Second submodule, described in being included when father node to the root node set of the section point During the father node of first node to root node set, it is determined that and obtain the path between the first node and the section point, Including:First subelement, father's section of the first node is removed into root node set for the father node from the section point Point obtains the first intermediate result set to root node set;Second subelement, for last in the first intermediate result set, increase the father node of the first node to root section The father node of point set and the section point and with separator interval, obtains the to the first crossover node of root node set Two intermediate result set;3rd subelement, for the second intermediate result set inversely to be inverted, obtain the 3rd intermediate result set;With And4th subelement, for before and after the 3rd intermediate result set, increasing mark and the institute of the first node respectively The mark of section point is stated, and respectively with separator interval, to obtain the path between the first node and the section point.
- 11. the device according to claim 7 or 8, it is characterised in that the mark is with numeral and/or string representation, institute Stating path acquisition module includes:3rd submodule, for when the father node of the first node is to root node set and described the When the father node of two nodes to root node set does not include mutually, it is determined that and obtaining between the first node and the section point Path, including:First subelement, for obtaining the father node of the first node to root node set and the father of the section point The node set that same node point identifies into root node set;Second subelement, the collection of the same node point mark is removed for the father node from the first node to root node set Close, obtain the first intermediate result set;3rd subelement, for last in the first intermediate result set, increase the father node of the first node to root section The father node of point set and the section point and with separator interval, obtains the to the first crossover node of root node set Two intermediate result set;4th subelement, the collection of the same node point mark is removed for the father node from the section point to root node set Close, obtain the 3rd intermediate result set;5th subelement, for the 3rd intermediate result set inversely to be inverted, obtain the 4th intermediate result set;6th subelement, for last in the second intermediate result set, increase the 4th intermediate result set, and to divide It is spaced every symbol, obtains the 5th intermediate result set;And7th subelement, before and after the 5th intermediate result set, increase the mark and described of the first node respectively The mark of two nodes, and respectively with separator interval, to obtain the path between the first node and the section point.
- 12. the device according to claim 7 or 8, it is characterised in that also include:Digitization table update module, for working as When stating the node of tree structure data and changing, the nodal information digitization table of the tree structure data is updated, including:Node increases submodule, for when the node increase of the tree structure data, will newly increase the mark of node, father saves The mark and father node to root node set of point increase in the nodal information digitization table of the tree structure data;Knot removal submodule, for when the tree structure data node be deleted when, by the mark of deleted node, father The mark and father node of node are deleted in the nodal information digitization table to root node set from the tree structure data;AndNode updates submodule, for when the node of the tree structure data is updated, if be updated the mark of node, The mark of father node and father node at least one of root node set change, then accordingly update the tree structure The nodal information digitization table of data;It is updated whether node has child node after being updated successfully, described in judgement, is updated when described When node has child node, the child node of node is updated described in traversal renewal.
- A kind of 13. system for obtaining the hop of tree structure data two, it is characterised in that including:Processor;AndMemory, for storing the executable instruction of the processor;Wherein described processor is configured to perform following operation via the executable instruction is performed:According to the nodal information digitization table of the tree structure data stored, search respectively and obtain first node to be calculated With the father node of section point to root node set;AndAccording to the father node of the first node of acquisition and the section point to root node set, it is determined that and obtaining described Path between one node and the section point;Wherein, the nodal information digitization table includes:The identifying of each node, the mark of the father node of each node and each The father node of node to root node set;The mark of each node is used for the unique mark in the tree structure data The node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610625915.0A CN107679049A (en) | 2016-08-02 | 2016-08-02 | Obtain the method, apparatus and system of the hop of tree structure data two |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610625915.0A CN107679049A (en) | 2016-08-02 | 2016-08-02 | Obtain the method, apparatus and system of the hop of tree structure data two |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107679049A true CN107679049A (en) | 2018-02-09 |
Family
ID=61133423
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610625915.0A Pending CN107679049A (en) | 2016-08-02 | 2016-08-02 | Obtain the method, apparatus and system of the hop of tree structure data two |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107679049A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108681603A (en) * | 2018-05-22 | 2018-10-19 | 福建天泉教育科技有限公司 | The method of fast search tree structure data, storage medium in database |
CN108874977A (en) * | 2018-06-08 | 2018-11-23 | 东软集团股份有限公司 | Page data extracting method, device, storage medium and electronic equipment |
CN110083603A (en) * | 2019-04-17 | 2019-08-02 | 武汉初心科技有限公司 | A kind of querying method and system for realizing node path based on adjacency list |
CN112751890A (en) * | 2019-10-29 | 2021-05-04 | 贵州白山云科技股份有限公司 | Data transmission control method and device |
CN113614659A (en) * | 2019-03-28 | 2021-11-05 | 欧姆龙株式会社 | Development support device, development support device control method, information processing program, and recording medium |
CN113704294A (en) * | 2021-08-17 | 2021-11-26 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN113934742A (en) * | 2021-10-26 | 2022-01-14 | 冷杉云(北京)科技股份有限公司 | Data updating method, node information storage method, electronic device, and medium |
CN114172895A (en) * | 2021-12-07 | 2022-03-11 | 中国建设银行股份有限公司 | Routing method, routing device, computer equipment and storage medium |
CN114254068A (en) * | 2022-02-28 | 2022-03-29 | 杭州未名信科科技有限公司 | Data transfer method and system |
CN115174582A (en) * | 2022-09-06 | 2022-10-11 | 中国中金财富证券有限公司 | Data scheduling method and related device |
CN116108235A (en) * | 2023-02-20 | 2023-05-12 | 上海安博通信息科技有限公司 | Path acquisition method and device for tree structure and processing equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030204513A1 (en) * | 2002-04-25 | 2003-10-30 | Sybase, Inc. | System and methodology for providing compact B-Tree |
CN101458716A (en) * | 2008-12-31 | 2009-06-17 | 北京大学 | Shortcut searching method between nodes in chart |
CN102148756A (en) * | 2011-01-26 | 2011-08-10 | 武汉邮电科学研究院 | IPv6 over low power wireless personal area network (6LoWPAN) neighbor discovery-based tree routing method |
US20120197900A1 (en) * | 2010-12-13 | 2012-08-02 | Unisys Corporation | Systems and methods for search time tree indexes |
CN103761273A (en) * | 2014-01-08 | 2014-04-30 | 兴天通讯技术(天津)有限公司 | Tree structure node attribute configuration method and system |
CN104281686A (en) * | 2014-10-10 | 2015-01-14 | 深圳市八零年代网络科技有限公司 | Method and system for quickly processing tree-shaped nodes in batches |
-
2016
- 2016-08-02 CN CN201610625915.0A patent/CN107679049A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030204513A1 (en) * | 2002-04-25 | 2003-10-30 | Sybase, Inc. | System and methodology for providing compact B-Tree |
CN101458716A (en) * | 2008-12-31 | 2009-06-17 | 北京大学 | Shortcut searching method between nodes in chart |
US20120197900A1 (en) * | 2010-12-13 | 2012-08-02 | Unisys Corporation | Systems and methods for search time tree indexes |
CN102148756A (en) * | 2011-01-26 | 2011-08-10 | 武汉邮电科学研究院 | IPv6 over low power wireless personal area network (6LoWPAN) neighbor discovery-based tree routing method |
CN103761273A (en) * | 2014-01-08 | 2014-04-30 | 兴天通讯技术(天津)有限公司 | Tree structure node attribute configuration method and system |
CN104281686A (en) * | 2014-10-10 | 2015-01-14 | 深圳市八零年代网络科技有限公司 | Method and system for quickly processing tree-shaped nodes in batches |
Non-Patent Citations (7)
Title |
---|
LIUYI1207164339: "二叉树系列--两个节点的最低公共祖先", 《HTTPS://BLOG.CSDN.NET/LIUYI1207164339/ARTICLE/DETAILS/50913264?》 * |
LIUYI1207164339: "二叉树系列--路径系列", 《HTTPS://BLOG.CSDN.NET/LIUYI1207164339/ARTICLE/DETAILS/50916687》 * |
LIUYI1207164339: "二叉树系列--路径系列:根节点到子节点的路径以及根节点到叶子节点的所有路径", 《HTTPS://BLOG.CSDN.NET/LIUYI1207164339/ARTICLE/DETAILS/50908308?SPM=1001.2014.3001.5501》 * |
匿名: "二叉树系列--路径打印:根节点到子节点的路径以及根节点到叶子节点的所有路径", 《HTTPS://ITPCB.COM/A/799869》 * |
匿名: "二叉树系列--路径系列:打印二叉树两个子节点之间的路径以及最低公共祖先", 《HTTPS://WWW.ITDAAN.COM/BLOG/2016/03/17/99FB5996B5DEBA8CD0108D29FBCBFD09.HTML》 * |
唐青松: "路径存储法在生成树形结构中的应用研究", 《计算机与现代化》 * |
贺建英等: "Ajax技术与路径存储法在树形结构中的整合研究", 《电子设计工程》 * |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108681603B (en) * | 2018-05-22 | 2022-04-01 | 福建天泉教育科技有限公司 | Method for rapidly searching tree structure data in database and storage medium |
CN108681603A (en) * | 2018-05-22 | 2018-10-19 | 福建天泉教育科技有限公司 | The method of fast search tree structure data, storage medium in database |
CN108874977A (en) * | 2018-06-08 | 2018-11-23 | 东软集团股份有限公司 | Page data extracting method, device, storage medium and electronic equipment |
CN108874977B (en) * | 2018-06-08 | 2020-11-27 | 东软集团股份有限公司 | Page data extraction method and device, storage medium and electronic equipment |
CN113614659A (en) * | 2019-03-28 | 2021-11-05 | 欧姆龙株式会社 | Development support device, development support device control method, information processing program, and recording medium |
CN110083603A (en) * | 2019-04-17 | 2019-08-02 | 武汉初心科技有限公司 | A kind of querying method and system for realizing node path based on adjacency list |
CN112751890A (en) * | 2019-10-29 | 2021-05-04 | 贵州白山云科技股份有限公司 | Data transmission control method and device |
CN112751890B (en) * | 2019-10-29 | 2023-05-05 | 贵州白山云科技股份有限公司 | Data transmission control method and device |
CN113704294A (en) * | 2021-08-17 | 2021-11-26 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN113934742A (en) * | 2021-10-26 | 2022-01-14 | 冷杉云(北京)科技股份有限公司 | Data updating method, node information storage method, electronic device, and medium |
CN114172895A (en) * | 2021-12-07 | 2022-03-11 | 中国建设银行股份有限公司 | Routing method, routing device, computer equipment and storage medium |
CN114254068A (en) * | 2022-02-28 | 2022-03-29 | 杭州未名信科科技有限公司 | Data transfer method and system |
CN115174582A (en) * | 2022-09-06 | 2022-10-11 | 中国中金财富证券有限公司 | Data scheduling method and related device |
CN116108235A (en) * | 2023-02-20 | 2023-05-12 | 上海安博通信息科技有限公司 | Path acquisition method and device for tree structure and processing equipment |
CN116108235B (en) * | 2023-02-20 | 2023-11-10 | 上海安博通信息科技有限公司 | Path acquisition method and device for tree structure and processing equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107679049A (en) | Obtain the method, apparatus and system of the hop of tree structure data two | |
CN108733681B (en) | Information processing method and device | |
US10754853B2 (en) | Virtual edge of a graph database | |
US20150278268A1 (en) | Data encoding and corresponding data structure | |
CN104317801B (en) | A kind of Data clean system and method towards big data | |
US20160092527A1 (en) | Data processing apparatus and data mapping method thereof | |
CN111324577B (en) | Yml file reading and writing method and device | |
CN103761276A (en) | Tree-structure data comparison displaying method and device | |
JP6198845B2 (en) | Active database query maintenance | |
US20170228468A1 (en) | Data searching method of database, apparatus and computer program for the same | |
KR20110098802A (en) | Method for converting system model, computer program, and system model conversion device | |
CN109241355A (en) | Accessibility querying method, system and the readable storage medium storing program for executing of directed acyclic graph | |
KR20190079354A (en) | Partitioned space based spatial data object query processing apparatus and method, storage media storing the same | |
CN110019384A (en) | A kind of acquisition methods of blood relationship data provide the method and device of blood relationship data | |
WO2016061925A1 (en) | Method, apparatus for maintaining routing table and storage medium | |
CN105550332A (en) | Dual-layer index structure based origin graph query method | |
WO2020211466A1 (en) | Non-redundant gene clustering method and system, and electronic device | |
CN113704248B (en) | Block chain query optimization method based on external index | |
CN107943929A (en) | The automatic generating method of wrapper being abstracted based on dom tree | |
Chu et al. | Automatic data extraction of websites using data path matching and alignment | |
CN108628969B (en) | Spatial keyword indexing method and platform and storage medium | |
CN108197187B (en) | Query statement optimization method and device, storage medium and computer equipment | |
CN106844533B (en) | Data packet aggregation method and device | |
CN112765288A (en) | Knowledge graph construction method and system and information query method and system | |
CN105025013A (en) | A dynamic IP coupling model based on a priority Trie tree |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180209 |