Table data processing method, device, computer equipment and storage medium
By constructing a dimensional table associated with the table sample layer in tabular data processing, the problem of data layer occupying too much storage space in traditional technology is solved, and more efficient storage utilization is achieved.
Patent Information
- Application Number
- CN202111474446.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-04
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-12-04
AI Technical Summary
In traditional table data processing methods, cells in the data layer need to correspond one by one with the table sample layer, resulting in the data layer occupying a large storage space and consuming a large amount of storage resources, especially when the table has only a small area to fill in data.
By determining the regional characters of the table to be filled in the table sample layer, building a dimension table with the same range, and storing the table sample layer with the dimension table to generate a complete data table, avoiding the use of data layers of the same size as the table sample layer. Implement storage decoupling of tables.
The total storage space of the table is greatly reduced, especially for tables with huge data volume or tables in multiple data areas, saving storage resources and improving storage efficiency.
Smart Images

Figure CN114218903B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a table data processing method, device, computer equipment, storage medium and computer program product. Background Art
[0002] In software systems, table data is usually presented in a table-like format. The table template is set up with a table layer, a data layer, etc. Each layer uses an independent two-dimensional table to store information. The cells in the data layer store the dimension information of the data, and the cells in the table layer store the table information.
[0003] However, in traditional technology, no matter how much area the table template actually uses, even if only a small area of the table is filled with data, the cells in the data layer need to correspond one-to-one with the table layer, and use a table of the same size as the table layer. This causes the data layer to occupy a larger storage space and consume a large amount of storage resources. Summary of the invention
[0004] Based on this, it is necessary to provide a table data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can reduce storage resources in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a table data processing method. The method comprises:
[0006] Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol indicates a filling range of actual data in the table to be filled;
[0007] According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol;
[0008] The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
[0009] In one embodiment, the method comprises:
[0010] Determine target dimension combination information, and extract corresponding actual data from a data source according to the target dimension combination information;
[0011] Determine the actual filling position corresponding to the actual data in the table sample layer according to the region symbol corresponding to the target table to be filled corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table;
[0012] Filling the actual data into the target cell corresponding to the actual filling position;
[0013] A complete data table is generated based on the table sample information of the target table to be filled and the actual data filled in the target cells.
[0014] In one of the embodiments, determining the actual filling position corresponding to the actual data in the table sample layer according to the region symbol corresponding to the target to-be-filled table corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table includes:
[0015] Determine the starting position of the filling range of actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information;
[0016] Based on the sum of the relative positions of the starting position and the target dimension combination information in the dimension table, an actual filling position corresponding to the actual data in the table sample layer is determined.
[0017] In one embodiment, the method further comprises:
[0018] receiving a table adjustment instruction, wherein the table adjustment instruction carries a row order adjustment amount and / or a column order adjustment amount;
[0019] According to the adjustment amount in the table adjustment instruction, updating the area symbols corresponding to each table to be filled in the table sample layer;
[0020] According to the new filling range represented by the updated area symbol, the row sequence and / or column sequence of the corresponding table to be filled in the table sample layer is adjusted.
[0021] In one embodiment, the method further comprises:
[0022] When the dimension combination information stored in any cell in the dimension table includes multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer;
[0023] The table sample information corresponding to the table rows and / or table columns is updated to the dimension combination information of the corresponding dimension combination.
[0024] In one embodiment, determining at least one table to be filled in the table sample layer includes:
[0025] Based on the input operation triggered in the area setting interface, the area symbol of the table to be filled is obtained, and the table to be filled in the corresponding range is generated according to the area symbol; or
[0026] Based on a selection operation of at least one cell in the table display interface, a starting position and an ending position of the table to be filled are determined, and a corresponding range of the table to be filled is generated based on the starting position and the ending position.
[0027] In a second aspect, the present application also provides a table data processing device. The device comprises:
[0028] Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol indicates a filling range of actual data in the table to be filled;
[0029] According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol;
[0030] The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
[0031] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0032] Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol indicates a filling range of actual data in the table to be filled;
[0033] According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol;
[0034] The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol indicates a filling range of actual data in the table to be filled;
[0037] According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol;
[0038] The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
[0039] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0040] Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol indicates a filling range of actual data in the table to be filled;
[0041] According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol;
[0042] The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
[0043] The above-mentioned table data processing method, device, computer equipment, storage medium and computer program product construct a dimensional table of the same range in the data layer according to the filling range of the actual data to be filled in the table in the table sample layer. There is no need to use a table of the same size as the table sample layer, and then associate the table sample layer with the dimensional table for storage, so that the storage of the table sample and the data area of the table is decoupled, which greatly reduces the total storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a flow chart of a table data processing method in one embodiment;
[0045] Figure 2 A schematic diagram of a region setting interface in one embodiment;
[0046] Figure 3 A schematic flow chart of steps for a terminal to generate a complete data table in one embodiment;
[0047] Figure 4 A schematic flow chart of a step of determining an actual filling position corresponding to actual data in a surface sample layer by a terminal in one embodiment;
[0048] Figure 5 A schematic flow chart of a step of adjusting the row order and / or column order of a table to be filled in a table sample layer implemented by a terminal in an embodiment;
[0049] Figure 6 It is a flowchart of steps executed by the terminal when the dimension combination information stored in any cell in the dimension table includes multiple dimension combinations in one embodiment;
[0050] Figure 7 A schematic diagram of table changes in one embodiment;
[0051] Figure 8 A schematic diagram of a surface sample layer in one embodiment;
[0052] Fig. 9 is a schematic diagram of a data layer in one embodiment;
[0053] Fig.10 is a schematic diagram of a complete table in one embodiment;
[0054] Fig.11 is a structural block diagram of a table data processing device in one embodiment;
[0055] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] Currently, when a table is generated, the cells in the table sample layer store table sample information (such as text description information, background color filling, etc.), and the cells in the data layer store data dimension information (such as Organization A Subject 1). When displaying a report, the data corresponding to the dimension (such as Organization A Subject 1) (such as 10000) is obtained from the database based on the dimension information of the data layer and filled into the table sample layer for display.
[0058] However, in traditional technology, no matter how much area the table template actually uses, even if only a small area of the table is filled with data, the cells in the data layer need to correspond one-to-one with the table layer, and use a table of the same size as the table layer. This causes the data layer to occupy a larger storage space and consume a large amount of storage resources.
[0059] In view of this, the present application provides a table data processing method, apparatus, computer equipment, storage medium and computer program product, which decouples the storage of table samples and data areas by structurally splitting the table and using independent tables to store dimension combination information, thereby greatly reducing the total storage space of the table. In particular, for tables with huge amounts of data or complex tables with multiple different data areas, the amount of storage resources saved is more significant.
[0060] For example, for a table that contains multiple content areas and is composed of columns A to J and rows 1 to 10, it is assumed that the position corresponding to the starting cell (column A, row 1) is A1, and the position corresponding to the ending cell (column J, row 10) is J10. Among them, only area 1 corresponding to columns A to D and rows 1 to 3 and area 2 corresponding to columns A to D and rows 8 to 9 store table data (such as table headers, row headers, and column headers, etc.), and the rest of the table does not store data (or stores data unrelated to the table). In the prior art, a data layer of the same size as the range of columns A to J and rows 1 to 10 in the table sample layer is still generated, and then the table sample layer is stored together with the data layer. If the number of stored cells is used to represent the size of the storage space, the prior art needs to store 10×10 (table sample layer) + 10×10 (data layer) = 200 cells. By adopting the method provided by the present application, the total storage space is saved by reducing the amount of data stored in the data layer. In the present application, the data layer only needs to store the cells corresponding to area 1 and area 2, that is, the total number of cells stored is 10×10 (surface layer)+3×3+3×2=115 cells.
[0061] In one embodiment, Figure 1 As shown, a table data processing method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0062] Step S102: determining at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to an area symbol, and the area symbol indicates a filling range of actual data in the table to be filled.
[0063] Among them, the area symbol is used to indicate the filling range of the actual data in the table to be filled. The area symbol can be represented by the position combination corresponding to the starting cell and the ending cell respectively. For example, the area symbol C2:F10 represents the filling range consisting of the C column to the F column and the 2nd row to the 10th row. The starting cell is the cell corresponding to the 2nd row of the C column, and the ending cell is the cell corresponding to the 10th row of the F column. For another example, the area symbol can be represented by the coordinates corresponding to the starting cell and the ending cell respectively. For example, (1,1):(10,10) can represent the filling range from the first row and the first column to the tenth row and the tenth column. Of course, it is not limited to this. In the above examples, letters can also be used to represent the row order, numbers can be used to represent the column order, etc.
[0064] In the embodiment of the present application, only one table sample layer is used to store table sample information. The table sample layer and the data layer are hierarchical structures for storing tables. The table sample layer is used to store table sample information, such as title text, fill color, etc. The data layer is used to store dimension combination information, and one dimension combination information corresponds to a specific actual data.
[0065] Specifically, in the form layer, the terminal determines the form to be filled with data by receiving the user's trigger operation, and determines the area symbol of the data to be filled. The trigger operation includes but is not limited to input, selection, drag, touch and other operations. Exemplarily, the terminal can provide a visual interface to the user through a display device (such as a display screen), so that the user can perform input, selection, drag and other operations in the visual interface to delineate the form to be filled.
[0066] In some embodiments, the terminal obtains the region symbol of the table to be filled based on the input operation triggered in the region setting interface, and generates a corresponding range of the table to be filled according to the region symbol. Specifically, the terminal provides a region setting interface to the user, and the region setting interface allows the user to input the region symbol, so that the terminal can generate a corresponding range of the table to be filled in the table layer according to the input region symbol. In a specific example, Figure 2 As shown, the terminal can provide the user with an area setting interface (such as the "data area setting" interface on the right side of the figure). In the data area setting interface, the user can enter the area size (for example, enter the area symbol B5:C10, and the data starting position is B5), thereby determining the filling range of the table to be filled and the corresponding actual data in the table sample layer (that is, the solid line filling part in the figure). The user can also set the dimension information in the data area setting interface to indicate the dimension combination to which each cell belongs, for example Figure 2 In the dimension information of Department 1 to Department 6 and Subject 1 to Subject 2, the corresponding dimension combination corresponding to cell B5 is "Subject 1, Department 1".
[0067] Alternatively, in some embodiments, the terminal determines the starting position and the ending position of the table to be filled based on the selection operation of at least one cell in the table display interface, and generates a corresponding range of the table to be filled based on the starting position and the ending position. Specifically, the terminal provides a table display interface to the user, so that the user can select one or more cells in the table display interface by clicking, dragging, etc. For example, the user can click on two cells in succession, and the terminal uses the two cells as the starting cell and the ending cell respectively, thereby determining the range of the entire table to be filled and generating the table to be filled accordingly. For another example, the user can drag and select a table area, and the terminal automatically obtains the starting cell and the ending cell in the area, thereby determining the table to be filled.
[0068] In the above embodiment, by providing a visual interface to the user and detecting the user's triggering operation, the size of the form to be filled can be automatically determined and the form to be filled can be automatically generated.
[0069] Step S104: construct a dimension table of the same range in the data layer according to the range represented by the region symbol, wherein each cell in the dimension table corresponds to the dimension combination information corresponding to the data to be filled in the table to be filled, and the relative position of the corresponding cell relative to the region symbol.
[0070] Among them, dimension combination information refers to the combination of two dimensions to which the cell belongs. The set dimensions can be, for example, organization, subject, name, date, and so on. Dimension information is the specific value of the dimension. For example, the organization dimension can include multiple dimension information such as organization one, organization two, etc. For a two-dimensional table, a cell usually corresponds to at least one dimension combination information. For example, a cell corresponds to the two dimension information of "organization one" and "subject one". Of course, a cell can also correspond to multiple dimension combination information, for example, a cell corresponds to the dimension information of "organization one" and all subjects. Usually, the dimension information set in the table row can be called row header, the dimension information set in the table column can be called column header, and so on.
[0071] Specifically, the terminal constructs a dimension table of the same size as the filling range in the data layer according to the filling range of the actual data to be filled in the table represented by the area symbol. Therefore, there is no need to store a data layer of the same size as the complete table sample layer, but only a dimension table of the size of the range of the relevant actual data is stored, which can improve storage efficiency and save storage space.
[0072] In the dimension table, the terminal stores the dimension combination information to which each cell belongs when it is mapped to the corresponding cell in the table sample layer. For example, for the cell in the first row and first column of the dimension table, assuming that the corresponding table to be filled in the table sample layer is H5, and the column title corresponding to the H5 cell is "Organization 1" and the row title is "Subject 1", then the dimension combination information corresponding to the cell in the dimension table is "Subject 1, Organization 1". At the same time, since the data layer is decoupled from the table sample layer, the terminal also stores the relative position of each cell in the dimension table relative to the area symbol of the corresponding table to be filled in the table sample layer.
[0073] For example, for the cell in the first row and first column of the dimension table, the terminal stores its position as (0,0), and the cell stores the dimension combination information of "Subject 1, Organization 1". Assuming that the area symbol of the corresponding table to be filled is H5:K8, if the table to be filled corresponding to H5:K8 is moved to another position (such as H6:K9) in the table sample layer, the position of the cell in the dimension table remains unchanged, and the dimension combination information of "Subject 1, Organization 1" is still stored.
[0074] Step S106: The table sample layer and the dimension table are stored in association with each other. The associated table sample layer and the dimension table are used to generate a complete data table.
[0075] Specifically, the terminal associates the table sample layer with the generated dimension table and stores them. Thus, when generating a complete data table, the terminal can fill the actual data corresponding to the dimension combination information into the corresponding position of the table to be filled according to the filling range of the actual data of the table to be filled in the table sample layer and the relative position of each cell in the dimension table relative to the filling range, and according to the indicated dimension combination information, thereby generating a complete data table.
[0076] In the above table data processing method, by constructing a dimensional table of the same range in the data layer according to the filling range of the actual data to be filled in the table in the table sample layer, there is no need to use a table of the same size as the table sample layer, and then the table sample layer and the dimensional table are associated and stored, so that the storage of the table sample and the data area are decoupled, thereby greatly reducing the total storage space.
[0077] When generating a complete data table, such as Figure 3 As shown, the terminal performs the following steps:
[0078] Step S302, determining target dimension combination information, and extracting corresponding actual data from a data source according to the target dimension combination information.
[0079] Step S304, determining the actual filling position corresponding to the actual data in the table sample layer according to the region symbol corresponding to the target table to be filled corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table.
[0080] Step S306, filling the actual data into the target cell corresponding to the actual filling position.
[0081] Step S308: Generate a complete data table based on the table sample information of the target table to be filled and the actual data filled in the target cells.
[0082] The terminal processes each cell in turn to finally generate a complete data table. Specifically, the terminal first determines what kind of data needs to be filled this time, that is, the dimension combination information corresponding to the actual data. In order to distinguish it from other unprocessed dimension combination information, the dimension combination information corresponding to the actual data to be filled this time is called the target dimension combination information, and the cell filled with the actual data is called the target cell; in some cases, a table layer stores multiple tables to be filled, then the table to be filled in this processing is called the target table to be filled. The terminal extracts the actual data corresponding to the target dimension combination information from the data source based on the target dimension combination information. For example, the actual data corresponding to Subject One and Organization One extracted from the data source by the terminal is 100. Among them, the data source is, for example, a database, or other virtual media storing actual data.
[0083] According to the determined target dimension combination information, the terminal determines the target table to be filled corresponding to the target dimension combination information in the table sample layer, and obtains the region symbol corresponding to the target table to be filled. According to the relative position of the stored target dimension combination information, combined with the filling range represented by the region symbol, the terminal can determine the actual filling position corresponding to the actual data in the table sample layer.
[0084] After determining the actual filling position, the terminal fills the actual data into the target cell corresponding to the actual filling position, and the cell is filled with data. The terminal processes the next cell in turn until all cells in the dimension table in the data layer are traversed. Finally, the terminal generates a complete data table based on the table sample information (such as row headers, column headers) of the target table to be filled and the actual data filled in the target cell.
[0085] In some embodiments, Figure 4 As shown, according to the region symbol corresponding to the target table to be filled corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table, determining the actual filling position corresponding to the actual data in the table sample layer includes:
[0086] Step S402, determining the starting position of the filling range of actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information.
[0087] Step S404: determining the actual filling position corresponding to the actual data in the table sample layer based on the sum of the relative positions of the start position and the target dimension combination information in the dimension table.
[0088] Specifically, the terminal determines the area symbol corresponding to the target table to be filled according to the target dimension combination information, thereby determining the starting position of the filling range of the actual data. Then, the terminal calculates the corresponding actual filling position based on the sum of the starting position and the relative position. For example, assuming that the relative coordinate value of the cell of the dimension table corresponding to subject 3 organization 4 compared to the starting position represented by the area symbol in the table sample layer is (2,3), and the corresponding starting position of the table to be filled is the absolute coordinate value of cell H5 is (7,4), then the absolute position (9,7) can be calculated by adding the coordinate value of the dimension member cell, and the actual filling position can be determined to be the position of cell K7.
[0089] In the above embodiment, the absolute position of the actual data in the table sample layer (i.e., the actual filling position) is calculated by the starting position value of the actual data stored in the table to be filled in the table sample layer and the relative position stored in the dimension table, and the actual data is filled into the actual filling position, thereby automatically generating a complete data table. By splitting the data area into independent tables to store dimension information, the storage of the table sample and the data area is decoupled, reducing the total storage space. At the same time, since the relative position is stored in the dimension table, when the rows and columns of the table change (such as inserting rows and columns), it is only necessary to modify the area symbol; and since the relative position does not change, the dimension table corresponding to the data area does not need any adjustment, and the efficiency of data area adjustment is greatly improved.
[0090] Because the table cell position of the data layer is consistent with the table sample layer cell position in the prior art, the absolute position information of the cell is used to store and locate information when the table is displayed. This results in a large number of cells needing to be moved when the position of the data area changes (for example, rows and columns can be dynamically inserted between multiple data areas according to actual data), which is very inefficient. Therefore, in one embodiment, Figure 5 As shown, the table data processing method provided by the present application also includes:
[0091] Step S502: receiving a table adjustment instruction, where the table adjustment instruction carries a row order adjustment amount and / or a column order adjustment amount.
[0092] Step S504: updating the region symbols corresponding to the tables to be filled in the table sample layer according to the adjustment amount in the table adjustment instruction.
[0093] Step S506: adjusting the row sequence and / or column sequence of the corresponding table to be filled in the table sample layer according to the new filling range indicated by the updated region symbol.
[0094] Specifically, the terminal obtains a table adjustment instruction by detecting a trigger operation of the user. The table adjustment instruction carries a row order adjustment amount and / or a column order adjustment amount. The row order adjustment amount and / or the column order adjustment amount represent the number of rows / columns that the table row and / or the table column need to move. Since after adjusting one data area, all other data areas will also be adjusted accordingly, the terminal updates the area symbols corresponding to all tables to be filled in the table sample layer according to the adjustment amount. Thus, the terminal implements the row order adjustment and / or column order adjustment of the corresponding table to be filled in the table sample layer according to the new filling range represented by the updated area symbol.
[0095] For example, if two new rows are added to a table to be filled, the area symbol of the table to be filled will change accordingly, and the terminal will update accordingly. Due to the change of the table to be filled, the entire table below will shift down by two rows. Assuming that the area symbol of the other table to be filled was originally H15:K17, the terminal will modify it to H15:K17+(0,2)=H17:K19 according to the row sequence adjustment amount. At this time, the position in the dimension table in the data layer does not need to be modified.
[0096] In the above embodiment, when the position of a table member changes (such as inserting a table row or table column), it is only necessary to modify the area symbol and the starting position value (absolute position mark), and the table corresponding to the data layer does not need any adjustment (because the relative position does not change), thereby greatly improving the efficiency of data area adjustment.
[0097] As mentioned above, a cell may also correspond to multiple dimensional combination information. When generating a complete data table, it is necessary to expand the multiple dimensional combination information and display them separately. To this end, in one embodiment, Figure 6 As shown, the above method includes:
[0098] Step S602, when the dimension combination information stored in any cell in the dimension table includes multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer.
[0099] Step S604: Update the table sample information corresponding to the table rows and / or table columns to the dimension combination information of the corresponding dimension combination.
[0100] Specifically, when the dimension combination information stored in a cell in a dimension table contains multiple dimension combinations, for example, the dimension combination information of "all groups and subject 1 under department 1" includes multiple dimension combinations such as department 1 group 1 subject 1, department 1 group 2 subject 1, department 1 group 3 subject 1, etc. Then, the terminal determines, based on the number of dimensions corresponding to the dimension combination, whether the table rows and table columns need to be added in the table to be filled in the table sample layer, or whether both the table rows and table columns need to be added. Then, based on the newly added table rows and / or table columns, the dimension combination is split into separate dimension combination information, and each corresponds to the corresponding table rows and / or table columns. In the table sample layer, the terminal updates the table sample information corresponding to the newly added table rows and / or table columns to the dimension combination information of the corresponding dimension combination. For example Figure 7 As shown, if the dimension member stored in a cell in the dimension table is a range value (for example, the cell stores 'all subordinate members' of account 4), rows will be inserted according to the range resolution when the table is displayed. For example, if 'all subordinate members' of account 4 are parsed into account 4-1, account 4-2, and account 4-3, two rows need to be added below the table row corresponding to the cell to fill in the data corresponding to account 4-2 and account 4-3.
[0101] In the above embodiment, the addition of table rows and / or table columns can be automatically achieved through dimension combination information, thereby improving the efficiency of table processing.
[0102] In order to better understand the inventive concept of the present invention, a specific embodiment is used as an example below. In a specific embodiment, the terminal uses a layer of table sample layer to store table sample information, that is, Figure 8 The table of 30*17 size corresponding to A1:Q30 shown in the figure. Assume that there are two tables to be filled in the table sample layer (i.e., the area to be filled with data), and the corresponding area symbols are H5:K8 and H15:K17. Among them, the starting position (such as H5 and H15) identifies the starting position information of the actual data. At the same time, Fig. 9 As shown, the terminal constructs two dimensional tables in the data layer that are equal to the size of the range represented by the area symbol (such as the dimensional table corresponding to the area symbol H5:K8 is 4*4=16 cells, and the dimensional table corresponding to the area symbol H15:K17 is 3*4=12 cells), and the cells in the table store the dimensional combination information within the area.
[0103] When generating a complete data table, the value of the actual data is extracted by the terminal from the data source (such as a database) according to the dimension combination information, such as the value of subject 1 organization 1 is 100. Then, the terminal calculates the absolute position of the actual data in the table sample layer, which is calculated by the starting position of the actual data represented by the area symbol in the table sample layer and the relative position in the dimension table. For example, the relative coordinate value of the cell of the dimension table corresponding to subject 1 organization 1 compared to the starting position represented by the area symbol in the table sample layer is (0,0), and the absolute coordinate value of the corresponding starting position of the table to be filled is cell H5 is (7,4). Then, the absolute position (7,4) can be calculated by adding the coordinate value of the dimension member cell, and the actual filling position can be determined to be the position of cell H5. For another example, the relative coordinate value of the cell of the dimension table corresponding to subject 3 organization 4 compared to the starting position represented by the area symbol in the table sample layer is (2,3), and the absolute coordinate value of the corresponding starting position of the table to be filled is cell H5 is (7,4). Then, the absolute position (9,7) can be calculated by adding the coordinate value of the dimension member cell, and the actual filling position can be determined to be the position of cell K7. The terminal then fills the actual value extracted from the data source into the actual filling position, and the final generated complete data table is as follows Fig.10 shown.
[0104] In the embodiment of the present application, by splitting the data area into independent tables to store dimension member information, the storage of the table and the data area is decoupled, which greatly reduces the total storage space. Taking the table in the above embodiment as an example, if the method provided by the user is used, the storage required is: the number of cells in the table layer + the number of cells in the data area H5:K8 + the number of cells in the data area H15:K17 = 30×17+4×4+3×4=538, while if the traditional method is used, at least 2×the number of cells in the table layer is required = 2×30×17=1020, and as the number of cells in the table layer increases, the difference in data storage between the two methods will become more significant.
[0105] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0106] Based on the same inventive concept, the embodiment of the present application also provides a table data processing method device for implementing the table data processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more table data processing method device embodiments provided below can refer to the above limitations on the table data processing method, and will not be repeated here.
[0107] In one embodiment, Fig.11 As shown, a table data processing device 1101 is provided, comprising: a determination module 1101, a construction module 1102 and a storage module 1103, wherein:
[0108] The determination module 1101 is used to determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to an area symbol, and the area symbol indicates the filling range of actual data in the table to be filled.
[0109] Construction module 1102 is used to construct a dimension table of the same range in the data layer according to the range represented by the area symbol, wherein each cell in the dimension table corresponds to the dimension combination information corresponding to the data to be filled in the table to be filled, and the relative position of the corresponding cell relative to the area symbol.
[0110] The storage module 1103 is used to associate and store the table sample layer with the dimension table. The associated and stored table sample layer and dimension table are used to generate a complete data table.
[0111] In one of the embodiments, the above-mentioned device also includes a generation module, which is used to determine the target dimension combination information, and extract the corresponding actual data from the data source according to the target dimension combination information; determine the actual filling position corresponding to the actual data in the table sample layer according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information, and the relative position of the target dimension combination information in the dimension table; fill the actual data into the target cell corresponding to the actual filling position; generate a complete data table based on the table sample information of the target table to be filled and the actual data filled in the target cell.
[0112] In one of the embodiments, the generation module is also used to determine the starting position of the filling range of actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information; based on the sum of the starting position and the relative position of the target dimension combination information in the dimension table, determine the actual filling position corresponding to the actual data in the table sample layer.
[0113] In one of the embodiments, the above-mentioned device also includes an adjustment module, which is used to receive a table adjustment instruction, and the table adjustment instruction carries a row order adjustment amount and / or a column order adjustment amount; according to the adjustment amount in the table adjustment instruction, the area symbols corresponding to each table to be filled in the table sample layer are updated; according to the new filling range represented by the updated area symbol, the row order adjustment and / or column order adjustment of the corresponding table to be filled in the table sample layer is implemented.
[0114] In one of the embodiments, the above-mentioned device also includes an expansion module, and the expansion module is used to determine the table rows and / or table columns corresponding to each dimension in the corresponding table to be filled in the table sample layer according to the dimensions corresponding to the dimension combination when the dimension combination information stored in any cell in the dimension table contains multiple dimension combinations; and update the table sample information corresponding to the table rows and / or table columns to the dimension combination information of the corresponding dimension combination.
[0115] In one of the embodiments, the determination module is also used to obtain the area symbol of the table to be filled based on the input operation triggered in the area setting interface, and generate the corresponding range of the table to be filled according to the area symbol; or, based on the selection operation of at least one cell in the table display interface, determine the starting position and the ending position of the table to be filled, and generate the corresponding range of the table to be filled based on the starting position and the ending position.
[0116] Each module in the above table data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0117] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for processing table data is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0118] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0119] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: determining at least one table to be filled in a table sample layer, wherein the table to be filled corresponds to an area symbol, and the area symbol represents the filling range of actual data in the table to be filled; according to the range represented by the area symbol, constructing a dimension table of the same range in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and the relative position of the corresponding cell with respect to the area symbol; the table sample layer and the dimension table are associated and stored, and the associated stored table sample layer and dimension table are used to generate a complete data table.
[0120] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the target dimension combination information, and extracting the corresponding actual data from the data source based on the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information, and the relative position of the target dimension combination information in the dimension table; filling the actual data into the target cell corresponding to the actual filling position; generating a complete data table based on the table sample information of the target table to be filled and the actual data filled in the target cell.
[0121] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the starting position of the filling range of the actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the sum of the starting position and the relative position of the target dimension combination information in the dimension table.
[0122] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving a table adjustment instruction, the table adjustment instruction carrying a row order adjustment amount and / or a column order adjustment amount; updating the area symbols corresponding to each table to be filled in the table sample layer according to the adjustment amount in the table adjustment instruction; and implementing the row order adjustment and / or column order adjustment of the corresponding table to be filled in the table sample layer according to the new filling range represented by the updated area symbol.
[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the dimension combination information stored in any cell in the dimension table contains multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, the table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer; the table sample information corresponding to the table rows and / or table columns are respectively updated to the dimension combination information of the corresponding dimension combination.
[0124] In one embodiment, when the processor executes the computer program, it also implements the following steps: based on the input operation triggered in the area setting interface, obtaining the area symbol of the table to be filled, and generating the corresponding range of the table to be filled according to the area symbol; or, based on the selection operation of at least one cell in the table display interface, determining the starting position and the ending position of the table to be filled, and generating the corresponding range of the table to be filled based on the starting position and the ending position.
[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: determining at least one table to be filled in a table sample layer, wherein the table to be filled corresponds to an area symbol, and the area symbol represents the filling range of actual data in the table to be filled; according to the range represented by the area symbol, constructing a dimension table of the same range in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and the relative position of the corresponding cell with respect to the area symbol; the table sample layer and the dimension table are associated and stored, and the associated stored table sample layer and dimension table are used to generate a complete data table.
[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the target dimension combination information, and extracting the corresponding actual data from the data source based on the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information, and the relative position of the target dimension combination information in the dimension table; filling the actual data into the target cell corresponding to the actual filling position; generating a complete data table based on the table sample information of the target table to be filled and the actual data filled in the target cell.
[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the starting position of the filling range of the actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the sum of the starting position and the relative position of the target dimension combination information in the dimension table.
[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a table adjustment instruction, the table adjustment instruction carrying a row order adjustment amount and / or a column order adjustment amount; updating the area symbols corresponding to each table to be filled in the table sample layer according to the adjustment amount in the table adjustment instruction; and implementing the row order adjustment and / or column order adjustment of the corresponding table to be filled in the table sample layer according to the new filling range represented by the updated area symbol.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the dimension combination information stored in any cell in the dimension table contains multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, the table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer; the table sample information corresponding to the table rows and / or table columns are respectively updated to the dimension combination information of the corresponding dimension combination.
[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the input operation triggered in the area setting interface, the area symbol of the table to be filled is obtained, and the table to be filled in the corresponding range is generated according to the area symbol; or, based on the selection operation of at least one cell in the table display interface, the starting position and the ending position of the table to be filled are determined, and the table to be filled in the corresponding range is generated based on the starting position and the ending position.
[0131] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: determining at least one table to be filled in a table sample layer, wherein the table to be filled corresponds to an area symbol, and the area symbol represents the filling range of actual data in the table to be filled; according to the range represented by the area symbol, constructing a dimension table of the same range in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and the relative position of the corresponding cell with respect to the area symbol; the table sample layer and the dimension table are associated and stored, and the associated stored table sample layer and dimension table are used to generate a complete data table.
[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the target dimension combination information, and extracting the corresponding actual data from the data source based on the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information, and the relative position of the target dimension combination information in the dimension table; filling the actual data into the target cell corresponding to the actual filling position; generating a complete data table based on the table sample information of the target table to be filled and the actual data filled in the target cell.
[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the starting position of the filling range of the actual data in the target table to be filled according to the area symbol corresponding to the target table to be filled corresponding to the target dimension combination information; determining the actual filling position corresponding to the actual data in the table sample layer based on the sum of the starting position and the relative position of the target dimension combination information in the dimension table.
[0134] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a table adjustment instruction, the table adjustment instruction carrying a row order adjustment amount and / or a column order adjustment amount; updating the area symbols corresponding to each table to be filled in the table sample layer according to the adjustment amount in the table adjustment instruction; and implementing the row order adjustment and / or column order adjustment of the corresponding table to be filled in the table sample layer according to the new filling range represented by the updated area symbol.
[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the dimension combination information stored in any cell in the dimension table contains multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, the table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer; the table sample information corresponding to the table rows and / or table columns are respectively updated to the dimension combination information of the corresponding dimension combination.
[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the input operation triggered in the area setting interface, the area symbol of the table to be filled is obtained, and the table to be filled in the corresponding range is generated according to the area symbol; or, based on the selection operation of at least one cell in the table display interface, the starting position and the ending position of the table to be filled are determined, and the table to be filled in the corresponding range is generated based on the starting position and the ending position.
[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0138] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A table data processing method, characterized in that: The method comprises: Determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol is represented by a position combination corresponding to a start cell of the table to be filled and an end cell of the table to be filled; According to the range represented by the region symbol, a dimension table of the same range is constructed in the data layer, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol; The table sample layer and the dimension table are stored in association with each other, and the table sample layer and the dimension table stored in association with each other are used to generate a complete data table.
2. The method according to claim 1, characterized in that The method comprises: Determine target dimension combination information, and extract corresponding actual data from a data source according to the target dimension combination information; Determine the actual filling position corresponding to the actual data in the table sample layer according to the region symbol corresponding to the target table to be filled corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table; Filling the actual data into the target cell corresponding to the actual filling position; A complete data table is generated based on the table sample information of the target table to be filled and the actual data filled in the target cells.
3. The method according to claim 2, characterized in that The determining, according to the region symbol corresponding to the target to-be-filled table corresponding to the target dimension combination information and the relative position of the target dimension combination information in the dimension table, the actual filling position corresponding to the actual data in the table sample layer includes: Determine the starting position of the filling range in the target to-be-filled table according to the region symbol corresponding to the target to-be-filled table corresponding to the target dimension combination information; Based on the sum of the relative positions of the starting position and the target dimension combination information in the dimension table, an actual filling position corresponding to the actual data in the table sample layer is determined.
4. The method according to claim 1, characterized in that: The method further comprises: receiving a table adjustment instruction, wherein the table adjustment instruction carries a row order adjustment amount and / or a column order adjustment amount; According to the adjustment amount in the table adjustment instruction, updating the area symbols corresponding to each table to be filled in the table sample layer; According to the new filling range represented by the updated area symbol, the row sequence and / or column sequence of the corresponding table to be filled in the table sample layer is adjusted.
5. The method according to claim 1, characterized in that The method further comprises: When the dimension combination information stored in any cell in the dimension table includes multiple dimension combinations, according to the dimensions corresponding to the dimension combinations, table rows and / or table columns corresponding to each dimension are determined in the corresponding table to be filled in the table sample layer; The table sample information corresponding to the table rows and / or table columns is updated to the dimension combination information of the corresponding dimension combination.
6. The method according to any one of claims 1 to 5, characterized in that The step of determining at least one table to be filled in the table sample layer comprises: Based on the input operation triggered in the area setting interface, the area symbol of the table to be filled is obtained, and the table to be filled in the corresponding range is generated according to the area symbol; or Based on a selection operation of at least one cell in the table display interface, a starting position and an ending position of the table to be filled are determined, and a corresponding range of the table to be filled is generated based on the starting position and the ending position.
7. A table data processing device, characterized in that: The device comprises: A determination module, configured to determine at least one table to be filled in the table sample layer, wherein the table to be filled corresponds to a region symbol, and the region symbol is represented by a position combination corresponding to a start cell of the table to be filled and an end cell of the table to be filled; A construction module, configured to construct a dimension table of the same range in the data layer according to the range represented by the region symbol, wherein each cell in the dimension table corresponds to dimension combination information corresponding to the data to be filled in the table to be filled, and a relative position of the corresponding cell with respect to the region symbol; The storage module is used to associate and store the table sample layer with the dimension table, and the associated and stored table sample layer and dimension table are used to generate a complete data table.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Sedimentary area remote sensing recognition method and device, electronic equipment and storage medium
CN108875615A
File information determination method, device and equipment and readable storage medium
CN109993126A
