CN106484754B - Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique - Google Patents
Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique Download PDFInfo
- Publication number
- CN106484754B CN106484754B CN201610606849.2A CN201610606849A CN106484754B CN 106484754 B CN106484754 B CN 106484754B CN 201610606849 A CN201610606849 A CN 201610606849A CN 106484754 B CN106484754 B CN 106484754B
- Authority
- CN
- China
- Prior art keywords
- branch
- node
- knowledge
- data
- leaf
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
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)
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to a kind of knowledge forest layout method based on hierarchical data Yu diagram data visualization technique, the data of the knowledget opic facet tree of instantiation and the data of knowledge fragment are obtained first, using the data, the drafting of the knowledget opic facet tree of instantiation is realized by the knowledget opic facet tree rendering algorithm of the instantiation based on Bezier;The knowledget opic facet tree of the instantiation of drafting is abstracted as node v, the cognition relationship between knowledget opic is abstracted as side e, knowledge forest is abstracted as figure G (V, E), wherein G represents knowledge forest, and V represents the set of v, and E represents the set of e;It realizes the integral layout of knowledge forest G and shows community structure, complete the knowledge forest based on hierarchical data and diagram data visualization technique and be laid out.Binding hierarchy data and diagram data topology of the present invention realize the layout of the knowledget opic facet tree of instantiation and the layout of knowledge forest, while supporting knowledget opic facet tree and recognizing the visualization of relationship.
Description
[technical field]
It is the present invention relates to data visualization field, in particular to a kind of based on hierarchical data and diagram data visualization technique
Knowledge forest layout method.
[background technique]
The high speed development of science and technology causes knowledge explosion phenomenon to get worse, and multi-source, unilateral, unordered knowledge fragment add
The cognition overload problem of the acute mankind and study are got lost problem.Knowledge forest is a kind of completely new knowledge polymerizing mode, can be incited somebody to action
Knowledge fragment aggregates into the form for meeting human cognitive feature, alleviates the above problem.But knowledge forest data volume is huge and structure
Complexity, user are difficult to directly understand, need to realize its visual presentation using data visualization the relevant technologies.
Knowledge forest had not only included a large amount of knowledget opic facet trees, but also included a large amount of cognition relationships, the former has hierarchical data
Structure feature, the latter have diagram data structure feature.In existing research, the layout method of hierarchical data mainly include with
Lower three classes: node link method, space completion method and tree-model;The visual form of first two technology is not the form of tree, nothing
Method is applied in the visualization of knowledget opic facet tree, and the development of tree-model is also and immature, is not suitble to knowledget opic point
The method of face tree layout.The layout of diagram data mainly includes the layout of non-directed graph and the layout of digraph, the former application is more wide
General technology is that power guides model, and the latter's more prevalence is hierarchical layout algorithm.
It does not support due to the prior art or the visualization of knowledget opic facet tree or does not support the visual of cognition relationship
Change, is difficult in the visualization for being applied directly to knowledge forest.Binding hierarchy data layout and diagram data is needed to be laid out two classes
Technology realizes the visualization of knowledge forest.For the layout method of hierarchical data and diagram data, applicant is new by looking into, retrieval
To 1 patent of invention related to the present invention:
A kind of method for visualizing and equipment of hierarchical data, number of patent application: 2013100171509;The patent proposes
A kind of method for visualizing and equipment of hierarchical data, comprising: tree data is generated according to its detail analysis relationship to data set HD
Structure;Each node in the level of Node B threshold will be lower than in the tree data structure of generation, is calculated with adaptive radiation ring
Method generates sector structure;Each node in the level of Node B threshold will be greater than or equal in the tree data structure of generation, adopted
With interactive mode, son radiation ring, i.e. item chain link are generated with item chain link algorithm;It is drawn on display plane and shows described put
Penetrate ring and item chain link.
In the art solutions of above-mentioned hierarchical data method for visualizing, it is not certainly that visualization result, which is radiation annular,
The form set in right boundary, cannot intuitively show each level element of knowledget opic facet tree.And general hierarchical data visualization
As a result perhaps it is node connection figure or is space blank map, cannot achieve the visualization of knowledget opic facet tree.
[summary of the invention]
It is an object of the invention to overcome problems of the prior art, propose a kind of based on hierarchical data and diagram data
The knowledge forest layout method of visualization technique can support knowledget opic facet tree simultaneously and recognize the visualization of relationship.
To achieve the above objectives, the present invention, which adopts the following technical scheme that, is achieved:
The following steps are included:
Step 1: the data of the knowledget opic facet tree of instantiation and the data of knowledge fragment are obtained;
Step 2: knowledget opic facet tree and knowledge crumb data using the instantiation of step 1 acquisition, by being based on
The knowledget opic facet tree rendering algorithm of the instantiation of Bezier realizes the drafting of the knowledget opic facet tree of instantiation;
Step 3: being abstracted as node v for the knowledget opic facet tree for the instantiation that step 2 is drawn, will be between knowledget opic
Cognition relationship be abstracted as side e, knowledge forest is abstracted as figure G (V, E), wherein G represents knowledge forest, and V represents the set of v,
E represents the set of e;
Step 4: realizing the integral layout of knowledge forest G and show community structure, completes to be based on hierarchical data and diagram data
The knowledge forest of visualization technique is laid out.
Further, the data of the knowledget opic facet tree for being related to instantiation and knowledge fragment are converted in step 1
Json format.
Further, the data of the knowledget opic facet tree of instantiation include branch amount evidence, and branch data structure includes 8
Parameter: the number of the total tbn of Branches of Different Orders, direct junior's branch of branch on the maximum level depth tbl of branch, branch
On bn, branch leafed number tln, the data c of lowest-rank element, the unique identifier ti of branch, branch title na with
And type tp of the Branches of Different Orders in the knowledget opic facet tree of instantiation, under wherein the element of c includes leaf or is nested
Grade branch;
The leaf data of the knowledget opic facet tree of the data composition instantiation of knowledge fragment, leaf data structure includes 4
A parameter: the content ct of web page address u, knowledge fragment, the id identifier fi of knowledge fragment and knowledge where knowledge fragment
Type tp ' of the fragment in the knowledget opic facet tree of instantiation.
Further, step 2 specifically includes:
201, initialization layout control parameter, the node that Beziers at different levels are calculated in conjunction with layout control parameter are sat
Mark;
202, control branch is grown by self-adaptive growth order:
The succession of branch is Bl1,Bl2,...,Bli-1,Bli,Bli+1,...,Blm-1,Blm,Brn,Brn-1,...,Brj+1,
Brj,Brj-1,...,Br2,Br1, wherein BliAnd BrjThe branch of the knowledget opic facet tree left and right side of generation difference table example, m
The quantity of left and right side branch is respectively represented with n;
The quantity of leaf meets following rule on branch: | Bl1|≤|Bl2|≤...≤|Bli-1|≤|Bli|≥|Bli+1|
≥...≥|Blm-1|≥|Blm| and | Brn|≤|Brn-1|≤...≤|Brj+1|≤|Brj|≥|Brj-1|≥...≥|Br2|≥|Br1
|, | Bli| and | Brj| respectively represent BliAnd BrjThe quantity of upper leaf;
203, according to the coordinate (x of root node0, y0) and branch total quantity nb, it is calculated by the following formula the starting point seat of trunk
Mark:It is calculated by the following formula the terminal point coordinate of trunk:
Wherein xi1And xi2Respectively represent trunk TiStart-stop point abscissa;yi1And yi2Respectively represent trunk TiThe ordinate of start-stop point;wt
Represent the linear width of trunk;Bht is to determine that branch starts the definite value parameter of growth position;Lc represents master in an intermediate position
Dry abscissa, lc=x0+wt×M×nb/2;Level represents the height of trunk growth, if i < (nb/2), level=i+
1, otherwise level=nb-i;
204, to the following operation of each branch execution: depth-first traversal, father node of higher level's branch as junior's branch,
Wherein starting point coordinate of the terminal point coordinate of trunk as level-one branch is calculated by the following formula the shellfish three times for representing Branches of Different Orders
Starting point, terminal and two control point coordinates of Sai Er curve:If wherein (xi1, yi1) generation
It is corresponding: (x when the coordinate of table starting point, first control point or second control pointi2, yi2) represent first control point,
Two control points or terminal point coordinate;L represents lst1, lst2 or lst3, and as represents ast1, ast2 or ast3;Wherein, lst1 is indicated
Level-one branch length, lst2 indicate second branch length, and lst3 indicates three-level branch length, lst1 > lst2 > lst3;ast1
Indicate level-one crotch angle, ast2 indicates second branch angle, and ast3 indicates three-level crotch angle, ast1, ast2 and ast3's
Value range is between 0.6 to 0.8;
205, using final stage branch as the father node of leaf, the calculating of the formula according to step 204 represents the three of leaf
Starting point, terminal and the control point coordinates of secondary Bezier, wherein if (xi1, yi1) represent starting point, first control point or second
It is corresponding when the coordinate at a control point: (xi2, yi2) represent first control point, second control point or terminal point coordinate;L is represented
Lsl1, lsl2 or lsl3, as represent asl1, asl2 or asl3;Wherein, lsl1 indicates the Leaf length of level-one branch, lsl2 table
Show that the Leaf length of second branch, lsl3 indicate the Leaf length of three-level branch, lsl1 > lsl2 > lsl3;Asl1 indicates level-one
The leaf angle of branch, the leaf angle of asl2 expression second branch, the leaf angle of asl3 expression three-level branch, asl1,
The value range of asl2 and asl3 is between 0.6 to 1.6;
206, the coordinate calculated according to step 203 to step 205 draws trunk and represents Branches of Different Orders and leaf three times
Bezier, and corresponding text information is added, complete the drafting of the knowledget opic facet tree of instantiation.
Further, 41 parameters are shared in step 201.
Further, the text information added in step 206 includes that knowledget opic, the facet of the knowledget opic and knowledge are broken
Piece adds knowledget opic in trunk position, each facet of the knowledget opic is added in Branches of Different Orders position, in the leaf of branch
Add the knowledge fragment under corresponding facet in position.
Further, step 4 specifically includes:
401, for each node v in G, geometric distance between calculate node v and another arbitrary node u:Wherein vxAnd uxRespectively indicate the x-axis coordinate of node v and u, vyAnd uyTable respectively
Show the y-axis coordinate of node v and u;
402, repulsive force between v and u: f is calculatedr(v, u)=k2/(α×dist(v,u));Wherein α is parameter, and in node
When v and u belong to same corporations, α value is 1, and when node v and u are not belonging to same corporations, α value is 6;
403, attraction between v and u: f is calculateda(v, u)=(dist (v, u))2/k;
404, by the coordinate (v of node vx, vy) it is updated to (vx', vy'), wherein vx'=max (0, min (W, vx)), vy'=
max(0,min(H,vy)), W and H are the width and height of viewable area;
405, final, by continuous iteration, until the coordinate of each node v determines constant, reaches stable state, realize
The integral layout of knowledge forest.
Further, further include step 5: using the Sugiyama algorithm in layout of directed graph, calculating each node v's
Coordinate obtains position of each node v in viewable area, realizes the layout in corporations.
Further, step 5 specifically includes:
501, it eliminates directed loop: if G has ring, will there is the side of ring to reverse, eliminate directed loop;
502, by Node distribution in each layer: specifying each node level number, determine the ordinate of node, if <u, v > belong to
E, then the level number of node u is less than the level number of node v;The step can introduce intermediate node in long side;
503, it minimizes cross edge: a number being specified to every node layer, makes cross edge minimum number;
504, the total length by side and the least principle of number of bends by intermediate node introducing assign each node coordinate, complete
At the layout in corporations.
Compared with prior art, the invention has the following beneficial technical effects:
For the layout of knowledget opic facet tree in the present invention, the knowledge master of the instantiation based on Bezier is proposed
Inscribe facet tree rendering algorithm, solve instantiation knowledget opic facet tree imbalance and branch interlock leaf be overlapped etc. ask
Topic;For the layout of forest, the layout of entire forest is realized by improved FR algorithm and shows community structure.Knot of the present invention
Hierarchical data and diagram data topology are closed, realizes the layout of the knowledget opic facet tree of instantiation and the layout of knowledge forest,
Knowledget opic facet tree is supported simultaneously and recognizes the visualization of relationship.
Further, branch growth direction is controlled by layout parameter in the present invention and growth angle is adaptive, solved
The knowledget opic facet tree that knowledget opic facet leaf quantity is more and the leaf quantity gap of different branches is larger and causes
It is easy the problem of uneven and branch interlocks, leaf is overlapped.
Further, layout parameter up to 41 in the present invention, the knowledget opic facet of instantiation can be controlled well
The display effect of tree complies with the growth rhythm set in nature, is conducive to user and learns to use.
Further, knowledget opic facet root vertex in corporations is realized by Sugiyama algorithm in the present invention
Layout, for the community structure in entire knowledge forest, more intuitively shows between each corporations' interior nodes
Cognition relationship, facilitate user learn and use.
[Detailed description of the invention]
Fig. 1 is flow chart of the invention.
Fig. 2 is the knowledget opic facet tree rendering algorithm process of the instantiation proposed by the invention based on Bezier
Figure.
Fig. 3 is the instance graph for the knowledget opic facet that Fig. 2 is drawn.
Fig. 4 is the instance graph of knowledge forest community structure realized when α value is by 6 in the present invention.
Fig. 5 is the instance graph of knowledge forest community structure realized when α value is by 1 in the present invention.
[specific embodiment]
Below in conjunction with the drawings and the specific embodiments, the present invention is described in further detail.It provides in the present invention first
The term definition being related to.
Knowledge forest: it is a kind of completely new fragmentation knowledge polymerizing mode, fragmentation knowledge polymerizing process is regarded as and " is known
Know theme facet tree generation-fragmentation knowledge and assemble-recognize relation excavation " triphasic knowledge forest generating process, it can
Multi-source, unilateral, unordered fragmentation knowledge such as Chinese and English text and picture, video multimedia resource are aggregated into and met
Human cognitive learns the mode of the features such as multi-dimensional nature, relevance, conformability.
Knowledget opic facet tree: refer to the hierarchical structure tree for describing a certain knowledget opic institutional framework, knowledget opic facet tree
Data mainly include branch data.
Instantiation knowledget opic facet tree: refer to the knowledget opic facet comprising describing a certain all knowledge fragments of knowledget opic
Tree, i.e., the leaf data for also including in branch data, the content of leaf data is exactly the data of knowledge fragment.
Cognition relationship: refer to the dependence formed between knowledget opic due to cognition needs in learning process.
Corporations refer to that a part of knowledget opic forms a society since cognition relationship is gathered into a cluster in knowledge forest
Group.
The initialization of knowledge forest: being expressed as binary group KF=(FT, LD) for knowledge forest, and wherein FT indicates knowing for instantiation
Know theme facet tree set, LD indicates the cognition set of relationship between knowledget opic, i.e.,Instantiation is known
Triple KTI=(KFT, KFS, MP) can be further represented as by knowing theme facet tree, and wherein KFT is expressed as knowledget opic facet tree
Set, KFS indicate knowledge set of patches, and MP is indicated between knowledget opic facet leaf child node Leaf (KFT) and knowledge fragment
Mapping relations set, i.e.,Knowledget opic facet tree be represented by triple KT=(ku,
FR, R), wherein root node ku indicates a knowledget opic, such as " linear list ".Intermediate node set FR indicates point of knowledget opic
Face set, for example, facet includes " definition ", " storage organization " etc. for " linear list ".It is knowledget opic
Facet between there are hyponymies between semantic relation set, such as " storage organization " and " sequential core-pulling ".
The present invention is based on the knowledge forest layout methods of hierarchical data and diagram data visualization technique, by being based on Bezier
The knowledget opic facet tree rendering algorithm of curve realizes the layout of knowledget opic facet tree, passes through FR algorithm and Sugiyama algorithm
Realize the layout of forest and theme corporations, as shown in Figure 1, the specific steps are as follows:
Step 1: following initialization operation is executed:
101, data prediction: respectively that the knowledget opic facet tree and knowledge that are related to instantiation is broken according to the demand of drafting
The data of piece are converted to specific json format, for it is subsequent carry out in a browser draw prepare.Wherein, the knowledge of instantiation
The branch data structure of theme facet tree includes 8 parameters: tbl represents the maximum level depth of the branch;Tbn refers on the branch
The sum of Branches of Different Orders, Branches of Different Orders refer to direct junior's branch on the branch to final stage branch;Bn refers to the direct of the branch
The number of junior's branch;Tln refers to the leafed number of institute on the branch;The element of c refers to the data of lowest-rank element, can be leaf
Data or nesting junior's branch data;Ti refers to the unique identifier of the branch;Na refers to the title of the branch;Tp refers to respectively
Type of the grade branch in the knowledget opic facet tree of instantiation.
The leaf data of the knowledget opic facet tree of instantiation are made of the data of knowledge fragment, and leaf data structure includes
4 parameters: u represents the web page address where the knowledge fragment;Ct refers to the content of the knowledge fragment, and majority is content of text, also
It can be the multimedia resources such as picture or video;Fi represents the id identifier of the knowledge fragment;Tp ' refers to the knowledge fragment in reality
Type in the knowledget opic facet tree of exampleization.
Step 2: instantiation is realized by the knowledget opic facet tree rendering algorithm of the instantiation based on Bezier
The drafting of knowledget opic facet tree, solve instantiation knowledget opic facet tree imbalance and branch interlock leaf be overlapped etc.
Problem;The knowledget opic facet tree for the instantiation completed includes the knowledge of the instantiation obtained after pretreatment in step 1
The data file of theme facet tree and knowledge fragment, the coordinate (x of the knowledget opic facet root vertex of instantiation0, y0), and
Control the control parameter M of the knowledget opic facet tree display level of instantiation.Algorithm description is as follows:
The input of algorithm is obtained data file after pretreatment, output be the instantiation drawn knowledget opic point
Face tree simultaneously shows in a browser.Referring to fig. 2, the specific steps of algorithm include following 6 step:
201, initialize the layout control parameter of 41 trunks, branch and leaf: parameter is related to length, width, angle, face
5 aspect such as color, control parameter, the parameter for being related to angle and part control parameter therein make the direction of growth of branch adaptive
It answers, the node coordinate of Beziers at different levels is calculated in conjunction with these parameters.Wherein, length parameter 12, width parameter 7,
Angle parameter 6, color parameter 6, control parameter 10.Length parameter includes and certain branch length or its junior's branch length
Related 5 parameters, 5 parameters related with the Leaf length on multistage branch, beam length and text size, wherein five
A branch length includes at least level-one branch length, second branch length and three-level branch length, and Leaf length includes at least one
Leaf length, the Leaf length of second branch and the Leaf length of three-level branch of grade branch, rest parameter can according to need
Setting, for example increase branch series etc.;Text size, which refers to, clicks some leaf, the prompt text size of explicit knowledge's fragment;
Width parameter includes trunk width, level-one branch width, second branch width, the Leaf width of level-one branch, second branch
Leaf width, highlighted Leaf width and textwidth;Angle parameter includes level-one crotch angle, second branch angle, three fractions
Branch angle, the leaf angle of level-one branch, the leaf angle of second branch, the leaf angle of three-level branch;Color parameter includes
Trunk color, level-one branch color, second branch color, leaf color, highlighted branch color, highlighted leaf color;Control ginseng
Number includes control knowledget opic facet tree display level, controls the width being entirely laid out, the height that control is entirely laid out, control point
Branch spare space position, control leaf spatial position, control need the length of display text, control trunk space, control branch
Space, the x coordinate and y-coordinate for controlling text.By this 41 parameters, the knowledget opic facet of instantiation can be controlled well
The display effect of tree complies with the growth rhythm set in nature, is conducive to user and learns to use.
202, control branch growth order is adaptive, is described as follows example:
By taking the knowledget opic facet tree of certain instantiation as an example, before handling data, the number of leaf on each branch
Mesh be it is random, the knowledget opic facet tree for the instantiation drawn at this time is likely to be unbalance;Divide after sequence processing
The succession of branch is Bl1,Bl2,...,Bli-1,Bli,Bli+1,...,Blm-1,Blm,Brn,Brn-1,...,Brj+1,Brj,
Brj-1,...,Br2,Br1, wherein Bli、BrjRespectively represent the branch of the knowledget opic facet tree left and right side of instantiation, m and n difference
The quantity of left and right side branch is represented, | Bli|、|Brj| respectively represent Bli、BrjThe quantity of upper leaf;
The quantity of leaf meets following rule on branch: | Bl1|≤|Bl2|≤...≤|Bli-1|≤|Bli|≥|Bli+1|
≥...≥|Blm-1|≥|Blm| and | Brn|≤|Brn-1|≤...≤|Brj+1|≤|Brj|≥|Brj-1|≥...≥|Br2|≥|Br1
|, the knowledget opic facet tree left and right instantiated at this time is in a basic balance, and middle section leaf quantity is most, to upper and lower two sides leaf
Subnumber mesh successively decreases respectively, meets the growth rhythm of trees in nature.
203, according to (x0, y0) and branch total quantity nb, it is calculated by the following formula the starting point coordinate of trunk:(x0, y0) indicate root node coordinate;It is calculated by the following formula the terminal point coordinate of trunk:Wherein xi1And xi2Respectively represent the trunk of the theme facet tree of i-th of instantiation
TiStart-stop point abscissa, yi1And yi2Respectively represent trunk TiThe ordinate of start-stop point, wt represent the linear width of trunk, bht
For definite value parameter, determine that branch starts the position of growth.Lc represents the abscissa of trunk in an intermediate position, is risen according to trunk
Coordinate and trunk height are put to calculate the abscissa in trunk middle position: lc=x0It is raw that+wt × M × nb/2, level represent trunk
Long height can determine the ordinate of trunk terminal, its calculation formula is: if i < (nb/2), level=i+1, otherwise
Level=nb-i.
204, following operation: depth-first traversal, father node of higher level's branch as junior's branch is executed to each branch
(wherein starting point coordinate of the terminal point coordinate of trunk as level-one branch), is calculated by the following formula and represents Branches of Different Orders three times
Starting point, terminal and two control point coordinates of Bezier:If wherein (xi1, yi1)
It is corresponding: (x when representing the coordinate of starting point, first control point or second control pointi2, yi2) represent first control point,
Second control point or terminal point coordinate;L represents lst1, lst2 or lst3, and as represents ast1, ast2 or ast3.Wherein, lst1 table
Show level-one branch length, lst2 indicates second branch length, and lst3 indicates three-level branch length, their value foundation is lst1
> lst2 > lst3;Ast1 indicates level-one crotch angle, and ast2 indicates second branch angle, and ast3 indicates three-level crotch angle,
Their value range is between 0.6 to 0.8.
205, using final stage branch as the father node of leaf, the calculating of the formula according to step 204 represents the three of leaf
Starting point, terminal and the control point coordinates of secondary Bezier, wherein if (xi1, yi1) represent starting point, first control point or second
It is corresponding when the coordinate at a control point: (xi2, yi2) represent first control point, second control point or terminal point coordinate;L is represented
Lsl1, lsl2 or lsl3, as represent asl1, asl2 or asl3.Wherein, lsl1 indicates Leaf length, the lsl2 table of level-one branch
Show that the Leaf length of second branch, lsl3 indicate the Leaf length of three-level branch, their value foundation is lsl1 > lsl2 >
lsl3;Asl1 indicates that the leaf angle of level-one branch, asl2 indicate that the leaf angle of second branch, asl3 indicate three-level branch
Leaf angle, their value range are between 0.6 to 1.6.
206, the coordinate calculated according to step 203 to step 205 draws trunk and represents Branches of Different Orders and leaf three times
Bezier, and corresponding text information is added, text information mainly includes knowledget opic, facet and knowledge fragment, in master
Knowledget opic is added in dry position, adds each facet of the knowledget opic in Branches of Different Orders, adds and corresponds in the leaf of certain branch
Knowledge fragment under facet.
It is made of referring to the knowledget opic facet tree of Fig. 3, this instantiation trunk, branch, leaf, the coordinate at these positions
Be calculated, be meant that by the algorithm of step 2: trunk corresponds to knowledget opic;Branch corresponds to each point of knowledget opic
Face, second branch are the sub- branches of level-one branch, refer to the sub- facet of certain facet;Leaf on branch is under the facet
Knowledge fragment.
Step 3: executing following operation: knowledge forest be abstracted as figure G (V, E), wherein the instantiation generated by step 2
Knowledget opic facet tree be conceptualized as node v, cognition relationship is conceptualized as side e;G represents knowledge forest, and V represents the set of v,
E represents the set of e.
Step 4: improving FR algorithm, realizes the integral layout of knowledge forest G and shows community structure.Knowledge forest it is whole
Body layout refers to the coordinate for calculating all knowledget opics and shows all knowledget opics and its cognition relationship, moreover it is possible to embody corporations' knot
Structure.Community structure refers to that the connection in knowledge forest between a part of knowledget opic point is denser, is gathered into a cluster, is formed
One corporation.It is described in detail below: by introducing new parameter alpha, increasing the repulsive force between the node for belonging to different corporations, section
Repulsive force formula between point v and u is by fr(v, u)=k2/ dist (v, u) is changed to fr(v, u)=k2/(α*dist(v,u))。
In formula, if node v and u belong to same corporations, α value is 1;If node v and u are not belonging to same corporations, α value is can root
It is adjusted according to situation, by Experimental comparison, when α value is 6 in the layout of knowledge forest, layout effect is preferable.
Algorithm is described as follows:
For each node v in G, by calculating the repulsive force between two arbitrary nodes, thus any to the two
Node is laid out, specific as follows:
401, the geometric distance between calculate node v and another arbitrary node u:Wherein vx、uxIndicate the x-axis coordinate of node v and u, vy、uyIndicate node v and u
Y-axis coordinate.
402, repulsive force between v and u: f is calculatedr(v, u)=k2/(α×dist(v,u));
403, attraction between v and u: f is calculateda(v, u)=(dist (v, u))2/k;
404, by the coordinate (v of node vx, vy) it is updated to (vx', vy'), wherein vx'=max (0, min (W, vx)), vy'=
max(0,min(H,vy)), W and H are the width and height of display area;Display area is the display model of the viewable areas such as browser
It encloses;
405, final, by continuous iteration, until the coordinate of each node v determines constant, reaches stable state, realize
The integral layout of knowledge forest.
Referring to fig. 4, the integral layout and community structure of the figure explicit knowledge forest, the node in figure indicate knowing for instantiation
Know theme facet tree, the side in figure indicates the cognition relationship between node.There are four corporations altogether in figure, show as four node clusters.
Fig. 4 is that the knowledge forest that parameter alpha value in step 4 is 6 is laid out effect, and Fig. 5 is that the parameter alpha value in step 4 is 1 to know
Know forest and be laid out effect, it can be seen that Fig. 5 cannot clearly display community structure.
Step 5: using the Sugiyama algorithm in layout of directed graph, the coordinate of each node v is calculated, since knowledge is gloomy
The node of woods is all the root node of the knowledget opic facet tree of instantiation, therefore the root of the knowledget opic facet tree instantiated
The layout in corporations is realized in position of the node in viewable area, and viewable area is exactly the display area of browser;Relatively
For community structure in the entire knowledge forest of step 4, recognizing between each corporations' interior nodes is more intuitively shown
MS system facilitates user to learn and use.Algorithm description is as follows:
501, it eliminates directed loop: if G has ring, will there is the side of ring to reverse, eliminate directed loop.Ring is due in figure G
It is formed in the presence of the node can be returned to by other node from some node.Specifically include in ring is node, node
Refer to knowledget opic.Because the cognition relationship in the present invention be it is oriented, corresponding side is oriented, thus formed ring
It is also oriented.
502, node v is distributed in each layer: specifies each node level number, to determine the ordinate of node, it is therefore an objective to
It is essentially the flow direction of each edge from top to bottom, if<u,v>belong to E, then the level number of node u is less than the level number of node v.
The step can introduce intermediate node in long side.
503, it minimizes cross edge: a number being specified to every node layer, so that cross edge quantity is few as far as possible.
504, assign each node coordinate: the number of bends for making the total length on side and being introduced by intermediate node is minimum.
505, figure G is returned, and eliminates intermediate node.
The invention discloses a kind of the knowledge forest layout method based on hierarchical data Yu diagram data visualization technique, key
Step includes: (1) by the knowledget opic facet tree rendering algorithm based on Bezier, solves the knowledget opic point of instantiation
Face tree is uneven and branch staggeredly, leaf overlap problem;(2) the FR algorithm in non-directed graph layout is improved, increase belongs to difference
The repulsive force between knowledget opic facet tree instantiated between corporations realizes the layout of forest, shows community structure;(3) it transports
The layout in theme corporations is realized with the Sugiyama algorithm in layout of directed graph.The invention proposes complete knowledge forest cloth
Office's method, to realize that the interaction design of knowledge forest is laid a good foundation with visual navigation.
Claims (7)
1. a kind of knowledge forest layout method based on hierarchical data Yu diagram data visualization technique, it is characterised in that: including with
Lower step:
Step 1: the data of the knowledget opic facet tree of instantiation and the data of knowledge fragment are obtained;
Step 2: knowledget opic facet tree and knowledge crumb data using the instantiation of step 1 acquisition, by being based on shellfish plug
The knowledget opic facet tree rendering algorithm of the instantiation of your curve realizes the drafting of the knowledget opic facet tree of instantiation;
Step 3: the knowledget opic facet tree for the instantiation that step 2 is drawn is abstracted as node v, by recognizing between knowledget opic
MS system is abstracted as side e, and knowledge forest is abstracted as figure G (V, E), wherein G represents knowledge forest, and V represents the set of v, E generation
The set of table e;
Step 4: realizing the integral layout of knowledge forest G and show community structure, completes visual based on hierarchical data and diagram data
The knowledge forest of change technology is laid out;
The data of the knowledget opic facet tree of instantiation include branch amount evidence, and branch data structure includes 8 parameters: branch is most
The total tbn of Branches of Different Orders on big level depth tbl, branch, the number bn of direct junior's branch of branch, all leaves on branch
Number tln, the data c of lowest-rank element, the unique identifier ti of branch, the title na of branch and the Branches of Different Orders of son are in example
Type tp in the knowledget opic facet tree of change, wherein the element of c includes junior's branch of leaf or nesting;
The leaf data of the knowledget opic facet tree of the data composition instantiation of knowledge fragment, leaf data structure include 4 ginsengs
Number: the content ct of web page address u, knowledge fragment, the id identifier fi of knowledge fragment and knowledge fragment where knowledge fragment
Type tp ' in the knowledget opic facet tree of instantiation;
Step 2 specifically includes:
201, initialization layout control parameter, the node coordinate of Beziers at different levels is calculated in conjunction with layout control parameter;
202, control branch is grown by self-adaptive growth order:
The succession of branch is Bl1,Bl2,...,Bli-1,Bli,Bli+1,...,Blm-1,Blm,Brn,Brn-1,...,Brj+1,Brj,
Brj-1,...,Br2,Br1, wherein BliAnd BrjThe branch of the knowledget opic facet tree left and right side of generation difference table example, m and n
Respectively represent the quantity of left and right side branch;
The quantity of leaf meets following rule on branch: | Bl1|≤|Bl2|≤...≤|Bli-1|≤|Bli|≥|Bli+1|≥...≥
|Blm-1|≥|Blm| and | Brn|≤|Brn-1|≤...≤|Brj+1|≤|Brj|≥|Brj-1|≥...≥|Br2|≥|Br1|, | Bli|
With | Brj| respectively represent BliAnd BrjThe quantity of upper leaf;
203, according to the coordinate (x of root node0, y0) and branch total quantity nb, it is calculated by the following formula the starting point coordinate of trunk:It is calculated by the following formula the terminal point coordinate of trunk:
Wherein xi1And xi2Respectively represent trunk TiStart-stop point abscissa;yi1And yi2Respectively represent trunk TiThe ordinate of start-stop point;wt
Represent the linear width of trunk;Bht is to determine that branch starts the definite value parameter of growth position;Lc represents master in an intermediate position
Dry abscissa, lc=x0+wt×M×nb/2;Level represents the height of trunk growth, if i < (nb/2), level=i+
1, otherwise level=nb-i;M indicates the control parameter of the knowledget opic facet tree display level of control instantiation;
204, to the following operation of each branch execution: depth-first traversal, father node of higher level's branch as junior's branch, wherein
Starting point coordinate of the terminal point coordinate of trunk as level-one branch is calculated by the following formula the Bezier three times for representing Branches of Different Orders
Starting point, terminal and two control point coordinates of curve:If wherein (xi1, yi1) represent
It is corresponding: (x when the coordinate of point, first control point or second control pointi2, yi2) represent first control point, second
Control point or terminal point coordinate;L represents lst1, lst2 or lst3, and as represents ast1, ast2 or ast3;Wherein, lst1 indicates level-one
Branch length, lst2 indicate second branch length, and lst3 indicates three-level branch length, lst1 > lst2 > lst3;Ast1 is indicated
Level-one crotch angle, ast2 indicate second branch angle, and ast3 indicates three-level crotch angle, the value of ast1, ast2 and ast3
Range is between 0.6 to 0.8;
205, using final stage branch as the father node of leaf, the formula according to step 204 calculates the shellfish three times for representing leaf
Starting point, terminal and the control point coordinates of Sai Er curve, wherein if (xi1, yi1) represent starting point, first control point or second control
It is corresponding: (x when making the coordinate of pointi2, yi2) represent first control point, second control point or terminal point coordinate;L is represented
Lsl1, lsl2 or lsl3, as represent asl1, asl2 or asl3;Wherein, lsl1 indicates the Leaf length of level-one branch, lsl2 table
Show that the Leaf length of second branch, lsl3 indicate the Leaf length of three-level branch, lsl1 > lsl2 > lsl3;Asl1 indicates level-one
The leaf angle of branch, the leaf angle of asl2 expression second branch, the leaf angle of asl3 expression three-level branch, asl1,
The value range of asl2 and asl3 is between 0.6 to 1.6;
206, the coordinate calculated according to step 203 to step 205 draws trunk and represents the shellfish plug three times of Branches of Different Orders and leaf
That curve, and corresponding text information is added, complete the drafting of the knowledget opic facet tree of instantiation.
2. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 1
Method, it is characterised in that: the data of the knowledget opic facet tree for being related to instantiation and knowledge fragment are converted into json in step 1
Format.
3. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 1
Method, it is characterised in that: 41 parameters are shared in step 201.
4. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 1
Method, it is characterised in that: the text information added in step 206 includes knowledget opic, the facet of the knowledget opic and knowledge fragment,
Knowledget opic is added in trunk position, each facet of the knowledget opic is added in Branches of Different Orders position, in the leaf position of branch
Set the knowledge fragment added under corresponding facet.
5. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 1
Method, it is characterised in that: step 4 specifically includes:
401, for each node v in G, geometric distance between calculate node v and another arbitrary node u:Wherein vxAnd uxRespectively indicate the x-axis coordinate of node v and u, vyAnd uyTable respectively
Show the y-axis coordinate of node v and u;
402, repulsive force between v and u: f is calculatedr(v, u)=k2/(α×dist(v,u));Wherein α is parameter, and in node v and u
When belonging to same corporations, α value is 1, and when node v and u are not belonging to same corporations, α value is 6;
403, attraction between v and u: f is calculateda(v, u)=(dist (v, u))2/k;
404, by the coordinate (v of node vx, vy) it is updated to (vx', vy'), wherein vx'=max (0, min (W, vx)), vy'=max
(0,min(H,vy)), W and H are the width and height of viewable area;
405, final, by continuous iteration, until the coordinate of each node v determines constant, reaches stable state, realize knowledge
The integral layout of forest.
6. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 1
Method, it is characterised in that: further include step 5: using the Sugiyama algorithm in layout of directed graph, the seat of each node v is calculated
Mark obtains position of each node v in viewable area, realizes the layout in corporations.
7. a kind of knowledge forest layout side based on hierarchical data Yu diagram data visualization technique according to claim 6
Method, it is characterised in that: step 5 specifically includes:
501, it eliminates directed loop: if G has ring, will there is the side of ring to reverse, eliminate directed loop;
502, by Node distribution in each layer: each node level number is specified, determines the ordinate of node, if < u, v > belong to E,
Then the level number of node u is less than the level number of node v;The step can introduce intermediate node in long side;
503, it minimizes cross edge: a number being specified to every node layer, makes cross edge minimum number;
504, the total length by side and the least principle of number of bends by intermediate node introducing assign each node coordinate, complete society
Layout in group.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610606849.2A CN106484754B (en) | 2016-07-28 | 2016-07-28 | Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610606849.2A CN106484754B (en) | 2016-07-28 | 2016-07-28 | Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106484754A CN106484754A (en) | 2017-03-08 |
CN106484754B true CN106484754B (en) | 2019-08-23 |
Family
ID=58273155
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610606849.2A Active CN106484754B (en) | 2016-07-28 | 2016-07-28 | Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106484754B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106934422B (en) * | 2017-03-16 | 2019-07-26 | 浙江工业大学 | Hierarchical visual abstraction method based on improved force guide diagram layout |
CN108108430B (en) * | 2017-12-18 | 2020-08-28 | 西安交通大学 | Forest virtual reality system implementation method based on Unity3D knowledge |
CN108280153B (en) * | 2018-01-08 | 2022-01-07 | 天津科技大学 | Intelligent aggregation method for fragmented knowledge |
CN108304519B (en) * | 2018-01-24 | 2020-08-18 | 西安交通大学 | Knowledge forest construction method based on graph database |
CN109068152A (en) * | 2018-08-20 | 2018-12-21 | 浙江大学 | A kind of generation method of story line visual layout |
CN109766478B (en) * | 2019-01-08 | 2021-06-29 | 浙江财经大学 | Semantic-enhanced large-scale multivariate graph simplified visualization method |
CN110209814B (en) * | 2019-05-23 | 2021-02-02 | 西安交通大学 | Method for extracting knowledge topic from encyclopedic knowledge website by utilizing domain modeling |
CN112668143A (en) * | 2020-11-23 | 2021-04-16 | 北京机电工程研究所 | Dynamic visual automatic layout method for hierarchical structure of command relationship |
CN112818263B (en) * | 2021-01-22 | 2023-08-18 | 西安交通大学 | Implementation method of forest navigation learning system based on augmented reality technology knowledge |
CN113254739B (en) * | 2021-04-28 | 2023-03-14 | 西安交通大学 | Topic facet tree visualization method based on first-order curve |
WO2023007270A1 (en) * | 2021-07-26 | 2023-02-02 | Carl Wimmer | Foci analysis tool |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309979A (en) * | 2013-06-15 | 2013-09-18 | 昆明能讯科技有限责任公司 | Knowledge cube model algorithm based on graph theory |
CN105894091A (en) * | 2016-03-31 | 2016-08-24 | 湘潭大学 | Test question difficulty factor knowledge discovery method based on collaborative decision-making mechanism |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7348982B2 (en) * | 2004-09-30 | 2008-03-25 | Microsoft Corporation | Method, system, and computer-readable medium for creating and laying out a graphic within an application program |
-
2016
- 2016-07-28 CN CN201610606849.2A patent/CN106484754B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309979A (en) * | 2013-06-15 | 2013-09-18 | 昆明能讯科技有限责任公司 | Knowledge cube model algorithm based on graph theory |
CN105894091A (en) * | 2016-03-31 | 2016-08-24 | 湘潭大学 | Test question difficulty factor knowledge discovery method based on collaborative decision-making mechanism |
Also Published As
Publication number | Publication date |
---|---|
CN106484754A (en) | 2017-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106484754B (en) | Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique | |
CN106685716B (en) | Network topology adaptive data visualization method and device | |
CN109167686B (en) | Layout and display method based on multilayer complex network topology | |
CN104183023B (en) | The construction method of many scene graph in a kind of distributed virtual environment | |
CN110321999A (en) | Neural computing figure optimization method | |
CN114448087A (en) | Radiation type power distribution network dynamic topology visualization method and system | |
CN111813974A (en) | Self-adaptive practice system based on image semantic analysis | |
KR20210152371A (en) | Method and device for image generation, apparatus, and medium | |
CN115202661B (en) | Hybrid generation method with hierarchical structure layout and related equipment | |
CN109739995A (en) | A kind of information processing method and device | |
CN111241348B (en) | Method for dynamically adjusting Tree spacing based on Walker's Tree | |
CN113806560A (en) | Power data knowledge graph generation method and system | |
CN108304519A (en) | A kind of knowledge forest construction method based on chart database | |
Li | [Retracted] Intelligent Environmental Art Design Combining Big Data and Artificial Intelligence | |
Chen | Research on the application of digital media art in animation control based on Maya MEL language | |
Muelder et al. | A treemap based method for rapid layout of large graphs | |
Schulz et al. | Grooming the hairball-how to tidy up network visualizations? | |
CN116012094A (en) | Depth map matching network and fashion collocation recommendation method based on same | |
CN103995886B (en) | A kind of various dimensions product-design knowledge pushes framework and construction method | |
CN114239237A (en) | Power distribution network simulation scene generation system and method supporting digital twinning | |
CN103886635B (en) | Self-adaption LOD model establishing method based on face clustering | |
Yan et al. | Research and application of the test data visualization | |
CN103678888A (en) | Cardiac blood flowing indicating and displaying method based on Euler fluid simulation algorithm | |
Xiao | Optimized soft frame design of traditional printing and dyeing process in Xiangxi based on pattern mining and edge-driven scene understanding | |
Yang et al. | [Retracted] Artistic Expression in Visual Communication Design in Multimedia Background |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |