Report generation method and device, equipment, storage medium and program product
By automatically generating report document templates, extracting and querying user data, and determining the chart display type based on data types and correlation rules, the problems of time-consuming and low-accuracy report generation in existing technologies are solved, and efficient and accurate report generation and abnormal change monitoring are achieved, assisting marketing operations.
Patent Information
- Application Number
- CN202510853637.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies for generating operational reports are time-consuming and inefficient, with low accuracy and reliability of reported data. They lack systematic monitoring of changes and attribution analysis, and are unable to effectively assist marketing operations.
By generating a report document template, extracting user data parameters and performing keyword extraction, using a pre-trained model to generate target query statements, querying the database to obtain target data, determining the chart display type based on data type and correlation rules, and automatically generating a report that includes data display and analysis.
It improves the timeliness and accuracy of report generation, enables timely grasp of dynamic information, and identifies potential problems through abnormal monitoring and attribution analysis, assisting merchants in making marketing recommendations and strategy formulation.
Smart Images

Figure CN120671654A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically to a report generation method, apparatus, device, storage medium, and program product. Background Art
[0002] In the financial sector, operational reports are crucial tools for supporting decision-making, monitoring business operations, and optimizing resource allocation. Merchant operations personnel, in their daily work, need to generate graphic reports documenting the breakdown of operational indicators based on their tasks. The current method for producing reports primarily relies on merchant operations personnel manually querying data from various system databases, filtering and cleaning it, creating charts, and ultimately compiling report documents. This report generation method is not only time-consuming and inefficient, but also suffers from relatively low data accuracy and reliability. Furthermore, the operational reports generated by this method primarily present existing data, lacking systematic monitoring of changes and attribution analysis, and thus providing limited support for financial institutions' marketing operations. Summary of the Invention
[0003] In view of the above problems, the present application provides a report generation method, apparatus, device, storage medium and program product.
[0004] According to the first aspect of the present application, a report generation method is provided, including: generating a report document template in response to obtaining user needs; extracting the user's data parameters in the report document template, and extracting keywords for the data parameters based on a preset semantic vector index; inputting the keywords into a pre-trained first model, and obtaining a target query statement; sending the target query statement and query command to a preset database, and obtaining target data; determining the chart display type of the target data based on the data type, data distribution and preset data correlation rules of the target data; according to the chart display type, adding the target data and the corresponding chart to the report document template in a fill-in-the-blank format to obtain a target report.
[0005] According to an embodiment of the present application, the semantic vector index is preset, and the preset process includes: according to user needs, a data table obtained from a preset database is added to the project data set, and the data table includes multiple basic fields; based on the basic fields in the data table, analysis indicators are generated; the analysis indicators and the project data set are separately configured with information, and converted into a semantic vector index.
[0006] According to an embodiment of the present application, the report generation method also includes: extracting monitoring indicators of the report document template; after querying the database, under the condition that the monitoring indicators are judged to be in an abnormal state based on the abnormal algorithm, the monitoring indicators are layered and decomposed and the abnormal factors are determined; based on the abnormal factors, prompt words are generated and sent to the pre-trained second model to obtain suggested text segments; and the suggested text segments are inserted into the target report.
[0007] According to an embodiment of the present application, in response to obtaining user needs, a report document template is generated, including: based on a pre-trained third model, splitting the outline input by the user, and generating corresponding content for each title to obtain a report document template; or based on a pre-trained fourth model, generating a report document template according to historical data.
[0008] According to an embodiment of the present application, the report generation method further includes: after obtaining the report document template, adjusting the structure of the report document template according to user feedback and regenerating it.
[0009] According to an embodiment of the present application, extracting the data parameters of the user in the report document template includes: obtaining the text information input by the user in the report document template; when there are display data parameters in the text information, directly extracting the display data parameters in the report document template; when there are implicit data parameters in the text information, based on the pre-trained fifth model, completing the text information according to the context history information and the text information input by the user to obtain the data parameters of the user in the report document template.
[0010] According to an embodiment of the present application, the database is preset, and the preset process includes: obtaining initial data from multiple data sources and preprocessing it; storing the preprocessed initial data through a distributed structure to obtain a database.
[0011] According to an embodiment of the present application, the report generation method further includes: obtaining the user's authorization to obtain user requirements; after obtaining the authorization, obtaining the user requirements.
[0012] The second aspect of the present application provides a report generation device, which includes: a report document template generation module, which is used to generate a report document template in response to obtaining user needs; a keyword extraction module, which is used to extract the user's data parameters in the report document template, and extract keywords from the data parameters based on a preset semantic vector index; a target query statement acquisition module, which is used to input keywords into a pre-trained first model and obtain a target query statement; a target data acquisition module, which is used to send a target query statement and a query command to a preset database and obtain target data; a chart display type determination module, which is used to determine the chart display type of the target data based on the data type, data distribution and preset data correlation rules of the target data; a target report generation module, which is used to add the target data and the corresponding chart to the report document template in a fill-in-the-blank format according to the chart display type to obtain a target report.
[0013] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0015] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0017] Figure 1 The following schematically illustrates an application scenario of the report generation method according to an embodiment of the present application;
[0018] Figure 2 The following schematically shows a flow chart of a report generation method according to an embodiment of the present application;
[0019] Figure 3 A flowchart of extracting user data parameters from a report document template according to an embodiment of the present application is schematically shown;
[0020] Figure 4 A flowchart schematically illustrates a semantic vector indexing preset process according to an embodiment of the present application;
[0021] Figure 5The following schematically shows a flow chart of abnormality monitoring according to an embodiment of the present application;
[0022] Figure 6 A structural block diagram of a report generating device according to an embodiment of the present application is schematically shown; and
[0023] Figure 7 A block diagram of an electronic device suitable for implementing a report generating method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0027] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0028] In the technical solution of this application, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided in the embodiments of the present application all provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0030] An embodiment of the present application provides a report generation method, including: generating a report document template in response to obtaining user needs; extracting user data parameters in the report document template, and extracting keywords for the data parameters based on a preset semantic vector index; inputting the keywords into a pre-trained first model, and obtaining a target query statement; sending the target query statement and query command to a preset database, and obtaining target data; determining a chart display type of the target data based on the data type, data distribution and preset data correlation rules of the target data; according to the chart display type, adding the target data and the corresponding chart to the report document template in a fill-in-the-blank format to obtain a target report.
[0031] Through the embodiments of this application, this method utilizes large language models and natural language processing technology to automatically generate reports. This method achieves efficient and accurate report generation through automatic extraction of user needs, keyword recognition, target data query, and intelligent analysis. This method not only improves the timeliness of data acquisition, ensuring that merchant operators can obtain dynamic information in a timely manner, but also identifies potential problems through abnormal monitoring indicator detection and factor analysis.
[0032] Figure 1 The application scenario diagram of the report generation method according to an embodiment of the present application is schematically shown.
[0033] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, and a server 105. A network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0034] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0035] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0036] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0037] It should be noted that the report generation method provided in the embodiment of the present application can generally be executed by the server 105. Accordingly, the report generation device provided in the embodiment of the present application can generally be set in the server 105. The report generation method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the report generation device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0039] The following will be based on Figure 1 The scene described by Figures 2 to 5 The report generation method according to the embodiment of the present application is described in detail.
[0040] According to the embodiments of the present application, in their daily work, the merchant operations personnel of financial institutions need to form graphic reports that record the indicator decomposition process based on the operational indicator tasks. The current method of issuing reports is mainly for merchant operations personnel to manually query data from the databases of various systems, screen and clean it, draw charts, and finally write report documents. This report generation method is not only time-consuming and has low overall efficiency, but also has relatively low accuracy and reliability of the reported data. In addition, the operational report generated by this report generation method is mainly based on the presentation of existing data, lacks systematic abnormal movement monitoring and attribution analysis, and cannot generate marketing suggestions and strategies for merchants, and cannot play much of an auxiliary role in the marketing operations of financial institutions. Therefore, the embodiment of the present application proposes a report generation method, and the report generation method is described in detail below.
[0041] Figure 2 The flowchart of the report generation method according to the embodiment of the present application is schematically shown.
[0042] like Figure 2 As shown, according to an embodiment of the present application, the report generating method specifically includes operations S210 to S260.
[0043] In operation S210 , in response to obtaining user requirements, a report document template is generated.
[0044] In an embodiment of the present application, before obtaining the user's needs, it is necessary to obtain the user's authorization to obtain the user's needs; after obtaining the user's authorization, the user's needs are obtained.
[0045] For example, before operation S210, a request for obtaining user input information may be sent to the user. If the user agrees or authorizes obtaining the user input information, operation S210 is performed.
[0046] In an embodiment of the present application, in response to obtaining user needs, a report document template is generated, including: based on a pre-trained third model, splitting the outline input by the user, and generating corresponding content for each title to obtain a report document template; or based on a pre-trained fourth model, generating a report document template according to historical data.
[0047] For example, various types of report templates can be created based on the user's actual needs. Users can customize the format, layout, and content of the template, including text, tables, charts, and other elements, through a graphical interface and a large language model input box. This can also be understood as allowing users to freely adjust the way the report template is displayed in a visual interface.
[0048] For example, when a user (i.e., a merchant operator at a financial institution) enters relevant demand information into an input box, this demand information can be an outline, which includes the article title, section headings, subheadings, and other information. After the user provides the outline, a pre-trained third model (i.e., a large language model) is used to split the outline according to its content. For each heading, a corresponding paragraph is generated to display the relevant content. The content can be displayed in various formats, including data field parameters, tables, and charts.
[0049] For example, a report document template can be generated based on a user-uploaded document. For example, if the document uploaded by the user has strict formatting restrictions, the pre-trained large language model will parse the document format and, based on the document content, prompt the user to add data fields, tables, and charts to appropriate sections to enrich the presentation, thus generating a report document template.
[0050] For example, when a user is unsure of the information to be included in a desired report document template, a pre-trained fourth model (i.e., a large language model) can be used to generate a report document template based on historical data. This can be understood as the pre-trained fourth model also generating new templates based on historical report document templates and recommending them to the user. After obtaining the report document template, the structure of the report document template can be adjusted and regenerated based on user feedback.
[0051] Furthermore, in the above embodiments, the generated report document template can be optimized according to the user's interaction.
[0052] For example, users can select a specific paragraph and ask the model to rewrite or expand on it. The model will then regenerate the paragraph based on context, title, and user prompts, adding more detail or background information to improve clarity and completeness. Users can also request style adjustments, such as converting technical terms into accessible language, polishing the content, and correcting grammatical errors.
[0053] For example, users can modify data field parameters, change the data time range, and filter dimensions through prompt words. They can also optimize the display content of tables and charts, such as adding new data columns to the table, adjusting icon colors, and label descriptions.
[0054] Through the embodiments of this application, this method achieves the automated generation of merchant operation reports through document template configuration based on a large language model. Users only need to enter key information or provide a document outline, and the system automatically generates a report containing data display and analysis content, reducing the time and effort of manual query, analysis, and report writing, while also improving the efficiency and accuracy of report generation. In addition, users can customize document templates to meet the personalized needs of different users. Users can flexibly adjust document content and presentation format to ensure that the generated report meets business requirements and audit standards.
[0055] In operation S220 , the user's data parameters in the report document template are extracted, and keywords are extracted from the data parameters based on a preset semantic vector index.
[0056] In operation S230 , the keyword is input into the pre-trained first model, and a target query sentence is obtained.
[0057] Figure 3 The flowchart of extracting user data parameters in a report document template according to an embodiment of the present application is schematically shown.
[0058] like Figure 3 As shown, according to an embodiment of the present application, the process of extracting user data parameters in the report document template specifically includes operations S310 to S330.
[0059] In operation S310 , text information input by a user in a report document template is acquired.
[0060] In operation S320 , when the display data parameter exists in the text information, the display data parameter in the report document template is directly extracted.
[0061] In operation S330 , when implicit data parameters exist in the text information, the text information is completed based on the pre-trained fifth model according to the context history information and the text information input by the user to obtain the user's data parameters in the report document template.
[0062] In an embodiment of the present application, before converting natural language to database language query based on a large language model, semantic understanding must first be performed to capture the user's input information in the document template to extract key elements.
[0063] Specifically, in the document template constructed in the above embodiment, there may be two forms that need to be converted from text to data. One is that the user directly and explicitly declares the data parameter field to be queried, for example, the user directly indicates the field name in the data table in the template; the other is the data parameter described by the user in a more vague way, which may include certain filtering conditions or implicit inferences with unclear semantics.
[0064] Furthermore, if explicit data parameters exist in the text, they are processed directly. For implicit data parameters, a pre-trained fifth model (a large language model) combines historical context with the current input to understand and determine the specific criteria and conditions. The text is then completed based on historical context and the user's input. Through multiple rounds of rewriting, the data parameters in the document are ultimately transformed into a complete question that incorporates the user's conditions and intent, ensuring the consistency and accuracy of subsequent queries.
[0065] Figure 4 The flowchart of the semantic vector indexing preset process according to an embodiment of the present application is schematically shown.
[0066] like Figure 4 As shown, according to an embodiment of the present application, the semantic vector index is preset, and the preset process specifically includes operations S410 to S430.
[0067] In operation S410, according to user requirements, a data table obtained from a preset database is added to the project data set, where the data table includes a plurality of basic fields.
[0068] For example, based on user needs, merchant-related data tables are obtained from a preset database and added to the project data set. The data table includes multiple basic fields, and the data set can be supplemented with table field dictionary enumeration values, field synonyms, professional terms, etc. based on actual usage needs.
[0069] It should be noted that in the embodiment of the present application, the database is preset, and the preset process includes: obtaining initial data from multiple data sources and preprocessing it; storing the preprocessed initial data through a distributed structure to obtain a database.
[0070] For example, merchant data can be collected from multiple data sources within financial institutions. After data collection, it undergoes further preprocessing, including data cleaning (removing duplicates, anomalies, and missing values), data conversion (format standardization, data type conversion), and data integration (data structuring). Preprocessed data typically includes merchant-related indicators and merchant dimensions. Indicators include transactional, financial, operational, and risk indicators, as well as their monthly and annual changes. Dimensions define merchant categories through different labels, such as active merchants, churned merchants, and risky merchants.
[0071] Furthermore, to store and manage pre-processed data and ensure data integrity, consistency, and efficient access performance, the embodiments of this application use a distributed database to store large amounts of structured data, partitioning the data based on key fields such as batch date to ensure that query operations can quickly locate the required data. At the same time, data access control and permission management are set to ensure that only authorized users can access and operate specific data, protecting data confidentiality and integrity.
[0072] Furthermore, metadata management is established to record the data structure, extreme definition, data update frequency and other information of each data source to facilitate data maintenance and use; involving data lifecycle management strategies, historical data is archived and cleaned to ensure the efficiency and economy of data storage.
[0073] In operation S420 , analysis indicators are generated based on basic fields in the data table.
[0074] Exemplarily, different types of analysis indicators are derived based on table fields. For example, the analysis indicators may include atomic indicators, derived indicators and composite indicators. Among them, atomic indicators are indicators that are filtered and processed based on the data fields in the data table using common aggregation functions and conditional screening. For example, the total transaction volume of merchants in a certain area on a certain day is obtained by filtering and summarizing the transaction volume of each merchant according to the region and date conditions. Derived indicators are indicators that are further processed based on atomic indicators, usually year-on-year, ranking, and proportion types of indicators. Such indicators generally do not appear directly in the data source table and need to be calculated by the user. Composite indicators are calculation formulas that can be edited by users. This type of indicator is generally suitable for more complex indicator calculation systems and needs to be obtained by using multiple source data fields or atomic indicators according to business rules.
[0075] In operation S430 , the analysis indicators and the project dataset are configured with information respectively and converted into semantic vector indexes.
[0076] Exemplarily, synonyms or data dictionary definitions and other information are added to the above analysis indicators and metadata fields, and finally converted into semantic vector indexes and transmitted to the semantic vector database built into the first model.
[0077] Based on the above embodiment, after extracting the user's data parameters from the report document template and extracting keywords from the data parameters based on the preset semantic vector index, the keywords are then input into the pre-trained first model (i.e., a large language model) to obtain the target query statement.
[0078] In operation S240 , a target query statement and a query command are sent to a preset database, and target data is obtained.
[0079] In an embodiment of the present application, a connection is made to the above-mentioned pre-set database, and a request for executing the generated target query statement is sent. After receiving the query request, the database executes the query operation according to the instructions of the target query statement and returns the query result, that is, obtains the target data.
[0080] Through the embodiments of the present application, a pre-trained large language model is used to convert keywords into query statements, and the latest target data is quickly obtained from the preset database, thereby improving the timeliness of data acquisition and ensuring that merchant operators can grasp dynamic information in a timely manner.
[0081] In operation S250 , a chart presentation type of the target data is determined based on the data type, data distribution, and preset data correlation rules of the target data.
[0082] In operation S260 , according to the chart display type, the target data and the corresponding chart are added to the report document template in a fill-in-the-blank format to obtain a target report.
[0083] In the embodiments of the present application, the target data generated by the target query statement is analyzed from three perspectives: data type (numeric, character, date, etc.), data distribution (value range, mean, standard deviation, etc.), and data correlation. Based on different data characteristics and distribution patterns, the most appropriate chart type is selected for display in combination with preset rules. For example, for single-column data, a bar chart can be selected; for multi-column data with one column being time, a line chart can be selected; for category-type percentage data, a pie chart, bar chart, etc. can be selected. It should be noted that the charts here are generated using a visualization tool, which supports user interaction with the chart and dynamically displays detailed chart information. Users can also adjust the chart type, style, and display content as needed.
[0084] Furthermore, according to the chart display type, data and charts are added to the document template in a fill-in-the-blank format, and finally a target report containing production data is generated.
[0085] Figure 5 The flowchart of abnormality monitoring according to an embodiment of the present application is schematically shown.
[0086] like Figure 5 As shown, according to an embodiment of the present application, the report generation method further includes abnormality monitoring, which is used to perform abnormality monitoring and attribution analysis on the generated target report. The abnormality monitoring process specifically includes operations S510 to S540.
[0087] In operation S510 , monitoring indicators of a report document template are extracted.
[0088] In operation S520, after querying the database, if it is determined based on the abnormality algorithm that the monitoring indicator is in an abnormal state, the monitoring indicator is layered and decomposed to determine the abnormality factor.
[0089] In operation S530 , based on the change factor, a prompt word is generated and sent to a pre-trained second model to obtain a suggested text segment.
[0090] In operation S540 , the suggested text segment is inserted into the target report.
[0091] In the embodiments of this application, to monitor and analyze anomalies in generated target reports, real-time monitoring and multi-level analysis of merchant operational data are performed to promptly identify potential issues and perform attribution analysis for anomalies. The system combines anomaly detection with early warning notifications to help users quickly understand and address anomalies in merchant operations. Furthermore, layered contribution analysis explains the underlying causes of anomalies.
[0092] For example, when configuring a document template, users can add indicator monitoring and customize the metrics they want to monitor. For example, these could include transaction volume, number of transactions, commission rebate, refund rate, and so on. It's important to note that normal ranges and warning thresholds can be set for each monitoring metric. Indicator thresholds can be configured in a hierarchical manner, with multiple thresholds for the same metric. Different levels of abnormality will trigger different levels of warnings. Warning thresholds can also be automatically adjusted based on historical data and trend analysis, improving the accuracy and reliability of warnings.
[0093] Furthermore, by querying database data and analyzing it using a time series prediction algorithm, the system determines whether the indicator exceeds the warning threshold and is experiencing an abnormal change. If an indicator shows an abnormal change, a warning is issued in the report, and the contribution of factors from different layers and dimensions to the indicator change is calculated to identify the most likely factor. Finally, this information, combined with relevant information such as economic trends, is combined into a prompt word. This is then fed into a pre-trained second model (a large language model) to generate a complete and reasonable paragraph explaining the abnormal change and providing business recommendations, which are then inserted into the target report.
[0094] Through the embodiments of this application, this report generation method not only helps users gain a deeper understanding of the impact of each dimension on overall indicators through multi-dimensional data decomposition and attribution analysis, providing anomaly monitoring, but also allows users to set multi-level thresholds for each monitoring indicator, triggering different levels of warnings when the threshold range is exceeded. The dynamic threshold adjustment function automatically adjusts the threshold based on historical data and trend analysis, improving the accuracy and reliability of indicator warnings.
[0095] Based on the above report generation method, this application also provides a report generation device. Figure 6The device is described in detail.
[0096] Figure 6 The structural block diagram of the report generating device according to an embodiment of the present application is schematically shown.
[0097] like Figure 6 As shown, the report generating device 600 of this embodiment includes a report document template generating module 610 , a keyword extracting module 620 , a target query statement acquiring module 630 , a target data acquiring module 640 , a chart display type determining module 650 and a target report generating module 660 .
[0098] The report document template generation module 610 is configured to generate a report document template in response to obtaining user requirements. In one embodiment, the report document template generation module 610 may be configured to perform the operation S210 described above, which will not be described in detail herein.
[0099] The keyword extraction module 620 is used to extract the user's data parameters in the report document template and extract keywords from the data parameters based on the preset semantic vector index. In one embodiment, the keyword extraction module 620 can be used to perform the operation S220 described above, which will not be repeated here.
[0100] The target query sentence acquisition module 630 is used to input the keywords into the pre-trained first model and obtain the target query sentence. In one embodiment, the target query sentence acquisition module 630 can be used to perform the operation S230 described above, which will not be repeated here.
[0101] The target data acquisition module 640 is used to send a target query statement and query command to a preset database and obtain target data. In one embodiment, the target data acquisition module 640 can be used to perform the operation S240 described above, which will not be repeated here.
[0102] The chart display type determination module 650 is configured to determine the chart display type of the target data based on the data type, data distribution, and preset data correlation rules of the target data. In one embodiment, the chart display type determination module 650 may be configured to perform the operation S250 described above, which will not be described in detail here.
[0103] The target report generation module 660 is used to add the target data and the corresponding chart to the report document template in a fill-in-the-blank format according to the chart display type to obtain the target report. In one embodiment, the target report generation module 660 can be used to perform the operation S260 described above, which will not be repeated here.
[0104] In an embodiment of the present application, the keyword extraction module 620 includes a data parameter extraction submodule, which includes a text information acquisition unit, a display data parameter extraction unit, and an implicit data parameter extraction unit.
[0105] The text information acquisition unit is configured to acquire the text information input by the user in the report document template. In one embodiment, the text information acquisition unit may be configured to execute the operation S310 described above, which will not be described in detail herein.
[0106] The display data parameter extraction unit is used to directly extract the display data parameters in the report document template when the display data parameters exist in the text information. In one embodiment, the display data parameter extraction unit can be used to perform the operation S320 described above, which will not be repeated here.
[0107] The implicit data parameter extraction unit is configured to, when implicit data parameters exist in the text information, complete the text information based on the pre-trained fifth model, context history information, and the text information input by the user, to obtain the user's data parameters in the report document template. In one embodiment, the implicit data parameter extraction unit can be configured to perform operation S330 described above, which will not be further described here.
[0108] In an embodiment of the present application, the keyword extraction module 620 further includes a semantic vector index preset submodule, which includes a data set establishment unit, an analysis index generation unit, and a semantic vector index generation unit.
[0109] The data set establishment unit is used to add a data table obtained from a preset database to the project data set according to user needs. The data table includes multiple basic fields. In one embodiment, the data set establishment unit can be used to perform the operation S410 described above, which will not be repeated here.
[0110] The analysis indicator generation unit is configured to generate analysis indicators based on the basic fields in the data table. In one embodiment, the analysis indicator generation unit may be configured to perform the operation S420 described above, which will not be described in detail here.
[0111] The semantic vector index generating unit is used to configure the analysis indicators and the project data set respectively and convert them into semantic vector indexes. In one embodiment, the semantic vector index generating unit can be used to perform the operation S430 described above, which will not be repeated here.
[0112] In an embodiment of the present application, the report generating device 600 of this embodiment further includes a change monitoring module, which includes a monitoring index extraction submodule, a change factor determination submodule, a suggested text determination submodule, and a text insertion submodule.
[0113] The monitoring indicator extraction submodule is used to extract the monitoring indicators of the report document template. In one embodiment, the monitoring indicator extraction submodule can be used to perform the operation S510 described above, which will not be repeated here.
[0114] The change factor determination submodule is configured to, after querying the database and, if the change algorithm determines that the monitored indicator is in a change state, perform a hierarchical decomposition of the monitored indicator and determine the change factor. In one embodiment, the change factor determination submodule can be used to perform operation S520 described above and will not be further described here.
[0115] The suggested text determination submodule is used to generate prompt words based on the change factor and send them to the pre-trained second model to obtain suggested text. In one embodiment, the suggested text determination submodule can be used to perform the operation S530 described above, which will not be repeated here.
[0116] The text segment insertion submodule is used to insert the suggested text segment into the target report. In one embodiment, the text segment insertion submodule can be used to perform the operation S540 described above, which will not be described in detail here.
[0117] According to an embodiment of the present application, any multiple modules among the report document template generation module 610, keyword extraction module 620, target query statement acquisition module 630, target data acquisition module 640, chart display type determination module 650, and target report generation module 660 can be combined into a single module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to an embodiment of the present application, at least one of the report document template generation module 610, keyword extraction module 620, target query statement acquisition module 630, target data acquisition module 640, chart display type determination module 650, and target report generation module 660 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable method of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the report document template generation module 610, the keyword extraction module 620, the target query statement acquisition module 630, the target data acquisition module 640, the chart display type determination module 650 and the target report generation module 660 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0118] Figure 7 A block diagram of an electronic device suitable for implementing a report generating method according to an embodiment of the present application is schematically shown.
[0119] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0120] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.
[0121] According to an embodiment of the present application, electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to bus 704. Electronic device 700 may also include one or more of the following components connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 710 as needed, so that computer programs read from the removable media can be installed into storage section 708 as needed.
[0122] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0123] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction change execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0124] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to enable the computer system to implement the report generation method provided in the embodiments of the present application.
[0125] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the computer program is executed by the processor 701. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0126] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0127] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0128] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] It will be understood by those skilled in the art that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0131] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A report generation method, characterized in that: The method comprises: Generate a report document template in response to obtaining user requirements; Extracting user data parameters from the report document template, and extracting keywords from the data parameters based on a preset semantic vector index; Input the keyword into the pre-trained first model and obtain a target query statement; Send the target query statement and query command to a preset database and obtain target data; Determining a chart display type for the target data based on the data type, data distribution, and preset data correlation rules of the target data; According to the chart display type, the target data and the corresponding chart are added to the report document template in a fill-in-the-blank format to obtain a target report.
2. The report generation method according to claim 1, characterized in that: The semantic vector index is preset, and the preset process includes: According to user needs, a data table obtained from the preset database is added to the project data set, wherein the data table includes multiple basic fields; Generate analysis indicators based on the basic fields in the data table; The analysis indicators and the project data set are respectively configured with information and converted into the semantic vector index.
3. The report generation method according to claim 1, wherein: The method further comprises: Extracting monitoring indicators of the report document template; After querying the database, if it is determined that the monitoring indicator is in an abnormal state based on the abnormality algorithm, the monitoring indicator is layered and decomposed to determine the abnormality factor; Based on the abnormal factors, a prompt word is generated and sent to a pre-trained second model to obtain a suggested text segment; The suggestion paragraph is inserted into the target report.
4. The report generation method according to claim 1, wherein: The step of generating a report document template in response to obtaining user requirements includes: Based on the pre-trained third model, the outline input by the user is split and corresponding content is generated for each title to obtain a report document template; or Based on the pre-trained fourth model, a report document template is generated according to historical data.
5. The report generation method according to claim 1 or 3, characterized in that: The method further comprises: After obtaining the report document template, the structure of the report document template is adjusted and regenerated according to user feedback.
6. The report generation method according to claim 1, characterized in that: The extracting of user data parameters from the report document template includes: Obtaining text information input by the user in the report document template; When the text information contains display data parameters, directly extracting the display data parameters in the report document template; When there are implicit data parameters in the text information, the text information is completed based on the pre-trained fifth model according to the context history information and the text information input by the user to obtain the user's data parameters in the report document template.
7. The report generation method according to claim 1 or 2, characterized in that: The database is preset, and the preset process includes: Obtain initial data from multiple data sources and perform preprocessing; The pre-processed initial data is stored in a distributed structure to obtain the database.
8. The report generation method according to claim 1, wherein: The method further comprises: Obtain user authorization to obtain user needs; After obtaining authorization, the user demand is obtained.
9. A report generating device, characterized in that: The device comprises: A report document template generation module, configured to generate a report document template in response to obtaining user requirements; A keyword extraction module, configured to extract the user's data parameters from the report document template and extract keywords from the data parameters based on a preset semantic vector index; A target query statement acquisition module is used to input the keywords into the pre-trained first model and obtain the target query statement; A target data acquisition module is used to send the target query statement and query command to a preset database and obtain the target data; a chart display type determination module, configured to determine a chart display type of the target data based on the data type, data distribution, and preset data correlation rules of the target data; The target report generating module is used to add the target data and the corresponding chart to the report document template in a fill-in-the-blank format according to the chart display type to obtain the target report.
10. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.