Data display method and device, electronic equipment and storage medium
By processing mind map data using a tree mapping structure, child node data is rendered only when the user expands an operation node, solving the problem of slow rendering speed in existing technologies and improving the performance and smoothness of mind mapping operations.
Patent Information
- Application Number
- CN202511088118.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-12-12
AI Technical Summary
In existing technologies, when using the Kity Minder open-source mind mapping framework to render a page, all data is loaded at once, resulting in slow rendering speed and lag when the data volume is large or the hierarchy is deep.
A tree mapping structure is used to process the raw data to be displayed, generating a key-value pair data structure. The corresponding child node data is only rendered when the user expands the operation node, avoiding loading all the data.
It improved rendering speed, enhanced mind map performance, reduced data loading, and improved operational smoothness.
Smart Images

Figure CN121120840A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mind mapping technology, and in particular to a data display method, device, electronic device, and storage medium. Background Technology
[0002] Kity Minder is an online mind mapping (also known as brain map) editing tool that provides a basic framework for visualizing mind maps. It includes the visualization of mind map data (such as JSON format) and simple editing functions (such as node creation, editing, and deletion). It aims to provide users with a smooth experience comparable to desktop applications, while making full use of cloud storage advantages to make the creation, storage, and sharing of mind maps simpler and more efficient.
[0003] In related technologies, the Kity Minder open-source mind mapping framework loads all data at once when rendering the page. This means that even nodes that haven't been expanded will still be rendered, albeit in a hidden state. Therefore, when the data volume is too large or the hierarchy is too deep, rendering becomes very slow, and operations become sluggish. Summary of the Invention
[0004] This application provides a data display method, apparatus, electronic device, and storage medium to improve rendering speed and enhance the performance of mind maps.
[0005] In a first aspect, one embodiment of this application provides a data display method, including:
[0006] The raw data to be displayed is processed to obtain a tree mapping structure; the tree mapping structure includes N key-value pairs, each key-value pair corresponds to a node, the key of the key-value pair is the node's identifier, and the value of the key-value pair is the subtree structure formed by the node and its associated child nodes.
[0007] In response to the user's expansion operation on the target operation node, the tree mapping structure is searched based on the identifier of the target node to determine the child nodes associated with the target node; where the target operation node is an operation node in the current mind map, and the target node is the node in the current tree structure corresponding to the target operation node in the current mind map.
[0008] Render the data of the child nodes associated with the target node to obtain an updated mind map; the updated mind map includes the child operation nodes of the target operation node, and the child operation nodes are used to display the data of the child nodes associated with the target node.
[0009] This application proposes a tree mapping structure, which is obtained by processing the original data to be displayed. The tree mapping structure includes N key-value pairs, each corresponding to a node. The key of the key-value pair is the node's identifier, and the value is the subtree structure formed by the node and its associated child nodes. Thus, in the current mind map display, the target operation node is an operation node within the current mind map, and the target node is the node corresponding to that target operation node in the current tree structure. Therefore, when a user's expansion operation on the target operation node is detected, the associated child nodes of that target node can be found in the tree mapping structure based on the target node's identifier. The data of the child nodes associated with the target node is rendered to obtain an updated mind map. This updated mind map includes the child operation nodes of the target operation node, which are used to display the data of the child nodes associated with the target node. This design, leveraging the tree mapping structure, allows only the data to be displayed to be rendered when an expansion operation is detected, without loading all data, thus improving rendering speed and mind map performance.
[0010] In one possible implementation, the data of the child nodes associated with the target node are rendered to obtain an updated mind map, including:
[0011] Update the current tree structure based on the child nodes associated with the target node;
[0012] Based on the updated tree structure, the data of the child nodes associated with the target node are rendered to obtain the updated mind map.
[0013] In the above embodiment, after determining the child nodes associated with the target node, the current tree structure can be updated. In this way, the data of the child nodes associated with the target node can be rendered based on the updated tree structure, without having to render all the data. In addition, the real-time updating of the tree structure can be guaranteed to ensure the smooth completion of the next rendering.
[0014] In one possible implementation, the current tree structure is updated based on the child nodes associated with the target node, including:
[0015] The child nodes associated with the target node are appended to the positions of the target node's child nodes in the current tree structure to update the current tree structure.
[0016] In the above embodiments, after updating the current tree structure, rendering can be performed based on the updated tree structure.
[0017] In one possible implementation, the original data to be processed is processed to obtain a tree mapping structure, including:
[0018] Generate the original tree structure based on the raw data to be processed;
[0019] The original tree structure is parsed to obtain N sets of first data; where N is the total number of root nodes and child nodes in the original tree structure, and each set of first data includes information about a node and its child nodes.
[0020] Convert the first data in each group into a key-value pair;
[0021] Determine that the N key-value pairs corresponding to each of the N groups of first data form a tree mapping structure.
[0022] The above embodiment proposes the concept of a tree mapping structure. The process of generating the tree mapping structure from the raw data to be processed can be divided into two steps. The first step is to generate an original tree structure based on the raw data to be processed. The second step is to transform the N sets of first data parsed from the original tree structure to obtain N key-value pairs. In this way, the N key-value pairs can be used to determine the tree mapping structure, so that the child nodes that need to be rendered can be directly found during subsequent rendering.
[0023] In one possible implementation, the raw data is data node data in a defined format; the description information of each data node includes the identifier of the data node, its content, and the identifier of the parent node of the data node.
[0024] The raw data to be displayed is processed to obtain a tree mapping structure, including:
[0025] Based on the description information of each data node, the description information of the data node is converted into a key-value pair.
[0026] Determine the tree mapping structure by identifying N key-value pairs corresponding to M data nodes; where M is the number of data nodes in the original data, and M is greater than N.
[0027] The above embodiment is another way to generate a tree mapping structure based on the original data to be displayed. In this way, the original data is data node data in a defined format; the description information of each data node includes the identifier of the data node, its content, and the identifier of its parent node. Thus, the description information of each data node can be directly converted into a key-value pair, thereby determining the key-value pairs corresponding to M data nodes that constitute the tree mapping structure. This allows the original data to be directly processed into a tree mapping structure without the need for a step of generating the original tree structure. In one possible implementation, the method further includes:
[0028] In response to the user's intention to display the mind map, the original tree structure is processed to obtain a first tree structure; wherein, the first tree structure includes the first layer of the original tree structure, and the first layer includes at least one root node;
[0029] Show the first mind map corresponding to the first tree structure.
[0030] In the above embodiments, when the user's intention to display a mind map is detected, the first layer of the mind map can typically be displayed. At this time, the original tree structure can be processed to obtain a first structure including the first layer of the original tree structure, and the first mind map corresponding to the first tree structure is displayed. Compared with directly rendering all data in the original tree structure in related technologies, only the data of the currently displayed operation node is rendered, resulting in a smaller amount of data to be rendered and improved rendering speed.
[0031] In one possible implementation, the method further includes:
[0032] Responding to the user's expansion operation on the first operation node corresponding to the first node; wherein, the first operation node is any operation node in the first mind map, and the first node is the node corresponding to the first operation node among at least one root node included in the first layer;
[0033] Based on the identifier of the first node, search in the tree mapping structure to determine the first child node associated with the first node;
[0034] The data of the first associated child node is appended to the position of the child node of the first node in the first tree structure.
[0035] In the above embodiment, when a user expands the first operation node corresponding to the first node, the first child node associated with the first node can be directly located in the tree mapping structure. Then, the data of the associated first child node is appended to the position of the child node of the first node in the first tree structure. In this way, the data of the first child node associated with the first node can be rendered based on the updated first tree structure. Similarly, only the data of the currently displayed operation node is rendered, resulting in a smaller amount of data rendered and improved rendering speed.
[0036] Secondly, one embodiment of this application provides a data display device, including:
[0037] The data processing module is used to: process the raw data to be displayed to obtain a tree mapping structure; wherein the tree mapping structure includes N key-value pairs, each key-value pair corresponds to a node, the key of the key-value pair is the identifier of the node, and the value of the key-value pair is the subtree structure composed of the node and its associated child nodes.
[0038] The data processing module is also used to: respond to the user's expansion operation on the target operation node, search in the tree mapping structure based on the identifier of the target node, and determine the child nodes associated with the target node; wherein, the target operation node is an operation node in the current mind map, and the target node is the node in the current tree structure corresponding to the target operation node in the current mind map.
[0039] The rendering module is used to render the data of the child nodes associated with the target node to obtain an updated mind map. The updated mind map includes the child operation nodes of the target operation node, and the child operation nodes are used to display the data of the child nodes associated with the target node.
[0040] Thirdly, one embodiment of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0041] Fourthly, one embodiment of this application provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of any of the above methods.
[0042] Fifthly, one embodiment of this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A schematic diagram of a mind map provided in one embodiment of this application;
[0045] Figure 2 A flowchart illustrating a data display method provided in one embodiment of this application;
[0046] Figure 3 A schematic diagram of raw data provided in an embodiment of this application;
[0047] Figure 4 This is a schematic diagram of the structure of a data display device provided in an embodiment of this application;
[0048] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0050] For ease of understanding, the terms used in the embodiments of this application are explained below:
[0051] (1) Tree data: The hierarchical structure is clear. After finding a certain node, its child nodes can be obtained. However, finding this node is time-consuming and requires a recursive algorithm. In the worst case, it takes O(n) time, where O(n) is the total number of basic operations to find a certain node and n is the number of input nodes.
[0052] (2) Map data: flat and disordered, there is no hierarchical relationship between data, and it is relatively troublesome to associate them, but it is very fast to find a certain node. No matter how large the data volume is, the time is O(1), where O(1) is the constant number of basic operations, which is independent of the number of input nodes.
[0053] (3) Tree mapping structure, also known as TreeMap structure. In the embodiments of this application, the tree mapping structure combines tree structure and Map data. The identifier of each node is used as the key of the tree mapping structure, and the tree relationship structure between the node and its child nodes is used as the value. In this way, the node can be quickly found according to the node's identifier, and its node can be retrieved from the value.
[0054] (4) The mind map displays multiple operation nodes, and the content displayed by each operation node corresponds to a node in the tree mapping structure. Normally, the data corresponding to an operation node is a single data point, such as a regular node and a requirement node. However, when the node corresponding to an operation node is a use case node, although its data is also a single data point, it can be split into three nodes. Furthermore, for distinction, nodes in the original data in list format are called data nodes. Therefore, nodes in the mind map are called operation nodes, nodes in the corresponding tree structure or tree mapping structure are called nodes, and nodes in the original data are called data nodes.
[0055] (5) UUID represents the unique identifier of a node; nodeType represents the type of a node, which includes requirement nodes (story nodes), normal nodes, and test case nodes; nodeContent represents the content of a node, where the content of a normal node is the node text, the content of a requirement node is the requirement object, and the content of a test case node is the test case object. parentUuid represents the UUID of the parent node, and storyUuid represents the UUID of the requirement to which it belongs.
[0056] The number of any elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0057] In related technologies, the Kity Minder open-source mind mapping framework loads all data at once when rendering the page. This means that even nodes that haven't been expanded will still be rendered, albeit in a hidden state. Therefore, when the data volume is too large or the hierarchy is too deep, rendering becomes very slow, and operations become sluggish.
[0058] To address this, this application provides a data visualization method in which the corresponding data is loaded and the mind map is rendered only when the operation node is expanded and made visible. This eliminates the need to render all data, improving rendering speed and enhancing mind map performance.
[0059] After introducing the design concept of the embodiments of this application, the following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application can be applied. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0060] refer to Figure 1 This is a schematic diagram illustrating an application scenario of a mind map provided in an embodiment of this application. Figure 1 The node types, content, and number shown are for illustrative purposes only and do not constitute specific limitations.
[0061] Of course, the methods provided in the embodiments of this application are not limited to... Figure 1 The application scenarios shown can also be used in other possible scenarios, and this application does not impose any limitations. Figure 1 The functions that each device in the application scenario shown can achieve will be described in subsequent method embodiments, and will not be elaborated on here.
[0062] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application.
[0063] The following is combined Figure 1 The application scenarios shown illustrate the technical solutions provided in the embodiments of this application.
[0064] refer to Figure 2 This application provides a data display method, including the following steps:
[0065] S201: Process the raw data to be displayed to obtain a tree mapping structure.
[0066] S202: In response to the user's operation to expand the target node, search in the tree mapping structure based on the identifier of the target node to determine the child nodes associated with the target node.
[0067] S203: Render the data of the child nodes associated with the target node to obtain the updated mind map.
[0068] The updated mind map includes sub-operation nodes of the target operation node, which are used to display the data of the child nodes associated with the target node.
[0069] This application proposes a tree mapping structure, which is obtained by processing the original data to be displayed. The tree mapping structure includes N key-value pairs, each corresponding to a node. The key of the key-value pair is the node's identifier, and the value is the subtree structure formed by the node and its associated child nodes. Thus, in the current mind map display, the target operation node is an operation node within the current mind map, and the target node is the node corresponding to that target operation node in the current tree structure. Therefore, when a user's expansion operation on the target operation node is detected, the associated child nodes of that target node can be found in the tree mapping structure based on the target node's identifier. The current tree structure can then be updated based on the associated child nodes of the target node, and the data of the associated child nodes can be rendered to obtain an updated mind map. This updated mind map includes sub-operation nodes, which are used to display the data of the child nodes associated with the target node. This design, leveraging the tree mapping structure, allows only the data to be displayed to be rendered when an expansion operation is detected, without loading all data, thus improving rendering speed and mind map performance.
[0070] In relation to S201, the tree mapping structure includes N key-value pairs, each key-value pair corresponding to a node. The key of the key-value pair is the identifier of the node, and the value of the key-value pair is the subtree structure formed by the node and its associated child nodes.
[0071] Optionally, after obtaining the original data to be displayed, the process of obtaining the tree mapping structure can be implemented in two ways:
[0072] The first implementation method can be achieved through steps A1-A4:
[0073] A1: Generate the original tree structure based on the original data to be processed.
[0074] The original data consists of data nodes in a defined format. Each data node's description includes its identifier, content, and the identifier of its parent node. By traversing the list-formatted node data and identifying the parent node's identifier, the hierarchical relationships between nodes can be determined, thus generating the original tree structure. In the original tree structure, each node's information includes its identifier and content.
[0075] If the original data is in list format, for each data entry in the list, if the data node it represents is a regular node or a requirement node, then one data entry can be treated as one node during the generation of the original tree structure. If the data node it represents is a use case node, considering the special nature of use case nodes, one data entry integrates the "core elements" of the use case into a complete record, usually containing fixed elements (such as "use case name, operation steps, and expected result"). These three elements naturally form a whole, and splitting them for storage would destroy the integrity of the use case; therefore, it exists as one data entry in the table. However, during the generation of the original tree structure, it can be split into three nodes.
[0076] Optional, Figure 3 This is a schematic diagram of raw data provided in an embodiment of this application. The type and quantity of data in this example do not constitute a specific limitation.
[0077] A2: Parse the original tree structure to obtain N sets of first data.
[0078] Where N is the total number of root nodes and child nodes in the original tree structure, and each group of first data includes information about a node and its child nodes. Thus, the number of groups of first data is the total number of nodes in the original tree structure.
[0079] A3: Convert the first data in each group into a key-value pair.
[0080] Optionally, each set of first data can be converted into a key-value pair, where the key is the identifier of the node and the value is the subtree structure formed by the node and its associated child nodes.
[0081] A4: Determine that the N key-value pairs corresponding to the first data in each of the N groups form a tree mapping structure.
[0082] In this way, the N key-value pairs corresponding to each of the N first data and the N node identifiers constitute a tree mapping structure.
[0083] In a specific example, if the original tree structure has three levels, each with one node, namely nodes A, B, and C, then since C is a leaf node in the original tree structure, the tree mapping structure represents two key-value pairs, AB and BC. If A is the root node and BC is also a child node of A, then the tree mapping structure has only one key-value pair, A(BC).
[0084] In this embodiment of the application, if the associated child nodes in the subtree structure also include other child nodes, deleting the other child nodes can avoid a large amount of data redundancy and memory consumption, thereby improving rendering speed.
[0085] The second implementation method can be achieved through steps B1-B2:
[0086] In this example, the raw data consists of data nodes in a predefined format. Each data node's description includes its identifier, content, and the identifier of its parent node. The format can be a list of node data.
[0087] B1: Based on the description information of each data node, convert the description information of the data node into a key-value pair.
[0088] In this example, the description information of each data node can be converted into a key-value pair.
[0089] B2: Determine the tree mapping structure formed by N key-value pairs corresponding to M data nodes; where M is the number of data nodes in the original data, and M is greater than N.
[0090] In this case, there is no need to convert the original data into the original tree structure; it can be directly converted into a tree mapping structure, which can improve processing speed.
[0091] In both the first and second implementations described above, each key-value pair can also include an identifier. If the identifier is true, it indicates that the child node represented by the key-value pair is a leaf node; if the identifier is false, it indicates that the child node represented by the key-value pair is not a leaf node. This design allows for marking when the child node represented by the key-value pair is not a leaf node, ensuring that nodes are paired. Clicking on an operation node on the mind map expands the corresponding child nodes. This saves storage space while maintaining the data structure required by the mind map (e.g., displaying a "+" symbol after an operation node to expand child operation nodes).
[0092] Regarding S202, for example, the current mind map is already in a partially expanded state, which includes multiple operation nodes. These operation nodes are expandable operation nodes, and each operation node has a corresponding node in the current tree structure corresponding to the current mind map.
[0093] At this point, if a user's expansion operation on a target operation node among multiple operation nodes is detected, the child nodes associated with the target node can be determined by searching in the tree mapping structure based on the identifier of the target node in the current tree structure corresponding to the current mind map.
[0094] Involving S203, the data of the child nodes associated with the target node is rendered to obtain the updated mind map.
[0095] The updated mind map includes sub-operation nodes of the target operation node, which are used to display the data of the child nodes associated with the target node.
[0096] This process is mainly achieved through steps C1-C2:
[0097] C1: Update the current tree structure based on the child nodes associated with the target node.
[0098] Specifically, after determining the child nodes associated with the target node, the associated child nodes can be appended to the positions of the target node's child nodes in the current tree structure to update the current tree structure.
[0099] This method allows for real-time updates to the tree structure, improving real-time rendering speed.
[0100] C2: Based on the updated tree structure, render the data of the child nodes associated with the target node to obtain the updated mind map.
[0101] One option is to render only the data of the child nodes associated with the target node, which will result in an updated mind map that includes the display results of the target operation node.
[0102] When a user collapses an operation node, the data of the corresponding node can be deleted, which can free up page memory to a certain extent and make the operation smoother.
[0103] The above embodiment describes expanding or collapsing an operation node based on an existing mind map. Furthermore, to further improve mind map performance, optimizations can be made at the initialization level. Initialization refers to the process of just before opening the mind map.
[0104] Optionally, this process can be achieved through steps D1-D2:
[0105] D1: Responding to the user's intention to display the mind map, process the original tree structure to obtain the first tree structure.
[0106] The action of intending to display a mind map can be opening software or a browser used for displaying mind maps. When the user's intention to display a mind map is detected, the original tree structure can be processed to obtain a first tree structure. This first tree structure includes the first level of the original tree structure, and the first level includes at least one root node.
[0107] D2: Show the first mind map corresponding to the first tree structure.
[0108] After obtaining the first tree structure, a first mind map corresponding to the first tree structure can be displayed. This first mind map can include the operation nodes corresponding to each root node of the first level of the original structure.
[0109] Based on the above technical solution, after the first mind map is displayed and the user's expansion operation is detected, steps E1-E3 can be executed:
[0110] E1: In response to the user's expansion operation on the first operation node corresponding to the first node.
[0111] The first operation node is any operation node in the first mind map, and the first node is the node corresponding to the first operation node among at least one root node included in the first layer.
[0112] E2: Based on the identifier of the first node, search in the tree mapping structure to determine the first child node associated with the first node.
[0113] Optionally, since each key-value pair in the tree mapping structure has a node identifier as the key and a subtree structure consisting of the node and its child nodes as the value, the first child node associated with the first node can be determined by searching the tree mapping structure based on the identifier of the first node.
[0114] E3: Concatenate the data of the first associated child node to the position of the child node of the first node in the first tree structure.
[0115] In this way, the data of the associated first child node can be concatenated to update the first tree structure, and then the data of the associated first child node can be rendered.
[0116] This design can improve the efficiency of the initial loading and increase the speed of initial rendering.
[0117] Furthermore, when adding, deleting, or modifying nodes on the mind map, the process described in the above example can be repeated to ensure data synchronization and integrity. This process is performed synchronously in the background, making the operation more streamlined.
[0118] like Figure 4 As shown, based on the same inventive concept as the above-mentioned data display method, this application embodiment also provides a data display device, which includes a data processing module 41 and a rendering module 42.
[0119] The data processing module 41 is used to: process the raw data to be displayed to obtain a tree mapping structure; wherein the tree mapping structure includes N key-value pairs, each key-value pair corresponds to a node, the key of the key-value pair is the identifier of the node, and the value of the key-value pair is the subtree structure composed of the node and its associated child nodes.
[0120] The data processing module 41 is also used to: respond to the user's expansion operation on the target operation node, search in the tree mapping structure based on the identifier of the target node, and determine the child node associated with the target node; wherein, the target operation node is an operation node in the current mind map, and the target node is the node in the current tree structure corresponding to the target operation node in the current mind map.
[0121] The rendering module 42 is used to: render the data of the child nodes associated with the target node to obtain an updated mind map; wherein, the updated mind map includes the child operation nodes of the target operation node, and the child operation nodes are used to display the data of the child nodes associated with the target node.
[0122] In one alternative implementation, the rendering module 42 is specifically used for:
[0123] Update the current tree structure based on the child nodes associated with the target node;
[0124] Based on the updated tree structure, the data of the child nodes associated with the target node are rendered to obtain the updated mind map.
[0125] In one alternative implementation, the rendering module 42 is specifically used for:
[0126] The child nodes associated with the target node are appended to the positions of the target node's child nodes in the current tree structure to update the current tree structure.
[0127] In one alternative implementation, the data processing module 41 is specifically used for:
[0128] Generate the original tree structure based on the raw data to be processed;
[0129] The original tree structure is parsed to obtain N sets of first data; where N is the total number of root nodes and child nodes in the original tree structure, and each set of first data includes information about a node and its child nodes.
[0130] Convert the first data in each group into a key-value pair;
[0131] Determine that the N key-value pairs corresponding to the first data in the N groups form a tree mapping structure.
[0132] In one optional implementation, the raw data is data node data in a defined format; the description information of each data node includes the identifier of the data node, its content, and the identifier of the parent node of the data node.
[0133] Data processing module 41 is specifically used for:
[0134] Based on the description information of each data node, the description information of the data node is converted into a key-value pair.
[0135] Determine the tree mapping structure by identifying N key-value pairs corresponding to M data nodes; where M is the number of data nodes in the original data, and M is greater than N.
[0136] In an optional implementation, the data processing module 41 is further configured to:
[0137] In response to the user's intention to display the mind map, the original tree structure is processed to obtain a first tree structure; wherein, the first tree structure includes the first layer of the original tree structure, and the first layer includes at least one root node;
[0138] Show the first mind map corresponding to the first tree structure.
[0139] In an optional implementation, the data processing module 41 is further configured to:
[0140] Responding to the user's expansion operation on the first operation node corresponding to the first node; wherein, the first operation node is any operation node in the first mind map, and the first node is the node corresponding to the first operation node among at least one root node included in the first layer;
[0141] Based on the identifier of the first node, search in the tree mapping structure to determine the first child node associated with the first node;
[0142] The data of the first associated child node is appended to the position of the child node of the first node in the first tree structure.
[0143] The data display device proposed in this application and the data display method described above adopt the same inventive concept and can achieve the same beneficial effects, which will not be repeated here.
[0144] Based on the same inventive concept as the data display method described above, this application also provides an electronic device, which may specifically be a desktop computer, portable computer, smartphone, tablet computer, personal digital assistant (PDA), server, etc. Figure 5 As shown, the electronic device may include a processor 501 and a memory 502.
[0145] Processor 501 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0146] Memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Memory 502 in this embodiment can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0147] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned computer storage medium can be any available medium or data storage device that a computer can access, including but not limited to: mobile storage devices, random access memory (RAM), magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)) and other media capable of storing program code.
[0148] Alternatively, if the integrated units described above in this application are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes: mobile storage devices, random access memory (RAM), magnetic memory (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.) and other media capable of storing program code.
[0149] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the data display methods discussed above. Since the principle by which the above computer program product solves the problem is similar to that of the data display method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be described again.
[0150] The above embodiments are only used to provide a detailed description of the technical solutions of this application. However, the description of the above embodiments is only for the purpose of helping to understand the methods of the embodiments of this application and should not be construed as a limitation on the embodiments of this application. Any changes or substitutions that can be easily conceived by those skilled in the art should be covered within the protection scope of the embodiments of this application.
Claims
1. A data display method, characterized in that, include: The raw data to be displayed is processed to obtain a tree mapping structure; wherein, the tree mapping structure includes N key-value pairs, each key-value pair corresponds to a node, the key of the key-value pair is the identifier of the node, and the value of the key-value pair is the subtree structure formed by the node and its associated child nodes; In response to the user's expansion operation on the target operation node, the child nodes associated with the target node are determined by searching the tree mapping structure based on the identifier of the target node; wherein, the target operation node is an operation node in the current mind map, and the target node is the node in the current tree structure corresponding to the target operation node in the current mind map. Render the data of the child nodes associated with the target node to obtain an updated mind map; wherein, the updated mind map includes the child operation nodes of the target operation node, and the child operation nodes are used to display the data of the child nodes associated with the target node.
2. The method according to claim 1, characterized in that, The process of rendering the data of the child nodes associated with the target node to obtain the updated mind map includes: The current tree structure is updated based on the child nodes associated with the target node; Based on the updated tree structure, the data of the child nodes associated with the target node are rendered to obtain the updated mind map.
3. The method according to claim 2, characterized in that, The step of updating the current tree structure based on the child nodes associated with the target node includes: The child nodes associated with the target node are appended to the positions of the child nodes of the target node in the current tree structure to update the current tree structure.
4. The method according to claim 1, characterized in that, The process of processing the original data to be processed to obtain a tree mapping structure includes: Generate the original tree structure based on the raw data to be processed; The original tree structure is parsed to obtain N sets of first data; where N is the total number of root nodes and child nodes in the original tree structure, and each set of first data includes information about a node and its child nodes. Convert the first data in each group into a key-value pair; The N key-value pairs corresponding to the N groups of first data are determined to be the tree mapping structure.
5. The method according to claim 1, characterized in that, The raw data is node data in a defined format; the description information of each data node includes the identifier of the data node, its content, and the identifier of its parent node. The process of processing the raw data to be displayed to obtain a tree mapping structure includes: Based on the description information of each data node, the description information of the data node is converted into a key-value pair. The tree mapping structure is formed by N key-value pairs corresponding to M data nodes; where M is the number of data nodes in the original data, and M is greater than N.
6. The method according to claim 1, characterized in that, The method further includes: In response to the user's intention to display a mind map, the original tree structure is processed to obtain a first tree structure; wherein, the first tree structure includes a first layer of the original tree structure, and the first layer includes at least one root node; Display the first mind map corresponding to the first tree structure.
7. The method according to claim 6, characterized in that, The method further includes: In response to the user's expansion operation on the first operation node corresponding to the first node; wherein, the first operation node is any operation node in the first mind map, and the first node is the node corresponding to the first operation node among at least one root node included in the first layer. Based on the identifier of the first node, the first child node associated with the first node is determined by searching in the tree mapping structure. The data of the associated first child node is concatenated to the position of the child node of the first node in the first tree structure.
8. A data display device, characterized in that, include: The data processing module is used to: process the raw data to be displayed to obtain a tree mapping structure; wherein the tree mapping structure includes N key-value pairs, each key-value pair corresponds to a node, the key of the key-value pair is the identifier of the node, and the value of the key-value pair is the subtree structure formed by the node and its associated child nodes; The data processing module is further configured to: respond to the user's expansion operation on the target operation node, search in the tree mapping structure based on the identifier of the target node, and determine the child nodes associated with the target node; wherein, the target operation node is an operation node in the current mind map, and the target node is the node in the current tree structure corresponding to the target operation node in the current mind map; The rendering module is used to: render the data of the child nodes associated with the target node to obtain an updated mind map; wherein, the updated mind map includes the child operation nodes of the target operation node, and the child operation nodes are used to display the data of the child nodes associated with the target node.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the computer program instructions implement the steps of the method according to any one of claims 1 to 7.