Report calculation system, method, electronic device and storage medium

By obtaining source data and parsing cross-tabs, using reverse Polish expressions and bitwise operations, combined with cache servers and asynchronous synchronous calculation strategies, the problems of inflexible report configuration and slow calculation speed are solved, and flexible configuration and efficient calculation are achieved.

CN116150209BActive Publication Date: 2025-09-30GUANGZHOU QUICKDECISION TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310135892.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2025-09-30
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

The report configuration calculation in the existing technology has the problems of insufficient flexibility, inability to support complex crowd attribute configuration and slow calculation speed.

Method used

By obtaining the source data and parsing it to obtain the cross-tabulation, analyzing the calculation units, using reverse Polish notation and bit operations for calculation, combining with the cache server to optimize the calculation process, and adopting asynchronous and synchronous calculation strategies, flexible configuration and accelerated calculation are achieved.

Benefits of technology

It achieves the flexibility of report configuration and the improvement of calculation speed, can support complex population attribute configuration, and significantly improves calculation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150209B_ABST
    Figure CN116150209B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a report calculation system, method, electronic device, and storage medium. The report calculation method includes: obtaining source data and parsing the source data to obtain a cross-tabulation table to be calculated; analyzing the cross-tabulation table to obtain calculation units; calculating the calculation units of each sample in the source data to obtain a first calculation result; obtaining bit data of each calculation unit based on the first calculation result; converting the cross-tabulation table into a reverse Polish notation, and using bitwise operations to calculate the reverse Polish notation based on the bit data to obtain a second calculation result; summarizing the second calculation result to obtain summary data; and calculating based on the summary data to obtain a final result. This report calculation method solves the problems of report configuration calculation in the prior art, such as insufficient configuration flexibility, inability to support complex population attribute configurations, and slow calculation speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a report calculation system, method, electronic equipment and storage medium. Background Art

[0002] Reports dynamically display data in formats such as tables and charts, and are the final step in data processing and presentation for all software systems. Market research requires generating reports based on the collected data. The report customizes the numerator and denominator crossover logic for each cross-cell, calculates the custom logic, and generates the report. Currently, report configuration calculations are inflexible, cannot support complex population attribute configurations, and suffer from slow calculation speeds.

[0003] There is an urgent need for a report calculation method with flexible configuration. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a report calculation system, method, electronic device and storage medium to solve the problems in the prior art of report configuration calculation such as insufficient configuration flexibility, inability to support complex population attribute configuration and slow calculation speed.

[0005] To achieve the above objectives, an embodiment of the present invention provides a report calculation method, which specifically includes:

[0006] Obtaining source data, and parsing the source data to obtain a cross table to be calculated;

[0007] Analyze the cross table to obtain calculation units;

[0008] Performing calculation on the calculation unit of each sample in the source data to obtain a first calculation result;

[0009] Obtaining bit data of each calculation unit based on the first calculation result;

[0010] Convert the cross table into a reverse Polish notation, and calculate the reverse Polish notation using a bitwise operation based on the bit data to obtain a second calculation result;

[0011] Summarizing the second calculation results to obtain summary data;

[0012] Calculations are performed based on the aggregated data to obtain a final result.

[0013] On the basis of the above technical solution, the present invention can also be improved as follows:

[0014] Furthermore, the acquiring of source data and parsing of the source data to obtain a corresponding cross-tabulation includes:

[0015] Determine whether the source data exists in the report cache server. When the source data exists in the report cache server, read the source data from the report cache server; when the source data does not exist in the report cache server, store the source data in the report cache server.

[0016] Furthermore, the analyzing the cross table to obtain the calculation unit includes:

[0017] Analyzing the cross table to be calculated to obtain the number of calculations of the cross table;

[0018] The engine is started based on the number of calculations. When the number of calculations is greater than a preset value, asynchronous calculation is started to calculate the cross table; when the number of calculations is less than a preset value, synchronous calculation is started to calculate the cross table.

[0019] Furthermore, the analyzing the cross table to obtain the calculation unit further includes:

[0020] Determine whether the source data exists in the report cache server. When the source data exists in the report cache server, obtain the historical calculation results of the cross table; when the source data does not exist in the report cache server, delete the calculation result cache and obtain the basic calculation unit based on the rows and columns of the cross table.

[0021] A report calculation system, comprising:

[0022] Acquisition module, used to obtain source data;

[0023] A parsing module, configured to parse the source data to obtain a cross table to be calculated;

[0024] An analysis module, configured to analyze the cross table to obtain calculation units;

[0025] a first calculation module, configured to calculate the calculation unit of each sample in the source data to obtain a first calculation result, and obtain bit data of each calculation unit based on the first calculation result;

[0026] A second calculation module is configured to convert the cross table into a reverse Polish notation, and calculate the reverse Polish notation using a bitwise operation based on the bit data to obtain a second calculation result;

[0027] A summary module, configured to summarize the second calculation results to obtain summary data;

[0028] The third calculation module is used to perform calculations based on the summary data to obtain a final result.

[0029] Furthermore, the report calculation system includes a first judgment module, which is used to determine whether the source data exists in the report cache server. When the source data exists in the report cache server, the source data is read from the report cache server; when the source data does not exist in the report cache server, the source data is stored in the report cache server.

[0030] Furthermore, the analysis module is further configured to analyze the cross table to be calculated to obtain the number of calculations of the cross table;

[0031] The second judgment module is used to judge the start engine based on the calculation times, and when the calculation times is greater than a preset value, start asynchronous calculation to calculate the cross table; when the calculation times is less than the preset value, start synchronous calculation to calculate the cross table.

[0032] Furthermore, the report calculation system includes a third judgment module, which is used to determine whether the source data exists in the report cache server. When the source data exists in the report cache server, the historical calculation results of the cross-table are obtained; when the source data does not exist in the report cache server, the calculation result cache is deleted, and the basic calculation unit is obtained based on the rows and columns of the cross-table.

[0033] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method are implemented when the processor executes the computer program.

[0034] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.

[0035] The embodiments of the present invention have the following advantages:

[0036] The report calculation method of the present invention collects a certain number of ultrasound images and obtains lesion feature information corresponding to the ultrasound images; obtains source data and parses the source data to obtain a cross-tabulation to be calculated; analyzes the cross-tabulation to obtain calculation units; calculates the calculation unit of each sample in the source data to obtain a first calculation result; obtains the bit data of each calculation unit based on the first calculation result; converts the cross-tabulation into a reverse Polish notation, and uses bitwise operations to calculate the reverse Polish notation based on the bit data to obtain a second calculation result; summarizes the second calculation result to obtain summary data; and calculates the final result based on the summary data. This report calculation method solves the problems of report configuration calculation in the prior art, such as insufficient configuration flexibility, inability to support complex population attribute configuration, and slow calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other implementation drawings based on the provided drawings without inventive effort.

[0038] The structures, proportions, sizes, etc. illustrated in this specification are intended only to complement the contents disclosed herein and to facilitate understanding and reading by persons familiar with the art. They are not intended to limit the conditions under which the present invention may be implemented and therefore have no substantive technical significance. Any structural modifications, changes in proportions, or adjustments in sizes, without affecting the efficacy and objectives of the present invention, shall still fall within the scope of the technical contents disclosed herein.

[0039] Figure 1 This is a flow chart of the report calculation method of the present invention;

[0040] Figure 2 This is a first architecture diagram of the report calculation system of the present invention;

[0041] Figure 3 This is a second architecture diagram of the report calculation system of the present invention;

[0042] Figure 4 This is a schematic diagram of the physical structure of the electronic device provided by the present invention.

[0043] The accompanying drawings are denoted as follows:

[0044] Acquisition module 10, parsing module 20, analysis module 30, first calculation module 40, second calculation module 50, summary module 60, third calculation module 70, first judgment module 80, second judgment module 90, third judgment module 100, electronic device 110, processor 1101, memory 1102, bus 1103. DETAILED DESCRIPTION

[0045] The following describes the implementation of the present invention using specific embodiments. Those skilled in the art will readily understand the other advantages and benefits of the present invention from the disclosure herein. Obviously, the embodiments described are only a portion of the present invention, not all of it. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.

[0046] Example

[0047] Figure 1This is a flow chart of an embodiment of the report calculation method of the present invention, as shown in FIG. Figure 1 As shown, a report calculation method provided by an embodiment of the present invention includes the following steps:

[0048] S101, obtaining source data and parsing the source data to obtain a cross table to be calculated;

[0049] Specifically, the input source is KV structure source data, such as Q1=[1,2]; determine whether the source data exists in the report cache server, and when the source data exists in the report cache server, read the source data from the report cache server; when the source data does not exist in the report cache server, store the source data in the report cache server.

[0050] S102, analyzing the cross table to obtain calculation units;

[0051] Specifically, the logical configuration information calculated in the report is analyzed to obtain the logical unit of the basic operation, such as Q1 = 1. The result of each basic logical unit of each sample is calculated and converted into a bitmap for storage. The bit data of the sample logical unit is obtained, such as 0110111, where 0 indicates that the subscript source data does not meet the basic logical unit, and 1 indicates that the subscript source data meets the logical unit.

[0052] Analyzing the cross table to be calculated to obtain the number of calculations of the cross table;

[0053] The engine is started based on the number of calculations. When the number of calculations is greater than a preset value, asynchronous calculation is started to calculate the cross table; when the number of calculations is less than a preset value, synchronous calculation is started to calculate the cross table.

[0054] Determine whether the source data exists in the report cache server. When the source data exists in the report cache server, obtain the historical calculation results of the cross table; when the source data does not exist in the report cache server, delete the calculation result cache and obtain the basic calculation unit based on the rows and columns of the cross table.

[0055] S103, performing calculation on the calculation unit of each sample in the source data to obtain a first calculation result, and obtaining bit data of each calculation unit based on the first calculation result;

[0056] Specifically, Reverse Polish Notation is also called a postfix notation. Reverse Polish Notation was first proposed by Polish logician J. Lukaszewicz in 1929 as a method for expressing expressions. Later, expressions written in this notation became known as "Reverse Polish Notation." Reverse Polish Notation places the operands first and the operators after them. Reverse Polish Notation, also known as postfix notation, is a postfix notation without parentheses and strictly follows a "left-to-right" order of operations.

[0057] 1. First, construct an operator stack. The operator in the stack follows the principle of higher priority as it moves to the top of the stack.

[0058] 2. Read a simple arithmetic expression expressed in infix. For convenience, assume that the right end of the simple arithmetic expression is added with the special symbol "#" with the lowest priority.

[0059] 3. Scan the arithmetic expression from left to right, starting from the first character. If the character is a number, analyze to the end of the number string and output the number string directly.

[0060] 4. If it is not a number, the character is an operator, and the precedence relationship needs to be compared.

[0061] The specific operation is to compare the character with the precedence of the operator at the top of the operator stack. If the character has a higher precedence than the operator at the top of the operator stack, the operator is pushed onto the stack. Otherwise, the operator at the top of the stack is popped off the stack until the operator with a lower precedence than the current operator is found, and then the character is pushed onto the stack.

[0062] 5. Repeat steps 1 and 2 until the entire simple arithmetic expression is scanned and all characters are processed correctly. Then the simple arithmetic expression in infix notation can be converted into a simple arithmetic expression in reverse Polish notation.

[0063] S104: Convert the cross table into a reverse Polish notation, and use a bitwise operation to calculate the reverse Polish notation based on the bit data to obtain a second calculation result.

[0064] Specifically, modern computers are almost all binary, and all data is stored in binary form. Bitwise operations operate directly on the binary bits of data stored in memory. For example, the AND operation is originally a logical operator, but it can also be performed on integers. For example, the binary value of 6 is 110, and the binary value of 11 is 1011. Therefore, the result of 6 and 11 is 2, which is the result of the logical operation on the corresponding binary bits (0 represents False, 1 represents True, and empty bits are treated as 0).

[0065] S105: Summarize the second calculation results to obtain summary data, and perform calculation based on the summary data to obtain a final result.

[0066] Specifically, the post-processing process such as calculating significance, proportion, row and column operation data is carried out to obtain the final result.

[0067] The report's calculation logic is split into basic logic units. By preheating the logic units, each sample result of the logic unit is quickly calculated to obtain bitmap data. The logical results of the report are then calculated through bit operations between the bitmap data. Compared with traditional SQL report calculations, the performance is greatly improved.

[0068] The report calculation method of the present invention obtains source data, and parses the source data to obtain a cross-table to be calculated; analyzes the cross-table to obtain calculation units; calculates the calculation unit of each sample in the source data to obtain a first calculation result, and obtains the bit data of each calculation unit based on the first calculation result; converts the cross-table into a reverse Polish expression, and uses a bit operation to calculate the reverse Polish expression based on the bit data to obtain a second calculation result; summarizes the second calculation result to obtain summary data, and calculates the final result based on the summary data; solves the problems in the prior art of report configuration calculation that the configuration is not flexible enough, cannot support complex population attribute configuration, and has a slow calculation speed.

[0069] Figure 2-3 This is a flow chart of an embodiment of the report calculation system of the present invention; Figure 2-3 As shown, an embodiment of the present invention provides a report calculation system, comprising the following steps:

[0070] An acquisition module 10 is used to acquire source data;

[0071] The parsing module 20 is used to parse the source data to obtain a cross table to be calculated;

[0072] An analysis module 30 is used to analyze the cross table to obtain calculation units;

[0073] A first calculation module 40 is configured to calculate the calculation unit of each sample in the source data to obtain a first calculation result, and obtain bit data of each calculation unit based on the first calculation result;

[0074] A second calculation module 50 is configured to convert the cross table into a reverse Polish notation, and calculate the reverse Polish notation using a bitwise operation based on the bit data to obtain a second calculation result;

[0075] A summarizing module 60 is configured to summarize the second calculation results to obtain summary data;

[0076] The third calculation module 70 is configured to perform calculations based on the summary data to obtain a final result.

[0077] The report calculation system includes a first judgment module 80, which is used to judge whether the source data exists in the report cache server. When the source data exists in the report cache server, the source data is read from the report cache server; when the source data does not exist in the report cache server, the source data is stored in the report cache server.

[0078] The analysis module 30 is further configured to analyze the cross table to be calculated to obtain the number of times the cross table is calculated;

[0079] The second judgment module 90 is used to judge whether to start the engine based on the number of calculations. When the number of calculations is greater than a preset value, asynchronous calculation is started to calculate the cross table; when the number of calculations is less than the preset value, synchronous calculation is started to calculate the cross table.

[0080] The report calculation system includes a third judgment module 100, which is used to determine whether the source data exists in the report cache server. When the source data exists in the report cache server, the historical calculation results of the cross-table are obtained; when the source data does not exist in the report cache server, the calculation result cache is deleted, and the basic calculation unit is obtained based on the rows and columns of the cross-table.

[0081] The report calculation system of the present invention obtains source data through an acquisition module 10; parses the source data through a parsing module 20 to obtain a cross-tabulation to be calculated; analyzes the cross-tabulation through an analysis module 30 to obtain calculation units; calculates the calculation units of each sample in the source data through a first calculation module 40 to obtain a first calculation result, and obtains the bit data of each calculation unit based on the first calculation result; converts the cross-tabulation into a reverse Polish notation through a second calculation module 50, and calculates the reverse Polish notation using bitwise operations based on the bit data to obtain a second calculation result; summarizes the second calculation result through a summary module 60 to obtain summary data; and calculates the final result based on the summary data through a third calculation module 70. This report calculation system solves the problems of report configuration calculation in the prior art, such as insufficient configuration flexibility, inability to support complex population attribute configurations, and slow calculation speed.

[0082] Figure 4 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 4 As shown, the electronic device 110 includes: a processor 1101 (processor), a memory 1102 (memory) and a bus 1103;

[0083] The processor 1101 and the memory 1102 communicate with each other via the bus 1103.

[0084] The processor 1101 is used to call the program instructions in the memory 1102 to execute the methods provided by the above-mentioned method embodiments, for example, including: collecting a certain number of ultrasound images and obtaining lesion feature information corresponding to the ultrasound images; obtaining source data, and parsing the source data to obtain a cross-table to be calculated; analyzing the cross-table to obtain a calculation unit; calculating the calculation unit of each sample in the source data to obtain a first calculation result; obtaining the bit data of each calculation unit based on the first calculation result; converting the cross-table into a reverse Polish notation, and using bit operations to calculate the reverse Polish notation based on the bit data to obtain a second calculation result; summarizing the second calculation result to obtain summary data; and calculating based on the summary data to obtain a final result.

[0085] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments, for example, including: collecting a certain number of ultrasound images and obtaining lesion feature information corresponding to the ultrasound images; obtaining source data and parsing the source data to obtain a cross-table to be calculated; analyzing the cross-table to obtain a calculation unit; calculating the calculation unit of each sample in the source data to obtain a first calculation result; obtaining bit data of each calculation unit based on the first calculation result; converting the cross-table into a reverse Polish notation, and using bit operations to calculate the reverse Polish notation based on the bit data to obtain a second calculation result; summarizing the second calculation result to obtain summary data; and calculating based on the summary data to obtain a final result.

[0086] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various storage media that can store program codes.

[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0088] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.

[0089] Although the present invention has been described in detail above using general descriptions and specific embodiments, it will be apparent to those skilled in the art that modifications and improvements may be made thereto. Therefore, such modifications and improvements, without departing from the spirit of the present invention, are intended to be within the scope of protection claimed herein.

Claims

1. A report calculation method, characterized in that: The method specifically includes: Obtaining source data, and parsing the source data to obtain a cross table to be calculated; Analyze the cross table to obtain calculation units; Performing calculation on the calculation unit of each sample in the source data to obtain a first calculation result, and obtaining bit data of each calculation unit based on the first calculation result; Convert the cross table into a reverse Polish notation, and calculate the reverse Polish notation using a bitwise operation based on the bit data to obtain a second calculation result; The second calculation results are summarized to obtain summary data, and calculation is performed based on the summary data to obtain a final result.

2. The report calculation method according to claim 1, characterized in that: The step of obtaining source data and parsing the source data to obtain a corresponding cross-tabulation table includes: Determine whether the source data exists in the report cache server. When the source data exists in the report cache server, read the source data from the report cache server; when the source data does not exist in the report cache server, store the source data in the report cache server.

3. The report calculation method according to claim 1, characterized in that: The analyzing the cross table to obtain a calculation unit includes: Analyzing the cross table to be calculated to obtain the number of calculations of the cross table; The engine is started based on the number of calculations. When the number of calculations is greater than a preset value, asynchronous calculation is started to calculate the cross table; when the number of calculations is less than a preset value, synchronous calculation is started to calculate the cross table.

4. The report calculation method according to claim 3, characterized in that: The analyzing the cross table to obtain the calculation unit further includes: Determine whether the source data exists in the report cache server. When the source data exists in the report cache server, obtain the historical calculation results of the cross table; when the source data does not exist in the report cache server, delete the calculation result cache and obtain the basic calculation unit based on the rows and columns of the cross table.

5. A report calculation system, characterized in that: include: Acquisition module, used to obtain source data; A parsing module, configured to parse the source data to obtain a cross table to be calculated; An analysis module, configured to analyze the cross table to obtain calculation units; a first calculation module, configured to calculate the calculation unit of each sample in the source data to obtain a first calculation result, and obtain bit data of each calculation unit based on the first calculation result; A second calculation module is configured to convert the cross table into a reverse Polish notation, and calculate the reverse Polish notation using a bitwise operation based on the bit data to obtain a second calculation result; A summary module, configured to summarize the second calculation results to obtain summary data; The third calculation module is used to perform calculations based on the summary data to obtain a final result.

6. The report calculation system according to claim 5, characterized in that: The report calculation system includes a first judgment module, the first judgment module being used to judge whether the source data exists in the report cache server, and when the source data exists in the report cache server, reading the source data from the report cache server; When the source data does not exist in the report cache server, the source data is stored in the report cache server.

7. The report calculation system according to claim 5, characterized in that: The analysis module is further configured to analyze the cross table to be calculated to obtain the number of times the cross table is calculated; A second judgment module is used to judge whether to start the engine based on the number of calculations, and when the number of calculations is greater than a preset value, start asynchronous calculation to calculate the cross table; When the number of calculations is less than a preset value, synchronous calculation is started to calculate the cross table.

8. The report calculation system according to claim 7, characterized in that: The report calculation system includes a third judgment module, which is used to determine whether the source data exists in the report cache server. When the source data exists in the report cache server, the historical calculation results of the cross-table are obtained; when the source data does not exist in the report cache server, the calculation result cache is deleted, and the basic calculation unit is obtained based on the rows and columns of the cross-table.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A non-transitory 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 4 are implemented.

Citation Information

Patent Citations

  • Data perspective table processing method and device, electronic equipment and readable storage medium

    CN114064636A

  • Method and system for improving arithmetic operation precision, electronic equipment and storage medium

    CN115587277A