WO2019057190A1 - Method and apparatus for displaying knowledge graph, terminal device, and readable storage medium - Google Patents

Method and apparatus for displaying knowledge graph, terminal device, and readable storage medium Download PDF

Info

Publication number
WO2019057190A1
WO2019057190A1 PCT/CN2018/107272 CN2018107272W WO2019057190A1 WO 2019057190 A1 WO2019057190 A1 WO 2019057190A1 CN 2018107272 W CN2018107272 W CN 2018107272W WO 2019057190 A1 WO2019057190 A1 WO 2019057190A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
entities
knowledge map
display
dimensional
Prior art date
Application number
PCT/CN2018/107272
Other languages
French (fr)
Chinese (zh)
Inventor
吴正山
冯舟
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2019057190A1 publication Critical patent/WO2019057190A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Definitions

  • the present application belongs to the technical field of terminal devices, and in particular, to a method, an apparatus, a terminal device, and a readable storage medium for displaying a knowledge map.
  • Knowledge Graph also known as the scientific knowledge map, is a series of different graphs showing the relationship between knowledge development process and structure. It makes full use of artificial intelligence (AI) technology to pass complex knowledge fields. Data mining, information processing, knowledge measurement and graphic drawing are abstracted into entities and displayed, revealing the dynamic development law of knowledge field, and providing practical and valuable reference for subject research.
  • AI artificial intelligence
  • the technology for constructing the knowledge map is based on 2D construction.
  • the number of knowledge spectrum displays based on 2D is insufficient, and the exploration is poor.
  • the more layout entities must be displayed beyond the terminal device screen.
  • the user needs to perform multiple times. The operation can see the associated map information of the entity beyond the screen display, which increases the user operation cost.
  • the embodiment of the present application provides a method, a device, a terminal device, and a computer readable storage medium for displaying a knowledge map, which can solve the problem that the number of entities based on the 2D built knowledge map display is insufficient and the display space is limited.
  • the embodiment of the present application provides a method for displaying a knowledge map, including:
  • the knowledge map is displayed on an interactive interface of the terminal device.
  • the embodiment of the present application provides a display device for a knowledge map, including:
  • a determining module configured to determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity ;
  • a generating module configured to generate, according to the tree structure relationship, the display position and display size of each entity obtained according to a preset algorithm, and a preset layout rule, generate a knowledge map of the entities in the three-dimensional display space, Presenting the tree structure relationship between entities in the knowledge map;
  • a display module configured to display the knowledge map on an interaction interface of the mobile terminal.
  • the embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the program as described above.
  • a terminal device including: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the program as described above.
  • the embodiment of the present application provides a non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by the processor, a method for displaying a knowledge map as in the embodiment of the present application is implemented.
  • the method for displaying the knowledge map provided by the present application, the terminal device, and the computer readable storage medium determine the central entity and the central entity in each entity in the knowledge map in response to the display instruction of the knowledge map.
  • Each sub-entity, and a tree structure relationship between the central entity and each sub-entity, according to the tree structure relationship, the display position and display size of the entity obtained according to a preset algorithm, and a preset layout rule The knowledge map arranged by each entity in the three-dimensional display space, the tree structure relationship is presented between the entities in the knowledge map, and the obtained knowledge map has a 3D display effect, which can avoid displaying the knowledge map in the 2D space by the number of entities displayed and
  • the limitation of space enables the construction and display of knowledge maps in the terminal equipment quickly, reducing hardware limitations and saving resource consumption.
  • FIG. 1A is a schematic diagram of an application scenario according to some embodiments of the present application.
  • FIG. 1B is a schematic flowchart of a method for displaying a knowledge map provided by some embodiments of the present application
  • FIG. 2 is a schematic diagram showing a knowledge map displayed in a mobile phone interface according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a child entity located on the same side of a central entity in an embodiment of the present application
  • FIG. 4 is a schematic diagram of a handover center entity in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for displaying a knowledge map provided by some embodiments of the present application.
  • FIG. 6 is a schematic diagram of a knowledge map of a B entity as a central entity displayed in a mobile phone interface according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of a knowledge map after the A entity in FIG. 6 is switched to a central entity in a mobile phone interface according to an embodiment of the present application;
  • FIG. 8 is a schematic structural diagram of a device for displaying a knowledge map according to some embodiments of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a device for displaying a knowledge map according to some embodiments of the present application.
  • FIG. 10 is a schematic diagram showing the hardware structure of a terminal device in the embodiment of the present application.
  • the application scenario of the following embodiments of the present application is to display a knowledge map in the terminal device and various operations in the knowledge map, including: displaying a knowledge map arranged into a three-dimensional sphere according to the display position and the display size of each entity; Operation control knowledge map three-dimensional (ie, 3D) rotation; in the transition animation process, trigger different movement operations, control the current entity from far and near, near and far sliding display effect; click on the connection between multiple entities When the line is confirmed, the size of the entity connected by the connection line confirms the actually clicked connection line; click to operate the conversion center entity; slide operation to view each entity.
  • FIG. 1A shows a schematic diagram of an application scenario in accordance with some embodiments of the present application.
  • the terminal device 110 can include an application 112.
  • the terminal device 110 may be, for example, a terminal device such as a mobile phone, a notebook computer, a tablet computer, or a handheld game machine.
  • the application 112 can be a browser, a multimedia application, a social application, an instant messaging application, and the like.
  • the method for displaying the knowledge map of the embodiment of the present application may be executed by the terminal device. More specifically, the application 112 can perform the method of presenting the indication map of the present application.
  • FIG. 1B is a schematic flowchart diagram of a method for displaying a knowledge map provided by some embodiments of the present application.
  • the presentation method shown in FIG. 1B can be performed, for example, by a terminal device.
  • the method includes:
  • S101 Determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
  • the knowledge map includes multiple entities.
  • a knowledge map can include a central entity.
  • Other entities in the knowledge map other than the central entity have parent entities and may have one or more child entities.
  • a central structure forms a tree structure relationship with each child entity. The tree structure relationship between entities in a knowledge map is preset.
  • a connection line between the parent entity and the child entity.
  • Each link contains descriptive information that describes the relationship between the central entity and the entity to which it is connected.
  • the knowledge map to be displayed is a globular map, that is, each entity is distributed on a sphere, and the central entity is at the center of the sphere.
  • the preset layout rule includes: a specific shape in which the entities in the knowledge map are arranged in a three-dimensional display space, for example, each entity is arranged as a sphere; parameters of a specific shape, such as a radius of a sphere; and display of each entity
  • the form for example, whether to display the logo, whether to display the brightness enhancement of the central entity or the specified entity relative to other entities, etc.; the display form and display information of the connection line between the entities.
  • the knowledge map can be generated according to the preset layout rules, the tree structure relationship between the entities, the display position of each entity, and the display size.
  • FIG. 2 is a knowledge map displayed on the interactive interface of the mobile phone. Each entity is displayed according to the display position and the display size, and the 3D display effect of the knowledge map is formed due to the different display sizes.
  • the entity 200 is a central entity. Each entity has a text describing the entity, which can be an entity name, an entity identifier, and the like. When an entity is selected by the current operation, the text content of the entity may be displayed in the lower end area 208 of the interactive interface as shown in FIG. 2, and may of course be displayed at other specified locations of the interactive interface.
  • FIG. 2 shows the tree structure relationship between the entity 200 and each sub-entity when the entity 200 is the central entity.
  • Each sub-entity is the entity of 201-207 in FIG. 2, and in some embodiments, each sub-individual can also be displayed.
  • the relationship between an entity and its sub-entities That is, there are connection lines in the middle of an entity with a parent-child relationship.
  • Embodiments of the present application can display the relationship between two connected entities on a connection line.
  • the connection line When the user selects the connection line, the relationship between the two entities included in the connection line can be displayed in the lower part of the interaction interface, and can also be displayed in other specified positions of the interaction interface.
  • the appearance of each entity may also be presented by displaying an image that corresponds to the meaning of the physical text.
  • the display image of each entity can be obtained by performing Gaussian blurring on a picture such as PNG and feathering the transparency channel (ie, Alpha channel) of the image.
  • the display image can be saved locally on the terminal device or saved on the server. Before generating the knowledge spectrum, you need to obtain the storage address or storage link of the display image.
  • step S103 may perform Gaussian blurring processing on the image corresponding to each entity in the knowledge map, and perform feathering superposition processing on the transparency channel of the image to obtain a display image of each entity. Based on this, step S103 can display a display image of each entity. In some embodiments, step S103 may display the display image of each entity according to the placement and display size of each entity in the two-dimensional view.
  • the present application in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented
  • the tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
  • FIG. 5 is a method for displaying a knowledge map provided by some embodiments of the present disclosure, which may be performed by a terminal device, where the method includes:
  • S201 Determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
  • the knowledge map includes multiple entities, and at any time, a knowledge map has only one central entity, and other entities except the central entity have a parent entity, and may have one or more child entities, between the central entity and each child entity.
  • a knowledge map has only one central entity, and other entities except the central entity have a parent entity, and may have one or more child entities, between the central entity and each child entity.
  • Form a tree structure relationship The tree structure relationship between entities in a knowledge map can be preset.
  • connection line between the parent entity and the child entity, and each connection line contains description information for explaining the relationship between the center entity and the entity to which it is connected.
  • the knowledge spectrum to be displayed is a spheroid, that is, each entity is distributed on a sphere, and the central entity is a sphere.
  • the three-dimensional coordinates of the original layout preset by each entity are expressed in polar coordinates to obtain the original layout polar coordinates;
  • R is the sphere radius of the three-dimensional display space
  • the sphere is the sphere in which each entity of the knowledge map is located in the three-dimensional display space
  • is the azimuth angle.
  • i is the identification number of each entity
  • the identification number of each entity is preset.
  • the identification number of the central entity is 1.
  • Count is an integer value.
  • the original layout polar coordinates are represented by three-dimensional homogeneous coordinates, and the three-dimensional spiral layout coordinates of each entity are obtained;
  • the calculation formula of the three-dimensional homogeneous coordinates (x, y, z, 1) is the second formula:
  • T is an affine matrix
  • the homogeneous coordinate system is the coordinate system used in the projection geometry, and the N-dimensional vector is used to represent the N-dimensional vector.
  • the homogeneous coordinate system is used to assign the original layout three-dimensional coordinates, which is convenient for affine projection transformation calculation.
  • the embodiment of the present application obtains the three-dimensional spiral layout coordinates by using the three-dimensional homogeneous coordinates of the polar coordinates to facilitate the further transformation into the two-dimensional view coordinates by the affine matrix projection, and more closely conforms to the calculation rule of the sphere.
  • the transformation parameters of the affine matrix are calculated according to the sphere radius of the three-dimensional display space, the preset constant, and the Z-axis coordinate of the three-dimensional spiral layout coordinate, and the transformation parameter according to the affine matrix and the The X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate are calculated, and the two-dimensional view coordinate corresponding to the X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate is calculated, and the position represented by the two-dimensional view coordinate is the entity in the terminal device. Placement
  • X is a two-dimensional view coordinate
  • X 1 is a three-dimensional spiral layout coordinate
  • T is an affine matrix.
  • t is the transformation parameter of the affine matrix T
  • scale represents the entity display size, that is, the image depth of the entity
  • R is the radius of the sphere
  • c is the above-mentioned preset constant
  • d is the intermediate variable
  • x 1 is the three-dimensional spiral
  • y 1 is the Y-axis coordinate in the three-dimensional spiral layout coordinate
  • z 1 is the Z-axis coordinate in the three-dimensional spiral layout coordinate
  • ratio is the proportional parameter value.
  • z 1 is the Z-axis coordinate in the three-dimensional spiral layout coordinate, which is the second formula Calculated z.
  • t is calculated from z 1 and d.
  • the calculated y in some embodiments, yields y in two-dimensional view coordinates from y 1 and t.
  • the scale in the third formula represents the entity display size, that is, the size of the entity in the displayed knowledge map, calculated according to R, d, and z 1 , and the calculation formula is:
  • x and y in the two-dimensional view coordinates of each entity are the actual coordinates of the entities in the knowledge map displayed on the screen of the terminal device, that is, the display positions.
  • the three-dimensional coordinates are converted into two-dimensional coordinates, so that when the knowledge map is generated and displayed, the calculation amount is small, but the distribution of each entity is not affected.
  • the three-dimensional spiral layout coordinates of each entity can be used to determine the angle at which each sub-entity is connected to the central entity.
  • the two-dimensional view coordinates of each entity determine the actual distribution coordinates of each entity on the display screen (ie, the interactive interface shown);
  • the radius R of the sphere refers to the radius of the sphere arranged by each entity, and is generally set in the system in advance. R can be set to display one-half of the width of the screen (dynamically adjusted according to actual needs), so that the screen can be filled when the knowledge map is displayed, without wasting the screen display space, and displaying all entities including the central entity and its sub-entities .
  • each entity is arranged on the three-dimensional sphere according to the placement position and the display size, that is, the entities are sorted in order of small to large according to the respective display sizes (represented by scale) of the entities.
  • An entity that exhibits a large size is closer to the user in image depth than an entity that exhibits a small size.
  • the display size of different entities can make each entity present a near and far display effect when the knowledge map is displayed on the interactive interface of the terminal device.
  • the knowledge map has a depth of field effect on the display.
  • the user can control the entire knowledge map for 3D rotation.
  • the rotation instruction may be a rotation instruction triggered by a sliding operation of the user at a preset position, or may be a rotation button of a specified direction to trigger the rotation instruction.
  • the central entity maintains the display position unchanged, and the child entities of the central entity rotate around the central entity.
  • each of the sub-entities maintains a relative position and a relative distance from the central entity, and rotates in accordance with the rotation direction indicated by the rotation instruction.
  • the entire knowledge map is rotated three-dimensionally with the current central entity. Enhances the sense of spatial extension and exploration of sliding.
  • a sliding event triggered by a user operation to generate a rotation instruction when detecting a sliding event triggered by a user operation to generate a rotation instruction, sequentially acquiring a plurality of two-dimensional coordinates on the sliding track according to a sliding direction of the user on the screen of the terminal device, and calculating The coordinate axis direction angle of each of the two-dimensional coordinates; or, when it is detected that the rotation instruction is generated by the user's click on the rotation button, sequentially acquiring the plurality of sliding tracks according to the preset sliding direction corresponding to the rotation button Two-dimensional coordinates, and calculate the respective coordinate axis direction angles of each two-dimensional coordinates.
  • the system of the terminal device issues a series of pressing (DOWN), moving (MOVE), moving (MOVE), moving (MOVE), lifting (UP) and other events, if a series of mobile (MOVE) events are generated in the system, the user is considered to have performed a sliding operation.
  • the determined sliding direction sequentially acquiring a plurality of two-dimensional coordinates on the sliding track, and calculating a coordinate angle dx of each coordinate coordinate about the X axis and a coordinate direction angle dy about the Y axis, and according to the Setting a sliding speed constant and a coordinate axis angle of the two-dimensional coordinate, and calculating a direction angle and an elevation angle in the current three-dimensional spiral layout coordinate corresponding to the two-dimensional coordinate;
  • the direction angle ⁇ and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to the two-dimensional coordinates are calculated.
  • the calculation formula is as follows:
  • speed is the preset sliding speed constant, which can be set as needed; dx is the coordinate direction angle with respect to the X axis, and dy is the coordinate axis direction angle about the Y axis.
  • each of the two-dimensional coordinates is calculated.
  • the first formula, the second formula, and the third formula are used to calculate a current two-dimensional view coordinate corresponding to each two-dimensional coordinate, and the calculation manner is as described above.
  • the current center entity is displayed at a position corresponding to the current two-dimensional view coordinates corresponding to each two-dimensional coordinate in the order in which each two-dimensional coordinates are acquired. That is, the current center entity is displayed in the sliding direction, and therefore, the entire knowledge map is 3D rotated with the current center entity. Enhances the sense of spatial extension and exploration of sliding.
  • rotating according to the rotation direction indicated by the rotation instruction may specifically include: sequentially acquiring a plurality of two-dimensional coordinates on the sliding track according to the sliding direction corresponding to the rotation direction, and calculating each two-dimensional The respective coordinate axis direction angles of the coordinates; the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to each two-dimensional coordinate are calculated according to the preset sliding speed constant and the respective coordinate axis direction angles of each of the two-dimensional coordinates Calculating, according to the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to each two-dimensional coordinate, the two-dimensional coordinates corresponding to the current two-dimensional view coordinates; according to the order in which each two-dimensional coordinates are acquired, The central entity is displayed at a position of the current two-dimensional view coordinates corresponding to each of the two-dimensional coordinates.
  • the response to the sliding operation of the entity may slide the entity away from the edge of the interactive interface.
  • the moving operation on the display image of the child entity is detected, if the direction of the moving operation points to the edge of the interaction interface closest to the child entity, it is determined whether the number of all entities in the current knowledge map is less than a preset. Quantity, if the number of all entities in the current knowledge map is less than the preset number, it is determined whether all the child entities in the current knowledge map are on the same side of the central entity.
  • the specific judgment manner is: if the positions of all the sub-entities are located on the same side of the central entity, the sub-entity pointed to by the moving operation is controlled to move in a preset manner in a direction opposite to the direction of the moving operation. This preset mode moves, which can be slid at a preset speed.
  • the position of all the sub-entities is located on the same side of the central entity. Specifically, the center of gravity coordinates of all the sub-entities are on the same side of the central entity coordinates, and the current two-dimensional view coordinates of all sub-entities are located at the current center entity. The same side of the 2D view coordinates.
  • the preset number may be customized, for example, 5, 8, and the like. If the center of gravity coordinates of all the sub-entities are on the same side of the central entity coordinates, and the current two-dimensional view coordinates of all the sub-entities are located on the same side of the current two-dimensional view coordinates of the central entity, as shown in FIG. 3, FIG. 3 The center of gravity coordinates and the current two-dimensional view coordinates of all of the child entities (ie, child entities 210-213) are located on the lower side of the central entity 209. When a movement event for one of the sub-entities is detected, determining a direction of the movement operation corresponding to the movement event, and calculating a current two-dimensional view coordinate of each two-dimensional coordinate on the movement trajectory corresponding to the movement operation;
  • the current two-dimensional view coordinates of each calculated two-dimensional coordinate are subjected to positive and negative value change processing, so as to make the movement direction and movement operation of the sub-entity
  • the direction is reversed. For example, as shown in FIG. 3, if the direction of the movement operation for the leftmost entity 213 in FIG. 3 is the left edge of the interactive interface that is closest to the entity 213", the calculated two will be calculated.
  • the X-axis coordinate in the current two-dimensional view coordinate of the dimensional coordinate is changed from a negative value to a positive value. For another example, if the direction of the moving operation for the lowermost entity 212 in FIG.
  • the lower edge of the interactive interface changes the Y-axis coordinate in the current two-dimensional view coordinates of each calculated two-dimensional coordinate from a negative value to a positive value.
  • the other directions are treated in the same way.
  • the sub-entities are displayed at positions corresponding to the current two-dimensional view coordinates corresponding to each of the two-dimensional coordinates according to the sliding order of the two-dimensional coordinates on the preset trajectory.
  • Animating effects from far and near and near and far can be generated by triggering the advance or retreat of any selected entity, wherein the advance is directed to the off-screen motion, moving toward the user; the backward is opposite To the movement, moving away from the user, that is, pointing to the movement inside the screen, the backward is based on the advancement, and only the entity that first executes the advance instruction can execute the backward instruction.
  • the currently selected entity When the first movement instruction is triggered, the currently selected entity is controlled to slide from the display position to the preset position by far and near, according to the preset trajectory, and the display is enlarged according to the preset zoom ratio, and the current knowledge map is hidden except the selected trajectory.
  • Other entities than the entity to highlight the currently selected entity In some embodiments, if the currently selected entity is a central entity, each sub-entity of the currently selected entity is gathered toward the central entity during the sliding process of the central entity, when each sub-entity coincides with the center of gravity coordinate of the central entity. Hidden.
  • the triggering of the first movement instruction may be triggered by the user clicking a certain entity, the first movement instruction is to indicate that the entity performs “forward”; the second movement instruction is triggered by the user by clicking BACK (physical button or virtual The button is triggered, and the first movement instruction is to instruct the entity to perform "backward”.
  • BACK physical button or virtual The button is triggered, and the first movement instruction is to instruct the entity to perform "backward”.
  • the system of the terminal device issues a series of DOWN, MOVE, MOVE, MOVE, and UP. If the system does not have a MOVE event, and the touch point of the user's finger hits an entity in the knowledge map, it is considered that the current user's operation is a click operation, triggering the advance, and the hit entity performs the advancement and slides toward the user. If the user performs operations such as back BACK (physical button or virtual button), the back button is triggered, and the hit entity performs a back-off and slides away from the user.
  • back BACK physical button or virtual button
  • the forward sliding process is based on the change of the position of the viewpoint to make a corresponding animation effect.
  • the viewpoint refers to the position of the camera of the terminal device.
  • the imaging requires a virtual eye, that is, a camera, and the position of the camera is the viewpoint.
  • the viewpoint coordinate system is in the default state without viewpoint transformation, and the viewpoint coordinate system is consistent with the world coordinate system.
  • the default viewpoint position is a position that passes through the center of the current knowledge map X C perpendicular to the off-screen distance C.
  • the click position is X
  • the viewpoint is parallel to the screen (ie, the X-axis and the Y-axis coordinates are unchanged, and only the Z-axis coordinates are changed)
  • the position is shifted to the position X1 of the target entity.
  • Other entities than the target entity may be hidden from display, and may be panned and scaled in a direction away from the target entity X1.
  • the scaling factor (that is, the scaling) can be dynamically configured, that is, the size ratio of the target entity to the placement and preset positions can be customized.
  • V represents the sliding direction of the target entity.
  • the various parameters calculated by the above formula are recorded and stored in the system.
  • the parameter changes that occur during the retreat can be found in the parameters of the forwards stored in the system.
  • a connection line is displayed between entities in the knowledge map where the parent-child relationship is present, and the three-dimensional display space of the knowledge map is a sphere, and the user can view the connection between the two entities connected by the connection line by clicking the connection line. Relationship description. But sometimes you accidentally click on multiple connection lines.
  • confirm the display size of each entity connected to the multiple connection lines according to the display size of each entity and from large to large Small to sort each entity, will show the connection line between the two largest entities, and the connection line between the two top two entities, as the target connection line pointed to by the selection operation, display the preset position Description information contained in the target cable.
  • the user selects three connection lines, wherein the first connection line connects entity A and entity B, the second connection line connects entity A and entity C, and the third connection line connects entity B and entity D, confirming entity A, Entity B, entity C, and entity D display size, and sorted by entity according to the display size, sorted as entity A ⁇ entity B ⁇ entity C ⁇ entity D, then the two largest display sizes, and there are two connecting lines
  • the entity is the entity B and the entity C
  • the second connection line connecting the entity A and the entity C is the target connection line, and the description information contained in the target connection line is displayed at the lower end of the interaction interface.
  • the central entity in FIG. 6 is a B entity. If the user wants to switch the A entity to the central entity, click on the A entity to generate a new knowledge map for the new entity in the A entity, which is shown in Figure 7.
  • the sub-entity indicated by the operation is regarded as a central entity to be displayed, and each sub-entity of the central entity to be displayed is confirmed, and a tree between the central entity to be displayed and each sub-entity
  • the structural relationship, according to the tree structure relationship, the display position and display size of each entity obtained according to the preset algorithm, and the preset layout rule generate a knowledge map arranged in a three-dimensional space between the central entity to be displayed and each sub-entity
  • the tree structure relationship is presented between the entities in the knowledge map, and the knowledge map is displayed on the interaction interface of the terminal device.
  • the present application in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented
  • the tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
  • FIG. 8 is a diagram showing a device for displaying a knowledge map according to some embodiments of the present application. For convenience of description, only parts related to the embodiment of the present application are shown.
  • the device can be applied in a terminal device, the device comprising:
  • a determining module 301 configured to determine, according to the display instruction of the knowledge map, each of the central entities and the central entities of the central entity in the knowledge map, and the tree structure relationship between the central entity and each of the child entities;
  • the generating module 302 is configured to generate a knowledge map arranged by the entities in the three-dimensional display space according to the tree structure relationship, the display position and the display size of each entity obtained according to the preset algorithm, and the preset layout rule, and the entities in the knowledge map Presenting a tree structure relationship between them;
  • the display module 303 is configured to display the knowledge map on the interaction interface of the terminal device.
  • the device in the embodiment of the present application is used to perform the foregoing method in the embodiment of FIG. 1B.
  • the technical details not described are the same as those in the foregoing embodiment shown in FIG. 1B, and details are not described herein again.
  • the present application in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented
  • the tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
  • FIG. 9 is a display device of a knowledge map provided by some embodiments of the present application. For convenience of description, only parts related to the embodiments of the present application are shown.
  • the device can be installed in the terminal device, and the device shown in this embodiment is different from the device shown in FIG. 8 in that:
  • the device also includes:
  • a rotation module 401 configured to keep the display position unchanged in response to a rotation instruction triggered on the preset position of the interaction interface, the sub-entities of the central entity surround the central entity, and remain with the central entity The relative position and the relative distance do not change, and the rotation direction indicated by the rotation command is rotated.
  • the determining module 402 is configured to: when the moving operation on the display image of the child entity is detected, if the direction of the moving operation points to the edge of the interaction interface closest to the child entity, determine whether the number of all entities in the current knowledge map is Less than the preset number;
  • the determining module 402 is further configured to: if the number of all entities in the current knowledge map is less than the preset quantity, determine a positional relationship between all the sub-entities and the central entity in the current knowledge map;
  • the moving module 403 is further configured to control the sub-entity pointed to by the moving operation to move in a preset manner in a direction opposite to the direction of the moving operation, if the positions of all the sub-entities are located on the same side of the central entity.
  • the display module 303 is further configured to: when the first movement instruction is triggered, the currently selected entity slides from the display position to the preset position by far and near according to the preset trajectory, according to a preset zoom ratio. Enlarge the display and hide other entities in the current knowledge map other than the selected entity from being displayed;
  • the display module 303 is further configured to: when the second movement instruction is triggered, the currently selected entity slides back to the display position from the preset position by the near and far according to the preset trajectory, according to the preset zoom ratio Zoom out and show the other entities.
  • the device further includes:
  • the confirmation module 404 is configured to confirm the display size of each entity connected to the plurality of connection lines when detecting the operation of the plurality of connection lines;
  • the confirmation module 404 is further configured to use a connection line between two entities that have the largest display size as a target connection line pointed to by the selection operation;
  • the display module 405 is configured to display the description information included in the target connection line in the preset position.
  • the confirmation module 404 is further configured to: in response to the operation of the handover center entity, the sub-entity indicated by the operation as a central entity to be displayed, and confirm each sub-entity of the central entity to be displayed, and the to-be-displayed a tree structure relationship between the central entity and the respective sub-entities;
  • the generating module 302 is further configured to generate, according to the tree structure relationship, the display position and the display size of the entity obtained according to the preset algorithm, and the preset layout rule, between the central entity to be displayed and the sub-entity a knowledge map arranged in a three-dimensional space, wherein the tree structure relationship is presented between entities in the knowledge map;
  • the display module 303 is further configured to display the knowledge map after switching the central entity on the interaction interface of the terminal device.
  • the apparatus may further comprise:
  • the calculation module 406 is configured to represent the original layout three-dimensional coordinates preset by each entity in polar coordinates, obtain the original layout polar coordinates, and represent the original layout polar coordinates by using three-dimensional homogeneous coordinates to obtain a three-dimensional spiral layout of each entity. Coordinates, according to the sphere radius of the three-dimensional display space, the preset constant, and the Z-axis coordinate of the three-dimensional spiral layout coordinate, the transformation parameters of the affine matrix are calculated;
  • the calculation module 406 is further configured to calculate, according to the transformation parameter of the affine matrix and the X-axis coordinate and the Y-axis coordinate of the three-dimensional spiral layout coordinate, the X-axis coordinate and the Y-axis coordinate corresponding to the three-dimensional spiral layout coordinate of each entity.
  • the two-dimensional view coordinates, and the display size of each entity, the position represented by the two-dimensional view coordinates is the display position of the entity.
  • the obtained knowledge map in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position of each entity obtained according to the preset algorithm, and the preset layout rule generate a knowledge map arranged by the entities in the three-dimensional display space, and the tree structure is presented between the entities in the knowledge map Relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly realize the construction and display of the knowledge map in the terminal device, reduce the hardware limitation and save the resource consumption. .
  • FIG. 10 is a schematic structural diagram of a hardware structure of a terminal device according to an embodiment of the present disclosure.
  • the terminal device further includes:
  • the above-described memory 51, processor 52 input device 53 and output device 54 are connected by a bus 55.
  • the input device 53 may specifically be a camera, a touch panel, a physical button or a mouse, and the like.
  • the output device 54 can be specifically a display screen.
  • the memory 51 may be a high speed random access memory (RAM) memory or a non-volatile memory such as a magnetic disk memory.
  • RAM random access memory
  • Memory 51 is used to store a set of executable program code, and processor 52 is coupled to memory 51.
  • the embodiment of the present application further provides a computer readable storage medium, which may be provided in the terminal device in the foregoing embodiments, and the computer readable storage medium may be the foregoing The memory in the embodiment shown in FIG.
  • the computer readable storage medium stores a computer program that, when executed by the processor, implements the method of displaying the knowledge map described in the foregoing embodiments of FIGS. 1B-7.
  • the computer storable medium may also be a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or an optical disk.
  • the disclosed methods and apparatus may be implemented in other manners.
  • the embodiment of the device described above is merely illustrative.
  • the division of the module is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication link shown or discussed may be an indirect coupling or communication link through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

Abstract

Disclosed in the present application is a method for displaying a knowledge graph. The method comprises: determining a central entity of entities in a knowledge graph, sub-entities of the central entity, and a tree structure relationship between the central entity and the sub-entities in response to a knowledge graph display instruction; generating a knowledge graph of the entities arranged in a three-dimensional display space according to the tree structure relationship, display positions and display sizes of the entities obtained by means of a preset algorithm, and a preset layout rule, wherein there is a tree structure relationship between the entities in the knowledge graph; and displaying the knowledge graph on an interaction interface of a terminal device. Also disclosed in the present application are an apparatus for displaying a knowledge graph, a terminal device, and a computer readable storage medium.

Description

知识图谱的展示方法、装置、终端设备及可读存储介质Method, device, terminal device and readable storage medium for displaying knowledge map
本申请要求于2017年09月25日提交中国专利局、申请号为201710875823.2、申请名称为“知识图谱的展示方法、装置、移动终端及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on September 25, 2017, the Chinese Patent Office, the application number is 201710875823.2, and the application name is "the display method, device, mobile terminal and readable storage medium of the knowledge map". The content is incorporated herein by reference.
技术领域Technical field
本申请属于终端设备技术领域,尤其涉及一种知识图谱的展示方法、装置、终端设备及可读存储介质。The present application belongs to the technical field of terminal devices, and in particular, to a method, an apparatus, a terminal device, and a readable storage medium for displaying a knowledge map.
背景技术Background technique
知识图谱(Knowledge Graph/Vault)又称为科学知识图谱,是显示知识发展进程与结构关系的一系列各种不同的图形,它充分利用人工智能(AI,Artificial Intelligence)技术把复杂的知识领域通过数据挖掘、信息处理、知识计量和图形绘制抽象成实体而显示出来,揭示知识领域的动态发展规律,为学科研究提供切实的、有价值的参考。Knowledge Graph (Vault), also known as the scientific knowledge map, is a series of different graphs showing the relationship between knowledge development process and structure. It makes full use of artificial intelligence (AI) technology to pass complex knowledge fields. Data mining, information processing, knowledge measurement and graphic drawing are abstracted into entities and displayed, revealing the dynamic development law of knowledge field, and providing practical and valuable reference for subject research.
目前构建知识图谱的技术基于2D构建,但是对于移动客户端使用场景,基于2D构建知识谱图显示数量不足,探索感差,布局更多的实体则必须超出终端设备屏幕进行显示,用户需要多次操作才可看到超出屏幕显示的实体的关联图谱信息,增加了用户操作成本。At present, the technology for constructing the knowledge map is based on 2D construction. However, for the mobile client usage scenario, the number of knowledge spectrum displays based on 2D is insufficient, and the exploration is poor. The more layout entities must be displayed beyond the terminal device screen. The user needs to perform multiple times. The operation can see the associated map information of the entity beyond the screen display, which increases the user operation cost.
发明内容Summary of the invention
本申请实施例提供一种知识图谱的展示方法、装置、终端设备及计算机可读存储介质,可以解决基于2D构建知识图谱展示的实体数量不足及展示空间受限的问题。The embodiment of the present application provides a method, a device, a terminal device, and a computer readable storage medium for displaying a knowledge map, which can solve the problem that the number of entities based on the 2D built knowledge map display is insufficient and the display space is limited.
本申请实施例提供了一种知识图谱的展示方法,包括:The embodiment of the present application provides a method for displaying a knowledge map, including:
响应于知识图谱的展示指令,确定所述知识图谱中各实体中的中心实体和 所述中心实体的各子实体,以及所述中心实体与各子实体之间的树结构关系;Determining, in response to the display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
按照所述树结构关系、根据预置算法得到的所述各实体的展示位置和展示尺寸,以及预置的布局规则生成所述各实体在三维展示空间排布的知识图谱所述知识图谱中各实体之间呈现所述树结构关系;Generating, according to the tree structure relationship, the display position and the display size of the entities according to the preset algorithm, and the preset layout rules, each of the entities in the knowledge map arranged in the three-dimensional display space Presenting the tree structure relationship between entities;
在终端设备的交互界面上展示所述知识图谱。The knowledge map is displayed on an interactive interface of the terminal device.
本申请实施例提供了一种知识图谱的展示装置,包括:The embodiment of the present application provides a display device for a knowledge map, including:
确定模块,用于响应于知识图谱的展示指令,确定所述知识图谱中各实体中的中心实体和所述中心实体的各子实体,以及所述中心实体与各子实体之间的树结构关系;a determining module, configured to determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity ;
生成模块,用于按照所述树结构关系、根据预置算法得到的所述各实体的展示位置和展示尺寸,以及预置的布局规则生成所述各实体在三维展示空间排布的知识图谱,所述知识图谱中各实体之间呈现所述树结构关系;a generating module, configured to generate, according to the tree structure relationship, the display position and display size of each entity obtained according to a preset algorithm, and a preset layout rule, generate a knowledge map of the entities in the three-dimensional display space, Presenting the tree structure relationship between entities in the knowledge map;
展示模块,用于在移动终端的交互界面上展示所述知识图谱。And a display module, configured to display the knowledge map on an interaction interface of the mobile terminal.
本申请实施例提供了一种终端设备,包括:存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如前述本申请实施例的知识图谱的展示方法。The embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the program as described above. A method of presenting a knowledge map of an embodiment.
本申请实施例提供了一种非易失可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如本申请实施例的知识图谱的展示方法。The embodiment of the present application provides a non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by the processor, a method for displaying a knowledge map as in the embodiment of the present application is implemented.
从上述本申请实施例可知,本申请提供的知识图谱的展示方法、终端设备和计算机可读存储介质,响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,得到的知识图谱有3D的展示效果,可避免在2D空间上显示知识图谱受到实体展示数量和空间的限制,在终端设备快速实现知识图谱的构建和展示,减少硬件的限制且节省资源消耗。The method for displaying the knowledge map provided by the present application, the terminal device, and the computer readable storage medium determine the central entity and the central entity in each entity in the knowledge map in response to the display instruction of the knowledge map. Each sub-entity, and a tree structure relationship between the central entity and each sub-entity, according to the tree structure relationship, the display position and display size of the entity obtained according to a preset algorithm, and a preset layout rule The knowledge map arranged by each entity in the three-dimensional display space, the tree structure relationship is presented between the entities in the knowledge map, and the obtained knowledge map has a 3D display effect, which can avoid displaying the knowledge map in the 2D space by the number of entities displayed and The limitation of space enables the construction and display of knowledge maps in the terminal equipment quickly, reducing hardware limitations and saving resource consumption.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative labor for those skilled in the art.
图1A为根据本申请一些实施例的应用场景的示意图;FIG. 1A is a schematic diagram of an application scenario according to some embodiments of the present application; FIG.
图1B为本申请一些实施例提供的知识图谱的展示方法的流程示意图;FIG. 1B is a schematic flowchart of a method for displaying a knowledge map provided by some embodiments of the present application;
图2为本申请实施例提供的手机界面中展示知识图谱的示意图;2 is a schematic diagram showing a knowledge map displayed in a mobile phone interface according to an embodiment of the present application;
图3为本申请实施例中子实体位于中心实体同一侧的示意图;3 is a schematic diagram of a child entity located on the same side of a central entity in an embodiment of the present application;
图4为本申请实施例中切换中心实体的示意图;4 is a schematic diagram of a handover center entity in an embodiment of the present application;
图5为本申请一些实施例提供的知识图谱的展示方法的流程示意图;FIG. 5 is a schematic flowchart of a method for displaying a knowledge map provided by some embodiments of the present application;
图6为本申请实施例提供的在手机界面中展示的以B实体为中心实体的知识图谱示意图;FIG. 6 is a schematic diagram of a knowledge map of a B entity as a central entity displayed in a mobile phone interface according to an embodiment of the present application;
图7为本申请实施例提供的在手机界面中展示将图6中的A实体,切换为中心实体后的知识图谱示意图;FIG. 7 is a schematic diagram of a knowledge map after the A entity in FIG. 6 is switched to a central entity in a mobile phone interface according to an embodiment of the present application;
图8为本申请一些实施例提供的知识图谱的展示装置的结构示意图;FIG. 8 is a schematic structural diagram of a device for displaying a knowledge map according to some embodiments of the present disclosure;
图9为本申请一些实施例提供的知识图谱的展示装置的结构示意图;FIG. 9 is a schematic structural diagram of a device for displaying a knowledge map according to some embodiments of the present application;
图10示出了本申请实施例中一种终端设备的硬件结构示意图。FIG. 10 is a schematic diagram showing the hardware structure of a terminal device in the embodiment of the present application.
具体实施方式Detailed ways
为使得本申请的申请目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而非全部实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. The embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person skilled in the art based on the embodiments of the present application without creative efforts are within the scope of the present application.
以下各本申请实施例的应用场景是在终端设备中展示知识图谱以及对该知识图谱中的各种操作,包括:展示按照各实体的展示位置和展示尺寸排布成三 维球体的知识图谱;滑动操作控制知识图谱三维(即,3D)旋转;在转场动画过程中,触发不同的移动操作,控制当前实体由远及近、由近及远的滑动展示效果;在点击多条实体间的连接线时,通过连接线连接的实体的大小确认实际点击的连接线;点击操作转换中心实体;滑动操作查看各实体等。The application scenario of the following embodiments of the present application is to display a knowledge map in the terminal device and various operations in the knowledge map, including: displaying a knowledge map arranged into a three-dimensional sphere according to the display position and the display size of each entity; Operation control knowledge map three-dimensional (ie, 3D) rotation; in the transition animation process, trigger different movement operations, control the current entity from far and near, near and far sliding display effect; click on the connection between multiple entities When the line is confirmed, the size of the entity connected by the connection line confirms the actually clicked connection line; click to operate the conversion center entity; slide operation to view each entity.
图1A示出了根据本申请一些实施例的应用场景的示意图。如图1A所示,终端设备110可以包括应用112。终端设备110例如可以是手机、笔记本电脑、平板电脑、手持游戏机等终端设备。应用112可以是浏览器、多媒体应用、社交类应用、即时通讯应用等等。本申请实施例的知识图谱的展示方法可由终端设备执行终端设备。更具体而言,应用112可以执行本申请的指示图谱的展示方法。FIG. 1A shows a schematic diagram of an application scenario in accordance with some embodiments of the present application. As shown in FIG. 1A, the terminal device 110 can include an application 112. The terminal device 110 may be, for example, a terminal device such as a mobile phone, a notebook computer, a tablet computer, or a handheld game machine. The application 112 can be a browser, a multimedia application, a social application, an instant messaging application, and the like. The method for displaying the knowledge map of the embodiment of the present application may be executed by the terminal device. More specifically, the application 112 can perform the method of presenting the indication map of the present application.
请参见图1B,图1B为本申请一些实施例提供的知识图谱的展示方法的流程示意图。图1B所示的展示方法例如可以由终端设备执行。该方法包括:Referring to FIG. 1B , FIG. 1B is a schematic flowchart diagram of a method for displaying a knowledge map provided by some embodiments of the present application. The presentation method shown in FIG. 1B can be performed, for example, by a terminal device. The method includes:
S101、响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系;S101. Determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
知识图谱包括多个实体。在任意时刻,一个知识图谱可以包括一个中心实体。知识图谱中除了中心实体之外的其他实体都有父实体,并且可以有一个或多个子实体。中心实体与各子实体之间形成树结构关系。一个知识图谱中的实体间的树结构关系是预先设置的。The knowledge map includes multiple entities. At any time, a knowledge map can include a central entity. Other entities in the knowledge map other than the central entity have parent entities and may have one or more child entities. A central structure forms a tree structure relationship with each child entity. The tree structure relationship between entities in a knowledge map is preset.
在一些实施例中,在一个知识图谱里,父实体与子实体之间存在连接线。各连接线包含说明信息,用于说明中心实体与其所连接的实体之间的关系。In some embodiments, in a knowledge map, there is a connection line between the parent entity and the child entity. Each link contains descriptive information that describes the relationship between the central entity and the entity to which it is connected.
本实施例中,待展示的知识图谱为球状图,即,各实体分布在一个球体上,中心实体处在球心。In this embodiment, the knowledge map to be displayed is a globular map, that is, each entity is distributed on a sphere, and the central entity is at the center of the sphere.
S102、按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱。该知识图谱中各实体之间呈现该树结构关系。S102. Generate a knowledge map of the entities in the three-dimensional display space according to the tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules. The tree structure relationship is presented between entities in the knowledge map.
在一些实施例中,预置的布局规则包括:知识图谱中各实体在三维展示空 间排布的具体形状,例如各实体排布为球体;具体形状的参数,例如球体的半径;各实体的展示形态,例如是否展示标识、展示时是否对中心实体或指定实体进行相对于其他实体的亮度增强展示等;实体之间连接线的显示形态及显示信息等。根据该预置的布局规则、各实体间的树结构关系、各实体的展示位置和展示尺寸,可以生成知识图谱。In some embodiments, the preset layout rule includes: a specific shape in which the entities in the knowledge map are arranged in a three-dimensional display space, for example, each entity is arranged as a sphere; parameters of a specific shape, such as a radius of a sphere; and display of each entity The form, for example, whether to display the logo, whether to display the brightness enhancement of the central entity or the specified entity relative to other entities, etc.; the display form and display information of the connection line between the entities. The knowledge map can be generated according to the preset layout rules, the tree structure relationship between the entities, the display position of each entity, and the display size.
S103、在终端设备的交互界面上展示该知识图谱。S103. Display the knowledge map on an interaction interface of the terminal device.
参见图2,图2即为在手机的交互界面上展示的知识图谱,各实体按照展示位置和展示尺寸进行展示,由于展示尺寸的不同,形成知识图谱的3D展示效果。其中,实体200为中心实体。每个实体上均有描述该实体的文字,该文字可以是实体名称、实体标识等。当一个实体被当前的操作选中时,该实体的文字内容如图2所示可显示在交互界面的下端区域208,当然也可以显示在交互界面的其他指定位置。Referring to FIG. 2, FIG. 2 is a knowledge map displayed on the interactive interface of the mobile phone. Each entity is displayed according to the display position and the display size, and the 3D display effect of the knowledge map is formed due to the different display sizes. The entity 200 is a central entity. Each entity has a text describing the entity, which can be an entity name, an entity identifier, and the like. When an entity is selected by the current operation, the text content of the entity may be displayed in the lower end area 208 of the interactive interface as shown in FIG. 2, and may of course be displayed at other specified locations of the interactive interface.
中心实体与各子实体之间的树结构关系,通过连接线的形式表现。图2中展示了实体200作为中心实体时,实体200和各子实体之间的树结构关系,各子实体即为图2中201-207的实体,在一些实施例中,还可以展示每个子实体及其子实体之间的关系。即,在具有父子关系的实体中间都存在连接线。The tree structure relationship between the central entity and each sub-entity is expressed in the form of a connecting line. FIG. 2 shows the tree structure relationship between the entity 200 and each sub-entity when the entity 200 is the central entity. Each sub-entity is the entity of 201-207 in FIG. 2, and in some embodiments, each sub-individual can also be displayed. The relationship between an entity and its sub-entities. That is, there are connection lines in the middle of an entity with a parent-child relationship.
本申请的实施例可以在连接线上显示被连接的2个实体之间的关系。当用户的操作选中连接线时,连接线包含的2个实体之间的关系可显示在交互界面的下部,当然也可以显示在交互界面的其他指定位置。Embodiments of the present application can display the relationship between two connected entities on a connection line. When the user selects the connection line, the relationship between the two entities included in the connection line can be displayed in the lower part of the interaction interface, and can also be displayed in other specified positions of the interaction interface.
在一些实施例中,每个实体的外观还可以通过展示图像进行展示,该实体图像与实体文字的含义相对应。如图3、图4所示的实体外观。每个实体的展示图像,可以通过对PNG等格式的图片进行高斯模糊,以及对图片的透明度通道(即Alpha通道)进行羽化叠加,可以得到该展示图像。展示图像可以保存在终端设备本地,也可以保存在服务器上,在生成知识谱图之前需要获取到展示图像的存储地址或存储链接。In some embodiments, the appearance of each entity may also be presented by displaying an image that corresponds to the meaning of the physical text. The physical appearance shown in Figures 3 and 4. The display image of each entity can be obtained by performing Gaussian blurring on a picture such as PNG and feathering the transparency channel (ie, Alpha channel) of the image. The display image can be saved locally on the terminal device or saved on the server. Before generating the knowledge spectrum, you need to obtain the storage address or storage link of the display image.
在一些实施例中,为对外观进行展示,步骤S103可以对知识图谱中每个实 体对应的图片进行高斯模糊处理,并且对图片的透明度通道进行羽化叠加处理,以得到每个实体的展示图像。在此基础上,步骤S103可以展示每个实体的展示图像。在一些实施例中,步骤S103可以按照各实体在所述二维视图中的展示位置和展示尺寸,展示各实体的所述展示图像。In some embodiments, in order to display the appearance, step S103 may perform Gaussian blurring processing on the image corresponding to each entity in the knowledge map, and perform feathering superposition processing on the transparency channel of the image to obtain a display image of each entity. Based on this, step S103 can display a display image of each entity. In some embodiments, step S103 may display the display image of each entity according to the placement and display size of each entity in the two-dimensional view.
本申请实施例中,响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,得到的知识图谱有3D的展示效果,可避免在2D空间上显示知识图谱受到实体展示数量和空间的限制,在终端设备快速实现知识图谱的构建和展示,减少硬件的限制且节省资源消耗。In the embodiment of the present application, in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented The tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
请参见图5,图5为本申请一些实施例提供的知识图谱的展示方法,可由终端设备执行,该方法包括:Referring to FIG. 5, FIG. 5 is a method for displaying a knowledge map provided by some embodiments of the present disclosure, which may be performed by a terminal device, where the method includes:
S201、响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系;S201. Determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
知识图谱包括多个实体,并且在任意时刻,一个知识图谱只有一个中心实体,除了中心实体之外的其他实体都有父实体,并且可以有一个或多个子实体,中心实体与各子实体之间形成树结构关系。一个知识图谱中的实体间的树结构关系可以是预先设置的。The knowledge map includes multiple entities, and at any time, a knowledge map has only one central entity, and other entities except the central entity have a parent entity, and may have one or more child entities, between the central entity and each child entity. Form a tree structure relationship. The tree structure relationship between entities in a knowledge map can be preset.
在一些实施例中,在一个知识图谱里,父实体与子实体之间存在连接线,各连接线包含说明信息,用于说明中心实体与其所连接的实体之间的关系。In some embodiments, in a knowledge map, there is a connection line between the parent entity and the child entity, and each connection line contains description information for explaining the relationship between the center entity and the entity to which it is connected.
本实施例中,待展示的知识谱图为球状图,即,各实体分布在一个球体上,中心实体为球心。In this embodiment, the knowledge spectrum to be displayed is a spheroid, that is, each entity is distributed on a sphere, and the central entity is a sphere.
S202、根据预置算法得到该各实体的展示位置和展示尺寸;S202. Obtain a display position and an display size of each entity according to a preset algorithm.
首先,将该每个实体预设的原始布局三维坐标用极坐标表示,得到原始布局极坐标;First, the three-dimensional coordinates of the original layout preset by each entity are expressed in polar coordinates to obtain the original layout polar coordinates;
具体地,将每个实体的原始布局三维坐标用极坐标
Figure PCTCN2018107272-appb-000001
表示,计算公式为第一公式:
Specifically, the original layout of each entity's three-dimensional coordinates is used in polar coordinates.
Figure PCTCN2018107272-appb-000001
Said that the formula is the first formula:
Figure PCTCN2018107272-appb-000002
Figure PCTCN2018107272-appb-000002
其中,R为三维展示空间的球体半径,该球体为知识图谱的每个实体在三维展示空间中所处的球体,θ为方位角,
Figure PCTCN2018107272-appb-000003
为仰角,i为每个实体的标识序号,每个实体的标识序号是预设的,例如,中心实体的标识序号为1。count为整数值。
Where R is the sphere radius of the three-dimensional display space, and the sphere is the sphere in which each entity of the knowledge map is located in the three-dimensional display space, and θ is the azimuth angle.
Figure PCTCN2018107272-appb-000003
For the elevation angle, i is the identification number of each entity, and the identification number of each entity is preset. For example, the identification number of the central entity is 1. Count is an integer value.
在一些实施例中,利用三维齐次坐标表示该原始布局极坐标,得到每个实体的三维螺旋布局坐标;In some embodiments, the original layout polar coordinates are represented by three-dimensional homogeneous coordinates, and the three-dimensional spiral layout coordinates of each entity are obtained;
利用三维齐次坐标表示上述的原始布局极坐标,得到每个实体的三维螺旋布局坐标X=(x,y,z,1) T。其中,三维齐次坐标(x,y,z,1)的计算公式为第二公式:
Figure PCTCN2018107272-appb-000004
The three-dimensional homogeneous coordinates are used to represent the above-mentioned original layout polar coordinates, and the three-dimensional spiral layout coordinates X=(x, y, z, 1) T of each entity are obtained. Wherein, the calculation formula of the three-dimensional homogeneous coordinates (x, y, z, 1) is the second formula:
Figure PCTCN2018107272-appb-000004
其中,T为仿射矩阵。Where T is an affine matrix.
齐次坐标系是用于投影几何里的坐标系统,使用N+1维向量表示N维向量。使用齐次坐标系赋值原始布局三维坐标,目的是便于做仿射投影变换计算。本申请实施例通过将极坐标用实体的三维齐次坐标表示,以得到三维螺旋布局坐标,方便进一步通过仿射矩阵投影变换为二维视图坐标,并且,更符合球体的计算规则。The homogeneous coordinate system is the coordinate system used in the projection geometry, and the N-dimensional vector is used to represent the N-dimensional vector. The homogeneous coordinate system is used to assign the original layout three-dimensional coordinates, which is convenient for affine projection transformation calculation. The embodiment of the present application obtains the three-dimensional spiral layout coordinates by using the three-dimensional homogeneous coordinates of the polar coordinates to facilitate the further transformation into the two-dimensional view coordinates by the affine matrix projection, and more closely conforms to the calculation rule of the sphere.
在一些实施例中,根据该三维展示空间的球体半径、预设常数以及该三维螺旋布局坐标中Z轴坐标,计算得到该仿射矩阵的变换参数,并根据该仿射矩阵的变换参数和该三维螺旋布局坐标中X轴坐标和Y轴坐标,计算得到该三维螺旋布局坐标中X轴坐标和Y轴坐标对应的二维视图坐标,该二维视图坐标所表示的位置为实体在终端设备中的展示位置;In some embodiments, the transformation parameters of the affine matrix are calculated according to the sphere radius of the three-dimensional display space, the preset constant, and the Z-axis coordinate of the three-dimensional spiral layout coordinate, and the transformation parameter according to the affine matrix and the The X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate are calculated, and the two-dimensional view coordinate corresponding to the X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate is calculated, and the position represented by the two-dimensional view coordinate is the entity in the terminal device. Placement
具体地,将该三维螺旋布局坐标进行仿射矩阵投影变换X=TX 1,具体计算 公式如下述第三公式,得到二维视图坐标。其中,X为二维视图坐标,X 1为三维螺旋布局坐标,T为仿射矩阵。 Specifically, the three-dimensional spiral layout coordinates are subjected to affine matrix projection transformation X=TX 1 , and the specific calculation formula is the following third formula to obtain two-dimensional view coordinates. Where X is a two-dimensional view coordinate, X 1 is a three-dimensional spiral layout coordinate, and T is an affine matrix.
第三公式:The third formula:
Figure PCTCN2018107272-appb-000005
Figure PCTCN2018107272-appb-000005
其中,t为该仿射矩阵T的变换参数,scale表示实体展示尺寸,也即实体的图像深度,R为该球体半径,c为上述预设常数,d为中间变量,x 1为该三维螺旋布局坐标中X轴坐标,y 1为该三维螺旋布局坐标中Y轴坐标,z 1为该三维螺旋布局坐标中Z轴坐标,ratio为比例参数值。 Where t is the transformation parameter of the affine matrix T, scale represents the entity display size, that is, the image depth of the entity, R is the radius of the sphere, c is the above-mentioned preset constant, d is the intermediate variable, and x 1 is the three-dimensional spiral The X-axis coordinate in the layout coordinate, y 1 is the Y-axis coordinate in the three-dimensional spiral layout coordinate, z 1 is the Z-axis coordinate in the three-dimensional spiral layout coordinate, and ratio is the proportional parameter value.
首先,根据展示知识图谱的球体半径R、预设常数c以及该三维螺旋布局坐标中Z轴坐标z 1,计算得到该仿射矩阵的变换参数t。即,根据第三公式中的d=R*c,得到中间变量d。其中,R和c均为预设值,c例如为2。在一些实施例中,根据第三公式中的t=d/(d+z 1),得到该仿射矩阵T的变换参数t。z 1为该三维螺旋布局坐标中Z轴坐标,即为第二公式中的
Figure PCTCN2018107272-appb-000006
计算得到的z。在一些实施例中,根据z 1和d计算得到t。
First, the transformation parameter t of the affine matrix is calculated according to the sphere radius R of the display knowledge map, the preset constant c, and the Z-axis coordinate z 1 in the three-dimensional spiral layout coordinates. That is, the intermediate variable d is obtained according to d=R*c in the third formula. Where R and c are both preset values, and c is, for example, 2. In some embodiments, the transformation parameter t of the affine matrix T is obtained according to t=d/(d+z 1 ) in the third formula. z 1 is the Z-axis coordinate in the three-dimensional spiral layout coordinate, which is the second formula
Figure PCTCN2018107272-appb-000006
Calculated z. In some embodiments, t is calculated from z 1 and d.
然后,根据该仿射矩阵的变换参数t和该三维螺旋布局坐标中X轴坐标x 1和Y轴坐标y 1,计算得到该三维螺旋布局坐标中X轴坐标和Y轴坐标对应的二维视图坐标,即,根据第三公式中的x=x 1*t,得到二维视图坐标中的X轴坐标,x 1为该三维螺旋布局坐标中X轴坐标,即为第二公式中的
Figure PCTCN2018107272-appb-000007
计算得到的x,在一些实施例中,根据x 1和t得到二维视图坐标中的x;根据第三公式中的y=y 1*t,得到二维视图坐标中的Y轴坐标,y 1为该三维螺旋布局坐标中Y轴坐标,即为第二公式中的
Figure PCTCN2018107272-appb-000008
计算得到的y,在一些实施例中,根据y 1和t得到二维视图坐标中的y。
Then, according to the transformation parameter t of the affine matrix and the X-axis coordinate x 1 and the Y-axis coordinate y 1 in the three-dimensional spiral layout coordinate, a two-dimensional view corresponding to the X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate is calculated. Coordinates, that is, according to x=x 1 *t in the third formula, the X-axis coordinates in the two-dimensional view coordinates are obtained, and x 1 is the X-axis coordinate in the three-dimensional spiral layout coordinates, that is, in the second formula
Figure PCTCN2018107272-appb-000007
Calculating x, in some embodiments, obtaining x in two-dimensional view coordinates from x 1 and t; obtaining Y-axis coordinates in two-dimensional view coordinates according to y=y 1 *t in the third formula, y 1 is the Y-axis coordinate of the three-dimensional spiral layout coordinate, that is, in the second formula
Figure PCTCN2018107272-appb-000008
The calculated y, in some embodiments, yields y in two-dimensional view coordinates from y 1 and t.
第三公式中的scale表示实体展示尺寸,即,展示的知识图谱中的实体的大小,根据R、d和z 1计算得到,计算公式为: The scale in the third formula represents the entity display size, that is, the size of the entity in the displayed knowledge map, calculated according to R, d, and z 1 , and the calculation formula is:
scale=(ratio*R)/(d+z 1)。 Scale=(ratio*R)/(d+z 1 ).
需要说明的是,各实体的该二维视图坐标中的x和y,即为显示在终端设备屏幕上的知识图谱中实体的实际坐标,也即展示位置。经过仿射矩阵投影变换,将三维坐标转换为二维坐标,使得在生成和展示知识图谱时,计算量小,但不影响各实体分布为球体结构。It should be noted that x and y in the two-dimensional view coordinates of each entity are the actual coordinates of the entities in the knowledge map displayed on the screen of the terminal device, that is, the display positions. After affine matrix projection transformation, the three-dimensional coordinates are converted into two-dimensional coordinates, so that when the knowledge map is generated and displayed, the calculation amount is small, but the distribution of each entity is not affected.
另外,每个实体的三维螺旋布局坐标可用于确定每个子实体与中心实体连线的角度。In addition, the three-dimensional spiral layout coordinates of each entity can be used to determine the angle at which each sub-entity is connected to the central entity.
每个实体的二维视图坐标可确定每个实体在展示屏幕(也即展示的交互界面)上的实际分布坐标;The two-dimensional view coordinates of each entity determine the actual distribution coordinates of each entity on the display screen (ie, the interactive interface shown);
球体半径R,是指各实体排布的球体的半径,一般预先在系统中设置。R可设置为展示屏幕宽度的二分之一(根据实际需求动态调整),这样在展示该知识图谱时可以充满屏幕,既不浪费屏幕展示空间,又能够展示包括中心实体与其子实体的所有实体。The radius R of the sphere refers to the radius of the sphere arranged by each entity, and is generally set in the system in advance. R can be set to display one-half of the width of the screen (dynamically adjusted according to actual needs), so that the screen can be filled when the knowledge map is displayed, without wasting the screen display space, and displaying all entities including the central entity and its sub-entities .
S203、按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系;S203. Generate, according to the tree structure relationship, the display position and display size of the entities according to the preset algorithm, and preset layout rules, generate a knowledge map of the entities arranged in the three-dimensional display space, and the entities in the knowledge map Presenting the tree structure relationship between them;
在生成该知识图谱时,各实体按照展示位置和展示尺寸排布在三维球体上,即,将各实体按照实体各自的展示尺寸(用scale表示)由小到大的顺序进行排序。展示尺寸大的实体相较于展示尺寸小的实体,在图像深度上更靠近用户。不同实体的展示尺寸,可使得在终端设备的交互界面上展示该知识图谱时,各实体呈现由近及远的展示效果。知识图谱在展示上有景深效果。When generating the knowledge map, each entity is arranged on the three-dimensional sphere according to the placement position and the display size, that is, the entities are sorted in order of small to large according to the respective display sizes (represented by scale) of the entities. An entity that exhibits a large size is closer to the user in image depth than an entity that exhibits a small size. The display size of different entities can make each entity present a near and far display effect when the knowledge map is displayed on the interactive interface of the terminal device. The knowledge map has a depth of field effect on the display.
S204、在终端设备的交互界面上展示该知识图谱。S204. Display the knowledge map on an interaction interface of the terminal device.
在一些实施例中,在知识图谱展示后,用户可控制整个知识图谱进行3D旋转。具体地,响应于在该交互界面预置位置上触发的旋转指令,该旋转指令可 以是用户通过在预置位置的滑动操作触发的旋转指令,也可以是点击指定方向的旋转按钮触发该旋转指令,该中心实体保持展示位置不变,该中心实体的各子实体围绕该中心实体旋转。这里,各子实体保持与该中心实体之间相对位置及相对距离均不变,按照该旋转指令指示的旋转方向进行旋转。简言之,整个知识图谱随该当前中心实体一起进行三维旋转。增强了滑动的空间延伸感和探索感。In some embodiments, after the knowledge map is displayed, the user can control the entire knowledge map for 3D rotation. Specifically, in response to the rotation instruction triggered on the preset position of the interaction interface, the rotation instruction may be a rotation instruction triggered by a sliding operation of the user at a preset position, or may be a rotation button of a specified direction to trigger the rotation instruction. The central entity maintains the display position unchanged, and the child entities of the central entity rotate around the central entity. Here, each of the sub-entities maintains a relative position and a relative distance from the central entity, and rotates in accordance with the rotation direction indicated by the rotation instruction. In short, the entire knowledge map is rotated three-dimensionally with the current central entity. Enhances the sense of spatial extension and exploration of sliding.
更具体地,在一些实施例中,当检测到用户操作触发的滑动事件而生成旋转指令时,按照用户在终端设备屏幕上的滑动方向,依次获取滑动轨迹上的多个二维坐标,并计算每个二维坐标各自的坐标轴方向角;或者,当检测到因用户对旋转按钮的点击生成该旋转指令时,按照该旋转按钮对应的预设的滑动方向,依次获取滑动轨迹上的多个二维坐标,并计算每个二维坐标各自的坐标轴方向角。More specifically, in some embodiments, when detecting a sliding event triggered by a user operation to generate a rotation instruction, sequentially acquiring a plurality of two-dimensional coordinates on the sliding track according to a sliding direction of the user on the screen of the terminal device, and calculating The coordinate axis direction angle of each of the two-dimensional coordinates; or, when it is detected that the rotation instruction is generated by the user's click on the rotation button, sequentially acquiring the plurality of sliding tracks according to the preset sliding direction corresponding to the rotation button Two-dimensional coordinates, and calculate the respective coordinate axis direction angles of each two-dimensional coordinates.
其中,对于滑动事件,当用户手指触摸终端设备的屏幕时,终端设备的系统会发出一系列的按下(DOWN)、移动(MOVE)、移动(MOVE)...移动(MOVE)、抬起(UP)等事件,若系统中产生一系列的移动(MOVE)事件,则认为用户是进行了滑动操作。Wherein, for the sliding event, when the user's finger touches the screen of the terminal device, the system of the terminal device issues a series of pressing (DOWN), moving (MOVE), moving (MOVE), moving (MOVE), lifting (UP) and other events, if a series of mobile (MOVE) events are generated in the system, the user is considered to have performed a sliding operation.
按照确定的该滑动方向,依次获取滑动轨迹上的多个二维坐标,并计算每个二维坐标各自关于X轴的坐标轴方向角dx和关于Y轴的坐标轴方向角dy,并按照预设的滑动速度常量和该二维坐标各自的坐标轴方向角,计算得到该二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角;According to the determined sliding direction, sequentially acquiring a plurality of two-dimensional coordinates on the sliding track, and calculating a coordinate angle dx of each coordinate coordinate about the X axis and a coordinate direction angle dy about the Y axis, and according to the Setting a sliding speed constant and a coordinate axis angle of the two-dimensional coordinate, and calculating a direction angle and an elevation angle in the current three-dimensional spiral layout coordinate corresponding to the two-dimensional coordinate;
按照预设的滑动速度常量和二维坐标各自的坐标轴方向角,计算得到二维坐标对应的当前三维螺旋布局坐标中的方向角θ和仰角
Figure PCTCN2018107272-appb-000009
计算公式如下述第四公式:
According to the preset sliding speed constant and the coordinate axis direction angle of the two-dimensional coordinates, the direction angle θ and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to the two-dimensional coordinates are calculated.
Figure PCTCN2018107272-appb-000009
The calculation formula is as follows:
θ=dy*speedθ=dy*speed
Figure PCTCN2018107272-appb-000010
Figure PCTCN2018107272-appb-000010
其中,speed为预设的滑动速度常数,可以根据需要进行设置;dx为关于X 轴的坐标轴方向角,dy为关于Y轴的坐标轴方向角。Among them, speed is the preset sliding speed constant, which can be set as needed; dx is the coordinate direction angle with respect to the X axis, and dy is the coordinate axis direction angle about the Y axis.
在一些实施例中,根据该二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角,以及,该第一公式、该第二公式和该三公式,计算得到每个该二维坐标对应的当前二维视图坐标,根据二维坐标对应的当前三维螺旋布局坐标中的方向角θ和仰角
Figure PCTCN2018107272-appb-000011
以及,前述的该第一公式、该第二公式和该第三公式,计算得到每个二维坐标对应的当前二维视图坐标,计算方式参见前述相关内容。
In some embodiments, according to the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to the two-dimensional coordinates, and the first formula, the second formula, and the three formulas, each of the two-dimensional coordinates is calculated. Current 2D view coordinates, based on the direction angle θ and elevation angle of the current 3D spiral layout coordinates corresponding to the 2D coordinates
Figure PCTCN2018107272-appb-000011
And the first formula, the second formula, and the third formula are used to calculate a current two-dimensional view coordinate corresponding to each two-dimensional coordinate, and the calculation manner is as described above.
在一些实施例中,按照每个二维坐标获取的顺序,将当前中心实体显示在每个二维坐标对应的当前二维视图坐标对应的位置。即,按照滑动方向显示当前中心实体,因此,整个知识图谱随该当前中心实体一起进行3D旋转。增强了滑动的空间延伸感和探索感。In some embodiments, the current center entity is displayed at a position corresponding to the current two-dimensional view coordinates corresponding to each two-dimensional coordinate in the order in which each two-dimensional coordinates are acquired. That is, the current center entity is displayed in the sliding direction, and therefore, the entire knowledge map is 3D rotated with the current center entity. Enhances the sense of spatial extension and exploration of sliding.
在一些实施例中,按照所述旋转指令指示的旋转方向进行旋转,具体可以包括:按照所述旋转方向对应的滑动方向,依次获取滑动轨迹上的多个二维坐标,并计算每个二维坐标各自的坐标轴方向角;按照预设的滑动速度常量和所述每个二维坐标各自的坐标轴方向角,计算得到每个二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角;根据所述每个二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角,计算所述每个二维坐标对应当前二维视图坐标;按照所述每个二维坐标获取的顺序,将所述中心实体显示在所述每个二维坐标对应的当前二维视图坐标的位置。In some embodiments, rotating according to the rotation direction indicated by the rotation instruction may specifically include: sequentially acquiring a plurality of two-dimensional coordinates on the sliding track according to the sliding direction corresponding to the rotation direction, and calculating each two-dimensional The respective coordinate axis direction angles of the coordinates; the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to each two-dimensional coordinate are calculated according to the preset sliding speed constant and the respective coordinate axis direction angles of each of the two-dimensional coordinates Calculating, according to the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to each two-dimensional coordinate, the two-dimensional coordinates corresponding to the current two-dimensional view coordinates; according to the order in which each two-dimensional coordinates are acquired, The central entity is displayed at a position of the current two-dimensional view coordinates corresponding to each of the two-dimensional coordinates.
在一些实施例中,在一些实施例中,当实体数量较少时,为了防止无效滑动,可将对实体的滑动操作的响应,都将实体向远离交互界面边缘的方向滑动。In some embodiments, in some embodiments, when the number of entities is small, in order to prevent invalid slip, the response to the sliding operation of the entity may slide the entity away from the edge of the interactive interface.
具体地,当检测到在子实体的展示图像上的移动操作时,若该移动操作的方向指向离该子实体距离最近的交互界面边缘,则判断当前知识图谱中的所有实体数量是否小于预置数量,若当前知识图谱中的所有实体数量小于该预置数量,则确定当前知识图谱中所有子实体是否处于中心实体的同一侧。具体判断方式为:若所有子实体的位置均位于该中心实体的同一侧,则控制该移动操作指向的该子实体,向与该移动操作的方向相反的方向以预置方式移动。该预置 方式移动,可以是按照预设的速度滑动。Specifically, when the moving operation on the display image of the child entity is detected, if the direction of the moving operation points to the edge of the interaction interface closest to the child entity, it is determined whether the number of all entities in the current knowledge map is less than a preset. Quantity, if the number of all entities in the current knowledge map is less than the preset number, it is determined whether all the child entities in the current knowledge map are on the same side of the central entity. The specific judgment manner is: if the positions of all the sub-entities are located on the same side of the central entity, the sub-entity pointed to by the moving operation is controlled to move in a preset manner in a direction opposite to the direction of the moving operation. This preset mode moves, which can be slid at a preset speed.
所有子实体的位置均位于该中心实体的同一侧,具体是指:所有子实体的重心坐标均位于中心实体坐标的同一侧,且,所有子实体的当前二维视图坐标均位于中心实体的当前二维视图坐标的同一侧。此时,检测到指向离该子实体距离最近的交互界面边缘的移动操作时,例如,用户的手指在该子实体的展示图像上滑动,对该滑动操作所指向的移动做反向处理,即,响应于该移动操作,子实体向该移动操作的反方向移动。The position of all the sub-entities is located on the same side of the central entity. Specifically, the center of gravity coordinates of all the sub-entities are on the same side of the central entity coordinates, and the current two-dimensional view coordinates of all sub-entities are located at the current center entity. The same side of the 2D view coordinates. At this time, when a moving operation pointing to the edge of the interactive interface closest to the child entity is detected, for example, the user's finger slides on the display image of the child entity, and the movement pointed to by the sliding operation is reverse processed, that is, In response to the moving operation, the child entity moves in the opposite direction of the moving operation.
具体地,当知识图谱中的实体数量小于预置数量时,该预置数量可以自定义,例如5个、8个等。若所有子实体的重心坐标均位于中心实体坐标的同一侧,且,所有子实体的当前二维视图坐标均位于中心实体的当前二维视图坐标的同一侧时,如图3所示,图3中所有子实体(即,子实体210-213)的重心坐标和当前二维视图坐标都位于中心实体209的下侧。当检测到针对其中一个子实体的移动事件时,判断移动事件对应的移动操作的方向,并计算移动操作对应的移动轨迹上各二维坐标的当前二维视图坐标;Specifically, when the number of entities in the knowledge map is less than a preset number, the preset number may be customized, for example, 5, 8, and the like. If the center of gravity coordinates of all the sub-entities are on the same side of the central entity coordinates, and the current two-dimensional view coordinates of all the sub-entities are located on the same side of the current two-dimensional view coordinates of the central entity, as shown in FIG. 3, FIG. 3 The center of gravity coordinates and the current two-dimensional view coordinates of all of the child entities (ie, child entities 210-213) are located on the lower side of the central entity 209. When a movement event for one of the sub-entities is detected, determining a direction of the movement operation corresponding to the movement event, and calculating a current two-dimensional view coordinate of each two-dimensional coordinate on the movement trajectory corresponding to the movement operation;
若移动操作的方向指向离该子实体距离最近的交互界面边缘,则将计算得到的各二维坐标的当前二维视图坐标进行正负值改变处理,以使子实体的移动方向与移动操作的方向相反,例如,如图3所示,若针对图3中最左侧的实体213的移动操作的方向,是指向离实体213”距离最近的交互界面的左边缘,则将计算得到的各二维坐标的当前二维视图坐标中的X轴坐标由负值改为正值。再如,若针对图3中最下端的实体212的该移动操作的方向指向,是指向离实体212距离最近的交互界面的下边缘,则将计算得到的各二维坐标的当前二维视图坐标中的Y轴坐标由负值改为正值。其他方向同理处理。If the direction of the movement operation points to the edge of the interaction interface closest to the sub-entity, the current two-dimensional view coordinates of each calculated two-dimensional coordinate are subjected to positive and negative value change processing, so as to make the movement direction and movement operation of the sub-entity The direction is reversed. For example, as shown in FIG. 3, if the direction of the movement operation for the leftmost entity 213 in FIG. 3 is the left edge of the interactive interface that is closest to the entity 213", the calculated two will be calculated. The X-axis coordinate in the current two-dimensional view coordinate of the dimensional coordinate is changed from a negative value to a positive value. For another example, if the direction of the moving operation for the lowermost entity 212 in FIG. 3 is pointed, it is the closest to the distance from the entity 212. The lower edge of the interactive interface changes the Y-axis coordinate in the current two-dimensional view coordinates of each calculated two-dimensional coordinate from a negative value to a positive value. The other directions are treated in the same way.
在一些实施例中,按照各二维坐标在预设轨迹上的滑动顺序,将子实体显示在每个各二维坐标对应的当前二维视图坐标对应的位置。这样可使子实体呈现滑动效果。可通过触发被选择的任意实体的前进或后退,分别产生由远及近和由近及远的动画效果,其中,前进是指向屏幕外运动,向靠近用户的方向运 动;后退则是与前进反向运动,向远离用户的方向运动,即指向屏幕内运动,后退是在前进的基础上,只有先执行了前进指令的实体才可以执行后退指令。In some embodiments, the sub-entities are displayed at positions corresponding to the current two-dimensional view coordinates corresponding to each of the two-dimensional coordinates according to the sliding order of the two-dimensional coordinates on the preset trajectory. This allows the child entity to exhibit a sliding effect. Animating effects from far and near and near and far can be generated by triggering the advance or retreat of any selected entity, wherein the advance is directed to the off-screen motion, moving toward the user; the backward is opposite To the movement, moving away from the user, that is, pointing to the movement inside the screen, the backward is based on the advancement, and only the entity that first executes the advance instruction can execute the backward instruction.
当第一移动指令被触发,控制当前选中的实体按照预设轨迹,由远及近地由展示位置滑动到预置位置,按照预设缩放比例放大展示,并隐藏当前知识图谱中除该被选中的实体之外的其他实体,以凸显当前选中的实体。在一些实施例中,若该当前选中的实体为中心实体,则该当前选中的实体的各子实体在该中心实体滑动过程向该中心实体聚拢,当各子实体与该中心实体的重心坐标重合时隐藏。When the first movement instruction is triggered, the currently selected entity is controlled to slide from the display position to the preset position by far and near, according to the preset trajectory, and the display is enlarged according to the preset zoom ratio, and the current knowledge map is hidden except the selected trajectory. Other entities than the entity to highlight the currently selected entity. In some embodiments, if the currently selected entity is a central entity, each sub-entity of the currently selected entity is gathered toward the central entity during the sliding process of the central entity, when each sub-entity coincides with the center of gravity coordinate of the central entity. Hidden.
当第二移动指令被触发,控制当前选中的实体按照该预设轨迹,由近及远地由该预设位置滑回到该展示位置,按照该预设缩放比例缩小展示,并展示该其他实体。When the second movement instruction is triggered, controlling the currently selected entity to slide back to the display position from the preset position by the near and far according to the preset trajectory, narrowing the display according to the preset zoom ratio, and displaying the other entity .
其中,第一移动指令被触发可以是用户通过点击某一个实体触发的,该第一移动指令为指示该实体执行“前进”;第二移动指令被触发可以是用户通过点击BACK(实体按键或虚拟按钮)触发的,该第一移动指令为指示该实体执行“后退”。The triggering of the first movement instruction may be triggered by the user clicking a certain entity, the first movement instruction is to indicate that the entity performs “forward”; the second movement instruction is triggered by the user by clicking BACK (physical button or virtual The button is triggered, and the first movement instruction is to instruct the entity to perform "backward".
需要说明的是,用户手指触摸终端设备的屏幕时,终端设备的系统会发出一系列的按下(DOWN)、移动(MOVE)、移动(MOVE)...移动(MOVE)、抬起(UP)等事件,如果系统未有MOVE事件,且用户手指的触摸点命中知识图谱中的某一个实体,则认为当前用户的操作是点击操作,触发前进,命中的实体执行前进,向用户方向滑动,若用户通过后退BACK(实体按键或虚拟按钮)等操作,则触发后退按钮,命中的实体执行后退,远离用户方向滑动。It should be noted that when the user's finger touches the screen of the terminal device, the system of the terminal device issues a series of DOWN, MOVE, MOVE, MOVE, and UP. If the system does not have a MOVE event, and the touch point of the user's finger hits an entity in the knowledge map, it is considered that the current user's operation is a click operation, triggering the advance, and the hit entity performs the advancement and slides toward the user. If the user performs operations such as back BACK (physical button or virtual button), the back button is triggered, and the hit entity performs a back-off and slides away from the user.
需要说明的是,系统中在前进动画中记录并存储有该选中实体的展示位置的坐标。It should be noted that the coordinates of the display position of the selected entity are recorded and stored in the forward animation in the system.
其中,前进的滑动过程是基于视点位置变化做相应的动画效果。Among them, the forward sliding process is based on the change of the position of the viewpoint to make a corresponding animation effect.
视点是指终端设备的摄像机的位置,在终端设备展示该知识图谱时,成像需要虚拟的眼睛,即摄像机,该摄像机的位置即为视点。The viewpoint refers to the position of the camera of the terminal device. When the terminal device displays the knowledge map, the imaging requires a virtual eye, that is, a camera, and the position of the camera is the viewpoint.
视点坐标系的决定因素有两个:视点的位置、观察的方向。视点坐标系的X轴向右为正,Y轴向上为正,Z轴的正方向刚好是视线的反方向,Z轴的负方向与视线方向一致。视点坐标系在没有视点变换的默认状态下,视点坐标系与世界坐标系一致。There are two determinants of the viewpoint coordinate system: the position of the viewpoint and the direction of observation. The X-axis of the viewpoint coordinate system is positive to the right, the positive direction of the Y-axis is positive, the positive direction of the Z-axis is just the opposite direction of the line of sight, and the negative direction of the Z-axis is consistent with the direction of the line of sight. The viewpoint coordinate system is in the default state without viewpoint transformation, and the viewpoint coordinate system is consistent with the world coordinate system.
实体被触发前进时,默认视点位置是经过当前知识图谱的中心实体X C垂直于屏幕外距离C的某个位置。当点击当前知识图谱中的任一个实体时,点击位置为X,视点平行于屏幕(即X轴、Y轴坐标不变,只改变Z轴坐标),平移至该点击该目标实体的位置X1,并且逐渐拉近视点到C1位置。除该目标实体之外的其他实体可以隐藏不展示,也可以向远离该目标实体X1的方向做平移和缩放动画。缩放因子(也即缩放比例)可以动态配置,即,该目标实体在展示位置和预置位置的大小比例可以自定义。 When the entity is triggered to advance, the default viewpoint position is a position that passes through the center of the current knowledge map X C perpendicular to the off-screen distance C. When clicking on any of the entities in the current knowledge map, the click position is X, the viewpoint is parallel to the screen (ie, the X-axis and the Y-axis coordinates are unchanged, and only the Z-axis coordinates are changed), and the position is shifted to the position X1 of the target entity. And gradually zoomed in to the C1 position. Other entities than the target entity may be hidden from display, and may be panned and scaled in a direction away from the target entity X1. The scaling factor (that is, the scaling) can be dynamically configured, that is, the size ratio of the target entity to the placement and preset positions can be customized.
具体计算公式如下:The specific calculation formula is as follows:
Figure PCTCN2018107272-appb-000012
Figure PCTCN2018107272-appb-000012
其中,X 1为该预置位置,
Figure PCTCN2018107272-appb-000013
为该目标实体在该预置位置的大小,X为该展示位置,Scale X为该目标实体在该展示位置的大小,D为预设的距离常向量,为在Z轴改变的距离大小,V为中间向量,在上式中,V是根据V=X-X1计算得到的,V表示该目标实体的滑动方向。
Where X 1 is the preset position,
Figure PCTCN2018107272-appb-000013
For the size of the target entity at the preset position, X is the display position, Scale X is the size of the target entity at the display position, and D is a preset distance constant vector, which is the distance changed in the Z axis, V For the intermediate vector, in the above formula, V is calculated according to V=X-X1, and V represents the sliding direction of the target entity.
上述公式计算得到的各种参数均在系统中记录并存储。后退过程中发生的参数改变可参见系统中存储的前进时的各项参数。The various parameters calculated by the above formula are recorded and stored in the system. The parameter changes that occur during the retreat can be found in the parameters of the forwards stored in the system.
在一些实施例中,知识图谱中存在父子关系的各实体之间展示有连接线,知识图谱的三维展示空间为球体,用户通过点击连接线,可查看该连接线连接的两个实体之间的关系说明。但有时会不慎点击到多根连接线,当检测到对多根连接线的操作时,确认该多个连接线所连接的各实体的展示尺寸,可以按照 各实体的展示尺寸与从大到小给各实体排序,将展示尺寸最大的两个实体之间的连接线,以及排序最靠前的两个实体之间的连接线,作为选择操作指向的目标连接线,在预置位置显示该目标连接线包含的说明信息。In some embodiments, a connection line is displayed between entities in the knowledge map where the parent-child relationship is present, and the three-dimensional display space of the knowledge map is a sphere, and the user can view the connection between the two entities connected by the connection line by clicking the connection line. Relationship description. But sometimes you accidentally click on multiple connection lines. When detecting the operation of multiple connection lines, confirm the display size of each entity connected to the multiple connection lines, according to the display size of each entity and from large to large Small to sort each entity, will show the connection line between the two largest entities, and the connection line between the two top two entities, as the target connection line pointed to by the selection operation, display the preset position Description information contained in the target cable.
例如,用户选中3根连接线,其中第一根连接线连接实体A和实体B,第二根连接线连接实体A和实体C,第三根连接线连接实体B和实体D,确认实体A、实体B、实体C和实体D的展示尺寸,并按照展示尺寸为各实体排序,排序为实体A<实体B<实体C<实体D,那么展示尺寸最大的,并且之间有连接线的两个实体为实体B和实体C,则连接实体A和实体C的第二根连接线即为目标连接线,在交互界面的下端显示该目标连接线包含的说明信息。For example, the user selects three connection lines, wherein the first connection line connects entity A and entity B, the second connection line connects entity A and entity C, and the third connection line connects entity B and entity D, confirming entity A, Entity B, entity C, and entity D display size, and sorted by entity according to the display size, sorted as entity A < entity B < entity C < entity D, then the two largest display sizes, and there are two connecting lines The entity is the entity B and the entity C, and the second connection line connecting the entity A and the entity C is the target connection line, and the description information contained in the target connection line is displayed at the lower end of the interaction interface.
在一些实施例中,当用户想切换当前的中心实体,以查看当前的子实体作为新的中心实体后的知识图谱,如图6、图7所示,图6中的中心实体为B实体,若用户想将A实体切换为中心实体,则点击A实体,以A实体为新的中心实体生成新的知识图谱后展示在图7中。In some embodiments, when the user wants to switch the current central entity to view the knowledge schema of the current child entity as a new central entity, as shown in FIG. 6 and FIG. 7, the central entity in FIG. 6 is a B entity. If the user wants to switch the A entity to the central entity, click on the A entity to generate a new knowledge map for the new entity in the A entity, which is shown in Figure 7.
具体地,响应于切换中心实体的操作,将该操作指示的子实体作为待展示中心实体,并确认该待展示中心实体的各子实体,以及该待展示中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的各实体的展示位置和展示尺寸,以及该预置的布局规则生成待展示中心实体与各子实体之间在三维空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,并在终端设备的交互界面上展示该知识图谱。通过上述方式切换中心实体,可优化中心实体切换效果,以更加平滑过渡的效果方式来展示基于切换后的中心实体对应的新的知识图谱。Specifically, in response to the operation of the handover center entity, the sub-entity indicated by the operation is regarded as a central entity to be displayed, and each sub-entity of the central entity to be displayed is confirmed, and a tree between the central entity to be displayed and each sub-entity The structural relationship, according to the tree structure relationship, the display position and display size of each entity obtained according to the preset algorithm, and the preset layout rule generate a knowledge map arranged in a three-dimensional space between the central entity to be displayed and each sub-entity The tree structure relationship is presented between the entities in the knowledge map, and the knowledge map is displayed on the interaction interface of the terminal device. By switching the central entity in the above manner, the central entity switching effect can be optimized, and a new knowledge map corresponding to the central entity after the switching is displayed in a more smooth transition effect manner.
本申请实施例中,响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,得到的知识图谱有3D的展示效 果,可避免在2D空间上显示知识图谱受到实体展示数量和空间的限制,在终端设备快速实现知识图谱的构建和展示,减少硬件的限制且节省资源消耗。In the embodiment of the present application, in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented The tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
请参见图8,图8为本申请一些实施例提供的知识图谱的展示装置,为了便于说明,仅示出了与本申请实施例相关的部分。该装置可应用在终端设备中,该装置包括:Please refer to FIG. 8. FIG. 8 is a diagram showing a device for displaying a knowledge map according to some embodiments of the present application. For convenience of description, only parts related to the embodiment of the present application are shown. The device can be applied in a terminal device, the device comprising:
确定模块301,用于响应于知识图谱的展示指令,确定知识图谱中各实体中的中心实体和中心实体的各子实体,以及中心实体与各子实体之间的树结构关系;a determining module 301, configured to determine, according to the display instruction of the knowledge map, each of the central entities and the central entities of the central entity in the knowledge map, and the tree structure relationship between the central entity and each of the child entities;
生成模块302,用于按照树结构关系、根据预置算法得到的各实体的展示位置和展示尺寸,以及预置的布局规则生成各实体在三维展示空间排布的知识图谱,知识图谱中各实体之间呈现树结构关系;The generating module 302 is configured to generate a knowledge map arranged by the entities in the three-dimensional display space according to the tree structure relationship, the display position and the display size of each entity obtained according to the preset algorithm, and the preset layout rule, and the entities in the knowledge map Presenting a tree structure relationship between them;
展示模块303,用于在终端设备的交互界面上展示知识图谱。The display module 303 is configured to display the knowledge map on the interaction interface of the terminal device.
本申请实施例中的装置用于执行前述图1B该实施例的方法,未描述的技术细节与前述图1B所示实施例相同,此处不再赘述。The device in the embodiment of the present application is used to perform the foregoing method in the embodiment of FIG. 1B. The technical details not described are the same as those in the foregoing embodiment shown in FIG. 1B, and details are not described herein again.
本申请实施例中,响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,得到的知识图谱有3D的展示效果,可避免在2D空间上显示知识图谱受到实体展示数量和空间的限制,在终端设备快速实现知识图谱的构建和展示,减少硬件的限制且节省资源消耗。In the embodiment of the present application, in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position and display size of the entities obtained according to the preset algorithm, and preset layout rules generate a knowledge map arranged by the entities in the three-dimensional display space, and the entities in the knowledge map are presented The tree structure relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly constructing and displaying the knowledge map in the terminal device, and reducing the hardware limitation and Save resources.
请参见图9,图9为本申请一些实施例提供的知识图谱的展示装置,为了便于说明,仅示出了与本申请实施例相关的部分。该装置可安装在终端设备中,本实施例所示的装置与图8所示的装置不同之处在于:Referring to FIG. 9, FIG. 9 is a display device of a knowledge map provided by some embodiments of the present application. For convenience of description, only parts related to the embodiments of the present application are shown. The device can be installed in the terminal device, and the device shown in this embodiment is different from the device shown in FIG. 8 in that:
该装置还包括:The device also includes:
旋转模块401,用于响应于在该交互界面预置位置上触发的旋转指令,该中 心实体保持展示位置不变,该中心实体的各子实体围绕该中心实体,且保持与该中心实体之间相对位置与相对距离不变,向该旋转指令指示的旋转方向进行旋转。a rotation module 401, configured to keep the display position unchanged in response to a rotation instruction triggered on the preset position of the interaction interface, the sub-entities of the central entity surround the central entity, and remain with the central entity The relative position and the relative distance do not change, and the rotation direction indicated by the rotation command is rotated.
判断模块402,用于当检测到在子实体的展示图像上的移动操作时,若该移动操作的方向指向离该子实体距离最近的交互界面边缘,则判断当前知识图谱中的所有实体数量是否小于预置数量;The determining module 402 is configured to: when the moving operation on the display image of the child entity is detected, if the direction of the moving operation points to the edge of the interaction interface closest to the child entity, determine whether the number of all entities in the current knowledge map is Less than the preset number;
判断模块402,还用于若当前知识图谱中的所有实体数量小于该预置数量,则判断当前知识图谱中所有子实体与中心实体的位置关系;The determining module 402 is further configured to: if the number of all entities in the current knowledge map is less than the preset quantity, determine a positional relationship between all the sub-entities and the central entity in the current knowledge map;
移动模块403,还用于若所有子实体的位置均位于该中心实体的同一侧,则控制该移动操作指向的该子实体,向与该移动操作的方向相反的方向以预置方式移动。The moving module 403 is further configured to control the sub-entity pointed to by the moving operation to move in a preset manner in a direction opposite to the direction of the moving operation, if the positions of all the sub-entities are located on the same side of the central entity.
在一些实施例中,展示模块303,还用于当第一移动指令被触发,当前被选中的实体按照预设轨迹,由远及近地由展示位置滑动到预置位置,按照预设缩放比例放大展示,并隐藏当前知识图谱中除该被选中的实体之外的其他实体不予展示;In some embodiments, the display module 303 is further configured to: when the first movement instruction is triggered, the currently selected entity slides from the display position to the preset position by far and near according to the preset trajectory, according to a preset zoom ratio. Enlarge the display and hide other entities in the current knowledge map other than the selected entity from being displayed;
展示模块303,还用于当第二移动指令被触发,该当前被选中的实体按照该预设轨迹,由近及远地由该预设位置滑回到该展示位置,按照该预设缩放比例缩小展示,并展示该其他实体。The display module 303 is further configured to: when the second movement instruction is triggered, the currently selected entity slides back to the display position from the preset position by the near and far according to the preset trajectory, according to the preset zoom ratio Zoom out and show the other entities.
知识图谱中存在父子关系的各实体之间展示有连接线,知识图谱的三维展示空间为球体,则该装置还包括:In the knowledge map, there is a connecting line between the entities having the parent-child relationship, and the three-dimensional display space of the knowledge map is a sphere, the device further includes:
确认模块404,用于当检测到对多根该连接线的操作时,确认该多个连接线所连接的各实体的展示尺寸;The confirmation module 404 is configured to confirm the display size of each entity connected to the plurality of connection lines when detecting the operation of the plurality of connection lines;
确认模块404,还用于将将所述展示尺寸最大的两个实体之间的连接线,,作为该选择操作指向的目标连接线;The confirmation module 404 is further configured to use a connection line between two entities that have the largest display size as a target connection line pointed to by the selection operation;
显示模块405,用于在预置位置显示该目标连接线包含的说明信息。The display module 405 is configured to display the description information included in the target connection line in the preset position.
在一些实施例中,确认模块404,还用于响应于切换中心实体的操作,将该 操作指示的子实体作为待展示中心实体,并确认该待展示中心实体的各子实体,以及该待展示中心实体与该各子实体之间的树结构关系;In some embodiments, the confirmation module 404 is further configured to: in response to the operation of the handover center entity, the sub-entity indicated by the operation as a central entity to be displayed, and confirm each sub-entity of the central entity to be displayed, and the to-be-displayed a tree structure relationship between the central entity and the respective sub-entities;
生成模块302,还用于按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及该预置的布局规则生成该待展示中心实体与该各子实体之间在三维空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系;The generating module 302 is further configured to generate, according to the tree structure relationship, the display position and the display size of the entity obtained according to the preset algorithm, and the preset layout rule, between the central entity to be displayed and the sub-entity a knowledge map arranged in a three-dimensional space, wherein the tree structure relationship is presented between entities in the knowledge map;
展示模块303,还用于在终端设备的交互界面上展示切换中心实体后的知识图谱。The display module 303 is further configured to display the knowledge map after switching the central entity on the interaction interface of the terminal device.
该装置还可以进一步地包括:The apparatus may further comprise:
计算模块406,用于将该每个实体预设的原始布局三维坐标用极坐标表示,得到原始布局极坐标,利用三维齐次坐标表示该原始布局极坐标,得到该每个实体的三维螺旋布局坐标,根据该三维展示空间的球体半径、预设常数以及该三维螺旋布局坐标中Z轴坐标,计算得到该仿射矩阵的变换参数;The calculation module 406 is configured to represent the original layout three-dimensional coordinates preset by each entity in polar coordinates, obtain the original layout polar coordinates, and represent the original layout polar coordinates by using three-dimensional homogeneous coordinates to obtain a three-dimensional spiral layout of each entity. Coordinates, according to the sphere radius of the three-dimensional display space, the preset constant, and the Z-axis coordinate of the three-dimensional spiral layout coordinate, the transformation parameters of the affine matrix are calculated;
计算模块406,还用于根据该仿射矩阵的变换参数和该三维螺旋布局坐标中X轴坐标和Y轴坐标,计算得到每个实体的该三维螺旋布局坐标中X轴坐标和Y轴坐标对应的二维视图坐标,以及每个实体的展示尺寸,该二维视图坐标所表示的位置为实体的该展示位置。The calculation module 406 is further configured to calculate, according to the transformation parameter of the affine matrix and the X-axis coordinate and the Y-axis coordinate of the three-dimensional spiral layout coordinate, the X-axis coordinate and the Y-axis coordinate corresponding to the three-dimensional spiral layout coordinate of each entity. The two-dimensional view coordinates, and the display size of each entity, the position represented by the two-dimensional view coordinates is the display position of the entity.
本申请实施例中的未描述的技术细节,参见前述图1B~图8所示各实施例相同,此处不再赘述。The technical details of the undescribed in the embodiment of the present application are the same as those in the foregoing embodiments shown in FIG. 1B to FIG. 8 , and details are not described herein again.
本申请实施例中,响应于知识图谱的展示指令,确定该知识图谱中各实体中的中心实体和该中心实体的各子实体,以及该中心实体与各子实体之间的树结构关系,按照该树结构关系、根据预置算法得到的该各实体的展示位置,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系,得到的知识图谱有3D的展示效果,可避免在2D空间上显示知识图谱受到实体展示数量和空间的限制,在终端设备快速实现知识图谱的构建和展示,减少硬件的限制且节省资源消耗。In the embodiment of the present application, in response to the display instruction of the knowledge map, determining a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity, according to The tree structure relationship, the display position of each entity obtained according to the preset algorithm, and the preset layout rule generate a knowledge map arranged by the entities in the three-dimensional display space, and the tree structure is presented between the entities in the knowledge map Relationship, the obtained knowledge map has a 3D display effect, which can avoid the limitation of displaying the knowledge map in the 2D space by the number and space of the entity display, quickly realize the construction and display of the knowledge map in the terminal device, reduce the hardware limitation and save the resource consumption. .
请参见图10,图10为本申请实施例提供的终端设备硬件结构示意图。Referring to FIG. 10, FIG. 10 is a schematic structural diagram of a hardware structure of a terminal device according to an embodiment of the present disclosure.
本实施例中所描述的终端设备,包括:The terminal device described in this embodiment includes:
存储器51、处理器52及存储在存储器51上并可在处理器上运行的计算机程序,处理器执行所述程序时实现前述图1B~图7所示实施例中描述的知识图谱的展示方法。The memory 51, the processor 52, and a computer program stored on the memory 51 and operable on the processor, when the processor executes the program, implement the method for displaying the knowledge map described in the foregoing embodiments shown in FIGS. 1B to 7.
在一些实施例中,该终端设备还包括:In some embodiments, the terminal device further includes:
至少一个输入设备53;至少一个输出设备54。At least one input device 53; at least one output device 54.
上述存储器51、处理器52输入设备53和输出设备54通过总线55连接。The above-described memory 51, processor 52 input device 53 and output device 54 are connected by a bus 55.
其中,输入设备53具体可为摄像头、触控面板、物理按键或者鼠标等等。输出设备54具体可为显示屏。The input device 53 may specifically be a camera, a touch panel, a physical button or a mouse, and the like. The output device 54 can be specifically a display screen.
存储器51可以是高速随机存取记忆体(RAM,Random Access Memory)存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器。存储器51用于存储一组可执行程序代码,处理器52与存储器51耦合。The memory 51 may be a high speed random access memory (RAM) memory or a non-volatile memory such as a magnetic disk memory. Memory 51 is used to store a set of executable program code, and processor 52 is coupled to memory 51.
在一些实施例中,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是设置于上述各实施例中的终端设备中,该计算机可读存储介质可以是前述图10所示实施例中的存储器。该计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现前述图1B~图7所示实施例中描述的知识图谱的展示方法。在一些实施例中,该计算机可存储介质还可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In some embodiments, the embodiment of the present application further provides a computer readable storage medium, which may be provided in the terminal device in the foregoing embodiments, and the computer readable storage medium may be the foregoing The memory in the embodiment shown in FIG. The computer readable storage medium stores a computer program that, when executed by the processor, implements the method of displaying the knowledge map described in the foregoing embodiments of FIGS. 1B-7. In some embodiments, the computer storable medium may also be a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code.
在本申请所提供的多个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置的实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信链接可以是通过一些接口,装置或模块的间接耦合或通信链接,可以 是电性,机械或其它的形式。In the various embodiments provided by the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. For example, the embodiment of the device described above is merely illustrative. For example, the division of the module is only a logical function division. In actual implementation, there may be another division manner, for example, multiple modules or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication link shown or discussed may be an indirect coupling or communication link through some interface, device or module, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
以上为对本申请所提供的知识图谱的展示方法、知识图谱的展示装置、终端设备和计算机可读存储介质的描述,对于本领域的技术人员,依据本申请实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The above is a description of the method for displaying the knowledge map provided by the present application, the display device of the knowledge map, the terminal device, and the computer readable storage medium. For those skilled in the art, according to the idea of the embodiment of the present application, There is a change in the scope of application, and the contents of this specification should not be construed as limiting the application.

Claims (15)

  1. 一种知识图谱的展示方法,由终端设备执行,所述展示方法包括:A method for displaying a knowledge map is performed by a terminal device, and the display method includes:
    响应于知识图谱的展示指令,确定所述知识图谱中各实体中的中心实体和所述中心实体的各子实体,以及所述中心实体与各子实体之间的树结构关系;Determining, in response to the display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity;
    按照所述树结构关系、根据预置算法得到的所述各实体在二维视图中的展示位置和展示尺寸,以及预置的布局规则生成所述各实体在三维展示空间排布的知识图谱所述知识图谱中各实体之间呈现所述树结构关系;Generating a knowledge map of the entities in the three-dimensional display space according to the tree structure relationship, the display position and display size of the entities in the two-dimensional view obtained according to the preset algorithm, and the preset layout rules. Presenting the tree structure relationship between entities in the knowledge map;
    在终端设备的交互界面上展示所述知识图谱。The knowledge map is displayed on an interactive interface of the terminal device.
  2. 根据权利要求1所述的方法,所述在终端设备的交互界面上展示所述知识图谱,包括:The method according to claim 1, wherein the displaying the knowledge map on an interaction interface of the terminal device comprises:
    对所述知识图谱中每个实体对应的图片进行高斯模糊处理,并且对所述图片的透明度通道进行羽化叠加处理,以得到每个实体的展示图像;Performing a Gaussian blurring process on the image corresponding to each entity in the knowledge map, and performing a feathering superposition process on the transparency channel of the image to obtain a display image of each entity;
    展示每个实体的展示图像。Showcase the display image of each entity.
  3. 如权利要求2所述的方法,所述展示每个实体的展示图像,包括:The method of claim 2, wherein displaying the display image of each entity comprises:
    按照各实体在所述二维视图中的展示位置和展示尺寸,展示各实体的所述展示图像。The display image of each entity is displayed according to the placement and display size of each entity in the two-dimensional view.
  4. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    响应于在所述交互界面预置位置上触发的旋转指令,保持所述中心实体展示位置不变,并使得所述中心实体的各子实体围绕所述中心实体,且保持与所述中心实体之间相对位置与相对距离不变按照所述旋转指令指示的旋转方向进行旋转。Responding to the rotation instruction triggered on the preset position of the interaction interface, keeping the central entity display position unchanged, and causing each sub-entity of the central entity to surround the central entity and remaining with the central entity The relative position and the relative distance are not changed in accordance with the rotation direction indicated by the rotation command.
  5. 根据权利要求4所述的方法,所述按照所述旋转指令指示的旋转方向进行旋转,包括:The method according to claim 4, wherein the rotating according to the rotation direction indicated by the rotation instruction comprises:
    按照所述旋转方向对应的滑动方向,依次获取滑动轨迹上的多个二维坐标, 并计算每个二维坐标各自的坐标轴方向角;Obtaining a plurality of two-dimensional coordinates on the sliding track sequentially according to the sliding direction corresponding to the rotation direction, and calculating a coordinate axis angle of each of the two-dimensional coordinates;
    按照预设的滑动速度常量和所述每个二维坐标各自的坐标轴方向角,计算得到每个二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角;Calculating a direction angle and an elevation angle in a current three-dimensional spiral layout coordinate corresponding to each two-dimensional coordinate according to a preset sliding speed constant and a respective coordinate axis direction angle of each of the two-dimensional coordinates;
    根据所述每个二维坐标对应的当前三维螺旋布局坐标中的方向角和仰角,计算所述每个二维坐标对应当前二维视图坐标;按照所述每个二维坐标获取的顺序,将所述中心实体显示在所述每个二维坐标对应的当前二维视图坐标的位置。Calculating, according to the direction angle and the elevation angle in the current three-dimensional spiral layout coordinates corresponding to each two-dimensional coordinate, the two-dimensional coordinates corresponding to the current two-dimensional view coordinates; according to the order of obtaining each two-dimensional coordinates, The central entity displays the location of the current two-dimensional view coordinates corresponding to each of the two-dimensional coordinates.
  6. 根据权利要求4所述的方法,所述方法还包括:The method of claim 4, further comprising:
    当检测到在子实体的展示图像上的移动操作,且所述移动操作的方向指向离所述子实体距离最近的交互界面边缘时,确定所述知识图谱中的所有实体数量是否小于预置数量;Determining whether the number of all entities in the knowledge map is less than a preset number when a movement operation on the display image of the child entity is detected and the direction of the movement operation points to the edge of the interaction interface closest to the child entity ;
    在确定所述知识图谱中的所有实体数量小于所述预置数量时,确定所述知识图谱中所有子实体是否位于所述中心实体的同一侧;Determining whether all of the sub-entities in the knowledge map are located on the same side of the central entity when determining that the number of all entities in the knowledge map is less than the preset number;
    在确定所有子实体的位置均位于所述中心实体的同一侧时,控制所述移动操作指向的所述子实体,向与所述移动操作的方向相反的方向移动。When it is determined that the positions of all the sub-entities are located on the same side of the central entity, the sub-entities pointed to by the moving operation are controlled to move in a direction opposite to the direction of the moving operation.
  7. 根据权利要求6所述的方法,所述方法还包括:The method of claim 6 further comprising:
    当第一移动指令被触发,控制当前选中的实体按照预设轨迹,由远及近地由展示位置滑动到预置位置,且按照预设缩放比例放大展示,并隐藏当前知识图谱中除所述选中的实体之外的其他实体;When the first movement instruction is triggered, the currently selected entity is controlled to slide from the display position to the preset position by far and near distance according to the preset trajectory, and the display is enlarged according to the preset zoom ratio, and the current knowledge map is hidden in the current knowledge map. Other entities than the selected entity;
    当第二移动指令被触发,控制当前选中的所述实体按照所述预设轨迹,由近及远地由所述预设位置滑回到所述展示位置,且按照所述预设缩放比例缩小展示,并展示所述其他实体。When the second movement instruction is triggered, the currently selected entity is controlled to slide back to the display position from the preset position by the near and far according to the preset trajectory, and is reduced according to the preset zoom ratio. Show and show the other entities.
  8. 根据权利要求7所述的方法,所述知识图谱中存在父子关系的各实体之间展示有连接线,所述方法还包括:The method of claim 7, wherein the entities in the knowledge map exhibit a connection line between the entities having a parent-child relationship, the method further comprising:
    当检测到对多根所述连接线的操作时,确认所述多个连接线所连接的各实体的展示尺寸;When the operation of the plurality of the connecting lines is detected, confirming the display size of each entity to which the plurality of connecting lines are connected;
    将所述展示尺寸最大的两个实体之间的连接线,作为所述选择操作指向的目标连接线;Connecting a connection line between two entities having the largest display size as a target connection line pointed by the selection operation;
    显示所述目标连接线包含的说明信息。The description information included in the target connection line is displayed.
  9. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    响应于切换中心实体的操作,将所述操作指示的子实体作为待展示中心实体,并确认所述待展示中心实体的各子实体,以及所述待展示中心实体与所述各子实体之间的树结构关系;Responding to the operation of the handover center entity, using the sub-entity indicated by the operation as a central entity to be displayed, and confirming each sub-entity of the central entity to be displayed, and between the central entity to be displayed and the sub-entities Tree structure relationship;
    按照切换中心实体后的所述树结构关系、根据预置算法得到的所述各实体的展示位置和展示尺寸,以及所述预置的布局规则生成切换中心实体后的知识图谱;Generating a knowledge map after switching the central entity according to the tree structure relationship after the switching center entity, the display position and the display size of the entities obtained according to the preset algorithm, and the preset layout rule;
    终端设备展示切换中心实体后的知识图谱。The terminal device displays the knowledge map after switching the central entity.
  10. 根据权利要求1所述的方法,所述方法还包括:在所述按照该树结构关系、根据预置算法得到的该各实体的展示位置和展示尺寸,以及预置的布局规则生成该各实体在三维展示空间排布的知识图谱,该知识图谱中各实体之间呈现该树结构关系之前,The method according to claim 1, further comprising: generating the entities according to the display position and display size of the entities according to the tree structure relationship, according to a preset algorithm, and preset layout rules. a knowledge map arranged in a three-dimensional display space, before the tree structure relationship is presented between the entities in the knowledge map,
    将所述每个实体预设的原始布局三维坐标用极坐标表示,得到原始布局极坐标;The three-dimensional coordinates of the original layout preset by each of the entities are expressed in polar coordinates to obtain the original layout polar coordinates;
    利用三维齐次坐标表示所述原始布局极坐标,得到所述每个实体的三维螺旋布局坐标;Representing the original layout polar coordinates by using three-dimensional homogeneous coordinates to obtain three-dimensional spiral layout coordinates of each of the entities;
    根据所述三维展示空间的球体半径、预设常数以及所述三维螺旋布局坐标中Z轴坐标,计算得到所述仿射矩阵的变换参数;Calculating a transformation parameter of the affine matrix according to a sphere radius of the three-dimensional display space, a preset constant, and a Z-axis coordinate in the three-dimensional spiral layout coordinate;
    根据所述仿射矩阵的变换参数和所述三维螺旋布局坐标中X轴坐标和Y轴 坐标,计算得到每个实体的所述三维螺旋布局坐标中X轴坐标和Y轴坐标对应的二维视图坐标,以及每个实体的展示尺寸,所述二维视图坐标所表示的位置为实体的所述展示位置。Calculating a two-dimensional view corresponding to the X-axis coordinate and the Y-axis coordinate in the three-dimensional spiral layout coordinate of each entity according to the transformation parameter of the affine matrix and the X-axis coordinate and the Y-axis coordinate of the three-dimensional spiral layout coordinate The coordinates, and the display size of each entity, the position represented by the two-dimensional view coordinates is the display position of the entity.
  11. 一种知识图谱的展示装置,应用于终端设备,所述装置包括:A display device for a knowledge map is applied to a terminal device, and the device includes:
    确定模块,用于响应于知识图谱的展示指令,确定所述知识图谱中各实体中的中心实体和所述中心实体的各子实体,以及所述中心实体与各子实体之间的树结构关系;a determining module, configured to determine, according to a display instruction of the knowledge map, a central entity in each entity in the knowledge map and each sub-entity of the central entity, and a tree structure relationship between the central entity and each sub-entity ;
    生成模块,用于按照所述树结构关系、根据预置算法得到的所述各实体的展示位置和展示尺寸,以及预置的布局规则生成所述各实体在三维展示空间排布的知识图谱,所述知识图谱中各实体之间呈现所述树结构关系;a generating module, configured to generate, according to the tree structure relationship, the display position and display size of each entity obtained according to a preset algorithm, and a preset layout rule, generate a knowledge map of the entities in the three-dimensional display space, Presenting the tree structure relationship between entities in the knowledge map;
    展示模块,用于在终端设备的交互界面上展示所述知识图谱。And a display module, configured to display the knowledge map on an interaction interface of the terminal device.
  12. 根据权利要求11所述的装置,所述装置还包括:The apparatus of claim 11 further comprising:
    旋转模块,用于响应于在所述交互界面预置位置上触发的旋转指令,保持所述中心实体展示位置不变,并使得所述中心实体的各子实体围绕所述中心实体,且保持与所述中心实体之间相对位置与相对距离不变,按照所述旋转指令指示的旋转方向进行旋转。a rotation module, configured to keep the central entity display position unchanged in response to a rotation instruction triggered at the preset position of the interaction interface, and cause each sub-entity of the central entity to surround the central entity and maintain The relative positions and relative distances between the central entities are unchanged, and are rotated according to the rotation direction indicated by the rotation instruction.
  13. 根据权利要求12所述的装置,所述装置还包括:The device of claim 12, the device further comprising:
    判断模块,用于当检测到在子实体的展示图像上的移动操作时,若所述移动操作的方向指向离所述子实体距离最近的交互界面边缘,则判断当前知识图谱中的所有实体数量是否小于预置数量;a judging module, configured to determine, when the moving operation on the display image of the sub-entity, the direction of the moving operation points to the edge of the interaction interface closest to the sub-entity, determine the number of all entities in the current knowledge map Whether it is less than the preset quantity;
    所述判断模块,还用于若当前知识图谱中的所有实体数量小于所述预置数量,则判断当前知识图谱中所有子实体是否在所述中心实体的同一侧;The determining module is further configured to determine, if the number of all entities in the current knowledge map is less than the preset quantity, whether all the sub-entities in the current knowledge map are on the same side of the central entity;
    移动模块,用于若所有子实体的位置均位于所述中心实体的同一侧,则控制所述移动操作指向的所述子实体,向与所述移动操作的方向相反的方向以预 置方式移动。a moving module, configured to control, when the positions of all the sub-entities are located on the same side of the central entity, the sub-entity pointed to by the moving operation to move in a preset manner in a direction opposite to a direction of the moving operation .
  14. 一种终端设备,包括:存储器,处理器,及存储在存储器上并可由所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现权利要求1至10中任一项所述的知识图谱的展示方法。A terminal device comprising: a memory, a processor, and a computer program stored on the memory and executable by the processor, the processor executing the computer program to implement any one of claims 1 to The method of displaying the knowledge map described.
  15. 一种非易失性存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至10任一项所述的知识图谱的展示方法。A non-volatile storage medium storing a computer program, the computer program being executed by a processor to implement the method of displaying the knowledge map according to any one of claims 1 to 10.
PCT/CN2018/107272 2017-09-25 2018-09-25 Method and apparatus for displaying knowledge graph, terminal device, and readable storage medium WO2019057190A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710875823.2 2017-09-25
CN201710875823.2A CN110019766B (en) 2017-09-25 2017-09-25 Knowledge graph display method and device, mobile terminal and readable storage medium

Publications (1)

Publication Number Publication Date
WO2019057190A1 true WO2019057190A1 (en) 2019-03-28

Family

ID=65809548

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107272 WO2019057190A1 (en) 2017-09-25 2018-09-25 Method and apparatus for displaying knowledge graph, terminal device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN110019766B (en)
WO (1) WO2019057190A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143547A (en) * 2019-12-30 2020-05-12 山东大学 Big data display method based on knowledge graph
CN111292230A (en) * 2020-02-18 2020-06-16 上海交通大学 Method, system, medium, and apparatus for spiral transform data augmentation in deep learning
CN111813952A (en) * 2020-06-19 2020-10-23 北京明略软件系统有限公司 Three-dimensional display method and device of knowledge graph
CN111897973A (en) * 2020-08-10 2020-11-06 厦门渊亭信息科技有限公司 WebGL-based mass node knowledge graph visual layout method and system
CN112015908A (en) * 2020-08-19 2020-12-01 新华智云科技有限公司 Knowledge graph construction method and system, and query method and system
CN112052343A (en) * 2020-09-11 2020-12-08 北京中亦安图科技股份有限公司 Knowledge graph display method and device, electronic equipment and storage medium
CN113609282A (en) * 2021-08-09 2021-11-05 神州数码融信软件有限公司 Drawing method of automatic drawing engine
CN114860955A (en) * 2022-05-21 2022-08-05 大连海洋大学 Aquatic medical knowledge graph completion method, hybrid convolution model and training method and device thereof
CN116932780A (en) * 2023-09-13 2023-10-24 之江实验室 Astronomical knowledge graph construction method, resource searching method, device and medium
CN117033420A (en) * 2023-10-09 2023-11-10 之江实验室 Visual display method and device for entity data under same concept of knowledge graph

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427495A (en) * 2019-07-29 2019-11-08 北京明略软件系统有限公司 Map methods of exhibiting and device
CN111221977B (en) * 2019-11-15 2023-03-21 北京明略软件系统有限公司 Knowledge graph display method and device
CN110795557A (en) * 2019-12-11 2020-02-14 北京明略软件系统有限公司 Knowledge graph display method and device
CN111078864B (en) * 2019-12-24 2023-04-28 国网山东省电力公司电力科学研究院 Information security system based on knowledge graph
CN111581394B (en) * 2020-04-30 2023-06-23 北京印刷学院 Large-scale knowledge topography drawing method
CN111708847A (en) * 2020-05-20 2020-09-25 北京明略软件系统有限公司 Method and device for displaying relation graph
CN111639144A (en) * 2020-06-17 2020-09-08 北京明略软件系统有限公司 Role relationship graph generation method and device, electronic equipment and storage medium
CN113190692B (en) * 2021-05-28 2022-06-24 山东顺势教育科技有限公司 Self-adaptive retrieval method, system and device for knowledge graph
CN113536048A (en) * 2021-06-29 2021-10-22 北京明略软件系统有限公司 Map display method, system, storage medium and electronic equipment
CN114417888B (en) * 2022-03-31 2022-07-01 南京云创大数据科技股份有限公司 Three-dimensional presentation method and system of sentence relation

Citations (5)

* 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
US20140356846A1 (en) * 2012-02-06 2014-12-04 Su-Kam Intelligent Education Systems, Inc. Apparatus, systems and methods for interactive dissemination of knowledge
US20140372447A1 (en) * 2013-06-12 2014-12-18 Electronics And Telecommunications Research Institute Knowledge index system and method of providing knowledge index
CN104615783A (en) * 2015-03-02 2015-05-13 百度在线网络技术(北京)有限公司 Information searching method and device
CN106205248A (en) * 2016-08-31 2016-12-07 北京师范大学 A kind of representative learning person generates system and method at the on-line study cognitive map of domain-specific knowledge learning and mastering state

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5712965A (en) * 1994-04-25 1998-01-27 Fujitsu Limited Three-dimensional solid arranging/editing method in a computer graphic system and system
US9329756B2 (en) * 2013-09-09 2016-05-03 Adobe Systems Incorporated Navigation in a hierarchical node structure
CN104850660A (en) * 2015-06-04 2015-08-19 广东欧珀移动通信有限公司 Picture displaying method, picture displaying device and mobile terminal
CN105632251B (en) * 2016-01-20 2018-04-20 华中师范大学 3D virtual teacher system and method with phonetic function
CN106934042B (en) * 2017-03-16 2020-05-29 中国人民解放军国防科学技术大学 Knowledge graph representation system and implementation method thereof
CN106897273B (en) * 2017-04-12 2018-02-06 福州大学 A kind of network security dynamic early-warning method of knowledge based collection of illustrative plates

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140356846A1 (en) * 2012-02-06 2014-12-04 Su-Kam Intelligent Education Systems, Inc. Apparatus, systems and methods for interactive dissemination of knowledge
US20140372447A1 (en) * 2013-06-12 2014-12-18 Electronics And Telecommunications Research Institute Knowledge index system and method of providing knowledge index
CN104102713A (en) * 2014-07-16 2014-10-15 百度在线网络技术(北京)有限公司 Method and device for displaying recommendation results
CN104615783A (en) * 2015-03-02 2015-05-13 百度在线网络技术(北京)有限公司 Information searching method and device
CN106205248A (en) * 2016-08-31 2016-12-07 北京师范大学 A kind of representative learning person generates system and method at the on-line study cognitive map of domain-specific knowledge learning and mastering state

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143547B (en) * 2019-12-30 2020-09-01 山东大学 Big data display method based on knowledge graph
CN111143547A (en) * 2019-12-30 2020-05-12 山东大学 Big data display method based on knowledge graph
CN111292230B (en) * 2020-02-18 2023-04-28 上海交通大学 Spiral transformation data amplification method, system, medium and equipment in deep learning
CN111292230A (en) * 2020-02-18 2020-06-16 上海交通大学 Method, system, medium, and apparatus for spiral transform data augmentation in deep learning
CN111813952A (en) * 2020-06-19 2020-10-23 北京明略软件系统有限公司 Three-dimensional display method and device of knowledge graph
CN111897973A (en) * 2020-08-10 2020-11-06 厦门渊亭信息科技有限公司 WebGL-based mass node knowledge graph visual layout method and system
CN112015908A (en) * 2020-08-19 2020-12-01 新华智云科技有限公司 Knowledge graph construction method and system, and query method and system
CN112052343A (en) * 2020-09-11 2020-12-08 北京中亦安图科技股份有限公司 Knowledge graph display method and device, electronic equipment and storage medium
CN113609282A (en) * 2021-08-09 2021-11-05 神州数码融信软件有限公司 Drawing method of automatic drawing engine
CN114860955A (en) * 2022-05-21 2022-08-05 大连海洋大学 Aquatic medical knowledge graph completion method, hybrid convolution model and training method and device thereof
CN114860955B (en) * 2022-05-21 2023-10-03 大连海洋大学 Aquatic medicine knowledge graph completion method, mixed convolution model, training method and training equipment thereof
CN116932780A (en) * 2023-09-13 2023-10-24 之江实验室 Astronomical knowledge graph construction method, resource searching method, device and medium
CN116932780B (en) * 2023-09-13 2024-01-09 之江实验室 Astronomical knowledge graph construction method, resource searching method, device and medium
CN117033420A (en) * 2023-10-09 2023-11-10 之江实验室 Visual display method and device for entity data under same concept of knowledge graph
CN117033420B (en) * 2023-10-09 2024-01-09 之江实验室 Visual display method and device for entity data under same concept of knowledge graph

Also Published As

Publication number Publication date
CN110019766B (en) 2023-01-13
CN110019766A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
WO2019057190A1 (en) Method and apparatus for displaying knowledge graph, terminal device, and readable storage medium
US10678340B2 (en) System and method for providing user interface tools
JP5942456B2 (en) Image processing apparatus, image processing method, and program
US8811667B2 (en) Terminal device, object control method, and program
Millette et al. DualCAD: integrating augmented reality with a desktop GUI and smartphone interaction
EP2814000B1 (en) Image processing apparatus, image processing method, and program
CN106575160A (en) Method and apparatus for providing interface recognizing movement in accordance with user&#39;s view
WO2018204029A2 (en) Three-dimensional digital model ghosting
US20140298258A1 (en) Switch List Interactions
US9489759B1 (en) File path translation for animation variables in an animation system
US11893206B2 (en) Transitions between states in a hybrid virtual reality desktop computing environment
KR20150067096A (en) Method, system and computer-readable recording medium for creating motion sequence of animation
US10614633B2 (en) Projecting a two-dimensional image onto a three-dimensional graphical object
JP2013164697A (en) Image processing device, image processing method, program and image processing system
US10073612B1 (en) Fixed cursor input interface for a computer aided design application executing on a touch screen device
CN104820584B (en) Construction method and system of 3D gesture interface for hierarchical information natural control
WO2024066756A1 (en) Interaction method and apparatus, and display device
US20230143010A1 (en) Integration of a two-dimensional input device into a three-dimensional computing environment
EP2779116B1 (en) Smooth manipulation of three-dimensional objects
WO2022218146A1 (en) Devices, methods, systems, and media for an extended screen distributed user interface in augmented reality
Boubekeur ShellCam: Interactive geometry-aware virtual camera control
JP6304305B2 (en) Image processing apparatus, image processing method, and program
US20220335676A1 (en) Interfacing method and apparatus for 3d sketch
US20230119646A1 (en) Integration of a two-dimensional input device into a three-dimensional computing environment
US10990251B1 (en) Smart augmented reality selector

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18859629

Country of ref document: EP

Kind code of ref document: A1