CN102467535A - Method, device and system for acquiring tree data output coordinate - Google Patents

Method, device and system for acquiring tree data output coordinate Download PDF

Info

Publication number
CN102467535A
CN102467535A CN2010105423076A CN201010542307A CN102467535A CN 102467535 A CN102467535 A CN 102467535A CN 2010105423076 A CN2010105423076 A CN 2010105423076A CN 201010542307 A CN201010542307 A CN 201010542307A CN 102467535 A CN102467535 A CN 102467535A
Authority
CN
China
Prior art keywords
tree data
node
output area
data node
tree
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.)
Granted
Application number
CN2010105423076A
Other languages
Chinese (zh)
Other versions
CN102467535B (en
Inventor
李馥龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201010542307.6A priority Critical patent/CN102467535B/en
Publication of CN102467535A publication Critical patent/CN102467535A/en
Application granted granted Critical
Publication of CN102467535B publication Critical patent/CN102467535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is applicable to the technical field of computers and provides a method, a device and a system for acquiring a tree data output coordinate. The method comprises the following steps of: receiving a coordinate calculation instruction of a tree data node output area, wherein the instruction carries tree data; acquiring position information of each tree data node output area in the tree data, and determining a coordinate of each tree data node output area according to the position information; and outputting coordinate information comprising the tree data and the tree data node output area. The problem that the size and position of a tree data graph output area cannot be customized and are not compact is solved, and a user can simply and conveniently customize graph output of the tree data; therefore, the output tree data is more compact, and a space occupied by the output tree data is effectively reduced.

Description

A kind of tree data output coordinate acquisition methods, Apparatus and system
Technical field
The invention belongs to field of computer technology, relate in particular to a kind of tree data output coordinate acquisition methods, Apparatus and system.
Background technology
Usually tree data uses the form that represents of the tabulation that is similar to the window explorer indentation, or adopt naturally from the top and under tree-shaped outward appearance, can show hierarchical relationship intuitively, comprise, gather application scenarios such as relation.At present, the graphical interfaces that uses a computer is exported when showing tree-shaped outward appearance, is manually to be depicted as picture through instrument, is write as the static Html page, or uses the function of the insertion figure of similar Word to carry out the graphical interfaces output of tree data.Yet, in the enterprise application scene, like ERP system; Data are unpredictable; Need dynamically accomplish the graphic plotting and the output of tree data through computer program, use tree data figure output area size, the position of existing method output to customize, not compact.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of tree data output coordinate acquisition methods, Apparatus and system; Be intended to solve because in the enterprise application scene; Data are unpredictable; Need dynamically accomplish the graphic plotting and the output of tree data through computer program, use tree data figure output area size, the position of existing method output can't customize not compact problem.
The embodiment of the invention is achieved in that a kind of tree data output coordinate acquisition methods, and said method comprises the steps:
The coordinate Calculation instruction of sink tree graphic data node output area, said instruction carries tree data;
Obtain the positional information of each tree type back end output area in the said tree data,, confirm the coordinate of each tree data node output area according to said positional information;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
Another purpose of the embodiment of the invention is to provide a kind of tree data output coordinate deriving means, and said device comprises:
Coordinate Calculation command reception unit is used for the coordinate Calculation instruction of sink tree graphic data node output area, and said instruction carries tree data;
The output area coordinate is confirmed the unit, is used for obtaining the positional information of each tree type back end output area of tree data, according to said positional information, confirms the coordinate of each tree data node output area; And
The coordinate output unit is used to export the coordinate information that comprises said tree data and tree data node output area thereof.
Another purpose of the embodiment of the invention is to provide a kind of tree data output coordinate to obtain system, and said system comprises tree data output coordinate deriving means, and said device comprises:
Coordinate Calculation command reception unit is used for the coordinate Calculation instruction of sink tree graphic data node output area, and said instruction carries tree data;
The output area coordinate is confirmed the unit, is used for obtaining the positional information of each tree type back end output area of tree data, according to said positional information, confirms the coordinate of each tree data node output area; And
The coordinate output unit is used to export the coordinate information that comprises said tree data and tree data node output area thereof.
The embodiment of the invention is when the coordinate Calculation instruction that receives tree data node output area; Obtain the positional information of the output area of each tree type back end of tree data in the instruction; According to the positional information of obtaining, thereby confirm the coordinate of the figure output area of each tree data node, overcome tree data figure output area size, the position can't customize; Not compact problem; Make the user can customize the figure output of tree data simply, easily, make that the tree data of output is compact more, reduced the tree data occupation space of output effectively.
Description of drawings
Fig. 1 is the realization flow figure of the tree data output coordinate acquisition methods that provides of first embodiment of the invention;
Fig. 2 is the realization flow figure of the tree data output coordinate acquisition methods that provides of second embodiment of the invention;
Fig. 3 a, Fig. 3 b, Fig. 3 c and Fig. 3 d are the instantiation figure of the tree data output coordinate acquisition methods that provides of third embodiment of the invention;
Fig. 4 is the structural drawing of the tree data output coordinate deriving means that provides of fourth embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention is when the coordinate Calculation instruction that receives tree data node output area; Obtain the positional information of the output area of each tree type back end of tree data in the instruction; According to the positional information of obtaining, thereby confirm the coordinate of the figure output area of each tree data node, overcome tree data figure output area size, the position can't customize; Not compact problem; Make the user can customize the figure output of tree data simply, easily, make that the tree data of output is compact more, reduced the tree data occupation space of output effectively.
The embodiment of the invention provides a kind of tree data output coordinate acquisition methods, and said method comprises the steps:
The coordinate Calculation instruction of sink tree graphic data node output area, said instruction carries tree data;
Obtain the positional information of each tree type back end output area in the said tree data,, confirm the coordinate of each tree data node output area according to said positional information;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
The embodiment of the invention also provides a kind of tree data output coordinate deriving means, and said device comprises:
Coordinate Calculation command reception unit is used for the coordinate Calculation instruction of sink tree graphic data node output area, and said instruction carries tree data;
The output area coordinate is confirmed the unit, is used for obtaining the positional information of each tree type back end output area of tree data, according to said positional information, confirms the coordinate of each tree data node output area; And
The coordinate output unit is used to export the coordinate information that comprises said tree data and tree data node output area thereof.
The embodiment of the invention also provides a kind of tree data output coordinate to obtain system, and said system comprises tree data output coordinate deriving means, and said device comprises:
Coordinate Calculation command reception unit is used for the coordinate Calculation instruction of sink tree graphic data node output area, and said instruction carries tree data;
The output area coordinate is confirmed the unit, is used for obtaining the positional information of each tree type back end output area of tree data, according to said positional information, confirms the coordinate of each tree data node output area; And
The coordinate output unit is used to export the coordinate information that comprises said tree data and tree data node output area thereof.
The embodiment of the invention is when the coordinate Calculation instruction that receives tree data node output area; Obtain the positional information of the output area of each tree type back end of tree data in the instruction; According to the positional information of obtaining; Thereby confirm the coordinate of each tree data node output area, overcome the problem that existing tree data output can't customize, make the user can customize the output of tree data simply, easily; The tree data of output is compact more, has reduced the tree data occupation space of output effectively.
Below in conjunction with specific embodiment concrete realization of the present invention is described in detail:
Embodiment one:
Fig. 1 shows the realization flow of the tree data output coordinate acquisition methods that first embodiment of the invention provides, and details are as follows:
The coordinate Calculation instruction of S101, sink tree graphic data node output area, this instruction carries tree data;
In embodiments of the present invention; Data are represented with the form of tree form data structure; The information that comprises its child node and father node in the node in the tree data, in concrete implementation process, instruction of the coordinate Calculation of tree data node output area and tree data also can separately receive.
The positional information of each tree type back end output area in the tree data according to said positional information, is confirmed the coordinate of each tree data node output area in the instruction that S102, obtaining step S101 receive;
In embodiments of the present invention; Can be according to the kind of data in the tree data node or the positional information of obtaining its output area its ID number; Positional information comprise tree data node output area height, width, with the spacing of brotgher of node output area, and with the interlamellar spacing of father node output area, for example; Height, the width of the node output area of same division data are identical; The height of the output area of different division datas, width are all different, thereby the data of different departments are distinguished, and positional information can be stored with the form of configuration file or database table in advance.
In concrete implementation process; Can be through tree data being traveled through confirm the coordinate of each tree data node output area, at this not in order to limit this invention, for example; Adopt postorder traversal to confirm the horizontal ordinate of tree data, adopt preorder traversal to confirm the ordinate of tree data.
In embodiments of the present invention; Adopt postorder traversal to confirm the horizontal ordinate of tree data; Adopt preorder traversal to confirm in the ordinate process of tree data, the postorder traversal of at first tree data being set, obtain tree data node output area width and with the pitch information of brotgher of node output area; Confirm the horizontal ordinate of this tree data node output area, this tree data node is the tree data node of visiting in the said tree data process of postorder traversal.
When the postorder traversal accomplished tree data; The preorder traversal that tree data is set; According to tree data node output area height, with the interlamellar spacing information of father node output area; Confirm the ordinate of this tree data node output area, this tree data node is the tree data node of visiting in the preorder traversal tree data process.
S103, output comprise tree data and tree data node output area coordinate information thereof.
In embodiments of the present invention; Through obtaining the positional information of each tree type back end output area of tree data; The height of the tree data node output area that comprises according to positional information, width, with the spacing of brotgher of node output area; And with the interlamellar spacing information of father node output area, through traveling through the coordinate of confirming each tree data node figure output area.
Embodiment two:
Fig. 2 shows the realization flow of the tree data output coordinate acquisition methods that second embodiment of the invention provides, and details are as follows:
In step S201, postorder traversal tree data, the tree data node in the visit traverse tree graphic data process;
In embodiments of the present invention, after the coordinate Calculation instruction that receives tree data node output area,, the tree data node of visit is handled through in the process of postorder traversal tree data.
In step S202, obtain the positional information of this tree data node output area, this tree data node is the tree data node of visiting in the postorder traversal tree data process;
In embodiments of the present invention; Can be according to the kind of data in the tree data node or the positional information of obtaining its output area its ID number; Positional information comprise tree data node output area height, width, with the spacing of brotgher of node output area, and with the interlamellar spacing of father node output area, for example; Height, the width of the node output area of same division data are identical; The height of the output area of different division datas, width are all different, thereby the data of different departments are distinguished, and positional information can be stored with the form of configuration file or database table in advance.
In step S203, detect whether the tree data node is leaf node, execution in step S204 when being leaf node, otherwise execution in step S205;
In embodiments of the present invention, can whether exist left and right sides subtree to confirm whether this node is leaf node through detecting this tree data node.
In step S204; The boundary set and the horizontal ordinate of this tree data node of initialization, if the width of tree data node output area is k, then the left margin of this tree data node output area is 0; Right margin is k, and the initialization horizontal ordinate of this tree data node output area is 0;
In embodiments of the present invention; The width value of the tree data node output area that obtains according to step S202 carries out initialization to the boundary set of this tree data leaf node; Boundary set comprises the border of tree data node; And the border of each layer of tree data descendant of node, the border comprises left margin and right margin, representes the horizontal ordinate of single or a plurality of tree data node output area left margins and the horizontal ordinate of right margin respectively; The border that merges body then is the left margin that merges leftmost tree data node output area in the body, and the right margin that merges rightmost tree data node output area in the body.When the tree data node was leaf node, its boundary set included only the border of himself.
In step S205; The boundary set of this tree data node of initialization, its boundary set comprise the border of each straton node and the border of himself, if the width of this tree data node output area is k; The left margin of the ground floor of this tree data descendant of node is l; Right margin is r, and then (r-l) is the width of the ground floor output area of this tree data descendant of node, and the relative horizontal ordinate of this tree data node output area is l+ (r-l)/2-k/2; The left margin of this tree data node output area is l+ (r-l)/2-k/2, and right margin is l+ (r-l)/2+k/2.
In step S206, detect this tree data node and whether have the left brotgher of node, there is then execution in step S207 of the left brotgher of node, otherwise execution in step S209;
In step S207, this tree data node is merged in the merging body at left brotgher of node place;
In embodiments of the present invention, this tree data node is merged in the merging body at left brotgher of node place, multiple mode can be arranged; The subtree that can to fix with this tree data node be root node; Merge the arbitrary subtree of subtree that body belongs to its left brotgher of node, move loose subtree, in embodiments of the present invention; The left brotgher of node of fixing this tree data node merges the subtree at body place; The subtree that to move to right with this tree data node be root node does not overlap up to all nodes, and the spacing between the node is provided with according to the spacing of the brotgher of node output area that obtains.In concrete implementation process, can be according to two sub-tree that merge, or each layer boundary set of subtree and merging body calculates mobile distance.
In step S208; In merging process; The horizontal ordinate of tree data node output area in the subtree that moves in merging body boundary set after the moving direction of subtree and displacement, the tree data node of renewal visit merge with its left brotgher of node and the merging process;
In embodiments of the present invention, this tree data node is merged to after its left brotgher of node merges body, the horizontal ordinate that moves all nodes in the subtree is added mobile distance, thereby obtain the new horizontal ordinate of the child node of this tree data node.
In step S209, detect whether the postorder traversal of tree data is accomplished, be execution in step S210 then, otherwise execution in step S201;
In embodiments of the present invention, detect whether the postorder traversal of tree data accomplished, can judge visit the tree data node whether have a father node; If there is father node; Then postorder traversal is not accomplished as yet, if there is not father node, then can draw the root node of the tree data node of visit for tree; Traversal is accomplished, thereby finishes whole traversal of tree.
In step S210, the ordinate of tree data node output area in the preorder traversal tree data process is confirmed in the preorder traversal of the breadth First that tree data is set;
In embodiments of the present invention; After the postorder traversal of the depth-first of tree data accomplished; The preorder traversal of the breadth First that this tree data is set; According to the height of tree data node output area in this each layer of tree data and with the interlamellar spacing of its father node output area, add the height of access tree layer, thereby obtain the ordinate of this tree data node output area.
In step S211, output is comprised tree data and tree data node output area coordinate information.
In embodiments of the present invention, through the postorder traversal that tree data is carried out depth-first, the boundary set of initialization access node and horizontal ordinate in ergodic process; After detecting it and having the left brotgher of node; It is merged in the merging body of left sibling, upgrade the boundary set and the horizontal ordinate of this node, thereby accomplish confirming the horizontal ordinate of tree data output area; Pass through the preorder traversal of the breadth First of tree at last; According to the height of the number form back end output area of each layer of tree data and with the interlamellar spacing of father node, obtain the height of this tree layer, thereby confirm the ordinate of tree data node output area.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; Described storage medium is like ROM/RAM, disk, CD etc.
Embodiment three:
According to embodiment one, two, Fig. 3 a, Fig. 3 b, Fig. 3 c, Fig. 3 d show the instantiation of the tree data output coordinate acquisition methods that third embodiment of the invention provides, and details are as follows:
Fig. 3 a, Fig. 3 b have described the process that Node B merges to its brotgher of node A; In embodiments of the present invention, in order to be illustrated more clearly in this process, the width of supposing each node all is 100; Spacing between the brotgher of node is 0; The node output area is a rectangular area, and the horizontal ordinate of node output area is the summit in the upper left corner of rectangular area, adopts the mode that moves to right to realize the merging of node.
Fig. 3 a has described the position relation that Node B joins node before its left brotgher of node A, and at this moment, the boundary set of node A, B and horizontal ordinate are shown in table 1 the 2nd row, and wherein the boundary set of A comprises the border of himself, and thereafter for the border of each layer.[50,150] are the border of node A, and [0,200] is the border of the ground floor descendent node of node A, and [50,250] are the border of the second layer descendent node of node A, and the horizontal ordinate of node A is 50.Node B is a leaf node, therefore includes only the border [0,100] of himself, and horizontal ordinate is 0, and node A, B merge as yet at this moment.
Fig. 3 b has described the position relation that Node B joins its left brotgher of node A posterior nodal point, and at this moment, the boundary set of node A, B and horizontal ordinate are shown in table 1 the 3rd row, and boundary set and the horizontal ordinate of A be constant.Because Node B is leaf node, its boundary set is the set that includes only itself border, is updated to the boundary set that comprises [150,250], at this moment; It is { [50,250], [0,200], [50 that node A, B merge interim merging body AB boundary set of generation; 250] }, wherein [50,250] are the boundary value of node A, B place layer, and [0,200] is for merging body AB ground floor offspring's border; [50,250] for merging body AB second layer offspring's border, because node has moved to right 150, its horizontal ordinate becomes 150.
Table 1:
Figure BDA0000032009230000091
Figure BDA0000032009230000101
Table 2:
Fig. 3 c shows node C and merges to the process that its brotgher of node B place merges body, and Fig. 3 d has described node C and merged to the position relation that its brotgher of node B place merges the body posterior nodal point.In embodiments of the present invention, fixing the tree data node is the subtree of root node among the body AB to merge, so its boundary set and horizontal ordinate is all constant relatively.Because node C is not a leaf node, after traveling through its three node, the initialization boundary set of C node comprises himself border [100; 200], with and the border [0,300] of node C offspring ground floor; The relative horizontal ordinate of node C is 100, shown in table 2 the 2nd row.Have the left brotgher of node when node C detects it, attempt merging to when merging body AB, considered self all can not superpose with the node that merges each layer of body AB with its child node; This moment can be through two parts relatively merging the border of each node layer confirm the distance that moves to right specifically relatively to merge the boundary set of body AB and the boundary set of node C, the boundary set of merging body AB is { [50; 250], [0,200]; [50,250] }, the boundary set of node C is { [100; 200], [0,300] }; Through the border of the corresponding sublayer of subtree that relatively merges, can get egress C need move to right 150 just can with merge body AB stack, and the child node of node C need move to right 200 just not can with merge the stack of body AB ground floor child node; Therefore be that the subtree of root node need move to right and 200 could accomplish merging with node C, the node correlation attribute value of the tree after the merging is as shown in table 2 the 3rd is capable.The relative horizontal ordinate that merges back C is: 300, and the boundary set of the merging body ABC after node A, B, C merge be { [50,400], [0,500], [50,250] }, also need the horizontal ordinate of the child node of node C be upgraded after the merging.
Embodiment four:
Fig. 4 shows the structure of the tree data output coordinate deriving means that fourth embodiment of the invention provides, and for the ease of explanation, only shows the part relevant with the embodiment of the invention.
This position calculating apparatus can be used for ERP system, perhaps has the application system of figure outgoing position computing function, in the drafting system, can be the software unit that runs on these systems for example, and also can be used as independently, suspension member is integrated in these systems, wherein:
The coordinate Calculation instruction of coordinate Calculation command reception unit 41 sink tree graphic data node output areas, this instruction carries tree data; The output area coordinate confirms that unit 42 obtains the positional information of each tree type back end output area in the tree data; Confirm the coordinate of each tree data node output area, the output area coordinate confirms that unit 42 specifically confirms that by horizontal ordinate unit 421 and ordinate confirm that unit 422 forms;
Horizontal ordinate is confirmed unit 421; Be used for postorder traversal that tree data is set; Obtain tree data node output area width and with the pitch information of brotgher of node output area; Confirm the horizontal ordinate of this tree data node output area, this tree data node is the tree data node of visiting in the said tree data process of postorder traversal.Horizontal ordinate confirms that unit 421 specifically can confirm that unit and horizontal ordinate updating block form by the initial horizontal coordinate, wherein:
The initial horizontal coordinate confirm the unit according to the output area width of tree data node and with the pitch information of brotgher of node output area; Confirm the boundary set of this tree data node and the initial horizontal coordinate of output area; This boundary set comprises the border of said tree data node; And the border of said each layer of tree data descendant of node, this tree data node is the tree data node of visiting in the postorder traversal tree data process;
When there is the left brotgher of node in the horizontal ordinate updating block when the tree data node; According to the boundary set of tree data node and the boundary set of its left brotgher of node merging body; To be the subtree of root node and be root node with its left brotgher of node subtree merges with the tree data node; Upgrade the horizontal ordinate that merges back tree data node, this tree data node is the tree data node of visiting in the postorder traversal tree data process;
Ordinate confirms that unit 422 is when horizontal ordinate confirms that the postorder traversal to tree data is accomplished in unit 421; The preorder traversal that tree data is set; According to tree data node output area height, with the interlamellar spacing information of father node output area; Confirm the ordinate of this tree data node output area, this tree data node is the tree data node of visiting in the preorder traversal tree data process.
43 outputs of coordinate output unit comprise the coordinate information of tree data and tree data node output area thereof.
Above-mentionedly be merely system embodiment of the present invention, the function of its each unit such as above-mentioned method embodiment are said, repeat no more at this, but not in order to restriction the present invention.
The embodiment of the invention is when the coordinate Calculation instruction that receives tree data node output area; Obtain the positional information of the output area of each tree type back end of tree data in the instruction,, confirm the horizontal ordinate of tree data output area through the postorder traversal of tree; Pass through the preorder traversal of the breadth First of tree at last; Obtain the ordinate of tree data node output area, thereby obtain the coordinate of tree data node figure output area, overcome tree data figure output area size, the position can't customize; Not compact problem; Make the user can customize the figure output of tree data simply, easily, make that the tree data of output is compact more, reduced the tree data occupation space of output effectively.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a tree data output coordinate acquisition methods is characterized in that said method comprises the steps:
The coordinate Calculation instruction of sink tree graphic data node output area, said instruction carries tree data;
Obtain the positional information of each tree type back end output area in the said tree data,, confirm the coordinate of each tree data node output area according to said positional information;
Output comprises the coordinate information of said tree data and tree data node output area thereof.
2. the method for claim 1 is characterized in that, said positional information be tree data node output area height, width, with the spacing of brotgher of node output area, and with the interlamellar spacing of father node output area.
3. method as claimed in claim 2; It is characterized in that; The said positional information of obtaining each tree type back end output area in the said tree data according to said positional information, confirms that the step of the coordinate of each tree data node output area specifically comprises the steps:
The postorder traversal that said tree data is set; Obtain tree data node output area width and with the pitch information of brotgher of node output area; Confirm the horizontal ordinate of this tree data node output area, said tree data node is the tree data node of visiting in the said tree data process of postorder traversal;
When the postorder traversal accomplished said tree data, the preorder traversal that said tree data is set, according to tree data node output area height, with the interlamellar spacing information of father node output area, confirm the ordinate of this tree data node output area.
4. method as claimed in claim 3; It is characterized in that; The said postorder traversal that said tree data is set; Obtain tree data node output area width and with the pitch information of brotgher of node output area, confirm that the horizontal ordinate of this tree data node output area, said tree data node are that the step of the tree data node of visiting in the said tree data process of postorder traversal specifically comprises the steps:
According to said output area width and with the pitch information of brotgher of node output area; Confirm the boundary set of said tree data node and the initial horizontal coordinate of output area; Said boundary set comprises the border of said tree data node; And the border of said each layer of tree data descendant of node, said tree data node is the tree data node of visiting in the said tree data process of postorder traversal;
When there is the left brotgher of node in said tree data node; According to the boundary set of said tree data node and the boundary set of its left brotgher of node merging body; To merge with said tree data node subtree that is root node and the subtree that is root node with its left brotgher of node, upgrade the horizontal ordinate that merges back tree data node.
5. method as claimed in claim 4; It is characterized in that; Said according to said output area width and with the pitch information of brotgher of node output area; Confirm the boundary set of said tree data node and the horizontal ordinate of output area, said boundary set comprises the border of said tree data node, and the step on the border of said each layer of tree data descendant of node specifically comprises the steps:
When said tree data node is leaf node; Confirm the boundary set of said tree data node; Said boundary set only comprises the border of said tree data node, if the width of said tree data node output area is k, the left margin of then said tree data node output area is 0; Right margin is k, and the horizontal ordinate of said tree data node output area is 0;
When said tree data node is not leaf node; Confirm the boundary set of said tree data node; The boundary set of said tree data node comprises the border of said tree data node, and the border of each layer of said tree data descendant of node, if the width of said tree data node output area is k; The left margin of the ground floor of said tree data descendant of node is l; Right margin is r, and then (r-l) is the width of the ground floor output area of said tree data descendant of node, and the horizontal ordinate of said tree data node output area is l+ (r-l)/2-k/2; The left margin of said tree data node output area is l+ (r-l)/2-k/2, and right margin is l+ (r-l)/2+k/2.
6. tree data output coordinate deriving means is characterized in that said device comprises:
Coordinate Calculation command reception unit is used for the coordinate Calculation instruction of sink tree graphic data node output area, and said instruction carries tree data;
The output area coordinate is confirmed the unit, is used for obtaining the positional information of each tree type back end output area of tree data, according to said positional information, confirms the coordinate of each tree data node output area; And
The coordinate output unit is used to export the coordinate information that comprises said tree data and tree data node output area thereof.
7. device as claimed in claim 6 is characterized in that, said positional information be tree data node output area height, width, with the spacing of brotgher of node output area, and with the interlamellar spacing of father node output area.
8. device as claimed in claim 7 is characterized in that, said output area coordinate confirms that the unit specifically comprises:
Horizontal ordinate is confirmed the unit; Be used for postorder traversal that tree data is set; Obtain tree data node output area width and with the pitch information of brotgher of node output area; Confirm the horizontal ordinate of this tree data node output area, said tree data node is the tree data node of visiting in the said tree data process of postorder traversal; And
Ordinate is confirmed the unit; Be used for when horizontal ordinate confirms that the postorder traversal to said tree data is accomplished in the unit; The preorder traversal that said tree data is set; According to tree data node output area height, with the interlamellar spacing information of father node output area, confirm the ordinate of this tree data node output area, said tree data node is the tree data node of visiting in the said tree data process of preorder traversal.
9. device as claimed in claim 8 is characterized in that, said horizontal ordinate confirms that the unit specifically comprises:
The initial horizontal coordinate is confirmed the unit; Be used for according to the output area width of tree data node and with the pitch information of brotgher of node output area; Confirm the boundary set of this tree data node and the initial horizontal coordinate of output area; Said boundary set comprises the border of said tree data node, and the border of said each layer of tree data descendant of node, and said tree data node is the tree data node of visiting in the said tree data process of postorder traversal; And
The horizontal ordinate updating block; Be used for when there is the left brotgher of node in the tree data node; According to the boundary set of said tree data node and the boundary set of its left brotgher of node merging body; To merge with said tree data node subtree that is root node and the subtree that is root node with its left brotgher of node, and upgrade the horizontal ordinate that merges back tree data node, said tree data node is the tree data node of visiting in the said tree data process of postorder traversal.
10. a tree data output coordinate obtains system, it is characterized in that, said system comprises each described tree data output coordinate deriving means of claim 6 to 9.
CN201010542307.6A 2010-11-12 2010-11-12 Method, device and system for acquiring tree data output coordinate Active CN102467535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010542307.6A CN102467535B (en) 2010-11-12 2010-11-12 Method, device and system for acquiring tree data output coordinate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010542307.6A CN102467535B (en) 2010-11-12 2010-11-12 Method, device and system for acquiring tree data output coordinate

Publications (2)

Publication Number Publication Date
CN102467535A true CN102467535A (en) 2012-05-23
CN102467535B CN102467535B (en) 2014-07-09

Family

ID=46071178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010542307.6A Active CN102467535B (en) 2010-11-12 2010-11-12 Method, device and system for acquiring tree data output coordinate

Country Status (1)

Country Link
CN (1) CN102467535B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294686A (en) * 2016-08-05 2017-01-04 董涛 A kind of method quickly updating tree node position coordinates in mind map
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN108153826A (en) * 2017-12-07 2018-06-12 北京大学 A kind of method and system of the visual pattern comparison level structured data based on bar shaped code tree
CN108319991A (en) * 2017-01-16 2018-07-24 航天信息股份有限公司 A kind of node engineering wiring diagram determines method and device
CN108536837A (en) * 2018-04-13 2018-09-14 卓易法智(上海)网络科技有限公司 Generation method, device, equipment and the storage medium of knowledge tree
CN111581534A (en) * 2020-05-22 2020-08-25 哈尔滨工程大学 Rumor propagation tree structure optimization method based on consistency of vertical place
CN112003729A (en) * 2020-07-25 2020-11-27 苏州浪潮智能科技有限公司 Heterogeneous cloud platform resource topology display method, system, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983257A (en) * 2006-05-11 2007-06-20 华为技术有限公司 Method and system for demonstrating data by tree-mode structure
CN101042643A (en) * 2006-03-24 2007-09-26 国际商业机器公司 Method and device for regulating graphical user interface
CN101063972A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and apparatus for enhancing visuality of image tree

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042643A (en) * 2006-03-24 2007-09-26 国际商业机器公司 Method and device for regulating graphical user interface
CN101063972A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and apparatus for enhancing visuality of image tree
CN1983257A (en) * 2006-05-11 2007-06-20 华为技术有限公司 Method and system for demonstrating data by tree-mode structure

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN106445931B (en) * 2015-08-04 2019-06-28 阿里巴巴集团控股有限公司 Database node incidence relation methods of exhibiting and device
CN106294686A (en) * 2016-08-05 2017-01-04 董涛 A kind of method quickly updating tree node position coordinates in mind map
CN106294686B (en) * 2016-08-05 2021-04-02 董涛 Method for rapidly updating tree node position coordinates in thought guide graph applied to computer technical field
CN108319991A (en) * 2017-01-16 2018-07-24 航天信息股份有限公司 A kind of node engineering wiring diagram determines method and device
CN108153826A (en) * 2017-12-07 2018-06-12 北京大学 A kind of method and system of the visual pattern comparison level structured data based on bar shaped code tree
CN108536837A (en) * 2018-04-13 2018-09-14 卓易法智(上海)网络科技有限公司 Generation method, device, equipment and the storage medium of knowledge tree
CN108536837B (en) * 2018-04-13 2022-04-01 上海渠杰信息科技有限公司 Knowledge tree generation method, device, equipment and storage medium
CN111581534A (en) * 2020-05-22 2020-08-25 哈尔滨工程大学 Rumor propagation tree structure optimization method based on consistency of vertical place
CN111581534B (en) * 2020-05-22 2022-12-13 哈尔滨工程大学 Rumor propagation tree structure optimization method based on consistency of vertical place
CN112003729A (en) * 2020-07-25 2020-11-27 苏州浪潮智能科技有限公司 Heterogeneous cloud platform resource topology display method, system, terminal and storage medium

Also Published As

Publication number Publication date
CN102467535B (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN102467535B (en) Method, device and system for acquiring tree data output coordinate
JP6998964B2 (en) Methods and equipment for determining the geofence index grid
JP5260672B2 (en) Layout manager
US20100077328A1 (en) Automatically arranging widgets of a model within a canvas using iterative region based widget relative adjustments
US8893073B2 (en) Displaying a congestion indicator for a channel in a circuit design layout
US9513783B1 (en) Determining available screen area
Cano et al. Mosaic drawings and cartograms
US10261898B1 (en) Concurrent marking of location and shape changing objects
BRPI0503982B1 (en) "METHOD AND SYSTEM FOR CREATING AND DRAWING A GRAPHIC INSIDE AN APPLICATION PROGRAM"
KR20190079354A (en) Partitioned space based spatial data object query processing apparatus and method, storage media storing the same
US11327643B2 (en) Rule-based user in interface layout rearrangement
CN103455437A (en) Data storage device and data storage device operation method
CN103914865A (en) Groups of faces that form a geometrical pattern
US7676484B2 (en) System and method of performing an inverse schema mapping
CN105955804A (en) Method and device for processing distributed transaction
US20130086463A1 (en) Decomposing markup language elements for animation
CN111258575A (en) Page layout processing method and device
US20170262411A1 (en) Calculator and matrix factorization method
CN102566849B (en) Method and device for acquiring tree-form data drawing output positions and ERP (enterprise resource planning) system
CN106484388A (en) The implementation method of user interface and device
US20220263720A1 (en) Diagramming child nodes with multiple parent nodes
CN115563355A (en) Nebula Graph database query method, system, electronic device and medium
CN103198140A (en) Database storage system and data storage method
CN102591660B (en) Method and device for constructing flash program object
KR102632111B1 (en) Sleep signal stitching technique

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant