Customized Future Report Generation Method and System

Through the large language model and mapping database, the data query and report generation statements are automatically matched, combined with the target data warehouse optimization strategy, the problem of low efficiency in traditional report generation is solved, and efficient and personalized report generation is achieved to ensure data accuracy and timeliness.

CN119046334BActive Publication Date: 2025-08-01河北网星软件有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411236213.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-08-01
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

Traditional report generation methods are inefficient and difficult to respond to business needs quickly. The generation process is cumbersome and data accuracy and timeliness are insufficient.

Method used

By customizing future report generation methods and systems, using large language models and mapping databases to automatically match data query and report generation statements, combined with the optimization strategy of the target data warehouse, we can intelligently respond to target information, accurately match user needs, and automatically process data sets to generate target reports.

Benefits of technology

It improves the flexibility and personalization of report generation, ensures the accuracy and timeliness of data, saves labor costs, and significantly improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046334B_ABST
    Figure CN119046334B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and system for generating customized future reports, belonging to the technical field of report generation. The method includes: responding to receiving target information, determining a data query statement and a report generation statement corresponding to the target information; the target information includes generation requirement information of a target report; determining a target data set from a target data warehouse according to the data query statement, the target data set including data for generating the target report; and processing the target data set according to the report generation statement to obtain the target report. The method and system for generating customized future reports provided by the present disclosure can solve the problem of low report generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the technical field of report generation, and more specifically, relates to a method and system for generating customized future reports. Background Art

[0002] Customized report generation refers to designing and creating reports with personalized layouts, calculation logics, and visual presentations according to specific business requirements and data analysis objectives. This method can help enterprises more effectively monitor business performance, identify trends and anomalies, and support decision-making. In traditional methods, determining the data required to generate a report often requires a large amount of trial and error and exploration, and it may query irrelevant data or miss important data. Moreover, the report generation process is relatively cumbersome and time-consuming. When receiving new report requirements, it often takes a long time to determine the required data query statements and report generation methods, resulting in low report generation efficiency and accuracy. Summary of the Invention

[0003] The purpose of this disclosure is to provide a method and system for generating customized future reports to solve the problem of low report generation efficiency.

[0004] In the first aspect of the embodiments of this disclosure, a method for generating customized future reports is provided, including:

[0005] In response to receiving target information, determining a target data query statement and a target report generation statement corresponding to the target information; the target information includes the generation requirement information of the target report;

[0006] Determining a target data set from a target data warehouse according to the target data query statement, where the target data set includes the data for generating the target report;

[0007] Processing the target data set according to the target report generation statement to obtain the target report.

[0008] In the second aspect of the embodiments of this disclosure, a system for generating customized future reports is provided, including:

[0009] A calculation module, configured to determine a target data query statement and a target report generation statement corresponding to the target information in response to receiving the target information; the target information includes the generation requirement information of the target report;

[0010] A data acquisition module, configured to determine a target data set from a target data warehouse according to the target data query statement, where the target data set includes the data for generating the target report;

[0011] A report generation module, configured to process the target data set according to the target report generation statement to obtain the target report.

[0012] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above-mentioned customized future report generation method are implemented.

[0013] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned customized future report generation method are implemented.

[0014] The beneficial effects of the customized future report generation method and system provided by the embodiments of the present disclosure are as follows: By intelligently responding to target information, accurately matching the data query and report generation requirements needed by users, the flexibility and personalization degree of report generation are improved. At the same time, key data sets are directly extracted from the target data warehouse, ensuring the accuracy and timeliness of the data, and providing a solid data foundation for decision-making. In addition, the target data sets are automatically processed to quickly generate target reports, which not only saves labor costs but also significantly improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 It is a schematic flowchart of a customized future report generation method provided by an embodiment of the present disclosure;

[0017] Figure 2 It is a structural block diagram of a customized future report generation system provided by an embodiment of the present disclosure;

[0018] Figure 3 It is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present disclosure. However, those skilled in the art should clearly understand that the present disclosure can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present disclosure.

[0020] To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following will be described through specific examples in conjunction with the accompanying drawings.

[0021] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a customized future report generation method provided by an embodiment of the present disclosure. The method may include S101 to S103.

[0022] S101: In response to receiving the target information, determine the target data query statement and the target report generation statement corresponding to the target information. The target information includes the generation requirement information of the target report.

[0023] In this embodiment, the target information refers to the key input content used to trigger the generation of a customized future report. The generation requirement information of the target report may include detailed descriptions of aspects such as the theme, purpose, data range, time span of the data, specific indicator or parameter requirements, and the audience group of the report.

[0024] Exemplarily, in a laboratory scenario, the target information may include: specific experimental project or research field requirements, such as the report requirements for a certain new drug R & D experiment, involving data on drug concentration monitoring, experimental animal reactions, etc. Time range requirements, such as generating experimental data reports for the past week, month, or a specific time period. Data type requirements, specifying specific types of data, such as experimental temperature, pressure, chemical composition analysis results, etc. Report format requirements, which may include specific display form requirements such as tables, bar charts, line charts, etc. User role specific requirements, different laboratory personnel, such as researchers, managers, technicians, etc., have different report requirements.

[0025] Exemplarily, in a biological laboratory, the target information may be "generate a data report on the temperature, humidity, and cell growth rate of cell culture experiments in the past month, and display the cell growth rate in different time periods in a bar chart".

[0026] In this embodiment, the target data query statement is a specific query language expression used to retrieve the required data from a specific data storage source (such as a database, data warehouse, etc.) according to the generation requirement information in the target information. In customized report generation, Structured Query Language (SQL) statements can be used to implement it.

[0027] The target data query statement may include specifying the data source, filtering conditions, sorting methods, and associated queries, etc., to ensure accurately obtaining the data set that meets the report generation requirements.

[0028] Among them, specifying the data source means clearly obtaining data from which database, data table, or data storage location. Filtering conditions can be set according to requirements such as the time range and data type in the target information to obtain a specific subset of data. If it is necessary to display data in a specific order, sorting instructions can be included. Correlated query means that if data is scattered in multiple data tables, correlated queries can be performed to obtain the complete data set.

[0029] Exemplarily, if the target information is: "Generate a temperature and pressure data report for a certain experimental project within a specific time period", then the target data query statement is generated as follows:

[0030] "SELECT temperature, pressure

[0031] FROM lab_data

[0032] WHERE experiment_project = 'Specific experimental project name' AND measurement_time BETWEEN 'Start time' AND 'End time'; "

[0033] In this embodiment, the target report generation statement is an instruction set for generating the final report based on the retrieved data. The target report generation statement can include operations such as data processing, formatting, and chart generation.

[0034] Exemplarily, if the target information requires displaying the reagent usage under different experimental conditions in a bar chart, the target report generation statement may include the following steps: First, use the data query statement to obtain the reagent usage data. Then, use functions in the report generation tool or programming language to process and group the data. Finally, call the chart drawing function to generate a bar chart and set the format such as the title and axis labels of the chart.

[0035] S102: Determine the target data set from the target data warehouse according to the target data query statement, and the target data set includes the data for generating the target report.

[0036] In this embodiment, the target data set is a data set filtered from the target data warehouse for generating a specific target report. The target data set contains all relevant data that meets the requirements for generating the target report and is the basis for constructing the target report.

[0037] Exemplarily, the target data set can be divided into multiple data type sets, such as numerical data sets, text data sets, and date-time data sets. Among them, the numerical data set can include specific numerical data such as temperature, pressure, and concentration in the experiment, which can be used to generate statistical charts or perform data analysis. The text data set can include descriptive texts, experimental conclusions, etc. in the experimental records, which can be used to generate the text content in the report. The date-time data set can include the time information for recording the experiment, which can be used to filter and analyze data according to the time dimension and generate time series reports.

[0038] In this embodiment, the target data query statement can be used as a filter to accurately screen out the data that meets specific conditions from the huge target data warehouse. Execute the target data query statement to extract the target data set from the data warehouse. The target data set can include various data required to generate the target report, such as experimental parameters, result data, time information, etc. Finally, generate the target report based on these data and intuitively display the data through different presentation methods (such as tables, charts, etc.) to meet the user's needs for specific information.

[0039] Exemplarily, in a biological laboratory, a report on cell culture experiments within a specific time period needs to be generated. The requirement for the target report is to show the change in the number of cells under different culture conditions. Construct the target data query statement, for example: "SELECT culture_condition, cell_count, observation_time FROM cell_culture_data WHERE observation_time BETWEEN ' start time ' AND ' end time '". Execute the target data query statement to obtain the target data set from the data warehouse, including data such as culture conditions, cell counts, and observation times. Finally, use a report generation tool to generate a data display table and display the data in the form of a line chart in the report. The abscissa is the observation time, the ordinate is the cell count, and different lines represent different culture conditions, intuitively reflecting the growth changes of cells under different conditions. The analysis results of the data can also be generated at the end of this report.

[0040] S103: Process the target data set according to the target report generation statement to obtain the target report.

[0041] In this embodiment, process this specific data set according to the target report generation statement. The processing process can include operations such as data screening, sorting, aggregation, calculation, etc., as well as selecting appropriate chart types and format settings, and finally generate the target report that meets specific requirements.

[0042] Exemplarily, determine the specific content of the target report generation statement and select appropriate data analysis tools and report generation tools. For example, programming languages such as Python can be used in combination with data analysis libraries (such as Pandas) to process data, and report generation libraries (such as Matplotlib or Seaborn) to visualize data.

[0043] Execute the target report generation statement and perform various operations on the target data set. For example, filter data according to specific conditions, calculate statistics such as averages and sums, and group the data for better presentation.

[0044] Select appropriate chart types and formats according to the requirements of the report, such as bar charts, line charts, tables, etc., and set formats such as titles, axis labels, colors, etc.

[0045] As can be seen from the above, in this embodiment, by intelligently responding to target information, accurately matching the data query and report generation requirements needed by users, the flexibility and personalization degree of report generation are improved. At the same time, directly extracting key data sets from the target data warehouse ensures the accuracy and timeliness of the data, providing a solid data foundation for decision-making. In addition, automatically processing the target data set and quickly generating the target report not only saves labor costs but also significantly improves work efficiency.

[0046] Specifically, whether in a laboratory scenario or other fields, different users have specific requirements for the theme, purpose, data range, format, etc. of the report. This method can accurately respond to these requirements and provide reports that meet the needs of personnel in different roles such as researchers, managers, and technicians, greatly improving the practicality and pertinence of the report.

[0047] Through the target data query statement, the required data can be quickly screened out from the huge data warehouse, avoiding the processing of irrelevant data and saving time and computing resources. At the same time, operations such as clearly specifying the data source and setting filtering conditions ensure the accuracy and integrity of the data. [[ID= 17]]

[0048] The target report generation statement can perform various processing operations on the target data set, such as data filtering, aggregation, calculation, etc., making the data more valuable. And appropriate chart types and formats can be selected for visualization according to the requirements, enabling users to more intuitively understand the data. For example, showing the cell growth rate as a line chart in a biological laboratory helps to quickly discover trends and patterns in the data.

[0049] Customized report generation provides users with accurate and timely information, reducing the time for users to manually organize data and create reports, enabling them to focus more on core business and decision-making, and providing strong support for laboratory research and management.

[0050] In one embodiment of the present disclosure, determining the target data query statement and the target report generation statement corresponding to the target information includes:

[0051] Input the target information into the large language model to determine multiple data query features and multiple report generation features.

[0052] Match the multiple data query features with the first mapping database to determine the target data query statement.

[0053] Match the multiple report generation features with the second mapping database to determine the target report generation statement.

[0054] Among them, the first mapping database includes multiple standard data query features and the data query statements corresponding to each standard data query feature, and the second mapping database includes multiple standard report generation features and the report generation statements corresponding to each standard report generation feature.

[0055] In this embodiment, the standard data query features and the standard report generation features can be determined according to historical queries and historical report generation information. After each report is generated, store the corresponding data query features, report generation features, and the corresponding data query statements and report generation statements. Use the stored data query features and report generation features as the standard data query features and the standard report generation features respectively.

[0056] In this embodiment, the large language model is an artificial intelligence language processing model based on deep learning technology. By training on a large amount of text data, the large language model can learn rich language knowledge and semantic representations. It can understand the meaning of natural language input, including complex sentence structures, polysemy of vocabulary, and context relationships, etc.

[0057] Exemplarily, for laboratory report generation, text in related fields such as scientific research literature, experimental reports, and technical manuals can be collected for training to obtain a large language model, enabling it to accurately extract features from the input target information. Establish the first mapping database and the second mapping database respectively, organize multiple standard data query features and their corresponding data query statements, as well as standard report generation features and their corresponding report generation statements. Input the target information into the large language model to obtain multiple data query features and report generation features. Perform feature matching in the mapping database to determine the target data query statement and the target report generation statement.

[0058] In this embodiment, the first mapping database can store a database of standard features related to data queries and corresponding query statements. Its purpose is to quickly determine accurate data query statements based on the input specific data query features. The second mapping database can store a database of standard report generation features and corresponding report generation statements, aiming to generate report statements that meet the requirements based on the input report generation features.

[0059] Exemplarily, the standard data query features are abstract descriptions of specific data query requirements, used to match data query statements. For example, specific experimental project features ("drug research and development experimental data query"), specific time range features ("data query in the past month"), specific data metric features ("temperature data query"), etc. The standard report generation features are abstract descriptions of report generation requirements, used to determine report generation statements. For example, specific chart form features ("display in a bar chart"), specific data sorting features ("generate a data report sorted in ascending order by time"), specific data filtering features ("generate a report that only shows experimental success data"), etc.

[0060] Exemplarily, in a chemical laboratory, the target information is "generate a report on the usage amounts of various reagents in a specific chemical experiment in the past month, and display the usage differences of different reagents in a bar chart". The large language model extracts data query features such as "in the past month", "specific chemical experiment", "reagent usage amount", etc., and report generation features such as "bar chart", "compare different reagents", etc. from this target information. After matching with the first mapping database, the target data query statement is determined to be to filter out the data of reagent usage amounts in the past month from the data table of the specific experiment. After matching with the second mapping database, the target report generation statement is determined to be to use a report tool to generate a bar chart to compare and display the usage amounts of different reagents.

[0061] This embodiment realizes the automatic conversion from target information to data query statements and report generation statements by combining a large language model and a mapping database. This method not only improves the efficiency of data processing and report generation, but also ensures the accuracy and consistency of queries and reports. Through the in-depth understanding of natural language input by the large language model, it can capture complex data query and report generation requirements, and quickly match the corresponding query and report statements through the mapping database, so as to meet diverse data processing and report generation requirements.

[0062] In an embodiment of the present disclosure, matching multiple data query features with the first mapping database to determine a target data query statement includes:

[0063] Calculating the similarity between the first data query feature and each standard data query feature in the first mapping database. The first data query feature is a feature among the multiple data query features.

[0064] Adjust the standard query statement corresponding to the second data query feature to obtain the data query statement corresponding to the first data query feature. The second data query feature is the standard data query feature whose similarity to the first data query feature is greater than the first similarity.

[0065] Integrate the data query statements corresponding to each first data query feature to obtain the target data query statement.

[0066] In this embodiment, the similarity can be calculated based on semantic understanding and keyword matching. For example, methods such as word vector representation and cosine similarity calculation in natural language processing technology can be used to convert the first data query feature and the standard data query feature into vector representations, and then calculate the cosine similarity between them.

[0067] In this embodiment, calculating the similarity between the first data query feature and each standard data query feature in the first mapping database includes:

[0068] In response to the first data query feature belonging to a numeric attribute, calculate the similarity between the first data query feature and multiple numeric standard data query features in the first mapping database based on the first formula.

[0069] The first formula is:

[0070] umeric( , ) =

[0071] Wherein, umeric( , ) represents and 's similarity, represents the x-th first data query feature, represents the o-th standard data query feature, represents the q-th attribute value of the x-th first data query feature, o represents the o-th standard data query feature in the first mapping database, represents the q-th attribute value of the o-th standard data query feature, n represents the total number of attribute values of the o-th standard data query feature, represents a fixed constant.

[0072] In response to the first data query feature belonging to a text attribute, calculate the similarity between the first data query feature and multiple text standard data query features in the first mapping database based on word vector similarity.

[0073] In this embodiment, the standard query statement corresponding to the second data query feature is adjusted, including: when the first data query feature is similar to the standard data query feature, extracting the difference features between the two, determining the adjustment content based on the types of the difference features, and adjusting the standard query statement.

[0074] Exemplarily, if the difference feature is the different time ranges, that is, the type of the difference feature is the time range, the time filtering condition in the query statement can be adjusted. If the difference feature is the different data types, the data fields to be queried can be adjusted. For example, in a physics laboratory, the first data query feature can be combined as "query the operation data of a specific instrument under high-temperature conditions in the past week", which is similar to a standard data query feature combination "query the operation data of a specific instrument in the past month". The extracted difference features are the time range and the operation conditions. According to the difference features, the time range in the standard query statement is adjusted from "the past month" to "the past week", and the filtering condition for high-temperature conditions is added, so as to obtain a query statement that meets the requirements of the first data query feature.

[0075] Exemplarily, it is assumed that the data in the physics laboratory is stored in a table named lab_data, and the table has fields instrument_id (instrument number), data_time (data time), temperature (temperature), and running_data (operation data). The standard query statement corresponding to the standard data query feature is as follows:

[0076] SELECT running_data

[0077] FROM lab_data

[0078] WHERE instrument_id = 'Specific instrument number' AND data_time BETWEEN DATE_SUB(NOW(), INTERVAL 1 MONTH) AND NOW();

[0079] The query statement adjusted according to the difference features is:

[0080] SELECT running_data

[0081] FROM lab_data

[0082] WHERE instrument_id = 'Specific instrument number' AND data_time BETWEEN DATE_SUB(NOW(), INTERVAL 1 WEEK) AND NOW() AND temperature > 'High temperature threshold';

[0083] In this embodiment, the first similarity is dynamically changing. Different similarity thresholds can be set based on experience for experiments to compare the accuracy and efficiency of the generated target data query statements under different thresholds. The optimal similarity threshold is selected as the initial similarity threshold according to the experimental results. On this basis, the similarity threshold is dynamically adjusted based on the initial similarity threshold and changes in data distribution, data type, or data volume in the data warehouse to obtain the first similarity.

[0084] Exemplarily, if there are changes in the data distribution, data type, or data volume in the data warehouse, it will affect the judgment of similarity. For example, if there are more special cases or new data features in the new data, the first similarity can be reduced to adapt to this change and ensure that a more appropriate standard query statement can be found for adjustment. The data can be analyzed regularly to evaluate the impact of changes in data features on the judgment of the first similarity and adjust the first similarity accordingly.

[0085] This embodiment realizes the automatic parsing and generation of complex data query requirements through the matching of data query features and the mapping database. This embodiment not only improves the query efficiency but also reduces the risk of human errors. Through precise matching and semantic understanding, query statements closer to the user's needs can be generated, providing a more convenient and efficient data query experience for users. At the same time, the adjustment strategy based on differential features further ensures the accuracy and practicality of the query results, adjusts some corresponding contents on the basis of the existing data query statements, and reduces the consumption of computing resources and waste of time cost for regenerating data query statements.

[0086] This embodiment can flexibly respond to changes in the data warehouse by setting an initial threshold and dynamically adjusting the first similarity, improving the accuracy and efficiency of data queries.

[0087] In an embodiment of the present disclosure, matching multiple report generation features with a second mapping database to determine a target report generation statement includes:

[0088] Calculating the similarity between the first report generation feature and each standard report generation feature in the second mapping database. The first report generation feature is a feature among the multiple report generation features.

[0089] Adjust the standard generation statement corresponding to the second report generation feature to obtain the report generation statement corresponding to the first report generation feature. The second report generation feature is a standard report generation feature whose similarity to the first report generation feature is greater than the second similarity.

[0090] Integrate the report generation statements corresponding to each first report generation feature to obtain the target report generation statement.

[0091] In this embodiment, various methods can be used for similarity calculation, such as keyword matching, semantic understanding, etc. For example, convert the first report generation feature and the standard report generation feature into vector representations and calculate the cosine similarity between the vectors.

[0092] In this embodiment, calculating the similarity between the first report generation feature and each standard report generation feature in the second mapping database includes:

[0093] Calculate the similarity between the first report generation feature and each standard report generation feature in the second mapping database based on word vector similarity.

[0094] In this embodiment, analyze the differences between the first report generation feature and the second report generation feature, and modify the standard generation statement according to the differences. For example, if the first report generation feature requires a specific chart color and this setting is not in the standard generation statement, the corresponding color setting code can be added.

[0095] In this embodiment, statement integration can be achieved through string concatenation, code merging, etc., to combine the adjusted report generation statements to ensure that the generated report meets all the requirements of the report generation features.

[0096] Exemplarily, in a chemical laboratory, the goal is to generate a report for a specific experiment. One of the report generation features is "display the experimental result data in a red bar chart". First, calculate the similarity between this feature and the standard report generation features in the second mapping database. Suppose a standard report generation feature "display the data in a bar chart" is found to have a relatively high similarity (greater than the second similarity threshold). Adjust the standard generation statement corresponding to this standard report generation feature and add the red setting code. Similar processing is also performed for other report generation features. Finally, integrate the adjusted report generation statements to generate the target report generation statement, thereby generating a red bar chart experimental result report that meets the requirements.

[0097] In this embodiment, by combining exact matching and flexible adjustment, statement generation statements that meet specific requirements are automatically generated. By calculating the similarity, the closest standard statement generation statement can be accurately found, reducing repetitive labor. At the same time, the statement is adjusted according to the feature differences to ensure that the report meets all personalized requirements. This method improves the efficiency and quality of report generation and is particularly applicable to scenarios with complex and changing report requirements.

[0098] In one embodiment of the present disclosure, determining a target data set from a target data warehouse according to a target data query statement includes:

[0099] The target data warehouse includes a first data warehouse and a second data warehouse. The first data warehouse includes a plurality of first data tables, and the second data includes a plurality of second data tables. The priority of the plurality of first data tables is higher than the priority of the plurality of second data tables.

[0100] Determine the target data table based on the target data query statement.

[0101] In response to the target data table being a first data table, determine the target data set from the first data warehouse according to the target data query statement.

[0102] In response to the target data table being a second data table, determine the target data set from the second data warehouse according to the target data query statement.

[0103] In this embodiment, according to the access popularity of the target data query statement, it is allocated to different data warehouses for data extraction. The access popularity reflects the frequency and importance of the query. By reasonably allocating resources, the efficiency and accuracy of data extraction can be improved.

[0104] In this embodiment, the storage space and the number of stored data tables of the first data warehouse are both smaller than those of the second data warehouse, and the data update frequency and data query speed of the first data warehouse are both greater than those of the second data warehouse. The priority of the data table represents the importance of the data. The access popularity reflects the frequency and importance of the target data query statement being used.

[0105] In this embodiment, analyze the target data query statement, find out the data table information involved therein, so as to determine whether the target data table belongs to the first data warehouse or the second data warehouse. According to the attribution of the target data table, use the target data query statement to extract data from the corresponding data warehouse, and integrate the extracted data into the target data set.

[0106] Exemplarily, in a data analysis system of an enterprise, the first data warehouse stores multiple first data tables of core business data, which have high requirements for real-time performance and accuracy and high priority. The second data warehouse stores multiple second data tables of some auxiliary data. When making important business decision analyses, if the target data query statement involves the first data tables, data is quickly extracted from the first data warehouse to ensure the timeliness and accuracy of the data. When conducting some general data analyses, if the target data query statement involves the second data tables, data is extracted from the second data warehouse to meet the analysis requirements while reasonably allocating resources.

[0107] In this embodiment, the data in the target data warehouse may include manually imported data information. For example, an Excel spreadsheet or a Word document storing data information is imported into the target data warehouse. The data in the target data warehouse may also include data information obtained from relevant devices. For example, data is exported from a device interface, or data information is obtained through wireless communication.

[0108] According to the requirements for generating laboratory reports, a suitable data table structure can be designed to store device data. For example, a table containing fields such as device number, timestamp, and data value can be created. Using a database connection library or tool, the collected data is written into the target data warehouse. The collected data can be preliminarily processed, such as parsing the data format, converting the data type, and removing noise, etc., to ensure that the collected data meets the storage requirements of the data warehouse. A regular data cleaning strategy can be set to delete expired or unnecessary data to keep the data warehouse running efficiently.

[0109] In this embodiment, by allocating the target data query statement to different data warehouses for data extraction according to its access popularity, the efficiency and accuracy of data extraction are effectively improved. At the same time, by reasonably setting the priority and storage space of the data warehouse, the real-time performance and accuracy of core business data are ensured, and resources are reasonably allocated. In addition, this embodiment also supports importing data from multiple data sources and provides data preprocessing and regular cleaning strategies, further enhancing the practicality and efficiency of the data warehouse.

[0110] In an embodiment of the present disclosure, the customized future report generation method further includes: updating the data in the first data warehouse based on a first frequency.

[0111] Updating the data in the second data warehouse based on a second frequency. The first frequency is greater than the second frequency.

[0112] In this embodiment, different data warehouses are updated with different step frequencies according to the importance and usage frequency of the data. The data in the first data warehouse is more important or has a higher usage frequency, so a higher first step frequency is adopted for updating to ensure the timeliness and accuracy of the data. The data in the second data warehouse is relatively less important or has a lower usage frequency, and a lower second step frequency is adopted for updating to balance the cost and benefit of data update.

[0113] Exemplarily, the first step frequency is greater than the second step frequency. For example, the first step frequency can be set to update once per hour, while the second step frequency can be set to update once per day. The data update operation can include determining the corresponding data sources according to the data tables in the corresponding data warehouse, and the data sources can include multiple devices. When the data update time arrives, an access signal can be sent to the corresponding device, and after the device passes the verification, the corresponding data can be transmitted to the corresponding data warehouse for storage. During the data update process, if an error or abnormal situation occurs, the system will perform corresponding error handling and record the log information for subsequent troubleshooting and repair.

[0114] Exemplarily, in a financial institution, the first data warehouse stores key data such as real-time transaction data and customer account information, and these data need to be updated in a timely manner to support real-time transaction monitoring and risk assessment. Therefore, the first step frequency is adopted to update the first data warehouse once per hour. The second data warehouse stores data such as historical transaction records and customer credit ratings, and the update frequency of these data is relatively low. The second step frequency can be adopted to update once per day.

[0115] This embodiment significantly improves the data processing efficiency and the quality of report generation through a differentiated update strategy. For high-frequency and important data, high-frequency updates are adopted to ensure real-time performance. For low-frequency and less important data, low-frequency updates are used to save costs. This strategy not only ensures the timeliness and accuracy of key data but also optimizes resource allocation and achieves the best balance between cost and benefit.

[0116] In an embodiment of the present disclosure, the customized future report generation method further includes: calculating the access heat of multiple first data tables and multiple second data tables based on historical data query statements.

[0117] If the access heat of the data table is greater than or equal to the first heat, the future update data of the corresponding data table is stored in the first data warehouse.

[0118] If the access heat is less than the first heat, the future update data of the corresponding data table is stored in the second data warehouse.

[0119] In this embodiment, all query statements in the past period are recorded, and the collected historical data query statements are analyzed. Factors such as the total number of times each data table is queried, the query frequency, and the user roles that issue query requests are statistically analyzed, and the access heat of each data table is comprehensively calculated.

[0120] = + +

[0121] Among them, H( ) represents the access heat of the i-th data table, represents the i-th data table, N represents the total number of times of querying the data table , represents the total number of times of querying the target data warehouse, M represents of the query frequency, represents the query frequency of the target data warehouse, represents the user role of the j-th query of the data table , represents the user role corresponding weight, , respectively represent different weight coefficients.

[0122] Exemplarily, in a financial institution, there are multiple data tables for storing data such as customer information and transaction records. By analyzing historical data query statements, it is found that the access heat of the customer basic information table and the recent transaction record table is relatively high, greater than the first heat. Therefore, the future updated data of these two data tables are stored in the first data warehouse for quick query and analysis. While the access heat of some historical transaction summary tables is relatively low, less than the first heat, then their future updated data are stored in the second data warehouse.

[0123] This embodiment realizes the refined management and storage of data by distinguishing the access heat of data tables. This method is based on the analysis of historical data query statements, stores data tables with high access heat in the high-performance first data warehouse to ensure fast response and efficient query. At the same time, data tables with low access heat are stored in the second data warehouse, effectively utilizing storage resources and computing resources.

[0124] Corresponding to the customized future report generation method in the above embodiment, Figure 2 is the structural block diagram of the customized future report generation system provided by an embodiment of the present disclosure. For the sake of illustration, only parts related to the embodiments of the present disclosure are shown. Referring to Figure 2 , the customized future report generation system 20 includes:

[0125] A calculation module, configured to determine a target data query statement and a target report generation statement corresponding to the target information in response to receiving the target information. The target information includes the generation requirement information of the target report.

[0126] A data acquisition module, configured to determine a target data set from the target data warehouse according to the target data query statement, where the target data set includes the data for generating the target report.

[0127] A report generation module, configured to process the target data set according to the target report generation statement to obtain the target report.

[0128] In an embodiment of the present disclosure, the calculation module is specifically configured to input the target information into a large language model to determine a plurality of data query features and a plurality of report generation features.

[0129] Match the plurality of data query features with a first mapping database to determine the target data query statement.

[0130] Match the plurality of report generation features with a second mapping database to determine the target report generation statement.

[0131] Wherein, the first mapping database includes a plurality of standard data query features and the data query statements corresponding to each standard data query feature, and the second mapping database includes a plurality of standard report generation features and the report generation statements corresponding to each standard report generation feature.

[0132] In an embodiment of the present disclosure, the calculation module is specifically further configured to calculate the similarity between a first data query feature and each standard data query feature in the first mapping database. The first data query feature is a feature among the plurality of data query features.

[0133] Adjust the standard query statement corresponding to the second data query feature to obtain the data query statement corresponding to the first data query feature. The second data query feature is a standard data query feature whose similarity to the first data query feature is greater than the first similarity.

[0134] Integrate the data query statements corresponding to each first data query feature to obtain the target data query statement.

[0135] In an embodiment of the present disclosure, the calculation module is specifically further configured to calculate the similarity between a first report generation feature and each standard report generation feature in the second mapping database. The first report generation feature is a feature among the plurality of report generation features.

[0136] Adjust the standard generation statement corresponding to the second report generation feature to obtain the report generation statement corresponding to the first report generation feature. The second report generation feature is a standard report generation feature whose similarity to the first report generation feature is greater than the second similarity.

[0137] Integrate the report generation statements corresponding to each first report generation feature to obtain the target report generation statement.

[0138] In an embodiment of the present disclosure, the data acquisition module is specifically used for the target data warehouse including a first data warehouse and a second data warehouse. The first data warehouse includes multiple first data tables, and the second data includes multiple second data tables. The priority of the multiple first data tables is higher than that of the multiple second data tables.

[0139] Determine the target data table based on the target data query statement.

[0140] In response to the target data table being a first data table, determine the target data set from the first data warehouse according to the target data query statement.

[0141] In response to the target data table being a second data table, determine the target data set from the second data warehouse according to the target data query statement.

[0142] In an embodiment of the present disclosure, the customized future report generation system 20 further includes:

[0143] The data update module is used to update the data in the first data warehouse based on the first frequency.

[0144] Update the data in the second data warehouse based on the second frequency. The first frequency is greater than the second frequency.

[0145] In an embodiment of the present disclosure, the customized future report generation system 20 further includes:

[0146] The data import module is used to calculate the access heat of the multiple first data tables and the multiple second data tables based on the historical data query statement.

[0147] If the access heat of the data table is greater than or equal to the first heat, store the future update data of the corresponding data table in the first data warehouse.

[0148] If the access heat is less than the first heat, store the future update data of the corresponding data table in the second data warehouse.

[0149] See Figure 3 , Figure 3 is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. As Figure 3The electronic device 300 in the present embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303, and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store a computer program, and the computer program includes program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to call the program instructions to execute the functions of each module in the above system embodiments, for example Figure 2 the functions of the modules 21 to 23 shown.

[0150] It should be understood that in the embodiments of the present disclosure, the so-called processor 301 may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0151] The input device 302 may include a touchpad, a fingerprint acquisition sensor (for acquiring the fingerprint information and the direction information of the fingerprint of the user), a microphone, etc., and the output device 303 may include a display (such as an LCD), a speaker, etc.

[0152] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A part of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0153] In specific implementation, the processors 301, input devices 302, and output devices 303 described in the embodiments of the present disclosure may execute the implementation manners described in the first and second embodiments of the customized future report generation method provided by the embodiments of the present disclosure, and may also execute the implementation manner of the electronic device 300 described in the embodiments of the present disclosure, which will not be elaborated here.

[0154] In another embodiment of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, all or part of the processes in the methods of the above embodiments are implemented. It can also be completed by instructing related hardware through the computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0155] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.

[0156] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.

[0157] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described electronic devices and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0158] In several embodiments provided by this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces or units, and can also be electrical, mechanical or other forms of connection.

[0159] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.

[0160] In addition, each functional unit in various embodiments of the present disclosure can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0161] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A customized future report generation method, characterized in that, Including: In response to receiving the target information, input the target information into a large language model to determine a plurality of data query features and a plurality of report generation features; Match the plurality of data query features with a first mapping database to determine a target data query statement; Match the plurality of report generation features with a second mapping database to determine a target report generation statement; Wherein, the first mapping database includes a plurality of standard data query features and data query statements corresponding to each standard data query feature, and the second mapping database includes a plurality of standard report generation features and report generation statements corresponding to each standard report generation feature; the target information includes the generation requirement information of the target report; Determine a target data set from the target data warehouse according to the target data query statement, and the target data set includes data for generating the target report; Process the target data set according to the target report generation statement to obtain the target report; The matching the plurality of data query features with the first mapping database to determine the target data query statement includes: calculating the similarity between a first data query feature and each standard data query feature in the first mapping database; the first data query feature is a feature among the plurality of data query features; adjusting the standard query statement corresponding to a second data query feature to obtain the data query statement corresponding to the first data query feature; the second data query feature is a standard data query feature whose similarity with the first data query feature is greater than a first similarity; integrating the data query statements corresponding to each first data query feature to obtain the target data query statement; The matching the plurality of report generation features with the second mapping database to determine the target report generation statement includes: calculating the similarity between a first report generation feature and each standard report generation feature in the second mapping database; the first report generation feature is a feature among the plurality of report generation features; adjusting the standard generation statement corresponding to a second report generation feature to obtain the report generation statement corresponding to the first report generation feature; the second report generation feature is a standard report generation feature whose similarity with the first report generation feature is greater than a second similarity; integrating the report generation statements corresponding to each first report generation feature to obtain the target report generation statement.

2. The customized future report generation method according to claim 1, wherein The determining the target data set from the target data warehouse according to the target data query statement includes: The target data warehouse includes a first data warehouse and a second data warehouse, the first data warehouse includes a plurality of first data tables, and the second data includes a plurality of second data tables; the priority of the plurality of first data tables is higher than the priority of the plurality of second data tables; Determine the target data table based on the target data query statement; In response to the target data table being a first data table, determine the target data set from the first data warehouse according to the target data query statement; In response to the target data table being a second data table, determine the target data set from the second data warehouse according to the target data query statement.

3. The customized future report generation method according to claim 2, wherein Also including: Update the first data warehouse based on the first frequency; Update the second data warehouse based on the second frequency; The first frequency is greater than the second frequency.

4. The customized future report generation method according to claim 2, wherein, It further includes: Calculate the access heat of the multiple first data tables and the multiple second data tables based on the historical data query statement; If the access heat of the data table is greater than or equal to the first heat, store the future update data of the corresponding data table in the first data warehouse; If the access heat is less than the first heat, store the future update data of the corresponding data table in the second data warehouse.

5. A customized future report generation system, characterized in that, It includes: A calculation module, configured to, in response to receiving the target information, input the target information into the large language model to determine multiple data query features and multiple report generation features; Match the multiple data query features with the first mapping database to determine the target data query statement; match the multiple report generation features with the second mapping database to determine the target report generation statement; Wherein, the first mapping database includes multiple standard data query features and the data query statements corresponding to each standard data query feature, and the second mapping database includes multiple standard report generation features and the report generation statements corresponding to each standard report generation feature; the target information includes the generation requirement information of the target report; The calculation module is specifically configured to calculate the similarity between the first data query feature and each standard data query feature in the first mapping database; the first data query feature is a feature among the multiple data query features; adjust the standard query statement corresponding to the second data query feature to obtain the data query statement corresponding to the first data query feature; the second data query feature is a standard data query feature whose similarity with the first data query feature is greater than the first similarity; integrate the data query statements corresponding to each first data query feature to obtain the target data query statement; The calculation module is specifically further configured to calculate the similarity between the first report generation feature and each standard report generation feature in the second mapping database; the first report generation feature is a feature among the multiple report generation features; adjust the standard generation statement corresponding to the second report generation feature to obtain the report generation statement corresponding to the first report generation feature; the second report generation feature is a standard report generation feature whose similarity with the first report generation feature is greater than the second similarity; integrate the report generation statements corresponding to each first report generation feature to obtain the target report generation statement; A data acquisition module, configured to determine a target data set from the target data warehouse according to the target data query statement, and the target data set includes the data for generating the target report; A report generation module, configured to process the target data set according to the target report generation statement to obtain the target report.

6. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Report query method and device and storage medium

    CN109902100A

  • Database query based match engine

    US20180293319A1