A multidimensional data processing method and system
Through independent two-dimensional table calculation module and model conversion module, multi-dimensional data is converted into two-dimensional grid data and displayed in a spreadsheet, which solves the scalability problem during multi-dimensional data conversion in the prior art and achieves more efficient maintenance and expansion.
Patent Information
- Application Number
- CN202111633044.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In the prior art, the mutual conversion of multidimensional data to two-dimensional table models involves coupled grid display layers, two-dimensional table computing and data storage technologies, resulting in poor scalability of each technology and time-consuming and labor-intensive maintenance in the later stage.
Through independent two-dimensional table calculation modules and model conversion modules, multi-dimensional data is converted into two-dimensional grid data and displayed through spreadsheet display controls to improve the scalability of each module.
The function of converting multidimensional data into two-dimensional grid data and displaying it in a spreadsheet is realized, which improves the scalability between the two-dimensional table calculation module and the model conversion module, and simplifies post-maintenance.
Smart Images

Figure CN114282502B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a multidimensional data processing method and system. Background Art
[0002] In the prior art, the conversion between multidimensional data and two-dimensional table models generally involves grid display layer technology, two-dimensional table calculation technology and data storage technology. The above three technologies in the prior art are generally coupled together, resulting in the need to change the code of the entire technology when any technology needs to be expanded, resulting in poor scalability of each technology and time-consuming and labor-intensive subsequent maintenance procedures. Summary of the invention
[0003] An embodiment of the present invention provides a multidimensional data processing method and system, which is used to convert multidimensional data into two-dimensional grid data through independent two-dimensional table calculation modules and model conversion modules, and display the two-dimensional grid data through a spreadsheet display control to improve the scalability of each module.
[0004] A first aspect of an embodiment of the present application provides a multidimensional data processing method, which is applied to a multidimensional data processing system, wherein the multidimensional data processing system comprises: a database, a two-dimensional table calculation module, a model conversion module and an instruction generator, wherein the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively;
[0005] The method comprises:
[0006] Get multidimensional data from the database;
[0007] Acquire the multidimensional data using the two-dimensional table calculation module, and convert the multidimensional data into two-dimensional grid data;
[0008] Using the model conversion module to acquire the two-dimensional grid data, and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid;
[0009] The instruction generator is used to generate a combination instruction from the model data, and the combination instruction is sent to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data.
[0010] Preferably, the multidimensional data processing system further includes a report data query service module. After acquiring the multidimensional data from the database, the method further includes:
[0011] The report data query service module is used to obtain the multidimensional data, and the multidimensional data is formatted to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0012] Preferably, the using the two-dimensional table calculation module to obtain the multi-dimensional data and converting the multi-dimensional data into two-dimensional grid data includes:
[0013] Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0014] The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
[0015] Preferably, the using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information, respectively, includes:
[0016] Using the two-dimensional table calculation module to arrange and combine multiple different pages according to the page dimension information;
[0017] For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node;
[0018] Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively;
[0019] Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node;
[0020] According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
[0021] Preferably, the using the two-dimensional table calculation module to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data includes:
[0022] The following steps are performed for each page loop, including:
[0023] Filtering out first data belonging to a first page from the multidimensional data using the two-dimensional table calculation module, where the first page dimension is any page of the multiple pages;
[0024] According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data;
[0025] The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
[0026] Preferably, after traversing the second data according to the column header of the first page to determine the third data corresponding to each cell in the first page, the method further includes:
[0027] The third data is deleted from the multi-dimensional data to narrow the traversal range of the next page data.
[0028] Preferably, the method further comprises:
[0029] Using the two-dimensional table calculation module to obtain the two-dimensional grid data from the model conversion module;
[0030] The two-dimensional grid data is converted into the multi-dimensional flattened data structure.
[0031] Preferably, converting the two-dimensional grid data into the multi-dimensional flattened data structure comprises:
[0032] According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
[0033] Preferably, after converting the two-dimensional grid data into the multi-dimensional flattened data structure, the method further comprises:
[0034] Utilizing the report data query service module to perform format conversion on the multidimensional flat data structure, so as to convert the multidimensional flat data structure into multidimensional data that can be stored in the database;
[0035] The multidimensional data is stored in the database.
[0036] A second aspect of an embodiment of the present application provides a multidimensional data processing system, the system comprising:
[0037] Database, used to store multidimensional data;
[0038] A two-dimensional table calculation module, used for acquiring the multi-dimensional data and converting the multi-dimensional data into two-dimensional grid data;
[0039] A model conversion module, used for acquiring the two-dimensional grid data and converting the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style and coordinates of cells in the two-dimensional grid;
[0040] An instruction generator, used for generating a combination instruction from the model data, and sending the combination instruction to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data according to the data style and the coordinates of the cells in the two-dimensional grid;
[0041] Among them, the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively.
[0042] Preferably, the multidimensional data processing system further comprises:
[0043] The report data query service module is used to obtain the multidimensional data and perform format conversion on the multidimensional data to convert the multidimensional data into a multidimensional flat data structure that can be recognized by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0044] Preferably, the two-dimensional table calculation module is specifically used for:
[0045] Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0046] The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
[0047] Preferably, the two-dimensional table calculation module is specifically used for:
[0048] Arrange and combine a plurality of different pages according to the page dimension information;
[0049] For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node;
[0050] Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively;
[0051] Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node;
[0052] According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
[0053] Preferably, the two-dimensional table calculation module is specifically used for:
[0054] The following steps are performed for each page loop, including:
[0055] Filtering out first data belonging to a first page from the multidimensional data using the two-dimensional table calculation module, where the first page dimension is any page of the multiple pages;
[0056] According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data;
[0057] The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
[0058] Preferably, the two-dimensional table calculation module is also used for:
[0059] After traversing the second data according to the column header of the first page to determine the third data corresponding to each cell in the first page, the third data is deleted from the multidimensional data to narrow the traversal range of the next page data.
[0060] Preferably, the two-dimensional table calculation module is also used for:
[0061] Acquire the two-dimensional grid data from the model conversion module;
[0062] The two-dimensional grid data is converted into the multi-dimensional flattened data structure.
[0063] Preferably, the two-dimensional table calculation module is specifically used for:
[0064] According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
[0065] Preferably, the report data query service module is also used for:
[0066] Performing format conversion on the multidimensional flat data structure to convert the multidimensional flat data structure into multidimensional data that can be stored in the database;
[0067] The multidimensional data is stored in the database.
[0068] The embodiment of the present application further provides a computer device, comprising a processor, wherein the processor is used to implement the multidimensional data processing method described in the first aspect of the embodiment of the present application when executing a computer program stored in a memory.
[0069] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the multidimensional data processing method described in the first aspect of the embodiment of the present application.
[0070] The embodiment of the present application also provides a computer program product, which, when executed by a computer, is used to implement the multidimensional data processing method described in the first aspect of the embodiment of the present application.
[0071] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
[0072] In an embodiment of the present application, multidimensional data is obtained from a database through independent two-dimensional table calculation modules and model conversion modules, and the multidimensional data is further converted into two-dimensional grid data, and then the two-dimensional grid data is converted into model data displayed in a spreadsheet display control, and finally the spreadsheet display control displays the two-dimensional grid data, thereby improving the scalability between the two-dimensional table calculation module and the model conversion module. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A schematic diagram of an embodiment of a multidimensional data processing method in an embodiment of the present application;
[0074] Figure 2 for Figure 1 A refinement of step 102 in the embodiment;
[0075] Figure 3 This is a schematic diagram of a process for determining different pages based on multi-dimensional flattened data in an embodiment of the present application;
[0076] Figure 4 A schematic diagram of a column dimension member tree and a row dimension member tree in an embodiment of the present application;
[0077] Figure 5 This is a schematic diagram of a two-dimensional grid data header in an embodiment of the present application;
[0078] Figure 6 This is a schematic diagram of filtering data in the D1E1 page from multidimensional data in an embodiment of the present application;
[0079] Figure 7 This is another schematic diagram of a method for processing multidimensional data in an embodiment of the present application;
[0080] Figure 8 This is a schematic diagram of the structure of two-dimensional grid data in an embodiment of the present application;
[0081] Fig. 9 This is a schematic diagram of a multi-dimensional flat data structure in an embodiment of the present application;
[0082] Fig.10 It is a schematic diagram of an embodiment of a multidimensional data processing system in an embodiment of the present application. DETAILED DESCRIPTION
[0083] An embodiment of the present invention provides a multidimensional data processing method and device, which is used to convert multidimensional data into two-dimensional grid data through independent two-dimensional table calculation modules and model conversion modules, and display the two-dimensional grid data through a spreadsheet display control to improve the scalability of each module.
[0084] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0085] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0086] For ease of understanding, the professional terms involved in this application are first explained, and this explanation is used in the subsequent description:
[0087] SpreadJS: A JavaScript-based spreadsheet control that provides an Excel-like spreadsheet experience by displaying data in a tabular form on the front end as a carrier for displaying two-dimensional grid data.
[0088] Spread model: The background data model corresponding to the SpreadJS front-end display framework encapsulates the data and style information required by the front-end grid.
[0089] Dimension: It is an angle to observe data. For example, when compiling data based on the purpose of funds, business unit, engineering project, currency, and settlement method, the purpose of funds, business unit, and currency are all considered dimensions. Dimension is essential information when creating a data template.
[0090] Based on the prior art, when converting multidimensional data into two-dimensional table data, the grid display layer technology, the two-dimensional table calculation technology and the data storage technology are generally coupled together, resulting in the need to change the code of the entire technology when any technology needs to be expanded, thereby causing the problem of poor scalability of each technology. The present application proposes a multidimensional data processing method and system, which is used to convert multidimensional data into two-dimensional grid data through independent two-dimensional table calculation modules and model conversion modules, and display the two-dimensional grid data through a spreadsheet display control to improve the scalability of each module.
[0091] For ease of understanding, the multidimensional data processing method in the present application is described below, wherein the multidimensional data processing method is applied to a multidimensional data processing system, the multidimensional data processing system comprising: a database, a two-dimensional table calculation module, a model conversion module and an instruction generator, wherein the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively;
[0092] Please refer to Figure 1 , an embodiment of the multidimensional data processing method in the embodiment of the present application includes:
[0093] 101. Obtain multidimensional data from the database;
[0094] For the convenience of explanation, the present application embodiment takes SpreadJS application as an example to describe the conversion process of multidimensional data to two-dimensional table data:
[0095] Specifically, the embodiment of the present application converts multidimensional data into two-dimensional grid data that can be displayed by the SpreadJS control. The multidimensional data in the embodiment of the present application is generally stored in a database, wherein the database can be a relational database or a multidimensional database. There is no specific restriction on the type of database here.
[0096] 102. Acquire the multidimensional data using the two-dimensional table calculation module, and convert the multidimensional data into two-dimensional grid data;
[0097] In the embodiment of the present application, a two-dimensional table calculation module is used to obtain multidimensional data from a database, and the multidimensional data is further converted into two-dimensional grid data;
[0098] Specifically, the process of converting multi-dimensional data into two-dimensional grid data will be described in the following embodiments and will not be repeated here.
[0099] 103. Utilize the model conversion module to acquire the two-dimensional grid data, and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid;
[0100] Specifically in the SpreadJS application, after converting the multidimensional data into two-dimensional grid data, the Spread model conversion module obtains the two-dimensional grid data from the two-dimensional calculation module, and then converts the two-dimensional grid data into SpreadJS model data, wherein the SpreadJS model data at least includes the two-dimensional grid data, data style, and coordinates of cells in the two-dimensional grid, so as to facilitate the display of the two-dimensional grid data in the SpreadJS control.
[0101] 104. Utilize the instruction generator to generate a combination instruction from the model data, and send the combination instruction to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data.
[0102] Specifically, in a SpreadJS application, after SpreadJS model data is generated in a Spread model conversion module, if the SpreadJS model data is to be displayed in a SpreadJS control, it is also necessary to use a SpreadJS instruction generator to generate a combined instruction from the SpreadJS model data, and send the combined instruction to the SpreadJS control, so that the SpreadJS control displays the two-dimensional grid data.
[0103] Furthermore, the process of using the SpreadJS instruction generator to generate a combination instruction from the SpreadJS model data has been described in detail in the prior art and will not be repeated here.
[0104] It should be noted that the conversion between multidimensional data and two-dimensional grid data in this application is illustrated by using SpreadJS application as an example, but in addition to SpreadJS application, Figure 1 The method in the embodiment is applied in EXCEL application. Figure 1 The application scenarios of the embodiments are not specifically limited.
[0105] In an embodiment of the present application, multidimensional data is obtained from a database through independent two-dimensional table calculation modules and model conversion modules, and the multidimensional data is further converted into two-dimensional grid data, and then the two-dimensional grid data is converted into model data displayed in a spreadsheet display control, and finally the spreadsheet display control displays the two-dimensional grid data, thereby improving the scalability between the two-dimensional table calculation module and the model conversion module.
[0106] based on Figure 1 In the embodiment described, the multidimensional data processing system further includes a report data query service module. After step 101, the method further includes:
[0107] The report data query service module is used to obtain the multidimensional data, and the multidimensional data is formatted to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0108] Since database is a universal data storage method, the data in the database often only contains the data itself. Before converting multidimensional data into two-dimensional grid data, it is also necessary to obtain the header information of the two-dimensional grid data, that is, the page information, row dimension information and column dimension information of the two-dimensional grid data. Therefore, before converting the multidimensional data into two-dimensional grid data, the embodiment of the present application first converts the multidimensional data into a multidimensional flat data structure through a report data query service module, wherein the multidimensional flat data structure includes not only the multidimensional data, but also the template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information of the two-dimensional grid data.
[0109] To facilitate the conversion of multidimensional data into two-dimensional grid data.
[0110] based on Figure 1 The embodiment described above is described below. Figure 1 Step 102 in the embodiment is described in detail. Figure 2 , Figure 2 The detailed steps of step 102 are as follows:
[0111] 201. Determine, using the two-dimensional table calculation module, a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0112] For ease of understanding, combined Figure 3 To explain:
[0113] like Figure 3 As shown, it is assumed that the multidimensional flattened data structure includes multidimensional data and template information, wherein the template information includes page dimension information, row dimension information and column dimension information. It is assumed that the page dimension information includes two pages D and page E, wherein page D includes pages D1 and D2, and page E includes pages E1 and E2; the row dimension information includes row C1 and row C2, and the column dimension information includes columns A1 and A2, wherein A1 includes B1 and B2, and A2 includes B3 and B4.
[0114] The process of determining multiple different pages according to the two-dimensional table calculation module is as follows:
[0115] According to the page dimension information, a plurality of different pages are arranged and combined. For example, when the page dimension information includes D1, D2, E1 and E2, four different pages are arranged and combined, namely D1E1, D1E2, D2E1 and D2E2.
[0116] Furthermore, the process of determining the row headers in each page is as follows:
[0117] Assuming that page D1E1 is taken as an example, the process of determining the row header in page D1E1 is described. According to the row dimension information C1 and C2, a row dimension member tree is generated by a recursive algorithm. According to the column dimension information A1 and A2, where A1 includes B1 and B2, and A2 includes B3 and B4, a column dimension member tree is generated by a recursive algorithm, such as Figure 4 shown.
[0118] It can be seen that the row dimension information in page D1E1 is C1 and C2, and the column dimension information is A1B1, A1B2, A2B1 and A2B2. Figure 4 In the figure, the number of subtree nodes corresponding to each row node is the row span value of each row node. The number of subtree nodes corresponding to node C1 is 0, so the row span value of node C1 is 0, and the number of subtree nodes corresponding to node C2 is 0, so the row span value of node C2 is also 0; the number of subtree nodes corresponding to each column node is the column span value of each column node. The number of subtree nodes corresponding to node A1 is 2, so the column span value of node A1 is 2, and the number of subtree nodes corresponding to node A2 is 2, so the column span value of node A2 is also 2. The number of subtree nodes corresponding to nodes A1B1, A1B2, A2B1 and A2B2, respectively, is 0, so the column span values of nodes A1B1, A1B2, A2B1 and A2B2 are all 0, respectively.
[0119] By traversing the row member tree in page D1E1, we can get that the row headers of page D1E1 are C1 and C2. By traversing the column member tree in page D1E1, we can get that the first-level column headers of page D1E1 are A1 and A2, and the second-level column headers are A1B1, A1B2, A2B1, and A2B2.
[0120] In order to better display the first-level column headers and the second-level column headers, the number of cells occupied by each row header and column header can be determined according to the row span value of each row node and the column span value of each column node, and a merge operation can be performed on the cells occupied by the row headers and the column headers of each page to obtain the row headers and column headers that meet the preset format corresponding to each page.
[0121] like Figure 4 In the table, the row headers C1 and C2 have a row span value of 0, so the number of cells occupied by the row headers C1 and C2 is 1. The corresponding column span value of the first-level column headers A1 and A2 is 2, so the number of cells occupied by the first-level column headers A1 and A2 is 2, and the number of cells occupied by the second-level column headers A1B1, A1B2, A2B1 and A2B2 is 1. In order to better display the first-level column headers, the number of cells occupied by the first-level column headers A1 and A2 is merged to obtain Figure 5 The row and column headers are shown.
[0122] 202. Utilize the two-dimensional table calculation module to filter out two-dimensional grid data belonging to a corresponding row header and a corresponding column header of each page from the multidimensional data.
[0123] In step 201, after the row header and column header for displaying the two-dimensional grid data in page D1E1 are determined, the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of D1E1 are further filtered out from the multidimensional data.
[0124] The following is a detailed description of the process:
[0125] like Figure 6 As shown: the two-dimensional table calculation module is used to filter out the first data belonging to the D1E1 page from the multidimensional data; according to the row header of the first page, the first data is traversed to determine the second data in the first data corresponding to the row header of the first page; according to the column header of the first page, the second data is traversed to determine the third data corresponding to each cell in the first page.
[0126] Because multidimensional data, when displayed, will carry the page dimension information, row dimension information and column dimension information corresponding to each data, the first data belonging to page D1E1 can be filtered out from the multidimensional data through the page dimension information. After obtaining the first data, the first data is traversed with the row headers C1 and C2 respectively to filter out the second data belonging to the row headers C1 and C2 from the first data. After obtaining the second data, the second data is traversed with the column headers A1B1, A1B2, A2B1 and A2B2 respectively to filter out the third data belonging to the column headers A1B1, A1B2, A2B1 and A2B2 from the second data.
[0127] Furthermore, after filtering the two-dimensional grid data in page D1E1, in order to further narrow the data traversed by pages D1E2, D2E1 and D2E2, the third data belonging to page D1E1 can be further deleted in the multidimensional data to narrow the traversal range of the next page and improve the efficiency of filtering the two-dimensional grid data in each page.
[0128] In the embodiment of the present application, a process of converting multidimensional data into two-dimensional grid data by a two-dimensional table calculation module is described in detail, thereby improving the reliability of the process of converting multidimensional data into two-dimensional grid data.
[0129] The above describes in detail the process of converting multidimensional data into two-dimensional grid data by the two-dimensional table calculation module. The two-dimensional table calculation module in the embodiment of the present application can also perform the following steps to convert the two-dimensional grid data into the multidimensional flat data structure. Please refer to Figure 7 , Figure 7Another embodiment of the multidimensional data processing method in the embodiment of the present application is as follows:
[0130] 701. Obtain the two-dimensional grid data from the model conversion module using the two-dimensional table calculation module;
[0131] The two-dimensional table calculation module and model conversion module in the multidimensional data processing system are independent processing units, so the two-dimensional table calculation module can also obtain two-dimensional grid data from the model conversion module and further convert the two-dimensional grid data into the multidimensional flattened data structure.
[0132] 702. Convert the two-dimensional grid data into the multi-dimensional flattened data structure.
[0133] For ease of understanding, the following Figure 8 To explain:
[0134] Assume that the page dimension information of the two-dimensional grid data is D1E1, the row header is C1, the first-level column headers are A1 and A2, the second-level column headers are A1B1, A1B2, A2B1 and A2B2, and the cell data corresponding to each row header and column header is as follows Figure 8 shown.
[0135] The two-dimensional table calculation module traverses the data in each cell in the two-dimensional grid data according to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, so as to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header in the same row or in the same column, so as to obtain the multi-dimensional flattened data structure.
[0136] The details are as follows: Figure 8 , the page dimension information to which data v1 belongs is D1E1, the row dimension information is C1, and the column dimension information is A1B1; the page dimension information to which data v2 belongs is D1E1, the row dimension information is C1, and the column dimension information is A1B2; the page dimension information to which data v3 belongs is D1E1, the row dimension information is C1, and the column dimension information is A2B3; the page dimension information to which data v4 belongs is D1E1, the row dimension information is C1, and the column dimension information is A2B4. Finally, the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header to which it belongs, and the column header to which it belongs are displayed in the same row, and the following is obtained: Fig. 9 The multidimensional flattened data structure shown.
[0137] Of course, in addition to displaying the data in each cell in the two-dimensional grid data and the page information, row header and column header to which the data belongs in the same line, the data in each cell in the two-dimensional grid data and the page information, row header and column header to which the data belongs can also be displayed in the same column to obtain a multi-dimensional flat data structure, which will not be repeated here.
[0138] In the embodiment of the present application, a process of converting two-dimensional grid data into multidimensional data by a two-dimensional table calculation module is described in detail, thereby improving the reliability of the process of converting two-dimensional grid data into multidimensional data.
[0139] Furthermore, after obtaining the multidimensional flat data structure, in order to further store the multidimensional flat data in the database, the report data query service module can be further used to perform format conversion on the multidimensional flat data structure to convert the multidimensional flat data structure into multidimensional data that can be stored in the database; and the multidimensional data is stored in the database, wherein the process of converting the multidimensional flat data structure into multidimensional data that can be stored in the database is described in detail in the prior art and will not be repeated here.
[0140] The above describes the multidimensional data processing method in the embodiment of the present application. Next, the multidimensional data processing system in the present application is described. Fig.10 , Fig.10 This is a schematic diagram of an embodiment of a multidimensional data processing system in an embodiment of the present application. The multidimensional data processing system includes:
[0141] Database 1001, used to store multidimensional data;
[0142] A two-dimensional table calculation module 1002 is used to obtain the multi-dimensional data and convert the multi-dimensional data into two-dimensional grid data;
[0143] A model conversion module 1003 is used to obtain the two-dimensional grid data and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid;
[0144] An instruction generator 1004 is used to generate a combination instruction from the model data, and send the combination instruction to the electronic table display control, so that the electronic table display control displays the two-dimensional grid data according to the data style and the coordinates of the cells in the two-dimensional grid;
[0145] Among them, the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively.
[0146] Preferably, the multidimensional data processing system further comprises:
[0147] The report data query service module 1005 is used to obtain the multidimensional data and perform format conversion on the multidimensional data to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0148] Preferably, the two-dimensional table calculation module 1002 is specifically used for:
[0149] Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0150] The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
[0151] Preferably, the two-dimensional table calculation module 1002 is specifically used for:
[0152] Arrange and combine a plurality of different pages according to the page dimension information;
[0153] For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node;
[0154] Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively;
[0155] Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node;
[0156] According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
[0157] Preferably, the two-dimensional table calculation module 1002 is specifically used for:
[0158] The following steps are performed for each page loop, including:
[0159] Filtering out first data belonging to a first page from the multidimensional data using the two-dimensional table calculation module, where the first page dimension is any page of the multiple pages;
[0160] According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data;
[0161] The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
[0162] Preferably, the two-dimensional table calculation module 1002 is also used for:
[0163] After traversing the second data according to the column header of the first page to determine the third data corresponding to each cell in the first page, the third data is deleted from the multidimensional data to narrow the traversal range of the next page data.
[0164] Preferably, the two-dimensional table calculation module 1002 is also used for:
[0165] Acquire the two-dimensional grid data from the model conversion module;
[0166] The two-dimensional grid data is converted into the multi-dimensional flattened data structure.
[0167] Preferably, the two-dimensional table calculation module 1002 is specifically used for:
[0168] According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
[0169] Preferably, the report data query service module 1005 is also used for:
[0170] Performing format conversion on the multidimensional flat data structure to convert the multidimensional flat data structure into multidimensional data that can be stored in the database;
[0171] The multidimensional data is stored in the database.
[0172] It should be noted that the functions of each module in the embodiment of the present application are similar to Figures 1 to 9 The description is similar to that in , and will not be repeated here.
[0173] In an embodiment of the present application, multidimensional data is obtained from a database through a mutually independent two-dimensional table calculation module 1002 and a model conversion module 1003, and the multidimensional data is further converted into two-dimensional grid data, and then the two-dimensional grid data is converted into model data displayed in a spreadsheet display control, and finally the spreadsheet display control displays the two-dimensional grid data, thereby improving the scalability between the two-dimensional table calculation module and the model conversion module.
[0174] The multidimensional data processing system in the embodiment of the present invention is described above from the perspective of modular functional entities. The computer device in the embodiment of the present invention is described below from the perspective of hardware processing:
[0175] The computer device is used to implement the functions of the dimensional data processing system. In one embodiment of the present invention, the computer device includes:
[0176] Processor and memory;
[0177] The memory is used to store a computer program, and when the processor is used to execute the computer program stored in the memory, the following steps can be implemented:
[0178] Get multidimensional data from the database;
[0179] Acquire the multidimensional data using the two-dimensional table calculation module, and convert the multidimensional data into two-dimensional grid data;
[0180] Using the model conversion module to acquire the two-dimensional grid data, and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid;
[0181] The instruction generator is used to generate a combination instruction from the model data, and the combination instruction is sent to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data.
[0182] Preferably, the multidimensional data processing system further includes a report data query service module. In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0183] The report data query service module is used to obtain the multidimensional data, and the multidimensional data is formatted to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0184] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0185] Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0186] The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
[0187] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0188] Using the two-dimensional table calculation module to arrange and combine multiple different pages according to the page dimension information;
[0189] For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node;
[0190] Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively;
[0191] Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node;
[0192] According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
[0193] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0194] The following steps are performed for each page loop, including:
[0195] Filtering out first data belonging to a first page from the multidimensional data using the two-dimensional table calculation module, where the first page dimension is any page of the multiple pages;
[0196] According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data;
[0197] The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
[0198] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0199] The third data is deleted from the multi-dimensional data to narrow the traversal range of the next page data.
[0200] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0201] Using the two-dimensional table calculation module to obtain the two-dimensional grid data from the model conversion module;
[0202] The two-dimensional grid data is converted into the multi-dimensional flattened data structure.
[0203] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0204] According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
[0205] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0206] Utilizing the report data query service module to perform format conversion on the multidimensional flat data structure, so as to convert the multidimensional flat data structure into multidimensional data that can be stored in the database;
[0207] The multidimensional data is stored in the database.
[0208] It can be understood that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the above-mentioned corresponding device embodiments, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the multidimensional data processing system. For example, the computer program can be divided into the various units in the above-mentioned multidimensional data processing system, and each unit can implement the specific functions described in the above-mentioned corresponding multidimensional data processing system.
[0209] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that a processor and a memory are merely examples of computer devices and do not constitute a limitation of the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, and the like.
[0210] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0211] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0212] The present invention also provides a computer-readable storage medium, which is used to implement the functions of the multidimensional data processing system, and stores a computer program. When the computer program is executed by a processor, the processor can be used to perform the following steps:
[0213] Get multidimensional data from the database;
[0214] Acquire the multidimensional data using the two-dimensional table calculation module, and convert the multidimensional data into two-dimensional grid data;
[0215] Using the model conversion module to acquire the two-dimensional grid data, and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid;
[0216] The instruction generator is used to generate a combination instruction from the model data, and the combination instruction is sent to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data.
[0217] Preferably, the multidimensional data processing system further includes a report data query service module. In some embodiments of the present invention, when the computer program stored in the computer-readable storage medium is executed by the processor, the processor may be specifically configured to perform the following steps:
[0218] The report data query service module is used to obtain the multidimensional data, and the multidimensional data is formatted to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes the page dimension information, row dimension information and column dimension information.
[0219] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0220] Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information;
[0221] The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
[0222] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0223] Using the two-dimensional table calculation module to arrange and combine multiple different pages according to the page dimension information;
[0224] For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node;
[0225] Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively;
[0226] Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node;
[0227] According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
[0228] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0229] The following steps are performed for each page loop, including:
[0230] Filtering out first data belonging to a first page from the multidimensional data using the two-dimensional table calculation module, where the first page dimension is any page of the multiple pages;
[0231] According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data;
[0232] The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
[0233] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0234] The third data is deleted from the multi-dimensional data to narrow the traversal range of the next page data.
[0235] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0236] Using the two-dimensional table calculation module to obtain the two-dimensional grid data from the model conversion module;
[0237] The two-dimensional grid data is converted into the multi-dimensional flattened data structure.
[0238] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0239] According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
[0240] In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, the processor may be specifically configured to perform the following steps:
[0241] Utilizing the report data query service module to perform format conversion on the multidimensional flat data structure, so as to convert the multidimensional flat data structure into multidimensional data that can be stored in the database;
[0242] The multidimensional data is stored in the database.
[0243] It is understandable that if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned corresponding embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0244] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0245] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0246] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0247] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multidimensional data processing method, characterized in that: Applied to a multidimensional data processing system, the multidimensional data processing system comprises: a database, a two-dimensional table calculation module, a model conversion module and an instruction generator, wherein the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively; The method comprises: Get multidimensional data from the database; Acquire the multidimensional data using the two-dimensional table calculation module, and convert the multidimensional data into two-dimensional grid data; Using the model conversion module to acquire the two-dimensional grid data, and convert the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style, and coordinates of cells in the two-dimensional grid; The instruction generator is used to generate a combination instruction from the model data, and the combination instruction is sent to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data.
2. The method according to claim 1, characterized in that The multidimensional data processing system further includes a report data query service module. After acquiring the multidimensional data from the database, the method further includes: The report data query service module is used to obtain the multidimensional data, and the multidimensional data is formatted so as to convert the multidimensional data into a multidimensional flat data structure recognizable by the two-dimensional table calculation module, wherein the multidimensional flat data structure includes the multidimensional data and template information for displaying the multidimensional data, wherein the template information includes page dimension information, row dimension information and column dimension information.
3. The method according to claim 2, characterized in that The method of using the two-dimensional table calculation module to obtain the multi-dimensional data and converting the multi-dimensional data into two-dimensional grid data includes: Using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information; The two-dimensional table calculation module is used to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data.
4. The method according to claim 3, characterized in that The using the two-dimensional table calculation module to determine a plurality of different pages, and a row header and a column header of each page according to the page dimension information, the row dimension information, and the column dimension information, respectively, includes: Using the two-dimensional table calculation module to arrange and combine multiple different pages according to the page dimension information; For multiple pages, a row dimension member tree and a column dimension member tree corresponding to each page are generated respectively according to the row dimension information, column dimension information and a recursive algorithm of each page, wherein the number of subtree nodes corresponding to each row node in the row dimension member tree is the row span value of each row node, and the number of subtree nodes corresponding to each column node in the column dimension member tree is the column span value of each column node; Traversing the row dimension member tree and the column dimension member tree corresponding to each page to obtain the row header and the column header of each page respectively; Determine the number of cells occupied by the row header and the column header of each page according to the row span value of each row node and the column span value of each column node; According to the number of cells occupied by the row header and the column header of each page, a merge operation is performed on the cells occupied by the row header and the column header of each page to obtain a row header and a column header corresponding to each page that meet a preset format.
5. The method according to claim 3, characterized in that: The using the two-dimensional table calculation module to filter out the two-dimensional grid data belonging to the corresponding row header and the corresponding column header of each page from the multidimensional data includes: The following steps are performed for each page loop, including: Using the two-dimensional table calculation module to filter out first data belonging to a first page from the multi-dimensional data, where the first page is any page among the multiple pages; According to the row header of the first page, traverse the first data to determine the second data corresponding to the row header of the first page in the first data; The second data is traversed according to the column header of the first page to determine the third data corresponding to each cell in the first page.
6. The method according to claim 5, characterized in that After traversing the second data according to the column header of the first page to determine the third data corresponding to each cell in the first page, the method further includes: The third data is deleted from the multi-dimensional data to narrow the traversal range of the next page data.
7. The method according to claim 1, characterized in that The method further comprises: Using the two-dimensional table calculation module to obtain the two-dimensional grid data from the model conversion module; The two-dimensional grid data is converted into a multi-dimensional flat data structure.
8. The method according to claim 7, characterized in that The converting the two-dimensional grid data into the multi-dimensional flat data structure comprises: According to the page dimension information, row dimension information and column dimension information to which each cell data in the two-dimensional grid data belongs, the data in each cell in the two-dimensional grid data is traversed to display the data in each cell in the two-dimensional grid data and the page information to which the data belongs, the row header and the column header to which the data belongs in the same row or in the same column to obtain the multi-dimensional flattened data structure.
9. The method according to claim 7, characterized in that: After converting the two-dimensional grid data into the multi-dimensional flattened data structure, the method further includes: Using the report data query service module to perform format conversion on the multidimensional flat data structure, so as to convert the multidimensional flat data structure into multidimensional data that can be stored in the database; The multidimensional data is stored in the database.
10. A multidimensional data processing system, characterized in that: The system comprises: Database, used to store multidimensional data; A two-dimensional table calculation module, used for acquiring the multi-dimensional data and converting the multi-dimensional data into two-dimensional grid data; A model conversion module, used for acquiring the two-dimensional grid data and converting the two-dimensional grid data into model data, wherein the model data at least includes the two-dimensional grid data, a data style and coordinates of cells in the two-dimensional grid; An instruction generator, used for generating a combination instruction from the model data, and sending the combination instruction to a spreadsheet display control, so that the spreadsheet display control displays the two-dimensional grid data according to the data style and the coordinates of the cells in the two-dimensional grid; Among them, the two-dimensional table calculation module, the model conversion module and the instruction generator are independent processing modules respectively.
11. A computer device comprising a processor, characterized in that: When executing the computer program stored in the memory, the processor is used to implement the multidimensional data processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the multidimensional data processing method according to any one of claims 1 to 9.
13. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the multidimensional data processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Dimensionality reconstitution achievement method of multidimensional data models
CN104391927A
Exploratory high-dimensional data visualization device and method
CN108460087A