CN110516205B - Data structure diagram display method and device, computer equipment and storage medium - Google Patents

Data structure diagram display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110516205B
CN110516205B CN201910655481.2A CN201910655481A CN110516205B CN 110516205 B CN110516205 B CN 110516205B CN 201910655481 A CN201910655481 A CN 201910655481A CN 110516205 B CN110516205 B CN 110516205B
Authority
CN
China
Prior art keywords
node
data
structure diagram
data structure
local area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910655481.2A
Other languages
Chinese (zh)
Other versions
CN110516205A (en
Inventor
陈恺
刘嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910655481.2A priority Critical patent/CN110516205B/en
Priority to PCT/CN2019/116709 priority patent/WO2021012486A1/en
Publication of CN110516205A publication Critical patent/CN110516205A/en
Application granted granted Critical
Publication of CN110516205B publication Critical patent/CN110516205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a display method, a display device, computer equipment and a storage medium of a data structure diagram, wherein the display method of the data structure diagram comprises the following steps: identifying a first position area determined by a user on the target data structure diagram through a cursor; acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node; according to the node codes corresponding to the data nodes, locking a local area structure chart corresponding to the target data structure chart according to a preset rule; and displaying the local area structure diagram according to a preset display mode. The node number of the data node is increased when the target data structure diagram is constructed, and the node number is stored in association with the node position information of the data node to serve as the keyword information of the data node, and the local data structure diagram of the corresponding data node is displayed in a targeted manner according to the keyword information input by a user, so that the whole or local display of the data structure diagram is realized, and the user can check the data structure diagram more conveniently.

Description

Data structure diagram display method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for displaying a data structure diagram, a computer device, and a storage medium.
Background
In the prior art, a target data structure is constructed according to configuration information, the incidence relation between node positions and display data is realized, the node positions contained in the data structure and the incidence relation between nodes can be automatically drawn into the data structure, and the construction of a data structure diagram is simply and quickly realized. However, only the association information between the nodes is associated when the data structure diagram is constructed, so that a node topology is formed, the whole data structure diagram can be displayed only in a whole manner no matter the data structure diagram is displayed according to the display state corresponding to the configuration information, and when the data structure diagram contains a large amount of data and the node structure is complex, the display effect is not friendly enough, and the targeted local display cannot be performed according to the selected node.
Disclosure of Invention
The present application mainly aims to provide a method for displaying a data structure diagram, and aims to solve the technical problem that an existing data structure diagram cannot be subjected to targeted partial display.
The application provides a display method of a data structure diagram, which comprises the following steps:
identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes;
acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node;
according to the node codes corresponding to the data nodes, locking a local area structure chart corresponding to the target data structure chart according to a preset rule;
and displaying the local area structure diagram according to a preset display mode.
Preferably, the step of identifying the first location area determined by the user through the cursor on the target data structure diagram comprises:
acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one to one;
and constructing the target data structure chart according to the configuration information, wherein the target data structure chart carries node codes which are in one-to-one correspondence with the node position information.
Preferably, the step of obtaining the configuration information of the target data structure diagram includes:
identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart;
respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information;
and storing each node code and node position information of each data node in a correlation mode.
Preferably, the step of locking the local area structure diagram corresponding to the target data structure diagram according to the node code corresponding to the data node and the preset rule includes:
acquiring node position information corresponding to a designated data node according to a first node code, wherein the designated data node is any one of all data nodes, and the first node code is a node code corresponding to the designated data node;
determining a first node group in a link relation with the designated data node according to the node position information of the designated data node, wherein the first node group comprises a root node of the designated data node and child nodes of the designated data node;
and locking a first local area structure diagram in the target data structure diagram corresponding to the first node group.
Preferably, the step of locking the local area structure diagram corresponding to the target data structure diagram according to a preset rule based on the node code corresponding to the data node includes:
judging whether a first data node and a second data node exist in the target data structure diagram or not, wherein the first data node and the second data node are any two of all the data nodes, and the link path comprises a direct path formed by direct links and an indirect path formed by indirect links;
if the data node exists, determining a second node group according to the link path, wherein the second node group comprises all data nodes on the link path;
and locking a second local area structure diagram in the target data structure diagram corresponding to the second node group.
Preferably, the step of displaying the local area structure diagram according to a preset display mode includes:
hiding data nodes and link segments in the target data structure chart except the local area structure chart.
Preferably, after the step of displaying the local area structure diagram according to a preset display manner, the method includes:
determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram;
monitoring a moving track of a user dragging the first data node through a cursor;
and translating the data nodes except the first data node and the link line segments among the data nodes in the local area structure chart according to the movement track.
The application also provides a display device of data structure picture, includes:
the system comprises a first identification module, a second identification module and a display module, wherein the first identification module is used for identifying a first position area determined by a user on a target data structure diagram through a cursor, the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes;
a first obtaining module, configured to obtain keyword information corresponding to the first location area, where the keyword information includes a node code corresponding to a data node;
the locking module is used for locking a local area structure chart corresponding to the target data structure chart according to a preset rule according to the node codes corresponding to the data nodes;
and the display module is used for displaying the local area structure chart according to a preset display mode.
The present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as described above.
The node number of the data node is increased when the target data structure diagram is constructed, and the node number is stored in association with the node position information of the data node to serve as the keyword information of the data node, the local data structure diagram of the data node corresponding to the keyword information is displayed in a targeted mode according to the keyword information input by a user, the node number of the data node is increased when the target data structure diagram is constructed, the whole or local display of the data structure diagram is achieved, and the user can check the data structure diagram more conveniently. The key word information comprises a node number of one data node or node numbers of two data nodes, and a local data structure diagram corresponding to a target data structure diagram is locked according to the node number of one data node, wherein the local data structure diagram comprises a root node and a child node of the data node and an incidence relation between the nodes; and locking all data nodes and incidence relations between the two data nodes in the target data structure chart according to the node numbers of the two data nodes.
Drawings
Fig. 1 is a schematic flow chart of a method for displaying a data structure diagram according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a display device of a data structure according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, the method for displaying a data structure diagram of the present embodiment includes:
s1: and identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of the data nodes.
In the embodiment, the state of the user for controlling the movement of the cursor is captured, and the data node is positioned through the positioning action of the cursor, for example, when the user moves the cursor to the data node M on the data structure diagram, the keyword information corresponding to the data node M is flashed at the position corresponding to the data node M on the data structure diagram; when the cursor leaves the data node M, the keyword information corresponding to the data node M may terminate flashing. In this embodiment, a selection positioning signal is formed by the continuous pause of the cursor, and it is determined whether the duration of the cursor pausing at the data node M exceeds a preset duration, and if so, it is determined that the data node M is selected. The user forms a first location area by selecting at least two data nodes on the positioning target data structure diagram.
S2: and acquiring keyword information corresponding to the first position area, wherein the keyword information comprises node codes corresponding to the data nodes.
In this embodiment, each data node in the target data structure diagram is encoded according to a preset encoding rule to form a corresponding node code, so as to distinguish each data node. The node code corresponding to each data node in this embodiment can reflect the association relationship between each data node and other data nodes, and can search in the target data structure diagram according to the node code to quickly locate each data node, thereby facilitating to search the corresponding information of the data node in the target data structure diagram and managing each data node.
S3: and locking a local area structure chart corresponding to the target data structure chart according to a preset rule according to the node codes corresponding to the data nodes.
According to the embodiment, the local area structure chart required by the user is quickly locked according to the node codes contained in the keyword information, and the local area structure chart is conveniently screened by the user through inputting the node codes. The preset rules comprise a first rule corresponding to the locking of the local area structure diagram corresponding to the first position area according to one data node, and a second rule corresponding to the locking of the local area structure diagram corresponding to the first position area according to two data nodes, and the corresponding preset rules are called in a pertinence mode by identifying the number of node codes input by a user. The keyword information of this embodiment includes a node code of one data node or node codes corresponding to two data nodes respectively.
S4: and displaying the local area structure diagram according to a preset display mode.
The preset display mode of this embodiment includes intercepting the local area structure diagram to a designated display area for display, or hiding a part other than the local area structure diagram at an original display position of the target data structure diagram to highlight the local area structure diagram.
Further, before the step S1 of identifying the first location area determined by the user on the target data structure diagram through the cursor, the method includes:
s11: and acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one to one.
The configuration information of this embodiment includes node location information of the data node, where the node location information is represented by a hierarchical number of the data node in the target data structure diagram relative to a total root node of the target data structure diagram, for example, if the total root node is data node a, a child node of the data node a is data node B, a child node of the data node B is data node C, then the hierarchical number of the data node C relative to the data node a is 2, and the node location information of the data node C is represented as A2. The node code of the embodiment not only comprises the data node position, but also comprises the link relation with other data nodes, the node code corresponding to the node position information is established, the data node is quickly positioned, and the node code is a corresponding digital combination, so that the calling operation of a user is facilitated.
S12: and constructing the target data structure chart according to the configuration information, wherein the target data structure chart carries node codes which are in one-to-one correspondence with the node position information.
When the target data structure diagram is constructed, the node codes corresponding to the node position information one to one are associated to the target data structure diagram, so that the designated position area in the target data structure diagram can be quickly positioned through the node codes.
Further, before the step S11 of acquiring the configuration information of the target data structure diagram, the method includes:
s11a: and identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart.
The node level information in this embodiment is the level number of the data node in the target data structure diagram relative to the total root node. The level number can be represented by Arabic numerals, 0 represents the highest level, and the larger the number is, the lower the level of the node is; the number of levels can also be represented by letters a to z, a representing the total root node as the highest level, with lower levels being the lower the letter rank is, in 26 letter order.
S11b: and respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information.
The node position information of the embodiment simultaneously comprises node grade information and node link information, the information is comprehensive and convenient to position, and the node grade information and the node link information are respectively represented by numbers, so that the operation is simple and convenient. For example, if the node level information of the data node B corresponds to a number 2, the node link information of the data node B is a child node of the root node, and the lower node of the data node B is the data node C, the node link information of the data node B is represented as 0a3c,0a, the data node B is a child node of the root node a, 3C, the lower node of the data node B is the data node C, and the level of the data node C with respect to the root node a is 3, so that the node code of the data node B is 20A3C.
S11c: and storing each node code in association with node position information of each data node.
In the embodiment, the node codes are stored in association with the node position information of each data node, so that the node codes are associated with the target data structure diagram when the target data structure diagram is constructed.
Further, the step S3 of locking the local area structure diagram corresponding to the target data structure diagram according to the node code corresponding to the data node and the preset rule includes:
s31: and acquiring node position information corresponding to the specified data node according to a first node code, wherein the specified data node is any one of all data nodes, and the first node code is the node code corresponding to the specified data node.
S32: and determining a first node group having a link relation with the designated data node according to the node position information of the designated data node, wherein the first node group comprises a root node of the designated data node and child nodes of the designated data node.
S33: and locking a first local area structure diagram in the target data structure diagram corresponding to the first node group.
In this embodiment, a first rule is explained by taking a node code of a data node included in the keyword information as an example, where the first rule is a corresponding locking rule when a local area structure diagram corresponding to the first location area is locked according to a data node, so that the first local area structure is locked by taking a designated data node corresponding to a node code input by a user as a center. For example, the first local area structure includes a root node of a specified data node and children nodes of the specified data node.
Further, the step S3 of locking the local area structure diagram corresponding to the target data structure diagram according to the node code corresponding to the data node and the preset rule includes:
s34: judging whether a first data node and a second data node exist in the target data structure diagram or not, wherein the first data node and the second data node are any two of all data nodes, and the link path comprises a direct path formed by direct links and an indirect path formed by indirect links.
S35: and if the data node exists, determining a second node group according to the link path, wherein the second node group comprises all data nodes on the link path.
S36: and locking a second local area structure diagram in the target data structure diagram corresponding to the second node group.
In this embodiment, for example, node codes of two data nodes included in the keyword information are used to explain a second rule, where the second rule is a corresponding locking rule when the local area structure diagram corresponding to the first location area is locked according to the two data nodes, so as to determine a second local area structure according to a link path corresponding to the two node codes input by a user, where for example, the second local area structure includes all data nodes on the link path. The link path is a connection relationship between data nodes, and is determined according to the data nodes with the connection relationship in the target data structure diagram, and if a continuous connection relationship exists between the data node J and the data node H, the link path exists. For example, a total root node exists in the target data structure diagram, which is a data node a, and the data node a includes three subordinate child nodes, which are a data node B, a data node H, and a data node L, respectively; a data node A- > a data node B- > a data node C- > a data node D exists in the target data structure diagram; data node A- > data node H- > data node I- > data node J- > data node K; data node A- > data node L- > data node M- > data node N; there is no link between data node H to data node N. In another embodiment of the present application, a link exists between all child nodes having the same root node, for example, if the data node H and the data node N have the same root node, the data node a, and then a link exists between the data node H and the data node N.
In another embodiment of the present application, when a data node corresponding to each of the two node codes does not have a link path in the target data structure diagram, the first local area structure diagram of the first node group corresponding to each of the two node codes is simultaneously called by default.
Further, the step S4 of displaying the local area structure diagram according to a preset display manner includes:
s41: hiding data nodes and link segments in the target data structure chart except the local area structure chart.
In this embodiment, preferably, the data nodes and link segments in the target data structure diagram except for the local area structure diagram are hidden in a way of blurring display traces, so that the local area structure diagram is highlighted at the original display position of the target data structure diagram.
Further, after the step S4 of displaying the local area structure diagram according to a preset display manner, the method includes:
s5: and determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram.
S6: and monitoring the movement track of the first data node dragged by the cursor by the user.
S7: and translating the data nodes except the first data node and the link line segments among the data nodes in the local area structure chart according to the movement track.
The embodiment also supports dynamic display, and by acquiring the relative position relationship between each data node in the local area structure diagram and the link line segment between each data node, and by means of translation or equal scaling, the overall dynamic change of the local area structure diagram is maintained, and the requirement of a user for moving the local area structure diagram is met. For example, the partial area structure diagram at the edge of the display screen is wholly moved to the central area of the display screen for the user to view.
In the embodiment, the node number of the data node is increased when the target data structure diagram is constructed, and the node number is stored in association with the node position information of the data node to serve as the keyword information of the data node, the local data structure diagram of the data node corresponding to the keyword information is displayed in a targeted manner according to the keyword information input by a user, and the node number of the data node is increased when the target data structure diagram is constructed, so that the whole or local display of the data structure diagram is realized, and the user can check the data structure diagram more conveniently. The key word information comprises a node number of one data node or node numbers of two data nodes, and a local data structure diagram corresponding to a target data structure diagram is locked according to the node number of one data node, wherein the local data structure diagram comprises a root node and a child node of the data node and an incidence relation between the nodes; and locking all data nodes and incidence relations between the two data nodes in the target data structure chart according to the node numbers of the two data nodes.
Referring to fig. 2, an apparatus for displaying a data structure diagram according to an embodiment of the present application includes:
the first identification module 1 is configured to identify a first position area determined by a user on a target data structure diagram through a cursor, where the target data structure diagram is formed by data nodes, and the first position area is a distribution position range of a plurality of the data nodes.
In this embodiment, the state of the user controlling the movement of the cursor is captured, and the data node is positioned through the positioning function of the cursor, for example, when the user moves the cursor to the data node M on the data structure diagram, the keyword information corresponding to the data node M may flash at the position corresponding to the data node M on the data structure diagram; when the cursor leaves the data node M, the keyword information corresponding to the data node M may terminate flashing. In this embodiment, a selection positioning signal is formed by the continuous pause of the cursor, and it is determined whether the duration of the cursor pausing at the data node M exceeds a preset duration, and if so, it is determined that the data node M is selected. The user forms a first location area by selecting at least two data nodes on the positioning target data structure diagram.
And the first obtaining module 2 is configured to obtain keyword information corresponding to the first location area, where the keyword information includes a node code corresponding to a data node.
In this embodiment, each data node in the target data structure diagram is encoded according to a preset encoding rule to form a corresponding node code, so as to distinguish each data node. The node code corresponding to each data node in this embodiment can reflect the association relationship between each data node and other data nodes, and can search in the target data structure diagram according to the node code to quickly locate each data node, thereby facilitating to search the corresponding information of the data node in the target data structure diagram and managing each data node.
And the locking module 3 is used for locking the local area structure chart corresponding to the target data structure chart according to a preset rule according to the node code corresponding to the data node.
According to the embodiment, the local area structure chart required by the user is quickly locked according to the node codes contained in the keyword information, and the local area structure chart is conveniently screened by the user through inputting the node codes. The preset rules comprise a first rule corresponding to the locking of the local area structure diagram corresponding to the first position area according to one data node, and a second rule corresponding to the locking of the local area structure diagram corresponding to the first position area according to two data nodes, and the corresponding preset rules are called in a pertinence mode by identifying the number of node codes input by a user. The keyword information of this embodiment includes a node code of one data node or node codes corresponding to two data nodes respectively.
And the display module 4 is used for displaying the local area structure diagram according to a preset display mode.
The preset display mode of this embodiment includes intercepting the local area structure diagram to a designated display area for display, or hiding a portion outside the local area structure diagram at an original display position of the target data structure diagram to highlight the local area structure diagram.
Further, the display device of the data structure diagram comprises:
and the second acquisition module is used for acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one by one.
The configuration information of this embodiment includes node location information of the data node, where the node location information is represented by a hierarchical number of the data node in the target data structure diagram relative to a total root node of the target data structure diagram, for example, if the total root node is data node a, a child node of the data node a is data node B, a child node of the data node B is data node C, then the hierarchical number of the data node C relative to the data node a is 2, and the node location information of the data node C is represented as A2. The node code of the embodiment not only comprises the data node position, but also comprises the link relation with other data nodes, the node code corresponding to the node position information is established, the data node is quickly positioned, and the node code is a corresponding digital combination, so that the calling operation of a user is facilitated.
And the construction module is used for constructing the target data structure diagram according to the configuration information, wherein the target data structure diagram carries node codes corresponding to the node position information one by one.
In this embodiment, when the target data structure diagram is constructed, node codes corresponding to the node position information one to one are associated in the target data structure diagram, so as to quickly locate a specified position area in the target data structure diagram through the node codes.
Further, the display device of the data structure diagram comprises:
and the second identification module is used for identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart.
The node level information in this embodiment is the level number of the data node in the target data structure diagram relative to the total root node. The level number can be represented by Arabic numerals, 0 represents the highest level, and the larger the number is, the lower the level of the node is; the number of levels can also be represented by letters a through z, a representing the total root node as the highest level, in 26 letter order, with lower levels the further back the letter order.
And the generating module is used for respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information.
The node position information of the embodiment simultaneously comprises node grade information and node link information, the information is comprehensive and convenient to position, and the node grade information and the node link information are respectively represented by numbers, so that the operation is simple and convenient. For example, if the number corresponding to the node level information of the data node B is 2, the node link information of the data node B is a child node of the overall root node, and the subordinate node of the data node B is the data node C, the node link information of the data node B is represented as 0a3c,0a, the data node B is a child node of the overall root node a, 3C, the subordinate node of the data node B is the data node C, and the level of the data node C with respect to the overall root node a is 3, so that the node code of the data node B is 20A3C.
And the storage module is used for storing the node codes and the node position information of the data nodes in an associated manner.
In the embodiment, the node codes are stored in association with the node position information of each data node, so that the node codes are associated with the target data structure diagram when the target data structure diagram is constructed.
Further, the locking module 3 includes:
and the acquisition unit is used for acquiring node position information corresponding to the specified data node according to a first node code, wherein the specified data node is any one of all data nodes, and the first node code is a node code corresponding to the specified data node.
A first determining unit, configured to determine, according to node location information of the designated data node, a first node group in a link relationship with the designated data node, where the first node group includes a root node of the designated data node and child nodes of the designated data node.
A first locking unit, configured to lock a first local area structure diagram in the target data structure diagram corresponding to the first node group.
In this embodiment, a first rule is explained by taking a node code of a data node included in the keyword information as an example, where the first rule is a corresponding locking rule when a local area structure diagram corresponding to the first location area is locked according to a data node, so that the first local area structure is locked by taking a designated data node corresponding to a node code input by a user as a center. For example, the first local area structure includes a root node of a specified data node and children nodes of the specified data node.
Further, the locking module 3 includes:
the judging unit is used for judging whether a first data node and a second data node exist in the target data structure diagram or not, wherein the first data node and the second data node are any two of all the data nodes, and the link path comprises a direct path formed by direct connection and an indirect path formed by indirect connection.
A second determining unit, configured to determine a second node group according to a link path if the first data node and the second data node have the link path in the target data structure diagram, where the second node group includes all data nodes on the link path.
And a second locking unit, configured to lock a second local area structure diagram in the target data structure diagram corresponding to the second node group.
In this embodiment, for example, node codes of two data nodes included in the keyword information are used to explain a second rule, where the second rule is a corresponding locking rule when the local area structure diagram corresponding to the first location area is locked according to the two data nodes, so as to determine a second local area structure according to a link path corresponding to the two node codes input by a user, where for example, the second local area structure includes all data nodes on the link path. The link path is a connection relation between data nodes, and is determined according to the data nodes with the connection relation in the target data structure diagram, and if a continuous connection relation exists between the data node J and the data node H, the link path exists. For example, a total root node exists in the target data structure diagram, which is a data node a, and the data node a includes three subordinate child nodes, which are a data node B, a data node H, and a data node L, respectively; a data node A- > a data node B- > a data node C- > a data node D exists in the target data structure diagram; data node A- > data node H- > data node I- > data node J- > data node K; data node A- > data node L- > data node M- > data node N; there is no link between data node H to data node N. In another embodiment of the present application, a link exists between all child nodes having the same root node, for example, if the data node H and the data node N have the same root node, the data node a, and then a link exists between the data node H and the data node N.
In another embodiment of the present application, when a data node corresponding to each of the two node codes does not have a link path in the target data structure diagram, the first local area structure diagram of the first node group corresponding to each of the two node codes is simultaneously called by default.
Further, the display module 4 includes:
and the hiding unit is used for hiding the data nodes and the link line segments in the target data structure diagram except the local area structure diagram.
In this embodiment, preferably, the data nodes and link segments in the target data structure diagram except for the local area structure diagram are hidden in a way of blurring display traces, so that the local area structure diagram is highlighted at the original display position of the target data structure diagram.
Further, the display device of the data structure diagram comprises:
and the determining module is used for determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram.
And the monitoring module is used for monitoring the movement track of the first data node dragged by the user through the cursor.
And the translation module is used for translating the data nodes except the first data node and the link line segments among the data nodes in the local area structure chart according to the movement track.
The embodiment also supports dynamic display, and maintains the overall dynamic change of the local area structure diagram by acquiring the relative position relationship between each data node in the local area structure diagram and the link line segment between each data node and in a translation or equal scaling mode, thereby meeting the requirement of a user for moving the local area structure diagram. For example, the partial area structure diagram at the edge of the display screen is wholly moved to the central area of the display screen for the user to view.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operating system and the running of computer programs in the non-volatile storage medium. The database of the computer device is used for storing all data required by the display process of the data structure diagram. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for presenting a data structure diagram.
The processor executes the display method of the data structure diagram, and the method comprises the following steps: identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes; acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node; according to the node codes corresponding to the data nodes, locking a local area structure chart corresponding to the target data structure chart according to a preset rule; and displaying the local area structure diagram according to a preset display mode.
According to the computer equipment, the node number of the data node is increased when the target data structure diagram is constructed, the node number is stored in association with the node position information of the data node to serve as the key word information of the data node, the local data structure diagram of the data node corresponding to the key word information is displayed in a targeted mode according to the key word information input by a user, the node number of the data node is increased when the target data structure diagram is constructed, the whole or local display of the data structure diagram is achieved, and the user can check the data structure diagram more conveniently. The key word information comprises a node number of one data node or node numbers of two data nodes, and a local data structure chart corresponding to a target data structure chart is locked according to the node number of one data node, wherein the local data structure chart comprises a root node and a child node of the data node and an incidence relation between the nodes; and locking all data nodes and incidence relations between the two data nodes in the target data structure chart according to the node numbers of the two data nodes.
In one embodiment, the step of the processor identifying the first location area defined by the user on the target data structure map via the cursor comprises: acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one to one; and constructing the target data structure diagram according to the configuration information, wherein the target data structure diagram carries node codes which are in one-to-one correspondence with the node position information.
In an embodiment, the step of acquiring, by the processor, the configuration information of the target data structure diagram includes: identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart; respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information; and storing each node code in association with node position information of each data node.
In an embodiment, the step of locking, by the processor, the local area structure diagram corresponding to the target data structure diagram according to a preset rule according to the node code corresponding to the data node includes: acquiring node position information corresponding to a designated data node according to a first node code, wherein the designated data node is any one of all data nodes, and the first node code is a node code corresponding to the designated data node; determining a first node group having a link relation with the designated data node according to the node position information of the designated data node, wherein the first node group comprises a root node of the designated data node and child nodes of the designated data node; and locking a first local area structure diagram in the target data structure diagram corresponding to the first node group.
In an embodiment, the step of locking, by the processor, the local area structure diagram corresponding to the target data structure diagram according to a preset rule according to the node code corresponding to the data node includes: judging whether a first data node and a second data node have a link path in the target data structure diagram, wherein the first data node and the second data node are any two of all data nodes, and the link path comprises a direct path formed by direct links and an indirect path formed by indirect links; if the data node exists, determining a second node group according to the link path, wherein the second node group comprises all data nodes on the link path; and locking a second local area structure diagram in the target data structure diagram corresponding to the second node group.
In an embodiment, the step of displaying the local area structure diagram by the processor according to a preset display mode includes: hiding data nodes and link segments in the target data structure diagram except the local area structure diagram.
In an embodiment, after the step of displaying the local area structure diagram by the processor according to a preset display manner, the method includes: determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram; monitoring a moving track of a user dragging the first data node through a cursor; and translating data nodes except the first data node and link line segments among the data nodes in the local area structure chart according to the movement track.
It will be understood by those skilled in the art that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for displaying a data structure diagram, where the method includes: identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes; acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node; according to the node codes corresponding to the data nodes, locking a local area structure chart corresponding to the target data structure chart according to a preset rule; and displaying the local area structure diagram according to a preset display mode.
According to the computer-readable storage medium, the node number of the data node is increased when the target data structure diagram is constructed, and the node number is stored in association with the node position information of the data node to serve as the key word information of the data node, and the local data structure diagram of the data node corresponding to the key word information is displayed in a targeted manner according to the key word information input by a user, so that the whole or local display of the data structure diagram is realized, and the user can check the data structure diagram more conveniently. The key word information comprises a node number of one data node or node numbers of two data nodes, and a local data structure diagram corresponding to a target data structure diagram is locked according to the node number of one data node, wherein the local data structure diagram comprises a root node and a child node of the data node and an incidence relation between the nodes; and locking all data nodes and incidence relations between the two data nodes in the target data structure chart according to the node numbers of the two data nodes.
In one embodiment, the step of identifying the first location area determined by the user through the cursor on the target data structure diagram by the processor comprises: acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one to one; and constructing the target data structure diagram according to the configuration information, wherein the target data structure diagram carries node codes which are in one-to-one correspondence with the node position information.
In an embodiment, the step of acquiring, by the processor, the configuration information of the target data structure diagram includes: identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart; respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information; and storing each node code and node position information of each data node in a correlation mode.
In one embodiment, the step of locking, by the processor, the local area structure diagram corresponding to the target data structure diagram according to a preset rule based on the node code corresponding to the data node includes: acquiring node position information corresponding to a designated data node according to a first node code, wherein the designated data node is any one of all data nodes, and the first node code is a node code corresponding to the designated data node; determining a first node group in a link relation with the designated data node according to the node position information of the designated data node, wherein the first node group comprises a root node of the designated data node and child nodes of the designated data node; and locking a first local area structure diagram in the target data structure diagram corresponding to the first node group.
In an embodiment, the step of locking, by the processor, the local area structure diagram corresponding to the target data structure diagram according to a preset rule according to the node code corresponding to the data node includes: judging whether a first data node and a second data node exist in the target data structure diagram or not, wherein the first data node and the second data node are any two of all the data nodes, and the link path comprises a direct path formed by direct links and an indirect path formed by indirect links; if the data node exists, determining a second node group according to the link path, wherein the second node group comprises all data nodes on the link path; and locking a second local area structure diagram in the target data structure diagram corresponding to the second node group.
In an embodiment, the step of displaying the local area structure diagram by the processor according to a preset display mode includes: hiding data nodes and link segments in the target data structure chart except the local area structure chart.
In an embodiment, after the step of displaying the local area structure diagram by the processor according to a preset display manner, the method includes: determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram; monitoring a moving track of a user dragging the first data node through a cursor; and translating the data nodes except the first data node and the link line segments among the data nodes in the local area structure chart according to the movement track.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, apparatus, article, or method comprising the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (9)

1. A method for displaying a data structure diagram is characterized by comprising the following steps:
identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes;
acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node;
according to the node codes corresponding to the data nodes, locking a local area structure chart corresponding to the target data structure chart according to a preset rule;
displaying the local area structure chart according to a preset display mode;
after the step of displaying the local area structure diagram according to a preset display mode, the method comprises the following steps of:
determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram;
monitoring a moving track of a user dragging a first data node through a cursor, wherein the first data node is any one of all data nodes;
and translating data nodes except the first data node and link line segments among the data nodes in the local area structure chart according to the movement track.
2. The method for displaying the data structure diagram according to claim 1, wherein the step of identifying the first location area determined by the user on the target data structure diagram through the cursor comprises:
acquiring configuration information of the target data structure chart, wherein the configuration information comprises node position information corresponding to the data nodes and node codes corresponding to the node position information one to one;
and constructing the target data structure diagram according to the configuration information, wherein the target data structure diagram carries node codes which are in one-to-one correspondence with the node position information.
3. The method for displaying the data structure diagram according to claim 2, wherein the step of obtaining the configuration information of the target data structure diagram comprises:
identifying node position information of each data node, wherein the node position information comprises node grade information and node link information of the data node in the target data structure chart;
respectively generating node codes corresponding to the data nodes according to the node grade information and the node link information, wherein the node codes consist of a first array corresponding to the node grade information and a second array corresponding to the node link information;
and storing each node code in association with node position information of each data node.
4. The method for displaying the data structure diagram according to claim 1, wherein the step of locking the local area structure diagram corresponding to the target data structure diagram according to a preset rule based on the node code corresponding to the data node comprises:
acquiring node position information corresponding to a designated data node according to a first node code, wherein the designated data node is any one of all data nodes, and the first node code is a node code corresponding to the designated data node;
determining a first node group in a link relation with the designated data node according to the node position information of the designated data node, wherein the first node group comprises a root node of the designated data node and child nodes of the designated data node;
and locking a first local area structure diagram in the target data structure diagram corresponding to the first node group.
5. The method for displaying the data structure diagram according to claim 1, wherein the step of locking the local area structure diagram corresponding to the target data structure diagram according to a preset rule based on the node code corresponding to the data node comprises:
judging whether a link path exists in the target data structure diagram or not, wherein the first data node and the second data node are any two of all data nodes, and the link path comprises a direct path formed by direct links and an indirect path formed by indirect links;
if the data node exists, determining a second node group according to the link path, wherein the second node group comprises all data nodes on the link path;
and locking a second local area structure diagram in the target data structure diagram corresponding to the second node group.
6. The method for displaying the data structure diagram according to claim 1, wherein the step of displaying the local area structure diagram according to a preset display mode includes:
hiding data nodes and link segments in the target data structure diagram except the local area structure diagram.
7. A device for displaying a data structure diagram, comprising:
the first identification module is used for identifying a first position area determined by a user on a target data structure diagram through a cursor, wherein the target data structure diagram is composed of data nodes, and the first position area is a distribution position range of a plurality of data nodes;
the first acquisition module is used for acquiring keyword information corresponding to the first position area, wherein the keyword information comprises a node code corresponding to a data node;
the locking module is used for locking a local area structure chart corresponding to the target data structure chart according to a preset rule according to the node code corresponding to the data node;
the display module is used for displaying the local area structure chart according to a preset display mode;
the determining module is used for determining a third data node selected by a user in the local area structure diagram, wherein the third data node is any one data node in the local area structure diagram;
the monitoring module is used for monitoring a moving track of a user dragging a first data node through a cursor, wherein the first data node is any one of all data nodes;
and the translation module is used for translating the data nodes except the first data node and the link line segments among the data nodes in the local area structure chart according to the movement track.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910655481.2A 2019-07-19 2019-07-19 Data structure diagram display method and device, computer equipment and storage medium Active CN110516205B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910655481.2A CN110516205B (en) 2019-07-19 2019-07-19 Data structure diagram display method and device, computer equipment and storage medium
PCT/CN2019/116709 WO2021012486A1 (en) 2019-07-19 2019-11-08 Data structure diagram display method and apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910655481.2A CN110516205B (en) 2019-07-19 2019-07-19 Data structure diagram display method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110516205A CN110516205A (en) 2019-11-29
CN110516205B true CN110516205B (en) 2023-04-07

Family

ID=68622861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910655481.2A Active CN110516205B (en) 2019-07-19 2019-07-19 Data structure diagram display method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110516205B (en)
WO (1) WO2021012486A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0950960A2 (en) * 1998-04-17 1999-10-20 Xerox Corporation Usage based methods of traversing and displaying generalized graph structures
CN106484393A (en) * 2016-09-13 2017-03-08 厦门兆慧网络科技有限公司 A kind of visualization view method for designing
CN107562702A (en) * 2016-06-30 2018-01-09 阿里巴巴集团控股有限公司 The methods of exhibiting of data structure diagram construction method, device and data structure diagram
CN109408685A (en) * 2018-09-29 2019-03-01 天津字节跳动科技有限公司 Mind map methods of exhibiting and device
CN109656921A (en) * 2018-11-26 2019-04-19 平安科技(深圳)有限公司 Organizational structure data processing method, device, computer equipment and storage medium
CN109739937A (en) * 2018-12-27 2019-05-10 北京三快在线科技有限公司 Path methods of exhibiting, device, equipment and storage medium in a kind of knowledge mapping

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7337401B2 (en) * 2002-12-18 2008-02-26 Microsoft Corporation User interface element representation with simplified view
CN105207793B (en) * 2014-05-30 2018-10-26 广州亿阳信息技术有限公司 A kind of acquisition methods and system of tree topology interior joint information
CN106980745B (en) * 2016-06-30 2019-02-26 平安科技(深圳)有限公司 Method for exhibiting data and device
CN106919688A (en) * 2017-03-03 2017-07-04 济南浪潮高新科技投资发展有限公司 A kind of membership credentials methods of exhibiting and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0950960A2 (en) * 1998-04-17 1999-10-20 Xerox Corporation Usage based methods of traversing and displaying generalized graph structures
CN107562702A (en) * 2016-06-30 2018-01-09 阿里巴巴集团控股有限公司 The methods of exhibiting of data structure diagram construction method, device and data structure diagram
CN106484393A (en) * 2016-09-13 2017-03-08 厦门兆慧网络科技有限公司 A kind of visualization view method for designing
CN109408685A (en) * 2018-09-29 2019-03-01 天津字节跳动科技有限公司 Mind map methods of exhibiting and device
CN109656921A (en) * 2018-11-26 2019-04-19 平安科技(深圳)有限公司 Organizational structure data processing method, device, computer equipment and storage medium
CN109739937A (en) * 2018-12-27 2019-05-10 北京三快在线科技有限公司 Path methods of exhibiting, device, equipment and storage medium in a kind of knowledge mapping

Also Published As

Publication number Publication date
CN110516205A (en) 2019-11-29
WO2021012486A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN109656921B (en) Organization architecture data processing method, device, computer equipment and storage medium
Sherrouse et al. Social Values for Ecosystem Services, version 3.0 (SolVES 3.0): documentation and user manual
Fieberg et al. Used‐habitat calibration plots: A new procedure for validating species distribution, resource selection, and step‐selection models
US9418336B2 (en) Automatic recognition and insights of data
CN105989082B (en) Tabular views generation method and device
Dezhkam et al. Performance evaluation of land change simulation models using landscape metrics
An et al. Survival analysis in land change science: Integrating with GIScience to address temporal complexities
CN111221981B (en) Training method and device for knowledge graph embedded model and computer storage medium
CN111417954A (en) Data de-identification based on detection of allowable configuration of data de-identification process
US20150223023A1 (en) Method and apparatus for provisioning geofences
CN108701121A (en) User's input is assigned to the multiple input domain in user interface
Lang et al. Object validity for operational tasks in a policy context
US11429985B2 (en) Information processing device calculating statistical information
CN106126410A (en) The reminding method of code conflicts and device
EP3685328A1 (en) Iteratively updating a collaboration site or template
CN110968302A (en) Front-end development method and device and electronic equipment
CN109375843A (en) Application search method, device, equipment and medium based on shortcut
Klein et al. An attempt to analyse Iterative Data Snooping and L1-norm based on Monte Carlo simulation in the context of leveling networks
CN110516205B (en) Data structure diagram display method and device, computer equipment and storage medium
CN106909650A (en) Position indicating method and data processing equipment
Styugin Protection against system research
US10216363B2 (en) Navigating a network of options
Kassawmar et al. Making more out of pixel-level change information: using a neighbourhood approach to improve land change characterization across large and heterogeneous areas
WO2011133998A1 (en) System and method for public works planning
Qiang et al. Analysing imperfect temporal information in GIS using the triangular model

Legal Events

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