An analysis report generation method, device, system and storage medium

By receiving analysis instructions to determine the data source and configuration model, and generating financial reports, it solves the data integrity and user-friendliness issues in existing tools and achieves efficient and accurate data analysis and visualization.

CN117009417BActive Publication Date: 2025-10-17PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311000178.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-10-17
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing financial reporting and analysis tools have data integrity and accuracy issues, are difficult for non-technical users to use, and require manual adjustments to data analysis methods and report design.

Method used

Provides a method for generating analytical reports. It determines the data source by receiving analysis instructions, configures the data analysis model, obtains the report layout, and generates analytical reports based on the model by processing the original data. This includes data conversion, model binding, and SQL query, and supports multidimensional data analysis and visualization.

Benefits of technology

It improves data analysis efficiency, reduces error rates, simplifies operational processes, and enables non-technical users to intuitively understand and analyze data and generate more accurate evaluations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009417B_ABST
    Figure CN117009417B_ABST
Patent Text Reader

Abstract

The application provides an analysis report generation method, device and system and a storage medium, and relates to the technical field of financial technology.The analysis report generation method comprises the following steps: receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining original data through the data source; configuring a data analysis model through the analysis instruction; obtaining a report layout corresponding to the analysis instruction; processing the original data based on the data analysis model and using the report layout, and generating an analysis report.The application can be used to identify the correlation between models and index dimensions in data by setting indexes, dimensions and metrics, and can be used to help business personnel of a financial institution better understand and analyze data, and the operation method is logically clear, the data presentation method is more intuitive, and the data analysis and arrangement are more accurate, so that more accurate evaluation can be made according to the analysis report.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of financial technology, and more particularly, to an analysis report generation method, device, system and storage medium. BACKGROUND

[0002] In modern enterprises, especially in the financial field, report analysis is a crucial task. Report analysis in the financial field, for example, can be the analysis of various reports published by financial institutions, such as financial reports, operating reports, etc., in order to understand the financial situation, operating situation, risk level, etc. of the financial institution. Report analysis mainly analyzes and evaluates facts by comparing and analyzing various financial indicators, such as profit margin, asset-liability ratio, profitability, etc., for example, to assess the financial health of a company, profitability, and potential investment risks, etc.

[0003] Currently, there are many existing technologies that can be used for report generation and analysis in the financial field. The most common technologies include using tools such as Excel, Tableau, PowerBI, etc. for data analysis and report generation. These tools provide powerful functions to automate data processing and report generation processes. Through a visual-based interface, users can more easily use these tools for data analysis and report generation, thereby gaining a deeper understanding of portfolio risk, customer investment preferences, etc.

[0004] However, these existing technologies still have many defects and problems. The first problem is data integrity and accuracy. The amount of data in the financial field is large, and the sources are complex, which may involve multiple systems or sources, so errors or missing data may occur when integrating data. Secondly, these tools may be difficult for non-technical users to understand and use. If the user does not have sufficient technical knowledge, they may not be able to use these tools correctly. In addition, these tools usually require users to manually adjust data analysis methods and report designs, which also requires certain technical knowledge and experience.

[0005] In summary, in the existing report generation and data analysis methods, there are problems such as confusing interface, inaccurate data presentation, insufficient data analysis capability, poor data integrity, and low calculation accuracy. SUMMARY

[0006] Therefore, in view of the above technical problems, the present application provides an analysis report generation method, which comprises:

[0007] receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining raw data through the data source;

[0008] configuring a data analysis model through the analysis instruction;

[0009] obtaining a report layout corresponding to the analysis instruction;

[0010] processing the original data by using the report layout based on the data analysis model, and generating an analysis report.

[0011] Preferably, after receiving the analysis instruction, determining a data source according to the analysis instruction, and obtaining original data through the data source, the method further comprises:

[0012] converting the original data into an input parameter format corresponding to the data analysis model.

[0013] Preferably, the configuring a data analysis model through the analysis instruction comprises:

[0014] obtaining row dimension data information, column dimension data information, and measure field information corresponding to the analysis instruction;

[0015] binding the row dimension data information, the column dimension data information, and the measure field information to the data analysis model.

[0016] Preferably, before configuring a data analysis model through the analysis instruction, the method further comprises:

[0017] building the data analysis model, and establishing an association relationship between a fact table and a dimension table in the data analysis model;

[0018] training the data analysis model through training data to obtain a trained data analysis model.

[0019] Preferably, the processing the original data by using the report layout based on the data analysis model, and generating an analysis report comprises:

[0020] loading a calculation index in the data analysis model;

[0021] obtaining the row dimension data information, the column dimension data information, and the measure field information that are bound according to the calculation index;

[0022] generating a SQL according to the association relationship between the fact table and the dimension table;

[0023] obtaining a result data set according to the SQL, and generating the analysis report.

[0024] Preferably, the obtaining a result data set according to the SQL comprises:

[0025] splicing the obtained row dimension data information and column dimension data information, and inserting them into a LinkedHashMap to generate a two-dimensional data table.

[0026] returning the result dataset according to the two-dimensional data table.

[0027] Preferably, the obtained row dimension data information and column dimension data information are spliced and inserted into a LinkedHashMap to generate a two-dimensional data table, including:

[0028] The row dimension data information is split to obtain a row dimension data table without semicolons;

[0029] A corresponding first key value key is spliced for each data in the row dimension data table;

[0030] The data in the row dimension data table corresponding to each first key value key is stored in the LinkedHashMap to generate a first data table in the LinkedHashMap;

[0031] The value corresponding to the column dimension data information is obtained, and a corresponding second key value key is spliced for each value;

[0032] According to the first key value key, it is judged whether there is data corresponding to the second key value key in the first data table;

[0033] If there is, the data in the column dimension data information corresponding to the second key value key is inserted into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table;

[0034] If there is not, the data in the column dimension data information corresponding to the second key value key is stored in the first data table as a new key value, and the new key value is inserted into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table.

[0035] Preferably, the returning the result dataset according to the two-dimensional data table includes:

[0036] It is judged whether the current column dimension in the two-dimensional data table contains the metric field information;

[0037] If the current column dimension in the two-dimensional data table contains the metric field information, a corresponding child node is generated;

[0038] If the child node is not empty, the child node is added to the childrenMap data structure of the current node, and the result dataset is returned;

[0039] If the child node already exists in the childrenMap data structure, the child node is retained and used, and the result dataset is returned.

[0040] In addition, to solve the above problems, the application further provides an analysis report generation device, comprising:

[0041] An acquisition module is configured to receive an analysis instruction, determine a data source according to the analysis instruction, and acquire original data through the data source;

[0042] A configuration module is configured to configure a data analysis model through the analysis instruction;

[0043] The acquisition module is further configured to acquire a report layout corresponding to the analysis instruction;

[0044] A generation module is configured to process the original data based on the data analysis model and using the report layout, and generate an analysis report.

[0045] In addition, to solve the above problems, the application further provides an analysis report generation system comprising a memory and a processor, wherein the memory stores an analysis report generation program, and the processor runs the analysis report generation program to enable the analysis report generation system to perform the analysis report generation method as described above.

[0046] In addition, to solve the above problems, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores an analysis report generation program, and the analysis report generation program is executed by a processor to implement the analysis report generation method as described above.

[0047] The application provides an analysis report generation method, device, system and storage medium, wherein the method comprises: receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining original data through the data source; configuring a data analysis model through the analysis instruction; obtaining a report layout corresponding to the analysis instruction; processing the original data based on the data analysis model and using the report layout, and generating an analysis report. The method provided by the application determines the data required to be obtained from the data source and stores it in a proper data format; performs star model association on the existing data source, configures dimensions, measures, and calculable columns, etc.; designs a report layout according to the data source and the data model, and finally presents the data using a table; analyzes the data using the laid-out report, drags and drops indexes, dimensions, and measures; filters the required data; performs secondary simple calculation on the data; and rolls up and traces down the dimensions, thereby obtaining an analysis report. Through the setting of indexes, dimensions, and measures, the application can obtain multi-dimensional data and perform analysis, and can be used to identify the correlation between models, indexes, and dimensions in the data. The operation is simpler, can help the business personnel of a financial institution to better understand and analyze data, the operation method is logically clear, the data presentation mode is more intuitive, and the data analysis and arrangement are more accurate, so that more accurate evaluation can be made according to the analysis report. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 A structural schematic diagram of a hardware running environment related to an analysis report generation method embodiment of the application;

[0049] Figure 2 A flowchart of a first embodiment of the analysis report generation method of the application;

[0050] Figure 3 A flowchart of a second embodiment of the analysis report generation method of the application;

[0051] Figure 4 A flowchart of a refinement of step S200 in the second embodiment of the analysis report generation method of the application;

[0052] Figure 5 A flowchart of steps S500, S600 and S700 in the second embodiment of the analysis report generation method of the application;

[0053] Figure 6 A flowchart of a refinement of step S400 in the third embodiment of the analysis report generation method of the application;

[0054] Figure 7 A flowchart of a refinement of step S440 in the third embodiment of the analysis report generation method of the application;

[0055] Figure 8The flowchart for detailing step S441 in the third embodiment of the analysis report generation method of the present application is shown in the figure.

[0056] Figure 9 The flowchart for detailing step S442 in the third embodiment of the analysis report generation method of the present application is shown in the figure.

[0057] Figure 10 The module connection diagram of the analysis report generation device of the present application is shown in the figure.

[0058] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0059] Embodiments of the present application are described in detail below, in which the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout.

[0060] In addition, the terms "first", "second", etc. are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified and limited.

[0061] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above-mentioned terms in the present application can be understood according to the specific circumstances.

[0062] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0063] As shown in the figure, it is a structure diagram of the hardware running environment of the terminal related to the embodiment of the present application. Figure 1

[0064] ​The analysis report generation system of the embodiment of the present invention can be a PC, or a mobile terminal device such as a smartphone, tablet computer, or portable computer. The analysis report generation system may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, and a remote control. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001. Optionally, the analysis report generation system may also include an RF (Radio Frequency) circuit, an audio circuit, a WiFi module, etc. In addition, the analysis report generation system can also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail here.

[0065] Those skilled in the art will understand that Figure 1 The analysis report generation system shown in the figure does not constitute a limitation thereof, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Figure 1 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a data interface control program, a network connection program, and an analysis report generation program.

[0066] In summary, this invention acquires and analyzes multidimensional data through the configuration of indicators, dimensions, and metrics, and can be used to identify models within the data and the correlations between indicator dimensions. This makes operation simpler, helping financial institution personnel better understand and analyze data. The logical operation method is clear, the data presentation is more intuitive, and the data analysis and organization are more accurate, enabling more precise evaluations based on analytical reports.

[0067] Example 1:

[0068] Reference Figure 2 This embodiment provides a method for generating an analysis report, including:

[0069] Step S100: receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining raw data through the data source;

[0070] The analysis instruction mentioned above may be an analysis instruction generated after the user inputs relevant configurations through the client.

[0071] Through the analysis instruction, the data source that needs to obtain data and the model that needs to analyze the data can be determined, and the related configuration of the model can be determined.

[0072] In this step, the user inputs the analysis requirement, and the system determines the specific data source according to the information provided by the user. The data source here can be a database, a file, and various forms of data such as various financial data in a cloud enterprise financial management system.

[0073] As described above, the system obtains the original data through the determined data source. This step can obtain the required data from different data sources through data extraction, cleaning, and conversion, and pre-processes the data to meet the requirements of subsequent analysis.

[0074] Step S200, configuring a data analysis model through the analysis instruction;

[0075] As described above, the user can select a suitable data analysis model according to the type and purpose of the data to be analyzed, and make corresponding configuration. For example, in multidimensional analysis, the OLAP algorithm can be used, which allows the user to analyze data from multiple angles, extract key information, and visualize the display.

[0076] Step S300, obtaining a report layout corresponding to the analysis instruction;

[0077] The system will obtain the report layout corresponding to the analysis instruction according to the user's requirement. In this step, the user can select the style, column name, row name, filter, etc. of the report, and can customize the display method of the report.

[0078] Step S400, processing the original data based on the data analysis model using the report layout, and generating an analysis report.

[0079] As described above, the system will process the obtained original data by the configured data analysis model, and generate the corresponding result. For example, in multidimensional analysis, the system uses the OLAP algorithm to calculate and aggregate data according to the dimensions and indicators selected by the user. Finally, the system arranges the processed data according to the report layout set by the user, and generates the corresponding analysis report for the user to view and analyze. Through the report display, the user can more intuitively understand the business situation, find out the problem and take timely measures.

[0080] The analysis report generation method can improve data analysis efficiency, automatically generate reports without manual splicing and calculation, greatly improve the efficiency of data analysis, strengthen data visualization, display data through charts, tables and other methods, make users more intuitively understand data, and be convenient and fast, reduce error rate, reduce human interference and errors, and avoid some common data analysis errors, convenience, users only need to provide analysis requirements, do not need to care about the specific implementation process, the purpose of the method is to help enterprises better analyze data, find problems, improve decision-making, and improve enterprise operation efficiency and competitiveness.

[0081] It should be noted that in the financial field, multidimensional analysis is a method for processing multidimensional data. Under the wide application of various fields, the report of the regulatory authority is used as the object, the index API interface is accessed, and a report based on the index is designed to drag and drop and display multiple data dimensions for analyzing and visualizing data. In practical applications, multidimensional analysis can be used to identify the correlation between models and index dimensions in data, helping people better understand data.

[0082] For example, in the balance sheet, multidimensional analysis can be used to analyze the balance, difference, same period, net interest, net income, cumulative net income, average interest rate, and other metrics of various indicators such as retail, public, large enterprise, small enterprise loans, credit cards, and other multi-dimensional perspectives. At the same time, it supports up and down, and from each branch up to only the branch data of the corresponding branch, and from each branch down to the data of each branch, department, etc. It can help businesses better understand data and make more informed decisions.

[0083] The method provided in this embodiment determines the data needed to be obtained from the data source and stores it in a proper data format; for existing data sources, it performs star model association, configures dimensions, metrics, and computable columns; according to the data source and data model, it designs a report layout, and finally uses a table to present data; uses the laid-out report to analyze data, drags and drops indicators, dimensions, and metrics; filters the required data; performs secondary simple calculation on the data; and up and down on the dimensions, thereby obtaining an analysis report.

[0084] This embodiment can be used to identify the correlation between models and index dimensions in data by setting indicators, dimensions, and metrics to obtain multidimensional data and perform analysis. The operation is simpler, can help financial institution personnel better understand and analyze data, the operation method is logically clear, the data presentation method is more intuitive, and the data analysis and arrangement are more accurate, so that more accurate evaluations can be made according to the analysis report.

[0085] Embodiment 2:

[0086] Referring to Figure 3 The second embodiment of the present application provides a method for generating an analysis report, based on the first embodiment, wherein the step S100 of receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining original data through the data source further comprises:

[0087] The step S500 of converting the original data into a parameter format corresponding to the data analysis model.

[0088] After the original data is obtained, it needs to be stored in a proper data format, i.e., a parameter format.

[0089] Further, referring to Figure 4 The step S200 of configuring a data analysis model through the analysis instruction comprises:

[0090] The step S210 of obtaining row dimension data information, column dimension data information, and measurement field information corresponding to the analysis instruction.

[0091] After the original data is configured, a data model needs to be designed. For the configured data source, a star model can be associated, dimensions, measurements, and computable columns can be configured. Specifically, row dimension data information, column dimension data information, and measurement field information need to be obtained.

[0092] The step S220 of binding the row dimension data information, the column dimension data information, and the measurement field information to the data analysis model.

[0093] In the method for generating a multi-dimensional analysis report, the process of obtaining row dimension data information, column dimension data information, and measurement field information corresponding to the analysis instruction refers to adding these information to the data analysis model according to the row dimension, column dimension, and measurement field selected by the user, for subsequent data query. The row dimension data information, the column dimension data information, and the measurement field information are different types of information.

[0094] For example, the row dimension data information can refer to data information used for row dimensions, such as time, geographic location, etc. These data can be used to classify, aggregate, or group data in the analysis report. When comparing between multiple time periods, regions, or other factors, the row dimension data information plays an obvious role.

[0095] For another example, the column dimension data information can refer to data information used for column dimensions, such as product lines, sales channels, etc. These data can be used to divide the data in the analysis report into different categories or subgroups, so as to better display and compare the data.

[0096] For example, the measure field information can refer to data information used for measurement, such as sales, profits, etc. These data can be used to show data changes in a certain period of time, and can also be used to calculate growth rate, proportion, etc. data indicators.

[0097] The process of binding the row dimension data information, the column dimension data information, and the measure field information to the data analysis model refers to binding the row dimension, the column dimension, and the measure field selected by the user to the data analysis model for subsequent analysis report generation. This process can be achieved by establishing an association relationship between the fact table and the dimension table in the data analysis model. The row dimension, the column dimension, and the measure field selected by the user can be displayed in the report by being bound to the corresponding table columns and rows.

[0098] In the above steps, the instruction drag-and-drop based method is used to quickly obtain the data to be analyzed, and the data is bound to the data analysis model, making the analysis more intuitive, simple, efficient, and improving the accuracy of the analysis results. In addition, by constructing a data analysis model and combining the trained model for multi-dimensional analysis of data, the enterprise can better understand the data and make more intelligent decisions.

[0099] Further, with reference to Figure 5 , before the step S200 of configuring the data analysis model by the analysis instruction, further comprising:

[0100] The step S600 of constructing the data analysis model and establishing an association relationship between the fact table and the dimension table in the data analysis model.

[0101] The above step mainly aims to construct a data analysis model suitable for analyzing report data according to business requirements.

[0102] In step S600, for example, the following sub-steps can be included:

[0103] Determine the model target: First, it is necessary to clarify what problem needs to be solved by using the data analysis model, such as increasing sales, reducing costs, etc.

[0104] Determine the data source: According to the model target, determine the source of the required raw data, and clean and process the data to meet the modeling requirements.

[0105] Establish the fact table and the dimension table: Establish the association relationship between the fact table and the dimension table in the data analysis model for subsequent data query and analysis. Among them, the fact table usually contains numerical data, such as sales, profits, etc.; the dimension table contains data for classification and grouping, such as time, region, product, etc.

[0106] Design model structure: According to the structure of fact table and dimension table, design the structure of data analysis model. Common modeling tools such as SQL Server Analysis Services (SSAS) or OLAP Cube can be used for modeling.

[0107] The step S700 trains the data analysis model by using the training data, and obtains the trained data analysis model.

[0108] The above steps can be used to train the data analysis model with historical data and improve its prediction ability and accuracy.

[0109] Specifically, it can include: determining the training data set: according to the model target, selecting appropriate historical data set for training. It should be noted that the training data set should be consistent with the actual application scene as much as possible. Data preprocessing: before training data, the data needs to be preprocessed and cleaned for subsequent training process. For example, missing values can be filled, data can be normalized, etc. Select algorithm: according to the model target and data characteristics, select appropriate machine learning algorithm for training. For example, decision tree, random forest, neural network, etc. Train model: use the selected algorithm to train the training data set, and adjust according to the actual situation until the training effect reaches the expectation. Evaluate model: evaluate and test the trained model to determine its accuracy and generalization ability. Cross validation, ROC curve and other methods can be used for evaluation.

[0110] In this embodiment, by constructing a precise data analysis model and training the model with historical data, the accuracy and reliability of the analysis result can be improved. At the same time, through the association relationship of fact table and dimension table, multi-dimensional data can be quickly queried and analyzed, so as to better understand business data.

[0111] Embodiment 3

[0112] Referring to Figure 6 , the third embodiment of the present application provides a method for generating an analysis report, based on the above-mentioned embodiment 1, the step S400, based on the data analysis model, using the report layout to process the original data and generating an analysis report, including:

[0113] Step S410, loading the calculation index in the data analysis model;

[0114] According to the above, the system loads the indicators that need to be calculated from the data analysis model according to the configured analysis instruction. The calculation indicator is a rule for statistical and calculation on the original data, which can be calculated based on a single field or multiple fields, and usually includes aggregation functions (such as sum, average, etc.). By loading the calculation indicator, these indicators can be used to generate reports in subsequent data processing.

[0115] In step S420, the bound row dimension data information, column dimension data information and measure field information are obtained according to the calculation indicators.

[0116] The system uses the loaded calculation indicators to bind the required row dimension information, column dimension information and measure field information according to the analysis instruction. The row dimension information and column dimension information are information used for classifying and grouping data, while the measure field is a numerical field used for calculation on a certain dimension. The binding relationship of these dimensions and measure fields can affect the form and content of the final generated data report.

[0117] At the operation level, all the indicators that have been configured are loaded when the page is initialized, and then the bound dimensions and measure field information are obtained through the indicator code.

[0118] In step S430, SQL is generated according to the association relationship between the fact table and the dimension table.

[0119] In step S440, the result dataset is obtained according to the SQL, and the analysis report is generated.

[0120] According to the above, the system uses the association relationship between the fact table and the dimension table to generate a structured query language (SQL) to access the data source according to the configured analysis instruction and the bound dimensions and measure field information. The fact table is a table containing measure fields, while the dimension table contains row dimension information and other non-numerical data such as column dimension information. By generating SQL, the system can effectively extract the required data content from the data source.

[0121] The SQL generated in step S430 is used to query the data source to obtain the required result dataset. The result dataset is a data collection containing all the data records that need to be displayed in the data report, and each record usually corresponds to a row dimension and one or more measure fields. Finally, based on the result dataset and the previously configured report layout, the system generates the corresponding analysis report according to the analysis instruction.

[0122] According to the above, SQL (Structured Query Language) is a standardized computer language used to manage and operate relational databases. Using SQL, users can query, update, delete and other operations on the data stored in the database.

[0123] The result data set is a data collection containing data records that meet the conditions. In the data processing process, the data that meets the specified conditions is filtered through various conditions and methods, and the final data collection formed is the result data set.

[0124] The calculation index refers to the rules and methods used for statistical and calculation of data. By defining different calculation indexes, different calculations and analyses can be performed on the data.

[0125] In this embodiment, by precisely controlling the data processing process, query process and result generation process, the generated data report can be ensured to have high accuracy and reliability. In addition, by integrating the calculation index into the analysis model, data calculation and analysis can be quickly and accurately performed in subsequent data processing. The advantages of these steps include high efficiency, accuracy, systematization, etc.

[0126] Further, with reference to Figure 7 , the step S440 obtains a result data set according to the SQL, including:

[0127] Step S441, the row dimension data information and the column dimension data information obtained are spliced and inserted into LinkedHashMap to generate a two-dimensional data table;

[0128] Wherein, LinkedHashMap is a data structure based on hash table and double-linked list, which can maintain the insertion order and support fast lookup, deletion and insertion operations. The two-dimensional data table refers to a two-dimensional table composed of rows and columns, which is used to store the result data set of the analysis report. In this step, by splicing the row dimension data information and the column dimension data information, a complete two-dimensional data table can be obtained, which provides basic data for subsequent report generation.

[0129] Step S442, according to the two-dimensional data table, returns the result data set.

[0130] In the above steps, the result data set is returned according to the two-dimensional data table.

[0131] For example, it can be first judged whether the current column dimension contains metric field information, if it contains, the corresponding child node is generated; if the child node is not empty, it is added to the childrenMap data structure of the current node, so as to generate a multi-level analysis report. Finally, the generated result data set is returned to the user.

[0132] In this embodiment, by using LinkedHashMap and two-dimensional data table structure, efficient and flexible report generation is realized. Specifically, LinkedHashMap can maintain insertion order and support fast lookup and insertion operations, so it can conveniently process data in two-dimensional data table and ensure data correctness. At the same time, by splicing row dimension data information and column dimension data information, a complete two-dimensional data table can be obtained, providing basic data for subsequent report generation. Finally, when generating result dataset according to two-dimensional data table, different dimensions and measurement fields can be freely combined according to user needs, so as to generate multi-level analysis report.

[0133] Further, with reference to Figure 8 , the step S441, splicing the obtained row dimension data information and column dimension data information, inserting into LinkedHashMap, generating two-dimensional data table, comprising:

[0134] Step S4411, the row dimension data information is split to obtain a row dimension data table not containing semicolon;

[0135] The above, this step is mainly for some special cases, for example, the row dimension data information contains semicolon, it needs to be split to facilitate subsequent processing.

[0136] This step is to process the row dimension data and store the processed result in rowLinfoList. If there is a semicolon in the row dimension data, it will be split into multiple dimension information and added to rowLinfoList.

[0137] Step S4412, splicing the corresponding first key value key for each data in the row dimension data table;

[0138] Splicing the corresponding first key value key for each data in the row dimension data table. The purpose of this step is to give each row dimension data a unique identifier for subsequent data processing and lookup.

[0139] Step S4413, storing the data in the row dimension data table corresponding to each first key value key into the LinkedHashMap to generate the first data table in the LinkedHashMap;

[0140] The above, storing the data in the row dimension data table corresponding to each key value key into the LinkedHashMap to generate the first data table in the LinkedHashMap. In this step, first, splice the row dimension data into the LinkedHashMap, and then distinguish different row dimension data according to the first key value key.

[0141] In this step, the code first obtains the row dimension information (i.e., rowDimList) from the incoming parameter mulitgetConditionsDTO, and splits and processes it, splitting the row dimension information containing semicolons, and finally obtaining a new row dimension information list rowLinfoList that does not contain semicolons. Then, the code traverses the query data (i.e., mulitdimList) and splices a unique key value key according to the row dimension information, and stores the row data into a LinkedHashMap according to the key, and finally stores each row of data into a LinkedHashMap tableData.

[0142] Step S4414, obtaining the value corresponding to the column dimension data information, and splicing a corresponding second key value key for each value;

[0143] Step S4415, according to the first key value key, judging whether the first data table exists data corresponding to the second key value key;

[0144] Step S4416, if it exists, inserting the data corresponding to the second key value key in the column dimension data information into the LinkedHashMap corresponding to the second key value key, and generating the two-dimensional data table;

[0145] Step S4417, if it does not exist, storing the data corresponding to the second key value key in the column dimension data information as a new key value in the first data table, and inserting the new key value into the LinkedHashMap corresponding to the second key value key, and generating the two-dimensional data table.

[0146] In the above, in this step, the column dimension data is processed. Specifically, the code obtains the column dimension information (i.e., columnDimList) from the incoming parameter mulitgetConditionsDTO, and traverses the query data to splice the column dimension information (i.e., valueList) and the corresponding value of each row of data as a new column name key. Then, the code judges whether the tableData already exists the key, if it does not exist, stores it as a new key in the tableData; if it already exists, updates the value corresponding to the key.

[0147] Wherein, the first key value key and the second key value key are unique identifiers for distinguishing different dimension data. The first key value key is used to distinguish different row dimension data, and the second key value key is used to distinguish different column dimension data. These key values play a very important role in subsequent processing. By giving each row dimension data and column dimension data a unique identifier, subsequent data searching and processing can be facilitated.

[0148] The above steps can efficiently and flexibly process various types of dimensions and measure fields, and can automatically create multi-level report nodes, thereby realizing high-quality report generation. By using LinkedHashMap and two-dimensional data table structure, a large amount of report data can be quickly and accurately stored and processed, while the correctness and integrity of the data can be guaranteed.

[0149] Further, with reference to Figure 9 , the step S442, returning the result data set according to the two-dimensional data table, comprises:

[0150] Step S4421, judging whether the current column dimension in the two-dimensional data table contains the measure field information;

[0151] Step S4422, if the current column dimension in the two-dimensional data table contains the measure field information, generating a corresponding child node;

[0152] Step S4423, if the child node is not empty, adding the child node to the childrenMap data structure of the current node, and returning the result data set;

[0153] Step S4424, if the child node already exists in the childrenMap data structure, retaining and using the child node, and returning the result data set.

[0154] Wherein, the childrenMap data structure refers to a mapping table composed of key-value pairs, used to store node information of the analysis report. In this data structure, each key value corresponds to a report node, and the node can contain multiple child nodes. By using this data structure, the node hierarchical relationship of the analysis report can be conveniently organized and managed, and multi-level report display can be realized.

[0155] When returning the result data set, if the current node has child nodes, all the child nodes need to be traversed and their data needs to be merged into the data of the current node. Finally, the result data set of the entire analysis report can be generated by recursively calling these child nodes.

[0156] The advantage of these sub-steps is that they can efficiently and flexibly process various types of node information and automatically create multi-level report nodes, thereby achieving high-quality report generation. By using the childrenMap data structure, the node hierarchy of the analysis report can be easily organized and managed, while also ensuring the accuracy and integrity of the report data. In addition, these sub-steps are highly scalable and reusable, meeting different analysis needs and providing users with customized report presentation effects.

[0157] In the above embodiment, a recursive processing method for processing child nodes is used. When processing tree-structured data, for each parent node, recursively traverse all its child nodes and perform the same operation on the child nodes. This operation will continue to recursively call itself until no child nodes are found.

[0158] For example, you can use recursive processing of child nodes to calculate the depth of a tree. First, check whether the current node has child nodes. If so, recursively call the same operation for each child node. The depth is increased by 1 with each recursive call, and the maximum depth of all child nodes plus 1 is finally returned, which is the depth of the entire tree. This method can be applied to the processing of many tree-structured data, such as XML documents, file system directories, etc. The advantage of recursive processing of child nodes is that it can simplify code implementation, improve readability and maintainability, and can also process tree structures of arbitrary depth.

[0159] In the above code, the code first checks whether column dimension information exists. If not, the current node is returned directly. Otherwise, the code assembles the child node name based on the information in the passed treeDTO parameter and checks the root for a child node with the same name. If so, the node is returned; otherwise, a new node is created and returned. If the child node is not the last level, the code recursively processes the next level of child nodes.

[0160] For example, the implementation can be as follows:

[0161] Step 1: Special processing of row dimension data;

[0162] Step 2: Match from query data (sorted data);

[0163] -Traverse the queried data, extract each row dimension and column dimension and form a key, and put the corresponding value into LinkedHashMap;

[0164] -If a LinkedHashMap with the same key exists, it is used directly; otherwise, a new LinkedHashMap is created and all row dimensions and corresponding values ​​are added;

[0165] -If there is a column dimension, recurse and continue to build the Tree;

[0166] Step 3: Recursively construct Tre:

[0167] - Get parameter values, including root node, current data, row dimension data, measurement dictionary, decimal places, column dimension list, current position i, node name, etc.;

[0168] -If the current column dimension is a measure, add it as a child node to the current node;

[0169] -If the next column dimension is also a metric, traverse the remaining metrics and generate corresponding child nodes;

[0170] -If the next column dimension is a dimension, generate the corresponding child node and recurse to the next layer;

[0171] -Add the generated child nodes to the childrenMap of the current node;

[0172] Step 4: If it is already the last layer, return to the current node:

[0173] Steps:

[0174] In Step 1: Special processing of row dimension data:

[0175] This step primarily processes row dimension data. Row dimensions may contain multiple attributes separated by ";". These attributes need to be separated into separate columns for subsequent processing. The row dimension list is traversed. If a row dimension contains ";", it is split into multiple row dimensions and added to rowLinfoList; otherwise, it is added directly to rowLinfoList. After processing is complete, rowLinfoList contains all row dimensions.

[0176] In Step 2: Match from query data (sorted data):

[0177] This step is mainly to process the queried data and assemble it into a LinkedHashMap. Traverse the queried data mulitdimList, for each data, take out its row dimension and column dimension and splice it into a key. Here, the StringUtils.join method is used to connect all the row dimension values and remove spaces. If the LinkedHashMap corresponding to the key already exists in tableData, it is directly used; otherwise, a LinkedHashMap is created and all row dimensions and corresponding values are added to it. If a Tree needs to be constructed (i.e., there is a column dimension), the recursionData method is recursively called.

[0178] In Step 3: Recursively build Tree:

[0179] This step is mainly to recursively build a Tree based on the queried data. Obtain the required parameters: root, data, rowDataMap, metricDict, decimal, columnList, i, code, name, etc. If the current column dimension is a metric, add it as a child node to the current node node, and continue to judge the next column dimension. If the next column dimension is also a metric, traverse the remaining metrics and generate the corresponding child nodes, and add them to childrenMap. If the next column dimension is a dimension, generate the corresponding child node and recursively build the Tree. Add the generated child node to the childrenMap of the current node.

[0180] In Step 4: If it is the last layer, return the current node:

[0181] If the current position i has reached the end of columnList, it means it is the last layer, so directly return the current node node. Otherwise, continue to recursively process the next layer and add the returned child node to the childrenMap of the current node.

[0182] In the above steps, the function of constructing a multi-level Tree based on query results is realized through code, which can flexibly handle different dimensions and metrics. Special processing is performed for the case where the row dimension contains multiple attributes, making subsequent processing more convenient.

[0183] In Step 3, recursive construction of Tree is performed.

[0184] First, the parameter values are obtained, including:

[0185] root: the root node of the current Tree;

[0186] data: queried data;

[0187] rowDataMap: row dimension data corresponding to the record;

[0188] metricDict: metric dictionary, storing metric field name and corresponding metric name;

[0189] decimal: decimal point position;

[0190] columnList: all column dimension list;

[0191] i: current processing column dimension position in columnList;

[0192] code: current column dimension field name;

[0193] name: current node name.

[0194] Then, it is judged whether the current column dimension is a metric: if so, it is added to the current node node as a child node, and the next column dimension is judged. The value value corresponding to the current column dimension is obtained, and if it is not empty, it is formatted (according to the decimal parameter) and added to the rowDataMap for storage. If not, go to step 3.

[0195] Then, it can be judged whether the next column dimension is a metric: if so, the remaining metrics are traversed, the corresponding child nodes are generated, and they are added to the childrenMap. The value value corresponding to the metric is obtained, and if it is not empty, it is formatted (according to the decimal parameter) and added to the rowDataMap for storage. Each metric corresponds to a child node, and the child node name is the metric name (obtained from metricDict). If not, go to step 4. Process the next column dimension

[0196] The field name code of the next column dimension is obtained, and the corresponding value value is obtained from data according to this field name. If the value is empty, the current node node is returned directly. If the value is not empty, a child node is generated, and its childrenMap is recursively constructed. The name of the child node is value. By recursively calling the recursionData method, a complete sub-tree is constructed, and it is added to the childrenMap of the current node node.

[0197] Add the generated child node to the childrenMap of the current node; if the generated child node is not empty, add it to the childrenMap of the current node. If the childrenMap already exists the child node, use the existing child node directly.

[0198] The main purpose of this method is to realize the query and display of cross table data. By inputting row dimension, column dimension and other information, the query data is traversed line by line and spliced into a two-dimensional table according to the row dimension and column dimension, and finally returned in the form of Map<String,LinkedHashMap<String,Object>>. At the same time, in the recursive process, the code also creates a tree structure to represent the relationship between nodes, which is convenient for subsequent query and operation.

[0199] In addition, with reference to Figure 10 , the embodiment also provides an analysis report generation device, comprising:

[0200] An acquisition module 10 is configured to receive an analysis instruction, determine a data source according to the analysis instruction, and acquire original data through the data source;

[0201] A configuration module 20 is configured to configure a data analysis model through the analysis instruction;

[0202] The acquisition module 10 is further configured to acquire a report layout corresponding to the analysis instruction;

[0203] A generation module 30 is configured to process the original data based on the data analysis model and using the report layout, and generate an analysis report.

[0204] In addition, the embodiment also provides an analysis report generation system, comprising a memory and a processor, wherein the memory stores an analysis report generation program, and the processor runs the analysis report generation program to enable the analysis report generation system to execute the analysis report generation method as described above.

[0205] In addition, the embodiment also provides a computer readable storage medium, wherein the computer readable storage medium stores an analysis report generation program, and the analysis report generation program is executed by a processor to implement the analysis report generation method as described above.

[0206] In summary, the present application can be used to identify the correlation between models and index dimensions in data by setting indexes, dimensions and metrics, acquiring multi-dimensional data and performing analysis. The operation is simpler, and the business personnel of a financial institution can better understand and analyze data. The operation method is logically clear, the data presentation method is more intuitive, and the data analysis and arrangement are more accurate, so that more accurate evaluation can be made according to the analysis report.

[0207] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0208] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disc) as described above, and includes a plurality of instructions for causing an end device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application. The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for generating an analysis report, characterized in that: include: receiving an analysis instruction, determining a data source according to the analysis instruction, and obtaining raw data through the data source; Configuring a data analysis model through the analysis instructions; Obtaining a report layout corresponding to the analysis instruction; Based on the data analysis model, the raw data is processed using the report layout and an analysis report is generated; including: generating SQL according to the association relationship between the fact table and the dimension table; obtaining a result data set according to the SQL and generating the analysis report; The step of obtaining the result data set according to the SQL includes: concatenating the acquired row dimension data information and column dimension data information, inserting the obtained row dimension data information into a LinkedHashMap, and generating a two-dimensional data table; and returning the result data set according to the two-dimensional data table. The obtained row dimension data information and column dimension data information are spliced ​​and inserted into LinkedHashMap to generate a two-dimensional data table, including: Splitting the row-dimensional data information to obtain a row-dimensional data table without semicolons; Splicing out a corresponding first key value for each data in the row dimension data table; Storing the data in the row dimension data table corresponding to each of the first key values ​​key into the LinkedHashMap to generate a first data table in the LinkedHashMap; Obtain the values ​​corresponding to the column dimension data information, and assemble the corresponding second key value key for each value; According to the first key value key, determine whether there is data corresponding to the second key value key in the first data table; If it exists, inserting the data corresponding to the second key value key in the column dimension data information into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table; If it does not exist, the data corresponding to the second key value key in the column dimension data information is used as a new key value and stored in the first data table, and the new key value is inserted into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table.

2. The analysis report generation method according to claim 1, characterized in that: After receiving the analysis instruction, determining the data source according to the analysis instruction, and obtaining the original data through the data source, the method further includes: The original data is converted into an input parameter format corresponding to the data analysis model.

3. The analysis report generation method according to claim 1, wherein: Configuring the data analysis model through the analysis instruction includes: Obtaining row dimension data information, column dimension data information, and metric field information corresponding to the analysis instruction; The row dimension data information, the column dimension data information and the metric field information are bound to the data analysis model.

4. The analysis report generation method according to claim 3, wherein: Before configuring the data analysis model through the analysis instruction, the method further includes: Constructing the data analysis model, and establishing an association relationship between the fact table and the dimension table in the data analysis model; The data analysis model is trained using training data to obtain a trained data analysis model.

5. The analysis report generation method according to claim 1, wherein: The returning the result data set according to the two-dimensional data table includes: Determine whether the current column dimension in the two-dimensional data table contains metric field information; If the current column dimension in the two-dimensional data table contains the metric field information, a corresponding child node is generated; If the child node is not empty, add the child node to the childrenMap data structure of the current node and return the result data set; If the child node already exists in the childrenMap data structure, the child node is retained and used, and the result data set is returned.

6. An analysis report generating device, characterized in that: include: An acquisition module, configured to receive an analysis instruction, determine a data source according to the analysis instruction, and acquire raw data through the data source; A configuration module, configured to configure a data analysis model using the analysis instructions; The acquisition module is further configured to acquire a report layout corresponding to the analysis instruction; A generation module is used to process the raw data based on the data analysis model and the report layout, and generate an analysis report; including: generating SQL according to the association relationship between the fact table and the dimension table; obtaining a result data set according to the SQL, and generating the analysis report; The step of obtaining the result data set according to the SQL includes: concatenating the acquired row dimension data information and column dimension data information, inserting the obtained row dimension data information into a LinkedHashMap, and generating a two-dimensional data table; and returning the result data set according to the two-dimensional data table. The obtained row dimension data information and column dimension data information are spliced ​​and inserted into LinkedHashMap to generate a two-dimensional data table, including: Splitting the row-dimensional data information to obtain a row-dimensional data table without semicolons; Splicing out a corresponding first key value for each data in the row dimension data table; Storing the data in the row dimension data table corresponding to each of the first key values ​​key into the LinkedHashMap to generate a first data table in the LinkedHashMap; Obtain the values ​​corresponding to the column dimension data information, and assemble the corresponding second key value key for each value; According to the first key value key, determine whether there is data corresponding to the second key value key in the first data table; If it exists, inserting the data corresponding to the second key value key in the column dimension data information into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table; If it does not exist, the data corresponding to the second key value key in the column dimension data information is used as a new key value and stored in the first data table, and the new key value is inserted into the LinkedHashMap corresponding to the second key value key to generate the two-dimensional data table.

7. An analysis report generation system, characterized in that: The system comprises a memory and a processor, wherein the memory stores an analysis report generation program, and the processor runs the analysis report generation program to enable the analysis report generation system to execute the analysis report generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an analysis report generation program, and when the analysis report generation program is executed by the processor, the analysis report generation method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Report collecting device and report collecting method based on OLAP

    CN103678590A

  • Data pushing method and device for fact report, equipment and storage medium

    CN110659345A