CN111708847A - Method and device for displaying relation graph - Google Patents

Method and device for displaying relation graph Download PDF

Info

Publication number
CN111708847A
CN111708847A CN202010430390.1A CN202010430390A CN111708847A CN 111708847 A CN111708847 A CN 111708847A CN 202010430390 A CN202010430390 A CN 202010430390A CN 111708847 A CN111708847 A CN 111708847A
Authority
CN
China
Prior art keywords
central point
entity
display screen
center
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010430390.1A
Other languages
Chinese (zh)
Inventor
董林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202010430390.1A priority Critical patent/CN111708847A/en
Publication of CN111708847A publication Critical patent/CN111708847A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a method and a device for displaying a relation graph, wherein the method comprises the following steps: determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node; and determining the coordinate information of the first central point of the core node on the display screen and the coordinate information of the second central point of each sub-node on the display screen according to the size parameter of the display screen of the computing device. The technical scheme can generate the corresponding relation graph in a self-adaptive mode according to the selected entity.

Description

Method and device for displaying relation graph
Technical Field
The invention relates to the field of computers, in particular to a method and a device for displaying a relational graph.
Background
The relational graph is a modern theory which achieves the aim of multi-discipline fusion by combining theories and methods of applying subjects such as mathematics, graphics, information visualization technology, information science and the like with methods such as metrology introduction analysis, co-occurrence analysis and the like and utilizing a visual map to vividly display the core structure, development history, frontier field and overall knowledge framework of the subjects. It can provide practical and valuable reference for subject research.
Disclosure of Invention
The technology to be solved by the application is to provide a method and a device for displaying a relationship graph, which can generate a corresponding relationship graph in a self-adaptive manner according to a selected entity.
In order to solve the above technical problem, the present application provides a method for displaying a relationship graph, which is applied to a computing device, and the method includes:
determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen;
drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
In one illustrative example, the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1;
the core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
In an exemplary instance, the rendering the core node as a graph centered on the first center point, and the rendering each child node as a graph centered on a corresponding second center point respectively comprises:
drawing a graphic area with the first central point as the center according to the coordinate information of the first central point and the set second width and second height corresponding to the core node; wherein, the graph taking the first central point as the center is displayed in a first rectangular area, the width of the first rectangular area is the second width, and the height of the first rectangle is the second height;
for each second central point, drawing a graphic area taking the second central point as the center according to the coordinate information of the second central point and a third width and a third height corresponding to the set sub-nodes;
wherein, the graph with the second center point as the center is displayed in a second rectangle, the width of the second rectangle is the third width, and the height of the second rectangle is the third height; the sum of twice the radius and twice the second value is less than the first value, the second value being the maximum of the second width and the second height.
In an exemplary instance, the drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first center point and the coordinate information of each second center point further includes:
displaying the identification information of the first entity in the graphic area with the first central point as the center;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
In one illustrative example, after drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first center point and the coordinate information of each second center point, the method further comprises:
when a connecting line of any child node and the core node is selected, acquiring and displaying associated detailed information corresponding to all types of relations on the connecting line;
wherein the detailed association information corresponding to any type of relationship includes one or more of the following information corresponding to the type of relationship between the child node and the core node: time information, location information, work information.
In an exemplary instance, after determining all the second entities having an association relationship with the first entity according to the selected first entity, before drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first central point and the coordinate information of each second central point, the method further includes:
storing the information of the first entity, the determined information of all the second entities and the relationship information of the first entity and each second entity in a set data structure;
the information of the first entity comprises first entity identification information, and the information of the second entity comprises second entity identification information; the relationship information comprises the type of the relationship and the associated detailed information corresponding to each type.
The present application further provides a display apparatus of a relationship diagram, which is applied to a computing device, and includes: a memory and a processor;
the memory is used for storing a program for displaying the relational graph;
the processor is configured to read and execute the program for displaying the relationship diagram, and perform the following operations:
determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen;
drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
In one illustrative example, the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1;
the core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
In one illustrative example, the identification information of the first entity is displayed within the graphic area centered on the first center point;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
The present application also provides a storage medium having a computer program stored thereon, wherein the computer program is arranged to, when run, perform the method of any of claims 1 to 6.
The display method of the relationship diagram comprises the following steps: determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node; according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen; drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps: drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center; respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively. The technical scheme can generate the corresponding relation graph in a self-adaptive mode according to the selected entity.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
FIG. 1 is a flowchart of a method for displaying a relationship diagram according to a first embodiment of the present application;
FIG. 2 is a schematic structural diagram of a display device of a relational diagram according to a first embodiment of the present disclosure;
FIG. 3 is a presentation interface diagram of a relationship diagram of example one.
Detailed Description
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
Example one
As shown in fig. 1, the present embodiment provides a method for displaying a relationship diagram, which is applied to a computing device, and the method includes:
s101, determining all second entities having association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
step S102, determining coordinate information of a first central point of the core node on a display screen and coordinate information of a second central point of each sub-node on the display screen according to the size parameter of the display screen of the computing equipment;
drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
In the above technical solution, the first entity may include a person, a device, and the like. Taking the first entity as a person as an example, assuming that the selected first entity is zhang san, the second entities are all persons having an association relationship with zhang san, and the association relationship may include: college, class, relatives, children, etc.
Taking the first entity as an apparatus as an example, assuming that the selected first entity is the transformer a, the second entity is all apparatuses having an association relationship with the transformer a, and the association relationship may include: direct connection, indirect connection, same city, same unit, same model, same brand, etc.
Through the technical scheme, the corresponding relation graph can be generated in a self-adaptive mode according to the selected entity.
In one illustrative example, the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1; the first coefficient and the second coefficient may be equal or unequal.
The core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
In the technical scheme, the relation graph can be generated in a self-adaptive mode according to the size of the screen, the selected entity is located in the center of the circular relation graph, and all sub-nodes which are in incidence relation with the selected entity are distributed around the selected entity, so that the displayed relation graph is more visual.
In an exemplary instance, the rendering the core node as a graph centered on the first center point, and the rendering each child node as a graph centered on a corresponding second center point respectively comprises:
drawing a graphic area with the first central point as the center according to the coordinate information of the first central point and the set second width and second height corresponding to the core node; wherein, the graph taking the first central point as the center is displayed in a first rectangular area, the width of the first rectangular area is the second width, and the height of the first rectangle is the second height;
for each second central point, drawing a graphic area taking the second central point as the center according to the coordinate information of the second central point and a third width and a third height corresponding to the set sub-nodes;
wherein, the graph with the second center point as the center is displayed in a second rectangle, the width of the second rectangle is the third width, and the height of the second rectangle is the third height; the sum of twice the radius and twice the second value is less than the first value, the second value being the maximum of the second width and the second height.
In the above technical solution, the core node is displayed as a graph centered on the first central point, and the graph may be a symmetric graph or an asymmetric graph.
Each child node corresponds to a second central point, each child node corresponds to a second entity, and the number of the second child nodes is the same as that of the second entities. For each child node, the child node is displayed as a graph centered on the corresponding second center point, and the graph may be a symmetric graph or an asymmetric graph. The third width and the third height corresponding to different child nodes may be the same or different.
In this embodiment, all the child nodes may be displayed as graphs of the same shape and the same size, or may be displayed as graphs of different shapes and/or different sizes. The child nodes and the core node may be displayed as graphs having the same shape and the same area, or may be displayed as graphs having different shapes and/or areas.
Assuming that the selected first entity is a and the corresponding second entity is B, C, D, the corresponding generated relationship graph includes 4 nodes, namely, a core node a, a child node B, a child node C, and a child node D, where the core node a, the child node B, the child node C, and the child node D may all be shown as circles with the same area size, or may all be shown as circles, but the areas of the core node a, the child node B, the child node C, and the child node D are different; it is also possible that core node a is shown as a circle, child node B is shown as a square, child node C is shown as a star, and child node D is shown as a diamond. The manner in which the node displays the graph is not limited to the above.
For the core node, after the first center point is determined, a rectangular area centered on the first center can be determined according to the set second width and second height, so that the core node can be displayed as any graph in the rectangular area.
For each child node, the third width and the third height corresponding to different child nodes may be the same or different, that is, each child node may define a rectangular area with different size. For any child node, after the corresponding second central point is determined, according to the second width and the second height set by the child node, a rectangular area with the second central point as the center can be determined, and thus the child node can be displayed as any graph in the rectangular area.
Through the technical scheme, the dynamically generated relation graph can be completely displayed in the screen according to the size parameters of the display screen.
In an exemplary instance, the drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first center point and the coordinate information of each second center point further includes:
displaying the identification information of the first entity in the graphic area with the first central point as the center;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
In the above technical solution, the corresponding identification information may be displayed in the graph of each node, and the identification information may include an entity name, such as a person name, an equipment name, a school number, an equipment number, and the like. The connection line between the child node and the core node may display the type of the corresponding association relationship, such as school, same year, etc., and the relationship between the child node and the core node may be multiple types, for example, the relationship between the core node a and the child node B may be same school and same country.
For each connecting line in the relational graph, display areas with different sizes may be set, that is, the fourth width and the fourth height corresponding to each connecting line may be different. If the information content corresponding to the type of association between the child node and the core node cannot be completely displayed in the set rectangular area, a part of the information content can be displayed, when the cursor moves to the area, the rectangular area can be expanded to completely display the information content, and the complete information content can be displayed in other areas of the display screen.
In one illustrative example, after drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first center point and the coordinate information of each second center point, the method further comprises:
when a connecting line of any child node and the core node is selected, acquiring and displaying associated detailed information corresponding to all types of relations on the connecting line;
wherein the detailed association information corresponding to any type of relationship includes one or more of the following information corresponding to the type of relationship between the child node and the core node: time information, location information, work information.
For example, the relationship between the core node a and the child node may be college and hometown, and when the connection line between the core node and the child node B is selected, the following may be displayed: a is read at Beijing university from 1/9/1998 to 1/7/2002, and B is read at Beijing university from 1/9/1997 to 1/7/2001; the native place of A is Baoding City of Hebei province, and the native place of B is Baoding City of Hebei province. The above examples are merely illustrative, and other description and language expressions may be used to display the associated detailed information in other examples.
In an exemplary instance, after determining all the second entities having an association relationship with the first entity according to the selected first entity, before drawing a relationship graph on a display screen of the computing device according to the coordinate information of the first central point and the coordinate information of each second central point, the method further includes:
storing the information of the first entity, the determined information of all the second entities and the relationship information of the first entity and each second entity in a set data structure;
the information of the first entity comprises first entity identification information, and the information of the second entity comprises second entity identification information; the relationship information comprises the type of the relationship and the associated detailed information corresponding to each type.
As shown in fig. 2, the present embodiment further provides a device for displaying a relationship diagram, which is applied to a computing device, and includes: a memory 10 and a processor 11;
the memory 10 is used for storing a program for displaying a data processing relation diagram;
the processor 11 is configured to read and execute the program for displaying the relationship diagram, and perform the following operations:
determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen;
drawing a relation graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the relation graph comprises:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
In one illustrative example, the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1;
the core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
In an exemplary instance, the rendering the core node as a graph centered on the first center point, and the rendering each child node as a graph centered on a corresponding second center point respectively comprises:
drawing a graphic area with the first central point as the center according to the coordinate information of the first central point and the set second width and second height corresponding to the core node; wherein, the graph taking the first central point as the center is displayed in a first rectangular area, the width of the first rectangular area is the second width, and the height of the first rectangle is the second height;
for each second central point, drawing a graphic area taking the second central point as the center according to the coordinate information of the second central point and a third width and a third height corresponding to the set sub-nodes;
wherein, the graph with the second center point as the center is displayed in a second rectangle, the width of the second rectangle is the third width, and the height of the second rectangle is the third height; the sum of twice the radius and twice the second value is less than the first value, the second value being the maximum of the second width and the second height.
In an illustrative example, the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen, and the coordinate information of the second center point of each child node on the display screen further includes:
displaying the identification information of the first entity in the graphic area with the first central point as the center;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
In an exemplary embodiment, the processor is configured to read and execute the program for presentation of the relationship graph, and further perform the following operations:
after a relation graph is drawn on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, when a connecting line of any child node and the core node is selected, obtaining and displaying relevant detailed information corresponding to all types of relations on the connecting line;
wherein the detailed association information corresponding to any type of relationship includes one or more of the following information corresponding to the type of relationship between the child node and the core node: time information, location information, work information;
in an exemplary embodiment, the processor is configured to read and execute the program for presentation of the relationship graph, and further perform the following operations:
after determining all second entities which are in association relation with the first entity according to the selected first entity, and before drawing a relation graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, storing the information of the first entity, the determined information of all second entities and the relation information of the first entity and each second entity in a set data structure;
the information of the first entity comprises first entity identification information, and the information of the second entity comprises second entity identification information; the relationship information comprises the type of the relationship and the associated detailed information corresponding to each type.
The present embodiment also provides a storage medium having a computer program stored therein, wherein the computer program is configured to perform any of the methods described above when executed.
Example 1
As shown in fig. 3, the method for displaying the relationship diagram of the present application is further described below by specific examples. The example is illustrated with an Android system, and in other examples, the example can also be applied to other operating systems.
This example is described using human information as an example, and assumes that the selected entity is a poplar trypan.
Step one, determining all persons having an association relation with a poplar trypan;
the association relationship between 20 people including Wangwang B, Zhang-san B, … Zhang-san A and Zhao-liu B and the poplar trypan is determined. The poplar trypan is taken as a core node, and each associated person is taken as a child node, namely, a total of 20 child nodes.
Step two, saving the information of the selected personnel and the information of all the related personnel;
step three, storing the information of the selected personnel, the information of all the related personnel and the relationship information of the selected personnel and each related personnel in a set data structure;
in this example, the information of the selected person includes identification information of the selected person, such as a name, an identification number, a job number, and the like; the information of the associated personnel comprises identification information of the associated personnel, such as name, identification card number, job number and the like; the relationship information includes the type of the relationship and the associated detailed information corresponding to each type, such as co-workers, countryside, relatives, mothers and girls.
Coordinate positions of the core nodes and all child nodes on the Android device display screen, names to be displayed and relation names can be obtained through the data structure.
Determining coordinate information of a first central point of the core node on the display screen and coordinate information of a second central point of each sub-node on the display screen according to the size parameter of the display screen of the computing equipment;
for example, in this example, the first coefficient may be set to 0.5 and the second coefficient may be set to 0.5, such that the first center point is located at the center of the display screen; let the coordinates of the first center point be expressed as (x0, y0), where x0 is 2/width of the screen; y0 is 2 high of the screen;
the third coefficient may be set to 0.8, and the radius of the graph (i.e., the distance from the first center point to the second center point in the vertical direction of the screen) is 0.8 × the short side of the display screen (i.e., the minimum value of the width and height of the display screen).
In other examples, the first coefficient, the second coefficient, and the third coefficient may be set according to other rules.
In this example, the angle of each child node is equally allocated according to the number of second entities. That is, the angular interval of each second child node is the same, i.e. the angle is: 360/number of second entities.
In other examples, the angular intervals of the sub-nodes may be determined in other allocation manners, or randomly allocated.
Let it be assumed that the coordinates of the second center point are expressed as follows: (xN, yN); the value of N is the number of second child nodes;
x0+ radius math cos (index angle pi/180)
Sin (index value angle pi/180) with y0+ radius math
The index value is a sequence number set for each second child node according to the number of the second child nodes.
Drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
in this example, the core node and 20 child nodes may be drawn as circles of the same size.
The name of the young person is displayed in the graph corresponding to the core node, and the name of the corresponding associated person is displayed in the graph corresponding to each sub-node.
In other examples, the core node and child nodes may be drawn as circles of different sizes; the core node and the child nodes can also be drawn as graphs with different sizes and shapes of circles.
The width and height corresponding to the display area of each child node can be set according to the length and width of the display screen and the radius of the relational graph. For example, if the radius of the graph is set to 0.8 × the short side of the display screen, the width and height of the display area of the child node may be uniformly set to 0.2 × the short side of the display screen. Of course, in other examples, the width and height of the display area of the child node may also be set in other manners, and are not specifically limited herein.
Step six, respectively drawing the connection line between each subnode and the core node; respectively displaying the relationship type of each child node and the core node on the connecting line of the child node and the core node;
the height and width of the rectangular area on the connecting line can be set, and the name of the relationship type of each child node and the core node is displayed according to the set height and width.
And seventhly, when the connecting line of any child node and the core node is selected, displaying and displaying the acquired associated detailed information corresponding to all types of relationships of the relationships on the connecting line.
For example, when the connection line between wangwa and poplar trypan is selected, it is displayed that "wangwa and poplar trypan are read at beijing university from 9/1/1998 to 7/1/2002", the display form is not particularly limited, and the detailed information may be displayed in a new dialog box or may be displayed in other ways. In addition, the display format of the content of the detailed information is not limited specifically, and the above is only an example, and in other examples, the content may be displayed in an organization form of other languages, and all forms in which the detailed information can be displayed may be available.
According to the technical scheme, the relation graph can be generated in a self-adaptive mode according to the size of the screen, the selected entity is located in the center of the circular relation graph, and all child nodes which are in incidence relation with the selected entity are distributed around the selected entity, so that the displayed relation graph is more visual.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method for displaying a relationship graph is applied to computing equipment and comprises the following steps:
determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen;
drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
2. The method of claim 1, wherein:
the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1;
the core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
3. The method of claim 2, wherein the rendering the core node as a graph centered on the first center point and the rendering each child node as a graph centered on a corresponding second center point comprises:
drawing a graphic area with the first central point as the center according to the coordinate information of the first central point and the set second width and second height corresponding to the core node; wherein, the graph taking the first central point as the center is displayed in a first rectangular area, the width of the first rectangular area is the second width, and the height of the first rectangle is the second height;
for each second central point, drawing a graphic area taking the second central point as the center according to the coordinate information of the second central point and a third width and a third height corresponding to the set sub-nodes;
wherein, the graph with the second center point as the center is displayed in a second rectangle, the width of the second rectangle is the third width, and the height of the second rectangle is the third height; the sum of twice the radius and twice the second value is less than the first value, the second value being the maximum of the second width and the second height.
4. The method of claim 3, wherein the drawing a relationship graph on a display screen of the computing device based on the coordinate information of the first center point and the coordinate information of each second center point further comprises:
displaying the identification information of the first entity in the graphic area with the first central point as the center;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
5. The method of any of claims 1 to 4, wherein after drawing a relationship graph on a display screen of the computing device based on the coordinate information of the first center point and the coordinate information of each second center point, the method further comprises:
when a connecting line of any child node and the core node is selected, acquiring and displaying associated detailed information corresponding to all types of relations on the connecting line;
wherein the detailed association information corresponding to any type of relationship includes one or more of the following information corresponding to the type of relationship between the child node and the core node: time information, location information, work information.
6. The method of any of claims 1 to 4, wherein after determining all second entities associated with the first entity based on the selected first entity, the method further comprises, before drawing a relationship graph on a display screen of the computing device based on the coordinate information of the first center point and the coordinate information of each second center point:
storing the information of the first entity, the determined information of all the second entities and the relationship information of the first entity and each second entity in a set data structure;
the information of the first entity comprises first entity identification information, and the information of the second entity comprises second entity identification information; the relationship information comprises the type of the relationship and the associated detailed information corresponding to each type.
7. A presentation device of a relation graph is applied to a computing device and comprises: a memory and a processor; the method is characterized in that:
the memory is used for storing a program for displaying the relational graph;
the processor is configured to read and execute the program for displaying the relationship diagram, and perform the following operations:
determining all second entities which have association relation with the first entity according to the selected first entity; taking the first entity as a core node and each second entity as a child node;
according to the size parameter of a display screen of the computing equipment, determining the coordinate information of a first central point of the core node on the display screen and the coordinate information of a second central point of each sub-node on the display screen;
drawing a relational graph on a display screen of the computing equipment according to the coordinate information of the first central point and the coordinate information of each second central point, wherein the drawing of the relational graph comprises the following steps:
drawing the core node into a graph with the first central point as the center, and respectively drawing each sub-node into a graph with the corresponding second central point as the center;
respectively drawing a connecting line between each child node and the core node; and displaying the relation of each child node and the core node on the connecting line of the child node and the core node respectively.
8. The apparatus of claim 7, wherein:
the dimensional parameters include a first width and a first height;
the determining, according to the size parameter of the display screen of the computing device, the coordinate information of the first center point of the core node on the display screen and the coordinate information of the second center point of each child node on the display screen includes:
taking the product of the first width of the display screen and a set first coefficient as the abscissa of the first central point, and taking the product of the first height of the display screen and a set second coefficient as the ordinate of the first central point;
taking the product of a first numerical value and a set third coefficient as the radius of a circle with the first central point as the center of the circle, wherein the first numerical value is the minimum value of the first width and the first height of the display screen;
determining an angle corresponding to each second central point according to the total number of the sub-nodes, wherein the angle is an angle between a connecting line of the second central point and the first central point and a coordinate axis;
determining the abscissa and the ordinate of each second central point according to the abscissa of the first central point, the ordinate of the first central point, the radius and the angle corresponding to each second central point;
wherein the first coefficient, the second coefficient and the third coefficient are positive numbers less than 1;
the core node is located in the center of the relational graph, and the child nodes are distributed around the core node.
9. The apparatus of claim 8, wherein:
displaying the identification information of the first entity in the graphic area with the first central point as the center;
respectively displaying the identification information of the corresponding second entity in each graphic area taking the second central point as the center;
for each connecting line of the child node and the core node, displaying the type of the relationship between the child node and the core node in a third rectangular area on the connecting line;
wherein the number of the types is one or more; the width of the third rectangular area is a set fourth width, and the height of the third rectangular area is a set fourth height.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
CN202010430390.1A 2020-05-20 2020-05-20 Method and device for displaying relation graph Pending CN111708847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010430390.1A CN111708847A (en) 2020-05-20 2020-05-20 Method and device for displaying relation graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010430390.1A CN111708847A (en) 2020-05-20 2020-05-20 Method and device for displaying relation graph

Publications (1)

Publication Number Publication Date
CN111708847A true CN111708847A (en) 2020-09-25

Family

ID=72538043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010430390.1A Pending CN111708847A (en) 2020-05-20 2020-05-20 Method and device for displaying relation graph

Country Status (1)

Country Link
CN (1) CN111708847A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284328A (en) * 2018-07-26 2019-01-29 阿里巴巴集团控股有限公司 A kind of processing method of relational data, device, server and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102713A (en) * 2014-07-16 2014-10-15 百度在线网络技术(北京)有限公司 Method and device for displaying recommendation results
US20160357414A1 (en) * 2015-06-02 2016-12-08 Polewardsky Ltd Displaying a network of related entities
CN107357846A (en) * 2017-06-26 2017-11-17 北京金堤科技有限公司 The methods of exhibiting and device of relation map
CN107690087A (en) * 2017-07-04 2018-02-13 北京奇艺世纪科技有限公司 A kind of advertising display area determination method and device
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment
CN110019765A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting and device, the mobile terminal and readable storage medium storing program for executing of knowledge mapping
CN110019766A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting, device, mobile terminal and the readable storage medium storing program for executing of knowledge mapping

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102713A (en) * 2014-07-16 2014-10-15 百度在线网络技术(北京)有限公司 Method and device for displaying recommendation results
US20160357414A1 (en) * 2015-06-02 2016-12-08 Polewardsky Ltd Displaying a network of related entities
CN107357846A (en) * 2017-06-26 2017-11-17 北京金堤科技有限公司 The methods of exhibiting and device of relation map
CN107690087A (en) * 2017-07-04 2018-02-13 北京奇艺世纪科技有限公司 A kind of advertising display area determination method and device
CN110019765A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting and device, the mobile terminal and readable storage medium storing program for executing of knowledge mapping
CN110019766A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting, device, mobile terminal and the readable storage medium storing program for executing of knowledge mapping
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284328A (en) * 2018-07-26 2019-01-29 阿里巴巴集团控股有限公司 A kind of processing method of relational data, device, server and medium
CN109284328B (en) * 2018-07-26 2022-05-31 创新先进技术有限公司 Relational data processing method, device, server and medium

Similar Documents

Publication Publication Date Title
US9846687B2 (en) Word cloud candidate management system
Hegarty The cognitive science of visual‐spatial displays: Implications for design
US9449581B2 (en) Representation of overlapping visual entities
Dimmel et al. The semiotic structure of geometry diagrams: How textbook diagrams convey meaning
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
US20110265023A1 (en) Interactive Representation of Clustered Entities
US9786072B2 (en) Techniques for visualization of data
Giaquinto Visualizing in mathematics
CN108229740B (en) Method and device for determining business circle boundary, server and storage medium
US9251610B2 (en) Location info-graphics visualizations
CN103955370B (en) A kind of persistence apparatus and method of domain object model
CN111708847A (en) Method and device for displaying relation graph
CN106886510B (en) Method and device for displaying chart
Traun et al. Complexity reduction in choropleth map animations by autocorrelation weighted generalization of time-series data
Hlawatsch et al. Scale‐Stack Bar Charts
CN111382977A (en) Book purchasing method and device based on user borrowing behavior and storage medium
US11704849B2 (en) Glyph scaffolds for generating unique glyphs to use as data marks in data visualizations
Battersby et al. Ring maps for spatial visualization of multivariate epidemiological data
Schraw et al. Toward a typology of instructional visual displays
CN111724195B (en) Bench layout generation and display method and device
CN116204104B (en) Dynamic display method, device, terminal and storage medium for geometric figure
CN117171277B (en) Method, system, equipment and medium for loading marks of electronic map
CN107742096A (en) Obtain method and device, electronic equipment, the storage medium of characteristic chart information
CN111694833B (en) Data processing method, device, electronic equipment and computer readable storage medium
US11600028B1 (en) Semantic resizing of line charts

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