Knowledge graph-based report generation methods, devices, equipment, media, and products

By using a knowledge graph-based approach, the system receives report generation requests from terminal devices, performs natural language processing and entity retrieval, and generates standardized keyword requirements. This solves the problem of low matching between report generation and user needs in existing technologies, and achieves efficient and convenient report generation.

CN122086985APending Publication Date: 2026-05-26RICHFIT INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RICHFIT INFORMATION TECH
Filing Date
2024-11-25
Publication Date
2026-05-26

Smart Images

  • Figure CN122086985A_ABST
    Figure CN122086985A_ABST
Patent Text Reader

Abstract

This application provides a report generation method, apparatus, device, medium, and product based on a knowledge graph. The method includes: receiving a report generation request sent by a terminal device; processing the report generation request through natural language to obtain multiple keywords; performing entity retrieval in a pre-constructed knowledge graph based on the multiple keywords to obtain standardized multiple request keywords, wherein the knowledge graph stores various expressions of multiple different entities related to report generation; generating a target report and its analysis results using a pre-acquired report generation model based on the multiple request keywords; and returning the target report and its analysis results to the terminal device. This method aims to improve the user requirement matching degree of the generated report and enhance the convenience of report generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a method, apparatus, device, medium and product for generating reports based on knowledge graphs. Background Technology

[0002] With enterprise development and changes in the current economic situation, the importance of risk management in enterprises is constantly increasing. The most important task in risk management is the preparation and analysis of risk reports, which serve as a crucial basis for enterprises to conduct risk management work.

[0003] Existing risk reporting systems generally suffer from a low degree of mismatch between the generated risk management reports and user needs. Furthermore, if the generated reports do not meet user requirements, technical personnel must modify the SQL statements, resulting in a high barrier to entry for users who cannot quickly and effectively generate reports that meet their needs. Summary of the Invention

[0004] This application provides a knowledge graph-based report generation method, apparatus, device, medium, and product to improve the user demand matching degree of the generated reports and enhance the convenience of report generation.

[0005] In a first aspect, embodiments of this application provide a report generation method based on a knowledge graph, including:

[0006] Receive report generation requests from terminal devices;

[0007] The report was generated using natural language processing, yielding multiple keywords;

[0008] Based on multiple keywords, entity retrieval is performed in a pre-constructed knowledge graph to obtain standardized multiple requirement keywords. The knowledge graph stores multiple representations of different entities related to report generation.

[0009] Based on multiple requirement keywords, a target report and the analysis results of the target report are generated using a pre-acquired report generation model;

[0010] The target report and its analysis results are returned to the terminal device.

[0011] In one possible implementation, based on the plurality of requirement keywords, a target report and the analysis results of the target report are generated using a pre-acquired report generation model, including:

[0012] Based on multiple requirement keywords, determine the report type and data requirement information, which includes a time range and at least one indicator type.

[0013] Retrieve the report template corresponding to the report type;

[0014] Based on the data requirement information, retrieve the indicator data corresponding to at least one indicator type from the database;

[0015] Based on the report template and the indicator data corresponding to at least one indicator type, a report generation model is used to generate the target report and the analysis results of the target report.

[0016] In one possible implementation, the report type and data requirement information are determined based on the plurality of requirement keywords, including:

[0017] The report type and data requirement information are obtained by processing multiple requirement keywords using the BPE method and Abstract Syntax Tree (AST).

[0018] In one possible implementation, obtaining the report template corresponding to the report type includes:

[0019] Based on the report type, return at least one regular report template to the terminal device;

[0020] If the terminal device returns a selection result indicating that the user has selected any regular report template, then the regular report template will be used as the report template corresponding to the report type.

[0021] If the terminal device returns a selection result indicating that the user has not selected a regular report template, then a report template will be generated based on the report type and data requirements.

[0022] In one possible implementation, if the terminal device returns a selection result indicating that the user has selected any regular report template, and at the same time receives modification description information for the regular report template, then the regular report template is modified according to the modification description information to obtain the report template.

[0023] In one possible implementation, at least one indicator type of indicator data is retrieved from the database based on data requirement information, including:

[0024] Based on the time range and at least one indicator type, retrieve the indicator data corresponding to at least one indicator type from the database using SQL queries.

[0025] The database stores different indicator data corresponding to various indicator types, which are generated in advance based on at least one of business data, financial data, and external data.

[0026] Secondly, embodiments of this application provide a report generation apparatus based on a knowledge graph, comprising:

[0027] The receiving module is used to receive report generation requests sent by terminal devices;

[0028] The natural language processing module is used to generate requirements from natural language processing reports and obtain multiple keywords.

[0029] The knowledge graph module is used to perform entity retrieval in a pre-built knowledge graph based on multiple keywords, and obtain standardized multiple requirement keywords. The knowledge graph stores multiple representations of different entities related to report generation.

[0030] The generation module is used to generate target reports based on multiple requirement keywords and a pre-acquired report generation model.

[0031] The result return module is used to return the target report and the analysis results of the target report to the terminal device.

[0032] In one possible implementation, the generation module is specifically used for:

[0033] Based on multiple requirement keywords, determine the report type and data requirement information, which includes a time range and at least one indicator type.

[0034] Retrieve the report template corresponding to the report type;

[0035] Based on the data requirement information, retrieve the indicator data corresponding to at least one indicator type from the database;

[0036] Based on the report template and the indicator data corresponding to at least one indicator type, a report generation model is used to generate the target report and the analysis results of the target report.

[0037] In one possible implementation, the generation module is specifically used for:

[0038] The report type and data requirement information are obtained by processing multiple requirement keywords using the BPE method and Abstract Syntax Tree (AST).

[0039] In one possible implementation, the generation module is specifically used for:

[0040] Based on the report type, return at least one regular report template to the terminal device;

[0041] If the terminal device returns a selection result indicating that the user has selected any regular report template, then the regular report template will be used as the report template corresponding to the report type.

[0042] If the terminal device returns a selection result indicating that the user has not selected a regular report template, then a report template will be generated based on the report type and data requirements.

[0043] In one possible implementation, the report generation model is specifically used for:

[0044] Based on the time interval and at least one indicator type, the indicator data corresponding to the at least one indicator type is retrieved from the database by querying using SQL statements.

[0045] The database stores different indicator data corresponding to various indicator types, which are generated in advance based on at least one of business data, financial data, and external data.

[0046] In one possible implementation, the knowledge graph-based report generation apparatus provided in this application further includes:

[0047] Modification module: If the terminal device returns a selection result indicating that the user has selected any regular report template, and at the same time receives modification description information for the regular report template, the module modifies the regular report template according to the modification description information to obtain the report template.

[0048] Thirdly, embodiments of this application provide a report generation device based on a knowledge graph, including: a memory and a processor;

[0049] The memory stores computer-executed instructions;

[0050] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0051] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0052] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0053] The knowledge graph-based report generation method, apparatus, device, medium, and product provided in this application embodiment involve a server receiving a report generation request from a terminal device. The server processes the request using natural language to obtain multiple keywords. Based on these keywords, it performs entity retrieval in a pre-constructed knowledge graph storing various expressions of different entities related to report generation, resulting in standardized requirement keywords. Finally, based on these keywords, a pre-acquired report generation model is used to generate a target report and its analysis results, which are then returned to the terminal device. By performing entity retrieval in the knowledge graph using the keywords obtained through natural language processing and standardizing the various expressions of different entities, the accuracy of the server's understanding of user needs is improved, thereby enhancing the user-requirement matching degree of the generated report and improving the convenience of report generation. Attached Figure Description

[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0055] Figure 1 A schematic diagram illustrating a scenario for the knowledge graph-based report generation method provided in this application;

[0056] Figure 2 A flowchart illustrating the knowledge graph-based report generation method provided in this application;

[0057] Figure 3 A schematic diagram illustrating a specific embodiment of the knowledge graph-based report generation method provided in this application;

[0058] Figure 4 A schematic diagram of the structure of a knowledge graph-based report generation device according to a first embodiment of the present application;

[0059] Figure 5 A schematic diagram of the structure of Embodiment 2 of the knowledge graph-based report generation device provided in this application;

[0060] Figure 6 A schematic diagram of the structure of the knowledge graph-based report generation device provided in this application.

[0061] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0063] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail below.

[0064] With enterprise development and changes in the current economic situation, the importance of risk management in enterprises is constantly increasing. The most important task in risk management is the creation and analysis of risk reports, which serve as a crucial basis for enterprises' risk management efforts. Currently, there are two main types of risk report needs in the market, each with its corresponding creation method: one type is standardized, periodic risk reports, i.e., regular reports. These reports require fixed indicators and relatively fixed analytical language, and can be automatically generated by a report generation system; the other type is reports created on an ad-hoc basis according to specific needs. These reports do not have fixed risk indicators and analytical language, and are generally created manually.

[0065] In existing technologies, for standardized, periodic risk reports, when business personnel need to change the report format, technical personnel must modify the SQL statements before report generation can continue. For reports created temporarily based on special needs, when business personnel input their report generation requirements into the system, the system often fails to adequately understand these requirements, resulting in low user-requirement matching and poor report quality. Therefore, for the two current needs of risk reports, existing report generation methods suffer from low levels of intelligence leading to low user-requirement matching, high user barriers, and low ease of report generation.

[0066] Figure 1 A schematic diagram illustrating the scenario of the knowledge graph-based report generation method provided in this application, such as... Figure 1 As shown, the specific application scenarios of this application include: terminal device 101 and server 102, wherein the knowledge graph-based report generation method provided in this application is applied to server 102.

[0067] In this scenario, the user inputs a report generation requirement by operating the terminal device 101; the terminal device 101 sends the report generation requirement input by the user to the server 102; the server 102 performs the report generation method provided in this application on the received report generation requirement, and returns the generated report that meets the user's requirements and the report analysis results to the terminal device 101.

[0068] Based on the aforementioned technical background and application scenarios, the knowledge graph-based report generation method provided in this application reduces the interference of multiple expressions of the same entity and easily confused names among different entities on the semantic understanding of user needs by retrieving entities from multiple keywords processed by natural language in the knowledge graph. Entities may include indicators, time, report names, etc., solving the technical problem of low user need matching in existing report generation methods. Furthermore, in one embodiment, the knowledge graph-based report generation method provided in this application can directly modify code statements to generate reports that meet user needs, such as when a user needs to modify a regular report, thus lowering the barrier to entry for automatic report generation and improving the convenience of report generation.

[0069] It should be noted that the knowledge graph-based report generation method, apparatus, equipment, medium and product provided in this application are applicable to the field of artificial intelligence. Specifically, the method of this application can be used to generate various reports, including but not limited to risk management reports. This application does not limit the field of the generated reports.

[0070] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0071] Figure 2 The flowchart illustrating the knowledge graph-based report generation method provided in this application is as follows: Figure 2 As shown, the method includes:

[0072] S201, Receive report generation request sent by terminal device;

[0073] In this solution, if a report needs to be generated based on a report sent by a terminal, the data requirements for the report to be generated must first be determined, such as the required indicator type and the required time range. Then, the indicator data that meets the requirements is extracted from the database. Finally, the required report is generated based on the obtained indicator data, and the report data is analyzed to obtain the report analysis results. The terminal device can be an information input / output device such as a computer, mobile phone, or tablet, and this application does not limit it.

[0074] In this step, after the user inputs their report generation requirements on the terminal device, the terminal device sends these requirements to the server. The server receives the requirements, which are the user's description of the desired report. These requirements may include details such as the report name, indicator type, and time period. For example, a report generation requirement could be "Create a risk appetite report for this quarter" or "Create a report including last month's non-performing loan ratio and risk asset return rate."

[0075] It should be understood that a report may include one or more indicator types.

[0076] S202. Generate requirements through natural language processing reports to obtain multiple keywords;

[0077] In this step, the received report generation request needs to be processed using natural language processing. By extracting keywords, the user's needs can be organized to gain a preliminary understanding of the user's intent. Conventional natural language processing techniques can be used to extract keywords for report generation, such as word frequency statistics and word weight calculation.

[0078] It should be understood that the more specific the report generation requirements input by the user, the more keywords are obtained, which in turn makes the final target report more closely match the user's needs.

[0079] S203. Based on multiple keywords, perform entity retrieval in a pre-constructed knowledge graph to obtain standardized multiple requirement keywords, wherein the knowledge graph stores multiple different entities related to report generation in various forms.

[0080] In this step, firstly, for the extracted keywords, such as "last quarter" and "risk appetite," there might be situations where the corresponding indicator data exists in the database, but the inconsistency between the keywords and the entity names stored in the database prevents accurate extraction of the indicator data. To address this, this step searches the pre-built knowledge graph containing various representations of different entities related to report generation for the multiple keywords. The retrieved standard entity representations corresponding to the keywords yield standardized target keywords.

[0081] In one specific implementation, a pre-constructed knowledge graph stores multiple representations of various entities related to report generation. These entities may include indicator types, time periods, report names, etc. In this implementation, the knowledge graph stores multiple different names for the same indicator type, different representations of time, and multiple representations of the same report name. It should be understood that the entity representation may also include field names stored in the database corresponding to the entity; similarly, the multiple different names for an indicator type may include its stored field names in the database. Furthermore, the knowledge graph may also store easily confused names for different entities.

[0082] In one specific implementation, the knowledge graph also stores the connection relationships between various data tables in the database, which helps to locate the corresponding position of the required data in the database and improves the collection speed of the required indicator data.

[0083] S204. Based on multiple requirement keywords, use the pre-acquired report generation model to generate the target report and the analysis results of the target report;

[0084] In this step, a pre-acquired report generation model is used to perform text conversion and structured analysis on multiple acquired requirement keywords, clarifying the code execution logic, converting user requirements into code and executing it, ultimately generating the target report and its analysis results. The report generation model can be a commonly used report generation model in this field, such as the Barry Boehm Risk Management Model (Boehm) or a risk matrix model.

[0085] It should be understood that the report generation model is trained based on a pre-stored knowledge base. This knowledge base may include a list of common reports, common report templates and their corresponding code statements, instructions for using the templates, documentation on report analysis examples, common indicator types and examples of analysis for each indicator, and data selection constraints such as time intervals. Furthermore, based on the above training, the report generation model needs to undergo question-answering training, specifically training and correcting for various possible ambiguous names to improve the accuracy of the generated code. In addition, the trained report generation model can be further optimized, specifically by adjusting the model's matching accuracy parameters.

[0086] In one specific implementation, based on multiple requirement keywords, a target report and its analysis results are generated using a pre-acquired report generation model, including:

[0087] Step 1: Based on multiple requirement keywords, determine the report type and data requirement information. The data requirement information includes a time interval and at least one indicator type. For example, the report type can be a risk appetite report type, an accounts receivable report type, etc., which are not limited in this application. The time interval can be a quarter, a year, etc., and the setting of the time interval is determined according to the actual situation, which is not limited in this application. The indicator type can be risk asset return rate, net interest margin, non-performing loan ratio, etc., which are not limited in this application.

[0088] In one specific implementation, multiple requirement keywords are processed using the Byte Pair Encoding (BPE) method and the Abstract Syntax Tree (AST) to obtain report type and data requirement information. Specifically, the Byte Pair Encoding (BPE) method is used to obtain etymological tokens from multiple requirement keywords, and the Abstract Syntax Tree (AST) is used to define the logical structure of the code query, obtaining the report type and data requirement information needed when the code is actually executed, such as time range and at least one indicator type.

[0089] Step 2: Obtain the report template corresponding to the report type;

[0090] In one specific implementation, obtaining the report template corresponding to the report type includes: returning at least one regular report template to the terminal device according to the report type; if the terminal device returns a selection result indicating that the user has selected any regular report template, then the regular report template is used as the report template corresponding to the report type; if the terminal device returns a selection result indicating that the user has not selected a regular report template, then a report template is generated according to the report type and the data requirement information.

[0091] It should be understood that users can select a suitable report template from one or more standard report templates using their terminal devices. The report template defines the structure and format of the report. Specifically, a report template typically includes: a report title, table header, data range, and font style and format.

[0092] In this step, after the server filters the knowledge base according to the report type, if a template that meets the user's needs is found in the knowledge base, a prompt message is sent to the user, reminding them that they can choose from at least one regular report template returned by the server. If the user selects any regular report template, the terminal device returns an instruction message to the server. The server receives the instruction message and uses the regular report template selected by the user as the report template in this report generation process.

[0093] If the user does not select any regular report template, the server will generate a target template that meets the user's needs based on the report type and data requirements required when the code is actually executed, according to the data requirement information generated in step 1.

[0094] In one specific implementation, if the user does not select a regular report template, a report template is generated based on the report type and data requirements.

[0095] In one specific implementation, the server returns at least one regular report template to the terminal device based on the report type, and also returns usage instructions corresponding to the regular report template, so that users can select according to their needs.

[0096] Step 3: Based on the data requirement information, retrieve the indicator data corresponding to at least one indicator type from the database;

[0097] In this step, the server executes the code program corresponding to the template to retrieve the indicator data corresponding to the required indicator type from the database. The database stores different indicator data for various indicator types.

[0098] In one specific implementation, for regular report templates, the corresponding code program is executed; for report templates generated based on report type and data requirements, the corresponding code program can be automatically generated and executed based on the report type and data requirements. By executing the code program, the required indicator data is extracted from the database, and further processing such as filtering, sorting, and grouping can be performed.

[0099] In one specific implementation, retrieving indicator data corresponding to at least one indicator type from the database based on data requirement information includes: querying the database using Structured Query Language (SQL) statements based on a time interval and at least one indicator type to retrieve the indicator data corresponding to the at least one indicator type. Specifically, for a regular report template, the SQL statement corresponding to the regular report template is executed; for a report template generated based on the report type and data requirement information, a Text-to-Structured Query Language (Text-to-SQL) algorithm can be used to automatically generate the SQL statement corresponding to the template based on the report type and data requirement information. For both types of templates, the indicator data that meets the user's requirements can be obtained by executing the SQL statement corresponding to the template.

[0100] It should be understood that the database stores various indicator data corresponding to different indicator types, pre-generated based on at least one of business data, financial data, and external data. Business data, financial data, and external data form the basis for generating these different indicator data. Specifically, business data includes sales data, market data, and operational data; financial data includes debt-to-equity ratios and cash flows; and external data includes industry data, economic data (such as GDP growth rate and inflation rate), and market risk data. For example, the non-performing loan ratio is determined based on substandard loans, doubtful loans, loss loans, and various other loans from the financial data.

[0101] Step 4: Based on the report template and the indicator data corresponding to at least one indicator type, use the report generation model to generate the target report and the analysis results of the target report.

[0102] In this step, the report generation model inputs the indicator data corresponding to at least one indicator type into the corresponding location in the report template to generate the target template required by the user. Furthermore, the report generation model performs data analysis on the target template and generates analysis results.

[0103] In one specific implementation, the analysis results of the target report may include: non-subjective data calculation and analysis such as year-on-year analysis and month-on-month analysis of the indicator data in the report.

[0104] S205. Return the target report and its analysis results to the terminal device.

[0105] In this step, the server returns the target report and its analysis results to the terminal device, where the user can view the required report and its analysis results.

[0106] This embodiment provides a knowledge graph-based report generation method that receives a report generation request from a terminal device. First, it uses natural language processing to obtain multiple keywords from the report generation request. Then, based on these keywords, it performs entity retrieval in a pre-constructed knowledge graph storing various expressions of different entities related to report generation, obtaining standardized request keywords. Next, it uses a pre-acquired report generation model to generate a target report and its analysis results based on these keywords. Finally, it returns the target report and its analysis results to the terminal device. By performing entity retrieval in the knowledge graph using the keywords obtained through natural language processing and standardizing the various expressions of different entities, the accuracy of the server's understanding of user needs is improved, thereby increasing the user-requirement matching degree of the generated report and improving the convenience of report generation.

[0107] Based on the above embodiments, when obtaining the report template corresponding to the report type, if the user selects any regular report template after receiving a selection result returned by the terminal device, the knowledge graph-based report generation method provided in this application further includes:

[0108] If the terminal device returns a selection result indicating that the user has selected any regular report template, and at the same time receives modification description information for the regular report template, then the regular report template is modified according to the modification description information to obtain the report template.

[0109] For example, the standard report template is "Accounts Receivable Risk Report for this Quarter", while the user's requirement is "Accounts Receivable Risk Report for this Month". The user inputs the SQL statement to be modified and the corresponding modification requirements into the terminal device. After receiving the above modification description information, the server modifies the template and the corresponding SQL statement according to the modification description information, and finally obtains a report template that meets the user's requirements.

[0110] In one specific implementation, the report template obtained by modifying the regular report template based on the modified description information can be stored in the knowledge base, which enriches the content of the knowledge base and facilitates the generation of reports in the future.

[0111] The knowledge graph-based report generation method provided in this embodiment can flexibly address situations where conventional reports do not meet user needs. The server receives the modification description information input by the user on the terminal device and can then obtain a report template that meets the user's requirements. The modification process does not require the user to modify the code statements themselves, lowering the user's barrier to entry and improving the ease of report generation.

[0112] Figure 3 This diagram illustrates a specific embodiment of the knowledge graph-based report generation method provided in this application. This knowledge graph-based report generation method is applied to, for example... Figure 3 The report generation system shown includes, for example, the report generation system shown. Figure 3 The modules shown specifically include:

[0113] Step 1: Based on the large model knowledge base module, simulate the question answering model through the large model training module, and optimize the model matching accuracy parameters in the large model tuning module.

[0114] Step 2: Receive the report generation requirements sent by the terminal device in the receiving module (also known as the requirement input module);

[0115] Step 3: The large model processes the received report generation requests:

[0116] (1) The large model processes the report generation requirements through the natural language processing module and obtains multiple keywords;

[0117] (2) Then, based on multiple keywords, entity retrieval is performed in the pre-constructed knowledge graph module to obtain multiple standardized demand keywords. The knowledge graph stores multiple different entities related to report generation in various forms. In addition, the knowledge graph also stores the connection relationships between databases.

[0118] (3) Finally, based on multiple requirement keywords, the target report and the analysis results of the target report are generated through the SQL generation and execution module and the report generation module; among them, the SQL generation and execution module and the report generation module together constitute the generation module.

[0119] Specifically, the SQL generation and execution module processes multiple requirement keywords using the BPE method and Abstract Syntax Tree (AST) to obtain report types and data requirement information. The data requirement information includes a time range and at least one indicator type. Based on the report type, it returns at least one regular report template to the terminal device's regular report module. If the terminal device indicates that the user has selected any regular report template in the regular report module, then that regular report template is used as the report template corresponding to the report type. If the terminal device indicates that the user has not selected a regular report template in the regular report module, then a report template is generated based on the report type and data requirement information. The regular report template module stores commonly used risk management reports. When a user selects a standard report template, the SQL generation and execution module executes the corresponding SQL statement to retrieve indicator data for at least one indicator type. The report generation module then fills this retrieved indicator data into the template, generating the required report and analysis results. Alternatively, the SQL generation and execution module generates a report template based on the report type and executes the corresponding SQL statement to retrieve indicator data for at least one indicator type from the database. Finally, the report generation module fills this retrieved indicator data into the template, generating the required report and analysis results. The indicator data is calculated based on pre-stored business, financial, and external data in the database module.

[0120] Step 4: The results return module (also known as the results output module) returns the obtained report and the corresponding analysis results to the client for the user to view.

[0121] In the specific embodiments of the knowledge graph-based report generation method provided in this application, the usage threshold of the report generation system is lowered. Business personnel are not required to map various indicator fields in the database table, nor are they required to write SQL queries. Reports can be generated directly by selecting a standard report template or by describing requirements. Furthermore, modifications to the standard report template require no technical support; modifications can be made independently with the help of a large model. Simultaneously, the reports can output objective data analysis results, greatly improving the work efficiency of business personnel.

[0122] Figure 4 This is a schematic diagram of the structure of an embodiment of the knowledge graph-based report generation device provided in this application, as shown below. Figure 4 As shown, the knowledge graph-based report generation device 30 provided in this embodiment includes:

[0123] The receiving module 301 is used to receive report generation requests sent by the terminal device;

[0124] Natural Language Processing Module 302 is used to generate requirements through natural language processing reports and obtain multiple keywords;

[0125] The knowledge graph module 303 is used to perform entity retrieval in a pre-built knowledge graph based on multiple keywords to obtain standardized multiple requirement keywords. The knowledge graph stores multiple representations of different entities related to report generation.

[0126] The generation module 304 is used to generate a target report based on multiple requirement keywords and a pre-acquired report generation model.

[0127] The result return module 305 is used to return the target report and the analysis results of the target report to the terminal device.

[0128] The knowledge graph-based report generation device provided in this embodiment can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0129] In one possible implementation, the generation module 304 is specifically used for:

[0130] Based on multiple requirement keywords, determine the report type and data requirement information, which includes a time range and at least one indicator type.

[0131] Retrieve the report template corresponding to the report type;

[0132] Based on the data requirement information, retrieve the indicator data corresponding to at least one indicator type from the database;

[0133] Based on the report template and the indicator data corresponding to at least one indicator type, a report generation model is used to generate the target report and the analysis results of the target report.

[0134] In one possible implementation, the generation module 304 is specifically used for:

[0135] The report type and data requirement information are obtained by processing multiple requirement keywords using the BPE method and Abstract Syntax Tree (AST).

[0136] In one possible implementation, the generation module 304 is configured to:

[0137] Based on the report type, return at least one regular report template to the terminal device;

[0138] If the terminal device returns a selection result indicating that the user has selected any regular report template, then the regular report template will be used as the report template corresponding to the report type.

[0139] If the terminal device returns a selection result indicating that the user has not selected a regular report template, then a report template will be generated based on the report type and data requirements.

[0140] In one possible implementation, model 304 is specifically used for:

[0141] Based on the time interval and at least one indicator type, the indicator data corresponding to the at least one indicator type is retrieved from the database by querying using SQL statements.

[0142] The database stores different indicator data corresponding to various indicator types, which are generated in advance based on at least one of business data, financial data, and external data.

[0143] Figure 5 This is a schematic diagram of the structure of Embodiment 2 of the knowledge graph-based report generation device provided in this application, as shown below. Figure 5 As shown, based on the above-described device embodiments, the knowledge graph-based report generation device 30 provided in this application further includes:

[0144] Modification module 306: If it receives a selection result from the terminal device indicating that the user has selected any regular report template, and at the same time receives modification description information for the regular report template, it modifies the regular report template according to the modification description information to obtain the report template.

[0145] The knowledge graph-based report generation device provided in this embodiment can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0146] Figure 6 A schematic diagram of the knowledge graph-based report generation device provided in this application. Figure 6 As shown, the knowledge graph-based report generation device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0147] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0148] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0149] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0150] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0151] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0152] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0153] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0154] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0155] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0156] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0157] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0158] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0159] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0160] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0161] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A report generation method based on knowledge graphs, characterized in that, include: Receive report generation requests from terminal devices; The report generation requirements were obtained through natural language processing, yielding multiple keywords. Based on the multiple keywords, entity retrieval is performed in a pre-constructed knowledge graph to obtain multiple standardized requirement keywords. The knowledge graph stores multiple representations of different entities related to report generation. Based on the multiple requirement keywords, a target report and the analysis results of the target report are generated using a pre-acquired report generation model; The target report and its analysis results are returned to the terminal device.

2. The method according to claim 1, characterized in that, The step of generating a target report and its analysis results using a pre-acquired report generation model based on the multiple requirement keywords includes: Based on the multiple requirement keywords, the report type and data requirement information are determined. The data requirement information includes a time interval and at least one indicator type. Obtain the report template corresponding to the report type; Based on the data requirement information, retrieve the indicator data corresponding to at least one indicator type from the database; Based on the report template and the indicator data corresponding to the at least one indicator type, the target report and the analysis results of the target report are generated using the report generation model.

3. The method according to claim 2, characterized in that, The process of determining the report type and data requirement information based on the multiple requirement keywords includes: The report type and data requirement information are obtained by processing the multiple requirement keywords using the BPE method and Abstract Syntax Tree (AST).

4. The method according to claim 2, characterized in that, The step of obtaining the report template corresponding to the report type includes: Based on the report type, at least one regular report template is returned to the terminal device; If the terminal device returns a selection result indicating that the user has selected any regular report template, then the regular report template will be used as the report template corresponding to the report type. If the terminal device returns a selection result indicating that the user has not selected a regular report template, then the report template is generated according to the report type and the data requirement information.

5. The method according to claim 4, characterized in that, The method further includes: If the terminal device returns a selection result indicating that the user has selected any regular report template, and at the same time receives modification description information for the regular report template, then the regular report template is modified according to the modification description information to obtain the report template.

6. The method according to any one of claims 2 to 4, characterized in that, The step of retrieving indicator data corresponding to at least one indicator type from the database based on data requirement information includes: Based on the time interval and the at least one indicator type, the indicator data corresponding to the at least one indicator type is retrieved from the database by querying using SQL statements. The database stores different indicator data corresponding to various indicator types, which are generated in advance based on at least one of business data, financial data, and external data.

7. A report generation device based on knowledge graphs, characterized in that, include: The receiving module is used to receive report generation requests sent by terminal devices; The natural language processing module is used to generate multiple keywords from the report generation requirements through natural language processing. The knowledge graph module is used to perform entity retrieval in a pre-constructed knowledge graph based on the multiple keywords to obtain standardized multiple requirement keywords. The knowledge graph stores multiple representations of different entities related to report generation. The generation module is used to generate a target report based on the multiple requirement keywords using a pre-acquired report generation model; The result return module is used to return the target report and the analysis results of the target report to the terminal device.

8. A report generation device based on knowledge graphs, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.