Multidimensional data query method, device, computer equipment and storage medium

By creating a virtual node reference list and mapping set, a multidimensional search index tree model is constructed to optimize the multidimensional data query process, solve the problem of low multidimensional data query efficiency, and achieve efficient multidimensional data aggregation and query.

CN116595123BActive Publication Date: 2025-10-03KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310699915.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-10-03
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

During the in-memory query process, existing multidimensional data query technologies perform retrieval by traversing multidimensional query conditions one by one and comparing dimension member values ​​one by one, which results in high data search time complexity and reduces the query efficiency of multidimensional data.

Method used

Create a virtual node reference list and forward dimension hierarchy of the root node, and optimize the query process of multidimensional data through mapping sets and multidimensional search index tree models, including creating mapping sets and dimension hierarchy relationships of the last-level nodes, and building the target multidimensional search index tree model.

Benefits of technology

By combining virtual nodes with mapping sets, efficient query directions are provided, aggregation and reuse of multi-dimensional hierarchical data are achieved, the complexity of data search time is reduced, and the query efficiency of multi-dimensional data is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116595123B_ABST
    Figure CN116595123B_ABST
Patent Text Reader

Abstract

The present application relates to a multidimensional data query method, device, computer equipment and storage medium. The method includes: creating a virtual node reference list of the root node, iteratively creating a mapping set corresponding to the last node in the forward dimension hierarchy, selecting the current dimension hierarchy based on the dimension hierarchy relationship and creating the current dimension node, creating the current dimension virtual node at the starting child node position of the current dimension node when the current dimension node has at least two dimension members, adding the corresponding current dimension virtual node reference information to the virtual node reference list when the current dimension virtual node is the first virtual node on the corresponding tree path, creating the current dimension member node corresponding to the current dimension node in sequence, obtaining and adding the current dimension node reference information to the mapping set corresponding to the last node, taking the current dimension hierarchy as the forward dimension hierarchy, until the target multidimensional search index tree model is obtained. The use of this method can improve the query efficiency of multidimensional data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a multidimensional data query method, apparatus, and computer equipment. Background Art

[0002] With the continuous development of computer technology, the query technology of multidimensional data has been continuously improved. However, in the process of in-memory query of multidimensional data, the existing multidimensional data query technology usually traverses the multidimensional query conditions one by one and compares the dimension member values ​​one by one for retrieval. By traversing the multidimensional query conditions for in-memory multidimensional search, the data search time complexity is high, thereby reducing the query efficiency of multidimensional data. Summary of the Invention

[0003] Based on this, it is necessary to provide a multidimensional data query method, device, computer equipment and storage medium that can efficiently query multidimensional data to address the above technical problems, thereby improving the query efficiency of multidimensional data.

[0004] A multidimensional data query method, comprising:

[0005] Create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level;

[0006] Create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node for the last-level node in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node; when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list;

[0007] Starting from the backward position of the starting child node position, create the current dimension member nodes of the dimension corresponding to the current dimension node in sequence, obtain the current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy;

[0008] Repeat the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created, thereby obtaining a target multidimensional search index tree model for querying multidimensional data.

[0009] In one embodiment, when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, the method further includes:

[0010] When the current dimension virtual node has a subtree, create leaf node head pointers for the current dimension virtual node and the brother node corresponding to the current dimension virtual node respectively, point the leaf node head pointers for the current dimension virtual node and the brother node respectively to the initial leaf node of the corresponding subtree, use the initial leaf node as the current leaf node, and use the pointer corresponding to the initial leaf node as the current leaf node pointer;

[0011] Point the current leaf node pointer to the backward leaf node of the current leaf node, use the backward leaf node as the current leaf node, use the pointer corresponding to the backward leaf node as the current leaf node pointer, and repeat the step of pointing the current leaf node pointer to the backward leaf node of the current leaf node until the current leaf node is the last leaf node of the subtree corresponding to the current dimension virtual node and the brother node;

[0012] Create leaf node tail pointers for the virtual node and brother node of the current dimension respectively, and point the leaf node tail pointer to the last leaf node of the corresponding subtree.

[0013] In one embodiment, the method further comprises:

[0014] Create a sibling node pointer of the current dimension virtual node, use the initial sibling node of the current dimension virtual node as the current sibling node, point the sibling node pointer to the current sibling node, and use the pointer of the current sibling node as the current sibling node pointer;

[0015] Set the current sibling node pointer to the backward sibling node of the current sibling node, use the backward sibling node as the current sibling node, and use the pointer corresponding to the backward sibling node as the current sibling node pointer;

[0016] Repeat the step of pointing the current sibling node pointer to the backward sibling node of the current sibling node until the current sibling node is the last sibling node of the virtual node of the current dimension.

[0017] In one embodiment, the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship are repeated until all dimension hierarchies in the dimension hierarchy relationship are created, further comprising:

[0018] Based on the virtual node reference list of the root node, the current virtual node is obtained from the virtual node reference list in sequence. When the current virtual node is a non-leaf node, the current aggregation node is determined in sequence from the leaf nodes of the subtree corresponding to the current virtual node, an aggregation reference list corresponding to the current aggregation node is created, related aggregation nodes of the current aggregation node are determined, and node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of each current aggregation node;

[0019] When the current virtual node is a leaf node, the current virtual node is used as an aggregation node, an aggregation reference list corresponding to the aggregation node is created, the related aggregation nodes of the aggregation node are determined, and the node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of the aggregation node.

[0020] In one embodiment, the method further comprises:

[0021] The leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, the sibling node pointed to by the sibling node pointer of the current virtual node is used as the current sibling node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is used as the current related aggregation node;

[0022] Add the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node, set the leaf node pointed to by the pointer corresponding to the current aggregation node as the current aggregation node, and set the leaf node pointed to by the pointer corresponding to the current related aggregation node as the current related aggregation node;

[0023] Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node until the reference information stopping adding condition is met;

[0024] The sibling node of the same level pointed to by the pointer corresponding to the current sibling node is used as the current sibling node, the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is returned as the current related aggregation node until the current sibling node is the last sibling node of the current virtual node.

[0025] In one embodiment, the method further comprises:

[0026] The leaf node pointed to by the leaf node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the leaf node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node;

[0027] Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node, until the parent node corresponding to the leaf node pointed to by the pointer corresponding to the current related aggregation node is inconsistent with the parent node corresponding to the current related aggregation node;

[0028] or,

[0029] The sibling node pointed to by the sibling node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the sibling node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node;

[0030] Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node, until the current related aggregation node is the last sibling node of the aggregation node.

[0031] In one embodiment, the method further comprises:

[0032] Acquire a multidimensional data set, and acquire the existence status of each dimension member in each multidimensional data from the multidimensional data set;

[0033] Based on the existence status of dimension members in each multidimensional data, the data codes corresponding to the dimension members are set, and based on the dimension member identifiers and data codes corresponding to the dimension members, the index mapping relationship of the dimension members is constructed;

[0034] Based on the dimension member index mapping relationship, a target inverted index model is constructed. The inverted index model is used to obtain the query dimension combination. Based on the dimension member identifier corresponding to each dimension member in the query dimension combination, the data encoding corresponding to each dimension member is determined, and the data encoding corresponding to each dimension member is operated to obtain the result encoding. Based on the result encoding, the data corresponding to the query dimension combination is obtained from the multidimensional data set.

[0035] In one embodiment, the method further comprises:

[0036] Mounting the data in the target multidimensional dataset to the corresponding node in the target multidimensional search index tree model to obtain the mounted multidimensional search index tree model, obtaining a data query request, and determining a target query scenario based on the data query request;

[0037] When the target query scenario is the first query scenario, based on the dimension order corresponding to the mounted multidimensional search index model, the target dimension member combination corresponding to the data query request is obtained, and based on the mounted multidimensional search index tree model, the target dimension member combination is searched level by level to obtain the target data corresponding to the target dimension member combination;

[0038] When the target query scenario is the second query scenario, the target dimension member combination corresponding to the data query request is obtained, and based on the target inverted index model, the target data corresponding to the target dimension member combination is obtained from the target multidimensional dataset.

[0039] In one embodiment, based on the mounted multidimensional search index tree model, the target dimension member combination is searched level by level to obtain target data corresponding to the target dimension member combination, including:

[0040] Using the initial dimension member identifier in the target dimension member combination as the current dimension member identifier;

[0041] Based on the mounted multidimensional search index tree model, taking the root node of the mounted multidimensional search index tree model as the current search node, searching for the current dimension member identifier from the mapping set corresponding to the current search node, taking the dimension member node consistent with the current dimension member identifier in the mapping set as the current search node, and taking the backward dimension member identifier of the current dimension member identifier as the current dimension member identifier;

[0042] Repeat the step of searching for the current dimension member identifier from the mapping set corresponding to the current search node until the last-level dimension member of the target dimension member combination is queried, and obtain the target data corresponding to the target dimension member combination.

[0043] A multidimensional data query device, comprising:

[0044] An initial creation module, configured to create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level;

[0045] A virtual node creation module is used to create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node whose last-level node is in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node; when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list;

[0046] a node creation module, configured to, starting from the backward position of the starting child node position, sequentially create current dimension member nodes of the dimension corresponding to the current dimension node, obtain current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy;

[0047] A model generation module is used to repeat the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created, thereby obtaining a target multidimensional search index tree model.

[0048] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the multidimensional data query method.

[0049] A computer-readable storage medium stores a computer program, which implements the steps of the multidimensional data query method when executed by a processor.

[0050] The above-mentioned multidimensional data query method, device, computer equipment and storage medium create a virtual node reference list of the root node, and create a mapping set corresponding to the last node in the forward dimension hierarchy, and create the current dimension node corresponding to the current dimension hierarchy in the dimension hierarchy relationship in sequence. When the dimension corresponding to the current dimension node has at least two dimension members, the corresponding current dimension virtual node is created at the starting child node position of the current dimension node. When the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, the current dimension virtual node reference information corresponding to the current dimension virtual node is added to the virtual node reference list, and the current dimension member nodes of the dimension corresponding to the current dimension node are created in sequence starting from the backward position of the starting child node position. The corresponding current dimension node reference information is obtained and added to the mapping set corresponding to the last node in the forward dimension hierarchy, and the current dimension hierarchy is used as the forward dimension hierarchy, and the mapping set corresponding to the last node in the forward dimension hierarchy is returned until all dimension hierarchies in the dimension hierarchy relationship are created, thereby creating a target multidimensional search index tree model that can be used to query multidimensional data. Among them, the support of virtual node and mapping set technology provides a more efficient query direction for multidimensional data queries. The creation of virtual nodes helps to realize the aggregation and reuse of multidimensional hierarchical data, and improves the efficiency of multidimensional data aggregation calculation. The addition of mapping sets reduces the complexity of data search time and speeds up data queries. Therefore, the dual support of virtual nodes and mapping sets greatly improves the query efficiency of multidimensional data. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A diagram illustrating an application environment of a multidimensional data query method in one embodiment;

[0052] Figure 2 1 is a flow chart of a multidimensional data query method according to an embodiment;

[0053] Figure 3 A schematic diagram of the relationship between index model components in one embodiment;

[0054] Figure 4 A schematic diagram of a multi-dimensional search index tree model in one embodiment;

[0055] Figure 5 A schematic diagram of a process for applying an inverted index model in one embodiment;

[0056] Figure 6 This is a performance comparison table in one embodiment;

[0057] Figure 7 is a structural block diagram of a multidimensional data query device in one embodiment;

[0058] Figure 8 is a diagram of the internal structure of a computer device in one embodiment;

[0059] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0061] The multidimensional data query method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Terminal 102 is used to send data query requests. The server 104 is used to create a root node, create a virtual node reference list of the root node, and use the dimension hierarchy corresponding to the root node as the forward dimension hierarchy; create a mapping set corresponding to the last node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node for the last node in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node, and when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the current dimension virtual node. A virtual node reference list; starting from the backward position of the starting child node position, the current dimension member nodes of the dimension corresponding to the current dimension node are sequentially created to obtain the current dimension node reference information corresponding to the last-level node, and the current dimension node reference information is added to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and the current dimension hierarchy is used as the forward dimension hierarchy; the steps of creating the mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship are repeated until all dimension hierarchies in the dimension hierarchy relationship are created, and the target multidimensional search index tree model is obtained. The target multidimensional search index tree model is used to query multidimensional data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0062] In one embodiment, Figure 2 As shown, a multidimensional data query method is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the server in the example:

[0063] Step S200: Create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level.

[0064] Among them, the virtual node reference list refers to a list of records used to record the first virtual node reference information of each tree path (virtual nodes are also called virtual nodes). The dimension hierarchy refers to the hierarchical levels of different dimensions and the dimension member relationships in each hierarchy. It is different from the tree hierarchy. For example, the nodes on the first level of the tree include a dimension A node, and the nodes on the second level of the tree include dimension A1 and dimension A2. Dimension A1 and dimension A2 are dimension members of dimension A. At this time, the third level of the tree is other dimensions. At this time, the dimension A node in the first level of the tree and the dimension A1 node and dimension A2 node in the second level of the tree belong to the same dimension hierarchy. The forward dimension hierarchy refers to the dimension level that is previous to the current dimension hierarchy.

[0065] Specifically, when creating a multidimensional search index tree model, the root node of the tree is created first. The root node does not serve as an identifier of any dimension and can be regarded as an empty dimension hierarchy (does not belong to any dimension and has no dimension members). The actual dimension presentation will start to be created at the child nodes of the root node; in addition, a virtual node reference list can be created at the root node to record the reference information of the first virtual node of each tree path. The first virtual node of each tree path can be found according to the virtual node reference list, and a multidimensional data aggregation relationship that implements aggregation calculations can be created to realize the aggregation of corresponding data values ​​in multiple dimensions and realize the reuse of the calculated aggregated data.

[0066] Step S202, create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node for the last-level node in the current dimension hierarchy, when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node, when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list.

[0067] Among them, the last level node refers to the leaf node in the same dimension level, such as Figure 4The {virtual nodes organization A, organization A1, organization A2} in the figure are leaf nodes corresponding to the same dimension. They are not leaf nodes in the sense of tree structure, but leaf nodes limited to the same dimension level. A mapping set refers to a key-value pair set, which can be a Map set, where each element in the Map set contains a key object and a value object. Here, the key object can be a dimension member ID (including the dimension ID corresponding to the virtual node), and the value object can be a dimension member node (including the virtual node). The dimension hierarchy relationship refers to the hierarchical level relationship corresponding to various preset dimensions and the inclusion relationship of dimension members corresponding to various dimensions, where the first dimension level can be determined by the preset selected aggregation dimension level. For example, if the aggregation dimension level is organization, then when the tree is constructed, the dimension level corresponding to the organization is used as the first dimension level, and the dimension members in the organization are given priority to construct the corresponding tree nodes; and the dimension hierarchy relationship can be known from the dimension combination designed in the front-end page. The current dimension level refers to the dimension hierarchy level to which the currently created node belongs. The current dimension node refers to the real node corresponding to the current dimension ID, which may be single or multiple. For example, in the organization dimension hierarchy, only organization A is the current dimension node, while in the subject dimension hierarchy, subject A and subject B are both current dimension nodes. Dimension members refer to the basic units that constitute the dimension. For example, combination A1 and combination A2 in combination A are the dimension members of combination A. The starting child node position refers to the position of the first child node corresponding to the parent node. The current dimension virtual node refers to the virtual node with the same name as the current dimension node ID. The current dimension virtual node reference information refers to the node reference information of the current dimension virtual node, which can also be recorded in the form of a key-value pair, where the key is the dimension ID corresponding to the current dimension virtual node, and the value is the current dimension virtual node.

[0068] Specifically, the mapping set can record the reference information of all nodes of the next dimension level corresponding to the last node of each dimension level through key-value. There is no tree level division between the nodes recorded in the mapping set. They are in a level state during search. Each last node corresponding to the previous dimension level contains the member nodes (including virtual nodes) corresponding to the next dimension level in its subtree; the dimension level relationship is determined according to the preset aggregation level dimension to determine its first dimension level, and other dimension levels can be randomly divided into which dimension level they belong to, and the hierarchical relationship between dimensions can be randomly set according to the dimension combination designed by the front-end interface. When building a tree, the dimension member nodes corresponding to each dimension level can be constructed one by one according to the preset dimension level relationship until all the nodes to be constructed for all dimension levels have been constructed. Among them, for each dimension, a real node with the same name as its dimension ID will be constructed as the parent node of its dimension member node, and if the dimension involves multiple dimension members, a virtual node with the same name as its dimension ID will be created at the first of its child nodes. That is, when there are at least two dimension members for each corresponding current dimension node, a current dimension virtual node with the same name as the current dimension node ID can be constructed. At this time, it is judged whether the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node. If so, the current dimension virtual node reference information corresponding to the current dimension virtual node is added to the virtual node reference list. If not, its reference information does not need to be added to the virtual node reference list. This is to prepare for the subsequent construction of the aggregation node. In order to achieve the aggregation of multi-dimensional data and ensure that after the entire tree is built, only nodes that do not contain dimension member nodes can enter data, if the first virtual node corresponding to the tree path is encountered on the corresponding tree path during the tree construction process, all leaf nodes in the subtree corresponding to the virtual node cannot enter data, but are used as aggregation items constructed in subsequent processes, and then rely on the value of the corresponding aggregation node reference information to calculate the corresponding value of each leaf node in the corresponding subtree. This is why there is no need to record all virtual nodes in the virtual node reference list. This greatly helps to reuse multi-dimensional aggregate data and speed up the calculation of aggregate data, thereby speeding up the query efficiency of multi-dimensional data and even multi-dimensional aggregate data.

[0069] Step S204, starting from the backward position of the starting child node position, create the current dimension member nodes of the dimension corresponding to the current dimension node in sequence, obtain the current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy.

[0070] The backward position refers to the next position at the same tree level as the current dimension virtual node, which is the starting child node. The current dimension member node refers to the node named with the dimension member ID corresponding to the current dimension node. The current dimension node reference information refers to information that can identify and reference the node, and is recorded in key-value format, where the key is the dimension member ID (including the dimension ID corresponding to the virtual node) and the value is the dimension member node (including the virtual node).

[0071] Specifically, after the creation of the current dimension virtual node is completed, a brother node corresponding to the current dimension virtual node is constructed on the same tree level of the current dimension virtual node, that is, the corresponding current dimension member node. Furthermore, if the current dimension virtual node and the corresponding current dimension member node still have dimension members corresponding to the current dimension level, then the corresponding dimension member node can be created at the next tree level of the current dimension virtual node and the current dimension member node, that is, as long as there are at least two dimension members belonging to the same dimension level as the parent node in the same parent node, a virtual node with the same name as the parent node ID is created at the first child node of the parent node, and the corresponding dimension members are created as brother nodes in turn for tree nodes until all dimension members corresponding to the current dimension level are created. In addition, after the nodes of each dimension member corresponding to the current dimension level are created, the current dimension node reference information corresponding to each node within the current dimension level in the subtree corresponding to each last-level node of the forward dimension level can be obtained; for example Figure 4 In the figure, the last-level nodes of the forward dimension hierarchy are {virtual node organization A, organization A1, organization A2}, then the current dimension node reference information corresponding to the virtual node organization A contains {subject A, subject B, virtual node subject B, subject B1, subject B2} in its subtree in the current dimension hierarchy. Similarly, the other last-level nodes are all member nodes corresponding to the current dimension hierarchy in its subtree. Although the root node does not belong to any dimension hierarchy, it also creates its own mapping set, that is, the root node can be regarded as the last-level node of its own dimension hierarchy. In addition, the current dimension node reference information can be in the form of a key-value pair, where the key is the dimension member ID and the value is the dimension member node. When searching, the corresponding node ID can be directly determined in the corresponding mapping set according to the dimension member ID, and then the corresponding node position in the multi-dimensional search index tree can be found according to its corresponding value dimension member node. There is no need to traverse each node in the same dimension hierarchy tree structure step by step, which makes the search more efficient and faster. In addition, in order to complete the creation of each dimension level in the dimension hierarchy relationship, the current dimension level can be used as the forward dimension level, and the next dimension level in the dimension hierarchy relationship can be used as the current dimension level. The tree structure of the next dimension level can be created continuously until all members corresponding to each dimension level have corresponding nodes constructed.

[0072] Step S206, repeatedly create a mapping set corresponding to the last-level node in the forward dimension hierarchy, and select the current dimension hierarchy based on the dimension hierarchy relationship, until all dimension hierarchies in the dimension hierarchy relationship are created, and obtain the target multidimensional search index tree model, which is used to query multidimensional data.

[0073] Among them, the target multidimensional search index tree model refers to an index tree containing multiple dimensions, in which non-leaf nodes are only used for indexing and do not save data records, while leaf nodes save both indexes and data records. However, it should be noted that all leaf nodes of the subtree corresponding to the first virtual node under each tree path do not save data. They are used to record the reference information of each aggregation node in the aggregation relationship, so as to calculate the aggregation of multi-dimensional data under the corresponding tree path through the aggregation relationship, thereby obtaining the corresponding aggregated data.

[0074] Specifically, each dimension level is created repeatedly and iteratively until each dimension and its dimension members have constructed corresponding nodes or virtual nodes, and the last node of each dimension level has recorded all the nodes of the next dimension level, that is, the last node of each dimension level has its corresponding mapping set (the mapping set of the last node of the last dimension level is empty because it has no corresponding next dimension level, and its last node is already a leaf node of the entire tree). At this time, an index tree containing all dimensions and dimension members of all dimensions in the dimension hierarchy relationship is constructed, that is, the target multidimensional search index tree model. The target multidimensional search index tree can be used to search for data corresponding to all dimension combinations of the corresponding page design of the front end, so that when the front end searches for multidimensional data, it no longer needs to search and compare data one by one from the multidimensional data set each time, and no longer needs to traverse the multidimensional query conditions one by one and compare dimension member values ​​one by one for retrieval, which greatly reduces the search time complexity of multidimensional data and is conducive to efficient and fast multidimensional data search.

[0075] The above-mentioned multidimensional data query method, device, computer equipment and storage medium create a virtual node reference list of the root node, and create a mapping set corresponding to the last node in the forward dimension hierarchy, and create the current dimension node corresponding to the current dimension hierarchy in the dimension hierarchy relationship in sequence. When the dimension corresponding to the current dimension node has at least two dimension members, the corresponding current dimension virtual node is created at the starting child node position of the current dimension node. When the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, the current dimension virtual node reference information corresponding to the current dimension virtual node is added to the virtual node reference list, and the current dimension member nodes of the dimension corresponding to the current dimension node are created in sequence starting from the backward position of the starting child node position. The corresponding current dimension node reference information is obtained and added to the mapping set corresponding to the last node in the forward dimension hierarchy, and the current dimension hierarchy is used as the forward dimension hierarchy, and the mapping set corresponding to the last node in the forward dimension hierarchy is returned until all dimension hierarchies in the dimension hierarchy relationship are created, thereby creating a target multidimensional search index tree model that can be used to query multidimensional data. Among them, the support of virtual node and mapping set technology provides a more efficient query direction for multidimensional data queries. The creation of virtual nodes helps to realize the aggregation and reuse of multidimensional hierarchical data, and improves the efficiency of multidimensional data aggregation calculation. The addition of mapping sets reduces the complexity of data search time and speeds up data queries. Therefore, the dual support of virtual nodes and mapping sets greatly improves the query efficiency of multidimensional data.

[0076] In one embodiment, after step S202, the following steps are included:

[0077] Step S300, when a subtree exists for the current dimension virtual node, create leaf node head pointers for the current dimension virtual node and the brother node corresponding to the current dimension virtual node respectively, point the leaf node head pointers for the current dimension virtual node and the brother node respectively to the initial leaf node of the corresponding subtree, use the initial leaf node as the current leaf node, and use the pointer corresponding to the initial leaf node as the current leaf node pointer.

[0078] Among them, the subtree is a tree composed of one of the nodes of the tree and all the nodes below it. The leaf node head pointer refers to the pointer of the current dimension virtual node and the sibling node corresponding to the current dimension virtual node pointing to the corresponding first leaf node. The initial leaf node refers to the leaf node at the top of the subtree. The current leaf node refers to the leaf node that the current pointer is about to point to. The pointer can be a next pointer; the next pointer represents the successor pointer, which always points to the next node of the current node. If the current node is the tail node, the next pointer is empty. The current leaf node pointer refers to the next pointer corresponding to the current leaf node.

[0079] Specifically, in order to more efficiently search for multi-dimensional data and aggregate the aggregated data corresponding to the multi-dimensional data, the head and tail pointers of the leaf nodes can be created in the subtrees corresponding to the first virtual node and its sibling nodes under each tree path, respectively, to achieve the head and tail pointing of the leaf node pointers in the subtrees corresponding to each first virtual node and sibling nodes. When the virtual node of the current dimension and its sibling nodes are created, it can be determined whether they are non-leaf nodes, that is, whether there are corresponding subtrees. When there are subtrees, their corresponding leaf node head pointers can be pointed to their corresponding first leaf node, that is, the initial leaf node, and then the initial leaf node is used as the current leaf node, and the leaf node pointer is used as the current leaf node pointer, which is the next pointer, used to point to the next leaf node. When the next leaf node appears subsequently, the current leaf node pointer corresponding to the current leaf node can be used to point to the next leaf node to achieve the head and tail pointing of the leaf node, so that each first virtual node and its sibling nodes can search for nodes through the leaf node pointer to obtain the data information recorded by the search node.

[0080] Step S302, point the current leaf node pointer to the backward leaf node of the current leaf node, use the backward leaf node as the current leaf node, use the pointer corresponding to the backward leaf node as the current leaf node pointer, and repeat the step of pointing the current leaf node pointer to the backward leaf node of the current leaf node until the current leaf node is the last leaf node of the subtree corresponding to the current dimension virtual node and the brother node.

[0081] Among them, the backward leaf node refers to the next leaf node of the current leaf node. The last leaf node refers to the last leaf node of the subtree.

[0082] Specifically, when the current dimension virtual node is the first leaf node on the corresponding tree path, for the leaf nodes in the subtree of the same current dimension virtual node or the sibling node of the current dimension virtual node, pointer pointing operations will be performed during the leaf node creation process until the entire tree containing all dimensions is constructed and the leaf nodes corresponding to the entire tree complete the pointer pointing on the corresponding subtree range, that is, when the current leaf node in the subtree corresponding to the current dimension virtual node is the last leaf node of the subtree of the current dimension virtual node, and the current leaf node in the subtree of the sibling node of the current dimension virtual node is the last leaf node of the subtree of the sibling node of the same level, the same-direction sequential pointing of the leaf nodes is realized, and when searching for the corresponding leaf node, the leaf node search can be started from the leaf node head pointer of the virtual node or its sibling node.

[0083] Step S304: Create leaf node tail pointers for the virtual node and the brother node of the current dimension respectively, and point the leaf node tail pointers to the last leaf node of the corresponding subtree.

[0084] Among them, the leaf node tail pointer refers to the pointer of the current dimension virtual node and the corresponding brother node pointing to the last leaf node.

[0085] Specifically, when the leaf nodes point to the last leaf node of the corresponding subtree through the next pointer, the current dimension virtual node and its sibling nodes will then point the leaf node tail pointer to the last leaf node, thereby realizing the recording of the head and tail pointers of the leaf nodes of the subtree by the current dimension virtual node and its sibling nodes, providing more search concept design possibilities for searching multidimensional data in the index tree.

[0086] In this embodiment, by creating pointers pointing to the leaf nodes in the corresponding subtrees for the first virtual node and its sibling nodes under the tree path, pointer reference records of the head and tail pointers of the leaf nodes in the subtrees corresponding to the first virtual node and its sibling nodes under the tree path are realized, which provides more possibilities for search path concepts when searching multidimensional data. In addition, it provides a more efficient search concept for performing aggregation calculations on multidimensional data to obtain aggregated data corresponding to multiple dimensions, which is conducive to realizing the reuse of multidimensional aggregated data, improving the efficiency of aggregation calculations, and greatly improving the query efficiency of multidimensional data.

[0087] In one embodiment, the root node will record the head and tail pointers of the leaf nodes of the entire tree, that is, the head pointer of the root node will point to the first leaf node of the entire tree, and then the leaf nodes will use the next pointer to realize the pointer pointing between the leaf nodes. When the next pointer points to the last leaf node of the entire tree, the leaf node tail pointer of the root node will point to the last leaf node. When a multi-dimensional query requires the data information corresponding to the leaf nodes of the entire tree, the query can be performed leaf by leaf node starting from the leaf node head pointer of the root node, thereby obtaining the combined data information of all dimensions.

[0088] In one embodiment, after step S202, the method further includes:

[0089] Step S400, create a sibling node pointer of the current dimension virtual node, use the initial sibling node of the current dimension virtual node as the current sibling node, point the sibling node pointer to the current sibling node, and use the pointer of the current sibling node as the current sibling node pointer.

[0090] A sibling node is a node at the same dimension level and tree level, meaning it has a common parent node. A sibling node pointer is a pointer to a sibling node, which can be a next pointer. A current sibling node is the sibling node currently pointed to by the sibling node pointer. The current sibling node pointer is the next pointer corresponding to the current sibling node.

[0091] Specifically, in order to obtain multi-dimensional aggregated data to realize the calculation of aggregated data, when the current dimension virtual node is the first virtual node under the corresponding tree path, the sibling node pointer of the current dimension virtual node can be pointed to the current dimension member node that belongs to the sibling node of the same level. When it is necessary to perform aggregate calculation of a certain dimension, the current dimension virtual node can find the sibling node of the dimension member to be found based on the pointer pointing relationship between the sibling node and the sibling node of the same level, and then find the data to be aggregated based on the pointing relationship between the sibling node and the leaf node pointer in the corresponding subtree. In order to realize the recording of the pointer between the current dimension virtual node and its sibling node of the same level, the sibling node pointed to by the sibling node pointer of the current dimension virtual node can be used as the current sibling node, and the pointer of the current sibling node can be used as the current sibling node pointer, so as to realize the one-way sequential pointer pointing between the current dimension virtual node and its sibling node of the same level, wherein the above pointers are all next pointers for pointing to the next node.

[0092] Step S402 : Point the current sibling node pointer to the backward sibling node of the current sibling node, use the backward sibling node as the current sibling node, and use the pointer corresponding to the backward sibling node as the current sibling node pointer.

[0093] The backward sibling node refers to the sibling node at the next position corresponding to the position of the current sibling node.

[0094] Specifically, to realize the pointer pointing of the current dimension virtual node and its sibling nodes, the current sibling node pointer can be pointed to the next sibling node, that is, the backward sibling node. If you want to realize the one-way sequential pointer pointing between sibling nodes, you can continue to use the backward sibling node pointed to by the current sibling node pointer as the current sibling node, and use the pointer corresponding to the backward sibling node as the current sibling node pointer, so as to realize the pointer pointing of the current dimension virtual node and the corresponding sibling nodes. The pointers here can all be next pointers used to point to the next node.

[0095] Step S404, repeating the step of pointing the current sibling node pointer to the backward sibling node of the current sibling node until the current sibling node is the last sibling node of the virtual node of the current dimension.

[0096] The last sibling node refers to the last sibling node corresponding to the virtual node of the current dimension.

[0097] Specifically, to realize the one-way sequential pointer pointing between the virtual node of the current dimension and the sibling nodes of the same level, continuous pointing of the next pointer is required between the sibling nodes of the same level. The next pointer pointing between the virtual node of the current dimension and the sibling nodes provides a faster and more efficient search path for searching multi-dimensional data and aggregating data in multiple dimensions, so that it is no longer necessary to compare and search the dimensions to be queried layer by layer and then combine the corresponding data information as in the existing technology. The aggregation of multi-dimensional data cannot be realized in the existing technology. The addition of virtual nodes and the creation of pointer pointing between virtual nodes and sibling nodes of the same level provide technical support for the aggregation and reuse of multi-dimensional data.

[0098] In this embodiment, by creating a pointer pointing between the first virtual node under the tree path and its sibling nodes at the same level, the virtual node can search for other dimensional nodes in a faster and more efficient path through the reference of the pointer, which provides technical support for the aggregation of multi-dimensional data and the realization of data reuse. The synergistic effect of the multi-directional (sibling node pointing and leaf node pointing) pointer reference of the first virtual node under the tree path and its sibling nodes at the same level greatly improves the search efficiency of multi-dimensional data, making the search of multi-dimensional data faster and more efficient.

[0099] In one embodiment, after step S206, the method further includes:

[0100] Step S500, based on the virtual node reference list of the root node, obtain the current virtual node from the virtual node reference list in turn. When the current virtual node is a non-leaf node, determine the current aggregation node from the leaf nodes of the subtree corresponding to the current virtual node in turn, create an aggregation reference list corresponding to the current aggregation node, determine the related aggregation nodes of the current aggregation node, add the node reference information corresponding to the related aggregation nodes to the aggregation reference list, and obtain the aggregation relationship of each current aggregation node.

[0101] Among them, the current virtual node refers to the virtual node in the current traversal virtual node reference list, which is the first virtual node under the corresponding tree path. The aggregation node refers to the node used to aggregate the data information corresponding to the combination of different dimension members. The related aggregation nodes refer to other nodes involved in completing the aggregation of the aggregation node data, which include other aggregation nodes and non-aggregation nodes, such as Figure 4In the figure, Subject A under the virtual node Organization A (Organization A in bold) is an aggregation node, and its related aggregation items are Subject A under Organization A1 and Subject A under Organization A2. Node reference information refers to the reference information of a node, which includes but is not limited to the node ID information and the node index information. The aggregation relationship refers to the aggregation calculation relationship between the data of other dimension member nodes involved when calculating the aggregate data corresponding to the aggregation node, as well as the node reference information of the related aggregation nodes involved. In other words, it refers to the aggregation method and aggregation reference information between related aggregation nodes in the aggregation node, which can be recorded in the form of a reference list.

[0102] Specifically, the root node contains the reference information of the first virtual node corresponding to each tree path in the entire tree. When the entire tree is constructed, the virtual nodes in the virtual node reference list can be traversed in sequence. When the virtual node is a non-leaf node, the aggregation node must be determined from the leaf nodes of the subtree corresponding to the virtual node. If the dimension represented by the leaf node involves multiple dimension members, then the leaf node is an aggregation node, for example Figure 4 In the example, the subject B1 under the virtual node organization node A (bold font) has two dimension members, organization A1 and organization A2. Therefore, the meaning of subject B1 under the virtual node organization node A (bold font) involves subject B1 under organization A1 and subject B1 under organization A2. At this time, subject B1 under organization A1 and subject B1 under organization A2 are the related aggregation nodes of subject B1 under the virtual node organization node A (bold font). The aggregation relationship can be the sum of subject B1 under organization A1 and subject B1 under organization A2 to obtain subject B1 under the virtual node organization node A (bold font) and the reference information of these nodes, or it can be other calculation methods. At this time, the aggregation relationship can be recorded in the aggregation node, that is, the aggregation node contains the reference information of the related aggregation nodes and the aggregation method between the related aggregation nodes. In addition, this aggregation is nested, that is, when the leaf node of the subtree corresponding to the current virtual node is both an aggregation node and a virtual node, the relevant aggregation node of this virtual node may also be other aggregation nodes, and other aggregation nodes also have their own relevant aggregation nodes and relevant aggregation relationships, and these relevant aggregation nodes and aggregation relationships are also contained by this virtual node. In addition, when the current virtual node is a non-leaf node, after determining the aggregation node from the leaf nodes of its corresponding subtree, searching for the relevant aggregation node corresponding to the aggregation node requires involving the leaf node pointer of its subtree, the sibling node pointer of the same level, and the leaf node pointer of the subtree of the sibling node of the same level, and completing the path search when the aggregation relationship is constructed through the synergistic effect of these pointers.

[0103] Step S502: When the current virtual node is a leaf node, the current virtual node is used as an aggregation node, an aggregation reference list corresponding to the aggregation node is created, the related aggregation nodes of the aggregation node are determined, and the node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of the aggregation node.

[0104] Specifically, when the current virtual node is a leaf node, it means that the current virtual node is already in the last node of the last dimension level, and its related aggregation node is its sibling node at the same level. At this time, the aggregation method between the related aggregation nodes can be designed according to actual needs, and the aggregation relationship of the aggregation node can be established. The reference information of the related aggregation node and the aggregation method of the related aggregation node are recorded in the aggregation node. When performing aggregation calculation, the data information corresponding to the related aggregation node will be searched according to the information recorded by the aggregation node, and data aggregation corresponding to the aggregation method will be performed. In addition, when the virtual node for aggregation calculation is a leaf node, the pointer involved contains the pointer reference between the current virtual node and the sibling node at the same level, which is actually a pointer reference of the leaf node, because the virtual node and its sibling node at the same level are both leaf nodes.

[0105] In this embodiment, by traversing the first virtual node corresponding to each tree path in the virtual node reference list recorded by the root node in sequence, the aggregation relationship of each aggregation node is determined and constructed, and the recording of the aggregation relationship of the aggregation node is realized, which provides technical support for the ultimate realization of data aggregation and data reuse, so that the aggregation data corresponding to the multi-dimensional combination can be calculated according to these aggregation relationships, improving the efficiency of multi-dimensional data query, and realizing the recording of the aggregation data corresponding to the multi-dimensional aggregation, making the search dimension combination more diversified, thereby achieving the dual effects of improved query efficiency and data reuse.

[0106] In one embodiment, the method further comprises:

[0107] In step S600, the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, the sibling node pointed to by the sibling node pointer of the current virtual node is used as the current sibling node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is used as the current related aggregation node.

[0108] Step S602, add the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node, take the leaf node pointed to by the pointer corresponding to the current aggregation node as the current aggregation node, and take the leaf node pointed to by the pointer corresponding to the current related aggregation node as the current related aggregation node.

[0109] Step S604 , returning to the step of adding the node reference information corresponding to the current related aggregate node to the aggregate reference list corresponding to the current aggregate node, until a condition for stopping adding reference information is met.

[0110] Step S606, take the sibling node of the same level pointed to by the pointer corresponding to the current sibling node as the current sibling node, take the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node as the current aggregation node, return the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node as the current related aggregation node, until the current sibling node is the last sibling node of the current virtual node.

[0111] The current aggregate node refers to the aggregate node corresponding to the current traversal step. The current related aggregate node refers to one of the related aggregate nodes corresponding to the current aggregate node in the current traversal step. The reference information stop adding condition refers to the condition for completing the traversal of the related aggregate nodes in the current traversal step. It can be that the parent node of the leaf node pointed to by the pointer corresponding to the current related aggregate node is inconsistent with the parent node corresponding to the current related aggregate node, and the parent node of the leaf node pointed to by the pointer corresponding to the current aggregate node is inconsistent with the parent node corresponding to the current aggregate node.

[0112] Specifically, when the current virtual node has a corresponding subtree, all leaf nodes of the subtree corresponding to the current virtual node are aggregation nodes. In order to construct the aggregation relationship corresponding to each aggregation node, each aggregation node can be traversed in sequence according to the leaf node pointer corresponding to the current virtual node. At this time, the aggregation node under the current traversal step is used as the current aggregation node. In addition, for each current aggregation node, the construction of its aggregation relationship requires traversing the leaf nodes in the subtrees corresponding to each sibling node in sequence according to the sibling node pointer of the current virtual node, and the leaf nodes of the subtrees corresponding to these sibling nodes are the related aggregation nodes of the aggregation node corresponding to the current virtual node.

[0113] Further, for better explanation, according to Figure 4 The multidimensional search index tree is described as follows Figure 4As shown in , if the oval-box virtual node organization A is the current virtual node, then the leaf node subject A, virtual node subject B, subject B1 and subject B2 of the subtree corresponding to the oval box are all aggregation nodes. At this time, the subject A pointed to by the leaf node head pointer of the oval-box virtual node organization A is used as the current aggregation node. Then, according to the sibling node pointer of the oval-box virtual node organization A, the organization A1 is used as the current sibling node. Then, according to the subject A under the organization A1 pointed to by the leaf node head pointer of the current sibling node (organization A1), the node reference information of the current related aggregation node (subject A under organization A1) is added to the current aggregation node (subject A under the oval-box virtual node organization A). Then, the subject B under the oval-box virtual node organization A is used as the current aggregation node, and the subject B under organization A1 is used as the current related aggregation node. In the same way, the node reference information of the current related aggregation node (subject B under organization A1) is added to the current aggregation node (subject A under the oval-box virtual node organization A). The information is added to the current aggregation node (subject B under the elliptical virtual node organization A), and so on, until the parent node corresponding to the leaf node pointed to by the pointer corresponding to the current aggregation node and the current related aggregation node is inconsistent with the parent node corresponding to the current aggregation node and the current related aggregation node, that is, the next leaf node corresponding to subject B2 under the elliptical organization virtual node organization A is subject A under organization A1, and the parent node of subject A under organization A1 is organization A1, and the parent node of subject B2 under the elliptical organization virtual node organization A is the elliptical organization virtual node organization A. The current related aggregation node is analyzed in the same way. What is constructed at this time is a record of the aggregation reference information between the elliptical virtual node organization A and the related aggregation nodes in one of its corresponding brother nodes. The same is true for other brother nodes until all brother nodes have been traversed, and the construction of the aggregation relationship corresponding to all aggregation nodes corresponding to the subtree of the elliptical virtual node organization A is completed. At this time, traverse the next virtual node in the virtual node reference list, that is, subject B under the elliptical virtual node organization A1, and take subject B under the elliptical virtual node organization A1 as the current virtual node. Similarly, repeat this process until the first virtual node under each tree path in the virtual node reference list has been traversed.

[0114] In this embodiment, by traversing the first virtual node under each tree path in the virtual node reference list, the aggregation relationship of each aggregation node is constructed with the help of the leaf node pointer corresponding to the first virtual node under each tree path, the corresponding sibling node pointer and the leaf node pointer of the corresponding sibling node. The coordination of the leaf node pointer, the sibling node pointer and the leaf node pointer corresponding to the sibling node pointer of the first virtual node under each tree path makes the aggregation relationship corresponding to the constructed aggregation node accurate and efficient, avoids the erroneous aggregation of different nodes, and is the basis for realizing multi-dimensional data aggregation and aggregation data reuse.

[0115] In one embodiment, the method further comprises:

[0116] In step S700, the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, the sibling node pointed to by the sibling node pointer of the current virtual node is used as the current sibling node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is used as the current related aggregation node.

[0117] Step S702, returning to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node, until the parent node corresponding to the leaf node pointed to by the pointer corresponding to the current related aggregation node is inconsistent with the parent node corresponding to the current related aggregation node.

[0118] Specifically, when the current virtual node is a leaf node, the current virtual node is an aggregation node, which also means that its corresponding sibling node is its corresponding related aggregation node, and also means that the sibling node corresponding to the current virtual node is also a leaf node. At this time, the node reference information of the sibling node as the related aggregation node can be added to the current virtual node as the aggregation node in sequence according to the leaf node pointer between the current virtual node and the sibling node, thereby completing the construction of the aggregation relationship corresponding to the current virtual node as a leaf node.

[0119] Step S704: The sibling node pointed to by the sibling node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the sibling node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node.

[0120] Step S706 , returning to the step of adding the node reference information corresponding to the current related aggregate node to the aggregate reference list corresponding to the aggregate node, until the current related aggregate node is the last sibling node of the aggregate node.

[0121] Specifically, since the first virtual node under each tree path in the virtual node reference list is established with a pointer pointing relationship with its sibling node, the node reference information of the sibling node as the current related aggregation node can be added to the current virtual node in sequence according to the pointer pointing of the sibling node, thereby completing the construction of the aggregation relationship corresponding to the current virtual node as the aggregation node through the pointing of the sibling node pointer.

[0122] In this embodiment, when the current virtual node is a leaf node, it is determined that the current virtual node is an aggregation node and the sibling node corresponding to the current virtual node is a related aggregation node. At this time, since the aggregation node and the related aggregation node are both leaf nodes and sibling nodes, the node reference information of the related aggregation node can be added to the aggregation node in sequence according to the sibling pointer pointing relationship between the aggregation node and the related aggregation node, or the node reference information of the related aggregation node can be added to the aggregation node in sequence according to the leaf node pointing relationship between the aggregation node and the related aggregation node, thereby realizing the construction of the aggregation relationship corresponding to the current virtual node as the aggregation node. This also ensures the accuracy of the aggregation relationship constructed by the aggregation node to a large extent, and only the first virtual node under each tree path needs to be traversed, which improves the efficiency of the aggregation relationship construction to a certain extent and lays a theoretical foundation for the aggregation calculation of multidimensional data.

[0123] In one embodiment, the method further comprises:

[0124] Step S800: Acquire a multidimensional data set, and acquire the existence status of each dimension member in each multidimensional data from the multidimensional data set.

[0125] Among them, a multidimensional dataset refers to a collection of measures and dimensions. The measures are factual data, and the dimensions can cover many aspects, such as time, products, and customers.

[0126] Specifically, a corresponding dimension combination has been designed when the front-end page is designed. Multidimensional data containing the dimensions in the dimension combination can be obtained in the multidimensional library according to the dimension combination of the front-end page to obtain a multidimensional data set corresponding to the dimension combination of the front-end page. Not every multidimensional data may contain data of a certain dimension member, so all dimension member IDs in the multidimensional data set can be traversed first to find out whether each dimension member exists in each multidimensional data, so that the code can be set according to the existence status of each dimension member in each multidimensional data.

[0127] Step S802: based on the existence status of the dimension members in each multidimensional data, set the data codes corresponding to the dimension members, and build the index mapping relationship of the dimension members based on the dimension member identifiers and data codes corresponding to the dimension members.

[0128] The dimension member identifier refers to the dimension member ID, which can be used to identify the dimension member. The data encoding refers to the data encoded using data encoding and can be used as an index for data search. It can be data encoded using 1s and 0s. The index mapping relationship refers to the correspondence between dimension member identifiers and data encodings. This relationship can be recorded in a key-value format, where the key is the dimension member identifier and the value is the data encoding.

[0129] Specifically, each piece of multidimensional data in a multidimensional data set has its corresponding data subscript. The subscript of the data code corresponding to the dimension member can be used as the subscript corresponding to the multidimensional data. When a dimension member exists in a certain multidimensional data, the data at the position of the subscript corresponding to the multidimensional data of the dimension member is set to 0, otherwise it is set to 1. When it is necessary to find a certain dimension member, the multidimensional data set can be searched according to the data code, that is, the multidimensional data where the dimension member exists in the multidimensional data set can be located according to the subscript 1 in the data code.

[0130] Step S804: Based on the dimension member index mapping relationship, a target inverted index model is constructed. The inverted index model is used to obtain the query dimension combination. Based on the dimension member identifier corresponding to each dimension member in the query dimension combination, the data encoding corresponding to each dimension member is determined. The data encoding corresponding to each dimension member is ANDed and operated to obtain the result encoding. Based on the result encoding, the data corresponding to the query dimension combination is obtained from the multidimensional data set.

[0131] Among them, the target inverted index model refers to a model used for data corresponding to multiple dimensions, where the multiple dimensions can include all dimensions in the multidimensional dataset (i.e., complete dimensions), or they can include some dimensions in the multidimensional dataset. For example, the complete dimension includes organization, subject, and period. At this time, if you only want to find data containing the organization and period dimensions, you can use the target inverted index model to find the multidimensional data with these two dimensions according to the data encoding corresponding to the organization and period. The query dimension combination refers to the dimensions involved in the query dimension. The AND operation refers to the AND operation in the logical operation, such as 1&0=0, 1&1=1, 0&0=0, etc. The result code refers to the data code obtained after the AND operation.

[0132] Specifically, the query dimension combination contains the dimension members that it wants to find. Each dimension member has its corresponding dimension member identifier, and each dimension member identifier has its corresponding data code. These data codes record in which multidimensional data it exists. If you want to query the data that exists in all dimensions involved in the dimension combination, you can perform an AND operation on the data codes corresponding to each dimension member in the query dimension combination. If the dimension members involved in the query dimension combination exist in all multidimensional data, the result code and the data at the subscript position corresponding to the subscript of the multidimensional data will be calculated as 1. At this time, the corresponding multidimensional data in the multidimensional data set can be located according to the subscript position of the result code being 1 to obtain the data corresponding to the query dimension combination. The specific query process can be as follows. Figure 5 As shown, Figure 5 The member ID is the dimension member identifier, BitSet is the data encoding, Figure 5 It can be seen that the data codes corresponding to dimension members A3, B1, C1 and D2 are ANDed ( Figure 5After the AND operation in the data code, the value corresponding to subscript 5 in the obtained data code is 1, so the data that satisfies the multidimensional data A3B1C1 D2 is the data strip with subscript 5. If other subscripts in the data code obtained by the AND operation are also 1, it means that there are multiple data strips that meet the corresponding multidimensional data.

[0133] In this embodiment, a multidimensional data set is traversed to obtain the existence status of each dimension member in the multidimensional data set in each multidimensional data, and a corresponding data code is set according to the existence status of each dimension member, and a corresponding index mapping relationship is constructed according to the dimension member identifier and the data code, so as to construct a method for obtaining the query dimension combination according to the index mapping relationship, and based on the dimension member identifier corresponding to each dimension member in the query dimension combination, the data code corresponding to each dimension member is determined, and the data code corresponding to each dimension member is ANDed to obtain the result code, and the target inverted index model of the data corresponding to the query dimension combination is obtained from the multidimensional data set based on the result code, thereby realizing efficient search of multidimensional data with a non-specified number of dimensions. It is no longer necessary to traverse all the data in the multidimensional data set each time, but by recording the data code of the data of the dimension member in which the subscript multidimensional data exists, the storage location to be searched is found in a targeted manner, thereby reducing the time complexity of data search and improving the efficiency of multidimensional data search to a certain extent.

[0134] In one embodiment, the method further comprises:

[0135] Step S900: mount the data in the target multidimensional dataset to the corresponding node in the target multidimensional search index tree model to obtain the mounted multidimensional search index tree model, obtain the data query request, and determine the target query scenario based on the data query request.

[0136] Among them, the target multidimensional dataset refers to the multidimensional dataset corresponding to the data search, and is the multidimensional dataset to be searched on the front-end page in the application scenario. The mounted multidimensional search index tree model refers to the index tree that has recorded the corresponding data values ​​in the corresponding aggregation node and all leaf nodes. The data query request refers to the multidimensional data query request initiated by the front-end. The target query scenario refers to the application scenario corresponding to the data query request, which can be a scenario suitable for applying the target multidimensional search index tree model, such as financial planning, master-subtable aggregation, statistical analysis, summary reporting, etc., or it can be a scenario suitable for applying the target inverted index model, such as: auxiliary column query, coarse-grained aggregation, etc.

[0137] Specifically, in actual application scenarios, the data in the target multidimensional dataset corresponding to the dimensions involved in the front-end page will be mounted to the target multidimensional search index tree model to obtain a mounted multidimensional search index tree model with the mounted data. When a data query request is received, the corresponding target query scenario is determined based on the request, so that a model more suitable for the target query scenario can be used to search the multidimensional data.

[0138] Step S902: When the target query scenario is the first query scenario, based on the dimension order corresponding to the mounted multidimensional search index tree model, obtain the target dimension member combination corresponding to the data query request, and based on the mounted multidimensional search index tree model, perform a level-by-level search on the target dimension member combination to obtain the target data corresponding to the target dimension member combination.

[0139] The first query scenario refers to a query scenario that requires all dimensions in the dimension combination preset on the front-end page. This can be used for scenarios such as capital planning, master-sub-table aggregation, statistical analysis, and summary reporting. The target dimension member combination refers to the dimensions involved in the data to be queried in the data query request. In the first query scenario, this dimension combination can be sorted according to the dimension order in the dimension hierarchy of the mounted multidimensional search index tree model. The target data refers to the data to be queried in the data query request.

[0140] Specifically, the mounted multidimensional search index tree model has been constructed according to a certain dimension hierarchical relationship. If the order of dimensions involved in the search in the data query request is not combined in this order, the corresponding order can be sorted first to enable the target dimension member combination to be searched level by level based on the mounted multidimensional search index tree model.

[0141] Step S904, when the target query scenario is the second query scenario, obtain the target dimension member combination corresponding to the data query request, and obtain the target data corresponding to the target dimension member combination from the target multidimensional dataset based on the target inverted index model.

[0142] Among them, the second query scenario refers to a query scenario for querying some dimensions in the dimension combination preset on the front-end page, which can be scenarios such as auxiliary column query and coarse-grained aggregation.

[0143] Specifically, when the dimension to be queried does not involve all the dimensions preset on the front-end page, the data query process can be accelerated through efficient inverted index bit operations based on the target inverted index model. This query method makes up for the shortcoming that the multi-dimensional search index tree model cannot realize partial dimension data search, so that data with more diverse dimension combinations can be searched.

[0144] In this embodiment, by applying different query methods in different query scenarios, the dimension combination of query data is made more diversified. The synergistic effect of different query methods in different scenarios makes the search of multidimensional data more efficient and faster, greatly improving the search efficiency of multidimensional data.

[0145] In one embodiment, step S902 includes:

[0146] Step S1000: Using the initial dimension member identifier in the target dimension member combination as the current dimension member identifier.

[0147] Step S1002: Based on the mounted multidimensional search index tree model, the root node of the mounted multidimensional search index tree model is used as the current search node, the current dimension member identifier is searched from the mapping set corresponding to the current search node, the dimension member node in the mapping set that is consistent with the current dimension member identifier is used as the current search node, and the backward dimension member identifier of the current dimension member identifier is used as the current dimension member identifier.

[0148] Specifically, the mapping set of the last-level node of each dimension level contains reference information of all members of the next dimension level. All nodes in the mapping set are at the same level. When searching for the current dimension member identifier, it is no longer necessary to search the nodes layer by layer as in the tree structure in the prior art. Instead, the current dimension member identifier is directly compared with the dimension member identifier in the mapping set to more quickly determine the nodes with the same dimension identifier in the multidimensional search index tree, and then the mapping set of the located dimension member node is searched for the next dimension member identifier until the last-level node corresponding to the last dimension level is found.

[0149] Step S1004 , repeating the step of searching for the current dimension member identifier from the mapping set corresponding to the current search node, until the last dimension member of the target dimension member combination is queried, and the target data corresponding to the target dimension member combination is obtained.

[0150] Specifically, since the dimension levels involved in the target dimension member combination are consistent with the multidimensional search index tree model, the search can be performed step by step during the search process, and the mapping set corresponding to the last node of each dimension level contains reference information of the next dimension member. The search can be performed layer by layer in the order of the index until the last dimension member of the last dimension level is found. The corresponding data value is recorded on the node corresponding to the last dimension member.

[0151] In this embodiment, by applying the mapping set of each dimensional level in the multidimensional search index tree model, the node position consistent with the identifier corresponding to each dimensional member in the target dimensional member combination is found more quickly until the corresponding last-level node is found and the corresponding target data is obtained. The characteristics of the equal-level relationship of each dimensional member in the mapping set are better applied, thereby improving the search efficiency of multidimensional data in the index tree.

[0152] In one embodiment, Figure 3 As shown, Figure 3 For the structural relationship diagram involved in the multidimensional data search process (which is also the index model component relationship diagram), the front-end page will pre-design the corresponding page style, and know the dimension combination corresponding to the page. At this time, the multidimensional data set containing various dimensions in the dimension combination can be queried in the multidimensional library according to the corresponding dimension combination, and then the corresponding inverted index model and multidimensional search index tree model are constructed according to the corresponding dimensions and dimension members in the multidimensional data set. When the front-end needs to render the data on the web page, it can be queried on the appropriate model according to the dimension member combination corresponding to the query data. If the dimensions involved in the queried data include all dimensions in the dimension search index tree, the data can be searched according to the dimension search index tree; if the dimensions involved in the queried data only include some dimensions in the dimension search index tree, the inverted index bit operation search can be performed according to the inverted index model. Compared with traditional multidimensional data search technology, the inverted index model and the dimension search index model are better in search efficiency than traditional multidimensional data search technology, and can be used as follows. Figure 6 The table shown shows intuitively that Figure 6 This table shows comparative data from a model test based on multidimensional funding plan data. By leveraging two models with high query efficiency, data search is possible in various business scenarios, significantly improving data query efficiency in multidimensional data query scenarios.

[0153] In one embodiment, Figure 4 As shown, Figure 4 Index tree model for multidimensional lookups in an instance. Figure 4 In the figure, Root is the root node; the nodes in bold font are virtual nodes; the nodes in bold boxes (including rectangular boxes and oval boxes) are aggregation nodes; the nodes in oval boxes are the first virtual nodes corresponding to each tree path; leafHead is the leaf node head pointer; leafTail is the leaf node tail pointer; next is the next pointer used to point to the next node; ref is the pointer that records the virtual node and the previous tree level; Map refers to the mapping set, which is actually a Map set. The nodes in the dotted box it points to are the nodes contained in the mapping set; Figure 4The arrows that are not marked with relevant prompts are all next pointers. The multidimensional search index tree model can be used to search for data information under different dimensional combinations of organizations and subjects. In addition, data information that is not directly recorded in the multidimensional dataset can also be searched, such as Figure 4 In the example, there is a subject B that is both a virtual node and an aggregation node. The dimension combination corresponding to subject B is organization A and subject B. At this time, we can start from the root node and find the mapping set of the root node. Through the mapping set of the root node, we can find the virtual node organization A (although there is a real node organization A, the actual mapping set records the virtual node organization A, and the virtual node records a lot of information of the dimension with the same name). Then, through the mapping set of the virtual node organization A, we can directly find the virtual node subject B. At this time, subject B records its aggregation relationship, that is, the related aggregation items of subject B are subject B of organization A1 and For example, if it is Organization A2's Subject B, then the virtual node Organization A points to Organization A1 through its sibling node pointer. Organization A1 finds the Subject B corresponding to Organization A1 according to its leaf node pointer and obtains the data of Organization A1's Subject B. Similarly, Organization A1's sibling node pointer (next pointer) continues to find Organization A2 and finds the data of Organization A2's Subject B according to Organization A2's leaf node pointer. Thus, the data information of Subject B in the virtual node Organization A can be obtained according to the relevant aggregation calculation. Organization A's Subject B aggregates all the dimension member data of these two dimensions. The leaf nodes of the index tree can be used to record data. Therefore, when the data corresponding to a non-aggregate node or aggregate node is needed again, it can be directly searched in the index tree that can be efficiently queried without having to perform another calculation or search one by one in the multidimensional data set. This greatly improves the search of multidimensional data in multiple scenarios and is applicable to multiple scenarios such as multidimensional data conversion and data aggregation. It greatly improves the calculation efficiency and query efficiency in the multidimensional query process in multiple scenarios of multidimensional data query.

[0154] Based on the same inventive concept, embodiments of the present application also provide a multidimensional data query device for implementing the multidimensional data query method described above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the multidimensional data query device provided below can be found in the above-mentioned limitations on the multidimensional data query method and will not be repeated here.

[0155] In one embodiment, Figure 7 As shown, a multidimensional data query device is provided, comprising: an initial creation module 700, a virtual node creation module 702, a node creation module 704 and a model generation module 706, wherein:

[0156] The initial creation module 700 is used to create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level.

[0157] The virtual node creation module 702 is used to create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node whose last-level node is in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node; when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list.

[0158] The node creation module 704 is used to create the current dimension member nodes of the dimension corresponding to the current dimension node in sequence starting from the backward position of the starting child node position, obtain the current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy.

[0159] The model generation module 706 is used to repeat the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created, thereby obtaining the target multidimensional search index tree model.

[0160] In one embodiment, the multidimensional data query device also includes a pointer creation module 708, which is used to create leaf node head pointers for the current dimension virtual node and the brother node corresponding to the current dimension virtual node when a subtree exists for the current dimension virtual node, and point the leaf node head pointers corresponding to the current dimension virtual node and the brother node to the initial leaf node of the corresponding subtree, use the initial leaf node as the current leaf node, and use the pointer corresponding to the initial leaf node as the current leaf node pointer; point the current leaf node pointer to the backward leaf node of the current leaf node, use the backward leaf node as the current leaf node, and use the pointer corresponding to the backward leaf node as the current leaf node pointer, repeat the step of pointing the current leaf node pointer to the backward leaf node of the current leaf node until the current leaf node is the last leaf node of the subtree corresponding to the current dimension virtual node and the brother node; create leaf node tail pointers for the current dimension virtual node and the brother node, and point the leaf node tail pointer to the last leaf node of the corresponding subtree.

[0161] The pointer creation module 708 is also used to create a sibling node pointer of the current dimension virtual node, use the initial sibling node of the current dimension virtual node as the current sibling node, point the sibling node pointer to the current sibling node, and use the pointer of the current sibling node as the current sibling node pointer; point the current sibling node pointer to the backward sibling node of the current sibling node, use the backward sibling node as the current sibling node, and use the pointer corresponding to the backward sibling node as the current sibling node pointer; repeat the step of pointing the current sibling node pointer to the backward sibling node of the current sibling node until the current sibling node is the last sibling node of the current dimension virtual node.

[0162] In one embodiment, the multidimensional data query device also includes an aggregation module 710, which is used to obtain the current virtual node from the virtual node reference list based on the virtual node reference list of the root node in sequence. When the current virtual node is a non-leaf node, the current aggregation node is determined in sequence from the leaf nodes of the subtree corresponding to the current virtual node, an aggregation reference list corresponding to the current aggregation node is created, the related aggregation nodes of the current aggregation node are determined, and the node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of each current aggregation node; when the current virtual node is a leaf node, the current virtual node is used as the aggregation node, an aggregation reference list corresponding to the aggregation node is created, the related aggregation nodes of the aggregation node are determined, and the node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of the aggregation node.

[0163] In one embodiment, the aggregation module 710 is also used to use the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node as the current aggregation node, the sibling node pointed to by the sibling node pointer of the current virtual node as the current sibling node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node as the current related aggregation node; add the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node, use the leaf node pointed to by the pointer corresponding to the current aggregation node as the current aggregation node, and use the leaf node pointed to by the pointer corresponding to the current related aggregation node as the current related aggregation node; return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node until the condition for stopping adding reference information is met; use the sibling node pointed to by the pointer corresponding to the current sibling node as the current sibling node, use the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node as the current aggregation node, and return the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node as the current related aggregation node, until the current sibling node is the last sibling node of the current virtual node.

[0164] In one embodiment, the aggregation module 710 is further configured to use the leaf node pointed to by the leaf node pointer corresponding to the aggregation node as the current relevant aggregation node, add the node reference information corresponding to the current relevant aggregation node to the aggregation reference list corresponding to the aggregation node, and use the leaf node pointed to by the pointer corresponding to the current relevant aggregation node as the current relevant aggregation node; and return to the step of adding the node reference information corresponding to the current relevant aggregation node to the aggregation reference list corresponding to the aggregation node until the parent node corresponding to the leaf node pointed to by the pointer corresponding to the current relevant aggregation node is inconsistent with the parent node corresponding to the current relevant aggregation node.

[0165] or,

[0166] The sibling node pointed to by the sibling node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the sibling node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node; return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node until the current related aggregation node is the last sibling node of the aggregation node.

[0167] In one embodiment, the multidimensional data query device also includes an inverted index creation module 712, which is used to obtain a multidimensional data set, obtain the existence status of each dimension member in each multidimensional data from the multidimensional data set; based on the existence status of the dimension member in each multidimensional data, set the data code corresponding to the dimension member, and based on the dimension member identifier and data code corresponding to the dimension member, construct an index mapping relationship of the dimension member; based on the dimension member index mapping relationship, construct a target inverted index model, the inverted index model is used to obtain a query dimension combination, determine the data code corresponding to each dimension member based on the dimension member identifier corresponding to each dimension member in the query dimension combination, perform an AND operation on the data code corresponding to each dimension member to obtain a result code, and obtain data corresponding to the query dimension combination from the multidimensional data set based on the result code.

[0168] In one embodiment, the multidimensional data query device also includes a model application module 714, which is used to mount the data in the target multidimensional data set to the corresponding node in the target multidimensional search index tree model, obtain the mounted multidimensional search index tree model, obtain the data query request, and determine the target query scenario based on the data query request; when the target query scenario is the first query scenario, based on the dimension order corresponding to the mounted multidimensional search index tree model, obtain the target dimension member combination corresponding to the data query request, based on the mounted multidimensional search index tree model, perform a level-by-level search on the target dimension member combination to obtain the target data corresponding to the target dimension member combination; when the target query scenario is the second query scenario, obtain the target dimension member combination corresponding to the data query request, and based on the target inverted index model, obtain the target data corresponding to the target dimension member combination from the target multidimensional data set.

[0169] In one embodiment, the model application module 714 is also used to use the initial dimension member identifier in the target dimension member combination as the current dimension member identifier; based on the mounted multidimensional search index tree model, use the root node of the mounted multidimensional search index tree model as the current search node, search for the current dimension member identifier from the mapping set corresponding to the current search node, use the dimension member node consistent with the current dimension member identifier in the mapping set as the current search node, and use the backward dimension member identifier of the current dimension member identifier as the current dimension member identifier; repeat the step of searching for the current dimension member identifier from the mapping set corresponding to the current search node until the last-level dimension member of the target dimension member combination is queried, and the target data corresponding to the target dimension member combination is obtained.

[0170] Each module in the multidimensional data query device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0171] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store multidimensional data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multidimensional data query method is implemented.

[0172] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a multidimensional data query method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0173] Those skilled in the art will understand that Figure 8 and 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0174] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0175] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0176] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of each of the above-described method embodiments.

[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0178] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0179] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0180] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A multidimensional data query method, characterized in that: The method comprises: Create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level; Create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node for the last-level node in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node; when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list; Starting from the backward position of the starting child node position, create the current dimension member nodes of the dimension corresponding to the current dimension node in sequence, obtain the current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy; Repeat the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created, thereby obtaining a target multidimensional search index tree model for querying multidimensional data.

2. The method according to claim 1, characterized in that After the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, the method further includes: When the current dimension virtual node has a subtree, create leaf node head pointers for the current dimension virtual node and the brother node corresponding to the current dimension virtual node respectively, point the leaf node head pointers for the current dimension virtual node and the brother node respectively to the initial leaf node of the corresponding subtree, use the initial leaf node as the current leaf node, and use the pointer corresponding to the initial leaf node as the current leaf node pointer; Point the current leaf node pointer to the backward leaf node of the current leaf node, use the backward leaf node as the current leaf node, use the pointer corresponding to the backward leaf node as the current leaf node pointer, and repeat the step of pointing the current leaf node pointer to the backward leaf node of the current leaf node until the current leaf node is the last leaf node of the subtree corresponding to the current dimension virtual node and the brother node; Create leaf node tail pointers for the virtual node and brother node of the current dimension respectively, and point the leaf node tail pointer to the last leaf node of the corresponding subtree.

3. The method according to any one of claims 1 or 2, characterized in that The method further comprises: Create a sibling node pointer of the current dimension virtual node, use the initial sibling node of the current dimension virtual node as the current sibling node, point the sibling node pointer to the current sibling node, and use the pointer of the current sibling node as the current sibling node pointer; Set the current sibling node pointer to the backward sibling node of the current sibling node, use the backward sibling node as the current sibling node, and use the pointer corresponding to the backward sibling node as the current sibling node pointer; Repeat the step of pointing the current sibling node pointer to the backward sibling node of the current sibling node until the current sibling node is the last sibling node of the virtual node of the current dimension.

4. The method according to any one of claims 1 or 3, characterized in that The step of repeatedly creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created further includes: Based on the virtual node reference list of the root node, the current virtual node is obtained from the virtual node reference list in sequence. When the current virtual node is a non-leaf node, the current aggregation node is determined in sequence from the leaf nodes of the subtree corresponding to the current virtual node, an aggregation reference list corresponding to the current aggregation node is created, related aggregation nodes of the current aggregation node are determined, and node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of each current aggregation node; When the current virtual node is a leaf node, the current virtual node is used as an aggregation node, an aggregation reference list corresponding to the aggregation node is created, the related aggregation nodes of the aggregation node are determined, and the node reference information corresponding to the related aggregation nodes is added to the aggregation reference list to obtain the aggregation relationship of the aggregation node.

5. The method according to claim 4, characterized in that The method further comprises: The leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, the sibling node pointed to by the sibling node pointer of the current virtual node is used as the current sibling node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is used as the current related aggregation node; Add the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node, set the leaf node pointed to by the pointer corresponding to the current aggregation node as the current aggregation node, and set the leaf node pointed to by the pointer corresponding to the current related aggregation node as the current related aggregation node; Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the current aggregation node until the reference information stopping adding condition is met; The sibling node of the same level pointed to by the pointer corresponding to the current sibling node is used as the current sibling node, the leaf node pointed to by the leaf node head pointer corresponding to the current virtual node is used as the current aggregation node, and the leaf node pointed to by the leaf node head pointer corresponding to the current sibling node is returned as the current related aggregation node until the current sibling node is the last sibling node of the current virtual node.

6. The method according to claim 4, characterized in that The method further comprises: The leaf node pointed to by the leaf node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the leaf node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node; Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node, until the parent node corresponding to the leaf node pointed to by the pointer corresponding to the current related aggregation node is inconsistent with the parent node corresponding to the current related aggregation node; or, The sibling node pointed to by the sibling node pointer corresponding to the aggregation node is used as the current related aggregation node, the node reference information corresponding to the current related aggregation node is added to the aggregation reference list corresponding to the aggregation node, and the sibling node pointed to by the pointer corresponding to the current related aggregation node is used as the current related aggregation node; Return to the step of adding the node reference information corresponding to the current related aggregation node to the aggregation reference list corresponding to the aggregation node, until the current related aggregation node is the last sibling node of the aggregation node.

7. The method according to claim 1, characterized in that The method further comprises: Acquire a multidimensional data set, and acquire the existence status of each dimension member in each multidimensional data from the multidimensional data set; Based on the existence status of dimension members in each multidimensional data, the data codes corresponding to the dimension members are set, and based on the dimension member identifiers and data codes corresponding to the dimension members, the index mapping relationship of the dimension members is constructed; Based on the dimension member index mapping relationship, a target inverted index model is constructed. The inverted index model is used to obtain the query dimension combination. Based on the dimension member identifier corresponding to each dimension member in the query dimension combination, the data encoding corresponding to each dimension member is determined, and the data encoding corresponding to each dimension member is operated to obtain the result encoding. Based on the result encoding, the data corresponding to the query dimension combination is obtained from the multidimensional data set.

8. The method according to claim 7, characterized in that The method further comprises: Mounting the data in the target multidimensional dataset to the corresponding node in the target multidimensional search index tree model to obtain the mounted multidimensional search index tree model, obtaining a data query request, and determining a target query scenario based on the data query request; When the target query scenario is the first query scenario, based on the dimension order corresponding to the mounted multidimensional search index tree model, the target dimension member combination corresponding to the data query request is obtained, and based on the mounted multidimensional search index tree model, the target dimension member combination is searched level by level to obtain the target data corresponding to the target dimension member combination; When the target query scenario is the second query scenario, the target dimension member combination corresponding to the data query request is obtained, and based on the target inverted index model, the target data corresponding to the target dimension member combination is obtained from the target multidimensional dataset.

9. The method according to claim 8, characterized in that The step of searching the target dimension member combination level by level based on the mounted multi-dimensional search index tree model to obtain target data corresponding to the target dimension member combination includes: Using the initial dimension member identifier in the target dimension member combination as the current dimension member identifier; Based on the mounted multidimensional search index tree model, taking the root node of the mounted multidimensional search index tree model as the current search node, searching for the current dimension member identifier from the mapping set corresponding to the current search node, taking the dimension member node consistent with the current dimension member identifier in the mapping set as the current search node, and taking the backward dimension member identifier of the current dimension member identifier as the current dimension member identifier; Repeat the step of searching for the current dimension member identifier from the mapping set corresponding to the current search node until the last-level dimension member of the target dimension member combination is queried, and obtain the target data corresponding to the target dimension member combination.

10. A multidimensional data query device, characterized in that: The device comprises: An initial creation module, configured to create a root node, create a virtual node reference list of the root node, and use the dimension level corresponding to the root node as the forward dimension level; A virtual node creation module is used to create a mapping set corresponding to the last-level node in the forward dimension hierarchy, select the current dimension hierarchy based on the dimension hierarchy relationship, create a current dimension node whose last-level node is in the current dimension hierarchy, and when the dimension corresponding to the current dimension node has at least two dimension members, create a corresponding current dimension virtual node at the starting child node position of the current dimension node; when the current dimension virtual node is the first virtual node on the tree path corresponding to the current dimension virtual node, add the current dimension virtual node reference information corresponding to the current dimension virtual node to the virtual node reference list; a node creation module, configured to, starting from the backward position of the starting child node position, sequentially create current dimension member nodes of the dimension corresponding to the current dimension node, obtain current dimension node reference information corresponding to the last-level node, add the current dimension node reference information to the mapping set corresponding to the last-level node in the forward dimension hierarchy, and use the current dimension hierarchy as the forward dimension hierarchy; A model generation module is used to repeat the steps of creating a mapping set corresponding to the last-level node in the forward dimension hierarchy and selecting the current dimension hierarchy based on the dimension hierarchy relationship until all dimension hierarchies in the dimension hierarchy relationship are created, thereby obtaining a target multidimensional search index tree model.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Lightweight terminal access control method supporting CP-ABE in 5G scene

    CN115604710A

  • Tree structure data rendering method and device based on VUE framework and medium

    CN115686509A