Data processing method and device, computing equipment and storage medium

By generating an array in a multidimensional database and compressing the location information, the problem of large data transmission volume in multidimensional forms is solved, resulting in faster data transmission and a better user experience.

CN120873006APending Publication Date: 2025-10-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410547898.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In existing technologies, the large amount of data transmitted in multidimensional databases results in a long time to display multidimensional forms on the client side, making it difficult to support the display of large amounts of data.

Method used

The database management system receives query requests from clients, determines the multiple dimension members associated with the multidimensional form, generates an array, compresses the position information, and transmits only the compressed information and the array to the client, reducing the amount of data transmission.

Benefits of technology

By compressing location information and generating arrays, the amount of data transmitted is reduced, the data transmission time is shortened, and the display speed of client forms and user experience are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873006A_ABST
    Figure CN120873006A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, computing equipment and a storage medium, and the method comprises the steps that a database management system receives a query request sent by a client, then determines a plurality of dimension members associated with a multi-dimensional form according to the query request, determines data and position information according to the plurality of dimension members, converts the data into an array, and sends the array to a server; and finally, a query result is transmitted to the client side, and the query result comprises the array and the compression information. Wherein the query request is used for indicating data query processing of a multi-dimensional form associated with the multi-dimensional database, the plurality of dimension members belong to a plurality of dimensions in the multi-dimensional database, and the data is a plurality of values corresponding to the plurality of dimension members in the multi-dimensional database; the position information is used for indicating the row and column positions of the plurality of values in the multi-dimensional form and the corresponding member of each value in the plurality of dimensional members. According to the method, the data transmission quantity and the transmission duration can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multi-dimensional data (MDD) technology, and in particular to a data processing method, apparatus, computing device and storage medium. Background Technology

[0002] A multidimensional database is a type of database used to process multidimensional data. It organizes and stores data in the form of multidimensional arrays (or multidimensional data cubes). Each dimension of the multidimensional array represents an observation of the data, and each dimension includes multiple dimension members (i.e., the values ​​that the dimension can take). Each element in the multidimensional array represents a measure. To facilitate user viewing or editing of data in a multidimensional database, the data is typically displayed to the user in the form of forms. However, to correctly construct and display these forms on the client side, the database management system first needs to send the form-related information from the multidimensional database to the client.

[0003] One current implementation involves the database management system determining all values ​​in the multidimensional form to be displayed within the multidimensional database, as well as the row and column coordinates of each value in the form and the corresponding dimension member. This information is then transmitted to the client along with each value, its row and column coordinates, and the correspondence between each value and its dimension member. However, this approach requires transmitting a large amount of data, resulting in lengthy data transmission times and making it unsuitable for multidimensional forms with a large number of values ​​to display on the client side. Summary of the Invention

[0004] This application provides a data processing method, apparatus, computing device, and storage medium that can reduce the amount of data transmitted.

[0005] Firstly, this application provides a data processing method executed by a database management system. The method includes: the database management system receiving a query request from a client; determining multiple dimension members associated with a multidimensional form based on the query request; determining data and location information based on the multiple dimension members; converting the data into an array; compressing the location information to obtain compressed information; and finally transmitting the query result to the client. The query result includes the array and the compressed information. The query request instructs data query processing for a multidimensional form associated with a multidimensional database. The multiple dimension members belong to multiple dimensions in the multidimensional database. The data consists of multiple values ​​corresponding to the multiple dimension members in the multidimensional database. The location information indicates the row and column positions of the multiple values ​​in the multidimensional form and the member corresponding to each value among the multiple dimension members.

[0006] Compared to the conventional approach of directly sending all values ​​from a multidimensional form, along with the row and column coordinates of each value and its corresponding dimension members, to the client, this approach reduces the overall data transmission volume from the database management system to the client by compressing the location information and then sending the compressed information and the generated array (including the aforementioned values) to the client, thereby shortening the data transmission time.

[0007] Based on the first aspect, in a possible implementation, the database management system can write the multiple values ​​into an array according to their order in the multidimensional form, and then transmit the array to the client. It should be understood that since the database management system fills the array with the multiple values ​​according to their order in the multidimensional form, when the client receives the array, it can directly load the multiple values ​​into the multidimensional form according to the order of the values ​​in the array. This helps improve the form display speed on the client side, thereby enhancing the user experience.

[0008] In one possible implementation, the location information includes row numbers. The database management system can first determine the correspondence between different row numbers of the multidimensional form and the above-mentioned multiple dimension members based on the location information, and then generate compressed information to indicate the above-mentioned correspondence.

[0009] In this solution, the database management system first determines the correspondence between different row numbers in the form and the aforementioned multiple dimension members based on location information. Each row number corresponds to a portion of the dimension members, and the dimension members corresponding to different row numbers are not entirely the same. Each row number corresponds to a dimension member under each of the multiple dimensions associated with the multidimensional form, and each row in the form includes one or more values. Then, the database management system generates compressed information to indicate the above correspondence and sends the compressed information to the client. In other words, the database management system converts the correspondence between different values ​​and row / column coordinates and dimension members into the correspondence between different rows and dimension members. Since the number of rows is usually much smaller than the number of values, compared to the conventional solution of directly transmitting the row / column coordinates of each value in the multidimensional form and the correspondence between each value and dimension members to the client, this solution can reduce the amount of data transmission to a certain extent.

[0010] If the number of columns in the form is greater than 1, the location information can also include the column number. The database management system can first determine the correspondence between the different column numbers of the multidimensional form and the above-mentioned multiple dimension members based on the location information, and then generate another compressed information, which is used to indicate the above correspondence, and then send the compressed information to the client.

[0011] In another possible implementation, the compressed information includes the target row number, the operand corresponding to the first dimension, and the order relationship among members belonging to the first dimension among multiple dimension members. The first dimension is one of multiple dimensions. The index value of the first dimension member corresponding to the target row number in the above order relationship is equal to the remainder obtained by dividing the first value by the number of members belonging to the first dimension among multiple dimension members. The first dimension member belongs to the first dimension, and the first value is the quotient obtained by dividing the target row number by the operand. Specifically, if the number of other dimensions following the first dimension is zero, the operand value is 1; if the number of other dimensions is 1, the operand value is the number of members of other dimensions associated with the multidimensional form; if the number of other dimensions is greater than 1, the operand value is the product of the number of members of other dimensions associated with the multidimensional form.

[0012] In this solution, the database management system includes the target row number, the operands corresponding to the first dimension, and the order relationship between members belonging to the first dimension among multiple dimension members in the compressed information. When the client receives this compressed information, it can calculate the index value of the first dimension member corresponding to the target row number in the above order relationship based on the target row number (which can be any row number in the form) and the operands corresponding to the first dimension. Then, based on the calculated index value, it determines the first dimension member in the above order relationship. In other words, the target row number, the operands corresponding to the first dimension, and the above order relationship implicitly contain the correspondence between the target row number and the first dimension members. The client can determine the first dimension member under the first dimension corresponding to the target row number by calculating based on the target row number, the operands corresponding to the first dimension, and the above order relationship. Dimension members under other dimensions corresponding to the target row number can also be calculated in a similar way.

[0013] In another possible implementation, the compressed information also includes a row number array, which contains the different row numbers of the multidimensional form, and the length of the row number array is less than or equal to the product of the number of members of each dimension associated with the multidimensional form.

[0014] This solution uses a row number array to indicate the number of rows in the form. Based on this row number array and the previously described array containing multiple values ​​from the form, the client can quickly fill in these values ​​in the form according to the row number order, thereby improving the form's display speed on the client.

[0015] In another possible implementation, the query results also include style metadata, which indicates the style used by the client when displaying the above values. For example, the style can be font size, font, alignment, whether it is bold, background color, the size of the cell containing the value, etc. This application does not make specific limitations on this. When the client receives the style metadata, it can control the style used when the above values ​​are displayed in the form based on the style metadata.

[0016] In another possible implementation, the query results also include status information, which indicates the status of multiple values ​​in the multidimensional database. The status includes writable and read-only states. A writable state indicates that the value can be modified, while a read-only state indicates that modification is not allowed. The client can control whether users are allowed to modify the value on the client based on the value's status.

[0017] Secondly, this application also provides a data processing apparatus, which includes modules for performing the data processing method in the first aspect or any possible implementation of the first aspect.

[0018] Thirdly, this application also provides a computing device including a processor and a memory. The processor is configured to execute instructions stored in the memory to cause the computing device to perform operational steps of the method as described in any possible implementation of the first aspect.

[0019] Fourthly, this application also provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the operational steps of the method as described in any possible implementation of the first aspect.

[0020] Fifthly, this application also provides a chip system, the chip system including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, and the processor being used to execute the operation steps of the method corresponding to the first aspect or any possible implementation of the first aspect.

[0021] In a sixth aspect, this application also provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices (including at least one computing device), perform the operational steps of the method as described in any possible implementation of the first aspect.

[0022] In a seventh aspect, this application also provides a computer program product containing instructions. When the instructions are executed by a cluster of computing devices (including at least one computing device), the cluster of computing devices causes the cluster of computing devices to perform the operational steps of the method as described in any possible implementation of the first aspect.

[0023] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0024] Figure 1 This is a system architecture diagram provided in this application;

[0025] Figure 2 This is a schematic diagram of a multidimensional form provided in this application;

[0026] Figure 3 This is a schematic diagram of another multidimensional form provided in this application;

[0027] Figure 4 This is a schematic diagram of the structure of a query result provided in this application;

[0028] Figure 5 This is a schematic diagram of a multidimensional form after blanking provided in this application;

[0029] Figure 6 This is a flowchart illustrating a data processing method provided in this application;

[0030] Figure 7 This is a schematic diagram of the structure of a computing device provided in this application;

[0031] Figure 8 This is a schematic diagram of a computing device cluster provided in this application;

[0032] Figure 9 This is a schematic diagram illustrating the interaction between two computing devices provided in this application via a network. Detailed Implementation

[0033] This application provides a data processing method executed by a database management system. The system first receives a query request from a client, then determines multiple dimension members associated with a multidimensional form based on the query request, and then determines data and location information based on the multiple dimension members. Subsequently, the data is converted into an array, and the location information is compressed to obtain compressed information. Finally, the query result, including the array and the compressed information, is transmitted to the client. The query request instructs the data query processing of a multidimensional form associated with a multidimensional database. The multiple dimension members belong to multiple dimensions in the multidimensional database. The data consists of multiple values ​​corresponding to the multiple dimension members in the multidimensional database. The location information indicates the row and column positions of the multiple values ​​in the multidimensional form and the member corresponding to each value among the multiple dimension members.

[0034] Compared to the conventional approach of directly sending all values ​​in a multidimensional form, along with the row and column coordinates of each value and its corresponding dimension members, to the client, this system reduces the amount of data transmitted and thus shortens the data transmission time by compressing the location information and then sending the compressed information and the generated array (including the aforementioned values) to the client.

[0035] The database management system provided in this application will be described in detail below.

[0036] Please see Figure 1 , Figure 1 This application provides a system architecture diagram, including a client 100, a database management system 200, and a multidimensional database 300. The client 100 and the database management system 200 have a communication connection, which can be a wired connection or a wireless connection. The number of clients 100 establishing a communication connection with the database management system 200 can be one or more. Figure 1 This application takes only one client 100 as an example and does not impose specific limitations on this. Similarly, the multidimensional database 300 has a communication connection with the database management system 200, which can be a wired connection or a wireless connection. The number of multidimensional databases 300 that establish a communication connection with the database management system 200 can be one or more. Figure 1 (This example only uses a multidimensional database 300 as an example, and the embodiments in this application are not specifically limited.)

[0037] The client 100 is used to implement human-computer interaction and can be deployed on terminal devices or computing devices. The terminal device can be a smartphone, wearable device, laptop, tablet, in-vehicle device, or smart conferencing device, etc., and the computing device can be a server, personal computer (PC), etc. The embodiments of this application do not make specific limitations.

[0038] In some specific implementations, client 100 can be an application (APP) client / mobile client running on a mobile terminal such as a smartphone or wearable device, or software or application running on a computing device (such as a PC client), or a web client accessed through a web browser, or a front-end console of a cloud platform. This application does not specifically limit it in this regard.

[0039] A database management system 200 is used to manage a multidimensional database 300. The database management system 200 can be deployed on a single computing device, a cluster of multiple computing devices, or a terminal device. The computing device can be a physical server, a virtual machine, a container, or an edge computing device. A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity is used as the virtual machine's hard drive and memory capacity. Each virtual machine has an independent basic input / output system (BIOS), hard drive, and operating system, and can be operated like a physical machine. A container is a portable software unit that can combine an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, thus eliminating the need to build complex environments and simplifying the application development and deployment process. Edge computing devices refer to devices closer to the data source and end users, characterized by low latency and high bandwidth, such as intelligent routers and edge servers; this application does not specifically limit this. Terminal devices are described above and will not be repeated here.

[0040] Multidimensional Database 300 is a database used to store multidimensional data. It organizes and stores data in the form of multidimensional arrays (or multidimensional data cubes). Each dimension of the multidimensional array represents an angle / aspect / direction of observing data. Each dimension includes one or more dimension members, that is, the dimension can have one or more values. Each element in the multidimensional array represents a metric.

[0041] For example, suppose a multidimensional database 300 includes dimensions such as company, year, product, region, and account (i.e., accounting subject) dimensions. The company dimension includes members such as Company A and Company B; the year dimension includes members such as 2019, 2020, and 2021; the product dimension includes members such as Product 1, Product 2, and Product 3; the region dimension includes members such as Region 1 and Region 2; and the account dimension includes members such as sales revenue, sales volume, inventory, and profit margin. It should be noted that the number and types of dimensions and members given in this example are for illustrative purposes only and do not constitute specific limitations. In practical applications, a multidimensional database 300 can have more or fewer dimensions, and each dimension can have one or more members. This application does not impose specific limitations on this.

[0042] Optionally, the client 100 and the database management system 200 can be deployed on the same terminal device or computing device; or, the client 100 can be deployed on a terminal device, and the database management system 200 can be deployed on a single computing device or a cluster of computing devices. Similarly, the multidimensional database 300 and the database management system 200 can be deployed on the same or different computing devices or terminal devices, and this application embodiment is not specifically limited. It should be understood that the examples are for illustration only, and the specific deployment of the client 100, database management system 200, and multidimensional database 300 can be determined according to the actual application scenario.

[0043] Furthermore, both the client 100 and the database management system 200 can be divided into multiple unit modules. Figure 1 An exemplary division of client 100 and database management system 200 is given, wherein client 100 includes sending module 110, receiving module 120, processing module 130 and interaction module 140, and database management system 200 includes receiving module 210, processing module 220 and sending module 230, which will be described in detail below.

[0044] 1. Sending Module 110: Used to send query requests to the database management system 200. The query request instructs for data query processing of the multidimensional form associated with the multidimensional database 300. The multidimensional form refers to a multidimensional form constructed based on data in the multidimensional database 300. The multidimensional form is associated with multiple dimension members, which belong to multiple dimensions in the multidimensional database 300. These multiple dimensions can be considered as the dimensions associated with the multidimensional form. Each dimension member belongs to only one dimension, and each of these multiple dimensions has at least one dimension member among these multiple dimension members.

[0045] First, let's introduce query requests. Query requests can include the following types:

[0046] Scenario 1: The query request includes the identifier (ID) or name of a multidimensional form.

[0047] In this scenario, the database management system 200 records the correspondence between the ID / name of a multidimensional form and the associated multidimensional members. When the client 100 needs to display a multidimensional form, its sending module 110 sends the query request to the database management system 200 by including the multidimensional form's ID or name in the request, thereby querying the database management system 200 for the data of that multidimensional form. Then, based on the multidimensional form's ID / name in the query request and the recorded correspondence, the database management system 200 determines that the client 100 needs to display this multidimensional form, and further determines that the multidimensional form is associated with these multiple dimension members. Subsequently, it retrieves the corresponding values ​​of these multiple dimension members in the multidimensional database 300 (described later).

[0048] Scenario 2: The query request includes multiple dimension members associated with a multidimensional form.

[0049] In this scenario, client 100 sends a query request to database management system 200, including multiple dimension members associated with the multidimensional form, thereby querying the database management system 200 for data from the multidimensional form. Database management system 200 can then directly determine the multiple dimension members associated with the multidimensional form based on the query request, and subsequently obtain the corresponding values ​​of these dimension members in the multidimensional database 300 (described later).

[0050] Scenario 3: The query request includes multiple dimensions associated with a multidimensional form.

[0051] In this scenario, client 100 sends a query request to database management system 200, including multiple dimensions associated with the multidimensional form, thereby retrieving data from the multidimensional form. Database management system 200 then determines each dimension associated with the multidimensional form based on the query request. It then uses all or some dimension members under each dimension as multiple dimension members associated with the multidimensional form, and subsequently retrieves the corresponding values ​​(described later) of these multiple dimension members in multidimensional database 300. Optionally, some dimension members under each dimension can be a specified number (configurable) of dimension members under that dimension, or specific dimension members under that dimension (which can be specified by the user or set by default in multidimensional database 300). This application does not impose specific limitations on this.

[0052] The following is a detailed introduction to multidimensional forms.

[0053] As introduced earlier, a multidimensional form associates multiple dimensions within a multidimensional database 300. For each of these dimensions, the multidimensional form specifically associates with at least one dimension member within that dimension. The number of values ​​corresponding to the multidimensional form in the multidimensional database 300 (i.e., the values ​​corresponding to the multiple dimension members associated with multiple forms in the multidimensional database 300) is equal to the product of the dimension member data for each dimension associated with the multidimensional form. Each value corresponds to one dimension member in each of the multiple dimensions associated with multiple forms. For ease of description, all dimension members corresponding to each value are referred to as the member tuple for that value; different values ​​have different member tuples.

[0054] For example, Figure 2 An example of a multidimensional form is given, which is associated with four dimensions in a multidimensional database 300, including the year dimension, product dimension, subject dimension, and region dimension. Specifically, the multidimensional form is associated with the two dimension members 2015 and 2016 under the year dimension, the three dimension members A, B, and C under the product dimension, the one dimension member sales volume under the subject dimension, and the two dimension members region 1 and region 2 under the region dimension.

[0055] Therefore, the multidimensional form associates 2 + 3 + 1 + 2 = 8 dimension members. These 8 dimension members belong to 4 dimensions in the multidimensional database 300. The number of values ​​corresponding to this multidimensional form in the multidimensional database 300 is equal to the product of the dimension member data of each dimension associated with the multidimensional form = 2 × 3 × 1 × 2 = 12. These 12 values ​​need to be retrieved from the multidimensional database 300 to fill in the values. Figure 2 The 12 cells in the form (represented by blank boxes in the image).

[0056] Each value corresponds to 4 of the 8 dimension members (belonging to 4 different dimensions associated with a multidimensional form). These 4 dimension members are called the member tuples of that value. Different values ​​have different member tuples, therefore these 12 values ​​have 12 different member tuples. The Cartesian product algorithm can be used to calculate which specific member tuples exist. In mathematics, the Cartesian product refers to an operation between two sets (or more sets) that combines the elements of these sets into ordered pairs, obtaining all possible ordered pairs.

[0057] For example, let's denote the two dimension members under the year dimension of a multidimensional form as set 1 = {2015, 2016}, the three dimension members under the product dimension as set 2 = {Product A, Product B, Product C}, the one dimension member under the subject dimension as set 3 = {Sales}, and the two dimension members under the region dimension as set 4 = {Region 1, Region 2}. The Cartesian product = set 1 × set 2 × set 3 × set 4 = {(2015, Product A, Sales, Region 1), (2015, Product A, Sales, Region 2), ..., (2016, Product C, Sales, Region 2)}, where parentheses represent an ordered pair (i.e., a member tuple), and the content within the parentheses represents the dimension members contained in that member tuple.

[0058] Optionally, the row structure of the multidimensional form can be associated with M dimensions in the multidimensional database 300 (which can be some or all of the multiple dimensions associated with the multidimensional form), where M is greater than or equal to 1, and this application does not specifically limit this. The M dimensions corresponding to the row structure have an order relationship in the multidimensional form. This order relationship can be specified by the user (e.g., through the interaction module 140) or it can be the system default, and this application does not specifically limit this. For any one of the M dimensions, the row structure of the multidimensional database 300 is associated with one or more dimension members under that dimension (which may be some or all of the dimension members under that dimension). If the row structure is associated with multiple dimension members under that dimension, then these multiple dimension members under that dimension have an order relationship in the multidimensional form. This order relationship can be specified by the user (e.g., through the interaction module 140) or it can be the system default.

[0059] Continue with Figure 2 For example, the row structure of this multidimensional form is associated with the year dimension, product dimension, and subject dimension of the above four dimensions. The order of these three dimensions in the multidimensional form is year dimension → product dimension → subject dimension.

[0060] For the year dimension, the multidimensional form is associated with four dimensions in the multidimensional database 300: year, product, subject, and region. The row structure is associated with three of these four dimensions: year, product, and region. Specifically, for the year dimension, the row structure is associated with the two dimension members 2015 and 2016, with their order in the multidimensional form being 2015→2016, corresponding to different rows in the multidimensional form. For the product dimension, the row structure is associated with the three dimension members: product A, product B, and product C, with their order in the multidimensional form being product A→product B→product C, corresponding to different rows in the multidimensional form. For the subject dimension, the row structure is associated with the single dimension member "sales volume," which corresponds to all rows in the multidimensional form.

[0061] It should be understood that the number of dimension members in each dimension associated with the row structure of a multidimensional form determines the number of rows in the multidimensional form. The number of rows in a multidimensional form is equal to the product of the number of dimension members in each dimension associated with the row structure.

[0062] Continuing from the previous example, Figure 2 If the row structure of the multidimensional form in the document relates to two members under the year dimension, three members under the product dimension, and one member under the subject dimension, then the number of rows in the multidimensional form is 2 × 3 × 1 = 6 rows (row numbers are 0 to 5).

[0063] Optionally, the column structure of the multidimensional form can be associated with N dimensions in the multidimensional database 300 (which may be some or all of the multiple dimensions associated with the multidimensional form), where N is greater than or equal to 1, and this application does not specifically limit this. The N dimensions associated with the column structure have an order relationship in the multidimensional form, which can be user-specified or system default, and this application does not limit this. For any one of the N dimensions, the column structure of the multidimensional database 300 is associated with one or more dimension members under that dimension (which may be some or all of the dimension members under that dimension). If the column structure is associated with multiple dimension members under that dimension, then the multiple dimension members under that dimension have an order relationship in the multidimensional form, which can be user-specified or system default. It should be understood that the number of dimension members in each dimension associated with the column structure of the multidimensional form determines the number of columns in the multidimensional form, and the number of columns in the multidimensional form is equal to the product of the number of dimension members in each dimension associated with the column structure.

[0064] Continue with Figure 2 For example, Figure 2The column structure of this multidimensional form only relates to one dimension of the multidimensional database 300, namely the region dimension. Specifically, the column structure relates to two dimension members, Region 1 and Region 2, under the region dimension. Their order in the multidimensional form is Region 1 → Region 2, with Region 1 and Region 2 corresponding to different columns in the multidimensional form. Because the column structure of this multidimensional form only relates to this one dimension, the number of columns in the multidimensional form equals the number of dimension members of the region dimension that the column structure relates to, which is 2 (column numbers from 0 to 1).

[0065] After determining the number of rows and columns in the multidimensional form, the number of cells used to populate the values ​​can be determined by multiplying the number of rows by the number of columns. The number of cells = number of rows × number of columns = 6 × 2 = 12. These 12 cells are used to populate the 12 values ​​corresponding to the 300 values ​​in the multidimensional database. It should be noted that... Figure 2 The rest of the text, except for these 12 cells (called headers or row / column headings), is only for ease of understanding; in actual application scenarios, the client may not display it directly. Figure 2 The header of the table.

[0066] 2. Receiving module 210: Used to receive query requests sent by client 100.

[0067] 3. Processing module 220: Used to retrieve multiple values ​​from the multidimensional database 300 according to the query request, and then generate query results.

[0068] Specifically, the processing module 220 in the database management system 200, by parsing the query request sent by the client 100, can determine the multiple dimension members associated with the multidimensional form (refer to cases one through three described above), and then retrieve the multiple values ​​corresponding to these multiple dimension members from the multidimensional database 300. After the database management system 200 retrieves these multiple values ​​from the multidimensional database 300, it fills these multiple values ​​into the cells at the corresponding row and column positions in the multidimensional form.

[0069] Continue with Figure 2 For example, as introduced above, Figure 2 The multidimensional form is associated with 8 dimension members. These 8 dimension members belong to 4 dimensions in the multidimensional database 300, namely year dimension, product dimension, subject dimension and region dimension. The number of values ​​corresponding to these 8 dimension members in the multidimensional form is 12, and different values ​​have different member tuples.

[0070] When the database management system 200 receives a query request from the client 100, it can determine the multiple dimension members associated with the multidimensional form, and then retrieve the corresponding values ​​of these multiple dimension members in the multidimensional database 300. For example, Figure 2The cell with row number 0 and column number 1 needs to be filled with the member tuples 2015, Product A, Sales Volume, and Region 2. The database management system 200 can retrieve the corresponding values ​​for this member tuple from the multidimensional database 300. The method for retrieving the values ​​to be filled in other cells is similar, and will not be described in detail here.

[0071] After the database management system 200 obtains these 12 values ​​from the multidimensional database 300, it fills them into... Figure 2 The corresponding cells in the multidimensional form, thus obtaining Figure 3 A multidimensional form. It should be noted that... Figure 3 The 12 values ​​entered are for illustrative purposes only and do not constitute specific limitations.

[0072] The previous section introduced how to obtain the corresponding values ​​of multiple dimension members associated with a multidimensional form in the multidimensional database 300 and fill them into the multidimensional form. The following section explains how to generate query results based on these multiple values.

[0073] Please see Figure 4 , Figure 4 It is a schematic diagram of the query results, including data information and definition information.

[0074] First, let's introduce the data. For example... Figure 4 As shown, the data information includes an array of cell values ​​(which is an array), which indicates the multiple values ​​corresponding to the multiple dimension members associated with the multidimensional form in the multidimensional database 300.

[0075] Continuing from the previous example, when the processing module 220 in the database management system 200 obtains 12 values ​​from the multidimensional database 300, these 12 values ​​can be further converted into an array, that is, arranged according to these 12 values ​​in... Figure 3 The sorting order in the multidimensional form is written into the array of cell values.

[0076] like Figure 3As shown, processing module 220 can sequentially fill the values ​​of these 12 cells in the multidimensional form into a cell value array according to the arrangement order of rows 0 to 5 (each row from left to right), resulting in [100,200,NULL,NULL,150,180,200,300,80,120,160,150]. Alternatively, processing module 220 can write the values ​​of these 12 cells into a cell value array according to the arrangement order of rows 5 to 0 (each row from left to right), resulting in [160,150,80,120,200,300,150,180,NULL,NULL,100,200]. Alternatively, processing module 220 can sequentially write the values ​​of these 12 cells into a cell value array according to the arrangement order of columns 0 to 1 (each column from top to bottom), resulting in [100,NULL,150,200,80,160,200,NULL,180,300,120,150]. Of course, processing module 220 can also fill the values ​​of the 12 cells into the cell value array in other arrangements. This application does not impose specific limitations on this. Subsequently, client 100 only needs to use the cell value array and the order in which the values ​​were previously filled into the array to quickly draw these 12 cells on client 100.

[0077] Optional, such as Figure 4 As shown, the data information also includes a cell status array, which indicates the status of multiple values ​​in the multidimensional form within the multidimensional database 300. The status can include read-only and writable states. A writable state indicates that the value can be modified, while a read-only state indicates that modification is not allowed. If a value is in a writable state, the client 100 can notify the user that the value can be modified, thus allowing the user to modify the value on the client 100. Conversely, if a value is in a read-only state, the client 100 can notify the user that the value cannot be modified, thus preventing the user from modifying the value on the client 100.

[0078] Continuing from the previous example, suppose the processing module 220 fills the 12 values ​​in the multidimensional form into the cell value array in the order of rows 0 to 5 (each row from left to right), resulting in [100,200,NULL,NULL,150,180,200,300,80,120,160,150].

[0079] Assumption Figure 3The values ​​in the cells of rows 0-2 are all in a read-only state, and the values ​​in the cells of rows 3-5 are all in a writable state. A status flag of 0 indicates read-only, and a status flag of 1 indicates writable. Following the order of rows 0-5 (from left to right), the processing module 220 can sequentially fill the status flags of the 12 values ​​in the multidimensional form into the cell status array, resulting in [0,0,0,0,0,0,1,1,1,1,1,1]. It should be understood that when the client 100 determines the status of each value through the cell status array, it can render the cells containing values ​​of different statuses in different ways. For example, it can fill the cells containing read-only values ​​with gray, and the cells containing writable values ​​with white, etc. This application does not specifically limit this.

[0080] It should be understood that the position of the same value in the cell value array is consistent with the position of the state marker of that value in the cell state array. For example, Figure 2 The value of cell 150 in row 2, column 0 is the 4th cell in the cell value array (assuming positions start from 0). Therefore, the position of the status marker of this value in the cell status array is also the 4th. Thus, client 100 can assign values ​​to the corresponding cells and set the cell status according to the correspondence between the two arrays and the order of the elements (value / status) in the array.

[0081] It should be noted that the number of states, names, and state labels in the above examples are merely examples and do not constitute specific limitations. In actual application scenarios, more or fewer states can be divided, and different states can be distinguished by different state labels. This application does not impose any specific limitations on this.

[0082] Optionally, the processing module 220 in the database management system 200 can first obtain the values ​​corresponding to all cells in the multidimensional form from the multidimensional database 300, and then determine whether there are any rows and / or columns in the multidimensional form with all values ​​empty (referred to as empty-cancellable rows and columns). If so, the processing module 220 performs empty-cancellable operation on the empty-cancellable rows and columns, that is, it does not carry the values ​​of the cells in the empty-cancellable rows and columns in the cell value array, and it does not carry the status flags of the cells in the empty-cancellable rows and columns in the cell status array, thereby reducing the amount of data transmitted. At this time, since the cell value array received by the client 100 does not carry the values ​​of the empty-cancellable rows and columns, and the cell status array does not carry the status flags of the empty-cancellable rows and columns, the client 100 will not display the empty-cancellable rows and columns in the multidimensional form, which can optimize the display effect and user experience of the multidimensional form to a certain extent.

[0083] Continue with Figure 3For example, this multidimensional form includes 12 cells. The values ​​in these cells are obtained by the database management system 200 from the multidimensional database 300 and filled into the multidimensional form (see the previous introduction). Some cells are filled with specific numerical values, while others are filled with NULL, indicating that the corresponding value obtained from the multidimensional database 300 is empty. Of course, other symbols can also be used to indicate that the value is empty, and this application does not specifically limit this. It can be seen that the values ​​of the cells in the first row of this multidimensional form are all empty, so the first row is a row that can be cleared of empty cells.

[0084] If not Figure 3 If the multidimensional form performs empty elimination, the processing module 220 of the database management system 200 can write all the values ​​of these 12 cells into a cell value array. For example, the processing module 220 can fill the values ​​of these 12 cells into an array sequentially from row 0 to row 5, resulting in the following cell value array: [100,200,NULL,NULL,150,180,200,300,80,120,160,150]. It can be understood that when the client 100 receives this cell value array, it does not need complex calculations; it only needs to follow the order of row 0 to row 5 to quickly render these 12 cells. Similarly, the database management system 200 can fill the status flags of the values ​​in these 12 cells into a cell status array sequentially from row 0 to row 5. When the client 100 receives this cell status array, it only needs to follow the order of row 0 to row 5 to quickly render the status of the values ​​in these 12 cells.

[0085] If yes Figure 3 If the multidimensional form performs empty elimination, then the processing module 220 of the database management system 200 only needs to write the values ​​of the cells in the multidimensional form other than the rows and columns that can be eliminated into the cell value array, that is, to... Figure 2 The values ​​of all cells except the first row are sequentially filled into a cell value array, resulting in [100, 200, 150, 180, 200, 300, 80, 120, 160, 150], with a length of 10. It can be understood that when client 100 receives this cell value array, it doesn't need complex calculations; it can simply draw these 10 cells in the order of rows 0 to 5 (excluding row 1) to obtain... Figure 5 The example shown is a multidimensional form after emptying. Similarly, Database Management System 200 can... Figure 2 The status flags of the values ​​in the cells other than the first row are sequentially filled into the cell status array. When the client 100 receives the cell status array, it only needs to render the status of the values ​​in these 10 cells in the order of rows 0 to 5 (excluding the first row).

[0086] like Figure 3 As shown, in addition to the numerical information mentioned above, the query results also include definition information, which indicates the number of rows and columns in the multidimensional form, as well as the dimension members corresponding to each row and column in the multidimensional form.

[0087] The definition information includes row and column metadata and member metadata.

[0088] Row and column metadata is used to indicate the number of rows and columns in a multidimensional form. For example, without considering blanking, the number of rows and columns in the multidimensional form can be given directly.

[0089] Optional, such as Figure 2 As shown, the row and column metadata includes an array of row numbers and an array of column numbers. The row number array contains the row numbers of different rows in the multidimensional form, and its length is equal to the number of rows in the multidimensional form. Therefore, client 100 can determine the number of rows in the multidimensional form based on the row number array. The column number array contains the column numbers of different columns in the multidimensional form, and its length is equal to the number of columns in the multidimensional form. Therefore, client 100 can determine the number of columns in the multidimensional form based on the column number array, so that the multidimensional form can be rendered and displayed on client 100.

[0090] For example, for Figure 2 The database management system 200 can generate a row number array [0,1,2,3,4,5] and a column number array [0,1] for the multidimensional form shown. The row number array indicates that the multidimensional form has 6 rows, and the column number array indicates that the multidimensional form has 2 columns. The database management system 200 then includes these row and column number arrays in the query results and sends them to the client 100. The client 100 can then determine the number of rows and columns of the multidimensional form based on these arrays, and by combining this with the cell value array (containing the values ​​of 12 cells) in the form information, it can complete the depiction of the 12 cells.

[0091] For example, regarding Figure 5 The database management system 200 can generate a row number array [0,2,3,4,5] and a column number array [0,1] for the multidimensional form after the emptying is shown. The row number array indicates that the multidimensional form has 5 rows after the emptying is completed, and the column number array indicates that the multidimensional form has 2 columns after the emptying is completed. It can be seen that since the first row is empty, the row number array does not carry the row number of the first row. Therefore, the client 100 does not need to render the cells of the first row. It only needs to draw 10 cells based on the row number array, column number array, and cell value array (including the values ​​of the 10 empty cells) so that it can be displayed on the client 100. Figure 5 The multidimensional form after the blanking is removed.

[0092] Member metadata is used to indicate the dimensions corresponding to the row and column structures of a multidimensional form, as well as the information of the dimension members. Member metadata can include the following first and second implementation methods.

[0093] In the first implementation, the member metadata includes the order relationship of the dimension members under each dimension of the row structure in the multidimensional form, the order relationship of the dimension members under each dimension of the column structure in the multidimensional form, and the number of operations for each dimension in the M and N dimensions.

[0094] For any one of the M dimensions (denoted as the first dimension), the operands of the first dimension fall into the following categories:

[0095] Type 1: If the number of other dimensions after the first dimension in the M dimensions is 0, then the number of operations for the first dimension is 1.

[0096] Type 2: If the number of other dimensions following the first dimension in the M dimensions is 1, then the operand of the first dimension is the number of dimension members of the other dimensions in the multidimensional form.

[0097] Type 3: If the number of other dimensions after the first dimension in the M dimensions is 1, then the operand of the first dimension is the product of the number of dimension members of each of the other dimensions in the multidimensional form.

[0098] When client 100 receives the query results transmitted by database management system 200, it can determine the index value of a dimension member corresponding to the target row number (which can be any row in the multidimensional form) under the first dimension based on the operands of the first dimension in the query results and the following decompression algorithm:

[0099] The index value of the dimension member (denoted as the first dimension member) corresponding to the target row under the first dimension = (target row number / first dimension operand) % the number of dimension members under the first dimension associated with the multidimensional form.

[0100] After obtaining the index value of the first dimension member, the order relationship of the dimension members under the first dimension in the multidimensional form is obtained by querying the member metadata based on the index value, and the first dimension member corresponding to the target row number under the first dimension can be determined.

[0101] For example, for Figure 3The multidimensional form shown has a row structure corresponding to three dimensions: year, product, and subject. Their order in the multidimensional form is year → product → subject. Specifically, the multidimensional form is associated with the two dimension members 2015 and 2016 under the year dimension (this could be some or all of the dimension members under the year dimension), with the order 2015 → 2016, which can be represented by the array [2015, 2016], where the index of 2015 is 0 and the index of 2016 is 1. The multidimensional form is also associated with the three dimension members A, B, and C under the product dimension, with the order A → B → C, which can be represented by the array [product A, product B, product C], where the index of product A is 0, the index of product B is 1, and the index of product C is 2. The multidimensional form is only associated with the sales volume dimension under the subject dimension.

[0102] Based on the order of these three dimensions corresponding to the row structure, the number of operands for each dimension of the row structure can be determined as follows:

[0103] The number of operations in the year dimension = the number of dimension members in the product dimension × the number of dimension members in the subject dimension = 3 × 1 = 3;

[0104] The number of operations in the product dimension = the number of members in the subject dimension = 1;

[0105] The operand count for the subject dimension is 1;

[0106] for Figure 2 In the multidimensional form shown, when client 100 receives the query results transmitted from database management system 200, if it wants to determine which dimension member under the year dimension corresponds to the 4th row, it can obtain the operands of the year dimension, product dimension, and subject dimension from the query results. Then, according to the decompression algorithm, it calculates the quotient of the row number divided by the operand of the year dimension, i.e., 4 / 3 = 1. Then, it takes the remainder of the obtained value 1 with the number of dimension members under the year dimension associated with the multidimensional form, i.e., 1%2 = 1. Based on the calculated index value, it queries the array [2015, 2016] to determine that the 4th row corresponds to the dimension member 2016 under the year dimension.

[0107] Similarly, if client 100 wants to determine which dimension member under the product dimension corresponds to the second row, it can obtain the operand of the product dimension from the query results. Then, according to the decompression algorithm, it calculates the quotient of the row number divided by the operand of the product dimension, i.e., 2 / 1 = 2. Then, it takes the remainder of the calculated value 2 divided by the number of dimension members under the product dimension associated with the multidimensional form, i.e., 2%3 = 2. Using this calculated index value, it queries the array [Product A, Product B, Product C] to determine that the second row corresponds to Product C under the product dimension.

[0108] The dimension members corresponding to other rows under each dimension can be determined in the same way as described above, which will not be elaborated on here.

[0109] Similarly, for any one of the N dimensions (denoted as the second dimension), the operands of the second dimension fall into the following categories:

[0110] Type 4: If the number of other dimensions after the second dimension in the N dimensions is 0, then the number of operations for the second dimension is 1.

[0111] Type 5: If the number of other dimensions following the second dimension in the N dimensions is 1, then the operand of the second dimension is the number of dimension members of the other dimensions in the multidimensional form.

[0112] Type 6: If the number of other dimensions after the second dimension in N dimensions is 1, then the operand of the second dimension is the product of the number of dimension members of each of the other dimensions in the multidimensional form.

[0113] After determining the operands of the second dimension, client 100 can determine the index value of a dimension member corresponding to the target column number (which can be any column in the multidimensional form) under the second dimension using the following decompression algorithm:

[0114] The index value of the target row corresponding to a dimension member in the second dimension (denoted as the second dimension member) = (target column number / second dimension operand) % the number of dimension members in the second dimension associated with the multidimensional form.

[0115] After obtaining the index value of the second-dimensional member, the order of the second-dimensional members in the multidimensional form given in the member metadata can be queried based on the index value to determine the second-dimensional member corresponding to the target column number in the second dimension.

[0116] For example, for Figure 2The multidimensional form shown has a column structure corresponding to the region dimension. Specifically, the column structure corresponds to the two dimension members, Region 1 and Region 2, under the region dimension. Their order in the multidimensional form is Region 1 → Region 2, which can be represented by the array [Region 1, Region 2]. In this array, the index value of Region 1 is 0, and the index value of Region B is 1.

[0117] Since the column structure only corresponds to the region dimension, and no other dimensions follow the region dimension, the operand of the region dimension can be determined to be 1.

[0118] for Figure 2 In the multidimensional form shown, after client 100 receives the query results sent by database management system 200, if client 100 wants to determine which dimension member under the region dimension corresponds to column 0, it can obtain the operand of the region dimension from the query results. Then, according to the decompression algorithm, it calculates the column number of that column divided by the operand of the region dimension, i.e., 0 / 1 = 0. Then, it takes the remainder of the calculated value with respect to the number of dimension members under the region dimension associated with the multidimensional form, i.e., 0%2 = 0. Based on the calculated index value 0, it queries the array [region 1, region 2] and determines that row 0 corresponds to region 1 under the region dimension.

[0119] Similarly, if client 100 wants to determine which dimension member under the region dimension corresponds to the first column, according to the decompression algorithm, it can first calculate the column number of that column divided by the operand of the region dimension, i.e., 1 / 1 = 1. Then, it can take the remainder of the calculated value by dividing the number of dimension members under the region dimension associated with the multidimensional form, i.e., 1%2 = 1. Based on the calculated index value 1, it can query the array [region 1, region 2] to determine that the first row corresponds to region 2 under the region dimension.

[0120] In the second implementation, the defined information includes the order of the M dimensions corresponding to the row structure of the multidimensional form in the multidimensional form, the order of the N dimensions corresponding to the column structure of the multidimensional form in the multidimensional form, the order of the dimension members under each dimension corresponding to the row structure in the multidimensional form, the order of the dimension members under each dimension corresponding to the column structure in the multidimensional form, and the number of operations for each of the M and N dimensions.

[0121] Compared to the first implementation, the second implementation does not carry the operands for each dimension in its member metadata. However, it adds the order relationships of the M dimensions and N dimensions in the multidimensional form. As mentioned earlier, the operands for each dimension can be calculated based on the order relationships. Therefore, in the second implementation, when client 100 receives the query results from database management system 200, if client 100 wants to determine which dimension member under the first target dimension corresponds to the target row number in the multidimensional form, it can first calculate the operands of the first target dimension based on the aforementioned order relationships of the M dimensions, and then determine which dimension member under the first target dimension corresponds to the target row based on the operands of the first target dimension (the determination process is the same as described in the first implementation and will not be repeated here). Similarly, in the second implementation, if client 100 wants to determine which dimension member under the second target dimension corresponds to the target column in the multidimensional form, it can first calculate the operand of the second target dimension based on the order relationship of the above N dimensions in the multidimensional form, and then determine which dimension member under the second target dimension corresponds to the target column based on the operand of the second target dimension (the determination process is the same as described in the first implementation, and will not be repeated here).

[0122] Optionally, the query results may also include basic information of the members of each dimension associated with the multidimensional form. The basic information of the dimension members includes the ID (used to uniquely identify the corresponding dimension member), name, attributes, etc.

[0123] Optional, such as Figure 3 As shown, the query results also include style metadata, which instructs the client to use the style when displaying multiple values ​​in a multidimensional form. For example, style metadata may include cell width and height, the number of decimal places in the cell value, whether the font is bold, background color, alignment, and so on. The style metadata given in this example is for illustrative purposes only and does not constitute a specific limitation. In practical applications, style metadata may include more or fewer descriptions of the styles of the cells containing the values. Style metadata can instruct the styles of some or all cells in a multidimensional form. These cells uniformly reference this style metadata for cell style rendering. This eliminates the need to specify the style of each cell containing each value in the query results, helping to reduce the amount of data transmitted and improving the client's form rendering performance.

[0124] 4. Sending module 230: Used to transmit the query results to the client 100.

[0125] 5. Receiving module 120: Used to receive query results transmitted from the database management system 200.

[0126] 6. Processing module 130: Used to parse the obtained query results, and then instruct the interaction module 140 to render and display the multidimensional form based on the parsed content.

[0127] Specifically, when the receiving module 120 in client 100 receives the query result sent by the database management system 200, it sends the query result to the processing module 130 for parsing. The processing module 130 determines the number of rows and columns of the multidimensional form based on the query result, and then uses the values ​​from the cell value array in the query result to sequentially fill multiple cells of the corresponding number of rows and columns, thus achieving fast rendering and display of the multidimensional form. When client 100 needs to determine the dimension member corresponding to a certain value on the multidimensional form, the processing module 130 in client 100 can determine it based on the member metadata and row / column metadata in the query result.

[0128] For example, suppose client 100 successfully displays a multidimensional form on client 100 by parsing the query results. Then, the user performs an operation on the interaction module 140 of client 100 to request to view the dimension member corresponding to a certain value in the multidimensional form. Client 100 can determine the dimension member corresponding to the cell based on the member metadata and row and column metadata in the query results (the specific determination method can be referred to the previous introduction), and then prompt the user with the dimension member corresponding to the value.

[0129] For example, suppose a user performs an operation on the interaction module 140 of client 100, modifying a value in a multidimensional form. The user then requests to save the modification. Client 100 can determine the corresponding dimension member based on the member metadata and row / column metadata in the query results (the specific determination method can be found above). It then sends the determined dimension member information and the modified value to the database management system 200. The data management system, based on the received dimension member information, saves the modified value to the corresponding location of that dimension member in the multidimensional database 300. After saving, the database management system 200 can also send a save success message to client 100 to indicate that the modified value has been successfully saved to the multidimensional database 300.

[0130] 7. Interaction Module 140: This module displays the multidimensional form and facilitates human-computer interaction. Users can specify the dimensions and members associated with the multidimensional form, as well as the order of these dimensions, through the interaction module 140. The specific functions of the interaction module 140 are detailed above and will not be repeated here.

[0131] It should be noted that, Figure 1 The client 100 and database management system 200 are simply divided into the functional modules described above, based on their functions. In reality, Figure 1 Both the client 100 and the database management system 200 can contain more or fewer modules. For example, a module can be split into multiple functional modules, or two or more modules in the client 100 / database management system 200 can be merged into one functional module. Other functional modules can also be added to the client 100 and database management system 200; this application does not specifically limit this. The sending module 110, receiving module 120, processing module 130, interaction module 140, receiving module 210, processing module 220, and sending module 230 can all be implemented in software or in hardware. For example, the implementation of processing module 220 will be described below. Similarly, the implementation of other modules can refer to the implementation of processing module 220.

[0132] As an example of a software functional unit, processing module 220 may include code running on a compute instance. The compute instance may include at least one of a physical host (compute device), a virtual machine, or a container. Further, there may be one or more compute instances. For example, processing module 220 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs. Similarly, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same virtual private cloud (VPC) or in multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC. The interconnection between VPCs is achieved through the communication gateway.

[0133] As an example of a hardware functional unit, processing module 220 may include at least one computing device, such as a server. Alternatively, processing module 220 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0134] The processing module 220 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 220 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 220 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0135] Based on the above, the data processing method provided in this application is described below.

[0136] Please see Figure 6 , Figure 6 This is a flowchart illustrating a data processing method provided in this application, including the following steps S601 to S606.

[0137] S601, Client 100 sends a query request to Database Management System 200.

[0138] The query request is used to instruct data query processing for the multidimensional forms associated with the multidimensional database 300. Correspondingly, the database management system 200 receives the query request sent by the client 100.

[0139] For details regarding query requests and multidimensional forms, please refer to the previous introduction; they will not be repeated here.

[0140] S602, Database Management System 200 determines the multiple dimension members associated with the multidimensional form based on the query request.

[0141] The aforementioned multiple dimension members belong to multiple dimensions in the multidimensional database 300.

[0142] For details on how to determine the multiple dimension members associated with a multidimensional form based on a query request, please refer to Case 1 to Case 3 described above, which will not be repeated here.

[0143] S603, Database Management System 200 determines data and location information based on multiple dimensions of members.

[0144] The data consists of multiple values ​​corresponding to multiple dimension members in the multidimensional database 300. The location information is used to indicate the row and column positions of these multiple values ​​in the multidimensional form and the member corresponding to each value among the multiple dimension members.

[0145] First, we will explain how to determine the data, that is, the multiple values ​​corresponding to multiple dimension members in the multidimensional database 300.

[0146] The database management system 200 first requests the multidimensional database 300 to retrieve the multiple values ​​corresponding to the multiple dimension members in the multidimensional database 300. Then, the multidimensional database 300 responds to the request and sends the multiple values ​​back to the database management system 200.

[0147] Optionally, the database management system 200 can directly send information (such as ID or name) of multiple dimension members to the multidimensional database 300. Then, the multidimensional database 300 extracts the corresponding values ​​of the multiple dimension members in the multidimensional database 300 based on the received information, and then returns the multiple values ​​to the database management system 200.

[0148] by Figure 2 For example, as can be seen from the previous introduction, Figure 2 The multidimensional form associates eight dimensions. The database management system 200 can send the IDs of these eight dimensions to the multidimensional database 300, effectively extending the data query scope to the multidimensional database 300. Then, based on the IDs of these eight dimensions, the multidimensional database 300 extracts the corresponding values ​​for each of these eight dimensions from its own database and returns the extracted values ​​to the database management system 200.

[0149] Optionally, the database management system 200 may first calculate the member tuple for each of the multiple values, and then send the member tuple corresponding to each value to the multidimensional database 300. For each member tuple, the multidimensional database 300 extracts the value at the corresponding position in the multidimensional database 300, which is the value corresponding to the member tuple, and then returns the value and the member tuple to the database management system 200.

[0150] Continue with Figure 2For example, as described above, the database management system 200 can use the Cartesian product algorithm to calculate the member tuples for multiple values. Details can be found in the previous description and will not be repeated here. Then, the database management system 200 can send the member tuple of each value to the multidimensional database 300 to request the value corresponding to each member tuple. For any received member tuple, the multidimensional database 300 can extract a value from the corresponding position of that member tuple in the multidimensional database 300, and then return that value along with the member tuple to the database management system 200.

[0151] The following describes how to determine location information.

[0152] When the database management system 200 obtains multiple values ​​from the multidimensional database 300, it can fill each value into a cell in the multidimensional form that corresponds to the same member tuple, and then use the row and column position of the cell in the multidimensional form as the position information of the value.

[0153] Continue with Figure 2 For example, suppose the database management system 200 has received 12 values ​​from the multidimensional database 300, one of which is 100. The member tuples for this value include 2015, Product A, Sales Volume, and Region 1. Since the cell in row 0, column 0 of the multidimensional form also corresponds to this member tuple, the database management system 200 can fill this value into that cell and use the row and column position of that cell in the multidimensional form as the row and column position of the value, i.e., row 0, column 0. It can be understood that other values ​​besides the 12 can also be filled into corresponding cells and their row and column positions determined in a similar way; this will not be discussed further here.

[0154] When all 12 values ​​are entered into the multidimensional form, the following can be obtained: Figure 3 The multidimensional form can determine position information, which indicates the row and column position of each of the 12 values ​​and the member tuple of each value (i.e., the member corresponding to each value in the multiple dimension members associated with multiple forms).

[0155] S604, the database management system 200 converts the data into an array and compresses the location information to obtain compressed information.

[0156] The data consists of multiple values ​​corresponding to various dimensions in the multidimensional database 300. These values ​​can be written into an array according to their order in the multidimensional form. For details on converting the obtained values ​​into an array, please refer to the previous explanation; it will not be repeated here.

[0157] Location information is used to indicate the row and column positions of multiple values ​​in a multidimensional form and the member corresponding to each value among multiple dimensions. The database management system 200 can first determine the correspondence between different row numbers in the multidimensional form and multiple dimension members based on the location information, and then generate compressed information to indicate this correspondence.

[0158] Continue with Figure 3 For example, when the database management system 200 receives... Figure 3 When creating a multidimensional form, location information can be determined. This location information indicates the row and column positions of the 12 values ​​and the corresponding member among multiple dimension members for each value. Then, the database management system 200 can determine the dimension members corresponding to each row number in the multidimensional form based on the location information. For example, row number 0 corresponds to dimension members including 2015, product A, and sales volume; row number 1 corresponds to dimension members including 2015, product B, and sales volume; row number 2 corresponds to dimension members including 2015, product C, and sales volume; row number 3 corresponds to dimension members including 2016, product A, and sales volume; row number 4 corresponds to dimension members including 2016, product B, and sales volume; and row number 5 corresponds to dimension members including 2016, product C, and sales volume.

[0159] Then, the database management system 200 can generate compressed information based on the previously determined correspondence between the 6 row numbers and dimension members. The compressed information is used to indicate the above correspondence.

[0160] Optionally, the compressed information includes the above correspondence. Alternatively, the compressed information includes the target row number, the operands corresponding to the first dimension, and the order relationship between members belonging to the first dimension among multiple dimension members associated with the multidimensional form. Here, the first dimension is one of the multiple dimensions associated with the multidimensional form (it can be any dimension associated with a row structure), the target row number is any row number in the multidimensional form, the target row number corresponds to a dimension member under the first dimension (denoted as the first dimension member), the index value of the first dimension member in the above order relationship is equal to the remainder obtained by dividing the first value by the number of members belonging to the first dimension among the multiple dimension members, and the first value is the quotient obtained by dividing the target row number by the operands of the first dimension.

[0161] Regarding the values ​​of the operands in the first dimension, please refer to Type 1 to Type 3 introduced earlier, which will not be repeated here.

[0162] Optionally, the database management system 200 can also determine the correspondence between different column numbers in the multidimensional form and multiple dimension members associated with the multidimensional form based on the location information, and then carry the correspondence in the compressed information, or generate information in the compressed information to indicate the correspondence.

[0163] Continue with Figure 3For example, when the database management system 200 receives... Figure 3 When dealing with multidimensional forms, location information can be determined. This location information indicates the row and column positions of the 12 values ​​and the member corresponding to each value among multiple dimension members. Then, the database management system 200 can determine the dimension member corresponding to each column number in the multidimensional form based on the location information. For example, column number 0 corresponds to region 1, and column number 2 corresponds to region 2. At this point, the database management system 200 can directly include this correspondence in compressed information, or generate information indicating this correspondence.

[0164] This information includes the target column number, the operands corresponding to the second dimension, and the order relationship between members belonging to the second dimension among the multiple dimension members associated with the multidimensional form. Here, the second dimension is one of the multiple dimensions associated with the multidimensional form (it can be any dimension in the column structure), the target column number is any column number in the multidimensional form, the target column number corresponds to a dimension member under the second dimension (denoted as the second dimension member), the index value of the second dimension member in the above order relationship is equal to the remainder obtained by dividing the second value by the number of members belonging to the second dimension among the multiple dimension members, and the second value is the quotient obtained by dividing the target column number by the operands of the second dimension.

[0165] Regarding the values ​​of the operands in the second dimension, please refer to Types 4 to 6 introduced earlier, which will not be repeated here.

[0166] Optionally, the compression information also includes a row number array, which contains different row numbers from the multidimensional form. The length of the row number array is less than or equal to the product of the number of members in each dimension associated with the multidimensional form, and the length of the row number array is less than or equal to the product of the number of members in each dimension corresponding to the row structure of the multidimensional form. As described above, if the database management system 200 clears one or more rows in the multidimensional form, the length of the row number array is less than the product of the number of members in each dimension corresponding to the row structure of the multidimensional form, thereby reducing the amount of data transmitted to the client 100. If one or more rows in the multidimensional form are not cleared, the length of the row number array is equal to the product of the number of members in each dimension corresponding to the row structure of the multidimensional form.

[0167] Optionally, the compressed information may also include a column number array, which includes the different column numbers in the multidimensional form. The length of the column number array is less than or equal to the product of the number of members in each dimension corresponding to the column structure of the multidimensional form. As described above, if one or more columns in the multidimensional form are cleared, the length of the column number array is less than the product of the number of members in each dimension corresponding to the column structure of the multidimensional form. If one or more rows in the multidimensional form are not cleared, the length of the column number array is equal to the product of the number of members in each dimension corresponding to the column structure of the multidimensional form.

[0168] S605, the database management system 200 transmits query results to the client 100. The query results include arrays and compressed information.

[0169] For information on arrays and compression in the query results, please refer to the previous text; it will not be repeated here.

[0170] Optionally, the query results may also include style metadata, which indicates the style used when the client displays multiple values. For details on styles and style metadata, please refer to the previous section; they will not be repeated here.

[0171] Optionally, the query results also include status information, which indicates the status of multiple values ​​in the multidimensional database 300. Status includes writable and read-only states. Status information can be represented as an array of cell statuses. For details on cell value status arrays, please refer to the previous section; they will not be repeated here.

[0172] S606 and Client 100 display a multidimensional form based on the query results.

[0173] For information on how the client-side 100 displays a multidimensional form based on query results, please refer to the previous introduction; it will not be repeated here.

[0174] In summary, in the data processing method provided in this application, the database management system 200 first determines the multiple dimension members associated with the multidimensional form based on the query results sent by the client 100. Then, based on these multiple dimension members, it determines the data and location information. The data consists of multiple values ​​corresponding to the multiple dimension members in the multidimensional database 300. The location information indicates the row and column positions of the multiple values ​​in the multidimensional form and the member corresponding to each value among the aforementioned multiple dimension members. The data is then converted into an array, and the location information is compressed to obtain compressed information. Finally, the array and compressed information are carried in the query results for transmission to the client 100.

[0175] Compared to the conventional approach of directly sending all values ​​from a multidimensional form, along with the row and column coordinates and corresponding dimension members of each value, to client 100, the method provided in this application compresses the location information and then sends the compressed information and the generated array (including the aforementioned values) to client 100. This reduces the overall data transmission volume from database management system 200 to client 100, thereby shortening data transmission time. The array is filled with the values ​​according to their order in the multidimensional form. When client 100 receives this array, it can directly load these values ​​into the multidimensional form displayed on client 100 according to the order of the values ​​in the array, improving the form display speed on client 100 and thus enhancing user experience.

[0176] This application also provides a data processing apparatus, the apparatus comprising: Figure 1 The device comprises a receiving module 210, a processing module 220, and a transmitting module 230. Specifically, this device is used to perform... Figure 6 The method steps for the database management system 200 are described below. For details regarding the specific functions and hardware / software implementation of the receiving module 210, processing module 220, and sending module 230, please refer to [reference needed]. Figure 1 The relevant information is omitted here.

[0177] The following describes how to execute... Figure 6 A computing device for data processing methods.

[0178] Please see Figure 7 This application also provides a computing device 700, including a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 may be a server, a laptop computer, a desktop computer, an edge device, etc., and the embodiments of this application do not specifically limit it, nor do they limit the number of processors and memories in the computing device 700.

[0179] The 702 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the computing device 700 (e.g., memory 706, processor 704, communication interface 708).

[0180] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0181] The memory 706 may include volatile memory, such as random access memory (RAM). The processor 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0182] The memory 706 stores executable program code. The processor 704 executes the executable program code to implement... Figure 1 The receiving module 210, processing module 220, and transmitting module 230 in the present application perform their functions to realize the present application. Figure 6 The method and steps of the database management system 200 in China.

[0183] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.

[0184] It should be understood that the computing device 700 according to this application may correspond to this application. Figure 1 The database management system 200 or client 100 shown can be used to execute this application. Figures 2 to 6 The corresponding entities in the data processing method shown, and the various modules of the computing device 700, are respectively implemented to achieve... Figures 2 to 6 For the sake of brevity, the corresponding processes of each method in the code will not be elaborated here.

[0185] As one possible implementation, the computing device 700 may also include a chip system, which includes a processor and a power supply circuit. The power supply circuit supplies power to the processor, and the processor executes the operation steps corresponding to the data processing method. For simplicity, further details are omitted here. The processor can be implemented using a CPU, or it can be implemented using computing devices or AI chips such as GPUs, DPUs, NPUs, XPUs, SoCs, offloading cards, or accelerator cards.

[0186] As one possible implementation, the computing device 700 may include multiple types of processors 704, meaning the computing device 700 is a heterogeneous device. For example, the computing device 700 may include a CPU and a GPU, and the operation steps corresponding to the data processing method can be executed by at least one of the processors 704. For the sake of brevity, further details will not be provided here.

[0187] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0188] like Figure 8 As shown, the computing device cluster includes at least one computing device 700. The memory 706 in one or more computing devices 700 of the computing device cluster may store the same memory for executing... Figure 6 Instructions for methods on the database management system 200 side.

[0189] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store memory for executing the aforementioned commands. Figure 6 The instructions for the methods on the database management system 200 side. In other words, a combination of one or more computing devices 700 can jointly execute instructions for... Figure 6 Instructions for methods on the database management system 200 side.

[0190] It should be noted that the memory 706 in different computing devices 700 within the computing device cluster can store different instructions, each for execution. Figure 1 The database management system 200 has some of the functions. That is, the instructions stored in the memory 706 of different computing devices 700 can realize the functions of one or more of the modules in the receiving module 210, processing module 220 and sending module 230.

[0191] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 One possible implementation is shown. For example... Figure 9 As shown, the two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through the communication interface in each computing device. In this possible implementation, the memory 706 in computing device 700A stores instructions for performing the functions of the receiving module 210 and the transmitting module 230. Meanwhile, the memory 706 in computing device 700B stores instructions for performing the functions of the processing module 220.

[0192] It should be understood that Figure 9 The functions of the computing device 700A shown can also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be performed by multiple computing devices 700.

[0193] This application also provides another type of computing device cluster. The interconnection relationships between the computing devices in this computing device cluster can be similarly referenced. Figure 9 The connection method of the computing device cluster. The difference is that the memory 706 in one or more computing devices 700 within this computing device cluster can store the same memory used for executing the preceding... Figure 6 Instructions for methods on the database management system 200 side.

[0194] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store resources for executing implementations. Figure 6 The instructions of the method on the database management system 200 side. In other words, a combination of one or more computing devices 700 can jointly execute instructions for implementing... Figure 6 The instructions for the method steps in the database management system 200.

[0195] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a cluster of computing devices (including at least one computing device) to execute... Figure 6 The method and steps of the database management system 200 in China.

[0196] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform... Figure 6 The method and steps of the database management system 200 in China.

[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method, characterized in that, The method is executed by a database management system, and the method includes: Receive a query request sent by a client, the query request being used to instruct data query processing on a multidimensional form associated with a multidimensional database; The query request determines the multiple dimension members associated with the multidimensional form, and the multiple dimension members belong to multiple dimensions in the multidimensional database; Data and location information are determined based on the multiple dimension members, wherein the data consists of multiple values ​​corresponding to the multiple dimension members in the multidimensional database, and the location information is used to indicate the row and column positions of the multiple values ​​in the multidimensional form and the member corresponding to each value in the multiple dimension members; The data is converted into an array, and the location information is compressed to obtain compressed information; The query results are transmitted to the client, and the query results include the array and the compressed information.

2. The method according to claim 1, characterized in that, The step of converting the data into an array includes: The values ​​are written into the array according to their order of arrangement in the multidimensional form.

3. The method according to claim 1 or 2, characterized in that, The location information includes a row number, and the compression of the location information to obtain compressed information includes: The correspondence between different row numbers of the multidimensional form and the multiple dimension members is determined based on the location information; Generate compressed information, which is used to indicate the correspondence.

4. The method according to claim 3, characterized in that, The compression information includes the target row number, the operands corresponding to the first dimension, and the order relationship between members belonging to the first dimension among the multiple dimension members. The first dimension is one of the multiple dimensions. The index value of the first dimension member corresponding to the target row number in the order relationship is equal to the remainder obtained by dividing the first value by the number of members belonging to the first dimension among the multiple dimension members. The first dimension member belongs to the first dimension. The first value is the quotient obtained by dividing the target row number by the operands. Wherein, if the number of other dimensions following the first dimension is zero, the value of the operand is 1; if the number of other dimensions is 1, the value of the operand is the number of members of the other dimensions associated with the multidimensional form; if the number of other dimensions is greater than 1, the value of the operand is the product of the number of members of the other dimensions associated with the multidimensional form.

5. The method according to claim 3 or 4, characterized in that, The compressed information also includes a row number array, which includes different row numbers of the multidimensional form, and the length of the row number array is less than or equal to the product of the number of members of each dimension associated with the multidimensional form.

6. The method according to any one of claims 1 to 5, characterized in that, The query results also include style metadata, which is used to indicate the style used by the client when displaying the multiple values.

7. The method according to any one of claims 1 to 6, characterized in that, The query results also include status information, which indicates the status of the multiple values ​​in the multidimensional database. The status includes writable status and read-only status.

8. A data processing apparatus, characterized in that, include: The receiving module is used to receive query requests sent by the client, the query requests being used to instruct data query processing of the multidimensional form associated with the multidimensional database; The processing module is used to determine, based on the query request, multiple dimension members associated with the multidimensional form, wherein the multiple dimension members belong to multiple dimensions in the multidimensional database; The processing module is further configured to determine data and location information based on the multiple dimension members, wherein the data is multiple values ​​corresponding to the multiple dimension members in the multidimensional database, and the location information is used to indicate the row and column positions of the multiple values ​​in the multidimensional form and the member corresponding to each value in the multiple dimension members; The processing module is further configured to convert the data into an array and compress the position information to obtain compressed information; The sending module is used to transmit query results to the client, the query results including the array and the compressed information.

9. The apparatus according to claim 8, characterized in that, The processing module is specifically used for: The values ​​are written into the array according to their order of arrangement in the multidimensional form.

10. The apparatus according to claim 8 or 9, characterized in that, The location information includes row numbers, and the processing module is specifically used for: The correspondence between different row numbers of the multidimensional form and the multiple dimension members is determined based on the location information; Generate compressed information, which is used to indicate the correspondence.

11. The apparatus according to claim 10, characterized in that, The compression information includes the target row number, the operands corresponding to the first dimension, and the order relationship between members belonging to the first dimension among the multiple dimension members. The first dimension is one of the multiple dimensions. The index value of the first dimension member corresponding to the target row number in the order relationship is equal to the remainder obtained by dividing the first value by the number of members belonging to the first dimension among the multiple dimension members. The first dimension member belongs to the first dimension. The first value is the quotient obtained by dividing the target row number by the operands. Wherein, if the number of other dimensions following the first dimension is zero, the value of the operand is 1; if the number of other dimensions is 1, the value of the operand is the number of members of the other dimensions associated with the multidimensional form; if the number of other dimensions is greater than 1, the value of the operand is the product of the number of members of the other dimensions associated with the multidimensional form.

12. A computing device, further comprising a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 7.