CN105354335A - Time-varying tree graph layout method and application for time-varying and hierarchical data - Google Patents

Time-varying tree graph layout method and application for time-varying and hierarchical data Download PDF

Info

Publication number
CN105354335A
CN105354335A CN201510894470.1A CN201510894470A CN105354335A CN 105354335 A CN105354335 A CN 105354335A CN 201510894470 A CN201510894470 A CN 201510894470A CN 105354335 A CN105354335 A CN 105354335A
Authority
CN
China
Prior art keywords
layout
time
moment
node
root
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
CN201510894470.1A
Other languages
Chinese (zh)
Other versions
CN105354335B (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.)
Beijing Technology and Business University
Original Assignee
Beijing Technology and Business University
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 Beijing Technology and Business University filed Critical Beijing Technology and Business University
Priority to CN201510894470.1A priority Critical patent/CN105354335B/en
Publication of CN105354335A publication Critical patent/CN105354335A/en
Application granted granted Critical
Publication of CN105354335B publication Critical patent/CN105354335B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/322Trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a time-varying tree graph layout method for time-varying and hierarchical data. The time-varying tree graph layout method comprises the steps of representing a data set DS into K trees based on a hierarchy and time relation; performing arrangement and layout on root nodes (tk, root) of trees or sub trees in different moments on a timer shaft in sequence; performing layout for the first line in a corresponding region of child nodes of (tk, root) by adopting a line layout mode; repeating to execute the layout until all the child nodes under a father node are subjected to layout; and finally finishing the time-varying tree graph layout for the to-be-displayed overall data set DS. The time-varying tree graph layout method provided by the invention is applied to the display and analysis of time-varying and hierarchical pesticide residues data; the original layout region in each moment is set to be square; the tree graph filling layout is finished by adopting a line layout mode; and the generated tree graph can display both of the hierarchical characteristic and time attribute of the pesticide residues data, so that the time-varying tree graph layout method is quite good in the visualization effect.

Description

For time change layer secondary data time become tree graph layout method and application
Technical field
The invention belongs to information visualization field, be specifically related to for time change layer secondary data time become tree graph layout method and application.
Background technology
Under large data age background, how from mass data, to search out wherein rule by effective visual analysis method, thus help user decision-making is a much-talked-about topic in current large data fields.
Hierarchical data is a primary study object in visual field always, classical hierarchical data visualized algorithm has node-link, tree graph and radiation ring etc., and wherein tree graph method is applied to some extent among the every field such as Physiological Analysis, picture presentation and economic situation analysis.Tree graph placement algorithm early than 1993 by propositions such as Johnson, it proposes filled type placement algorithm SliceandDice for the coverage existed in node link method and the low shortcoming of space availability ratio.And elongate rectangular quantity in SliceandDice is too much, the impalpable problem of user in order to solve, MarkBurls equals to propose Squarified algorithm in 1999, use Squarified placement algorithm can obtain good mean aspect ratio, but upset data order originally.Therefore, user is allowed to find corresponding placement position in tree graph along node sequence quickly and easily in order to enable the layout of tree graph, Bederson equals to propose Strip algorithm in 2002, Tu equals 2007 and proposes Spiral method, Strip method is optimized, makes node in tree graph layout, keep continuous.In order to enable tree graph placement algorithm allow the data with geography information apply, the people such as Wood proposed Ordered-Squarified in 2009.Thomas equals to have carried out induction and conclusion to tree graph placement algorithm in 2012, the variable affecting layout in tree graph placement algorithm is summarized as following 5: Order, Size, Chunk, Recurse and Phrase, user is by arranging to the self-defined of these five variablees the situation changing tree graph layout.
But, the data that actual life produces often comprise multiple attribute, data such as after gathering carry time attribute often, and in data mining and data analysis process, also be a very important link to the process of time attribute, the visualized algorithm at present with the data of time dimension attribute mainly comprises theme river, thermodynamic chart and polar plot etc.Time become placement algorithm can be divided into two classifications: countershaft layout and dynamic change layout on time.Modal method uses axial length to represent the change of time, and each scale represents a time period, on this scale, then pass through other attribute of the identification datas such as height, shape, color and text display; Use transverse axis to represent the time attribute of data, then use the Outflow of other association attributes of process flow diagram presentation of events of improvement; Parallel coordinates is optimized, adopts the TimeWheel introducing time shaft concept; Use in text visualization and introduce the ThemeRiver of time element or the Helixglyphs of spiral fashion time shaft.The layout type of dynamic change is then by carrying out Rapid Variable Design display to mass data on figure, whole display effect is shown with dynamic form in visually-perceptible, comprise with the highlighted thermodynamic chart with the size of the shade amount of expression, and the polar plot changed in time based on lines.
In sum, existing tree graph placement algorithm and time become placement algorithm and achieve all from different perspectives the good visualization of data is shown also respectively have good performance in different evaluation index.But, for time change layer secondary data (possessing the data of level and time two dimensional attribute) simultaneously carry out visual, when node identical in layout being followed the tracks of as adopted existing tree graph algorithm, still need to expend the more time, the situation of change of description node accurately and fast while the figure level that leaves tree can't be realized.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art, the invention provides a kind of for time change layer secondary data time become tree graph layout method Treemaparrayalongtimeline (TAT), visual analysis can be carried out for the data of change and hierarchy attributes when having simultaneously, ensure that the tree graph generated is retaining tree graph visualization objects levels and possessing again time attribute display capabilities while highlighting nodal value size, solve the problem that time-variable data searches overlong time in tree graph layout.
Technical scheme provided by the invention is:
For time change layer secondary data time become a tree graph layout method, time described change layer secondary data be one group have the time variation matter that weights change in time by the inter-related hierarchical data of hierarchical relationship; Carry out visualization processing for change layer secondary data collection (representing with DS) time to be shown, concrete operation step is as follows:
A. will treat that visualized data collection DS is expressed as K tree according to level and time relationship; For tree (or subtree) root node under moment k, be designated as (tk, root);
For tree (or subtree) root node under moment k, be designated as (tk, root), wherein tk represents moment k, and corresponding father node fatheri is designated as (tk, fatheri), the child node of fatheri is designated as (tk, childij), as shown in Figure 2, the weights that each node is corresponding represent with value, and in Fig. 2, grayed-out nodes represents that the weights of this node there occurs change.
The node change moment that the number being expressed as setting specifically contrasts according to actual needs is determined, such as, the if desired situation of change of the relatively same node of moment T1, moment T2, moment T3 and moment T4, then data are expressed as 4 trees by corresponding 4 moment; Every tree is all a level of nesting relation, tree graph level represents with nested layout: if root node A has child node B, then during tree graph layout, B will in the tree graph layout areas of A, if B and C is the brother of same root node A, B and C be layout in the scope of A, but A and B is not nested against one another.
B. not root node (tk, root) in the same time is from left to right carried out alignment placement on a timeline in order;
The original layout region in each moment is set to square (square is easier to identify than the rectangle of elongated strip shaped), wherein foursquare area is directly proportional to the weights of root node, and by calculating the square length of side determining each moment corresponding fill area, as shown in Figure 3, the y of viewing area maxby User Defined, corresponding y in figure 3 max=R max, wherein, R maxfor root node maximum weight time to be engraved in layout the corresponding foursquare length of side; The square length of side in all the other moment is calculated by formula 1:
R k = R max 2 * ( root k . v a l u e ) / ( root max . v a l u e ) (formula 1)
In formula 1, R maxfor root node maximum weight time to be engraved in layout the corresponding foursquare length of side; R kfor the square length of side in all the other moment; Root k.value be the weights of a kth root node; Root max.value be the weights of the root node of maximum weight.
C. adopt the mode of row layout, first the child nodes of (tk, root) is carried out layout to the first row in corresponding region, calculate optimum filling number, and be applied in this row layout in all moment, complete the first row layout;
All carry out tree graph level by root node to all intermediate nodes of child node to go forward one by one nested layout, follow the tracks of for the ease of same node in not in the same time to tree graph, node location attribute position (pi can be introduced, qi), wherein pi represents line number, qi represents number, and the position attribution of each node is unique in tree graph layout.Adopt the method that position ranks number can be utilized to search individual node, realize following the tracks of fast, as shown in Figure 3.
D. for other child nodes under same father node, repeat the layout process of C, the tree graph completing other row according to the principle near top fills layout, until the equal layout of child nodes is complete under this father node.
E., for all nodes in tree construction, before leaf node is complete by layout, the layout step of C and D is repeated.
Through the operation of above-mentioned steps, can complete to whole data set DS to be shown time become tree graph layout.
In the inventive method, often the number of row layout is relevant to all nodes in layout moment that needs, and calculate optimum filling number by row, and the concrete operation step be applied in this row layout in all moment is described in step C:
If the line number C1. for current arrangements carries out layout from m node, node m correspondence is denoted as childim, and the changing value in each moment of corresponding node m is (tk, childim), and wherein k represents the moment.At the father node (tk of its correspondence, fatheri) in arrangement space, according to the principle near top, calculate the respective mean aspect ratio in not the first row node layout in the same time, and select optimum layout number corresponding to (value is minimum) mean aspect ratio to be optimal layout's number (tk, nk) in each moment.
Wherein, the computing method of mean aspect ratio are as follows: the rectangular aspect ratio of setting i-th child node corresponding is as AS i, wherein AS i=Max (h i/ w i, w i/ h i), then the mean aspect ratio AAR of tree graph is the mean value of its all child node length breadth ratio, as shown in Equation 2:
A A R = 1 n Σ i = 1 n AS i (formula 2)
In formula 2, AS ibe rectangular aspect ratio corresponding to i-th child node; N is interstitial content; AAR is the mean aspect ratio of tree graph, and the value of AAR is more close to 1, then this rectangle is close to square, is more conducive to eye recognition and mouse action.
C2. under each moment (as the T1 in Fig. 3, T2 and the T3 moment), when fill number do not reach can top filling time, calculate and fill the mean aspect ratio after nk+1 node.
C3. nmax is made to be all moment optimal layout's number (tk, nk) maximal value Max [n1..k], i.e. nmax=Max [n1..k], then still need to continue supplement calculation mean aspect ratio for filling the moment that number is less than nmax, thus under drawing each moment k, corresponding mean aspect ratio separately when all filling numbers belong to [1, nmax].
C4. last, the average of the mean aspect ratio in all moment when calculating filling number is nk (nk belongs to [1, nmax]), is averaged the minimum filling number Min [n1..k] of length breadth ratio average and fills number as the optimum in all moment.
Through the operation of step C1 to C4, then can calculate the optimum filling number that this row is inscribed when all, and be applied in this row layout in all moment.
The present invention also provide simultaneously by above-mentioned for time change layer secondary data time become the displaying analysis that tree graph layout method is applied to residues of pesticides data, specifically, for the residues of pesticides data with time variation and level, by not in the same time under the level of data and time relationship, be expressed as many trees, the root node of not tree is in the same time designated as (tk, root) from left to right alignment placement is carried out in order on a timeline, the original layout region in each moment is set to square, adopt the mode of row layout, first by (tk, root) child nodes carries out layout to the first row in corresponding region, calculate optimum filling number, and be applied in this row layout in all moment, complete the first row layout, for other child nodes, repeat layout process, the tree graph completing other row fills layout, until the equal layout of child nodes is complete under this father node, until the equal layout of all nodes in tree construction completes, the tree graph generated can show level characteristic and the time attribute of agriculture residue certificate simultaneously.The hierarchical relationship of data is represented by tree graph, time relationship is embodied by time shaft, and the weights change of same node can be checked according to the tree graph that contrast is not lower in the same time, realize carrying out long-term follow-up analysis by introducing time response to the hierarchical data that value constantly changes.
Compared with prior art, the invention has the beneficial effects as follows:
The present invention is directed to the problem that time-variable data time of searching in tree graph layout passes, provide a kind of for time change layer secondary data time become the evaluation index of tree graph layout method Treemaparrayalongtimeline (TAT) and time shift.Method proposed by the invention can ensure that the tree graph generated is retaining tree graph visualization objects levels and possessing again time attribute display capabilities while highlighting nodal value size, user can be helped more accurately and fast to find corresponding node, evaluation index also there is good behaviour, among the data analysis scene such as contrast and tracking this placement algorithm being applied to Practice for Pesticide Residue in Agricultural Products amount testing result in different time sections, there is good effect.
Accompanying drawing explanation
Fig. 1 be provided by the invention for time change layer secondary data time become the FB(flow block) of tree graph layout method.
Fig. 2 will treat that visualized data collection is expressed as the schematic diagram after three trees according to level and time relationship in embodiment in the present invention;
Wherein, tree when (), (b), (c) are respectively moment t1, t2, t3 a corresponding to hierarchical data, visible for t1, the tree construction of t2 and t3 does not change, but corresponding weights there occurs change, in figure, weights change and to mark with grayed-out nodes.
Not root node (tk, root) in the same time is from left to right carried out the schematic diagram after alignment placement in embodiment in the present invention by Fig. 3 on a timeline in order; Wherein, x-axis is the moment; Y-axis is the square length of side; R 2for moment (i.e. t2 moment) corresponding foursquare length of side in layout of root node maximum weight.
Fig. 4 is that in the present invention, in embodiment, tree graph node increases the schematic diagram after position attribution;
Wherein, (a), (b) are respectively the schematic diagram of the schematic diagram of the position attribution of single layer structure and the position attribution of sandwich construction.
The optimum that the often row calculated is inscribed when all is filled number in the specific embodiment of the invention to be applied to the schematic layout pattern after this row layout in all moment by Fig. 5;
Wherein, (a) represents the complete later result schematic diagram of specific embodiment I all moment the 1st row node layout; B () represents the complete later result schematic diagram of specific embodiment I all moment the 2nd row node layout; C () represents that specific embodiment I all moment whole 3 row nodes all process later result schematic diagram; D Beijing's February that in () expression specific embodiment II, layout completes and the schematic layout pattern of the residual detection data of agriculture in March (fruit, vegetable pesticide residue detect data).
Fig. 6 is the comparing result figure from the angle analysis tree graph placement algorithm of different evaluation index in the specific embodiment of the invention;
Wherein, (a), (b), (c) and (d) corresponding mean aspect ratio, stability, stable balance and time shift indicatrix respectively, horizontal ordinate is interstitial content, and ordinate is desired value; And line 1,2 and 3 represents index result figure corresponding to Strip, Spiral and TAT algorithm respectively.
Embodiment
Below in conjunction with accompanying drawing, further describe the present invention by embodiment, but the scope do not limited the present invention in any way.
The invention provides a kind of for time change layer secondary data time become tree graph layout method Treemaparrayalongtimeline (TAT), TAT method can carry out visual analysis for the data of change and hierarchy attributes when having simultaneously, ensure that the tree graph generated is retaining tree graph visualization objects levels and possessing again time attribute display capabilities while highlighting nodal value size, solve the problem that time-variable data searches overlong time in tree graph layout.Fig. 1 be provided by the invention for time change layer secondary data time become the FB(flow block) of tree graph layout method, the implementation step of the method that the invention provides is described by the following examples.
Example I:
Treat that visualized data integrates DS as data A1{1,1,1,1,1 in the present embodiment, 1,1,1,1}, A2{3,3,4,1,1,1,1,1,1}}, A3{1,1,1,1,2,1,3, the set that 2,4} forms, respectively corresponding same tree construction is in the weights change in tri-moment of T1, T2 and T3 and distribution situation, its nodal value and be respectively 9,16 and 16.
Adopt the present invention to propose for time change layer secondary data time become tree graph layout method, carry out visualized operation to above-mentioned visualized data collection DS, its concrete operation step is:
A, will treat that visualized data collection DS is expressed as K tree by level and time relationship;
The number being expressed as tree with carry out a node changing before and after the number in moment that compares identical, namely have several moment to be just expressed as several trees.
As shown in Figure 2, be expressed as the number K=3 of tree, root node is respectively (t1, root), (t2, and (t3 root), root), have 9 child nodes below each root node respectively, corresponding father node fatheri is designated as (tk, fatheri), the child node of fatheri is designated as (tk, childij), and k is the integer of satisfied 1≤k≤3 herein; I is the number of father node; J is the number of the corresponding child node of father node fatheri;
B, by 3 not root node (tk, root) in the same time from left to right carry out alignment placement in order on a timeline;
The original layout region in each moment is set to square, and wherein foursquare area is directly proportional with the weights (root node weights are that child node value is added) of root node.In the present embodiment, the weights as data set A1 root node are weights of 9, A2 and A3 root node is all 16.First determine the foursquare size representing root node, suppose that maximum layout area is 4*4, then herein Rmax be root node maximum weight time to be engraved in layout the corresponding foursquare length of side 4, the square length of side in all the other moment can be calculated by formula 1:
R k = R max 2 * ( root k . v a l u e ) / ( root max . v a l u e ) (formula 1)
In formula 1, R maxfor root node maximum weight time to be engraved in layout the corresponding foursquare length of side; R kfor the square length of side in all the other moment; Root k.value be the weights of a kth root node; Root max.value be the weights of the root node of maximum weight.
Therefore, after synchronously converting by nodal value, in the present embodiment, can learn data set A2 and A3 layout in the square of 4*4, A1 is layout in the square of 3*3.The ymax of viewing area, by User Defined, can arrange ymax=Rmax=4;
C. be that each node introduces position attribution position (pi, qi), to follow the tracks of the change of node weights;
Adopt the mode of row layout, first the child of these three moment root node (tk, root) of T1, T2 and T3 is carried out layout to the first row in corresponding region, specific as follows:
C1. first in the arrangement space of the father node of correspondence, according to the principle near top, calculate at T1, the respective mean aspect ratio of T2 and T3 moment the first row node layout, and select optimum layout number corresponding to (value is minimum) mean aspect ratio to be optimal layout's number (tk, nk) in each moment;
When table 1 becomes tree graph the first row when being and becoming tree graph placement algorithm pair when adopting in the present embodiment carries out layout, according to the optimum computing method of filling number of the row in all moment, the result calculated:
The T1 that table 1 calculates according to the optimum computing method of filling number of the row in all moment, the mean aspect ratio of T2 and T3 moment the first row node layout
As shown in table 1, at T1, optimum mean aspect ratio corresponding to T2 and T3 the first row layout of each moment is respectively 1,1.33 and 1, the corresponding value of optimal layout number is respectively 3,2,4, therefore maximal value Max [the n1..k]=nk=4 (herein k=3) of all moment optimal layout's numbers in figure.
C2. inscribe when T1, T2 and T3, when fill number do not reach can top filling time, calculate and fill the mean aspect ratio after nk+1 node.As shown in the T1 moment of table 1, this, optimum mean aspect ratio was 1.00 in moment, and optimal layout's number is 3, but can top filling because now do not reach, then still calculate mean aspect ratio when being filled to 4 nodes, therefore can be formed as the partial data in Fig. 4 in computation process.
In like manner, T2 and the T3 moment calculates respectively and fills the mean aspect ratio of number when value is 3 and 5 respectively.
C3. nmax is made to be all moment optimal layout's number (tk, nk) maximal value Max [n1..k], i.e. nmax=Max [n1..k], then still need to continue supplement calculation mean aspect ratio for filling the moment that number is less than nmax, thus under drawing each moment k, corresponding mean aspect ratio separately when all filling numbers belong to [1, nmax].Optimal layout number nmax maximum in the present embodiment answers value to be the nk respective value 4 in T3 moment herein, so need to carry out supplement calculation to T1 and the T2 moment, until calculate each moment to fill mean aspect ratio when number belongs to [Isosorbide-5-Nitrae].
C4. last, calculate the average of mean aspect ratio when all moment, to fill number be nk (nk belongs to [1, nmax]), be averaged the minimum filling number Min [n1..k] of length breadth ratio average and fill number as the optimum in all moment.As shown in table 1, select the filling number 3 corresponding to minimum value 1.56 of mean aspect ratio average to fill number as common optimum during final T1, T2 and T3 moment layout the first row herein.
The optimum that the often row calculated is inscribed when all is filled number in the specific embodiment of the invention to be applied to the schematic layout pattern after this row layout in all moment by Fig. 5; Wherein, (a) represents the complete later result schematic diagram of row node layout of all moment the 1st; B () represents the complete later result schematic diagram of row node layout of all moment the 2nd; C () represents that whole 3 row nodes of all moment all process later result schematic diagram; D Beijing's February that in () expression specific embodiment II, layout completes and the schematic layout pattern of the residual detection data of agriculture in March (fruit, vegetable pesticide residue detect data).
Through the operation of step C1 to C4, then can calculate the optimum filling number that this row is inscribed when all, and be applied in this row layout in all moment, complete the first row layout, as shown in Fig. 5 (a).
D. for other child nodes under same father node, repeat the layout process of C, the tree graph completing other row according to the principle near top fills layout, until the equal layout of child nodes is complete under this father node.
E., for all nodes in tree construction, before leaf node is complete by layout, the layout step of C and D is repeated.
Fig. 5 (b) is the complete later result schematic diagram of row node layout of all moment the 2nd.Through the operation of above-mentioned steps, can complete to whole data set DS to be shown time become tree graph layout, the layout finally obtained is as shown in Fig. 5 (c).
Example II:
The present embodiment is described the example that is applied as of method for visualizing provided by the invention in Detecting Pesticide result data.Treat that visualized data integrates the Detecting Pesticide data of DS as Beijing's agricultural product in February to March in the present embodiment, these data are the simulated data based on True Data, comprising the residual record of fruit agriculture 477, the residual record of vegetables agriculture 1233, only enumerate partial data herein as follows:
Adopt the present invention to propose for time change layer secondary data time become tree graph layout method, carry out visualized operation to above-mentioned data set DS to be shown, its concrete operation step is:
A. will treat that visualized data collection DS is expressed as 2 trees by level and time relationship;
In the present embodiment, because only relate to 2 time points (February and March), therefore will treat that visualized data collection DS is expressed as 2 trees by level and time relationship.The tree graph layout that every all corresponding these moment weights of tree are corresponding, the tree graph layout contrasting multiple moment so just can find that the weights of same node have changed.And representing for hierarchical relationship, such as Beijing comprises the district such as Yanqing, Shunyi, then Beijing is as a large root node, Yanqing and Shunyi layout wherein; Yanqing is divided into again two parts, then each node is divided into two parts; Tree graph layout and regional corresponding relation are as shown in Fig. 5 (d).
K=2 in the present embodiment, therefore root node is respectively (t1, root), (t2, root), herein t1=2, t2=3 (unit: the moon), have some child nodes below root node, corresponding father node fatheri is designated as (tk, fatheri), the child node of fatheri is designated as (tk, childij).
B. by 2 not root node (tk, root) in the same time from left to right carry out alignment placement in order on a timeline.The original layout region in each moment is set to square, wherein foursquare area is directly proportional to the weights of root node, node weights represent the agricultural chemicals frequency (as long as agricultural product exist agricultural chemicals detected level at respective regions, then correspondingly for it carries out frequency counting) of Beijing each district vegetables or fruit herein.
C. be that each node introduces position attribution position (pi, qi), to follow the tracks of the change of node weights, adopt the mode of row layout, first the child of these two moment root node (tk, root) of T1 and T2 is carried out layout to the first row in corresponding region, specific as follows:
C1. first in the arrangement space of the father node of correspondence, according to the principle near top, calculate the respective mean aspect ratio in T1 and T2 moment the first row node layout, and select optimum layout number corresponding to (value is minimum) mean aspect ratio to be optimal layout's number (tk, nk) in each moment.
C2. inscribe when T1 and T2, when fill number do not reach can top filling time, calculate and fill the mean aspect ratio after nk+1 node.
C3. nmax is made to be all moment optimal layout's number (tk, nk) maximal value Max [n1..k], i.e. nmax=Max [n1..k], then still need to continue supplement calculation mean aspect ratio for filling the moment that number is less than nmax, thus under drawing each moment k, corresponding mean aspect ratio separately when all filling numbers belong to [1, nmax].
C4. last, calculate the average of mean aspect ratio when all moment, to fill number be nk (nk belongs to [1, nmax]), be averaged the minimum filling number Min [n1..k] of length breadth ratio average and fill number as the optimum in all moment.
Through the operation of step C1 to C4, then can calculate the optimum filling number that this row is inscribed when all, and be applied in this row layout in all moment, complete the first row layout.
D. for other child nodes under same father node, repeat the layout process of C, the tree graph completing other row according to the principle near top fills layout, until the equal layout of child nodes is complete under this father node.
E., for all nodes in tree construction, before leaf node is complete by layout, the layout step of C and D is repeated.
Through the operation of above-mentioned steps, can complete to whole data set DS to be shown time become tree graph layout.
The layout finally obtained is as shown in Fig. 5 (d).As seen from the figure, it is while retaining hierarchical structure (in Beijing, each district, Beijing, district agricultural product level), to have embodied in different time sections the weights situation of change (the agricultural chemicals frequency of agricultural product increases or the situation of minimizing) in (February and March in) certain region well.
The present invention is verified by mean aspect ratio, stability, stable balance and time shift index.Wherein, time shift index and corresponding verification method as follows:
Suppose that node rectangle Ri (xi, yi) has 2 attributes, what be respectively rectangle Ri is the coordinate of central point after denominator is normalized with the length of side in layout.For the node situation of change in two moment, represent with Gi (di, θ i) amount that each node changes in layout, wherein di is the absolute value difference of change coordinate, and θ i is the angle of change for horizontal line; I is the node serial number of i-th node rectangle Ri.
With reference to the principle calculating sectorial area between 2 vectors, between 2 continuous print nodes, using maximum change distance as fan-shaped radius, time shift index TMD is defined as:
T M D = 1 n - 1 Σ i = 1 n - 1 m a x ( d i , d i + 1 ) 2 * ( θ i + 1 - θ i ) (formula 3)
In formula 3, represent with Gi (di, θ i) amount that each node changes in layout, wherein di is the absolute value difference of change coordinate, and θ i is the angle of change for horizontal line; I is the node serial number of i-th node rectangle Ri.The distance that its value changes to node layout square and angle be directly proportional.This value more close to 0, then represents that its variable quantity is less.By this index compared with stability and stable balanced index, due to rear both be all that the Scalar operation value that changes is done and evaluated, and the change of node location should be that the change of vector occurs, therefore time shift index than these two indexs more can preferably data of description time the character that becomes.
In addition, the computing method of mean aspect ratio (averageaspectratio, AAR) are: the rectangular aspect ratio of setting i-th child node corresponding is as AS i=Max (h i/ w i, w i/ h i), then the mean aspect ratio AAR of tree graph is the mean value of its all child node length breadth ratio, as shown in above-mentioned formula 2.
And the computing method of stability indicator ADC are as follows: suppose node rectangle Ri (xi, yi, wi, hi) there are 4 attributes, be respectively the horizontal ordinate of node rectangle Ri, ordinate, width and height, then individual node formula 4 asked to position and the change of shape of its corresponding rectangle Ri, namely
d ( R p a s t , R c u r r e n t ) = ( x p - x c ) 2 + ( y p - y c ) 2 + ( w p - w c ) 2 + ( h p - h c ) 2 (formula 4)
Then ADC is the mean value of all node locations and change of shape d in tree graph, namely
A D C = 1 n Σ i = 1 n d i (formula 5)
The computing method of stable balanced index VDC are as follows: this value is asked variance by the position in formula 4 and change of shape d and obtained, and as shown in Equation 6, wherein Var (d) expression asks variance to d in its definition, and E (d) expression asks expectation value to d.
VDC=Var (d)=E{ [d-E (d)] 2(formula 6)
Meanwhile, also utilize Strip tree graph layout method, Spiral tree graph layout method carry out visual layout to above data and calculate each desired value, finally result of calculation is compared, Fig. 6 and net result figure.
By Fig. 6, we can see the contrast effect of the angle analysis tree graph placement algorithm from different evaluation index: relative to Strip and Spiral placement algorithm, by comparison diagram 6 (a), TAT placement algorithm is relatively high in mean aspect ratio, character is poor, but gap is less, do not affect the aesthetic property of layout and the observability of rectangle; By comparison diagram 6 (b), TAT placement algorithm data value in stability is less, and character is better, with the increase of data volume, the index difference of three is relatively stable near 8, illustrates that TAT placement algorithm is when data change, and the change of tree graph layout structure is less; By comparison diagram 6 (c), TAT placement algorithm has obvious advantage in stable balance, illustrates that TAT placement algorithm is more stable in layout, there is not the situation undergone mutation in respective nodes position; By comparison diagram 6 (d), the value of TAT placement algorithm in time shift is about 1, and closely ideal value 0, is obviously better than all the other two kinds of algorithms, illustrate when data change, the change of tree graph layout obviously can not affect the speed of user search node.
Comprehensive Correlation, TAT placement algorithm, under the condition of sacrificing a small amount of mean aspect ratio, can obtain better stability, stable balance and time shift, and increasing amount is comparatively obvious in the index increased.Relative to Strip and Spiral placement algorithm, tree graph layout can be made to produce less layout change when data variation, understand tree graph produce less impact to user, TAT tree graph placement algorithm is suitable for being applied in the hierarchical data with time variation matter more.
It should be noted that the object publicizing and implementing example is to help to understand the present invention further, but it will be appreciated by those skilled in the art that: in the spirit and scope not departing from the present invention and claims, various substitutions and modifications are all possible.Therefore, the present invention should not be limited to the content disclosed in embodiment, and the scope that the scope of protection of present invention defines with claims is as the criterion.

Claims (5)

1. one kind for time change layer secondary data time become tree graph layout method, time described change layer secondary data be one group have the time variation matter that weights change in time by the inter-related hierarchical data collection of hierarchical relationship, represent with DS, for time change layer secondary data collection DS carry out visualization processing, concrete operation step is as follows:
A. will treat that visualized data collection DS is expressed as K tree according to level and time relationship; The number of the tree be expressed as is identical with treating the number in the moment that visualized data divides; The root node of the tree under moment k or subtree is designated as (tk, root);
B. the root node (tk, root) of not tree in the same time or subtree is from left to right carried out alignment placement on a timeline in order;
C. adopt the mode of row layout, the child nodes of (tk, root) is carried out tree graph to the first row in corresponding region and fills layout;
D. for other child nodes under same father node, repeat the layout process of C, the tree graph completing other row fills layout, until the equal layout of child nodes is complete under this father node;
E., for all nodes in tree construction, before leaf node is complete by layout, the layout step of C and D is repeated; Until complete to whole data set DS to be shown time become tree graph layout.
2. as claimed in claim 1 for time change layer secondary data time become tree graph layout method, it is characterized in that, described layout is all carried out according to the method near top.
3. as claimed in claim 1 for time change layer secondary data time become tree graph layout method, it is characterized in that, described in step B, carry out alignment placement, specifically the original layout region in each moment is set to square and carries out layout; Described foursquare area is directly proportional to the weights of root node, and by calculating the square length of side determining each moment corresponding fill area, wherein, R maxfor root node maximum weight time to be engraved in layout the corresponding foursquare length of side; The square length of side in all the other moment is calculated by formula 1:
R k = R max 2 * ( root k . v a l u e ) / ( root max . v a l u e ) (formula 1)
In formula 1, R maxfor root node maximum weight time to be engraved in layout the corresponding foursquare length of side; R kfor the square length of side in all the other moment; Root k.value be the weights of a kth root node; Root max.value be the weights of the root node of maximum weight.
4. as claimed in claim 1 for time change layer secondary data time become tree graph layout method, it is characterized in that, described in step C, carry out layout, specifically calculate by row and optimumly fill number, and be applied in this row layout in all moment; Concrete operation step is:
C1. suppose that the line number for current arrangements carries out layout from m node, the child node of m node is denoted as childim, and the changing value in each moment of corresponding node m is (tk, childim), and wherein k represents the moment; At the changing value (tk in each moment of father node corresponding to node m, fatheri) in arrangement space, according to the method near top, calculate the respective mean aspect ratio in not the first row node layout in the same time, and select optimum layout number corresponding to (value is minimum) mean aspect ratio to be optimal layout's number (tk, nk) in each moment; Described mean aspect ratio through type 2 calculates:
A A R = 1 n Σ i = 1 n AS i (formula 2)
In formula 2, AS ibe rectangular aspect ratio corresponding to i-th child node, AS i=Max (h i/ w i, w i/ h i); N is interstitial content; AAR is the mean aspect ratio of tree graph, and the value of AAR is more close to 1, then this rectangle is close to square;
C2. when the filling number in each moment do not reach can top filling time, calculate the mean aspect ratio after filling nk+1 node;
C3. setting nmax is all moment optimal layout's number (tk, nk) maximal value Max [n1..k], i.e. nmax=Max [n1..k], moment filling number being less than to nmax still needs to continue supplement calculation mean aspect ratio, thus under drawing each moment k, corresponding mean aspect ratio separately when all filling numbers belong to [1, nmax];
C4. calculating and filling number is that (nk belongs to nk [1, nmax]) time all moment the average of mean aspect ratio, be averaged the minimum filling number Min [n1..k] of length breadth ratio average and fill number as the optimum in all moment, calculate the optimum filling number that this row is inscribed when all thus, and be applied in this row layout in all moment.
5. by described in claim 1 for time change layer secondary data time become the displaying analysis that tree graph layout method is applied to residues of pesticides data, it is characterized in that, for the residues of pesticides data with time variation and level, by not in the same time under the level of data and time relationship be expressed as many trees, the root node of not tree is in the same time designated as (tk, root), from left to right carry out alignment placement in order on a timeline, the original layout region in each moment is set to square, adopt the mode of row layout, first by (tk, root) child nodes carries out layout to the first row in corresponding region, calculate optimum filling number, and be applied in this row layout in all moment, complete the first row layout, for other child nodes, repeat layout process, the tree graph completing other row fills layout, until the equal layout of child nodes is complete under this father node, complete the equal layout of all nodes in tree construction, thus utilize the tree graph generated to show the level characteristic of agriculture residue certificate and the object of time attribute simultaneously.
CN201510894470.1A 2015-12-08 2015-12-08 For the time-varying tree graph layout method of time-varying hierarchical data and application Active CN105354335B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510894470.1A CN105354335B (en) 2015-12-08 2015-12-08 For the time-varying tree graph layout method of time-varying hierarchical data and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510894470.1A CN105354335B (en) 2015-12-08 2015-12-08 For the time-varying tree graph layout method of time-varying hierarchical data and application

Publications (2)

Publication Number Publication Date
CN105354335A true CN105354335A (en) 2016-02-24
CN105354335B CN105354335B (en) 2018-06-12

Family

ID=55330307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510894470.1A Active CN105354335B (en) 2015-12-08 2015-12-08 For the time-varying tree graph layout method of time-varying hierarchical data and application

Country Status (1)

Country Link
CN (1) CN105354335B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729568A (en) * 2017-11-16 2018-02-23 艾凯克斯(嘉兴)信息科技有限公司 A kind of product structure based on mind map shows method
CN107870231A (en) * 2016-09-26 2018-04-03 北京工商大学 A kind of more attributes contrast method for visualizing for the residual detection data of agriculture
CN108257039A (en) * 2018-01-16 2018-07-06 北京工商大学 The quantitative evaluation method of the maximum residue limit Standard Completeness of pesticide in agricultural product
CN108427765A (en) * 2018-03-23 2018-08-21 北京工商大学 A kind of hierarchical data comparison visual analysis method based on HCT figures
CN111338629A (en) * 2020-03-13 2020-06-26 京东数字科技控股有限公司 Data processing method and device for building tree diagram
CN115345125A (en) * 2022-10-19 2022-11-15 中电云数智科技有限公司 Method for generating recommended layout based on tree outline and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629271A (en) * 2012-03-13 2012-08-08 北京工商大学 Complex data visualization method and equipment based on stacked tree graph
CN103049580A (en) * 2013-01-17 2013-04-17 北京工商大学 Method and device for visualization of layering data
CN103258061A (en) * 2013-06-09 2013-08-21 北京工商大学 Area enclosure hypergraph visualization method based on interpolation algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629271A (en) * 2012-03-13 2012-08-08 北京工商大学 Complex data visualization method and equipment based on stacked tree graph
CN103049580A (en) * 2013-01-17 2013-04-17 北京工商大学 Method and device for visualization of layering data
CN103258061A (en) * 2013-06-09 2013-08-21 北京工商大学 Area enclosure hypergraph visualization method based on interpolation algorithm

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870231A (en) * 2016-09-26 2018-04-03 北京工商大学 A kind of more attributes contrast method for visualizing for the residual detection data of agriculture
CN107870231B (en) * 2016-09-26 2019-10-29 北京工商大学 A kind of more attributes comparison method for visualizing for the residual detection data of agriculture
CN107729568A (en) * 2017-11-16 2018-02-23 艾凯克斯(嘉兴)信息科技有限公司 A kind of product structure based on mind map shows method
CN108257039A (en) * 2018-01-16 2018-07-06 北京工商大学 The quantitative evaluation method of the maximum residue limit Standard Completeness of pesticide in agricultural product
CN108257039B (en) * 2018-01-16 2021-07-02 北京工商大学 Quantitative evaluation method for maximum residue limit standard completeness of pesticide in agricultural product
CN108427765A (en) * 2018-03-23 2018-08-21 北京工商大学 A kind of hierarchical data comparison visual analysis method based on HCT figures
CN108427765B (en) * 2018-03-23 2020-06-12 北京工商大学 Hierarchical data comparison visual analysis method based on HCT (human-computer tomography) diagram
CN111338629A (en) * 2020-03-13 2020-06-26 京东数字科技控股有限公司 Data processing method and device for building tree diagram
CN111338629B (en) * 2020-03-13 2023-11-03 京东科技控股股份有限公司 Data processing method and device for building tree graph
CN115345125A (en) * 2022-10-19 2022-11-15 中电云数智科技有限公司 Method for generating recommended layout based on tree outline and terminal equipment
CN115345125B (en) * 2022-10-19 2023-02-17 中电云数智科技有限公司 Method for generating recommended layout based on tree outline and terminal equipment

Also Published As

Publication number Publication date
CN105354335B (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN105354335A (en) Time-varying tree graph layout method and application for time-varying and hierarchical data
CN105045907B (en) A kind of construction method of vision attention tagging user interest tree for Personalized society image recommendation
CN106685716B (en) Network topology adaptive data visualization method and device
Pontius et al. Components of information for multiple resolution comparison between maps that share a real variable
Hogräfer et al. The state of the art in map‐like visualization
Xu et al. Integrating the system dynamic and cellular automata models to predict land use and land cover change
CN103353923B (en) Adaptive space interpolation method and system thereof based on space characteristics analysis
CN103714577B (en) Three-dimensional model simplification method suitable for model with textures
CN110414380A (en) A kind of students ' behavior detection method based on target detection
CN106778894A (en) A kind of method of author's cooperative relationship prediction in academic Heterogeneous Information network
CN107784380A (en) The optimization method and optimization system of a kind of inspection shortest path
CN102279929B (en) Remote-sensing artificial ground object identifying method based on semantic tree model of object
Wang et al. Comparative analysis of land use/cover change trajectories and their driving forces in two small watersheds in the western Loess Plateau of China
CN106327577A (en) Three-dimensional terrain curved surface optimization method based on local curvature entropy and quadtree structure
CN101916397B (en) Three-dimensional visualization device and method for describing wetland vegetation eco-hydrology response
CN105158761A (en) Radar synthetic phase unwrapping method based on branch-cut method and surface fitting
CN104766280A (en) Quality map phase unwrapping method based on heap sort
CN104252549A (en) Well spacing analysis method based on Kriging interpolation
Duleba et al. Comparing aggregation methods in large-scale group AHP: Time for the shift to distance-based aggregation
CN105512218A (en) Associated hierarchical data visualization method and application
CN104657999A (en) Digital image correlation method based on kernel function
CN105303546A (en) Affinity propagation clustering image segmentation method based on fuzzy connectedness
CN108733952A (en) A kind of soil moisture content Spatial Variability three-dimensional characterizing method based on sequential simulation
Griffin Emergence of fusion/fission cycling and self-organized criticality from a simulation model of early complex polities
CN102314606B (en) Method for positioning nodes of undigraph

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant