CN110889022A - Data query method and device and electronic equipment - Google Patents

Data query method and device and electronic equipment Download PDF

Info

Publication number
CN110889022A
CN110889022A CN201810941702.8A CN201810941702A CN110889022A CN 110889022 A CN110889022 A CN 110889022A CN 201810941702 A CN201810941702 A CN 201810941702A CN 110889022 A CN110889022 A CN 110889022A
Authority
CN
China
Prior art keywords
tree
target
node
tree node
target tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810941702.8A
Other languages
Chinese (zh)
Inventor
杨斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201810941702.8A priority Critical patent/CN110889022A/en
Publication of CN110889022A publication Critical patent/CN110889022A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data query method and device and electronic equipment. It is determined whether the target tree node identification determined by the received first query request is the same as the tree root node identification in the tree root node object in the stored tree structure. Each tree node object in the tree structure comprises a tree node ancestor table and a tree node descendant table, and the tree node ancestor table and the tree node descendant table are respectively used for recording ancestor tree node information and descendant tree node information of the tree node object. If the tree root node objects are the same, target data corresponding to the first query request are obtained through query from the tree root node objects; and if the query request is different from the first query request, obtaining target data corresponding to the first query request based on the tree root node descendant table in the tree root node object. The method for obtaining the target tree node object through querying comprises HASH querying. Therefore, when the target tree node is not the tree root node, the corresponding target data can be obtained through the descendant table of the tree root node object without adopting the traditional recursion traversal mode, and the searching efficiency is effectively improved.

Description

Data query method and device and electronic equipment
Technical Field
The application relates to the technical field of computers, in particular to a data query method and device and electronic equipment.
Background
In most software, the storage and navigation of tree structures are almost involved, such as: a classification navigation tree of a shopping website, a classification query tree of a video website, an enterprise organization management tree, a geographical location area tree, a file directory tree and the like. The tree structure is widely applied to software products, at present, in the tree structure with a complex hierarchical relationship, related data of a certain tree node needs to be inquired step by step in a recursive mode, and the inquiry efficiency is very low.
Content of application
In view of this, an object of the embodiments of the present application is to provide a data query method, a data query device, and an electronic device.
In a first aspect, an embodiment of the present application provides a data query method, where the method includes: receiving a first query request; determining a target tree node identifier according to the first query request, and judging whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure, wherein the tree structure comprises a plurality of tree node objects, and each tree node object comprises a tree node ancestor table and a tree node descendant table which are respectively used for recording ancestor tree node information and descendant tree node information of the tree node object; when the target tree node identification is the same as the tree root node identification, target data corresponding to the first query request is obtained by querying the tree root node object; and when the target tree node identification is different from the tree root node identification, inquiring from a tree root node descendant table in the tree root node object to obtain a target tree node object corresponding to the target tree node identification, and inquiring from the target tree node object to obtain target data corresponding to the first inquiry request, wherein the mode of inquiring to obtain the target tree node object comprises HASH inquiry. In the foregoing manner, when the target tree node is the tree root node, the target data corresponding to the first query request may be obtained from the tree root node object of the tree root node. When the target tree node is not the tree root node, HASH query can be directly performed in a tree root node descendant table in the tree root node object according to the target tree node identifier to obtain a target tree node object corresponding to the target tree node, and then target data corresponding to the first query request is obtained in the target tree node object. Therefore, corresponding target data can be obtained without recursively traversing and querying each tree node, and the query efficiency is improved.
Further, with reference to the embodiment provided by the first aspect, when the first query request is a request for querying basic information of a target tree node, the querying and obtaining target data corresponding to the first query request from the target tree node object includes: obtaining basic information of the target tree node from the target tree node object as the target data; when the first query request is a request for querying descendant node tree data of a target tree node, querying from the target tree node object to obtain target data corresponding to the first query request, including: and acquiring a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and acquiring descendant node tree type data of the target tree node as the target data according to the descendant tree node object of the target tree node object. When the basic information of the target tree node is inquired, the corresponding target data can be obtained directly according to the basic information of the target tree node in the target tree node object. And when the descendant tree nodes of the target root node are inquired, the corresponding target data can be obtained according to the descendant table of the target tree node in the target tree node object. Therefore, the efficiency of inquiring the basic information or the tree type data of the descendant tree nodes of a certain tree node is improved.
Further, in combination with the embodiment provided by the first aspect, when the first query request is a request for querying tree data of ancestor nodes of a target tree node, the querying for obtaining target data corresponding to the first query request from the target tree node object includes: and obtaining a grandfather tree node object of the target tree node object from a target tree node grandfather table in the target tree node object, and obtaining grandfather node tree data of the target tree node according to the grandfather tree node object of the target tree node object to serve as the target data. When the ancestor tree nodes of the target tree nodes are queried, corresponding target data can be obtained according to the ancestor table of the target tree nodes in the target tree node object, and therefore the efficiency of querying tree type data of the ancestor tree nodes of a certain tree node is improved.
Further, with reference to the embodiment provided by the first aspect, the tree root node object further includes a tree root node hierarchy depth, and each tree node object further includes a tree node hierarchy depth, where the tree root node hierarchy depth is the smallest in all tree node hierarchy depths including the tree root node hierarchy depth, and the method further includes: receiving a second query request, wherein the second query request is a request for querying a path between a first target tree node and a second target tree node; determining a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request; obtaining a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object; inquiring a first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier; traversing a second target tree node ancestor table in the second target tree node objects, taking a tree node object of which the tree node hierarchical depth is not less than the first target tree node hierarchical depth in the first target tree node objects in the second target tree node ancestor table as a basic tree node object, and obtaining target data corresponding to the second query request according to the basic tree node object. Therefore, a polling or recursive traversal mode is not needed, the path between the two tree nodes can be obtained through the tree node descendant table, the tree node ancestor table and the tree node hierarchy depth in the tree node object, and the method has the characteristic of high query efficiency.
Further, with reference to the embodiment provided by the first aspect, the obtaining, according to the first target tree node identifier and the tree root node object, a first target tree node object corresponding to the first target tree node identifier includes: judging whether the first target tree node identification is the same as the tree root node identification, and taking a tree root node object as the first target tree node object when the first target tree node identification is the same as the tree root node identification; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification. And when the first target tree node identifier is not the tree root node identifier, the first target tree node object corresponding to the first target tree node identifier can be quickly obtained through the descendant table in the tree root node object without traversing and querying each tree node.
Further, with reference to the embodiment provided by the first aspect, before the determining a target tree node identifier according to the first query request, the method further includes: and generating a plurality of tree node objects according to the stored initial data information, and storing the plurality of tree node objects as the tree structure, wherein one of the plurality of tree node objects is a tree root node object. And generating a tree structure in advance according to the stored initial data information so as to search and obtain the required target data in the tree structure according to the received query request.
In a second aspect, an embodiment of the present application provides a data query apparatus, including: the receiving module is used for receiving a first query request; a judging module, configured to determine a target tree node identifier according to the first query request, and judge whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure, where the tree structure includes a plurality of tree node objects, and each tree node object includes a tree node grandparent table and a tree node descendant table, and is respectively used to record grandparent tree node information and descendant tree node information of the tree node object; the query module is used for querying and obtaining target data corresponding to the first query request from the tree root node object when the target tree node identification is the same as the tree root node identification; the query module is further configured to query and obtain a target tree node object corresponding to the target tree node identifier from a tree root node descendant table in the tree root node object when the target tree node identifier is different from the tree root node identifier, and query and obtain target data corresponding to the first query request from the target tree node object, where a manner of obtaining the target tree node object by querying includes HASH query.
Further, with reference to the embodiment provided by the second aspect, the query module is specifically configured to, when the first query request is a request for querying basic information of a target tree node, obtain the basic information of the target tree node from the target tree node object as the target data; the query module is specifically configured to, when the first query request is a request for querying descendant node tree type data of a target tree node, obtain a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and obtain descendant node tree type data of the target tree node as the target data according to the descendant tree node object of the target tree node object.
Further, with reference to the embodiment provided by the second aspect, the query module is specifically configured to, when the first query request is a request for querying tree data of a target tree node, obtain a ancestor tree node object of the target tree node object from a target tree node ancestor table in the target tree node object, and obtain ancestor tree data of the target tree node according to the ancestor tree node object of the target tree node object as the target data.
Further, in combination with the embodiment provided by the second aspect, the tree root node object further includes a tree root node hierarchy depth, and each tree node object further includes a tree node hierarchy depth, where the tree root node hierarchy depth is the smallest in all tree node hierarchy depths including the tree root node hierarchy depth; the receiving module is further configured to receive a second query request, where the second query request is a request for querying a path between a first target tree node and a second target tree node; the judging module is further configured to determine a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request; the judging module is further configured to obtain a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object; the query module is further configured to query a first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier; the query module is further configured to traverse a second target tree node ancestor table in the second target tree node object, use a tree node object in the second target tree node ancestor table whose tree node hierarchy depth is not less than a first target tree node hierarchy depth in the first target tree node object as a basic tree node object, and obtain target data corresponding to the second query request according to the basic tree node object.
Further, with reference to the embodiment provided by the second aspect, the determining module is specifically configured to determine whether the first target tree node identifier is the same as the tree root node identifier, and when the first target tree node identifier is the same as the tree root node identifier, take a tree root node object as the first target tree node object; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification.
Further, in combination with the embodiments provided by the second aspect above, the apparatus further includes: and the storage module is used for generating a plurality of tree node objects according to the stored initial data information and storing the plurality of tree node objects as the tree structure, wherein one of the plurality of tree node objects is a tree root node object.
In a third aspect, an embodiment of the present application provides an electronic device, including: the processor and the readable storage medium are used for storing executable computer instructions, and the executable computer instructions are read by the processor and executed to execute the data query method.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flow chart of a data query method according to an embodiment of the present application.
Fig. 2 is a tree structure class diagram provided in an embodiment of the present application.
Fig. 3 is a second flowchart of a data query method according to an embodiment of the present application.
Fig. 4 is a third schematic flowchart of a data query method according to an embodiment of the present application.
Fig. 5 is one of the exemplary diagrams provided by the embodiments of the present application.
Fig. 6 is a second exemplary diagram provided in the embodiments of the present application.
Fig. 7 is a block diagram of a data query device according to an embodiment of the present application.
Fig. 8 is a second block diagram of a data query device according to an embodiment of the present application.
Icon: 100-a data query device; 110-a storage module; 120-a receiving module; 130-a judgment module; 140-query module.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Before the technical solutions in the embodiments of the present application are proposed by the present inventors, data is generally queried in a tree structure in an upward or downward recursive manner, which is inefficient in querying and may cause overflow of a program stack when a hierarchical relationship is deep.
In order to solve the problem of inefficient recursive query, the following processing is generally performed: caching all tree node data in the tree structure in a HASH table, and quickly querying the tree node data based on the HASH table. For example, the data of each tree node in the tree structure and an id are stored in the HASH table in a one-to-one correspondence manner, and the corresponding tree node data is queried based on the id to be queried. The method can quickly query the data of a certain designated tree node, but cannot quickly query all descendant node data under the designated tree node, and cannot quickly find all ancestor node data of the designated tree node, and the method needs to poll or recursively traverse the HASH table for searching according to the superior-inferior relation recorded in the node data, and the efficiency is also low.
In the existing method for querying tree-structured data, node data is generally queried through recursive traversal, which is inefficient and may cause overflow of a program stack when the hierarchy is deep. The method of recording tree mechanism data through the HASH table cannot solve the problem that descendant nodes or ancestor nodes of designated tree nodes are quickly inquired, and the inquiry is also needed in a polling or recursive traversal mode, so that the efficiency is also low.
The defects existing in the above solutions are the results obtained after the inventor has practiced and studied carefully, so the discovery process of the above problems and the solutions proposed by the following embodiments of the present application for the above problems should be the contribution of the inventor to the present application in the process of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data query method according to an embodiment of the present disclosure. The method is applied to the electronic equipment. The specific flow of the data query method is described in detail below.
Step S120, a first query request is received.
In this embodiment, after receiving a first query request input by a user or sent by another device, the first query request is analyzed to obtain a specific query requirement, so as to perform a query according to the query requirement to obtain target data corresponding to the query requirement. For example, the query requirement may be to obtain basic information of a tree node of a certain tree node.
Further, the first query request may further include a display requirement, where the display requirement is used to express a display mode of the target data after the corresponding target data is obtained. For example, the display requirement may be to directly display the corresponding target data, or to display the target data in a tree form when the target data is tree data.
After obtaining the first query request through step S120, the embodiment of the present application executes step S130, that is: and determining a target tree node identifier according to the first query request, and judging whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure.
In this embodiment, the electronic device may store a tree structure, where the tree structure includes a plurality of tree node objects, and each tree node object corresponds to a tree node. Each tree node object includes information of a tree node corresponding to the tree node object. The plurality of tree nodes include a tree root node, and a tree root node object corresponding to the tree root node does not have a father node object.
Step S130 includes, in a specific implementation process: determining a target tree node identifier according to the query requirement obtained by analyzing the first query request; then, a tree root node object is obtained from the stored tree structure, and a tree root node identifier is obtained from the tree root node object; then, the tree root node identifier is compared with the target tree node identifier to determine whether the tree root node identifier is the same as the target tree node identifier, so as to determine whether the target tree node corresponding to the first query request is a tree root node.
Optionally, referring to fig. 2, fig. 2 is a tree structure class diagram provided in the embodiment of the present application. The information of each tree node may be stored as a tree node object in the tree structure according to a tree structure class diagram. Each tree node object is provided with a tree node ancestor table and a tree node descendant table which are respectively used for recording ancestor tree node information and descendant tree node information of the tree node object. Each tree node object is also provided with a directly-subordinate sub-node table for recording the directly-subordinate sub-tree node information of the current tree node object. Wherein TreeNode represents a tree node object. treeNodeId represents a tree node identity, e.g., for an organization, a corresponding tree node identity may be generated based on the identity of the organization and the organization type. treeNodeName represents a tree node name, e.g., for an organization, the organization name may be the corresponding tree node name. other extended data represents other extended information, for example, when the current tree node is an organization, the other extended information may include the geographic location of the organization. Map < treeNodeId, TreeNode > represents the tree node ancestor table of the present tree node, the tree node ancestor table stores the mapping relation between tree node identification and tree node object in the form of key value pair < treeNodeId, TreeNode >, the tree node ancestor table records the tree node identification of all ancestor tree nodes of the present tree node and the corresponding tree node object. Map < treeNodeId, TreeNode > represents the tree node descendant table of the current tree node, the tree node descendant table also stores the mapping relation between the tree node identification and the tree node object in the form of key value pair < treeNodeId, TreeNode >, and the tree node descendant table records the tree node identifications of all descendant tree nodes of the current tree node and the corresponding tree node objects. parentreenodeid represents the parent node identification of the current tree node. List < TreeNode > represents the directly subordinate subtree node table of the current tree node, and the directly subordinate subtree node table stores tree node objects of the directly subordinate subtree nodes of the current tree node. depth represents the tree node hierarchy depth of the current tree node, and the tree root node hierarchy depth is the minimum in all the tree node hierarchy depths including the tree root node hierarchy depth.
Optionally, the tree node descendant table and the tree node ancestor table may both be HASH tables, and when a tree node object corresponding to a certain tree node identifier is queried in the tree node descendant table or the tree node ancestor table, a HASH lookup manner may be adopted. Of course, it should be understood that other forms may be used to generate the tree node descendant table and the tree node ancestor table, and other query manners that can quickly query the tree node descendant table or the tree node ancestor table may be used.
If the target tree node identifier is the same as the tree root node identifier, indicating that the target tree node corresponding to the first query request is the tree root node, after step S130, in this embodiment of the present application, step S140 is executed. If the target tree node identifier is different from the tree root node identifier, it indicates that the target tree node is not the tree root node, and after step S130, in this embodiment of the present application, step S150 is performed.
Step S140, obtaining target data corresponding to the first query request from the tree root node object.
In an implementation manner of this embodiment, if the first query request is used to query tree root node basic information, the tree root node basic information may be directly obtained from the tree root node object as the target data. Alternatively, the tree node basic information may include a tree node identification, a parent node identification, a tree node name, and other extended information. For example, the tree node is related to a mechanism, and the other extended information includes an address of the mechanism, and if the first query request is to query a mechanism address corresponding to a tree root node, the other extended information may be directly obtained from the tree root node object, and then the address in the other extended information is used as the target data.
In another implementation manner of this embodiment, if the first query request is used to query which descendant nodes exist in the tree root node, a descendant tree node object of the tree root node may be obtained from a tree root node descendant table in the tree root node object, and all obtained tree root node objects are used as the target data.
Further, if the first query request needs to query not only which descendant nodes exist in the root node of the tree, but also needs to query the hierarchical relationship between the descendant nodes or the information of the descendant nodes, after the descendant tree node objects of the root node object of the tree are obtained, the information included in each descendant tree node object is obtained. And obtaining the hierarchical relationship among the descendant nodes of all the root nodes of the tree according to the father node identification and/or the direct sub-tree node table and the like in each descendant tree node object, thereby obtaining the target data.
Step S150, obtaining a target tree node object corresponding to the target tree node identifier by querying from a tree root node descendant table in the tree root node object, and obtaining target data corresponding to the first query request by querying from the target tree node object.
In this embodiment, when the target tree node identifier is different from the tree root node identifier, since the tree root node object includes the tree root node descendant table, and the tree root node descendant table includes the tree node identifiers of all descendant nodes of the tree root node and the corresponding tree node objects, the query may be performed in the tree root node descendant table according to the target tree node identifier to obtain the target tree node object corresponding to the target tree node identifier. And then obtaining the information included in the target tree node object at the target tree node, and then obtaining the target data corresponding to the query request by querying the information included in the target tree node object. Therefore, when the target tree node is not the tree root node, the target tree node object can be obtained only by inquiring the descendant table of the tree root node without traversing each tree node, and further the target data is obtained, so that the method has the characteristic of high inquiry efficiency. Optionally, the query manner for querying the descendant table of the root node of the tree to obtain the target tree node object may be HASH query.
In a specific implementation process of step S150, if the first query request is a request for querying basic information of a tree node of the target tree node, the basic information of the target tree node may be directly obtained from the target tree node object to serve as the target data. And if the first query request is a request for querying the descendant node tree type data of the target tree node, acquiring a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and then acquiring the descendant node tree type data of the target tree node as the target data according to the acquired descendant tree node object. For the content of this section, reference may be made to the above description of step S140.
Optionally, if the first query request is a request for querying tree data of a ancestor node of a target tree node, obtaining the ancestor tree node object of the target tree node object from a ancestor table of the target tree node in the target tree node object, and obtaining the ancestor tree data of the target tree node according to the ancestor tree node object of the target tree node object as the target data. The specific process may refer to the description of obtaining descendant node tree data above.
Referring to fig. 3, fig. 3 is a second schematic flowchart of a data query method according to an embodiment of the present application. The method may further include steps S220 to S270.
Step S220, a second query request is received.
In this embodiment, if a second query request input by a user or sent by another device is received as a request for querying a path between a first target tree node and a second target tree node, the second query request is analyzed to obtain a specific query requirement. Further, the second query request may further include a display requirement. And when the second query request is used for querying a subtree, the first target tree node is the tree root node of the subtree, and the subtree is sequentially expanded to the second target tree node from the first target tree node serving as the tree root node.
Step S230, determining a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request.
Step S240, obtaining a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object.
In this embodiment, a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node are determined according to the query requirement obtained through analysis, so as to obtain a corresponding first target tree node object according to the first target tree node identifier, and obtain a corresponding second target tree node object according to the second target tree node identifier.
Optionally, the step of obtaining, according to the first target tree node identifier and the tree root node object, a first target tree node object corresponding to the first target tree node identifier includes: judging whether the first target tree node identification is the same as the tree root node identification, and taking a tree root node object as the first target tree node object when the first target tree node identification is the same as the tree root node identification; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification. The query mode for obtaining the first target tree node object by querying in the tree root node descendant table may be HASH query.
Because the query requirement is to query a path from one tree node to another tree node, at most only one target tree node in the two target tree nodes is the tree root node of the tree structure. And comparing the first target tree node identification with the tree root node identification to judge whether the first target tree node is the tree root node or not. And if the first target tree node identifier is the same as the tree root node identifier, the first target tree node is the tree root node, and at the moment, the tree root node object is taken as the first target tree node object. And if the first target tree node identifier is different from the tree root node identifier, indicating that the first target tree node is not the tree root node, at this time, inquiring in the tree root node descendant table according to the first target tree node identifier to obtain the first target tree node object corresponding to the first target tree node identifier.
After obtaining the first target tree node object through step S240, the embodiment of the present application executes step S250, that is: and inquiring a first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier.
In this embodiment, the second target tree node is far from the tree root node than the first target tree node, so that it is not necessary to determine whether the second target tree node is the tree root node. And, since the second query request is a request for querying a path between a first target tree node and a second target tree node, after the first target tree node object is obtained, information included in the first target tree node object is obtained at the first target tree node. And then searching in a first target tree node descendant table in the first target tree node object according to the second target tree node identifier to obtain a second target tree node object corresponding to the second target tree node identifier.
After obtaining the second target tree node object through step S250, the embodiment of the present application executes step S260, that is: traversing a second target tree node ancestor table in the second target tree node objects, taking a tree node object of which the tree node hierarchical depth is not less than the first target tree node hierarchical depth in the first target tree node objects in the second target tree node ancestor table as a basic tree node object, and obtaining target data corresponding to the second query request according to the basic tree node object.
In this embodiment, after obtaining the first target tree node object, the hierarchical depth of the first target tree node in the first target tree node object may be obtained. And after the second target tree node object is obtained, obtaining a plurality of suspected basic tree node objects according to a second target tree node ancestor table in the second target tree node object. Information included in each suspected base tree node object is then obtained, thereby obtaining a tree node hierarchy depth for each suspected base tree node object. The tree node hierarchical depth of each suspected base tree node object is then compared to a first target tree node hierarchical depth of the first target tree node object. If the tree node hierarchical depth of the suspected basic tree node object is smaller than the first target tree node hierarchical depth, the suspected basic tree node object is located on the level of the first target tree node, and the tree node corresponding to the suspected basic tree node object is not located on the path from the first target tree node to the second target tree node. If the tree node hierarchy depth of the suspected basic tree node object is not smaller than the first target tree node hierarchy depth, the level of the suspected basic tree node object is not higher than the level of the first target tree node, the suspected basic tree node object of which the tree node hierarchy depth is not smaller than the first target tree node hierarchy depth in all the suspected basic tree node objects is used as a basic tree node object, and a path from the first target tree node to the second target tree node can be obtained subsequently.
In this embodiment, after obtaining all the basic tree node objects, the hierarchical relationship between the basic tree node objects may be obtained according to the parent node table and the directly subordinate sub-tree node table in each basic tree node object, so as to form a sub-tree corresponding to the second query request as the target data.
Further, if the second query request further requires to display the direct subnode of each node in the path, after the basic tree node object is obtained in step S260, the direct subtree node object of each basic tree node object may be obtained from the direct subtree node table of each basic tree node object in the basic tree node objects, and the basic tree node object and the direct subtree node object of each basic tree node object may be stored in the temporary table; and obtaining target data corresponding to the second query request according to the temporary table.
Optionally, the directly-subordinate sub-tree node object of each base tree node object is obtained according to the directly-subordinate sub-tree node table in each base tree node object. And then storing the obtained basic tree node objects and the directly subordinate sub-tree node objects of each basic tree node object in a temporary table. The temporary table includes a path from a first target tree node to a second target tree node, and each layer in the path includes its directly subordinate sub-tree node.
In order not to display unnecessary information while displaying the target data, information unrelated to the display demand and the query demand may be deleted before display. For example, the tree node descendant table and the tree node ancestor table in the tree node object are only used in query, so that the tree node descendant table and the tree node ancestor table can be cleared before being displayed.
Referring to fig. 4, fig. 4 is a third schematic flowchart of a data query method according to an embodiment of the present application. Before step S130 and step S230, the method may further include step S110.
Step S110, generating a plurality of tree node objects according to the stored initial data information, and storing the plurality of tree node objects as the tree structure.
In this embodiment, the stored initial data information may be generated into a tree node object corresponding to each tree node according to the tree structure class diagram shown in fig. 2 and stored as the tree structure. When the target data is inquired according to the tree mechanism, the mode of determining the corresponding tree node identification according to the received inquiry request is the same as the mode of generating the tree node identification in the construction of the tree structure. And when the tree structure is created, the tree node hierarchy depth of each tree node is recorded at the same time, the tree node hierarchy depth is increased progressively according to the hierarchy from the tree root node hierarchy depth 1, and the tree node hierarchy depths of the tree nodes of the same hierarchy are the same.
The implementation process of the data query method is exemplified by the employee organization tree.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an example provided in an embodiment of the present application. Fig. 5 shows a tree of the staff mechanism. After receiving a query request that a head office administrator A queries all the manageable organizations and employee information and can perform navigation presentation in a tree-type hierarchical relationship, searching and obtaining a root organization ID of the manageable organization of the head office administrator A, namely a head office ID, in a pre-stored authority table according to the ID of the head office administrator A. The authority table stores the mapping relation between the administrator ID and the root authority ID of the manageable authority. And determining the node identification of the target tree according to the obtained root mechanism ID to serve as a query condition. After the target tree node identification is obtained, the target tree node identification is compared with the tree root node identification in the tree root node object cached during initialization. If the tree root nodes are the same, the target tree node is the tree root node, namely the query request is all the tree nodes which can be managed by the query tree root node, and the sub-tree corresponding to the query request can be obtained according to the tree root node descendant table in the tree root node object. And if the query request is different from the query request, querying from a tree root node descendant table in the tree root node object, and obtaining a subtree corresponding to the query request based on the queried tree node descendant table in the target tree node object. And finally, displaying the obtained subtrees in a tree navigation mode.
And after receiving an inquiry request for inquiring the detailed information of the employee D, determining the node identifier of the target tree according to the ID of the employee D in the inquiry request to be used as an inquiry condition. And then comparing the target tree node identification with the tree root node identification in the tree root node object cached during system initialization. If the tree root nodes are the same, the detailed information of the tree root nodes is inquired; and if the tree root node object is different from the tree root node object, inquiring from the tree root node descendant table in the tree root node object. Because the target tree node identifier corresponding to employee D is different from the tree root node identifier corresponding to the head line as the tree root node, the target tree node object corresponding to the target tree node identifier is obtained by querying the tree root node descendant table in the tree root node object. And finally, obtaining the detailed information of the employee D from the target tree node object. Thus, recursive traversal queries of tree nodes in the tree structure are not required.
Referring to fig. 6, fig. 6 is a second exemplary schematic diagram provided in the embodiment of the present application. Assume that hierarchical and separate authority management is performed, for example, the administrative authority of the member a in prefecture has administrative authority of the member a in prefecture and all subordinate organizations and employees. When receiving a query request of a Sichuan provincial administrator A for querying an employee B, and needing to reversely expand subordinate ancestor institution nodes of the employee B from the tree node of the employee B, but not needing to expand non-subordinate ancestor institution nodes, analyzing the request to obtain the implicit requirements that: starting from a root node (Sichuan province tree node) of a manageable organization of the Sichuan province manager A, the route navigation of the organization (Taisheng road business point) where the employee B is located is gradually expanded until the employee B tree node is found.
And acquiring the root institution ID of the manageable institution of the Sichuan province administrator A, namely the Sichuan province institution ID, from the stored authority table according to the ID of the Sichuan province administrator A in the query request. And determining a first target tree node identifier according to the Sichuan province organization ID, obtaining that the organization where the employee B is located is the Tai-Gai road business point according to the ID of the employee B in the query request, and further determining a second target tree node identifier according to the Tai-Gai road business point ID to serve as a query condition. And comparing the first target tree node identifier with a tree root node identifier (namely, the tree node identifier corresponding to the head line) in the tree root node object cached during initialization, if the first target tree node identifier is the same as the tree root node identifier, indicating that the first target tree node is the tree root node, and if the first target tree node identifier is different from the tree root node descendant table in the tree root node object, inquiring to obtain the first target tree node object corresponding to the first target tree node. Because the first target tree node identifier is different from the tree node identifier corresponding to the head line, the first target tree node object corresponding to the first target tree node identifier is obtained from the tree node descendant table in the tree node object corresponding to the head line, and further the information (namely, the information of the Sichuan province line) included by the first target tree node object is obtained. And obtaining a second target object based on the tree node descendant table in the first target tree node object and the second target tree node identifier, and further obtaining information (namely the Taihang business point information) included by the second target tree node object. And finally, obtaining a navigation path from Sichuan province to the mechanism where the employee B is located based on the tree node descendant table of the first target tree node object, the ancestor table in the second target tree node object and the corresponding tree node hierarchy depth. Alternatively, the directly-belonging subtree node of each layer can also be obtained and displayed, so as to obtain the subtree shown in fig. 6. Specific procedures for this section may be referred to as described above.
Referring to fig. 7, fig. 7 is a block diagram illustrating a data query apparatus 100 according to an embodiment of the present disclosure. The data query apparatus 100 may include a receiving module 120, a determining module 130, and a querying module 140.
The receiving module 120 is configured to receive a first query request.
In this embodiment, the receiving module 120 is configured to execute step S120 in fig. 1, and the detailed description about the receiving module 120 may refer to the description about step S120 in fig. 1.
A determining module 130, configured to determine a target tree node identifier according to the first query request, and determine whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure, where the tree structure includes a plurality of tree node objects, and each tree node object includes a tree node grandparent table and a tree node descendant table, and is respectively used to record grandparent tree node information and descendant tree node information of the tree node object.
In this embodiment, the determining module 130 is configured to perform step S130 in fig. 1, and the detailed description about the determining module 130 may refer to the description of step S130 in fig. 1.
And the query module 140 is configured to query the tree root node object to obtain target data corresponding to the first query request when the target tree node identifier is the same as the tree root node identifier.
The query module 140 is further configured to, when the target tree node identifier is different from the tree root node identifier, query from a tree root node descendant table in the tree root node object to obtain a target tree node object corresponding to the target tree node identifier, and query from the target tree node object to obtain target data corresponding to the first query request, where a manner of obtaining the target tree node object by querying includes HASH query.
Optionally, the query module 140 is specifically configured to, when the first query request is a request for querying basic information of a target tree node, obtain the basic information of the target tree node from the target tree node object as the target data.
The query module 140 is specifically configured to, when the first query request is a request for querying descendant node tree type data of a target tree node, obtain a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and obtain descendant node tree type data of the target tree node as the target data according to the descendant tree node object of the target tree node object.
Optionally, the query module 140 is specifically configured to, when the first query request is a request for querying tree data of a ancestor node of a target tree node, obtain an ancestor tree node object of the target tree node object from a ancestor table of the target tree node in the target tree node object, and obtain ancestor node tree data of the target tree node according to the ancestor tree node object of the target tree node object to serve as the target data.
In this embodiment, the query module 140 is configured to perform steps S140 to S150 in fig. 1, and the detailed description about the query module 140 may refer to the description of steps S140 to S150 in fig. 1.
Optionally, the tree root node object further includes a tree root node hierarchy depth, and each of the tree node objects further includes a tree node hierarchy depth, wherein the tree root node hierarchy depth is the smallest among all the tree node hierarchy depths including the tree root node hierarchy depth.
The receiving module 120 is further configured to receive a second query request, where the second query request is a request for querying a path between a first target tree node and a second target tree node.
In this embodiment, the receiving module 120 is further configured to execute step S220 in fig. 3, and the detailed description about the receiving module 120 may also refer to the description of step S220 in fig. 3.
The determining module 130 is further configured to determine a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request.
The determining module 130 is further configured to obtain a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object.
The determining module 130 is specifically configured to determine whether the first target tree node identifier is the same as the tree root node identifier, and when the first target tree node identifier is the same as the tree root node identifier, take a tree root node object as the first target tree node object; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification.
In this embodiment, the determining module 130 is further configured to perform steps S230 to S240 in fig. 3, and the detailed description about the determining module 130 may also refer to the description of steps S230 to S240 in fig. 3.
The query module 140 is further configured to query the first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier.
The query module 140 is further configured to traverse a second target tree node ancestor table in the second target tree node object, use a tree node object in the second target tree node ancestor table whose tree node hierarchy depth is not less than a first target tree node hierarchy depth in the first target tree node object as a base tree node object, and obtain target data corresponding to the second query request according to the base tree node object.
In this embodiment, the query module 140 is further configured to execute steps S250 to S260 in fig. 3, and the detailed description about the judgment module 130 may also refer to the descriptions of steps S250 to S260 in fig. 3.
Referring to fig. 8, fig. 8 is a second block diagram of the data query apparatus 100 according to the embodiment of the present application. The data query apparatus 100 may further include a storage module 110.
The storage module 110 is configured to generate a plurality of tree node objects according to the stored initial data information, and store the plurality of tree node objects as the tree structure, where one of the plurality of tree node objects is a tree root node object.
In this embodiment, the storage module 110 is configured to execute step S110 in fig. 4, and the detailed description about the storage module 110 may refer to the description about step S110 in fig. 4.
An embodiment of the present application further provides an electronic device, where the electronic device includes: the processor and the readable storage medium are used for storing executable computer instructions, and the executable computer instructions are read by the processor and executed to execute the data query method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In summary, the application provides a data query method, a data query device and electronic equipment. And after receiving the first query request, determining the node identification of the target tree according to the first query request. And then judging whether the target tree node identification is the same as the tree root node identification in the tree root node object in the stored tree structure. The tree structure comprises a plurality of tree node objects, and each tree node object comprises a tree node ancestor table and a tree node descendant table which are respectively used for recording ancestor tree node information and descendant tree node information of the tree node object. And if the target tree node identification is the same as the tree root node identification, inquiring from the tree root node object to obtain target data corresponding to the first inquiry request. And if the target tree node identification is different from the tree root node identification, inquiring from a tree root node descendant table in the tree root node object to obtain a target tree node object corresponding to the target tree node identification, and further inquiring from the target tree node object to obtain target data corresponding to the first inquiry request. The mode of querying to obtain the target tree node object comprises HASH query. Therefore, when the target tree node is not the tree root node, the corresponding target data can be quickly obtained through HASH query based on the descendant table in the tree root node object without adopting a traditional recursive traversal mode, and the searching efficiency is effectively improved.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A method for data query, the method comprising:
receiving a first query request;
determining a target tree node identifier according to the first query request, and judging whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure, wherein the tree structure comprises a plurality of tree node objects, and each tree node object comprises a tree node ancestor table and a tree node descendant table which are respectively used for recording ancestor tree node information and descendant tree node information of the tree node object;
when the target tree node identification is the same as the tree root node identification, target data corresponding to the first query request is obtained by querying the tree root node object;
and when the target tree node identification is different from the tree root node identification, inquiring from a tree root node descendant table in the tree root node object to obtain a target tree node object corresponding to the target tree node identification, and inquiring from the target tree node object to obtain target data corresponding to the first inquiry request, wherein the mode of inquiring to obtain the target tree node object comprises HASH inquiry.
2. The method of claim 1,
when the first query request is a request for querying basic information of a target tree node, the querying and obtaining target data corresponding to the first query request from the target tree node object includes: obtaining basic information of the target tree node from the target tree node object as the target data;
when the first query request is a request for querying descendant node tree data of a target tree node, querying from the target tree node object to obtain target data corresponding to the first query request, including: and acquiring a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and acquiring descendant node tree type data of the target tree node as the target data according to the descendant tree node object of the target tree node object.
3. The method according to claim 1 or 2,
when the first query request is a request for querying tree data of ancestor nodes of a target tree node, the querying and obtaining the target data corresponding to the first query request from the target tree node object includes: and obtaining a grandfather tree node object of the target tree node object from a target tree node grandfather table in the target tree node object, and obtaining grandfather node tree data of the target tree node according to the grandfather tree node object of the target tree node object to serve as the target data.
4. The method of claim 1, wherein the tree root node objects further comprise tree root node hierarchy depths, each of the tree node objects further comprising a tree node hierarchy depth, wherein the tree root node hierarchy depth is the smallest of all tree node hierarchy depths including the tree root node hierarchy depth, the method further comprising:
receiving a second query request, wherein the second query request is a request for querying a path between a first target tree node and a second target tree node;
determining a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request;
obtaining a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object;
inquiring a first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier;
traversing a second target tree node ancestor table in the second target tree node objects, taking a tree node object of which the tree node hierarchical depth is not less than the first target tree node hierarchical depth in the first target tree node objects in the second target tree node ancestor table as a basic tree node object, and obtaining target data corresponding to the second query request according to the basic tree node object.
5. The method of claim 4, wherein obtaining a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object comprises:
judging whether the first target tree node identification is the same as the tree root node identification, and taking a tree root node object as the first target tree node object when the first target tree node identification is the same as the tree root node identification; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification.
6. The method of claim 4, wherein prior to said determining a target tree node identification from said first query request, said method further comprises:
and generating a plurality of tree node objects according to the stored initial data information, and storing the plurality of tree node objects as the tree structure, wherein one of the plurality of tree node objects is a tree root node object.
7. A data query apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving a first query request;
a judging module, configured to determine a target tree node identifier according to the first query request, and judge whether the target tree node identifier is the same as a tree root node identifier in a tree root node object in a stored tree structure, where the tree structure includes a plurality of tree node objects, and each tree node object includes a tree node grandparent table and a tree node descendant table, and is respectively used to record grandparent tree node information and descendant tree node information of the tree node object;
the query module is used for querying and obtaining target data corresponding to the first query request from the tree root node object when the target tree node identification is the same as the tree root node identification;
the query module is further configured to query and obtain a target tree node object corresponding to the target tree node identifier from a tree root node descendant table in the tree root node object when the target tree node identifier is different from the tree root node identifier, and query and obtain target data corresponding to the first query request from the target tree node object, where a manner of obtaining the target tree node object by querying includes HASH query.
8. The apparatus of claim 7,
the query module is specifically configured to, when the first query request is a request for querying basic information of a target tree node, obtain the basic information of the target tree node from the target tree node object as the target data;
the query module is specifically configured to, when the first query request is a request for querying descendant node tree type data of a target tree node, obtain a descendant tree node object of the target tree node object from a target tree node descendant table in the target tree node object, and obtain descendant node tree type data of the target tree node as the target data according to the descendant tree node object of the target tree node object.
9. The apparatus according to claim 7 or 8,
the query module is specifically configured to, when the first query request is a request for querying tree data of a ancestor node of a target tree node, obtain an ancestor tree node object of the target tree node object from a target tree node ancestor table in the target tree node object, and obtain ancestor tree data of the target tree node according to the ancestor tree node object of the target tree node object to serve as the target data.
10. The apparatus of claim 7, wherein the tree root node objects further comprise a tree root node hierarchy depth, each of the tree node objects further comprising a tree node hierarchy depth, wherein the tree root node hierarchy depth is the smallest of all tree node hierarchy depths including the tree root node hierarchy depth;
the receiving module is further configured to receive a second query request, where the second query request is a request for querying a path between a first target tree node and a second target tree node;
the judging module is further configured to determine a first target tree node identifier of the first target tree node and a second target tree node identifier of the second target tree node according to the second query request;
the judging module is further configured to obtain a first target tree node object corresponding to the first target tree node identifier according to the first target tree node identifier and the tree root node object;
the query module is further configured to query a first target tree node descendant table in the first target tree node object to obtain a second target tree node object corresponding to the second target tree node identifier;
the query module is further configured to traverse a second target tree node ancestor table in the second target tree node object, use a tree node object in the second target tree node ancestor table whose tree node hierarchy depth is not less than a first target tree node hierarchy depth in the first target tree node object as a basic tree node object, and obtain target data corresponding to the second query request according to the basic tree node object.
11. The apparatus according to claim 10, wherein the determining module is specifically configured to determine whether the first target tree node identifier is the same as the tree root node identifier, and to take a tree root node object as the first target tree node object when the first target tree node identifier is the same as the tree root node identifier; and when the first target tree node identification is different from the tree root node identification, inquiring a tree root node descendant table in the tree root node object to obtain the first target tree node object corresponding to the first target tree node identification.
12. The apparatus of claim 10, further comprising:
and the storage module is used for generating a plurality of tree node objects according to the stored initial data information and storing the plurality of tree node objects as the tree structure, wherein one of the plurality of tree node objects is a tree root node object.
13. An electronic device, characterized in that the electronic device comprises:
a processor and a readable storage medium storing executable computer instructions that when read and executed by the processor perform the data query method of any one of claims 1-6.
CN201810941702.8A 2018-08-17 2018-08-17 Data query method and device and electronic equipment Pending CN110889022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810941702.8A CN110889022A (en) 2018-08-17 2018-08-17 Data query method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810941702.8A CN110889022A (en) 2018-08-17 2018-08-17 Data query method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110889022A true CN110889022A (en) 2020-03-17

Family

ID=69744137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810941702.8A Pending CN110889022A (en) 2018-08-17 2018-08-17 Data query method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110889022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656438A (en) * 2021-08-06 2021-11-16 北京数码大方科技股份有限公司 Data query method and device of data tree

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060004715A1 (en) * 2004-06-30 2006-01-05 Sap Aktiengesellschaft Indexing stored data
WO2006054506A1 (en) * 2004-11-17 2006-05-26 Turbo Data Laboratories Inc. Tree data retrieving/accumulating/sorting method and program
CN101031892A (en) * 2004-10-01 2007-09-05 特博数据实验室公司 Arrangement generation method and arrangement generation program
CN101128825A (en) * 2005-01-25 2008-02-20 特博数据实验室公司 Tree search, totalizing, sort method, information processing device, and tree search, totalizing, and sort program
CN104281686A (en) * 2014-10-10 2015-01-14 深圳市八零年代网络科技有限公司 Method and system for quickly processing tree-shaped nodes in batches
CN105491094A (en) * 2014-09-24 2016-04-13 腾讯科技(深圳)有限公司 HTTP request handling method and device
CN106649464A (en) * 2016-09-26 2017-05-10 深圳市数字城市工程研究中心 Method of building Chinese address tree and device
CN107092659A (en) * 2017-03-28 2017-08-25 成都优易数据有限公司 A kind of general tree structure storing and resolving method
CN108037967A (en) * 2017-11-27 2018-05-15 深圳市丰巢科技有限公司 A kind of menu loading method and electronic equipment based on more parent-child structures

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060004715A1 (en) * 2004-06-30 2006-01-05 Sap Aktiengesellschaft Indexing stored data
CN101031892A (en) * 2004-10-01 2007-09-05 特博数据实验室公司 Arrangement generation method and arrangement generation program
WO2006054506A1 (en) * 2004-11-17 2006-05-26 Turbo Data Laboratories Inc. Tree data retrieving/accumulating/sorting method and program
CN101128825A (en) * 2005-01-25 2008-02-20 特博数据实验室公司 Tree search, totalizing, sort method, information processing device, and tree search, totalizing, and sort program
CN105491094A (en) * 2014-09-24 2016-04-13 腾讯科技(深圳)有限公司 HTTP request handling method and device
CN104281686A (en) * 2014-10-10 2015-01-14 深圳市八零年代网络科技有限公司 Method and system for quickly processing tree-shaped nodes in batches
CN106649464A (en) * 2016-09-26 2017-05-10 深圳市数字城市工程研究中心 Method of building Chinese address tree and device
CN107092659A (en) * 2017-03-28 2017-08-25 成都优易数据有限公司 A kind of general tree structure storing and resolving method
CN108037967A (en) * 2017-11-27 2018-05-15 深圳市丰巢科技有限公司 A kind of menu loading method and electronic equipment based on more parent-child structures

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656438A (en) * 2021-08-06 2021-11-16 北京数码大方科技股份有限公司 Data query method and device of data tree
CN113656438B (en) * 2021-08-06 2023-12-12 北京数码大方科技股份有限公司 Data query method and device for data tree

Similar Documents

Publication Publication Date Title
KR101137147B1 (en) Query forced indexing
CN101464894B (en) Data query method and system
US9773010B1 (en) Information-driven file system navigation
EP3163466B1 (en) Trajectory data inquiry method and apparatus
US20180144061A1 (en) Edge store designs for graph databases
KR20100106464A (en) Method and system for discovery and modification of data clusters and synonyms
US20150254274A1 (en) Indexing geographic data
JP5146020B2 (en) Information processing apparatus, resource identification program, and resource identification method
WO2018233630A1 (en) Fault discovery
CN110888837B (en) Object storage small file merging method and device
CN106547646B (en) Data backup and recovery method and data backup and recovery device
CN105760380A (en) Database query method, device and system
US20150213272A1 (en) Conjoint vulnerability identifiers
US20200228432A1 (en) Network asset discovery
CN113282799B (en) Node operation method, node operation device, computer equipment and storage medium
CN106649602A (en) Way, device and server of processing business object data
CN112269883A (en) Personnel information query method and device, electronic equipment and storage medium
CN105468644A (en) Method and device for performing query in database
US9910873B2 (en) Efficient sorting of large data set with duplicate values
CN105843809B (en) Data processing method and device
CN110889022A (en) Data query method and device and electronic equipment
CN107341221B (en) Index structure establishing and associated retrieving method, device, equipment and storage medium
CN111897837B (en) Data query method, device, equipment and medium
KR101773910B1 (en) Location based big data system
US20180144060A1 (en) Processing deleted edges in graph databases

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200317

RJ01 Rejection of invention patent application after publication