Method, device and computer equipment for generating multidimensional table
By loading dimensional data in traditional tables and dynamically expanding and processing them, multi-dimensional tables are generated, which solves the problem that traditional tables are difficult to change dynamically, achieves efficient table configuration and multi-dimensional analysis, and reduces workload and difficulty.
Patent Information
- Application Number
- CN202411038723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Traditional tables have a fixed number of rows, columns, and table header content that are pre-set during the design period, making it difficult to dynamically change according to business scenarios during operation, resulting in heavy configuration and operation and maintenance workloads, and the inability to achieve real-time multi-dimensional analysis.
By determining the basic table and loading its dimension data into the cache, the expansion process is based on the dimension data in the cache to generate a multi-dimensional table. The cells contain data formulas, and the formulas are parsed into front-end executable forms to fill in business data, realizing dynamic expansion of the table. and data entry.
It realizes the dynamic display of multi-dimensional tables of different styles according to business scenarios, reduces the configuration workload, reduces the number of dimensional data queries, improves the expansion efficiency, and enhances the entry function of the table, reducing the workload of later data application and query analysis. and difficulty.
Smart Images

Figure CN118569223B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of computer technology, and in particular to a method, device and computer equipment for generating a multidimensional table. Background Art
[0002] With the evolution of enterprise informatization and business systems, enterprises are increasingly relying on data to make decisions. Tables, as carriers of data, have been widely used. Traditional tables require the number of rows and columns to be set during the design period of the table. After generating a table with the fixed number of rows and columns, the implementation personnel divide the table into row headers, column headers, data areas, etc., and then map each cell to the specific data of the data mart to complete the configuration process of a fixed table.
[0003] However, since traditional tables have fixed styles, the number of rows and columns, as well as the display content of the table header, are all pre-set during the design phase. Therefore, the style of traditional tables cannot be dynamically changed according to the business scenario of the context during operation, and it is difficult to meet the demands of different business entities. For example, even if there are only slight differences or minor changes in the traditional tables of different business entities, multiple sets of traditional tables need to be configured, resulting in a large amount of implementation and operation and maintenance workload. Summary of the invention
[0004] The embodiments of the present specification provide a method, apparatus and computer device for generating a multidimensional table. The multidimensional table can be displayed in different table styles based on different business scenarios, thereby reducing the workload of configuring the table.
[0005] The embodiment of this specification provides a method for generating a multidimensional table, including:
[0006] Determine the base table used to generate the multidimensional table;
[0007] Load the dimension data corresponding to the basic table into the cache;
[0008] Expanding the basic table according to the dimensional data in the cache to obtain a multidimensional table, wherein cells in the multidimensional table correspond to a first data formula, and the first data formula is constructed based on the dimensional data;
[0009] Parsing the first data formula to convert it into a second data formula executable by the front end, wherein the second data formula is constructed based on the row and column positions of the cells in the multidimensional table;
[0010] Fill the multidimensional table with business data.
[0011] The embodiment of this specification also provides a multidimensional table generation device, including:
[0012] A determination unit, used for determining a basic table for generating a multidimensional table;
[0013] A loading unit, used to load dimension data corresponding to the basic table into the cache;
[0014] An expansion unit, used for expanding the basic table according to the dimensional data in the cache to obtain a multidimensional table, wherein the cells in the multidimensional table correspond to a first data formula, and the first data formula is constructed based on the dimensional data;
[0015] A parsing unit, used for parsing the first data formula to convert it into a second data formula executable by the front end, wherein the second data formula is constructed based on the row and column positions of the cells in the multidimensional table;
[0016] A filling unit is used to fill business data in the multidimensional table.
[0017] An embodiment of the present specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned multidimensional table generation method when executing the computer program.
[0018] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-dimensional table generation method is implemented.
[0019] The embodiments of the present specification also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the multi-dimensional table generation method is implemented.
[0020] The multidimensional table generation method of the embodiment of the present specification can determine the basic table used to generate the multidimensional table; the dimension data corresponding to the basic table can be loaded into the cache; the basic table can be expanded according to the dimension data in the cache to obtain a multidimensional table, and the cells in the multidimensional table correspond to the first data formula; the first data formula can be parsed to convert it into a second data formula executable by the front end; and the business data can be filled in the multidimensional table. In this way, through the mutual cooperation of the basic table and the dimension data, multidimensional tables of different styles can be displayed based on different business scenarios, thereby reducing the workload of the implementation personnel who repeat the table due to different table styles. In addition, by loading the dimension data corresponding to the basic table into the cache and expanding the basic table according to the dimension data in the cache, the query times of the dimension data are also reduced, and the expansion efficiency is improved. In addition, the first data formula is constructed based on the dimension data, and the second data formula is constructed based on the row and column position of the cell in the multidimensional table. By parsing the first data formula, the second data formula executable by the front end can be converted. It is convenient for users to enter data in the multidimensional table displayed on the front end. So that the multidimensional table has a good entry function. It greatly reduces the workload and difficulty of subsequent data application, query and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 This is a flowchart of a method for generating a multidimensional table in an embodiment of this specification;
[0023] Figure 2 A schematic diagram of the logic for generating multidimensional tables in this specification;
[0024] Figure 3 A schematic diagram of a multidimensional model in an embodiment of this specification;
[0025] Figure 4 Schematic diagram of the functional structure of the multidimensional table generating device in the embodiment of this specification. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, rather than all of the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art are within the scope of protection of the present disclosure. In addition, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0027] The above-mentioned traditional tables are often generated based on an indicator system, and are therefore usually indicator data tables. The indicator system is a set of quantitative indicators used to measure and evaluate specific goals or performance. The quantitative indicators are usually single-dimensional and are used to track data in specific aspects, such as sales, profit margins, customer satisfaction, etc. The indicator data table is a table with a fixed style and cannot change dynamically during operation. The indicator data table sets the number of rows and columns during the design period of the table, and then sets the mapping relationship between the table and the data mart. The data in the data mart is displayed in the table based on the mapping relationship. Among them, the creation of a data mart requires a complex process from the original business data to the operational data storage layer, and then to the data warehouse. Therefore, the data in the data mart can only change periodically and cannot change in real time with the business data in the data warehouse.
[0028] The indicator data table lacks dimensional information and only has a single quantitative indicator query and display capability, making it impossible to store, view and analyze data from multiple dimensions or angles. When users need to perform multi-level drilling and query on original business data, they need to first use ETL tools (extraction, transformation, loading tools) to perform large-scale cleaning processing on the original business data in the data warehouse, and then perform multi-dimensional aggregation, penetration and other operations. Since the original business data needs to be cleaned with ETL tools first, the user's multi-dimensional query on the original business data has a T+1 delay, and real-time multi-dimensional analysis cannot be achieved.
[0029] In addition, the data mart is generated after the original business data is disassembled, summarized, and categorized for query. In this process, the business data gradually loses its original primary key information. As a result, the traditional table can only display the content in the data mart as it is, and it is impossible to modify it in the traditional table to affect the original business data.
[0030]
[0031] Table 1 shows an indicator data table. The number of rows and columns of the indicator data table is set during the design period. The indicator data table corresponds to a data mart. In practical applications, the original business data in the data warehouse of the previous day can be statistically analyzed at a fixed time every day (for example, 22:00) to obtain indicator values such as total sales, average order amount, number of new customers, and customer satisfaction; the indicator values obtained by analysis can be stored in the data mart. The indicator data table has a mapping relationship with the data mart, so that the data in the data mart can be displayed in the indicator data table based on the mapping relationship. Since the original business data in the data warehouse of the previous day is statistically analyzed at a fixed time every day, there is a delay of T+1.
[0032] The embodiment of this specification provides a multidimensional table generation system. The multidimensional table generation system may include a terminal device, a business server and a database server. The terminal device may be a user-oriented device, including but not limited to a smart phone, a desktop computer, a laptop computer, etc. The terminal device is used to display a multidimensional table to a user, receive business data entered by the user in the multidimensional table, etc. The business server may be a backend-oriented device, specifically a server, or a distributed server cluster including multiple servers. The business server is used to generate a multidimensional table according to a request from the terminal device, and to feed back the multidimensional table to the terminal device; it may also receive business data entered by the user in the multidimensional table sent by the terminal device, and provide the received business data to the database server for storage. The database server may be a backend-oriented device, specifically a server, or a server cluster including multiple servers. The database server is used to store data, for example, dimension data and / or business data, etc.
[0033] In some embodiments, the terminal device may send a table generation request to the business server. The business server may determine a basic table according to the table generation request; may load dimension data corresponding to the basic table into a cache; may expand the basic table according to the dimension data in the cache to obtain a multidimensional table; may fill the multidimensional table with business data; and may feed back the multidimensional table to the terminal device. The terminal device may receive and display the multidimensional table.
[0034] In some embodiments, the user may also enter business data in the multidimensional table displayed by the terminal device. The terminal device may obtain the business data entered by the user and the dimension data corresponding to the business data; and may send the business data and the dimension data corresponding to the business data to the business server. The business server may send a storage request to the database server. The database server may store the business data according to the dimension data corresponding to the business data.
[0035] The embodiment of this specification provides a method for generating a multidimensional table.
[0036] The multidimensional table is generated based on a multidimensional system. The multidimensional system allows multiple different but related dimensions to be considered simultaneously. Each dimension may contain multiple business data. The multidimensional table may contain one or more business data and one or more dimension data. It enables users to store, view and analyze business data from multiple different dimensions. The dimensions may include time, geographic location, product, department, customer, etc. In some scenario examples, the multidimensional table supports the goal of business and financial integration. Through the multidimensional table, enterprises can store, view and analyze business and financial data from multiple dimensions, and realize rich metadata composition from the storage source, thereby making it possible to explore the composition of different dimensional combinations and different levels of data.
[0037] The multidimensional table generation method can be applied to a business server. The business server can be a single server, or a server cluster including multiple servers. Figure 1 and Figure 2 The method may include the following steps.
[0038] Step 11: Determine the base table used to generate the multidimensional table.
[0039] In some embodiments, the basic table may be a table in a contracted state, which can be expanded into a multidimensional table as required. The basic table may include expandable cells and / or non-expandable cells. The expansion of the basic table may be to expand the expandable cells. Each of the expandable cells may be expanded into one or more cells. The expandable cells may specifically include dimension cells, which are used to display dimension data. The dimension data is used to represent the display dimension of business data. The display dimension may include indicator type, customer type, supplier type, product type, material type, etc. The non-expandable cells may include first data cells, basic cells, attribute cells, etc. Among them, the first data cell is used to display business data. For example, the basic table may be a financial basic table, and the business data may be financial data. Of course, the basic table may also be other tables, such as a sales basic table and a sales basic table. Accordingly, the business data may also be sales data, consumption data, etc. The first data cell specifically corresponds to a query statement for querying business data, such as an SQL query statement. The query statement is used to query business data from a database, and fill the queried business data into the first data cell. The basic cell is filled with basic information of the table to assist in understanding the table. The basic information may include header information, etc. The attribute cell is used to display attribute data. The attribute data is used to represent the attributes of the dimension data, such as explaining the role of the dimension data in the dimension cell, etc. One dimension data may correspond to one or more attribute data, and the one or more attribute data are used to explain the dimension data from multiple angles. The attribute cell specifically corresponds to an attribute data identifier. The attribute data identifier is used to obtain attribute data from a database to fill the obtained attribute data into the attribute cell.
[0040]
[0041] Table 2 shows a basic table. The basic table includes expandable cells such as DR ("MD_ZHZB"), DC ("DATATIME"), and DC ("MD_SCENE"). Among them, DR ("MD_ZHZB") is a cell that can be expanded in the row direction. DC ("DATATIME") and DC ("MD_SCENE") are cells that can be expanded in the column direction. The basic table also includes basic cells such as "comprehensive indicators" and "indicator categories". The basic table also includes attribute cells such as MD_ZHZB[ZBLB]. The basic table also includes first data cells such as JINE.
[0042] Optionally, each of the expandable cells is a row expandable cell or a column expandable cell. The row expandable cell is a cell that can be expanded in the row direction. The column expandable cell is a cell that can be expanded in the column direction. Each of the expandable cells is filled with an expansion type identifier and a dimension identifier. The expansion type identifier is used to indicate the expansion type, and the expansion type includes row expansion, column expansion, etc. The dimension identifier is used to indicate dimensional data. For example, in Table 2, DR in DR("MD_ZHZB") is an expansion type identifier, which is used to indicate row expansion; MD_ZHZB in DR("MD_ZHZB") is a dimension identifier, which is used to indicate dimensional data. For another example, in Table 2, DC in DC("DATATIME") is an expansion type identifier, which is used to indicate column expansion; DATATIME in DC("DATATIME") is a dimension identifier, which is used to indicate dimensional data. In the basic table, the dimension identifiers corresponding to different expandable cells may be the same or different.
[0043] Optionally, in the basic table, the dimension identifier of the expandable cell may correspond to one or more dimension data. The number of cells after the expandable cell is expanded may be determined according to the number of dimension data corresponding to the dimension identifier of the expandable cell. Specifically, if the dimension identifier of the expandable cell corresponds to L dimension data, the number of cells after the expandable cell is expanded is L-1, that is, L-1 new cells can be generated. The L is a positive integer greater than or equal to 1.
[0044] Optionally, in the basic table, each column may include 0, 1 or more expandable cells. The multiple expandable cells in each column have the same expansion type. For example, under the condition that a column contains multiple expandable cells, the multiple expandable cells are all row expandable cells, or are all column expandable cells.
[0045] Optionally, in the basic table, each row may include 0, 1 or more expandable cells. The multiple expandable cells in each row have the same expansion type. For example, under the condition that a row contains multiple expandable cells, the multiple expandable cells are all row expandable cells, or are all column expandable cells.
[0046] Optionally, in the basic table, each attribute cell is filled with an attribute data identifier. The attribute data identifier is used to identify attribute data. Each first data cell is filled with a query statement. The basic cells are filled with basic information.
[0047] In some embodiments, a table identifier and table parameter information corresponding to the multidimensional table may be obtained; and a corresponding basic table may be matched in a basic table set according to the table identifier and the table parameter information. The table identifier is used to identify one or more multidimensional tables, and may include, for example, the name of the multidimensional table. The table parameter information is used to indicate a business scenario applicable to the multidimensional table. The table parameter information may include an enterprise, a department, a period, an institution, etc.
[0048] The terminal device may provide a human-computer interaction interface. The human-computer interaction interface may be understood as a medium and a dialogue interface for transmitting and exchanging information between a person and a terminal device. A user may input a table identifier and table parameter information in the human-computer interaction interface. The terminal device may send a table generation request to a service server, wherein the table generation request includes the table identifier and the table parameter information. The service server may receive the table generation request, and may match a corresponding basic table in a basic table set according to the table identifier and the table parameter information. For example, a user may input table parameter information in the human-computer interaction interface. The human-computer interaction interface may have a control, and the control may specifically be a physical control or a virtual control. A user may use any object, such as a mouse, a finger, or a stylus, to contact the control. The contact may include pressing, clicking, double-clicking, or swiping. After detecting the contact, the terminal device may generate the trigger instruction. The control may have a table identifier. Thus, after receiving the trigger instruction, the terminal device may send a table generation request including the table identifier and the table parameter information to the service server.
[0049] Specifically, a basic table set may be provided. The basic table set may include one or more basic tables. The basic table may be understood as an unexpanded multidimensional simple table. In the basic table set, each basic table may correspond to one or more table identifiers. In addition, in the basic table set, the table identifiers corresponding to each basic table may be different. Alternatively, in the basic table set, multiple basic tables may also correspond to the same table identifier. Optionally, multiple basic tables corresponding to the same table identifier may be applicable to different business scenarios, such as different enterprises, departments, periods, institutions, etc. Thus, multiple basic tables corresponding to the same table identifier may be distinguished based on the table parameter information.
[0050] For example, multiple basic tables may correspond to the same table identifier, and the multiple basic tables may be understood as table versions of different periods. Thus, the multiple basic tables may be distinguished according to the period in the table parameter information. For another example, multiple basic tables may correspond to the same table identifier, and the multiple basic tables may be understood as table versions of different departments of the same enterprise. Thus, the multiple basic tables may be distinguished according to the department in the table parameter information.
[0051] Can provide such as Figure 3 The multidimensional model shown in the figure can be used to configure each basic table in the basic table set. For example, the implementer can set the row dimension, column dimension and index based on the multidimensional model, and can also drag the row dimension, column dimension and index, set the query statement, etc., so as to obtain the basic table.
[0052] According to the table identifier, the corresponding basic table can be matched in the basic table set to obtain one or more basic tables. In the case where a basic table is matched, the basic table can be used as a basic table for generating a multidimensional table. In the case where multiple basic tables are matched, a selection can be made from the multiple basic tables according to the table parameter information, and the selected basic table can be used as a basic table for generating a multidimensional table.
[0053] Step 12: Load the dimension data corresponding to the basic table into the cache.
[0054] In some embodiments, the dimension data corresponding to the basic table is used to expand the basic table. The basic table includes one or more expandable cells. The dimension data corresponding to the basic table includes the dimension data of the one or more expandable cells, and specifically may include the dimension data corresponding to the dimension identifiers of the one or more expandable cells.
[0055] The dimension data corresponding to the basic table can be obtained from the database server; the basic table can be expanded according to the dimension data to obtain a multidimensional table. In the database server, the dimension data can be configured according to the context of the multidimensional table during operation (such as organization, department, time, etc.). The basic table can dynamically generate a multidimensional table during operation. Since the dimension data can be configured according to the context scenario to expand the basic table, one table with multiple states can be achieved.
[0056] In some embodiments, the basic table may include one or more expandable cells. During operation, the one or more expandable cells may be expanded one by one according to the dimension data in a certain order (for example, the order of columns first and then rows). Specifically, the cells in the basic table may be traversed. For each expandable cell traversed, the business server may query the corresponding dimension data from the database server according to the dimension identifier corresponding to the expandable cell, so as to expand the expandable cell according to the queried dimension data. Alternatively, considering that querying the corresponding dimension data from the database server for each expandable cell respectively will result in too many queries to the database server, increasing the load of the database server, and also increasing the time consumption of expanding the basic table, reducing the expansion efficiency. Moreover, in the basic table, different expandable cells may correspond to the same dimension identifier, and thus correspond to the same dimension data. Querying the corresponding dimension data from the database server for each expandable cell respectively may cause the business server to perform multiple queries for the same dimension data, resulting in repeated queries. Therefore, in order to improve the expansion efficiency of the basic table, the dimension data corresponding to the basic table may be obtained in advance, and the dimension data corresponding to the pre-obtained basic table may be loaded into the cache. In this way, the basic table can be expanded according to the dimension data in the cache, so as to effectively reduce the number of queries on the dimension data during the expansion process, thereby improving the expansion efficiency of the basic table.
[0057] The business server may query the dimension data from the database server according to the dimension identifier of the expandable cell, and may load the queried dimension data into the cache. For example, the business server may query the dimension data of all expandable cells from the database server according to the dimension identifiers of all expandable cells, and load the queried dimension data into the cache. The business server may traverse each cell in the basic table to identify the expandable cells in the basic table. The expandable cells correspond to dimension identifiers. The business server may obtain the dimension identifiers of each expandable cell in the basic table; may send a dimension data acquisition request to the database server, and the dimension data acquisition request may include the dimension identifiers of each expandable cell. The database server may provide a dimension data set. The dimension data set includes one or more dimension data. The dimension data corresponds to a dimension identifier. In the dimension data set, the dimension identifiers corresponding to each dimension data may be different, or multiple dimension data may correspond to the same dimension identifier. The database server may query the corresponding dimension data in the dimension data set according to the dimension identifier; and may feed back the determined dimension data to the business server. The business server may load the received dimension data into the cache.
[0058] Optionally, the dimension data may contain multiple sub-data. If all sub-data of the dimension data are loaded into the cache, it may cause excessive cache data volume to cause memory GC jitter. To this end, the business server can query part of the sub-data in the dimension data from the database server, and can load the queried part of the sub-data into the cache. Specifically, in addition to the corresponding dimension identifier, the expandable cell in the basic table also corresponds to a display rule. The display rule is used to constrain the content that can be displayed on the expandable cell in the dimension data, that is, the sub-data that can be displayed on the expandable cell. For example, the display rule may include a selected value rule, a cascade display rule, a formula filtering rule, etc. The selected value rule is used to constrain the display of the sub-data corresponding to the selected value on the expandable cell. The cascade display rule is used to constrain the display of specific sub-data on the expandable cell. The specific sub-data is sub-data related to the sub-data displayed on the expandable cell of the upper level of the expandable cell, such as sub-data of the same type. The formula filtering rule is used to constrain the display of sub-data that meets the formula filtering condition on the expandable cell. In this way, the business server can obtain the dimension identifier and display rule of each expandable cell in the basic table; can send a dimension data acquisition request to the database server, and the dimension data acquisition request can include the dimension identifier and display rule of each expandable cell. The database server can provide a dimension data set. The dimension data set includes one or more dimension data. The dimension data corresponds to a dimension identifier. The dimension data includes multiple sub-data. The database server can query the corresponding dimension data in the dimension data set according to the dimension identifier of the expandable cell; query the corresponding target sub-data in the multiple sub-data of the queried dimension data according to the display rule of the expandable cell; and can feedback the target sub-data of the expandable cell to the business server. The business server can load the received target sub-data into a cache. Among them, the target sub-data can be the sub-data in the dimension data that meets the display rule. For example, if the display rule is a selected value rule, the target sub-data is the sub-data in the dimension data corresponding to the selected value. For another example, if the display rule is a formula filtering rule, the target sub-data is the sub-data in the dimension data that meets the formula filtering condition. For another example, the display rule is a cascade display rule. The target sub-data is sub-data related to the sub-data displayed on the expandable cell at the previous level, for example, sub-data of the same type.
[0059] The database server may provide a dimensional data set. The dimensional data in the dimensional data set corresponds to a dimension identifier. In different business scenarios, different dimensional data may be set for the dimension identifier. This allows the same basic table to have different dimensional data in different business scenarios. This enables multidimensional tables to be displayed in different styles in different business scenarios.
[0060] Step 13: Expand the basic table according to the dimensional data in the cache to obtain a multidimensional table.
[0061] In some embodiments, the business server may expand the basic table in a set order according to the dimensional data, for example, expand the expandable cells in an order from outside to inside, first column and then row, to obtain a multidimensional table.
[0062] In some embodiments, the business server may traverse each column cell in the basic table. For each column cell in the basic table, if the column cell contains a column expandable cell, the business server may read dimension data in the cache according to the dimension identifier corresponding to the column expandable cell; may perform column insertion processing on the column expandable cell according to the number of dimension data corresponding to the column expandable cell; and may fill the dimension data in the cell generated by the column insertion.
[0063] Specifically for each column of cells in the basic table, the business server can determine one by one whether each cell in the column of cells is a column expandable cell; if not, the cell can be ignored; if so, the dimension data can be read in the cache according to the dimension identifier corresponding to the column expandable cell; the column expandable cell can be inserted according to the number of dimension data corresponding to the column expandable cell; and the dimension data can be filled in the cells generated by the column insertion.
[0064] The business server can determine whether each cell in each column is a column expandable cell one by one in a top-to-bottom order. As mentioned above, an expandable cell corresponds to an expansion type identifier. The business server can determine whether the expandable cell is a column expandable cell based on the expansion type identifier of the expandable cell. For example, if the expansion type identifier is DC, the business server can determine that the expandable cell is a column expandable cell.
[0065] The business server may query the dimension data of all expandable cells from the database server, and load the queried dimension data into the cache. To this end, the business server may directly read the corresponding dimension data in the cache according to the dimension identifier corresponding to the column expandable cell. Alternatively, the business server may read the corresponding one or more target sub-data in the cache according to the dimension identifier corresponding to the column expandable cell, and the one or more target sub-data are sub-data in the dimension data corresponding to the dimension identifier. Alternatively, the business server may also query the dimension data of some expandable cells from the database server, and load the queried dimension data into the cache. To this end, the business server may also preferentially read the corresponding dimension data in the cache according to the dimension identifier of the column expandable cell; if the reading is successful, the dimension data corresponding to the column expandable cell may be obtained; if the reading fails, a query request may be sent to the database server. The query request may include the dimension identifier of the column expandable cell. The database server may receive the query request; select the corresponding dimension data from the dimension data set according to the dimension identifier; and feedback the selected dimension data to the business server. The business server may receive the dimension data, thereby obtaining the dimension data corresponding to the column expandable cell.
[0066] In the basic table, the dimension identifier of the column expandable cell may correspond to one or more dimension data. The business server may determine the number of cells after the column expandable cell is expanded based on the number of dimension data corresponding to the column expandable cell. The number of cells after the column expandable cell is expanded may be understood as the number of cells added in the column direction, and thus may also be understood as the number of new columns required for the column expandable cell. For example, if the dimension identifier of the column expandable cell corresponds to L1 dimension data, then L new columns may be added for the column expandable cell. 1- 1 column of cells. L1 is a positive integer greater than or equal to 1. The business server may perform column insertion processing on the basic table according to the number of newly added columns.
[0067] The column where the column expandable cell is located can be used as the target column. Then, for the column expandable cell in the target column, one or more dimension data of the column expandable cell can be filled into the column expandable cell and the cells in each newly added column that are in the same row as the column expandable cell. So that the column expandable cell and the cells in the same row as the column expandable cell in each newly added column can be filled with one dimension data respectively. The dimension data filled into the column expandable cell and the cells in the same row as the column expandable cell in each newly added column can be the same or different. In addition, for each other cell in the target column except the column expandable cell, the data in the other cell can be filled into the cells in the same row as the other cell in each newly added column. So that the data filled into the other cell and the cells in the same row as the other cell in each newly added column can be the same.
[0068] The other cells may include non-expandable cells such as first data cells, basic cells, and attribute cells, and may also include row expandable cells. The data in the row expandable cells may include an expansion type identifier and a dimension identifier corresponding to the row expandable cells. The data in the basic cells may include basic information of the table. The data in the attribute cells may include an attribute data identifier corresponding to the attribute cells. The data in the first data cell may include a query statement.
[0069] For example, a column of cells contains M expandable column cells, and each expandable column cell corresponds to L1 dimensional data. Based on the column of cells, the business server can add M×(L1-1) columns.
[0070] In some embodiments, the business server may traverse each row of cells in the basic table. For each row of cells in the basic table, if the row of cells contains a row expandable cell, the business server may read dimension data in the cache according to the dimension identifier corresponding to the row expandable cell; may perform row insertion processing on the row expandable cell according to the number of dimension data corresponding to the row expandable cell; and may fill the dimension data in the cell generated by the row insertion.
[0071] Specifically for each row of cells in the basic table, the business server can determine one by one whether each cell in the row of cells is a row-expandable cell; if not, the cell can be ignored; if so, the dimension data can be read in the cache according to the dimension identifier corresponding to the row of expandable cells; the row of expandable cells can be inserted according to the number of dimension data corresponding to the row of expandable cells; and the dimensional data can be filled in the cells generated by the row insertion.
[0072] The business server can determine whether each cell in each row of cells is a row expandable cell one by one in a left-to-right order. As mentioned above, an expandable cell corresponds to an expansion type identifier. The business server can determine whether the expandable cell is a row expandable cell based on the expansion type identifier of the expandable cell. For example, if the expansion type identifier is DR, the business server can determine that the expandable cell is a row expandable cell.
[0073] The business server may query the dimension data of all expandable cells from the database server, and load the queried dimension data into the cache. To this end, the business server may directly read the corresponding dimension data in the cache according to the dimension identifier corresponding to the row of expandable cells. Alternatively, the business server may read the corresponding one or more target sub-data in the cache according to the dimension identifier corresponding to the row of expandable cells, and the one or more target sub-data are sub-data in the dimension data corresponding to the dimension identifier. Alternatively, the business server may also query the dimension data of some expandable cells from the database server, and load the queried dimension data into the cache. To this end, the business server may also preferentially read the corresponding dimension data in the cache according to the dimension identifier of the row of expandable cells; if the reading is successful, the dimension data corresponding to the row of expandable cells may be obtained; if the reading fails, a query request may be sent to the database server. The query request may include the dimension identifier of the row of expandable cells. The database server may receive the query request; select the corresponding dimension data from the dimension data set according to the dimension identifier; and feedback the selected dimension data to the business server. The business server may receive the dimension data, thereby obtaining the dimension data corresponding to the row of expandable cells.
[0074] In the basic table, the dimension identifier of the row of expandable cells can correspond to one or more dimension data. The business server can determine the number of cells after the row of expandable cells is expanded based on the number of dimension data corresponding to the row of expandable cells. The number of cells after the row of expandable cells is expanded can be understood as the number of cells newly added in the row direction, and thus can also be understood as the number of newly added rows required for the row of expandable cells. For example, if the dimension identifier of the row of expandable cells corresponds to L2 dimension data, then L2-1 columns of cells can be added for the row of expandable cells. L2 is a positive integer greater than or equal to 1. The business server can insert rows for the basic table based on the number of newly added rows.
[0075] The row where the row expandable cell is located can be used as the target row. For the row expandable cell in the target row, one or more dimensional data of the row expandable cell can be filled into the row expandable cell and the cells in each newly added row that are in the same column as the row expandable cell. So that the row expandable cell and the cells in the same column as the row expandable cell in each newly added row can be filled with a dimensional data respectively. The dimensional data filled into the row expandable cell and the cells in the same column as the row expandable cell in each newly added row can be the same or different. In addition, for each other cell in the target row except the row expandable cell, the data in the other cell can be filled into the cells in the same column as the other cell in each newly added row. So that the data filled into the other cell and the cells in the same column as the other cell in each newly added row can be the same.
[0076] The other cells may include non-expandable cells such as the first data cell, the basic cell, and the attribute cell, and may also include a column expandable cell. The data in the column expandable cell may include an expansion type identifier and a dimension identifier corresponding to the column expandable cell. The data in the basic cell may include basic information of the table. The data in the attribute cell may include an attribute data identifier corresponding to the attribute cell. The data in the first data cell may include a query statement.
[0077] For example, a row of cells contains N expandable cells, and each expandable cell corresponds to L2 dimensional data. Based on the row of cells, the business server can add N×(L2-1) rows.
[0078] In some embodiments, the business server may first traverse each column of cells in the basic table. By traversing each column of cells in the basic table, column expansion processing is performed on the column expandable cells in each column of cells. Then, the business server may traverse each row of cells in the basic table. By traversing each row of cells in the basic table, row expansion processing is performed on the row expandable cells in each row of cells. Thus, the business server can expand the basic table in the order from outside to inside, first column and then row, to obtain an expanded multidimensional table.
[0079] In some embodiments, the basic table may include attribute cells. Then, the expanded multidimensional table may also include attribute cells. And the attribute cells may be copied during the expansion process, so that in the expanded multidimensional table, the number of attribute cells is greater than or equal to the number of attribute cells in the basic table. Then, for each attribute cell in the multidimensional table, the business server can obtain the corresponding attribute data according to the attribute data identifier corresponding to the attribute cell; and can fill the attribute data in the attribute cell. For example, the business server can send an attribute data query request to the database server, and the attribute data query request can include the attribute data identifier of the attribute cell. The database server can receive the attribute data query request; can select the corresponding attribute data from the attribute data set according to the attribute data identifier; and can send the selected attribute data to the business server. The business server can receive the attribute data, and can fill the received attribute data into the attribute cell to cover the attribute data identifier in the attribute cell.
[0080] In some embodiments, the business server can also identify the hierarchical relationship between dimensional data in a multidimensional table; according to the hierarchical relationship, a first data cell can be selected as a second data cell in the first data cell of the multidimensional table; according to the hierarchical relationship, a first data formula for the second data cell can be determined. In this way, the second data cell can correspond to a query statement and a first data formula at the same time. The first data formula is constructed based on dimensional data. For example, the first data formula may include multiple dimensional data and the operational relationship between the multiple dimensional data. The first data formula is used to calculate the business data to fill the calculation result into the second cell. The calculation result may include indicator data such as average, median, and maximum value. The indicator data may be numerical data.
[0081] In some examples, the business server may traverse each column of cells in the basic table. For each column of cells in the basic table, the cells filled with dimensional data may be used as dimensional cells if the column of cells contains cells filled with dimensional data. It may be identified whether there is a hierarchical relationship between the dimensional cells in the column of cells. If not, the column of cells may be ignored. If so, the hierarchical relationship between the dimensional cells may be obtained. Specifically, the hierarchical relationship between the corresponding dimensional cells may be determined based on the hierarchical relationship between the dimensional data in each dimensional cell.
[0082] In the hierarchical relationship, parent dimension cells, child dimension cells and leaf dimension cells are included. The parent dimension cell is a dimension cell with a lower level. The lower level cell of the parent cell is a child dimension cell of the parent cell. Each parent cell has one or more child dimension cells. Each parent cell can also be a child dimension cell of another parent cell. In addition, the leaf cell is a dimension cell that no longer has a lower level.
[0083] Then, in the multidimensional table, the first data cell in the same row as the parent dimension cell can be selected as the second data cell; the first data formula of the second data cell can be constructed according to the dimensional data of the parent dimension cell and the dimensional data of the child dimension cell under the parent dimension cell. The first data formula may include multiple dimensional data and the operational relationship between the multiple dimensional data. The operational relationship may be a sum. Of course, the operational relationship may also be other operational relationships such as finding the median and selecting the maximum value. The operational relationship can be determined based on the hierarchical relationship between the multiple dimensional data. Of course, the operational relationship can also be determined in other ways, for example, it can be determined based on the semantics between the multiple dimensional data. Or the operational relationship can also be a preset default operational relationship, for example, it can be a sum.
[0084] In some examples, the business server may traverse each row of cells in the basic table. For each row of cells in the basic table, the cells filled with dimensional data may be used as dimensional cells if the row of cells contains cells filled with dimensional data. It may be identified whether there is a hierarchical relationship between the dimensional cells in the row of cells. If not, the row of cells may be ignored. If so, the hierarchical relationship between the dimensional cells may be obtained. Specifically, the hierarchical relationship between the corresponding dimensional cells may be determined based on the hierarchical relationship between the dimensional data in each dimensional cell.
[0085] In the hierarchical relationship, parent dimension cells, child dimension cells and leaf dimension cells are included. The parent dimension cell is a dimension cell with a lower level. The lower level cell of the parent cell is a child dimension cell of the parent cell. Each parent cell has one or more child dimension cells. Each parent cell can also be a child dimension cell of another parent cell. In addition, the leaf cell is a dimension cell that no longer has a lower level.
[0086] Then, in the multidimensional table, the first data cell in the same column as the parent dimension cell can be selected as the second data cell; the first data formula of the second data cell can be constructed according to the dimensional data of the parent dimension cell and the dimensional data of the child dimension cell under the parent dimension cell. The first data formula may include multiple dimensional data and the operational relationship between the multiple dimensional data. The operational relationship may be summation. Of course, the operational relationship may also be other operational relationships such as finding the median and selecting the maximum value. The operational relationship can be determined based on the hierarchical relationship between the multiple dimensional data. Of course, the operational relationship can also be determined in other ways, for example, it can be determined based on the semantics between the multiple dimensional data. Or the operational relationship can also be a preset default operational relationship, such as summation.
[0087] In some examples, the business server may select the second data cell in the order of columns first and then rows or rows first and then columns, and determine the first data formula of the second data cell. Specifically, the business server may select the second data cell by traversing each column of cells in the basic table, and the specific process can be seen in the above examples. The business server may select the second data cell by traversing each row of cells in the basic table, and the specific process can be seen in the above examples.
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094] Tables 3, 4, 5 and 6 are for performing column expansion processing on the expandable cells in each column. Table 7 is for filling the attribute cells. Table 8 is for identifying the second data cell and filling the first data formula therein. In Table 8, SUM() is the first data formula. Table 8 is a multidimensional table obtained after the basic table shown in Table 2 is expanded.
[0095] In some embodiments, the business server may further detect whether there are multiple adjacent cells filled with the same data in the multidimensional table; if so, the multiple cells may be merged; and the same data may be filled in the merged cells. The multiple cells may be located in the same row, or in the same column. The multiple cells may include basic cells, attribute cells, expanded dimension cells, etc.
[0096] Step 14: Fill the multidimensional table with business data.
[0097] In some embodiments, the multidimensional table may include at least one first data cell. For each first data cell, the business server may query business data according to a query statement of the first data cell, and may fill the queried business data into the first data cell. Specifically, for example, the business server may send a query request to a database server, and the query request may include a query statement. The database server may receive a query request; may query corresponding business data in a business data set according to the query statement; and may send the queried business data to the business server. The business server may fill the received business data into the first data cell.
[0098] In some embodiments, the multidimensional table may further include at least one second data cell. For each second data cell, the business server may query business data according to the query statement of the second data cell, and may fill the queried business data into the second data cell. Specifically, for example, the business server may send a query request to a database server, and the query request may include a query statement. The database server may receive the query request; may query the corresponding business data in the business data set according to the query statement; and may send the queried business data to the business server. The business server may fill the received business data into the second data cell.
[0099] In some embodiments, a cell in the multidimensional table may correspond to a first data formula. Specifically, the multidimensional table may include at least one second data cell. The second data cell corresponds to a first data formula. The first data formula is constructed based on dimensional data. In order to facilitate the execution of the terminal device, the first data formula needs to be parsed into a second data formula. The second data formula is constructed based on the row and column positions of the cell in the multidimensional table. For example, the second data formula may include the row and column positions of the cell and the operational relationship between the row and column positions. Specifically, for example, the second data formula may include a coordinate formula, such as an excel coordinate formula. For this reason, for each second data cell, the business server may parse the first data formula of the second data cell to convert it into a second data formula executable by the front end; the second data formula may be used as a new data formula for the second data cell. In this way, the terminal device can calculate the business data in one or more first data cells according to the second data formula, and fill the calculation results into the second data cell.
[0100] In some embodiments, for the multidimensional table, on the one hand, it is necessary to query the business data in the database server according to the query statement, and on the other hand, it is necessary to parse the first data formula to convert it into a second data formula executable by the front end. In the prior art, the business server can first traverse the second data cell in the multidimensional table, parse the first data formula corresponding to the second data cell into the second data formula; and then query the business data in the database server according to the query statement. However, this method will result in low filling efficiency of business data and low generation efficiency of multidimensional tables.
[0101] Considering that querying business data in the database server according to the query statement is an IO-intensive business, and parsing the first data formula into the second data formula is a CPU-intensive business. For this reason, querying business data in the database server according to the query statement and parsing the first data formula into the second data formula can be performed in an asynchronous collaborative manner. In this way, time can be saved and the generation efficiency of the multidimensional table can be improved. For example, for the multidimensional table, the total time consumed to query business data in the database server according to the query statement can be t1, and the total time consumed to parse the first data formula into the second data formula can be t2. If the synchronous method in the prior art is adopted, the total time consumed to fill can be t1+t2. If the asynchronous collaborative method in the embodiment of this specification is adopted, the total time consumed to fill can be max(t1, t2).
[0102] The business server can query business data according to the query statements of each first data cell and fill the business data into the first data cell, or query business data according to the query statements of each second data cell and fill the business data into the second data cell. In the above process of querying business data, the business server can also parse the first data formula corresponding to each second data cell to convert it into a second data formula executable by the front end.
[0103] For example, the business server can construct a syntax tree based on the first data formula of each second data cell; based on the syntax tree, translate the first data formula of each second data cell into a second data formula executable by the terminal device. Specifically, for example, the business server can perform syntax analysis on the first data formula of each second data cell to construct a syntax tree. For example, the business server can locate the first data cell associated with the dimensional data based on the dimensional data in the first data formula; and can construct the second data formula based on the row and column positions of the located first data cell and the operation relationship in the first data formula. Among them, the first data cell associated with the dimensional data may include a first data cell in the same row as the cell where the dimensional data is located, and a first data cell in the same column as the cell where the dimensional data is located. The row and column positions of the first data cell are used to identify the position of the first data cell in the multidimensional table, for example, may include a row identifier (e.g., a row number) of the row where the first data cell is located and a column identifier (e.g., a column number) of the column where the first data cell is located.
[0104] In some embodiments, the number of rows of the multidimensional table may be very large, making the multidimensional table an extra-large table. Expanding the basic table into an extra-large table at one time and filling data in the data cells of the extra-large table will cause a certain amount of pressure on the business server. For this reason, a paging processing method can be used to expand the basic table in pages and fill data to avoid impact on the business server and improve user experience. Specifically, the business server can obtain paging parameters; according to the paging parameters, the basic table can be divided into multiple expandable areas. After receiving an expansion request for a specified expandable area, the business server can expand the specified expandable area according to the dimensional data in the cache to obtain a paging table; the business data can be filled in the paging table. Among them, the paging parameters may include a row number threshold.
[0105] The business server can traverse each row of expandable cells in the basic table; the total number of rows of the multidimensional table to be generated can be determined according to the number of dimensional data corresponding to each row of expandable cells; the basic table can be divided into multiple expandable areas according to the paging parameters and the total number of rows of the multidimensional table to be generated. Each expandable area can be expanded to obtain a paging table. Multiple paging tables of the multidimensional table can be expanded through the multiple expandable areas. The number of rows of each paging table can be less than or equal to the row number threshold. Specifically, the basic table can be divided into multiple expandable areas in the row direction. The multiple expandable areas can have the same number of columns and the same or different number of rows.
[0106] The designated expandable area may be an expandable area designated by the user among the multiple expandable areas. Specifically, each expandable area among the multiple expandable areas may have an area identifier. When the user needs to expand a designated expandable area, the user may operate in the terminal device so that the terminal device sends an expansion request to the business server, and the expansion request may include a distinguishing identifier of the designated expandable area. The business server may receive the expansion request; may expand the designated expandable area according to the dimensional data in the cache to obtain a paging table; and may fill the paging table with business data. Among them, expanding the expandable area is similar to expanding the basic table in step 13, and the two can be explained in comparison. Filling the paging table with business data is similar to filling the multidimensional table with business data in step 14, and the two can be explained in comparison.
[0107] In some embodiments, the business server may feed back a multidimensional table to the terminal device, the terminal device may receive and display the multidimensional table, and the user may input business data into the multidimensional table based on the terminal device.
[0108] The terminal device can also receive the target business data entered by the user in the specified first data cell; the second data cell affected by the specified first data cell can be selected in the multidimensional table; and the data in the affected second data cell can be updated according to the entered target business data. Specifically, the user can enter the target business data in the first data cell of the multidimensional table. The terminal device can determine at least one second data cell affected by the specified first data cell based on the second data formula of the multidimensional table. For each affected second data cell, the terminal device can determine one or more first data cells that can affect the second data cell according to the second data formula of the second data cell, and can calculate the business data in the one or more first data cells using the second data formula to obtain the calculation result, and can fill the calculation result into the second data cell to realize the update of the indicator data in the second data cell. The calculation includes but is not limited to summing, product, selecting the maximum value, etc. The calculation result can include indicator data. In this way, when the user enters the target business data in the multidimensional table, the terminal device can calculate all the second data cells directly / indirectly affected by the current cell in real time, thereby automatically realizing the update of the indicator data and improving the user's data reporting experience.
[0109] Optionally, the terminal device can also store the target business data input by the user. Specifically, the terminal device can send a storage request to the business server. The storage request can include the dimension data corresponding to the specified first data cell, and the target business data. The business server can receive the storage request; and can send the storage request to the database server. The database server can receive the storage request; and can store the target business data according to the dimension data corresponding to the specified first data cell. The dimension data corresponding to the first data cell can include, for example: the dimension data in the cell in the same row as the first data cell, and the dimension data in the cell in the same column as the first data cell.
[0110] Optionally, the terminal device can also store the updated data in the second data cell. Specifically, the terminal device can send a storage request to the business server. The storage request can include the dimensional data corresponding to the affected second data cell and the updated data in the second data cell. The business server can receive the storage request; and can send the storage request to the database server. The database server can receive the storage request; and can store the updated data in the second data cell based on the dimensional data corresponding to the affected second data cell. The dimensional data corresponding to the second data cell can include, for example: dimensional data in cells in the same row as the second data cell, and dimensional data in cells in the same column as the second data cell.
[0111] The dimensional data corresponding to the first data cell and / or the second data cell is represented as a field in the database. In the prior art, the business server can first determine whether the field has data in the database, and if so, trigger the update logic, and if not, trigger the insertion logic. However, this method requires a query first, and then a subsequent insertion or update operation, that is, two independent database IOs are required. Since the number of connections that the database itself can support is limited, in a complex cluster or distributed business system, database connection is an extremely valuable resource. In order to save database connections and improve efficiency, the business server can send a merge processing request to the database server. The merge processing request is used to enable the database server to update the business data corresponding to the field using the received business data when the field has corresponding business data; when the field does not have corresponding business data, the received business data is written into the field. In this way, by sending a merge processing request, the judgment of whether the data exists can be handed over to the database server for processing, which reduces the number of connections between the business server and the database, and also improves the data storage efficiency.
[0112] The multidimensional table can be applicable to fixed and floating business scenarios. The multidimensional table can be a multidimensional fixed table or a multidimensional floating table. The multidimensional fixed table is a table with a fixed style, and the number of rows and columns cannot change dynamically. The multidimensional floating table is a table whose number of rows and / or columns can change dynamically. So that the user can insert rows and / or columns in the multidimensional floating table. In some scenario examples, the number of rows of the multidimensional floating table can be changed according to user operations. The target business data input by the aforementioned user includes the target business data entered by the user in the newly added floating row of the multidimensional floating table. The dimensional data includes the dimensional data corresponding to the newly added floating row. Compared with the method of drawing tables and setting floating areas in traditional reports, the multidimensional floating table can reduce the user's workload by 70% when entering business data.
[0113] The dimensional data in the multidimensional floating table can be consistent with the fields in the database, thereby following and retaining the conceptual structure of the data in the database. By using multiple dimensions and multiple indicators, the records of different rows in the database are dynamically pieced together and put into a floating row page for display, which not only retains a relatively intact storage structure but also takes into account the general usage habits of users. The good input storage structure of the multidimensional floating table can greatly reduce the workload and difficulty of later data application, query analysis.
[0114] The multi-dimensional floating table can not only realize data entry, but is also suitable for query scenarios. In the query / output scenario, the user enters detailed business data, but needs to output and display multi-dimensional summary data. As mentioned earlier, traditional tables generally need to clean the original business data in the database, establish a data mart, and finally query and output based on the data mart. This method has a delay and can generally only guarantee T+1, and cannot achieve true real-time performance. Thanks to the idea of dynamic expansion, by setting dimensions on the table template, multi-caliber aggregation and four arithmetic operations (such as total) in the interface can be realized. Dimensional data can be used to dynamically classify and summarize the original business data.
[0115] The multidimensional table generation method of the embodiment of the present specification can determine the basic table used to generate the multidimensional table; the dimension data corresponding to the basic table can be loaded into the cache; the basic table can be expanded according to the dimension data in the cache to obtain a multidimensional table, and the cells in the multidimensional table correspond to the first data formula; the first data formula can be parsed to convert it into a second data formula executable by the front end; and the business data can be filled in the multidimensional table. In this way, through the cooperation of the basic table and the dimension data, multidimensional tables of different styles can be displayed based on different business scenarios, thereby reducing the workload of the implementation personnel who repeat the table due to different table styles. In addition, by loading the dimension data corresponding to the basic table into the cache, the basic table is expanded according to the dimension data in the cache, which also reduces the query times of the dimension data and improves the expansion efficiency. In addition, the first data formula is constructed based on the dimension data, and the second data formula is constructed based on the row and column position of the cell in the multidimensional table. By parsing the first data formula, the second data formula executable by the front end can be converted. It is convenient for users to enter data in the multidimensional table displayed on the front end. So that the multidimensional table has a good entry function. It greatly reduces the workload and difficulty of subsequent data application, query and analysis.
[0116] It should be noted that in Figure 2 It includes a cache engine, an expansion engine, a formula engine and a data engine. The cache engine, the expansion engine, the formula engine and the data engine can be located in the business server. Among them, the cache engine is used for caching and hierarchical classification management of various data required in the multidimensional expansion process. The expansion engine is used to load the specific dimension values (dimensional data) of the row and column dimensions and expand the multidimensional simple table into a multidimensional table at runtime. The formula engine is used to collect the upper and lower level total formulas of the dimensions, and the conversion between the multidimensional formula (first data formula) and the Excel coordinate formula (second data formula). The data engine is used for loading multidimensional table data and updating and saving multidimensional table data. Based on the cache engine, the expansion engine, the formula engine and the data engine, the multidimensional table generation method of the embodiment of this specification can be implemented.
[0117] It should also be noted that the multidimensional tables in the embodiments of this specification can be ultimately displayed in different table styles through different contexts during runtime, which meets the business needs of enterprises to use a set of tables to meet the needs of thousands of people and reduce the workload of implementation personnel who have to repeat making tables due to different table styles. In addition, the basic tables in the embodiments of this specification adopt a low-code design concept, which supports implementation personnel to use drag-and-drop methods to make tables, reducing the complexity of implementation while improving implementation efficiency. In addition, the multidimensional tables in the embodiments of this specification optimize the storage method when storing data, saving database links while improving storage efficiency. In addition, the multidimensional tables in the embodiments of this specification can be entered and queried, and query and enter multidimensional collaborative applications, realizing rich multidimensional applications such as self-entry and self-query, external access and self-query, and self-entry of other people's queries.
[0118] See also Figure 4 The embodiment of this specification also provides a multi-dimensional table generation device, including the following units.
[0119] A determination unit 41, used for determining a basic table for generating a multidimensional table;
[0120] A loading unit 42, used to load the dimension data corresponding to the basic table into the cache;
[0121] An expansion unit 43 is used to expand the basic table according to the dimension data in the cache to obtain a multidimensional table, wherein the cells in the multidimensional table correspond to a first data formula, and the first data formula is constructed based on the dimension data;
[0122] A parsing unit 44, configured to parse the first data formula to convert it into a second data formula executable by the front end, wherein the second data formula is constructed based on the row and column positions of the cells in the multidimensional table;
[0123] The filling unit 45 is used to fill the multidimensional table with business data.
[0124] The embodiments of the present specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multidimensional table generation method when executing the computer program.
[0125] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-dimensional table generation method is implemented.
[0126] The embodiments of the present specification also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the multi-dimensional table generation method is implemented.
[0127] Those skilled in the art will appreciate that this specification may be provided as a method, system, or computer program product. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. The computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0129] The various functional units in the embodiments of this specification may be integrated into one processing unit, or each functional unit may exist physically separately, or two or more functional units may be integrated into one processing unit.
[0130] Those skilled in the art will understand that the description of each embodiment in this specification has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. In addition, it is understood that after reading this specification, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.
[0131] Although the present specification is described through embodiments, those skilled in the art know that the above embodiments are only used to help understand the core idea of the present specification. Those skilled in the art can understand that there are many variations and changes in the present specification.
Claims
1. A method for generating a multidimensional table, It is characterized in that include: Determine the base table used to generate the multidimensional table; Load the dimension data corresponding to the basic table into the cache; The basic table is expanded according to the dimensional data in the cache to obtain a multidimensional table, wherein the cells in the multidimensional table correspond to a first data formula, and the first data formula is constructed based on the dimensional data; wherein the basic table includes expandable cells; the expansion processing step includes: for each column cell in the basic table, under the condition that the column cell contains a column expandable cell, according to the dimension identifier corresponding to the column expandable cell, the dimensional data is read in the cache, according to the number of dimensional data corresponding to the column expandable cell, the column expandable cell is inserted into the column, and the dimensional data is filled in the cell generated by the inserted column; for each row cell in the basic table, under the condition that the row cell contains a row expandable cell, according to the dimension identifier corresponding to the row expandable cell, the row expandable cell is inserted into the cache, and the dimensional data is filled in the cell generated by the inserted row; Parsing the first data formula to convert it into a second data formula executable by the front end, wherein the second data formula is constructed based on the row and column positions of the cells in the multidimensional table; Fill the multidimensional table with business data.
2. The method according to claim 1, It is characterized in that The steps in determining the base table include: Receive table identification and table parameter information; According to the table identifier and table parameter information, the corresponding basic table is matched in the basic table set.
3. The method according to claim 1, It is characterized in that The basic table includes expandable cells, and the expandable cells correspond to dimension identifiers; the step of loading dimension data includes: Obtain dimension identifiers of all expandable cells in the basic table; According to the dimension identifiers of all expandable cells, the corresponding dimension data is queried from the database server, and the queried dimension data is loaded into the cache; or, the dimension data includes multiple sub-data, and according to the display of the expandable cells, the corresponding target sub-data in the multiple sub-data is queried from the database server, and the queried target sub-data is loaded into the cache.
4. The method according to claim 1, It is characterized in that The multidimensional table includes a first data cell and a second data cell, the first data cell corresponds to a query statement for querying business data, and the second data cell corresponds to a first data calculation formula; The steps to populate business data include: Querying business data according to the query statement corresponding to the first data cell, and filling the business data into the first data cell; Accordingly, the step of parsing the first data formula includes: In the process of querying business data, the first data formula corresponding to the second data cell is parsed and converted into a second data formula executable by the front end, where the second data formula is constructed based on the row and column position of the cell in the multidimensional table.
5. The method according to claim 1, It is characterized in that The steps in the expansion process include: According to the paging parameters, the basic table is divided into a plurality of expandable areas; after receiving an expansion request for a specified expandable area, the specified expandable area is expanded according to the dimension data in the cache to obtain a paging table; The steps to populate business data include: Fill the paginated table with business data.
6. The method according to claim 1, It is characterized in that The multidimensional table includes a first data cell and a second data cell, the first data cell corresponds to a query statement for querying business data, and the second data cell corresponds to a second data formula; The method further comprises: Receiving target business data entered by a user in a designated first data cell; Selecting a second data cell affected by a specified first data cell in the multidimensional table; According to the entered target business data, the data in the affected second data cell is updated.
7. The method according to claim 6, It is characterized in that The method further comprises: A storage request is sent to a database server, wherein the storage request includes dimension data corresponding to a specified first data cell, target business data, dimension data corresponding to an affected second data cell, and updated data in the second data cell; so that the database server stores the target business data according to the dimension data corresponding to the specified first data cell, and stores the updated data in the second data cell according to the dimension data corresponding to the affected second data cell.
8. A device for generating a multidimensional table, It is characterized in that include: A determination unit, used for determining a basic table for generating a multidimensional table; A loading unit, used to load dimension data corresponding to the basic table into the cache; An expansion unit is used to expand a basic table according to the dimensional data in the cache to obtain a multidimensional table, wherein the cells in the multidimensional table correspond to a first data formula, and the first data formula is constructed based on the dimensional data; wherein the basic table includes expandable cells; the expansion processing step includes: for each column cell in the basic table, under the condition that the column cell contains a column expandable cell, according to the dimension identifier corresponding to the column expandable cell, the dimensional data is read in the cache, according to the dimension identifier corresponding to the column expandable cell, according to the number of dimensional data corresponding to the column expandable cell, the column expandable cell is inserted into the column, and the dimensional data is filled in the cell generated by the inserted column; for each row cell in the basic table, under the condition that the row cell contains a row expandable cell, according to the dimension identifier corresponding to the row expandable cell, the row expandable cell is inserted into the cache, and the dimensional data is filled in the cell generated by the inserted row; A parsing unit, used for parsing the first data formula to convert it into a second data formula executable by the front end, wherein the second data formula is constructed based on the row and column positions of the cells in the multidimensional table; A filling unit is used to fill business data in the multidimensional table.
9. A computer device, It is characterized in that include: at least one processor; A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1-7.
Citation Information
Cited By
A method, system, storage medium and program product for dynamic consolidation of cells in a multi-dimensional data table grouped view
CN122884971A
