Multi-dimensional retrieval method and device based on two-dimensional report, medium and program product
By constructing a multi-dimensional mapping structure in a two-dimensional table and performing cutting and conversion processing, the problem of inefficient multi-dimensional data conversion in two-dimensional reports is solved, and efficient multi-dimensional retrieval is achieved.
Patent Information
- Application Number
- CN202411633024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-04
AI Technical Summary
The traditional multi-dimensional search scheme cannot effectively implement multi-dimensional data conversion in two-dimensional reports, resulting in inefficient retrieval.
By obtaining the cell dimension area information in a two-dimensional table, assigning indicators to cells, and building a multi-dimensional mapping structure, cutting the target dimension mapping structure, obtaining the target indicator set, and performing multi-dimensional conversion between tables.
It realizes automatic calculation of table data in two-dimensional reports and converts it to the target dimension, saving server resources and improving multi-dimensional retrieval efficiency.
Smart Images

Figure CN119557355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multidimensional retrieval technology, and in particular to a multidimensional retrieval method, device, medium and program product based on two-dimensional report forms. Background Art
[0002] In traditional two-dimensional enterprise reports or Excel reports, there are only two-dimensional reports (two-dimensional means left and right or up and down, and two-dimensional tables are flat tables, that is, they only have area but no volume). For indicators / storage units (cells filled with values in two dimensions), only the dimensional area information between rows and columns is marked. However, in actual scenarios, there are many types of files such as customers and account ages that give indicators different dimensional meanings.
[0003] Traditional multi-dimensional retrieval solutions achieve multi-dimensionality by creating dimension region information columns, which has performance and storage model limitations, that is, traditional dimension mapping does not interact with the database level. Existing technologies based on systems / independent Excel make it difficult to convert data between multi-dimensional dimensions in two-dimensional reports. In archives or data retrieval scenarios, because there is no multi-dimensional region information, it is impossible to retrieve data by dimension. The traditional method requires screening of all table dimensions according to the target dimension during the data retrieval process.
[0004] Therefore, it is urgent to invent a multidimensional retrieval method based on two-dimensional reports to solve the problems in existing retrieval methods that the two-dimensional report storage unit has no multidimensional meaning, the two-dimensional table cannot be converted into a multidimensional table, and the multidimensional report retrieval efficiency is low. Summary of the invention
[0005] In view of this, embodiments of the present invention provide a multi-dimensional search method, device, medium and program product based on two-dimensional reports, which at least partially solve the problems existing in the prior art.
[0006] Other features and advantages of the present invention will become apparent from the following detailed description, or may be learned in part by practice of the present invention.
[0007] In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
[0008] According to a first aspect of an embodiment of the present invention, a multi-dimensional search method based on a two-dimensional report is provided, the method comprising:
[0009] Get the two-dimensional table to be retrieved;
[0010] For each cell in the two-dimensional table, assign a corresponding indicator to the cell according to the dimension area information of the cell;
[0011] Constructing a multidimensional mapping structure according to each indicator corresponding to the two-dimensional table;
[0012] Cutting the multidimensional mapping structure according to the target retrieval dimension to obtain a target dimension mapping structure;
[0013] Using the target dimension mapping structure, a target indicator set is obtained;
[0014] According to the dimension area information of the indicators in the target indicator set, the two-dimensional table is subjected to multi-dimensional conversion processing between tables, and the converted target table is used as the dimension search result
[0015] Furthermore, a multidimensional mapping structure is constructed according to each indicator corresponding to the two-dimensional table, including:
[0016] Each indicator corresponding to the two-dimensional table is mapped to different dimensions to obtain a multi-dimensional indicator mapping tree.
[0017] Furthermore, constructing a multidimensional mapping structure according to each indicator corresponding to the two-dimensional table also includes:
[0018] According to the dimension area information of each indicator in the multidimensional indicator mapping tree, the multidimensional indicator mapping tree is subjected to structural compression processing to obtain a compressed plane mapping structure.
[0019] Furthermore, the multidimensional mapping structure is cut according to the target retrieval dimension to obtain a target dimension mapping structure, including:
[0020] According to the dimension area information of the indicators in the plane mapping structure, the plane mapping structure is cut using the target retrieval dimension to obtain a target dimension mapping structure corresponding to the target retrieval dimension.
[0021] Furthermore, according to the dimension area information of the indicators in the target indicator set, the two-dimensional table is subjected to multi-dimensional conversion processing between tables, and the target table obtained by the conversion is used as the dimension search result, including:
[0022] According to the dimension area information of each indicator in the target indicator set, the two-dimensional table is converted into a first target table corresponding to the target retrieval dimension, and the cell data in the two-dimensional table is filled into the first target table to obtain a second target table.
[0023] Further, the cell data in the two-dimensional table is filled into the first target table to obtain a second target table, including:
[0024] Sequentially filling the row dimension data of the two-dimensional table into the first target table;
[0025] According to the dimension area information of each indicator in the target indicator set, the column dimension data of the increased dimension in the two-dimensional table is merged and calculated, and the column dimension data of the reduced dimension is split and calculated to obtain a calculation result;
[0026] Fill the calculation results into the first target table to obtain the second target table.
[0027] Furthermore, the two-dimensional table is a two-dimensional table including a multi-dimensional dynamic area, and the dimensional area information is a row title, a column title and a row-column dimensional relationship corresponding to the storage unit.
[0028] According to a second aspect of an embodiment of the present invention, a multi-dimensional search device based on a two-dimensional report is provided, the device comprising: a processor and a memory;
[0029] The memory is used to store one or more program instructions;
[0030] The processor is used to run one or more program instructions to execute the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of the above items.
[0031] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of the above items are implemented.
[0032] According to a fourth aspect of an embodiment of the present invention, a computer program product is provided, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which, when executed by a computer, enable the computer to implement the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of the above items.
[0033] The embodiments of the present invention provide a multidimensional search method, device, medium and program product based on two-dimensional reports. The present invention can automatically calculate table data according to the target search dimension and convert it to the target dimension, saving the resources occupied by recording different dimensional information on resources such as databases when creating multidimensional information from two-dimensional reports, saving server resources, avoiding multiple error checking indicator dimensions and grouping and summing work, and effectively improving the efficiency of multidimensional retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0035] Figure 1 A schematic diagram of a flow chart of a multi-dimensional search method based on a two-dimensional report provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of the structure of a multidimensional index mapping tree provided by an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of a structure compression process provided by an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of a mapping structure cutting process provided by an embodiment of the present invention;
[0039] Figure 5 A schematic flow chart of a multi-dimensional search method based on a two-dimensional report provided by an embodiment of the present invention;
[0040] Figure 6 A schematic diagram of the structure of a multidimensional retrieval model provided by an embodiment of the present invention;
[0041] Figure 7 A schematic diagram of a two-dimensional table to be searched provided in an embodiment of the present invention;
[0042] Figure 8 One of the schematic diagrams of multi-dimensional search results provided by an embodiment of the present invention;
[0043] Fig. 9 The second schematic diagram of the multi-dimensional search results provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] Figure 1 The figure shows a flow chart of a multi-dimensional retrieval method based on a two-dimensional report according to an embodiment of the present invention.
[0047] like Figure 1 As shown, the multi-dimensional search method based on a two-dimensional report according to an embodiment of the present invention may include step S100, step S200, step S300, step S400, step S500 and step S600.
[0048] In step S100, a two-dimensional table to be searched is obtained.
[0049] Specifically, the above steps include:
[0050] The two-dimensional table to be searched and the target search dimension input by the user are obtained, wherein the two-dimensional table is a two-dimensional table including a multi-dimensional dynamic area.
[0051] Next, in step S200, for each cell in the two-dimensional table, a corresponding indicator is assigned to the cell according to the dimensional area information of the cell.
[0052] The above-mentioned dimensional area information is the row title, column title and row-column dimensional relationship corresponding to the storage unit.
[0053] In step S300, a multi-dimensional mapping structure is constructed according to each index corresponding to the two-dimensional table.
[0054] Specifically, the above steps include:
[0055] refer to Figure 2 ,First construct the initial multidimensional mapping tree, and then map each indicator corresponding to the two-dimensional table to different dimensions to obtain a multidimensional indicator mapping tree.
[0056] Then, refer to Figure 3According to the dimension area information of each indicator in the multidimensional indicator mapping tree, the multidimensional indicator mapping tree is structurally compressed to obtain the compressed plane mapping structure
[0057] The embodiment of the present invention achieves a multi-dimensional effect of the indicators by extracting dimensions from each indicator.
[0058] Next, in step S400, the multi-dimensional mapping structure is cut according to the target retrieval dimension to obtain a target dimension mapping structure.
[0059] Specifically, refer to Figure 4 , the above steps include:
[0060] According to the dimension area information of the indicators in the plane mapping structure, the plane mapping structure is cut using the target retrieval dimension to obtain a target dimension mapping structure corresponding to the target retrieval dimension.
[0061] In step S500, a target indicator set is obtained using a target dimension mapping structure.
[0062] Specifically, refer to Figure 4 The above steps include: expanding the cut target dimension mapping structure to obtain a target indicator set. At this moment, the dimension region information of each indicator in the target indicator set has been cut into information corresponding to the target retrieval dimension.
[0063] Finally, in step S600, based on the dimension area information of the indicators in the target indicator set, the two-dimensional table is subjected to multi-dimensional conversion processing between tables, and the target table obtained by the conversion is used as the dimension search result.
[0064] Specifically, refer to Figure 5 , the above steps include:
[0065] According to the dimension area information of each indicator in the target indicator set, the two-dimensional table is converted into a first target table corresponding to the target retrieval dimension. The floating table in the two-dimensional table has keyword combinations in both row and column directions. The indicators are mapped to a plane combination of row + column. The rows and columns in the two-dimensional table are converted according to the multi-dimensional mapping relationship of each indicator in the target indicator set. The above-mentioned row and column conversion includes: (1) partial conversion from row to column; (2) full conversion from row to column; (3) partial conversion from row to row; (4) full conversion from row to row; (5) partial conversion from column to row; (6) full conversion from column to row; (7) partial conversion from column to column; (8) full conversion from column to column.
[0066] According to the dimension area information of each indicator in the target indicator set, the column dimension data of the increased dimension in the two-dimensional table is merged and calculated, and the column dimension data of the reduced dimension is split and calculated to obtain the calculation result;
[0067] Finally, the calculation results are filled into the first target table to obtain the second target table, and the second target table is used as the dimension retrieval result.
[0068] For example, Figure 7 is a schematic diagram of the two-dimensional report to be retrieved. Figure 7 The merchants, raw materials and aging of accounts in the system are used as multi-dimensional dynamic areas. Figure 7 The aging of the account in the above table is upgraded to the nature of the payment and the data is summarized. The generated search results are as follows: Figure 8 As shown. Figure 7 The table in the table is increased by two dimensions or Figure 8 The table in the table is upgraded by one dimension, and the search results are as follows Fig. 9 shown.
[0069] in addition, Figure 6 The figure shows a schematic diagram of the structure of a multidimensional retrieval model constructed based on a multidimensional retrieval method based on a two-dimensional report provided by an embodiment of the present invention.
[0070] In addition, an embodiment of the present invention also provides a multidimensional retrieval device based on two-dimensional reports, which includes: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a multidimensional retrieval method based on two-dimensional reports as described above.
[0071] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the multidimensional retrieval method based on two-dimensional reports as described above are implemented.
[0072] In addition, an embodiment of the present invention further provides a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the steps of the multi-dimensional retrieval method based on two-dimensional reports are implemented as described above.
[0073] The embodiments of the present invention provide a multidimensional retrieval method, device, medium and program product based on two-dimensional reports, which solve the problems that storage units in two-dimensional reports have no multi-dimensional meaning, fine-grained dimensions are difficult to obtain data during table dimensionality upgrading, dimensions between tables are difficult to convert, and two-dimensional storage units that need to be merged and split during conversion cannot be automatically identified.
[0074] The embodiment of the present invention can be applied to the scenario where the two-dimensional report function is insufficient and the two-dimensional table sample cannot be converted to a multidimensional table sample (horizontal conversion and dimension upgrade conversion); the indicator dimension construction method realizes the business operations of query, filtering, and dimension upgrade without adding dimension information; the present invention can be applied to two-dimensional tables in Excel format, and can complete the dimension conversion between multiple Excel format tables. The user only needs to mark the units of the multidimensional concepts involved in the subsequent process on the basis of the data storage unit according to the corresponding rules to realize multidimensional table retrieval.
[0075] The embodiment of the present invention realizes the conversion between tables based on two-dimensional reports. In practice, data can be automatically calculated and converted to the target dimension accurately according to the dimensional information. The resources occupied by recording different dimensional information on resources such as databases are eliminated when creating multi-dimensional information from two-dimensional reports. The same effect is achieved through model algorithms, saving server resources, avoiding the work of multiple error detection indicator dimensions and grouping and summing, and effectively improving retrieval efficiency.
[0076] In the embodiment of the present invention, the processor may be an integrated circuit chip with signal processing capability. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware. The storage medium may be a memory, for example, a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).The storage medium described in the embodiment of the present invention is intended to include but is not limited to these and any other suitable types of memory. Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by a combination of hardware and software. When the software is applied, the corresponding function can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication medium includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access. Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to it on the basis of the present invention. Therefore, these modifications or improvements made on the basis of not departing from the spirit of the present invention all belong to the scope of protection claimed in the present invention.
Claims
1. A multidimensional retrieval method based on two-dimensional reports, characterized in that: The method comprises: Get the two-dimensional table to be retrieved; For each cell in the two-dimensional table, assign a corresponding indicator to the cell according to the dimension area information of the cell; Constructing a multidimensional mapping structure according to each indicator corresponding to the two-dimensional table; Cutting the multidimensional mapping structure according to the target retrieval dimension to obtain a target dimension mapping structure; Using the target dimension mapping structure, a target indicator set is obtained; According to the dimension area information of the indicators in the target indicator set, a multi-dimensional conversion process is performed between tables on the two-dimensional table, and the target table obtained by the conversion is used as the dimension search result.
2. A multidimensional search method based on a two-dimensional report as claimed in claim 1, characterized in that: Constructing a multidimensional mapping structure according to each indicator corresponding to the two-dimensional table includes: Each indicator corresponding to the two-dimensional table is mapped to different dimensions to obtain a multi-dimensional indicator mapping tree.
3. A multi-dimensional search method based on two-dimensional report form as claimed in claim 2, characterized in that: Constructing a multidimensional mapping structure according to each indicator corresponding to the two-dimensional table also includes: According to the dimension area information of each indicator in the multidimensional indicator mapping tree, the multidimensional indicator mapping tree is subjected to structural compression processing to obtain a compressed plane mapping structure.
4. A multi-dimensional search method based on two-dimensional report form as claimed in claim 3, characterized in that: The multidimensional mapping structure is cut according to the target retrieval dimension to obtain a target dimension mapping structure, including: According to the dimension area information of the indicators in the plane mapping structure, the plane mapping structure is cut using the target retrieval dimension to obtain a target dimension mapping structure corresponding to the target retrieval dimension.
5. A multi-dimensional search method based on two-dimensional report form as claimed in claim 1, characterized in that: According to the dimension area information of the indicators in the target indicator set, a multi-dimensional conversion process is performed on the two-dimensional table, and the converted target table is used as the dimension search result, including: According to the dimension area information of each indicator in the target indicator set, the two-dimensional table is converted into a first target table corresponding to the target retrieval dimension, and the cell data in the two-dimensional table is filled into the first target table to obtain a second target table.
6. A multi-dimensional search method based on two-dimensional report form as claimed in claim 5, characterized in that: Filling the cell data in the two-dimensional table into the first target table to obtain a second target table includes: Sequentially filling the row dimension data of the two-dimensional table into the first target table; According to the dimension area information of each indicator in the target indicator set, the column dimension data of the increased dimension in the two-dimensional table is merged and calculated, and the column dimension data of the reduced dimension is split and calculated to obtain a calculation result; Fill the calculation results into the first target table to obtain the second target table.
7. A multi-dimensional search method based on two-dimensional report form as claimed in claim 1, characterized in that: The two-dimensional table is a two-dimensional table containing a multi-dimensional dynamic area, and the dimensional area information is the row title, column title and row-column dimensional relationship corresponding to the storage unit.
8. A multi-dimensional retrieval device based on two-dimensional reports, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product includes computer program instructions, which, when executed by a processor, implement the steps of a multidimensional retrieval method based on a two-dimensional report as described in any one of claims 1 to 7.