A data processing method, device and medium for dynamic report
By constructing a data processing method for dynamic reports, the problems of code redundancy and data misalignment in dynamic reports in enterprise management software are solved, achieving efficient and flexible data processing and accurate multi-organization data aggregation, thereby improving maintenance efficiency and report display performance.
Patent Information
- Application Number
- CN202511467009.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing technologies in enterprise management software suffer from problems such as code redundancy, high maintenance costs, data misalignment, statistical bias, and insufficient flexibility when processing dynamic reports. In particular, they are inefficient and produce inaccurate results when aggregating data from multiple organizations in a group enterprise.
By associating the business entity table with the basic information table, a raw data set is created, and the fields are divided into dimension fields and value fields. A general data retrieval model is built, the display rules for the changing rows and columns of the dynamic report are configured, and JSON format data that meets the front-end display requirements is generated. Data storage and transformation are performed independently of the front-end display logic.
It reduces the amount of repetitive coding, improves maintenance efficiency, avoids errors in manual statistics, supports unlimited hierarchical expansion, and reduces report loading time.
Smart Images

Figure CN121301449B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, device and medium for dynamic reports. Background Technology
[0002] In the field of enterprise management software, dynamic reports, as the core carrier of business data analysis, often need to handle complex scenarios where rows and columns change simultaneously, such as multi-dimensional cross-reports like internal transaction reconciliation reports and daily production statistics reports. Existing technologies typically employ two implementation paths: the first is to customize SQL query statements or stored procedures for each report, implementing row and column transformation logic through hard coding; the second relies on the simple row and column expansion functions built into the reporting tool, but only supports limited changes in a single dimension. Both solutions have significant drawbacks. The first approach, with its customized development, leads to high code redundancy, sharply increased maintenance costs, and an inability to reuse general models. The second approach, with its built-in tool functions, lacks a unified dimension management mechanism when handling linked row and column changes, multi-level subtotals / totals, and cross-organizational data aggregation, requiring manual data concatenation, which easily leads to data misalignment and statistical bias.
[0003] The more fundamental problem lies in the deep coupling of data processing logic with front-end presentation in existing technologies. When report requirements change, implementers must simultaneously modify stored procedures, SQL statements, and display controls. This is not only labor-intensive but also prone to introducing errors due to the lack of a standardized data abstraction layer. Especially for large corporations that need to aggregate data from multiple branches, traditional solutions require handling the differences in data structures of each organization separately before integrating them through external programs. This process is not only inefficient but also leads to inaccurate aggregation results due to inconsistent dimension value encoding rules.
[0004] Furthermore, existing methods suffer from structural flaws in their dimension value storage and positioning mechanisms. Report cell positioning typically relies on fixed row and column coordinates, failing to dynamically adapt to changes in row and column expansion. When displaying three-level geographical hierarchies or two-level business categories, current technologies can only achieve this by predefining a fixed hierarchical depth or adding auxiliary fields, severely limiting the report's flexibility and scalability. Simultaneously, the lack of a unique dimension value coding standard makes it difficult to automatically align statistical values of the same dimension when aggregating data from multiple organizations, requiring manual intervention to match dimension definitions and significantly reducing aggregation efficiency. Summary of the Invention
[0005] This application provides a data processing method, device, and medium for dynamic reports to solve the above-mentioned technical problems.
[0006] On the one hand, embodiments of this application provide a data processing method for dynamic reports, including: By associating the business entity table with the basic information table, a raw data set is created, and the fields in the raw data set are divided into dimension fields and value fields; Construct a general data retrieval model and configure the display rules for changing rows and columns in dynamic reports according to report requirements; the general data retrieval model includes data sources, dimension regions, statistical regions, arbitrary conditions, and grouping conditions; According to the display rules, the original data set is mapped to the general data retrieval model, the data retrieval formula is configured and executed, and the calculation results are stored according to the dimension value encoding rules. The stored calculation results are transformed and concatenated to generate JSON format data that meets the front-end display requirements, and then the JSON format data is output to the report control for rendering and display.
[0007] In one implementation of this application, an original data set is created by associating a business entity table with a basic information table, and the fields in the original data set are divided into dimension fields and value fields, specifically including: Fields in the business entity table are extracted using basic SQL statements, and then the fields in the business entity table are associated with the corresponding fields in the basic information table. Dimension description information is added to the original dataset after field association, and explanatory information is added to each field in the original dataset; The fields in the original data set are divided into dimension fields and value fields, and the dimension fields are further divided into row dimension fields and column dimension fields.
[0008] In one implementation of this application, a general data retrieval model is constructed, and the display rules for changing rows and columns in the dynamic report are configured according to the report requirements, specifically including: Define the data source as at least one data set, set the row dimension and column dimension in the dimension area, and specify the display attributes of the row dimension field and column dimension field; Mark the fields in the statistics area that need to have their totals calculated, and configure any conditional expressions for data filtering; Set statistical value aggregation rules in the grouping conditions for data classification.
[0009] In one implementation of this application, the calculation results are stored according to the dimension value encoding rules, specifically including: When the row dimension is configured for display, generate row dimension values concatenated with all row dimension fields, and label the statistical values; When the column dimension is configured for display, generate column dimension values concatenated with dimension field numbers; For each storage record, store the organization identifier, row dimension values, column dimension values, cell coordinates, and statistical values; The row and column dimension values of the statistical value field are represented by concatenating dimension values.
[0010] In one implementation of this application, the stored calculation results are subjected to data transformation and data concatenation, specifically including: Based on the concatenation hierarchy of row dimension values, the calculation results are expanded into a tree structure, and the encoded sequence of column dimension values is mapped into column labels of a two-dimensional matrix; Statistical values are filled in the corresponding positions by using the row dimension to correspond to the tree nodes in the tree structure and the column dimension to correspond to the column coordinates in the column labels of the two-dimensional matrix.
[0011] In one implementation of this application, generating JSON format data that conforms to the front-end display requirements specifically includes: Parse the stored dimension and statistical values, and organize the data structure according to the format required by the front-end control; Generate a hierarchical JSON object based on the tree structure corresponding to the row dimensions, and organize the total row, subtotal row, and detail row in the JSON structure according to the hierarchical relationship.
[0012] In one implementation of this application, before generating JSON format data that conforms to the front-end display requirements, the method further includes: Identify the organizational datasets to be aggregated, and group the organizational datasets by row dimension values and column dimension values; Perform summation on the statistics within the same group, while retaining the original organization's detailed data, to generate a complete JSON structure containing the summary results and detailed data.
[0013] In one implementation of this application, configuring the data retrieval formula specifically includes: Select the matching dataset as the data source, and specify whether to display and the statistical attributes for the row dimension fields, as well as whether to display and the statistical attributes for the column dimension fields; Determine how the value field is calculated, set arbitrary conditional expressions to filter unwanted data, and configure grouping conditions to categorize the data.
[0014] On the other hand, embodiments of this application also provide a data processing device for dynamic reports, the device comprising: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a dynamic report data processing method as described above.
[0015] On the other hand, this application embodiment also provides a non-volatile computer storage medium storing computer-executable instructions, which, when executed, implement the data processing method for a dynamic report as described above.
[0016] This application provides a data processing method, device, and medium for dynamic reports, which has at least the following beneficial effects: By constructing a standardized data set to divide dimension and value fields, and configuring the dimension and statistical areas of a general data retrieval model, a single model can simultaneously support row, column, and row-column linked changes, completely solving the problem of traditional solutions requiring separate development for each type of change and reducing repetitive coding. Using dimension-value encoding rules to store calculation results makes the data transformation layer independent of the front-end display logic. When adjusting the report structure, only the data retrieval model configuration needs to be modified, without rewriting SQL or stored procedures, improving maintenance efficiency. Based on the automatic generation mechanism of total fields and special identifiers marked by statistical areas, multi-level total values are pre-calculated during the data storage stage, avoiding the error-prone problem of manual statistical overlay in traditional solutions, and supporting unlimited hierarchical expansion. The concatenated and transformed data is directly output as a structured JSON format, whose tree-like hierarchical structure natively matches the front-end control rendering protocol, avoiding secondary parsing overhead and reducing report loading time. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a data processing method for dynamic reports provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of data set 1 provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of a regional data acquisition model provided in an embodiment of this application; Figure 4 This application provides a schematic diagram of the structure of a business entity data retrieval model. Figure 5 This is a schematic diagram of the structure of data set 2 provided in the embodiments of this application; Figure 6 This is a schematic diagram of the internal structure of a data processing device for dynamic reports provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0020] Figure 1 This is a flowchart illustrating a data processing method for dynamic reports provided in an embodiment of this application.
[0021] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.
[0022] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.
[0023] like Figure 1 As shown in the embodiment of this application, a data processing method for dynamic reports includes: Step 101: Create an original data set by associating the business entity table with the basic information table, and divide the fields in the original data set into dimension fields and value fields.
[0024] In this embodiment, creating the original data set is a fundamental step in constructing dynamic reports. It can be understood that the business entity table stores core data records generated during actual business operations, such as sales order tables and inventory transaction records; while the basic information table contains dimensional descriptive information related to this business data, such as region code tables and product classification tables.
[0025] For example, the system extracts fields from the business entity table using basic SQL statements and establishes relationships with corresponding fields in the basic information table. Specifically, this process is typically implemented using SQL JOIN operations, such as linking the product ID in a sales record with a detailed description in the product information table using a foreign key. It should be noted that this join operation ensures that the query results include both the original business values and complete dimensional description information.
[0026] In the original dataset after field association, the system supplements dimensional descriptions and adds explanatory information to each field. This explanatory information helps subsequent users understand the business meaning and usage of the fields. Specifically, the system explicitly divides the fields in the dataset into dimension fields and value fields. Dimension fields are used for classification and grouping, such as region and time; value fields are numerical fields that require statistical calculations, such as sales revenue and inventory levels. Furthermore, dimension fields are further divided into row dimension fields and column dimension fields, which determines the display direction of these fields in the final report.
[0027] Step 102: Construct a general data retrieval model and configure the display rules for changing rows and columns in the dynamic report according to the report requirements; the general data retrieval model includes data source, dimension area, statistical area, arbitrary conditions and grouping conditions.
[0028] In this embodiment, constructing a general data retrieval model is the core step in realizing dynamic report processing. It can be understood that this model, as a configurable data processing framework, can adapt to various complex reporting needs. The model construction process first requires defining the data retrieval source, that is, specifying which data set(s) the data comes from.
[0029] For example, in the dimension area, the system sets row and column dimensions and specifies the display attributes of row and column dimension fields. It's important to note that these display attributes determine whether dimension fields are visible in the final report, as well as their display order and hierarchy. Specifically, the configuration rules for variable rows and variable columns are determined at this stage; for example, setting the region field as a variable row and the product category as a variable column.
[0030] Within the statistics area, the system marks the fields for which totals need to be calculated; these fields are typically numeric value fields. Understandably, total calculations can include various aggregation methods such as summation and averaging. Depending on the reporting requirements, the system can also configure arbitrary conditional expressions for data filtering, such as displaying only sales data within a specific time range. Furthermore, statistical aggregation rules can be set in the grouping conditions; these rules determine how the data is categorized and summarized.
[0031] Step 103: According to the display rules, map the original data set to the general data retrieval model, configure the data retrieval formula, execute the data retrieval formula, and store the calculation results according to the dimension value encoding rules.
[0032] In this embodiment, constructing a general data retrieval model is the core step in realizing dynamic report processing. It can be understood that this model, as a configurable data processing framework, can adapt to various complex reporting needs. The model construction process first requires defining the data retrieval source, that is, specifying which data set(s) the data comes from.
[0033] For example, in the dimension area, the system sets row and column dimensions and specifies the display attributes of row and column dimension fields. It's important to note that these display attributes determine whether dimension fields are visible in the final report, as well as their display order and hierarchy. Specifically, the configuration rules for variable rows and variable columns are determined at this stage; for example, setting the region field as a variable row and the product category as a variable column.
[0034] Within the statistics area, the system marks the fields for which totals need to be calculated; these fields are typically numeric value fields. Understandably, total calculations can include various aggregation methods such as summation and averaging. Depending on the reporting requirements, the system can also configure arbitrary conditional expressions for data filtering, such as displaying only sales data within a specific time range. Furthermore, statistical aggregation rules can be set in the grouping conditions; these rules determine how the data is categorized and summarized.
[0035] Step 104: Convert and concatenate the stored calculation results to generate JSON format data that meets the front-end display requirements, and output the JSON format data to the report control for rendering and display.
[0036] In this embodiment, data transformation and concatenation are key steps in converting structured stored data into a format that can be displayed on the front end. It is understood that this process first requires expanding the calculation results into a tree structure based on the concatenation hierarchy of row dimension values.
[0037] For example, the system maps the encoded sequence of column dimension values to two-dimensional matrix column labels, forming a complete coordinate system. It should be noted that the system will fill statistical values in the corresponding positions of the tree nodes in the tree structure corresponding to the row dimension and the two-dimensional matrix column labels corresponding to the column dimension, thus constructing a complete data display framework.
[0038] Understandably, the system can perform multi-organization data aggregation before generating JSON format data. Specifically, the system identifies the organizational datasets to be aggregated, groups them by row and column dimension values, performs summation on the statistical values within each group, and retains the original organization's detailed data, forming a complete data structure that includes both aggregation and details.
[0039] Ultimately, the system organizes the data according to the format required by the front-end control, generating a hierarchical JSON object. Understandably, this JSON data strictly maintains the hierarchical relationship between total rows, subtotal rows, and detail rows to ensure the completeness and accuracy of the report display. Specifically, when this JSON-formatted data is output to the report control, the control dynamically renders the final updated report based on the data structure, achieving a visual representation of the data.
[0040] In this embodiment, taking a simulated report as an example, the data retrieval requirements of the report organization are shown in Tables 1, 2, and 3 below, where column A and row 1 are used to identify the row and column coordinates.
[0041] Table 1 Data for Organization 1
[0042] Table 2 Data for Organization 2
[0043] Table 3 Summary Data
[0044] The general data retrieval model is applicable to all tables with changes in rows and columns. It does not need to be defined every time a report is defined; it can be understood as a common framework.
[0045] When designing the display rules for variable rows and columns in a dynamic report, row 1 is set as the variable row, and column B is set as the variable column. It should be noted that in this embodiment, a variable row (i.e., one row in the dynamic report can be modified into multiple rows based on the actual number of data retrieved) and a variable column (i.e., one column in the dynamic report can be modified into multiple columns based on the number of data retrieved) are similar to a single column in the dynamic report. Many similar tables exist in real-world reporting applications. These tables can be easily organized with data, and then the general data retrieval model in this application can be used to quickly achieve data retrieval, data concatenation, row and column conversion, summarization, and display.
[0046] Based on the data retrieval requirements, a data set was compiled from the actual basic data table and business tables. The compiled data set is as follows: Figure 2 As shown. Define the data retrieval model and store the data. The data structures of Organization 1 and Organization 2 are the same, and the definitions of the data retrieval models are also similar. Taking Organization 1 as an example, the data retrieval model is as follows: Figure 3 , Figure 4 As shown.
[0047] The data retrieval model for the region uses Figure 3 The described data retrieval model is based on Figure 2 The data set 1 is defined as follows. Provinces and regions are set as row dimensions, and region dimension values are displayed. Row data is displayed by organization-related provinces and regions. Provinces are labeled as statistical fields for easy subtotal generation. No statistical value field needs to be set; this data retrieval model is only used to retrieve region values, which are already statistically represented and displayed as dimension values. Expressions from any field can be used as arbitrary conditions to filter data. For example, adding an organization condition will only display data for selected organizations. Grouping conditions can also be used to filter data, such as querying only data where the total province value is greater than 10,000.
[0048] The data retrieval results are stored as either the row or column dimension values to be displayed, along with all statistical values. For each cell value in the report, the position before any changes to the table layout must first be determined using coordinates. Then, the positions of the multiple rows or columns resulting from the changes must be determined using the row and column dimensions. This ultimately determines the display effect of the data retrieval results. If the row dimension values of the data retrieval model are used for display, then when storing these values, the row dimension is concatenated using the row dimension fields of the data retrieval model, and the column dimension is encoded using the sequential encoding of the row dimension fields. If the first row dimension field is configured for display, the row code is 000001; if the second row dimension field is configured for display, the row code is 000002. The same applies to column dimensions; both row and column dimensions cannot be configured to be displayed simultaneously.
[0049] Figure 3 The storage results of the data retrieval model in the central region are shown in Table 4 below.
[0050] Table 4 Storage Results of the Regional Data Retrieval Model
[0051] It should be noted that if Table 4 only has one row dimension and is only displayed, then the column dimension value is "000001", and the row dimension is formed by concatenating all row dimension fields. "SF" represents the province, "DQ" represents the region, and "#!#" is used to distinguish the total value.
[0052] Figure 4 The data retrieval model for business entities in China is based on Figure 5 The data set 2 described is defined as follows: Figure 4 The storage results of the data retrieval model are shown in Table 5 below.
[0053] Table 5 Storage Results of the Business Entity Data Retrieval Model
[0054] Specifically, provinces and regions are set as row dimensions but are not displayed. Row data is displayed by the province related to the organization, and the row dimension is used to concatenate rows of multiple data results. Provinces are marked as statistical fields to facilitate subtotals. Business dimension A and year are set as column dimensions and are displayed. Column data needs to be displayed according to the relevant year of business dimension A. Column dimension is used to concatenate columns of multiple data results. Value field A is set as the data field. Expressions of any field can be used as arbitrary conditions to filter data, and grouping conditions can also be used to filter data. Data results are stored by dimension.
[0055] The dimension area displays two column dimensions. The column dimension values are concatenated using the dimension field numbers, and the row dimension values are assigned using the sequential numbers of the column dimension fields. If business dimension A is the first column dimension, then the row dimension value is 000001; if the year is the second column dimension, then the row dimension value is 000002. The row and column dimensions of the statistical value field are both concatenated using dimension values.
[0056] Then, the data retrieved from the data retrieval model is concatenated and transformed according to row and column dimensions to form JSON format data, and the table control is populated according to the JSON structure. Alternatively, data from multiple organizations can be summarized by dimension; the summation logic involves aggregating the values of the same row and column dimensions.
[0057] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a data processing device for dynamic reports, the structure of which is as follows: Figure 6 As shown.
[0058] Figure 6 This is a schematic diagram of the internal structure of a data processing device for dynamic reports provided in an embodiment of this application. Figure 6 As shown, the device includes: At least one processor; And, a memory that is communicatively connected to at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions, when executed by at least one processor, enable at least one processor to: By associating the business entity table with the basic information table, a raw data set is created, and the fields in the raw data set are divided into dimension fields and value fields; Build a general data retrieval model and configure the display rules for changing rows and columns in dynamic reports according to report requirements; the general data retrieval model includes data source, dimension area, statistical area, arbitrary conditions and grouping conditions; According to the display rules, the original dataset is mapped to the general data retrieval model, the data retrieval formula is configured and executed, and the calculation results are stored according to the dimension value encoding rules. The stored calculation results are transformed and concatenated to generate JSON format data that meets the front-end display requirements, and then the JSON format data is output to the report control for rendering and display.
[0059] This application also provides a non-volatile computer storage medium storing computer-executable instructions, which, when executed, can: By associating the business entity table with the basic information table, a raw data set is created, and the fields in the raw data set are divided into dimension fields and value fields; Build a general data retrieval model and configure the display rules for changing rows and columns in dynamic reports according to report requirements; the general data retrieval model includes data source, dimension area, statistical area, arbitrary conditions and grouping conditions; According to the display rules, the original dataset is mapped to the general data retrieval model, the data retrieval formula is configured and executed, and the calculation results are stored according to the dimension value encoding rules. The stored calculation results are transformed and concatenated to generate JSON format data that meets the front-end display requirements, and then the JSON format data is output to the report control for rendering and display.
[0060] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0061] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0062] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0063] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0064] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0065] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0066] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0067] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0068] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0069] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0070] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data processing method for dynamic reports, characterized in that, The method includes: By associating the business entity table with the basic information table, a raw data set is created, and the fields in the raw data set are divided into dimension fields and value fields; Construct a general data retrieval model and configure the display rules for changing rows and columns in dynamic reports according to report requirements; the general data retrieval model includes data sources, dimension regions, statistical regions, arbitrary conditions, and grouping conditions; According to the display rules, the original data set is mapped to the general data retrieval model, the data retrieval formula is configured and executed, and the calculation results are stored according to the dimension value encoding rules. The stored calculation results are transformed and concatenated to generate JSON format data that meets the front-end display requirements, and the JSON format data is output to the report control for rendering and display. By associating the business entity table with the basic information table, a raw data set is created, and the fields in the raw data set are divided into dimension fields and value fields, specifically including: Fields in the business entity table are extracted using basic SQL statements, and then the fields in the business entity table are associated with the corresponding fields in the basic information table. Dimension description information is added to the original dataset after field association, and explanatory information is added to each field in the original dataset; The fields in the original dataset are divided into dimension fields and value fields, and the dimension fields are further divided into row dimension fields and column dimension fields. The calculation results are stored according to the dimension value encoding rules, specifically including: When the row dimension is configured for display, generate row dimension values concatenated with all row dimension fields, and label the statistical values; When the column dimension is configured for display, generate column dimension values concatenated with dimension field numbers; For each storage record, store the organization identifier, row dimension values, column dimension values, cell coordinates, and statistical values; The row and column dimension values of the statistical value field are represented by concatenating dimension values. The stored calculation results undergo data transformation and data concatenation, specifically including: Based on the concatenation hierarchy of row dimension values, the calculation results are expanded into a tree structure, and the encoded sequence of column dimension values is mapped into column labels of a two-dimensional matrix; Statistical values are filled in the corresponding positions by using the row dimension to correspond to the tree nodes in the tree structure and the column dimension to correspond to the column coordinates in the column labels of the two-dimensional matrix. Generate JSON format data that meets the requirements of the front-end display, specifically including: Parse the stored dimension and statistical values, and organize the data structure according to the format required by the front-end control; Generate a hierarchical JSON object based on the tree structure corresponding to the row dimensions, and organize the total row, subtotal row, and detail row in the JSON structure according to the hierarchical relationship.
2. The data processing method for dynamic reports according to claim 1, characterized in that, Build a general data retrieval model and configure the display rules for changing rows and columns in dynamic reports according to reporting requirements, specifically including: Define the data source as at least one data set, set the row dimension and column dimension in the dimension area, and specify the display attributes of the row dimension field and column dimension field; Mark the fields in the statistics area that need to have their totals calculated, and configure any conditional expressions for data filtering; Set statistical value aggregation rules in the grouping conditions for data classification.
3. The data processing method for dynamic reports according to claim 1, characterized in that, Before generating JSON format data that meets the front-end display requirements, the method further includes: Identify the organizational datasets to be aggregated, and group the organizational datasets by row dimension values and column dimension values; Perform summation on the statistics within the same group, and retain the original organization's detailed data to generate a complete JSON structure containing the summary results and detailed data.
4. The data processing method for dynamic reports according to claim 1, characterized in that, Configure the data retrieval formula, specifically including: Select the matching dataset as the data source, and specify whether to display and the statistical attributes for the row dimension fields, as well as whether to display and the statistical attributes for the column dimension fields; Determine how the value field is calculated, set arbitrary conditional expressions to filter unwanted data, and configure grouping conditions to categorize the data.
5. A data processing device for dynamic reports, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a data processing method for a dynamic report as described in any one of claims 1-4.
6. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, a data processing method for dynamic reports as described in any one of claims 1-4 is implemented.
Citation Information
Patent Citations
Dynamic allocation report data processing method based on two-dimension relationship
CN104657384A
Dynamic crosstab-based multidimensional data real-time analysis method
CN108647340A
Change report filling method, storage medium, equipment, program product and device
CN120407567A