An information storage and extraction method, device and equipment based on a stack structure

CN116719819BActive Publication Date: 2026-09-22CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310772538.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-09-22
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

在目标结构很大时,每次进行数据提取所耗费的时间较长,影响用户体验

Benefits of technology

[0073]利用本说明书实施例,针对待存储业务标识,确定在预设存储堆结构中的所处的层级信息和与根节点之间的连接关系信息。进而,从预设存储堆结构中,确定与该层级信息对应的至少一个预设节点信息;基于待存储业务标识在至少一个预设节点信息中的位次和连接关系信息,确定与待存储业务标识对应的存储数据标识。进而将待存储信息存储至与位置信息对应的数据库中。从而实现了基于堆结构针对待存储信息进行存储,使得在后续的数据提取过程中,提高了确定待提取信息的确定效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116719819B_ABST
    Figure CN116719819B_ABST
Patent Text Reader

Abstract

The present specification relates to the field of computer technology, and particularly relates to a heap structure-based information storage and extraction method, device and equipment. The heap structure-based information storage method comprises: determining a to-be-stored service identifier and to-be-stored information according to a received information storage request; determining position information of the to-be-stored service identifier in a preset storage heap structure; determining at least one preset node information corresponding to hierarchical information included in the position information; determining storage data identifier corresponding to the to-be-stored service identifier based on bit order and connection relationship information of the to-be-stored service identifier in the at least one preset node information, so as to extract the to-be-stored information; and storing the to-be-stored information into a database corresponding to the position information. By using the embodiment of the present specification, the to-be-stored information is stored based on the heap structure, so that the efficiency of determining to-be-extracted information is higher in the subsequent data extraction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus and device for information storage and retrieval based on a heap structure. Background Technology

[0002] Currently, data is mostly stored based on directory structures. Specifically, directories are built according to business hierarchy, and when storing data for a specific business, only that data is associated with its corresponding business identifier. Therefore, when retrieving this data, the business identifier needs to be compared with each preset business identifier in the directory structure to determine the correct business identifier, and then the data associated with that business identifier is extracted. When the target structure is large, each data retrieval takes a long time, impacting user experience.

[0003] Improving the efficiency of data extraction to enhance user experience is a pressing issue that needs to be addressed in current technologies. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of this specification provide a method, apparatus, and device for information storage and retrieval based on a heap structure. This enables the storage of information to be stored based on a heap structure, thereby improving the efficiency of determining the information to be retrieved during subsequent data retrieval processes.

[0005] To solve the above-mentioned technical problems, the specific technical solution in this specification is as follows:

[0006] On the one hand, embodiments of this specification provide an information storage method based on a heap structure, including,

[0007] Based on the received information storage request, determine the service identifier to be stored and the information to be stored;

[0008] Determine the location information of the service identifier to be stored in the preset storage heap structure. The location information includes the hierarchical information of the service identifier to be stored and the connection relationship information between the service identifier to be stored and the root node.

[0009] Determine at least one preset node information corresponding to the hierarchical information;

[0010] Based on the position of the service identifier to be stored in the information of at least one preset node and the connection relationship information, a storage data identifier corresponding to the service identifier to be stored is determined for use in retrieving the information to be stored; and

[0011] The information to be stored is stored in the database corresponding to the location information.

[0012] Furthermore, the information for determining the location of the service identifier to be stored in the preset storage heap structure also includes:

[0013] From the preset storage heap structure, determine at least one target parent node of the service identifier to be stored;

[0014] The hierarchy information is determined based on the number of target parent nodes; and

[0015] Based on the at least one target parent node, determine the connection relationship information between the service identifier to be stored and the root node.

[0016] Furthermore, the determination of at least one preset node information corresponding to the hierarchical information includes,

[0017] Based on the preset storage heap structure, determine the information of multiple storage nodes at the level corresponding to the hierarchical information;

[0018] From the preset storage heap structure, determine the storage parent node for each storage node information and the target parent node for the service identifier to be stored;

[0019] From the storage parent nodes, determine the target storage parent node that matches the target parent node; and

[0020] The preset node information is determined from among the plurality of storage node information to be the child node of the target storage parent node.

[0021] Furthermore, the determination of the storage data identifier corresponding to the service identifier to be stored, based on the position of the service identifier to be stored in the information of at least one preset node and the connection relationship information, further includes:

[0022] Based on the aforementioned connection relationships, the cardinality of the data to be processed is determined;

[0023] Candidate data is determined based on the position of the service identifier to be stored in the information of at least one preset node; and

[0024] The sum of the base number of the data to be processed and the candidate data is determined as the identifier of the stored data.

[0025] Furthermore, the connection relationship includes at least one target parent node, and determining the cardinality of the data to be processed based on the connection relationship further includes:

[0026] For each target parent node, the corresponding target data is determined based on the connection relationship between the target parent node and the root node and the position of the target parent node in its hierarchy; and

[0027] The product of the preset data and the target data directly linked to the service identifier to be stored is determined as the base of the data to be processed.

[0028] Furthermore, for each target parent node, based on the connection relationship between the target parent node and the root node and the position of the target parent node in its hierarchy, the corresponding target data is determined, including:

[0029] For the first target parent node directly connected to the root node, the first target data corresponding to the first target parent node is determined based on the position of the first target parent node in its level.

[0030] Determine whether the target parent node includes a second target parent node other than the first target parent node;

[0031] If the existence of the second target parent node is determined, for each second target parent node, the second target data corresponding to the second target parent node is determined based on the connection relationship between the second target parent node and the first target parent node, and the position of the second target parent node in its level.

[0032] Furthermore, the process of determining candidate data based on the position of the service identifier to be stored in the information of at least one preset node also includes:

[0033] The updated position is obtained by subtracting the target constant from the given position; and

[0034] The product of the updated position and the preset data is determined as the candidate data.

[0035] On the other hand, embodiments of this specification also provide an information extraction method based on a heap structure, including,

[0036] Based on the received information extraction request, determine the data identifier to be extracted;

[0037] The target level is determined based on the extracted data identifier and preset data;

[0038] Based on the first and last target digits of the extracted data identifier, determine the target position of the extracted node and the connection relationship between the extracted node and the root node; and

[0039] Based on the target level and the target position, the information to be extracted is determined;

[0040] The extracted data identifier is generated based on the method described above.

[0041] Furthermore, determining the target level based on the extracted data identifier and preset data also includes:

[0042] Determine the quotient of the extracted data identifier divided by the preset data.

[0043] Determine whether the quotient is greater than the preset data;

[0044] If it is determined that the quotient is greater than the preset data, the quotient is used as the identifier for the extracted data to perform a division operation until it is determined that the obtained quotient is less than the preset data; and

[0045] The number of division operations is determined as the target level.

[0046] Furthermore, determining the target position of the extraction node and the connection relationship between the extraction node and the root node based on the first and last target digits of the extracted data identifier includes:

[0047] Based on the previous target number of bits, determine the position of the parent node of each layer of the extracted node;

[0048] Based on the position of each parent node, the connection relationship between the extracted node and the root node is determined; and

[0049] Based on the target number of bits, the target position of the extraction node in its respective level is determined.

[0050] Furthermore, the preceding target number of digits includes multiple sub-preceding target number digits arranged sequentially, and determining the position of each parent node of the extracted node based on the preceding target number of digits includes:

[0051] Based on the order of the arrangement, the position of the corresponding parent node is determined sequentially for each of the target numbers before the child.

[0052] Furthermore, it also includes,

[0053] Based on the connection relationship between the extracted node and the root node, candidate parent nodes between the extracted node and the root node are obtained; and

[0054] A directory tree structure is constructed based on the business identifier to be extracted corresponding to the extraction node, the information to be extracted, and the business identifier corresponding to the candidate parent node.

[0055] On the other hand, embodiments of this specification also provide an information storage device based on a heap structure, including,

[0056] The first determining unit is used to determine the service identifier to be stored and the information to be stored based on the received information storage request.

[0057] The second determining unit is used to determine the location information of the service identifier to be stored in the preset storage heap structure. The location information includes the hierarchical information of the service identifier to be stored and the connection relationship information between the service identifier to be stored and the root node.

[0058] The third determining unit is used to determine at least one preset node information corresponding to the hierarchical information;

[0059] The fourth determining unit is configured to determine a storage data identifier corresponding to the service identifier to be stored based on the position of the service identifier to be stored in the at least one preset node information and the connection relationship information, for use in extracting the information to be stored; and

[0060] A storage unit is used to store the information to be stored in a database corresponding to the location information.

[0061] On the other hand, embodiments of this specification also provide an information storage device based on a heap structure, including,

[0062] The fifth determining unit is used to determine the data identifier to be extracted based on the received information extraction request;

[0063] The sixth determining unit is used to determine the target level based on the extracted data identifier and preset data;

[0064] The seventh determining unit is used to determine the target position of the extraction node and the connection relationship between the extraction node and the root node based on the first and last target digits of the extracted data identifier; and

[0065] The eighth determining unit is used to determine the information to be extracted based on the target level and the target position;

[0066] The extracted data identifier is generated based on the unit described above.

[0067] Furthermore, the device also includes,

[0068] The acquisition unit is configured to acquire candidate parent nodes between the extracted node and the root node based on the connection relationship between the extracted node and the root node; and

[0069] The construction unit is used to construct a directory tree structure based on the business identifier to be extracted corresponding to the extraction node, the information to be extracted, and the business identifier corresponding to the candidate parent node.

[0070] On the other hand, embodiments of this specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0071] On the other hand, embodiments of this specification also provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method.

[0072] On the other hand, embodiments of this specification also provide a computer program product, including a computer program / instructions, and a method implemented when the computer program / instructions are executed by a processor.

[0073] Using the embodiments of this specification, for a service identifier to be stored, its hierarchical information within a preset storage heap structure and its connection relationship with the root node are determined. Then, from the preset storage heap structure, at least one preset node corresponding to this hierarchical information is determined; based on the position and connection relationship information of the service identifier to be stored within the at least one preset node, a storage data identifier corresponding to the service identifier to be stored is determined. The information to be stored is then stored in a database corresponding to the location information. This achieves storage of information to be stored based on a heap structure, improving the efficiency of determining the information to be retrieved during subsequent data retrieval. Attached Figure Description

[0074] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0075] Figure 1 The diagram shown is a schematic representation of an implementation system for an information storage and retrieval method based on a heap structure, according to an embodiment of this specification.

[0076] Figure 2 The diagram shown is a flowchart of an information storage method based on a heap structure according to an embodiment of this specification.

[0077] Figure 3 The diagram shown is a flowchart of a method for determining preset node information according to an embodiment of this specification.

[0078] Figure 4A The diagram shown is a flowchart of a method for determining a stored data identifier according to an embodiment of this specification;

[0079] Figure 4B The diagram shown is a flowchart of a method for determining the cardinality of data to be processed according to an embodiment of this specification;

[0080] Figure 4C The diagram shown is a flowchart of a candidate data determination method according to an embodiment of this specification;

[0081] Figure 4D The diagram shown is a schematic representation of a data storage identifier according to another embodiment of this specification.

[0082] Figure 5A The diagram shown is a schematic representation of an information extraction method based on a heap structure according to an embodiment of this specification.

[0083] Figure 5B The diagram shown is a schematic representation of another embodiment of this specification, namely an information extraction method based on a heap structure.

[0084] Figure 6 The diagram shown is a schematic representation of a target level determination method according to an embodiment of this specification.

[0085] Figure 7 The diagram shown is a schematic representation of a method for determining target position and connection relationship according to an embodiment of this specification.

[0086] Figure 8 The diagram shown is a schematic representation of an information storage device based on a heap structure according to an embodiment of this specification.

[0087] Figure 9A The diagram shown is a schematic representation of an information extraction device for a stack structure according to an embodiment of this specification.

[0088] Figure 9B The diagram shown is a schematic representation of an information extraction device with a stack structure according to another embodiment of this specification.

[0089] Figure 10 This is a schematic diagram of the structure of a computer device according to an embodiment of this specification.

[0090] [Explanation of Labels in the Attached Image]

[0091] 101. User terminal;

[0092] 102. Server;

[0093] 810. First Determined Unit;

[0094] 820. Second Determined Unit;

[0095] 830. The third unit to be determined;

[0096] 840. The fourth unit to be determined;

[0097] 850. Storage unit;

[0098] 910. The fifth unit to be determined;

[0099] 920. The sixth unit to be determined;

[0100] 930. The seventh unit to be determined;

[0101] 940. The eighth unit to be determined;

[0102] 950. Acquisition Unit;

[0103] 960. Building Unit;

[0104] 1002. Computer equipment;

[0105] 1004. Processing equipment;

[0106] 1006. Storage resources;

[0107] 1008. Drive mechanism;

[0108] 1010. Input / Output Module;

[0109] 1012. Input devices;

[0110] 1014. Output devices;

[0111] 1016. Presentation device;

[0112] 1018. Graphical User Interface;

[0113] 1020. Network interface;

[0114] 1022. Communication link;

[0115] 1024. Communication bus. Detailed Implementation

[0116] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0117] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0118] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0119] Figure 1 The diagram illustrates an implementation system for an information storage and retrieval method based on a heap structure, as described in this specification. The system may include a user terminal 101 and a server 102, which communicate via a network. This network may include a Local Area Network (LAN), a Wide Area Network (WAN), the Internet, or a combination thereof, and is connected to a website, user equipment (e.g., a computing device), and a backend system. The user can send an information storage request to the server 102 via the user terminal 101. Upon receiving the request, the server 102 determines the service identifier and information to be stored from the request; determines the location information of the service identifier in a preset storage heap structure, including the hierarchical information of the service identifier and the connection relationship between the service identifier and the root node; determines at least one preset node information corresponding to the hierarchical information; determines the storage data identifier corresponding to the service identifier based on its position and connection relationship in the at least one preset node information; and stores the information to be stored in a database corresponding to the location information. Then, the stored data identifier is sent to the user terminal 101 so that the user terminal can view or retrieve the information to be stored. For example, the server 102 can also send a number corresponding to this stored procedure to the user terminal 101 so that the user can view or retrieve the information to be stored based on the number, which is associated with the stored data identifier.

[0120] Furthermore, when a user wants to retrieve previously stored information, they can send an information retrieval request to the server 102 through the user terminal 101. Upon receiving the information retrieval request from the user terminal 101, the server 102 will determine that the information retrieval request is either a number corresponding to a previous storage process or a stored data identifier obtained in a previous storage phase. If it is a stored data identifier, the server 102 will determine that the stored data identifier from the information retrieval request as the retrieval data identifier; if it is a number, the server 102 will determine the number from the information retrieval request, and based on the association relationship, determine the stored data identifier associated with that number, and use that stored data identifier as the retrieval data identifier. The server will then determine the target level based on the number of digits included in the retrieval data identifier; determine the target position of the retrieval node and the connection relationship between the retrieval node and the root node based on the first and last target digits of the retrieval data identifier; determine the associated service identifier to be retrieved based on the target level and target position; and determine the information to be retrieved based on the service identifier to be retrieved, the target level, and the target position. Finally, the information to be retrieved will be sent to the user terminal 101 for viewing or retrieval. Furthermore, server 102 can also obtain candidate parent nodes between the extraction node and the root node based on the connection relationship between the extraction node and the root node; and construct a directory tree structure based on the service identifier to be extracted, the information to be extracted, and the service identifier corresponding to the candidate parent node. This directory tree structure is then sent to user terminal 101 for viewing or extraction.

[0121] Alternatively, server 102 may be a node of a cloud computing system (not shown in the figure), or each server 102 may be a separate cloud computing system comprising multiple computers interconnected by a network and operating as a distributed processing system.

[0122] In an optional embodiment, the user terminal 101 may include electronic devices, including but not limited to smartphones, data acquisition devices, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, and other similar electronic devices. Optionally, the operating system running on the electronic device may include, but is not limited to, Android, iOS, Linux, Windows, etc.

[0123] In addition, it should be noted that, Figure 1 The example shown is merely one application environment provided in this manual. In actual applications, it may include multiple user terminals 101, and this manual does not impose any restrictions.

[0124] like Figure 2The diagram shows a flowchart of an information storage method based on a heap structure according to an embodiment of this specification. This diagram depicts an information storage process based on a heap structure, but it may include more or fewer operational steps based on conventional or non-creative labor. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the method can be executed sequentially or in parallel according to the embodiment or the accompanying drawings. Specifically, as shown... Figure 2 As shown, the method may include:

[0125] S210, based on the received information storage request, determine the service identifier to be stored and the information to be stored;

[0126] S220, determine the location information of the service identifier to be stored in the preset storage heap structure;

[0127] S230, determine at least one preset node information corresponding to the hierarchical information;

[0128] S240, based on the position and connection information of the service identifier to be stored in at least one preset node information, determine the storage data identifier corresponding to the service identifier to be stored;

[0129] S250, store the information to be stored in the database corresponding to the location information.

[0130] Using the embodiments of this specification, for a service identifier to be stored, its hierarchical information within a preset storage heap structure and its connection relationship with the root node are determined. Then, from the preset storage heap structure, at least one preset node corresponding to this hierarchical information is determined; based on the position and connection relationship information of the service identifier to be stored within the at least one preset node, a storage data identifier corresponding to the service identifier to be stored is determined. The information to be stored is then stored in a database corresponding to the location information. This achieves storage of information to be stored based on a heap structure, improving the efficiency of determining the information to be retrieved during subsequent data retrieval.

[0131] According to one embodiment of this specification, when a user wants to store information to be stored in a database, they send an information storage request to the server via a user terminal. This information storage request includes a service identifier to be stored and the information to be stored. Upon receiving the information storage request, the server extracts the service identifier and the information to be stored from the request. Specifically, the information storage request may be sent to the server in a target data identifier format (JSON format), and may also include an access key, business system serial number, system number, business type, request method, region, requesting organization, operator, and extended fields, etc. The service identifier to be stored is an identifier corresponding to a business, which corresponds to the information to be stored. For example, if the information to be stored is data corresponding to consumption, then the service identifier to be stored is the business identifier corresponding to the consumption.

[0132] Based on the determined service identifier to be stored, the location information of the service identifier in the preset storage heap structure is determined. The preset storage heap structure is a heap structure constructed based on the directory structure corresponding to the service system. Specifically, the identifier of the service system is used as the root node of the heap structure, the first-level title in the service system is used as the child node directly connected to the root node, and so on, to construct the corresponding heap structure for the target structure. The heap structure includes multiple nodes and the connection relationships between nodes, and a preset service identifier corresponding to each node is pre-stored. The service identifier to be stored is matched with each preset service identifier in the preset storage heap structure to obtain the preset service identifier that matches the service identifier to be stored, and the preset coordinate information of the node corresponding to the preset service identifier in the preset storage heap structure is used as the location information. Specifically, the hierarchical information of the service identifier to be stored can be, for example, the hierarchical information of the node corresponding to the service identifier to be stored. Similarly, the connection relationship information between the service identifier to be stored and the root node can be, for example, the connection relationship information between the node corresponding to the service identifier to be stored and the root node. This location information refers to the hierarchical information of the node corresponding to the service identifier to be stored, and the connection relationship between that node and the root node. For example, if the preset storage heap structure determined based on the directory structure has three layers, and the node corresponding to the service identifier to be stored is in the third layer, then the hierarchical information is 3. This node is directly connected to node A in the second layer, and node A in the second layer is connected to node E in the first layer. Therefore, the connection relationship between the node corresponding to the service identifier to be stored and the root node is (A, E).

[0133] After determining the hierarchical information corresponding to the service identifier to be stored, all nodes in that hierarchical level are identified, and the preset service identifiers corresponding to each node are aggregated to obtain the preset node information in that hierarchical level.

[0134] For each node corresponding to preset node information, the sorting data of that node in the preset storage heap structure is determined, and this sorting data is determined as its position. For example, the node corresponding to the service identifier to be stored is the eighth node from left to right in the third layer of the preset storage heap structure. Therefore, the position is determined to be eight. Based on the connection relationship information between the service identifier to be stored and the root node, at least one parent node of the node corresponding to the service identifier to be stored can be determined. Specifically, the storage data identifier is determined according to the position and connection relationship. For example, when the node corresponding to the service identifier to be stored has no parent node and is directly connected to the root node, the position is determined as the storage data identifier. When the node corresponding to the service identifier to be stored has a parent node, the storage data identifier is determined based on the data corresponding to each parent node and the position. Specifically, for example, for the first-layer parent node connected to the root node, the position is used as the corresponding data. For the child node directly connected to the first-layer parent node, the data corresponding to the first-layer parent node is placed first, and the position of the child node in the second layer is placed last to form the data corresponding to the child node (the parent node of the second layer). For the node corresponding to the service identifier to be stored, the data corresponding to the parent node of the second level is placed first, and the position is placed last to form the storage data identifier corresponding to that child node. For example, if the connection relationship between the node corresponding to the service identifier to be stored and the root node is (A, E), the parent node E of the first level is located at the 18th position of the first level, the parent node A of the second level is located at the 32nd position of the second level, and the node corresponding to the service identifier to be stored is located at the 8th position of the third level, then the data corresponding to the parent node of the first level is determined to be 18, the data corresponding to the parent node of the second level is 1832, and the data corresponding to the service identifier to be stored is 18328. It should be noted that the above number of levels and positions are only examples written for better understanding of this application and do not constitute any limitation on this application.

[0135] After determining the storage data identifier, it can be sent to the user terminal so that the user can retrieve the information to be stored based on the identifier. Alternatively, a corresponding number can be generated for this process and sent to the user terminal so that the user can retrieve the information based on the number. It should be noted that this number is pre-associated with the storage data identifier. Furthermore, the number generation process can be based on the order of the processing steps, or it can be based on any other method that can generate numbers.

[0136] In the pre-defined storage heap structure, each node has an associated location in the database to store the data corresponding to that pre-defined business identifier. Based on the determined location information, the corresponding storage location is determined, and the information to be stored is stored in that storage location. It should be noted that the storage step (S250) can occur at any point after S220, and is not limited to being the last step. It should also be noted that a table can be maintained in advance, which may include, for example, for each node, the associated planning route, node number, stored data identifier, level, and system number.

[0137] According to another embodiment of this specification, determining the location information of the service identifier to be stored in the preset storage heap structure can specifically include, for example, determining at least one target parent node of the service identifier to be stored from the preset storage heap structure; determining hierarchical information based on the number of target parent nodes; and determining the connection relationship information between the service identifier to be stored and the root node based on at least one target parent node.

[0138] Specifically, the process of determining location information can also be as follows: From a preset storage heap structure, determine the node corresponding to the service identifier to be stored. Then, determine all parent nodes between this node and the root node, and treat each of these parent nodes as a target parent node. Calculate the number of target parent nodes to determine the level information corresponding to the sum of this number and one. For example, if the node corresponding to the service identifier to be stored is located in the third layer and has target parent nodes A and E between it and the root node, since there are only two target parent nodes, the level information is determined to be three. If the node corresponding to the service identifier to be stored is in the first layer, and there are no target parent nodes between this node and the root node, then the level information is determined to be three. It should be noted that the above number of layers is merely an example for better understanding of this application and does not constitute any limitation on this application.

[0139] Figure 3 The diagram shows a flowchart of a method for determining preset node information according to an embodiment of this specification. Another process for determining preset node information is described in this figure, but may include more or fewer steps based on conventional or non-creative methods. Specifically, as shown... Figure 3 As shown, the method may include:

[0140] S331, Based on the preset storage heap structure, determine the information of multiple storage nodes at the level corresponding to the hierarchical information;

[0141] S332, determine the storage parent node of each storage node information and the target parent node of the service identifier to be stored from the preset storage heap structure;

[0142] S333, determine the target storage parent node that matches the target parent node from the storage parent nodes;

[0143] S334, determine the preset node information of the child node of the target storage parent node from multiple storage node information.

[0144] According to another embodiment of this specification, when there are too many nodes in the preset storage heap structure, there are many nodes at the same level as the node corresponding to the service identifier to be stored. If the preset service identifier corresponding to all nodes at that level is determined as the preset node information, it will result in a large amount of data corresponding to some nodes. In order to make the data smaller, the target parent node directly connected to the node corresponding to the service identifier to be stored can be determined, and then the child nodes directly connected to the target parent node can be determined. The preset service identifier corresponding to all the child nodes can be determined as the preset node information for use in the calculation of the stored data identifier.

[0145] Specifically, based on the preset storage heap structure, all nodes in the hierarchy corresponding to the hierarchical information are determined, and a preset service identifier corresponding to each node is determined, and the preset service identifier is used as the storage node information.

[0146] For all nodes at this level, directly connected parent nodes are determined from the preset storage heap structure, and these parent nodes are used as storage parent nodes. The directly connected parent node of the node corresponding to the service identifier to be stored is also determined, and this parent node is used as the target parent node. The service identifier to be stored is matched against the preset service identifiers corresponding to each storage parent node. From multiple preset service identifiers, a target preset service identifier matching the service identifier to be stored is determined, and the storage node corresponding to this target preset service identifier is used as the target storage parent node. Furthermore, each directly connected child node of the target storage parent node is determined, and the storage node information corresponding to that child node is used as the preset node information from multiple storage node information sets.

[0147] Figure 4A The diagram shown is a flowchart of a method for determining a stored data identifier according to an embodiment of this specification. Figure 4A The document describes a process for identifying stored data, but based on routine or non-creative labor, it may include more or fewer operational steps. Specifically, for example... Figure 4A As shown, the method may include:

[0148] S441, Determine the cardinality of the data to be processed based on the connection relationship;

[0149] S442, determine candidate data based on the position of the service identifier to be stored in at least one preset node information;

[0150] S443, determine the cardinality of the data to be processed and the sum of the candidate data, and use it as the identifier for the stored data.

[0151] According to another embodiment of this specification, determining the cardinality of the data to be processed based on the connection relationship can specifically involve setting the root node to 1, determining the node of each target parent node corresponding to the node of the service identifier to be stored based on the connection relationship, and then determining the data corresponding to each target parent node. Furthermore, the data of the target parent node directly vectorized from the node corresponding to the service identifier to be stored is used as the cardinality of the data to be processed.

[0152] From the preset storage heap structure, determine the node corresponding to the service identifier to be stored, and its position within the nodes corresponding to the preset node information. The specific determination method is described in the above embodiment. Furthermore, for example, this position can be directly determined as candidate data.

[0153] The sum of the cardinality of the data to be processed and the candidate data is determined as the storage data identifier. Specifically, the method for determining the data corresponding to each target parent node is similar to the method for determining the storage data identifier corresponding to the node corresponding to the service identifier to be stored. It should be noted that the candidate data may also be included in the pre-maintained table.

[0154] Figure 4B The diagram shown is a flowchart of a method for determining the cardinality of data to be processed according to an embodiment of this specification. Figure 4B The process of determining the cardinality of the data to be processed is described, but based on routine or non-creative labor, it may include more or fewer operational steps. Specifically, for example... Figure 4B As shown, the method may include:

[0155] S4411, For each target parent node, determine the corresponding target data based on the connection relationship between the target parent node and the root node and the position of the target parent node in its level;

[0156] S4412, determine the product of the preset data and the target data directly connected to the business identifier to be stored as the base of the data to be processed.

[0157] According to another embodiment of this specification, the target parent node is the node that connects the node corresponding to the service identifier to be stored to the root node. For example, the node corresponding to the service identifier to be stored is connected to node A, node A is connected to node E, and node E is connected to the root node. Thus, node A and node E are the target parent nodes.

[0158] The rank of the target parent node within its hierarchy refers to its position among multiple nodes sharing the same parent node. For example, if the target parent node is A, its parent node is E, and parent node E has eight directly connected child nodes, with target parent node A being the fifth child node from the left among these eight directly connected child nodes, then its rank is 5. For each target parent node, the corresponding target data is determined based on the connection relationship between the target parent node and the root node, as well as the target parent node's rank within its hierarchy. This can be achieved, for example, by determining the data corresponding to the parent node in the above embodiment, and will not be elaborated further here.

[0159] The target data directly connected to the service identifier to be stored is the target data corresponding to the target parent node directly connected to the node corresponding to the service identifier to be stored. This preset data can be, for example, 100, to ensure that the data corresponding to each node in each layer is different. Therefore, the product of 100 and the target data is determined as the cardinality of the data to be processed.

[0160] According to another embodiment of this specification, for each target parent node, the corresponding target data is determined based on the connection relationship between the target parent node and the root node and the position of the target parent node in its hierarchy. For example, for a first target parent node directly connected to the root node, the first target data corresponding to the first target parent node is determined based on the position of the first target parent node in its hierarchy; it is determined whether the target parent nodes include a second target parent node other than the first target parent node; if it is determined that a second target parent node exists, for each second target parent node, the second target data corresponding to the second target parent node is determined based on the connection relationship between the second target parent node and the first target parent node and the position of the second target parent node in its hierarchy.

[0161] Based on the position of the first target parent node in its hierarchy, the first target data corresponding to the first target parent node is determined. For example, the first target data can be the product of the determined position and preset data. If it is determined that there is no second target parent node, the first target data is determined as the target data. If it is determined that there is a second target parent node, for each second target parent node, based on the connection relationship between the second target parent node and the first target parent node, and the position of the second target parent node in its hierarchy, the second target data corresponding to the second target parent node is determined. Specifically, for the second target parent node directly connected to the first target parent node (the child node of the first target parent node), the first product of the first target node and the preset data is determined, the second product of the position and the preset data is determined, and the sum of the first product and the second product is determined as the second target data, and the second target data is determined as the target data. Furthermore, if there are other second target parent nodes, for each other second target parent node, the second target data of the parent node directly connected to the other second target node and the position of the other second target node in its hierarchy are determined in a similar way to determine the corresponding second target data. Finally, the second target data corresponding to the second target parent node directly connected to the node corresponding to the service identifier to be stored is determined as the target data, in order to determine the base number of the data to be processed for the node corresponding to the service identifier to be stored.

[0162] It should be noted that in this embodiment, the position of the second target parent node in its level is only the position among all nodes that share the same parent node as the second target parent node.

[0163] Figure 4C The diagram shown is a flowchart of a candidate data determination method according to an embodiment of this specification. Figure 4C The process for identifying candidate data is described, but based on routine or non-creative labor, it may include more or fewer operational steps. Specifically, for example... Figure 4C As shown, the method may include:

[0164] S4421, determine the position and subtract the target constant to obtain the updated position;

[0165] S4422, determine the product of the updated position and the preset data as candidate data.

[0166] According to another embodiment of this specification, the target constant can be, for example, 1. Therefore, the data whose position is determined by subtracting 1 is the updated position. It should be noted that the candidate data is calculated in the same way as the candidate data corresponding to nodes other than the root node and the first-level nodes. If it is a first-level node, the candidate data can be directly calculated by multiplying the position by the preset data.

[0167] The preset data can be, for example, 100, and the product of the determined update position and the preset data is the candidate data.

[0168] Specifically, such as Figure 4D The diagram illustrates a storage data identifier according to another embodiment of this specification. As shown, the data corresponding to the root node is 1, and the first layer connected to the root node includes multiple nodes (79). For each node's position in the first layer, the product of the position and the preset data (100) is determined to be the data corresponding to that node. For the first node directly connected to the node in the second layer whose data is 100 in the first layer, it is determined that there is only a first target parent node, and the target data corresponding to the first target parent node is 100; the product of 100 and the preset data 100 is determined to be 10000. Since it is a node in the second layer, the position needs to be updated, so the determined candidate data is 0. Thus, the target data corresponding to the first node directly connected to the node in the second layer whose data is 100 in the first layer is determined to be 10000. Similarly, the target data corresponding to other nodes and the storage data identifier corresponding to the node corresponding to the service identifier to be stored can be determined.

[0169] Figure 5A The diagram shown is a schematic representation of an information extraction method based on a heap structure according to an embodiment of this specification. Figure 5A The document describes an information extraction process based on a heap structure, but conventional or non-creative labor can involve more or fewer operational steps. Specifically, for example... Figure 5A As shown, the method may include:

[0170] S510, determine the data identifier to be extracted based on the received information extraction request;

[0171] S520, determine the target level based on the extracted data identifier and preset data;

[0172] S530, based on the number of target bits before and after the extracted data identifier, determine the target position of the extracted node and the connection relationship between the extracted node and the root node;

[0173] S540, based on the target level and target position, determines the information to be extracted.

[0174] According to another embodiment of this specification, when a user needs to retrieve stored information, they send a retrieval request to the server using a number obtained during the storage process or a stored data identifier. Upon receiving the number or stored data identifier, the server determines the retrieval data identifier based on it. Specifically, the server determines the stored data identifier associated with the number as the retrieval data identifier, or uses the stored data identifier as the retrieval data identifier.

[0175] The preset data can be, for example, 100. Based on the extracted data identifier and the preset data, the target level is determined specifically by the quotient of the extracted data identifier and the preset data. This target level represents the level where the business identifier corresponding to the data to be extracted resides. The level where the business identifier resides is the level where the node corresponding to the business identifier resides.

[0176] Based on the first and last target digits of the extracted data identifier, the target position of the extracted node and the connection relationship between the extracted node and the root node are determined. Specifically, when the preset data is 100, the digits before the last three digits are all taken as the first target digits, and the last target digits are the last three digits. Thus, based on the first target digits, the parent node directly connected to the extracted node is determined (which can be directly determined by the connection relationship), and based on the last three digits, the position of the extracted node among the child nodes connected to the parent node is determined.

[0177] After determining the target level and target position, the database storage location corresponding to the target level and target position is determined based on the target level and target position, and the data to be extracted is determined from the corresponding database storage location.

[0178] Specifically, the extracted data identifier is generated by the method for determining the stored data identifier as described in any of the above embodiments.

[0179] Figure 5B The diagram shown is a schematic representation of another embodiment of this specification, namely, an information extraction method based on a heap structure. Figure 5B Another information extraction process based on a heap structure is described, but conventional or non-creative labor can involve more or fewer operational steps. Specifically, such as... Figure 5B As shown, the method may include:

[0180] S560, based on the connection relationship between the extracted node and the root node, obtain the candidate parent node between the extracted node and the root node;

[0181] S570 constructs a directory tree structure based on the business identifier to be extracted, the information to be extracted, and the business identifier corresponding to the candidate parent node.

[0182] According to another embodiment of this specification, when users extract information to be extracted, they often want to construct all business identifiers and information between the information to be extracted and the top-level (root node). Therefore, based on the connection relationship between the extraction node and the root node, all nodes between the extraction node and the root node are determined, and each node is considered a candidate parent node.

[0183] Then, based on the business identifier to be extracted, the information to be extracted, and the business identifier corresponding to the candidate parent node, a directory tree structure is constructed. Specifically, this can be the reverse process of converting a directory tree structure into a heap structure, which will not be elaborated here.

[0184] It should be noted that if a complete directory tree structure (including nodes corresponding to all business identifiers) needs to be constructed, you can first query whether there is storage information in the storage space corresponding to each node. If it does not exist, it is determined that the business identifier corresponding to that node is not displayed in the target directory structure. This ensures that there is corresponding storage information in each directory when the user views it, thereby improving the user experience.

[0185] Figure 6 The diagram shown is a schematic representation of a target hierarchy determination method according to an embodiment of this specification. Figure 6 The process of determining the target hierarchy is described, but based on routine or non-creative labor, it may include more or fewer operational steps. Specifically, for example... Figure 6 As shown, the method may include:

[0186] S621, determine the quotient of the extracted data identifier divided by the preset data;

[0187] S622, determine whether the quotient is greater than the preset data;

[0188] S623, if it is determined that the quotient is greater than the preset data, the quotient is used as the data extraction identifier to perform division operation until it is determined that the obtained quotient is less than the preset data;

[0189] S624, determine the number of division operations as the target level.

[0190] According to another embodiment of this specification, the preset data is 100.

[0191] It should be noted that the process of extracting data identifiers to determine the target level is the reverse process of determining storage data identifiers based on connection relationships, which will not be elaborated upon here.

[0192] Figure 7 The diagram shown is a schematic representation of a method for determining target position and connection relationship according to an embodiment of this specification. Figure 7 The process of determining the target position and connectivity is described, but based on routine or non-creative labor, it may include more or fewer operational steps. Specifically, for example... Figure 7 As shown, the method may include:

[0193] S731, based on the previous target number of bits, determine the position of the parent node of each level of the extracted node;

[0194] S732, based on the position of the parent node at each level, determine the connection relationship between the extracted node and the root node;

[0195] S733, based on the number of subsequent target bits, determines the target position of the extracted node in its respective level.

[0196] According to another embodiment of this specification, when the preset data is 100, the digits before the last three digits are all taken as the first target digits, and the last target digits are the last three digits.

[0197] Specifically, for example, if the extracted data identifier is 20100, where 100 is the last three digits and the other digits are the target numbers, the first digit indicates that the parent node in the first level is the second child node (position 2) directly connected to the root node. Since the target level is the second level, the connection between the extracted node and the root node can be directly determined as follows: the extracted node is connected to the second node in the first level, and this second node in the first level is connected to the root node. Furthermore, since the extracted node is in the second level, not the first level, the target position is the quotient of the last three digits and 100 plus 1 (the target constant), resulting in a target position of 2. Therefore, this indicates that the extracted node is located in the second level, the second child node directly connected to the second node in the first level. This process can also be considered the reverse process of determining the stored data identifier based on the position.

[0198] According to another embodiment of this specification, the first target number of bits includes a plurality of sub-first target number bits arranged in sequence. The position of the parent node of each level of the extracted node is determined based on the first target number of bits. For example, it can be based on the order of arrangement, determining the position of the corresponding parent node for each sub-first target number of bits sequentially. When the preset data is 100, the last three target number bits are the last three bits, and the remaining bits are all first target number bits. The first two bits can be used as sub-first target number bits, and the other data between the sub-first target number bits and the last target number bits are used as sub-first target number bits. Specifically, for example, if the extracted data identifier is 10100100, the sub-first target number bits are 10 and 100, and the last target number bit is 100. Thus, the first sub-first target number bit being 10 indicates that the root node is directly connected to the first child node of the first level (position 1), and the second sub-first target number bit being 100 indicates that the second child node of the second level, which is directly connected to the first child node of the first level, is (position 2), the parent node of the extracted node.

[0199] Figure 8 The diagram shown is a structural schematic of an information storage device based on a heap structure according to an embodiment of this specification. Figure 8 As shown, including,

[0200] The first determining unit 810 is used to determine the service identifier to be stored and the information to be stored based on the received information storage request.

[0201] The second determining unit 820 is used to determine the location information of the service identifier to be stored in the preset storage heap structure. The location information includes the hierarchical information of the service identifier to be stored and the connection relationship information between the service identifier to be stored and the root node.

[0202] The third determining unit 830 is used to determine at least one preset node information corresponding to the hierarchical information;

[0203] The fourth determining unit 840 is used to determine the storage data identifier corresponding to the service identifier to be stored based on the position and connection relationship information of the service identifier to be stored in at least one preset node information, so as to extract the information to be stored; and

[0204] Storage unit 850 is used to store the information to be stored into a database corresponding to the location information.

[0205] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.

[0206] Figure 9A The diagram shown is a structural schematic of an information extraction device for a stacked structure according to an embodiment of this specification. Figure 9A As shown, including,

[0207] The fifth determining unit 910 is used to determine the data identifier to be extracted based on the received information extraction request;

[0208] The sixth determining unit 920 is used to determine the target level based on the extracted data identifier and preset data;

[0209] The seventh determining unit 930 is used to determine the target position of the extraction node and the connection relationship between the extraction node and the root node based on the number of target digits before and after the extracted data identifier; and

[0210] The eighth determining unit 940 is used to determine the information to be extracted based on the target level and target position;

[0211] Among them, the extraction of data identifiers is based on, for example Figure 8 The unit that determines the storage data identifier is generated.

[0212] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.

[0213] Figure 9B The diagram shown is a structural schematic of an information extraction device with a stack structure according to another embodiment of this specification. Figure 9B As shown, including,

[0214] Acquisition unit 950 is used to acquire candidate parent nodes between the extracted node and the root node based on the connection relationship between the extracted node and the root node; and

[0215] The construction unit 960 is used to construct a directory tree structure based on the business identifier to be extracted corresponding to the extraction node, the information to be extracted, and the business identifier corresponding to the candidate parent node.

[0216] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.

[0217] like Figure 10 The diagram illustrates the structure of a computer device according to an embodiment of this specification. The apparatus described in this specification can be the computer device in this embodiment, executing the methods described above. The computer device 1002 may include one or more processing devices 1004, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 1002 may also include any storage resource 1006 for storing information of any kind, such as code, settings, data, etc. Without limitation, for example, the storage resource 1006 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Furthermore, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource may represent a fixed or removable component of the computer device 1002. In one case, when the processing device 1004 executes associated instructions stored in any storage resource or combination of storage resources, the computer device 1002 can perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any storage resource, such as hard disk drive mechanism, optical disk drive mechanism, etc.

[0218] Computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via input device 1012) and providing various outputs (via output device 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface (GUI) 1018. In other embodiments, the input / output module 1010 (I / O), input device 1012, and output device 1014 may be omitted, and the device may function solely as a computer device within a network. Computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.

[0219] The communication link 1022 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.

[0220] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0221] This specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method.

[0222] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification 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, etc.) containing computer-usable program code.

[0223] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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 a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0224] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0225] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0226] The above specific embodiments further illustrate the purpose, technical solutions, and beneficial effects of this specification. It should be understood that the above are merely specific embodiments of this specification and are not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. An information storage method based on a heap structure, characterized in that, include: Based on the received information storage request, determine the service identifier to be stored and the information to be stored; Determine the location information of the service identifier to be stored in the preset storage heap structure. The location information includes the hierarchical information of the service identifier to be stored and the connection relationship information between the service identifier to be stored and the root node. Determine at least one preset node information corresponding to the hierarchical information, wherein the preset node information is the preset service identifier corresponding to all child nodes connected to the target parent node corresponding to the service identifier to be stored in the hierarchical information; Based on the position of the service identifier to be stored in the information of at least one preset node and the connection relationship information, a storage data identifier corresponding to the service identifier to be stored is determined for extracting the information to be stored, including: the connection relationship information includes at least one target parent node; for each target parent node, based on the connection relationship between the target parent node and the root node and the position of the target parent node in its level, the corresponding target data is determined; the product of the preset data and the target data directly connected to the service identifier to be stored is determined as the data base to be processed; the position is determined by subtracting a target constant to obtain an updated position; the product of the updated position and the preset data is determined as candidate data; and the sum of the data base to be processed and the candidate data is determined as the storage data identifier; and The information to be stored is stored in the database corresponding to the location information.

2. The method according to claim 1, characterized in that, The step of determining the location information of the service identifier to be stored in the preset storage heap structure includes: From the preset storage heap structure, determine at least one target parent node of the service identifier to be stored; The hierarchy information is determined based on the number of target parent nodes; and Based on the at least one target parent node, determine the connection relationship information between the service identifier to be stored and the root node.

3. The method according to claim 1, characterized in that, The determination of at least one preset node information corresponding to the hierarchical information includes: Based on the preset storage heap structure, determine the information of multiple storage nodes at the level corresponding to the hierarchical information; From the preset storage heap structure, determine the storage parent node for each storage node information and the target parent node for the service identifier to be stored; From the storage parent nodes, determine the target storage parent node that matches the target parent node; and The preset node information is determined from among the plurality of storage node information to be the child node of the target storage parent node.

4. The method according to claim 1, characterized in that, The step of determining the corresponding target data for each target parent node, based on the connection relationship between the target parent node and the root node and the position of the target parent node in its hierarchy, includes: For the first target parent node directly connected to the root node, the first target data corresponding to the first target parent node is determined based on the position of the first target parent node in its level. Determine whether the target parent node includes a second target parent node other than the first target parent node; If the existence of the second target parent node is determined, for each second target parent node, the second target data corresponding to the second target parent node is determined based on the connection relationship between the second target parent node and the first target parent node, and the position of the second target parent node in its respective level.

5. An information extraction method based on a heap structure, characterized in that, include: Based on the received information extraction request, determine the data identifier to be extracted; The target level is determined based on the extracted data identifier and preset data; Based on the first and last target digits of the extracted data identifier, determine the target position of the extracted node and the connection relationship between the extracted node and the root node; as well as Based on the target level and the target position, the information to be extracted is determined; The extracted data identifier is generated based on the method for determining the stored data identifier as described in any one of claims 1-4.

6. The method according to claim 5, characterized in that, The step of determining the target level based on the extracted data identifier and preset data includes: Determine the quotient of the extracted data identifier divided by the preset data, and determine whether the quotient is greater than the preset data; If it is determined that the quotient is greater than the preset data, the quotient is used as the identifier for the extracted data to perform a division operation until it is determined that the obtained quotient is less than the preset data; and The number of division operations is determined as the target level.

7. The method according to claim 5, characterized in that, The step of determining the target position of the extraction node and the connection relationship between the extraction node and the root node based on the first and second target digits of the extracted data identifier includes: Based on the previous target number of bits, determine the position of the parent node of each layer of the extracted node; Based on the position of each parent node, the connection relationship between the extracted node and the root node is determined; and Based on the target number of bits, the target position of the extraction node in its respective level is determined.

8. The method according to claim 7, characterized in that, The preceding target number of bits includes multiple sub-preceding target number of bits arranged sequentially. Determining the position of each parent node of the extracted node based on the preceding target number of bits includes: Based on the order of the arrangement, the position of the corresponding parent node is determined sequentially for each of the target numbers before the child.

9. The method according to claim 5, characterized in that, After determining the information to be extracted, the process also includes: Based on the connection relationship between the extracted node and the root node, candidate parent nodes between the extracted node and the root node are obtained; and A directory tree structure is constructed based on the business identifier to be extracted corresponding to the extraction node, the information to be extracted, and the business identifier corresponding to the candidate parent node.

10. An information storage device based on a heap structure, characterized in that, include: The first determining unit is used to determine the service identifier to be stored and the information to be stored based on the received information storage request. The second determining unit is used to determine the location information of the service identifier to be stored in the preset storage heap structure. The location information includes the hierarchical information of the service identifier to be stored and the connection relationship information between the service identifier to be stored and the root node. The third determining unit is used to determine at least one preset node information corresponding to the hierarchical information, wherein the preset node information is the preset service identifier corresponding to all child nodes connected to the target parent node corresponding to the service identifier to be stored in the hierarchical information. The fourth determining unit is configured to determine a storage data identifier corresponding to the service identifier to be stored based on the position of the service identifier to be stored in the information of at least one preset node and the connection relationship information, for extracting the information to be stored, including: the connection relationship information includes at least one target parent node; for each target parent node, determining the corresponding target data based on the connection relationship between the target parent node and the root node and the position of the target parent node in its respective level; determining the product of the preset data and the target data directly connected to the service identifier to be stored as the data base to be processed; determining the updated position by subtracting a target constant from the position; and determining the product of the updated position and the preset data as candidate data; and A storage unit is used to store the information to be stored in a database corresponding to the location information.

11. An information extraction device based on a heap structure, characterized in that, include: The fifth determining unit is used to determine the data identifier to be extracted based on the received information extraction request; The sixth determining unit is used to determine the target level based on the extracted data identifier and preset data; The seventh determining unit is used to determine the target position of the extraction node and the connection relationship between the extraction node and the root node based on the first and last target number of the extracted data identifier. as well as The eighth determining unit is used to determine the information to be extracted based on the target level and the target position; The extracted data identifier is generated based on the unit that determines the stored data identifier as described in claim 10.

12. The apparatus according to claim 11, characterized in that, Also includes: The acquisition unit is used to acquire candidate parent nodes between the extraction node and the root node based on the connection relationship between the extraction node and the root node; as well as The construction unit is used to construct a directory tree structure based on the business identifier to be extracted corresponding to the extraction node, the information to be extracted, and the business identifier corresponding to the candidate parent node.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1-9.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the method of any one of claims 1-9.

15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Data processing method and terminal equipment

    CN110471900A

  • Hierarchical data search method and device based on binary tree, equipment and storage medium

    CN115048382A