CN107357846B - The methods of exhibiting and device of relation map - Google Patents
The methods of exhibiting and device of relation map Download PDFInfo
- Publication number
- CN107357846B CN107357846B CN201710497163.9A CN201710497163A CN107357846B CN 107357846 B CN107357846 B CN 107357846B CN 201710497163 A CN201710497163 A CN 201710497163A CN 107357846 B CN107357846 B CN 107357846B
- Authority
- CN
- China
- Prior art keywords
- connection path
- path
- associated nodes
- grid
- coordinate
- 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/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9038—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
Abstract
The invention discloses a kind of methods of exhibiting of relation map and devices.Wherein method includes: the path list obtained between first object node and at least one second destination node, wherein path list may include n connection path, have m associated nodes in n connection path;The frequency occurred according to node carries out a minor sort to n connection path, and carries out two minor sorts to n connection path according to the similarity of connection path;For each connection path after two minor sorts, according to the dimension information at intended display interface calculate separately each connection path included in each associated nodes coordinate;The coordinate of common points is merged to obtain the final coordinate of each common points;All nodes are plotted on intended display interface according to its coordinate, and draw line.Thus, it is possible to which effective position of the distribution node on intended display interface, forms clean and tidy displaying.
Description
Technical field
The present invention relates to the methods of exhibiting and device of technical field of data processing more particularly to a kind of relation map.
Background technique
Currently, user may wish to obtain and close on two surfaces sometimes in the correlativity inquired between destination node
System compares the connection between the node become estranged.For example, user may need to obtain two surfaces so that destination node is enterprise as an example
Contacting between the co-relation enterprise A relatively become estranged and enterprise B.
In the related technology, the relation map between destination node is usually obtained by relational query scheduling algorithm, wherein should
Correlation in relation map between inclusion relation node and each node, then, using the method based on electric field simulation
The relation map is shown and is laid out, for example, bandwagon effect is as shown in Figure 1.
But presently, there are the problem of be: be shown and be laid out using the method based on electric field simulation, will lead to relationship
Interface shape shared by map is larger, and shows that the utilization rate at interface is not high, especially, when the method application based on electric field simulation
When displaying and layout of the mobile terminal to carry out relation map, since the screen of mobile terminal is smaller, need user constantly sliding
Dynamic screen checks the relation map of displaying, and user experience is caused to be deteriorated.
Summary of the invention
The purpose of the present invention is intended to solve above-mentioned one of technical problem at least to a certain extent.
For this purpose, the first purpose of this invention is to propose a kind of methods of exhibiting of relation map.This method can make
Relation map can effectively corresponding position of the distribution node on intended display interface, can not only be formed and neatly clearly be shown
Effect, and intended display interface can be efficiently utilized, the user experience is improved.
Second object of the present invention is to propose a kind of displaying device of relation map.
Third object of the present invention is to propose a kind of terminal device.
Fourth object of the present invention is to propose a kind of non-transitorycomputer readable storage medium.
In order to achieve the above objectives, the methods of exhibiting for the relation map that first aspect present invention embodiment proposes, comprising: obtain
Path list between first object node and at least one second destination node, wherein the path list includes n connection
Path has m associated nodes in the n connection path, wherein the m associated nodes include the first object section
Point, at least one described second destination node and other associated nodes, n are positive integer, and m is the positive integer greater than 2;According to node
The frequency of appearance carries out a minor sort to the n connection path, and according to the similarity of connection path to the n link road
Diameter carries out two minor sorts;For each connection path after two minor sorts, counted respectively according to the dimension information at intended display interface
Calculate the coordinate of each associated nodes included in each connection path;It will be each shared in the n connection path
The coordinate of node merges respectively, and using the coordinate after merging as the final coordinate of each common points;According to meter
The m associated nodes are plotted on the intended display interface by obtained coordinate, while will according to the connection path
The m associated nodes being plotted on the intended display interface carry out line.
The methods of exhibiting of relation map according to an embodiment of the present invention, can obtain first object node and at least one second
Path list between destination node, the path list may include n connection path, have m association in the n connection path
Node, and the connection path in n connection path with common points is adjusted to adjacent position, and by similar connection path tune
It is whole to arrive adjacent position, to obtain updated n connection path;Later, for updated each connection path, according to target
Show that the dimension information at interface calculates separately the coordinate of each associated nodes included in each connection path;Then, by n
The coordinate of each common points in connection path merges respectively, and using the coordinate after merging as each common points
Final coordinate;Finally, associated nodes are plotted on intended display interface according to the coordinate being calculated, and line is drawn to obtain
To final relation map.In this way, relation map effectively distribution node can be enabled corresponding on intended display interface
Position can not only form clean and tidy clearly bandwagon effect (such as the case where not intersecting), but also can efficiently utilize target
Show interface, the user experience is improved.
In order to achieve the above objectives, the displaying device for the relation map that second aspect of the present invention embodiment proposes, comprising: obtain
Module, for obtaining the path list between first object node and at least one second destination node, wherein the path column
Table includes n connection path, has m associated nodes in the n connection path, wherein the m associated nodes include institute
First object node, at least one described second destination node and other associated nodes are stated, n is positive integer, and m is just greater than 2
Integer;First sorting module, the frequency for occurring according to node carry out a minor sort to the n connection path;Second row
Sequence module, for carrying out two minor sorts to the n connection path according to the similarity of connection path;Computing module is used for needle
To each connection path after two minor sorts, each connection path is calculated separately according to the dimension information at intended display interface
Included in each associated nodes coordinate;Coordinate merging module, for by each common section in the n connection path
The coordinate of point merges respectively, and using the coordinate after merging as the final coordinate of each common points;Display module,
For the m associated nodes to be plotted in the intended display interface according to the coordinate being calculated, while according to described
The m associated nodes being plotted on the intended display interface are carried out line by connection path.
The displaying device of relation map according to an embodiment of the present invention, can obtain first object node and at least one second
Path list between destination node, the path list may include n connection path, have m association in the n connection path
Node, and the connection path in n connection path with common points is adjusted to adjacent position, and by similar connection path tune
It is whole to arrive adjacent position, to obtain updated n connection path;Later, for updated each connection path, according to target
Show that the dimension information at interface calculates separately the coordinate of each associated nodes included in each connection path;Then, by n
The coordinate of each common points in connection path merges respectively, and using the coordinate after merging as each common points
Final coordinate;Finally, associated nodes are plotted on intended display interface according to the coordinate being calculated, and line is drawn to obtain
To final relation map.In this way, relation map effectively distribution node can be enabled corresponding on intended display interface
Position can not only form clean and tidy clearly bandwagon effect (such as the case where not intersecting), but also can efficiently utilize target
Show interface, the user experience is improved.
In order to achieve the above objectives, the terminal device that third aspect present invention embodiment proposes, comprising: memory, processor
And it is stored in the computer program that can be run on the memory and on the processor, the processor executes described program
When, realize first aspect present invention embodiment described in be map methods of exhibiting
In order to achieve the above objectives, the non-transitorycomputer readable storage medium that fourth aspect present invention embodiment proposes,
It is stored thereon with computer program, realizes that described in first aspect present invention embodiment be figure when described program is executed by processor
The methods of exhibiting of spectrum.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is the bandwagon effect exemplary diagram according to relation map in the prior art;
Fig. 2 is the flow chart of the methods of exhibiting of relation map according to an embodiment of the invention;
Fig. 3 is the flow chart according to an embodiment of the invention that a minor sort is carried out to n connection path;
Fig. 4 is the flow chart according to an embodiment of the invention that two minor sorts are carried out to n connection path;
Fig. 5 is the flow chart of the coordinate according to an embodiment of the invention for calculating each associated nodes;
Fig. 6 is the bandwagon effect exemplary diagram of relation map according to an embodiment of the invention;
Fig. 7 is the structural schematic diagram of the displaying device of relation map according to an embodiment of the invention;
Fig. 8 is the structural schematic diagram of the displaying device of relation map accord to a specific embodiment of that present invention;
Fig. 9 is the structural schematic diagram of terminal device according to an embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings methods of exhibiting, device, terminal device and the storage of the relation map of the embodiment of the present invention are described
Medium.
Fig. 2 is the flow chart of the methods of exhibiting of relation map according to an embodiment of the invention.It should be noted that this
The methods of exhibiting of the relation map of inventive embodiments can be applied to the displaying device of the relation map of the embodiment of the present invention, the displaying
Device can be configured in terminal device.Wherein, which can be mobile terminal (such as mobile phone, tablet computer, individual digital
Assistants etc. have the hardware device of various operating systems), PC (Personal Computer, personal computer) machine etc..
As shown in Fig. 2, the methods of exhibiting of the relation map may include:
S210 obtains the path list between first object node and at least one second destination node, wherein the path
List includes n connection path, has m associated nodes in the n connection path, wherein the m associated nodes include this
One destination node, at least one second destination node and other associated nodes, n are positive integer, and m is the positive integer greater than 2.
Wherein, in an embodiment of the present invention, at least one second destination node can be regarded as one or more second mesh
Mark node.In addition, the destination node can be enterprise (or company), individual etc..
For example, the methods of exhibiting of the relation map of the embodiment of the present invention can be applied to mobile terminal, the mobile terminal
Application program with input function can be provided for user, user can by using the input function input first object node and
At least one second destination node.When detecting that user has carried out input operation, the first object section of user's input can receive
Point and at least one second destination node.
It, can be according to preset relational query after the first object node and the second destination node for receiving user's input
Algorithm obtains the path list between the first object node and the second destination node, which may include n link road
Diameter, wherein the connection path may be used to indicate from first object node, successively by other one or more associated nodes
The path connected when at least one second destination node.
S220 carries out a minor sort to n connection path according to the frequency that node occurs, and according to the similar of connection path
Degree carries out two minor sorts to n connection path.
It is appreciated that in the connection path between first object node and at least one second destination node, it may
There are there are identical associated nodes on two or more pieces connection path, the associated nodes can be known as common points at this time.
In this step, all connection paths between first object node and at least one second destination node are being obtained
Later, the frequency that can occur according to associated nodes, it is preferential to adjust the suitable of the high corresponding connection path of associated nodes of frequency of occurrence
Sequence can adjust the connection path with common points to adjacent position, and then similar connection path is adjusted to adjoining
Position.
As an example, as shown in figure 3, the above-mentioned frequency occurred according to node once arranges n connection path
The specific implementation process of sequence (adjusting the connection path with common points to adjacent position) can comprise the following steps that
S2201 is ranked up m associated nodes, after obtaining sequence according to the number of connection path where associated nodes
Node listing.
Firstly, the path list obtained in above-mentioned steps S210 can be recorded as to P { p1, p2, p3 ... ..., pn }, wherein
P1, p2, p3, pn respectively represent n different connection paths between first object node and the second destination node.Later, it can build
It is vertical with associated nodes be key, connection path where associated nodes for values (indicating one or more connection paths) Kazakhstan
Uncommon table H.Wherein, the connection path where each associated nodes and the associated nodes is contained in Hash table H, for example,
Key1 is corresponded to values (p1, p3, p9), and key2 corresponds to values (p2, p4, p5, p6) ....
Later, can according to the number of connection path where associated nodes, to the key (i.e. associated nodes) in Hash table H into
Row sequence, the node listing N after being sorted, for example, node listing N can be { key2, key1 ... }.
S2202 chooses i-th of associated nodes from node listing, correspondingly, saves i-th of association from path list
Connection path where point is moved to the starting position of path list to update path list, wherein 1≤i≤m.
That is, successively choosing an associated nodes key from node listing N, correspondingly, selected from path list P
The corresponding one or more connection path values of H (key) out, and these connection paths are moved to the beginning of path list P
Position updates path list P with this.
S2203 is based on updated path list, repeats step S2202 and S2203, until institute in node listing
Until associated nodes of the number of connection path greater than 1 have been selected.
Specifically, step S2202 and S2203 can be repeated based on list P is updated caused by the step S2202,
Until the number of connection path is not greater than 1 associated nodes in node listing N, to obtain the path after a minor sort
List.
For example, be { key2, key1 ... ... } with node listing N, key1 corresponds to values (p1, p3, p9), key2
Corresponding values (p2, p4, p5, p6), path list P are that { p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ... ..., pn } is
Example, firstly, corresponding 4 connection paths (p2, p4, p5, p6) of first associated nodes key2 can be chosen from node listing N,
Later, corresponding 4 connection paths of associated nodes key2 can be moved to the starting position of path list P, this is updated with this
Path list P is { p2, p4, p5, p6, p1, p3, p7, p8, p9, p10 ..., pn }.Later, the updated path can be based on
List P chooses second associated nodes key1 from node listing N and correspondingly selects from the updated path list P
Corresponding 3 connection paths (p1, p3, p9) of second associated nodes key1, and by corresponding 3 companies of associated nodes key1
Connect the starting position that path is moved to updated path list P, with this update path list P be p1, p3, p9, p2, p4,
p5,p6,p7,p8,p10,……,pn}。
In this way, can be carried out to the path list after a minor sort secondary after obtaining the path list after a minor sort
Sequence.As an example, as shown in figure 4, the above-mentioned similarity according to connection path carries out two minor sorts to n connection path
The specific implementation process of (i.e. similar connection path is adjusted to adjacent position) can comprise the following steps that
S2211 chooses j-th of connection path from n connection path after a minor sort, from n after a minor sort
Connection path obtains and j-th of highest connection path of connection path similarity, wherein 1≤j≤n.
Wherein, in an embodiment of the present invention, the similarity of connection path can pass through common points in two connection paths
The number of number calculates, that is to say, that the number of the common points number in two connection paths determines this two connections
Similarity degree between path.
S2212, will be with j-th of highest connection path of connection path similarity, next company with j-th of connection path
It connects path and carries out place-exchange.
S2213 repeats step S2211-S2213, directly since next connection path of j-th of connection path
N connection path after to a minor sort is all selected.
For example, by taking the n connection path (i.e. primary updated path list P ') after a minor sort as an example, such as
As a result { p1, p3, p9, p2, p4, p5, p6, p7, p8, p10 ... ..., pn }, firstly, can be from the primary updated path
First connection path p1 is sequentially selected in list P ', and selection is similar to connection path p1 from subsequent connection path
Spend highest connection path (such as connection path p5);Later, by next connection path p3 of connection path p1 and the link road
Diameter p5 carry out place-exchange, i.e., path list P ' at this time be updated to p1, p5, p9, p2, p4, p3, p6, p7, p8, p10 ... ...,
Pn }, since next connection path p5 of connection path p1, from list P ' in the subsequent connection path of p5 selection with the company
The highest connection path of path p5 similarity (such as connection path P8) is connect, later, by next connection path of connection path p5
P9 and connection path P8 carry out place-exchange, i.e., path list P ' at this time be updated to p1, p5, p8, p2, p4, p3, p6, p7,
P9, p10 ... ..., pn }, and so on, connection path is all selected in the path list P ' after a minor sort, thus
Path list P " after obtaining two minor sorts.Similar connection path adjacent position has been adjusted to as a result,.
S230 is calculated separately for each connection path after two minor sorts according to the dimension information at intended display interface
The coordinate of each associated nodes included in each connection path.
Specifically, each path pi in the path list P " after first traversing two minor sorts, and according to intended display interface
Dimension information calculate the abscissas of all associated nodes in the pi of the path.Further according to the dimension information difference at intended display interface
Calculate the ordinate of each associated nodes in the pi of the path.As an example, as shown in figure 5, the seat of each associated nodes
Mark can be calculated by following steps:
S231 obtains the dimension information at intended display interface.
It should be noted that the dimension information at the intended display interface can the terminal as corresponding to the intended display interface set
Standby screen size solves.For example, then the intended display interface also can be set when the screen size of the terminal device is larger
It is very big so that it is convenient to which user checks the relation map finally shown.In addition, the dimension information can be by the shape at intended display interface
Shape determines, for example, then the dimension information may include wide and high when intended display interface is rectangle;Intended display interface is circle
When shape, then the dimension information may include radius or diameter or the intended display interface is that can also be other shapes, then accordingly
Dimension information can be the critical size of the correspondingly-shaped.
It is appreciated that the intended display interface is for showing final association map, which be can be
It is pre-set.In this way, in this step, when calculating the coordinate of each associated nodes, can first obtain will be final to show
It is associated with the intended display interface of map, and obtains the shape and size information at the intended display interface.
Intended display interface is partitioned into L*K grid, and calculates the width of each grid according to dimension information by S232
Value and height value, wherein L is the length value of longest path in n connection path, and K is the number of connection path.Wherein, this is most
Long path can be regarded as the most connection path of associated nodes included in the n connection path, which refers to the company
Connect the total number of associated nodes in path.
S233 is calculated every for each connection path after two minor sorts according to the first preset formula and the width value
The abscissa of all associated nodes in a connection path.Wherein, in an embodiment of the present invention, which can are as follows:
X=grid_w* (k+1/2)
Wherein, x is abscissa, and grid_w is the width value of grid, and k is k-th of connection path after two minor sorts.
S234 is calculated in each connection path between associated nodes most according to the second preset formula and the height value
It is closely-spaced.Wherein, in an embodiment of the present invention, which can are as follows:
Grid_1h'=int (grid_1h/grid_h) * grid_h
Wherein, grid_1h' is minimum interval;Grid_1h=float (height)/s, wherein float () is floating type
Data type, height are the height at intended display interface, and s is the number of associated nodes included in each connection path;
Grid_h is the height value of grid;Int () is downward bracket function.That is, can be first according to formula grid_1h=float
(height)/n calculates the minimum interval in current connection path between associated nodes, then utilizes formula grid_1h'=int
(grid_1h/grid_h) * grid_h) it corrects, obtain final minimum interval.
S235, for each associated nodes in each connection path, according to third preset formula, the height value and institute
Minimum interval is stated, the ordinate of each associated nodes is calculated.Wherein, in an embodiment of the present invention, which can
Are as follows:
Y=int (grid_h/2+j*grid_1h')
Wherein, y is the ordinate of j-th of associated nodes, and int () is downward bracket function, and grid_h is height value, and j is
J-th of associated nodes in each connection path, grid_1h' are minimum interval.
S231-S235 can calculate the abscissa and ordinate of each associated nodes through the above steps as a result,.
S240 merges the coordinate of each common points in n connection path respectively, and by the coordinate after merging
Final coordinate as each common points.
It is appreciated that when calculating the coordinate of each associated nodes included in each connection path, two or two
Above connection path can have common points, i.e. an associated nodes may be contained in two or more connection paths
In, in this way, the common points can have multiple coordinates.
For this purpose, in this step, need to be merged according to coordinate of the preset strategy to common points, and by the seat after merging
It is denoted as the final coordinate for the common points.Wherein, as an example, which can are as follows: be directed to abscissa, can first by
Abscissa in multiple coordinates of the common points, sorts from small to large, later, takes median from the abscissa after sequence,
The median can be used as the final abscissa of the common points;It, can will be in multiple ordinates of the common points for ordinate
Final ordinate of the maximum value as the common points.
The coordinates of all m associated nodes can be obtained in S230 and S240 through the above steps as a result, so as to subsequent basis
The drafting of the coordinate finish relation map.
M associated nodes are plotted on intended display interface by S250 according to the coordinate being calculated, while according to described
The m associated nodes being plotted on intended display interface are carried out line and mark the m associated nodes by connection path
Between relationship (" equity participation " relationship as shown in FIG. 6).Thus, it is possible to show final relationship on the intended display interface
Map.
For example, be A with first object node, for the second destination node is B, relation map according to an embodiment of the present invention
The available final relation map of methods of exhibiting, and the bandwagon effect of the relation map can be as shown in Figure 6.It can see
Out, relation map as shown in FIG. 6 can be more in line with the shape and size that current goal shows interface, check convenient for user.
The methods of exhibiting of relation map according to an embodiment of the present invention, can obtain first object node and at least one second
Path list between destination node, the path list may include n connection path, have m association in the n connection path
Node, and the connection path in n connection path with common points is adjusted to adjacent position, and by similar connection path tune
It is whole to arrive adjacent position, to obtain updated n connection path;Later, for updated each connection path, according to target
Show that the dimension information at interface calculates separately the coordinate of each associated nodes included in each connection path;Then, by n
The coordinate of each common points in connection path merges respectively, and using the coordinate after merging as each common points
Final coordinate;Finally, associated nodes are plotted on intended display interface according to the coordinate being calculated, and line is drawn to obtain
To final relation map.In this way, relation map effectively distribution node can be enabled corresponding on intended display interface
Position can not only form clean and tidy clearly bandwagon effect (such as the case where not intersecting), but also can efficiently utilize target
Show interface, the user experience is improved.
Corresponding with the methods of exhibiting of relation map that above-mentioned several embodiments provide, a kind of embodiment of the invention also mentions
Displaying device and above-mentioned several realities for a kind of displaying device of relation map, due to relation map provided in an embodiment of the present invention
The methods of exhibiting for applying the relation map of example offer is corresponding, therefore also fits in the embodiment of the methods of exhibiting of forgoing relationship map
For the displaying device of relation map provided in this embodiment, it is not described in detail in the present embodiment.Fig. 7 is according to the present invention
The structural schematic diagram of the displaying device of the relation map of one embodiment.As shown in fig. 7, the displaying device of the relation map can be with
It include: to obtain module 710, the first sorting module 720, the second sorting module 730, computing module 740, coordinate merging module 750
With display module 760.
Specifically, module 710 is obtained to be used to obtain the road between first object node and at least one second destination node
Diameter list, wherein path list includes n connection path, has m associated nodes in n connection path, wherein m association
Node includes first object node, at least one second destination node and other associated nodes, and n is positive integer, and m is greater than 2
Positive integer.
First sorting module 720 is used for the frequency occurred according to node and carries out a minor sort to N number of connection path;As one
Kind example, the first sorting module 720 can be specifically used for: S11 is associated with m according to the number of connection path where associated nodes
Node is ranked up, the node listing after being sorted;S12 chooses i-th of associated nodes from node listing, from path column
Connection path where i-th of associated nodes is moved to the starting position of path list to update path list in table, wherein
1≤i≤m;S13 is based on updated path list, repeats step S12 and S13, until connection where in node listing
Until associated nodes of the number in path greater than 1 have been selected.
Second sorting module 730 is used to carry out two minor sorts to n connection path according to the similarity of connection path.As
A kind of example, the second sorting module 730 can be specifically used for: S21, and j-th of company is chosen from n connection path after a minor sort
Path is connect, is obtained and j-th of highest connection path of connection path similarity from n connection path after a minor sort, wherein
1≤j≤n;S22, will be with j-th of highest connection path of connection path similarity, next connection with j-th of connection path
Path carries out place-exchange;S23 repeats step S21-S23 since next connection path of j-th of connection path,
Until n connection path after a minor sort is all selected.
Computing module 740 is used to be believed for each connection path after two minor sorts according to the size at intended display interface
Breath calculates separately the coordinate of each associated nodes included in each connection path.It as an example, as shown in figure 8, should
Computing module 740 may include: acquiring unit 741, the first computing unit 742, the second computing unit 743, third computing unit
744 and the 4th computing unit 745.
Wherein, acquiring unit 741 is used to obtain the dimension information at intended display interface.First computing unit 742 is used for will
Intended display interface is partitioned into L*K grid, and the width value and height value of each grid are calculated according to dimension information,
In, L is the length value of longest path in n connection path, and K is the number of connection path.
Second computing unit 743 is used for for each connection path after two minor sorts, according to the first preset formula and width
Angle value calculates the abscissa of all associated nodes in each connection path.Wherein, in an embodiment of the present invention, this is first default
Formula can are as follows:
X=grid_w* (k+1/2)
Wherein, x is abscissa, and grid_w is width value, and k is k-th of connection path after two minor sorts.
Third computing unit 744 is used to calculate according to the second preset formula and height value and be associated with section in each connection path
Minimum interval between point.Wherein, in an embodiment of the present invention, second preset formula are as follows:
Grid_1h'=int (grid_1h/grid_h) * grid_h
Wherein, grid_1h' is minimum interval;Grid_1h=float (height)/s, wherein float () is floating type
Data type, height are the height at intended display interface, and s is the number of associated nodes included in each connection path;
Grid_h is height value;Int () is downward bracket function.That is, can be first according to formula grid_1h=float
(height)/n calculates the minimum interval in current connection path between associated nodes, then utilizes formula grid_1h'=int
(grid_1h/grid_h) * grid_h) it corrects, obtain final minimum interval.
4th computing unit 745 is used for for each associated nodes in each connection path, according to third preset formula,
Height value and minimum interval calculate the ordinate of each associated nodes.Wherein, in an embodiment of the present invention, the third is default
Formula are as follows:
Y=int (grid_h/2+j*grid_1h')
Wherein, y is ordinate, and int () is downward bracket function, and grid_h is height value, and j is in each connection path
J-th of associated nodes, grid_1h' are minimum interval.
Coordinate merging module 750 is used to respectively merge the coordinate of each common points in n connection path, and
Using the coordinate after merging as the final coordinate of each common points.It as an example, can be in n connection path
Each common points, the abscissa in multiple coordinates of each common points is subjected to size sequence, and will be in ranking results
Median as each common points merge after abscissa;Determine the ordinate in multiple coordinates of each common points
Maximum value, and using maximum value as the ordinate after the merging of each common points.Merge thus, it is possible to obtain each common points
Coordinate afterwards.
Display module 760 is used to that m associated nodes to be plotted in intended display interface according to coordinate, while according to mutual
Relationship would be mapped out m associated nodes on intended display interface and carry out line.
The displaying device of relation map according to an embodiment of the present invention, can obtain first object node and at least one second
Path list between destination node, the path list may include n connection path, have m association in the n connection path
Node, and the connection path in n connection path with common points is adjusted to adjacent position, and by similar connection path tune
It is whole to arrive adjacent position, to obtain updated n connection path;Later, for updated each connection path, according to target
Show that the dimension information at interface calculates separately the coordinate of each associated nodes included in each connection path;Then, by n
The coordinate of each common points in connection path merges respectively, and using the coordinate after merging as each common points
Final coordinate;Finally, associated nodes are plotted on intended display interface according to the coordinate being calculated, and line is drawn to obtain
To final relation map.In this way, relation map effectively distribution node can be enabled corresponding on intended display interface
Position can not only form clean and tidy clearly bandwagon effect (such as the case where not intersecting), but also can efficiently utilize target
Show interface, the user experience is improved.
In order to realize above-described embodiment, the invention also provides a kind of terminal devices.
Fig. 9 is the structural schematic diagram of terminal device according to an embodiment of the invention.As shown in figure 9, the terminal device
900 may include memory 910, processor 920 and be stored in the computer that can be run on memory 910 and on processor 920
Program 930 is the displaying side of map when processor 920 executes described program 930, described in realization any one embodiment of the invention
Method.
In order to realize above-described embodiment, the invention also provides a kind of non-transitorycomputer readable storage mediums, thereon
It is stored with computer program, relation map described in any one embodiment of the invention is realized when described program is executed by processor
Methods of exhibiting.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot
It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present invention, " multiple "
It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable
Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass
Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment
It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings
Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned
In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware
Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal
Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries
It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium
In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module
It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention
System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention
Type.
Claims (8)
1. a kind of methods of exhibiting of relation map, which comprises the following steps:
Obtain the path list between first object node and at least one second destination node, wherein the path list packet
It includes n connection path, there are m associated nodes in the n connection path, wherein the m associated nodes include described the
One destination node, at least one described second destination node and other associated nodes, n are positive integer, and m is the positive integer greater than 2;
One minor sort is carried out to the n connection path according to the frequency that node occurs, and according to the similarity pair of connection path
The n connection path carries out two minor sorts;Wherein, according to common points number in two connection paths, connection path is determined
Similarity;
For each connection path after two minor sorts, each company is calculated separately according to the dimension information at intended display interface
Connect the coordinate of each associated nodes included in path;
The coordinate of each common points in the n connection path is merged respectively, and using the coordinate after merging as
The final coordinate of each common points;And
The m associated nodes are plotted on the intended display interface according to the coordinate being calculated, while according to described
The m associated nodes being plotted on the intended display interface are carried out line by connection path;
Wherein, the frequency occurred according to node carries out a minor sort to the n connection path, comprising:
S11 is ranked up the m associated nodes, after being sorted according to the number of connection path where associated nodes
Node listing;
S12 chooses i-th of associated nodes from the node listing, by i-th of associated nodes from the path list
The connection path at place is moved to the starting position of the path list to update the path list, wherein 1≤i≤m;
S13 is based on the updated path list, repeats the step S12 and S13, until in the node listing
Until associated nodes of the number of the place connection path greater than 1 have been selected.
2. the methods of exhibiting of relation map as described in claim 1, which is characterized in that the similarity according to connection path
Two minor sorts are carried out to the n connection path, comprising:
S21 chooses j-th of connection path from n connection path after a minor sort, the n after a minor sort
A connection path obtains and the highest connection path of j-th of connection path similarity, wherein 1≤j≤n;
S22, will be under described and the highest connection path of j-th of connection path similarity, with j-th of connection path
One connection path carries out place-exchange;
S23 repeats the step S21-S23 since next connection path of j-th of connection path, until
N connection path after one minor sort is all selected.
3. the methods of exhibiting of relation map as described in claim 1, which is characterized in that described each of to be directed to after two minor sorts
Connection path, according to the dimension information at intended display interface calculate separately each connection path included in each association
The coordinate of node, comprising:
Obtain the dimension information at intended display interface;
The intended display interface is partitioned into L*K grid, and calculates the width of each grid according to the dimension information
Value and height value, wherein L is the length value of longest path in the n connection path, and K is the number of the connection path;
For each connection path after two minor sort, calculated according to the first preset formula and the width value described each
The abscissa of all associated nodes in connection path;
According to the second preset formula and the height value, calculate between the minimum in each connection path between associated nodes
Every;
For each associated nodes in each connection path, according to third preset formula, the height value and it is described most
It is closely-spaced, calculate the ordinate of each associated nodes.
4. the methods of exhibiting of relation map as claimed in claim 3, which is characterized in that
First preset formula are as follows:
X=grid_w* (k+1/2)
Wherein, x is the abscissa, and grid_w is the width value, and k is k-th of connection path after two minor sort;
Second preset formula are as follows:
Grid_1h'=int (grid_1h/grid_h) * grid_h
Wherein, grid_1h' is the minimum interval;Grid_1h=float (height)/s, wherein float () is floating type
Data type, height are the height at the intended display interface, and s is of associated nodes included in each connection path
Number;Grid_h is the height value;Int () is downward bracket function;
The third preset formula are as follows:
Y=int (grid_h/2+j*grid_1h')
Wherein, j is j-th of associated nodes in each connection path, and y is the ordinate of j-th of associated nodes,
Int () is downward bracket function, and grid_h is the height value, and grid_1h' is the minimum interval.
5. the methods of exhibiting of relation map as described in claim 1, which is characterized in that it is described will be each in n connection path
The coordinate of a common points merges respectively, comprising:
For each common points in the n connection path, by the horizontal seat in multiple coordinates of each common points
Mark carries out size sequence, and using the median in ranking results as the abscissa after each common points merging;
Determine the maximum value of the ordinate in multiple coordinates of each common points, and using the maximum value as described every
Ordinate after a common points merging.
6. a kind of displaying device of relation map characterized by comprising
Module is obtained, for obtaining the path list between first object node and at least one second destination node, wherein institute
Stating path list includes n connection path, has m associated nodes in the n connection path, wherein the m association section
Point includes the first object node, at least one described second destination node and other associated nodes, and n is positive integer, and m is big
In 2 positive integer;
First sorting module, the frequency for occurring according to node carry out a minor sort to the n connection path;
Second sorting module, for carrying out two minor sorts to the n connection path according to the similarity of connection path;Wherein,
According to common points number in two connection paths, the similarity of connection path is determined;
Computing module, for being distinguished according to the dimension information at intended display interface for each connection path after two minor sorts
Calculate the coordinate of each associated nodes included in each connection path;
Coordinate merging module, for the coordinate of each common points in the n connection path to be merged respectively, and will
Final coordinate of the coordinate as each common points after merging;
Display module, for the m associated nodes to be plotted in the intended display interface according to the coordinate being calculated,
The m associated nodes being plotted on the intended display interface are carried out by line according to the connection path simultaneously;
Wherein, first sorting module is specifically used for:
S11 is ranked up the m associated nodes, after being sorted according to the number of connection path where associated nodes
Node listing;
S12 chooses i-th of associated nodes from the node listing, by i-th of associated nodes from the path list
The connection path at place is moved to the starting position of the path list to update the path list, wherein 1≤i≤m;
S13 is based on the updated path list, repeats the step S12 and S13, until in the node listing
Until associated nodes of the number of the place connection path greater than 1 have been selected.
7. the displaying device of relation map as claimed in claim 6, which is characterized in that second sorting module is specifically used
In:
S21 chooses j-th of connection path from n connection path after a minor sort, the n after a minor sort
A connection path obtains and the highest connection path of j-th of connection path similarity, wherein 1≤j≤n;
S22, will be under described and the highest connection path of j-th of connection path similarity, with j-th of connection path
One connection path carries out place-exchange;
S23 repeats the step S21-S23 since next connection path of j-th of connection path, until
N connection path after one minor sort is all selected.
8. the displaying device of relation map as claimed in claim 6, which is characterized in that the computing module includes:
Acquiring unit, for obtaining the dimension information at intended display interface;
First computing unit, for the intended display interface to be partitioned into L*K grid, and according to the dimension information meter
Calculate the width value and height value of each grid, wherein L is the length value of longest path in the n connection path, and K is described
The number of connection path;
Second computing unit, for for each connection path after two minor sort, according to the first preset formula and described
Width value calculates the abscissa of all associated nodes in each connection path;
Third computing unit, for calculating and being associated in each connection path according to the second preset formula and the height value
Minimum interval between node;
4th computing unit, each associated nodes for being directed in each connection path, according to third preset formula, institute
Height value and the minimum interval are stated, the ordinate of each associated nodes is calculated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710497163.9A CN107357846B (en) | 2017-06-26 | 2017-06-26 | The methods of exhibiting and device of relation map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710497163.9A CN107357846B (en) | 2017-06-26 | 2017-06-26 | The methods of exhibiting and device of relation map |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107357846A CN107357846A (en) | 2017-11-17 |
CN107357846B true CN107357846B (en) | 2018-12-14 |
Family
ID=60273057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710497163.9A Active CN107357846B (en) | 2017-06-26 | 2017-06-26 | The methods of exhibiting and device of relation map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107357846B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108921914B (en) * | 2018-05-25 | 2022-10-28 | 北京石油化工学院 | Method and device for drawing spectrum and electronic equipment |
CN109165322B (en) * | 2018-08-01 | 2022-04-19 | 成都数联铭品科技有限公司 | Network feature extraction system and method based on path relation |
CN109597856B (en) * | 2018-12-05 | 2020-12-25 | 北京知道创宇信息技术股份有限公司 | Data processing method and device, electronic equipment and storage medium |
CN109739859B (en) * | 2018-12-29 | 2022-08-30 | 深圳证券信息有限公司 | Relation map drawing method, system and related device |
CN111597275B (en) * | 2019-02-21 | 2023-06-20 | 阿里巴巴集团控股有限公司 | Isomorphic subgraph or topological graph processing method and device |
CN111046112A (en) * | 2019-11-22 | 2020-04-21 | 精硕科技(北京)股份有限公司 | Method and device for displaying class knowledge graph and electronic equipment |
CN111708847A (en) * | 2020-05-20 | 2020-09-25 | 北京明略软件系统有限公司 | Method and device for displaying relation graph |
CN111831863A (en) * | 2020-07-17 | 2020-10-27 | 浙江大华技术股份有限公司 | Data visualization method and device and computer-readable storage medium |
CN113391736B (en) * | 2020-12-02 | 2023-04-07 | 腾讯科技(深圳)有限公司 | Method and device for determining object connection line, storage medium and electronic equipment |
CN112632194B (en) * | 2020-12-30 | 2023-11-03 | 平安证券股份有限公司 | Method, device, equipment and storage medium for representing graphic visualization relationship of data |
CN113448667B (en) * | 2021-06-09 | 2023-08-01 | 绿盟科技集团股份有限公司 | Method and device for generating display relationship diagram |
CN113449128B (en) * | 2021-06-29 | 2024-04-05 | 平安资产管理有限责任公司 | Picture generation method and related device for displaying key equity structure |
CN115238133A (en) * | 2022-07-01 | 2022-10-25 | 盐城金堤科技有限公司 | Map layout method and device, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425741A (en) * | 2013-07-16 | 2013-12-04 | 北京中科汇联信息技术有限公司 | Information exhibiting method and device |
CN103699645A (en) * | 2013-12-26 | 2014-04-02 | 中国人民银行征信中心 | System and method for identifying association relations among enterprises |
CN105488130A (en) * | 2015-11-25 | 2016-04-13 | 成都数联铭品科技有限公司 | Associated data visualization display method |
CN106294481A (en) * | 2015-06-05 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of air navigation aid based on collection of illustrative plates and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7567959B2 (en) * | 2004-07-26 | 2009-07-28 | Google Inc. | Multiple index based information retrieval system |
-
2017
- 2017-06-26 CN CN201710497163.9A patent/CN107357846B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425741A (en) * | 2013-07-16 | 2013-12-04 | 北京中科汇联信息技术有限公司 | Information exhibiting method and device |
CN103699645A (en) * | 2013-12-26 | 2014-04-02 | 中国人民银行征信中心 | System and method for identifying association relations among enterprises |
CN106294481A (en) * | 2015-06-05 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of air navigation aid based on collection of illustrative plates and device |
CN105488130A (en) * | 2015-11-25 | 2016-04-13 | 成都数联铭品科技有限公司 | Associated data visualization display method |
Also Published As
Publication number | Publication date |
---|---|
CN107357846A (en) | 2017-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107357846B (en) | The methods of exhibiting and device of relation map | |
CN104199986A (en) | Vector data space indexing method base on hbase and geohash | |
CN105989129A (en) | Real-time data statistic method and device | |
CN105320702B (en) | A kind of analysis method of user behavior data, device and smart television | |
CN109299685A (en) | Deduction network and its method for the estimation of human synovial 3D coordinate | |
CN104090769B (en) | The figure methods of exhibiting and device of a kind of business datum | |
CN107229688A (en) | A kind of database level point storehouse point table method and system, server | |
CN104376050B (en) | It is a kind of in three-dimensional scenic dynamic dispatching and the method that shows massive vector data | |
CN103365842B (en) | A kind of page browsing recommends method and device | |
CN105868087A (en) | A display method and device for multi-index data in a monitoring system | |
Bai et al. | Discovering the $ k $ representative skyline over a sliding window | |
CN106095951A (en) | Data space multi-dimensional indexing method based on load balancing and inquiry log | |
CN106097313A (en) | Image partition method and device | |
CN108550132A (en) | A kind of collaboration well-marked target detection method significantly propagated based on global compact priori and global similarity | |
Son et al. | Top-k manhattan spatial skyline queries | |
Martin et al. | The Owen and Shapley spatial power indices: a comparison and a generalization | |
Nguyen et al. | DBSTexC: Density-based spatio-textual clustering on twitter | |
Hershberger et al. | Adaptive sampling for geometric problems over data streams | |
CN107391749B (en) | Method for realizing waterfall flow by inquiring sub-table data | |
CN104391992A (en) | Asset data-oriented data processing system | |
US20090112529A1 (en) | Analysis model generation system | |
Burger et al. | The natural rubber market: review, analysis, policies and outlook | |
Fang et al. | Mining co-location patterns with dominant features | |
CN105574183A (en) | App (application) recommendation method based on collaborative filtering recommendation algorithm-KNN (K-nearest neighbor) classification algorithm | |
Yang et al. | On characterizing and computing the diversity of hyperlinks for anti-spamming page ranking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |