Data processing method, device and electronic equipment
By using a tree structure to store data in data processing and extracting target data from the tree structure based on extraction instructions, the problems of low data extraction efficiency and poor maintenance efficiency in the prior art are solved, and efficient data extraction and flexible maintain.
Patent Information
- Application Number
- CN202410662662.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The prior art requires extracting data from multiple modules when storing and extracting interface data, resulting in low maintenance efficiency and poor flexibility.
The data is stored using a tree structure and the target data is extracted from the tree structure according to the extraction instructions. The method includes storing data at any node in the tree structure, obtaining extraction instructions, responding to the extraction instructions, and extracting target data from the tree structure based on the extraction function.
Improve data extraction efficiency. Even if there are problems when extracting data, the nodes with problems can be quickly identified, greatly improving maintenance efficiency, and increasing or deleting any node according to user needs, improving flexibility.
Smart Images

Figure CN118445344B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device and electronic equipment. Background Art
[0002] In software development, the storage and extraction of elements such as fields, components, and buttons are key to ensuring the coordinated work of the system. Currently, when storing data, multiple data in an interface are stored in multiple different modules. When extracting data from the interface, data needs to be extracted from multiple modules to achieve the purpose of display. Once the interface cannot be displayed due to an error in extracting data, multiple modules need to be checked one by one to find the reason for the failure to display, which leads to low maintenance efficiency; and when adjusting the data on the interface, multiple corresponding modules need to be adjusted, resulting in poor flexibility. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a data processing method, device and electronic device.
[0004] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0005] Storing data in a tree structure, wherein the tree structure includes a plurality of nodes;
[0006] Get the extraction instruction;
[0007] In response to the extraction instruction, target data is extracted from the tree structure based on an extraction function, and the amount of the target data is equal to the amount of the extraction instructions.
[0008] In a possible implementation, storing the data in a tree structure includes:
[0009] The data is stored in any node in the tree structure, and the number of nodes between the node and the root node in the tree structure is N, where N is greater than or equal to 0.
[0010] In a possible implementation manner, after storing the data in any node in the tree structure, the method further includes:
[0011] Determine the storage path of the data in the tree structure;
[0012] The storage path is determined as the node name of the node where the data is located.
[0013] In a possible implementation, obtaining the extraction instruction includes:
[0014] Determine a target object, where the target object is an object corresponding to a target operation performed by a user;
[0015] An extraction instruction is generated based on link information corresponding to the target object, where the link information includes a node name of a node where target data linked to the target object is located and attribute information of the target data.
[0016] In a possible implementation, the step of extracting target data from the tree structure based on an extraction function in response to the extraction instruction includes:
[0017] In response to the extraction instruction, based on the node name included in the extraction instruction, traverse all nodes in the tree structure to determine a target node;
[0018] Based on the extraction function, target data is extracted from the target node.
[0019] In a possible implementation, when a plurality of data are stored on the target node, extracting the target data from the target node based on the extraction function includes:
[0020] Extract one of the multiple data in order according to the priority from high to low;
[0021] Based on the extraction function, determining whether the extracted data conforms to the link information corresponding to the target object;
[0022] If it matches, the data is determined to be the target data.
[0023] In a possible implementation, after traversing all nodes in the tree structure, the following steps are included:
[0024] If the target node does not exist in the tree structure, updating the node name;
[0025] Based on the updated node name, all nodes in the tree structure are traversed to determine the target node.
[0026] In a possible implementation, after the target data is extracted, the following steps are included:
[0027] The target data is displayed, and the display layer where the target data is located is located above the display layer where the target object is located.
[0028] In a second aspect, an embodiment of the present application further provides a data processing device, including:
[0029] A storage module configured to store data in a tree structure, wherein the tree structure includes a plurality of nodes;
[0030] an acquisition module configured to acquire an extraction instruction;
[0031] The extraction module is configured to respond to the extraction instruction and extract target data from the tree structure based on an extraction function, wherein the amount of the target data is equal to the amount of the extraction instructions.
[0032] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of any one of the above-mentioned data processing methods are performed.
[0033] The embodiment of the present application stores data in a tree structure. After obtaining the extraction instruction, it can extract all the required target data from the tree structure based on the extraction function, which effectively improves the extraction efficiency. Even if there is a problem when extracting the data, the node with the problem can be quickly determined, which greatly improves the maintenance efficiency. Moreover, any node can be added or deleted according to user needs to meet the user's display needs, with high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A flow chart of a data processing method provided by the present application is shown;
[0036] Figure 2 A schematic diagram showing the structure of a data processing device provided by the present application is shown;
[0037] Figure 3 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION
[0038] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0039] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0040] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0041] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0042] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0043] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0044] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0045] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0046] To facilitate understanding of the present application, a data processing method provided by the present application is first introduced in detail. The data processing method of the present application is applied to any system, platform or application program, etc., and can improve the extraction efficiency of target data.
[0047] Figure 1 A flow chart of a data processing method provided in an embodiment of the present application is shown, wherein specific steps include S101-S103.
[0048] S101, storing data in a tree structure, where the tree structure includes a plurality of nodes.
[0049] Here, the data is data that needs to be pre-stored in the system, platform or application. For example, the company's attendance system needs to pre-store data contained in the attendance statistics interface, data contained in the leave approval interface, data contained in the card replacement interface, etc.
[0050] The data is pre-stored in the system, platform or application, and display conditions are set so that the corresponding data is displayed when the display conditions are met.
[0051] In the embodiment of the present application, when storing data, the data is stored in a tree structure, wherein the tree structure includes a plurality of nodes, and the data is stored on the nodes.
[0052] As one example, when storing data in a tree structure, the data is stored in any node in the tree structure, and the number of nodes between the node and the root node in the tree structure is N, where N is greater than or equal to zero.
[0053] Specifically, the node where each data is stored can be determined based on the association relationship between all the data. For example, the attendance system includes the data contained in the attendance statistics interface, the data contained in the leave approval interface, and the data contained in the card replacement interface. Combined with the company's organizational structure, if the company has partners, department A, department B, department C, group 1 and group 2 included in department C, etc., based on this, the root node of the tree structure is set to be the company, and the data stored on the root node includes partners, department A, department B and department C; the nodes corresponding to the partners, the nodes corresponding to department A, the nodes corresponding to department B and the nodes corresponding to department C are all connected to the root node, and the nodes corresponding to the partners, the nodes corresponding to department A, the nodes corresponding to department B and the nodes corresponding to department C form the first level, and the data stored on the node corresponding to department C includes small groups. Group 1 and Group 2; Set the nodes corresponding to Group 1 and the nodes corresponding to Group 2 to be connected to the nodes corresponding to C, the nodes corresponding to Group 1 and the nodes corresponding to Group 2 form the second level, and the data stored on the nodes corresponding to Group 1 and the nodes corresponding to Group 2 include their respective corresponding group members; Set the nodes corresponding to each group member in Group 1 to be connected to the nodes corresponding to Group 1, and the nodes corresponding to each group member in Group 1 form the third level, and the data stored on the nodes corresponding to each group member include attendance statistics, leave approval, and card replacement correspondence; Set the nodes corresponding to attendance statistics, the nodes corresponding to leave approval, and the nodes corresponding to card replacement to be connected to the nodes corresponding to each group member, etc., the nodes corresponding to attendance statistics, the nodes corresponding to leave approval, and the nodes corresponding to card replacement form the fourth level, and the data stored on the nodes corresponding to attendance statistics include the data contained in the attendance statistics interface.
[0054] Of course, in actual applications, the nodes and levels can be set according to the application scenarios and actual needs of the system. The above is only an example and is not limited to this.
[0055] It is worth noting that the target data in the embodiment of the present application can be of types such as fields, icons, pictures, etc. Different types of target data can also be set in different nodes at the same level to facilitate the storage and retrieval of the target data.
[0056] Furthermore, after the data is stored in any node in the tree structure, the storage path of the data in the tree structure is determined, and the storage path is determined as the node name of the node where the data is located. For example, the root node is configured as A, the nodes on the first level are configured as B1, B2, B3..., the nodes on the second level are configured as C1, C2, C3..., the nodes on the fourth level are configured as D1, D2, D3..., and the node corresponding to member a of group 1 in department C is named A-B4-C1-D1.
[0057] S102, obtaining an extraction instruction.
[0058] After the data is stored in a tree structure, an extraction instruction is obtained in real time, where the extraction instruction is obtained by the user performing a target operation according to the needs, wherein there are one or more extraction instructions.
[0059] Optionally, when obtaining the extraction instruction, the target object is determined, and the target object is the object corresponding to the target operation performed by the user, such as a button, text, etc. Afterwards, based on the link information corresponding to the target object, the extraction instruction is generated, and the link information includes the node name of the node where the target data linked to the target object is located and the attribute information of the target data. Among them, each object can set its corresponding link information, wherein the attribute information of the target data at least includes part of the content, label, type, format and location of the target data, the label of the target data can be the unique identifier or identity identifier of the data, the type of the target data includes text, icon, picture, etc., and the format of the target data includes size, font, pixel value, etc.
[0060] In a specific implementation, different types of data are stored in different nodes. Therefore, when the link information includes multiple node names, multiple extraction instructions are generated based on the link information corresponding to the target object, that is, a corresponding extraction instruction is generated for each node name.
[0061] Here, the types of target data include text, icons, pictures, etc., so that the data processing method of the embodiment of the present application can be applied to a variety of scenarios and has a wide range of applications.
[0062] S103, in response to the extraction instruction, extracting target data from the tree structure based on the extraction function, the amount of the target data is equal to the amount of the extraction instructions.
[0063] After obtaining the extraction instruction, respond to the extraction instruction by extracting the target data from the tree structure based on the extraction function. The target data is the data that the user wants to see. The number of target data is equal to the number of extraction instructions. If there are multiple target data, the target data is displayed according to the display position corresponding to each target data to complete the response to the user's extraction instruction.
[0064] When extracting target data from a tree structure based on an extraction function, the node name of the node where the target data is located is obtained from the extraction instruction, and based on the node name, all nodes in the tree structure are traversed to determine the target node, the name of the target node is the node name of the node where the target data is located. Then, based on the extraction function, the target data is extracted from the target node.
[0065] For example, it is necessary to extract the attendance statistics of team member a. The node name in the extraction instruction is A-B4-C1-D1-E1. At this time, traverse all nodes in the structure and compare the name of each node with A-B4-C1-D1-E1 to find the node named A-B4-C1-D1-E1. This node is the target node, and the data stored on this node is the target data.
[0066] In the specific implementation, there is a situation where multiple data are stored on a node. If there are multiple data stored on the target node, when extracting the target data from the target node based on the extraction function, one of the multiple data is extracted in order from high to low priority, wherein the priority of the data can be manually set when storing, or can be determined according to the order of storage time. For example, data 1 and data 2 are stored on the same node, the storage time of data 1 is May 15, 2024, and the storage time of data 2 is May 16, 2024. Based on this, it is determined that the priority of data 1 is equal to higher than the priority of data 2.
[0067] For each of the multiple data, it is determined based on the extraction function whether the data extracted from high to low priority levels conform to the link information corresponding to the target object, that is, it is determined through the extraction function whether the data extracted at the current priority level conforms to the attribute information in the link information corresponding to the target object. If it conforms, the data at the current priority level is determined to be the target data; if it does not conform, it is determined through the extraction function whether the data extracted at the next priority level conforms to the attribute information in the link information corresponding to the target object.
[0068] In another example, after traversing all nodes in the tree structure, if the target node does not exist in the tree structure, the node name is updated, that is, the node name included in the extraction instruction is updated. Afterwards, based on the updated node name, all nodes in the tree structure are traversed to determine the target node. Specifically, when updating the node name, the identifier of the last node in the storage path is deleted, that is, the node is searched for in the upper level of the tree structure.
[0069] For example, if the node name in the extraction instruction is A-B4-C1-D1-E1 but there is no node named A-B4-C1-D1-E1 in the tree structure, the node name can be updated from A-B4-C1-D1-E1 to A-B4-C1-D1, that is, to find the parent node of the target node, that is, the node in the previous level of the level where the target node is located. Based on the tree structure, the bottom-up mechanism in the display process can be implemented more conveniently, that is, if the target node is not found, the relevant nodes, that is, the upper nodes of the tree structure such as the parent node, can still be found, and the data on the relevant nodes can be displayed, that is, a response can be given to the user's extraction instruction, ensuring a high user experience. At the same time, responding to users based on the tree structure can also ensure the stability of the target data fed back to the user.
[0070] In actual applications, after the target data is extracted, the extracted target data is displayed, and the display layer where the target data is located is located above the display layer where the target object is located, thereby satisfying the user's need to see the target data.
[0071] The embodiment of the present application stores data in a tree structure. After obtaining the extraction instruction, it can extract all the required target data from the tree structure based on the extraction function, which effectively improves the extraction efficiency. Even if there is a problem when extracting the data, the node with the problem can be quickly determined, which greatly improves the maintenance efficiency. Moreover, any node can be added or deleted according to user needs to meet the user's display needs, with high flexibility.
[0072] Based on the same inventive concept, the second aspect of the present application also provides a data processing device corresponding to a data processing method. Since the principle of solving the problem by the data processing device in the present application is similar to the above-mentioned data processing method of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0073] Figure 2 The structure diagram of the data processing device provided in the embodiment of the present application is shown, which specifically includes:
[0074] A storage module 201, configured to store data in a tree structure, wherein the tree structure includes a plurality of nodes;
[0075] An acquisition module 202 configured to acquire an extraction instruction;
[0076] The extraction module 203 is configured to respond to the extraction instruction and extract target data from the tree structure based on an extraction function, wherein the amount of the target data is equal to the amount of the extraction instructions.
[0077] In another example, the storage module 201 is specifically configured as follows:
[0078] The data is stored in any node in the tree structure, and the number of nodes between the node and the root node in the tree structure is N, where N is greater than or equal to 0.
[0079] In yet another example, the storage module 201 is further configured to:
[0080] Determine the storage path of the data in the tree structure;
[0081] The storage path is determined as the node name of the node where the data is located.
[0082] In another example, the acquisition module 202 is specifically configured as follows:
[0083] Determine a target object, where the target object is an object corresponding to a target operation performed by a user;
[0084] An extraction instruction is generated based on link information corresponding to the target object, where the link information includes a node name of a node where target data linked to the target object is located and attribute information of the target data.
[0085] In another example, the extraction module 203 is specifically configured as follows:
[0086] In response to the extraction instruction, based on the node name included in the extraction instruction, traverse all nodes in the tree structure to determine a target node;
[0087] Based on the extraction function, target data is extracted from the target node.
[0088] In another example, when a plurality of data are stored on the target node, the extraction module 203 is further configured to:
[0089] Extract one of the multiple data in order according to the priority from high to low;
[0090] Based on the extraction function, determining whether the extracted data conforms to the link information corresponding to the target object;
[0091] If it matches, the data is determined to be the target data.
[0092] In yet another example, the extraction module 203 is further configured to:
[0093] If the target node does not exist in the tree structure, updating the node name;
[0094] Based on the updated node name, all nodes in the tree structure are traversed to determine the target node.
[0095] In yet another example, the data processing device further includes a display module 204, which is configured to:
[0096] The target data is displayed, and the display layer where the target data is located is located above the display layer where the target object is located.
[0097] The embodiment of the present application stores data in a tree structure. After obtaining the extraction instruction, it can extract all the required target data from the tree structure based on the extraction function, which effectively improves the extraction efficiency. Even if there is a problem when extracting the data, the node with the problem can be quickly determined, which greatly improves the maintenance efficiency. Moreover, any node can be added or deleted according to user needs to meet the user's display needs, with high flexibility.
[0098] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided by any embodiment of the present application is implemented, including the following steps S11 to S13:
[0099] S11, storing the data in a tree structure, wherein the tree structure includes a plurality of nodes;
[0100] S12, obtaining an extraction instruction;
[0101] S13, in response to the extraction instruction, extracting target data from the tree structure based on an extraction function, the amount of the target data being equal to the amount of the extraction instructions.
[0102] The embodiment of the present application stores data in a tree structure. After obtaining the extraction instruction, it can extract all the required target data from the tree structure based on the extraction function, which effectively improves the extraction efficiency. Even if there is a problem when extracting the data, the node with the problem can be quickly determined, which greatly improves the maintenance efficiency. Moreover, any node can be added or deleted according to user needs to meet the user's display needs, with high flexibility.
[0103] An embodiment of the present application provides an electronic device. The structural diagram of the electronic device can be as follows: Figure 3As shown, at least a memory 301 and a processor 302 are included, the memory 301 stores a computer program, and the processor 302 implements the method provided by any embodiment of the present application when executing the computer program on the memory 301. Exemplarily, the steps of the electronic device computer program are as follows S21 to S23:
[0104] S21, storing the data in a tree structure, where the tree structure includes a plurality of nodes;
[0105] S22, obtaining an extraction instruction;
[0106] S23, in response to the extraction instruction, extracting target data from the tree structure based on an extraction function, the amount of the target data being equal to the amount of the extraction instructions.
[0107] The embodiment of the present application stores data in a tree structure. After obtaining the extraction instruction, it can extract all the required target data from the tree structure based on the extraction function, which effectively improves the extraction efficiency. Even if there is a problem when extracting the data, the node with the problem can be quickly determined, which greatly improves the maintenance efficiency. Moreover, any node can be added or deleted according to user needs to meet the user's display needs, with high flexibility.
[0108] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment is not repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps in them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0109] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0110] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.
[0111] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.
Claims
1. A data processing method, characterized in that: include: Storing data in a tree structure, wherein the tree structure includes a plurality of nodes; Get the extraction instruction; In response to the extraction instruction, extracting target data from the tree structure based on an extraction function, the amount of the target data being equal to the amount of the extraction instructions; The storing of data in a tree structure includes: Storing data in any node in the tree structure, where the number of nodes between the node and the root node in the tree structure is N, where N is greater than or equal to 0; After storing the data in any node in the tree structure, the method further includes: Determine the storage path of the data in the tree structure; Determine the storage path as the node name of the node where the data is located; The obtaining and extracting instruction comprises: Determine a target object, where the target object is an object corresponding to a target operation performed by a user; Generate an extraction instruction based on the link information corresponding to the target object, wherein the link information includes the node name of the node where the target data linked to the target object is located and the attribute information of the target data; The step of extracting target data from the tree structure based on an extraction function in response to the extraction instruction includes: In response to the extraction instruction, based on the node name included in the extraction instruction, traverse all nodes in the tree structure to determine a target node; Based on the extraction function, extracting target data from the target node; When a plurality of data are stored on the target node, extracting the target data from the target node based on the extraction function includes: Extract one of the multiple data in order according to the priority from high to low; Based on the extraction function, determining whether the extracted data conforms to the link information corresponding to the target object; If it is consistent, the data is determined to be the target data; After traversing all nodes in the tree structure, including: If the target node does not exist in the tree structure, updating the node name; Based on the updated node name, traverse all nodes in the tree structure to determine the target node; After the target data is extracted, the following steps are included: The target data is displayed, and the display layer where the target data is located is located above the display layer where the target object is located.
2. A data processing device, characterized in that: include: A storage module configured to store data in a tree structure, wherein the tree structure includes a plurality of nodes; an acquisition module configured to acquire an extraction instruction; an extraction module, configured to extract target data from the tree structure based on an extraction function in response to the extraction instruction, wherein the amount of the target data is equal to the amount of the extraction instructions; The storage module is specifically used for: Storing data in any node in the tree structure, where the number of nodes between the node and the root node in the tree structure is N, where N is greater than or equal to 0; determining a storage path for the data in the tree structure; determining the storage path as a node name of the node where the data is located; The acquisition module is specifically used for: Determine a target object, the target object being an object corresponding to a target operation performed by a user; generate an extraction instruction based on link information corresponding to the target object, the link information including a node name of a node where target data linked to the target object is located and attribute information of the target data; The extraction module is specifically used for: In response to the extraction instruction, based on the node name included in the extraction instruction, traverse all nodes in the tree structure to determine a target node; based on the extraction function, extract target data from the target node; When multiple data are stored on the target node, the target data is extracted from the target node based on the extraction function, including: extracting one data from the multiple data in order from high to low priority; determining whether the extracted data conforms to the link information corresponding to the target object based on the extraction function; if so, determining that the data is the target data; if the target node does not exist in the tree structure, updating the node name; based on the updated node name, traversing all nodes in the tree structure to determine the target node; displaying the target data, the display layer where the target data is located is located above the display layer where the target object is located.
3. An electronic device, comprising: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of the data processing method as claimed in claim 1 are performed.
Citation Information
Patent Citations
Data query method and device, storage medium and electronic equipment
CN110704453A
Hierarchical data search method and device based on binary tree, equipment and storage medium
CN115048382A
Data extraction method and apparatus, electronic device, and storage medium
WO2024040524A1