A report generation method, device and electronic device based on a large model

Through the report generation method based on big model, the problem of being unable to quickly respond to the flexible and changeable data needs of the business in the existing technology is solved, and efficient data processing and flexible report generation are realized to adapt to the data analysis needs of new business scenarios.

CN119474108BActive Publication Date: 2025-05-27BEIJING QINGSONG YIKANG INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510054405.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-27
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

The existing technology cannot quickly respond to the flexible and changeable data needs of the business, resulting in inefficient data acquisition and processing, and it is difficult to adapt to the data analysis requirements of new business scenarios.

Method used

A report generation method based on a large model is adopted to obtain the report generation information entered by the user, automatically generate SQL query statements, and directly query the target data model to generate target reports.

Benefits of technology

It improves the efficiency and accuracy of data query statement generation, significantly improves the timeliness of data processing, meets the immediate needs of business, and ensures that reports can flexibly adapt to the data analysis requirements of new business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474108B_ABST
    Figure CN119474108B_ABST
Patent Text Reader

Abstract

This application relates to the field of data processing technology, and specifically relates to a report generation method, device, and electronic device based on a large model. By obtaining the report generation information input by the user, this application accurately locates the target data model and query conditions to be queried, uses the large model debugged through the business model to automatically generate SQL query statements, directly queries the target data model, and quickly obtains the data required for the report. After receiving the user's instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business but also ensures that the report can flexibly adapt to the data analysis requirements of new business scenarios, overall improving the intelligent level and business adaptation ability of report generation. Through the report generation method based on the large model, this application can quickly respond to the flexible and changeable data requirements of the business, improve the efficiency of data acquisition and processing, and effectively adapt to the data analysis requirements of new business scenarios, thus solving the problem of data report generation in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and particularly to a report generation method, device, and electronic device based on a large model. Background Art

[0002] In today's rapidly changing business environment, enterprises are facing unprecedented data challenges and opportunities. With the rapid iteration of enterprise products and the increasing intensity of market competition, the traditional working mode (where business personnel put forward requirements, which are relayed by the product team to data engineers for development) can no longer meet the high requirements of enterprises for data timeliness and flexibility. This mode not only leads to a lag in product function evaluation but also prolongs the cycle for business personnel to obtain data, seriously affecting the decision-making efficiency and market competitiveness of enterprises. To address data challenges, enterprises generally adopt two main data acquisition approaches: based on a report platform and based on an OLAP (Online Analytical Processing) system. However, both of these approaches have obvious limitations.

[0003] Report platforms usually provide preset dimensions and metrics. Although they can meet certain data requirements, their flexibility is insufficient. When business personnel need to deeply understand other metrics, especially calculation-based metrics, they often need to manually download data for secondary processing, which not only increases the workload but also easily introduces errors. In addition, if business personnel need to supplement new dimensional metrics, they need to resubmit the data requirements to data engineers for development, which further prolongs the data acquisition cycle. Compared with report platforms, OLAP systems are more flexible in data model design and can enumerate more data dimensions to meet a wider range of business needs. However, OLAP systems still cannot solve the problem of flexible and changeable business. Especially when new business scenarios emerge, if the data model development fails to keep up in a timely manner, the data requirements of these new business scenarios cannot be met. In addition, the scalability of OLAP systems is also limited and it is difficult to quickly adapt to the constantly changing data requirements of enterprises.

[0004] It can be seen that in the prior art, there are problems such as the inability to quickly respond to the flexible and changeable data requirements of businesses, resulting in low efficiency of data acquisition and processing, and difficulty in adapting to the data analysis requirements of new business scenarios. Summary of the Invention

[0005] The purpose of this application is to provide a report generation method, device, and electronic device based on a large model to solve the problems in the prior art, namely, the inability to quickly respond to the flexible and changeable data requirements of businesses, resulting in low efficiency of data acquisition and processing, and difficulty in adapting to the data analysis requirements of new business scenarios.

[0006] To achieve the above purpose, the technical solution adopted in this application is as follows:

[0007] According to one aspect of the embodiments of the present application, a report generation method based on a large model is provided, including: obtaining report generation information input by a user, where the report generation information is used to indicate at least one target data model to be queried when generating a report and corresponding query conditions. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data, and the query conditions are used to indicate the business data to be filtered and extracted when generating a report; automatically generating a corresponding SQL query statement according to the at least one target data model and the corresponding query conditions indicated by the report generation information through a pre-debugged large model, where the large model is obtained by debugging the model according to model debugging data corresponding to the business; querying at least one target data model according to the SQL query statement through the large model, and extracting target data that meets the query conditions; after receiving a report generation instruction input by the user, generating a target report according to the extracted target data through the large model.

[0008] According to the above technical means, first, obtaining the report generation information input by the user accurately locates the target data model and query conditions to be queried, solving the problem of slow response to data requirements in the traditional method; second, using a large model debugged by the business model to automatically generate SQL query statements greatly improves the generation efficiency and accuracy of data query statements; then, directly querying the target data model through the large model to quickly obtain the data required for the report significantly improves the timeliness of data processing; finally, after receiving the user instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business but also ensures that the report can flexibly adapt to the data analysis requirements of new business scenarios, overall improving the intelligent level and business adaptation ability of report generation.

[0009] Further, the model debugging data includes: all data models, field information of each data model, relationships between data models, an index library, constraint conditions, calculation formulas for special indexes, and date functions for processing date data. Obtaining the large model by debugging the model according to the model debugging data corresponding to the business includes: configuring each data model, field information of each data model, and relationships between data models into the basic framework of the large model; configuring the index library, where multiple calculation indexes that meet business requirements are stored in the index library, and each calculation index is an atomic index without other dimension modifications; configuring constraint conditions of the large model according to the index library, business logic, and special requirements, where the constraint conditions are used to indicate the indexes that the large model cannot process; configuring calculation formulas for special indexes and date functions for processing date data.

[0010] According to the above technical means, by comprehensively integrating model debugging data and finely defining and configuring it into the basic framework of the large model, the large model's in-depth understanding and efficient response to business requirements are achieved. This not only ensures that the large model can accurately capture and process complex business logics, but also significantly improves the flexibility and adaptability of the large model by configuring atomic metrics, clear constraint conditions, and calculation formulas and date functions for special metrics that meet business requirements, enabling it to accurately generate SQL query statements that meet business expectations, efficiently query and process data, thus effectively solving the problems of low data processing efficiency and difficulty in adapting to new business scenarios in traditional report generation methods.

[0011] Furthermore, each data model in at least one target data model constructed according to business requirements includes: obtaining multiple business terms in the current business in the business system and the explanations of each business term; sorting out the original business data of the business system according to the multiple business terms to determine the data range of the business data corresponding to the current business; performing data cleaning on the sorted original business data to obtain the cleaned target business data, where data cleaning is used to ensure the accuracy, integrity, and uniqueness of all business data, and data cleaning includes: handling missing values in the original business data, deleting duplicate values in the original business data, and converting the original business data into a unified format; constructing the data model corresponding to the current business according to the target business data, where the model name of the data model is unique, and the data model includes a primary key and multiple fields, where each field corresponds to a data dimension.

[0012] According to the above technical means, by systematically obtaining business terms and their explanations, clarifying the business data range, performing data cleaning to ensure the accuracy, integrity, and uniqueness of data (including handling missing values, deleting duplicate values, and unifying data formats), and finally constructing a uniquely named data model (including a primary key and fields corresponding to multiple data dimensions) based on the cleaned target business data, the standardized management and efficient utilization of business data are achieved, the quality and consistency of data are improved, and a solid foundation is provided for business analysis and decision-making.

[0013] Furthermore, through the large model, according to the SQL query statement, query at least one target data model and extract the target data that meets the query conditions, including: the large model calls the data acquisition interface, executes the SQL query statement, queries at least one target data model, and extracts the target data that meets the query conditions; obtains the returned target data through the data return interface and displays it in a preset display format, where the display format includes: chart format or view format.

[0014] According to the above technical means, by using the large model to call the data acquisition interface to execute the SQL query statement, the target data for generating reports is efficiently queried from the target data model, and these data are returned through the data acquisition interface, and then displayed according to the preset display formats such as charts or views. This process not only improves the efficiency and accuracy of data query, but also enhances the intuitiveness and readability of the reports, providing timely, accurate and easy-to-understand data information for decision support.

[0015] Further, before the large model calls the data acquisition interface to execute the SQL query statement, it includes: verifying the legality of the SQL query statement, where the verification content of the legality includes: whether the syntax of the SQL query statement conforms to the standard, whether the SQL query statement contains sensitive information, whether the data model in the SQL query statement exists, and whether the number of returned data records exceeds the preset value.

[0016] According to the above technical means, by verifying the legality of the SQL query statement, including checking whether its syntax conforms to the standard, whether it contains sensitive information, whether the referenced data model exists, and estimating whether the number of returned data records exceeds the preset value, this step can significantly improve the security and efficiency of data query. It effectively prevents system problems caused by SQL query statement errors or malicious injections, ensures the accuracy of the data model, and avoids performance problems caused by excessive data volume, thus providing users with a more reliable and efficient data query service.

[0017] Further, through the large model, according to the extracted target data, a target report is generated, including: the large model calls the report generation interface to process the data format of the target data to obtain data in the target format, where the target format is the format that meets the requirements of the business demand side; filling the data in the target format into the target report template to obtain the target report, where the target report template is a report template selected or designed by the large model according to the business requirements, and the target report template is used to define the structure, layout, style and data fields included in the report, and the target report is returned to the large model through the report generation interface in the form of a report link.

[0018] According to the above technical means, by the large model calling the report generation interface to process the target data to meet the business requirements and accurately filling the processed data into the pre-selected or designed target report template, this process greatly improves the automation degree and flexibility of report generation. It not only ensures the accuracy and compliance of report data, but also meets diverse business needs through customized report templates, making the structure, layout, style and data display of the report more professional and intuitive, providing strong support for business decision-making.

[0019] Further, after obtaining the target report, it includes: the large model obtains the returned report link through the report generation interface, where the report link is used to indicate the storage address of the generated report.

[0020] According to the above technical means, after obtaining the target report, the large model further generates the corresponding report link and returns the link through the report generation interface, enabling users to conveniently access the storage address of the report. This step significantly improves the usability and accessibility of the report. Users do not need to manually search for or download the report. They can quickly view the required content by simply clicking the link, thus improving work efficiency and ensuring the timely transmission and effective utilization of report information.

[0021] According to another aspect of the embodiments of the present application, there is also provided a report generation device based on a large model, including: a data acquisition module, configured to acquire report generation information input by a user, where the report generation information is used to indicate at least one target data model to be queried and the corresponding query conditions when generating a report. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data. The query conditions are used to indicate the business data to be filtered and extracted when generating a report; a query statement generation module, configured to automatically generate the corresponding SQL query statement according to the at least one target data model and the corresponding query conditions indicated by the report generation information through a pre-debugged large model, where the large model is debugged according to the model debug data corresponding to the business; a data query module, configured to query the at least one target data model according to the SQL query statement through the large model and extract the target data that meets the query conditions; a report generation module, configured to generate a target report according to the extracted target data through the large model after receiving the report generation instruction input by the user.

[0022] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; among them, the memory is used to store a computer program; the processor is configured to execute the method for generating a report based on a large model in any of the above embodiments by running the computer program stored on the memory.

[0023] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is set to execute the method for generating a report based on a large model in any of the above embodiments when running.

[0024] Advantages of the present application:

[0025] First, this application obtains the report generation information input by the user, accurately locates the target data model and query conditions to be queried, and solves the problem of slow response to data requirements in the traditional method. Secondly, it uses a large model that has been debugged by the business model to automatically generate SQL query statements, greatly improving the generation efficiency and accuracy of data query statements. Then, it directly queries the target data model through the large model to quickly obtain the data required for the report, significantly improving the timeliness of data processing. Finally, after receiving the user's instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business but also ensures that the report can flexibly adapt to the data analysis requirements of new business scenarios, overall improving the intelligent level and business adaptability of report generation. Through the report generation method based on the large model, this application can quickly respond to the flexible and changeable data requirements of the business, improve the efficiency of data acquisition and processing, and effectively adapt to the data analysis requirements of new business scenarios, thus solving the problem of data report generation in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0027] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a schematic diagram of the hardware environment of an optional report generation method based on a large model provided by an embodiment of the present application;

[0029] Figure 2 It is a schematic flow chart of an optional report generation method based on a large model provided by an embodiment of the present application;

[0030] Figure 3 It is a schematic diagram of an example of the interaction content for determining dimension information and time information provided by an embodiment of the present application;

[0031] Figure 4 It is a schematic diagram of an example of query result display provided by an embodiment of the present application;

[0032] Figure 5 It is a block diagram of the structure of an optional report generation device based on a large model provided by an embodiment of the present application;

[0033] Figure 6 It is a block diagram of the structure of an optional electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0034] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0036] According to one aspect of the embodiments of this application, a report generation method based on a large model is provided. Optionally, in this embodiment, the above-mentioned report generation method based on a large model can be applied to a hardware environment composed of a terminal and a server. The server is connected to the terminal through a network and can be used to provide services for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server.

[0037] The above-mentioned network can include but is not limited to at least one of the following: wired network, wireless network. The above-mentioned wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The above-mentioned wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal is not limited to a PC, mobile phone, tablet computer, etc.

[0038] The report generation method based on a large model in the embodiments of this application can be executed by the server, or can be executed by the terminal, or can also be jointly executed by the server and the terminal. Among them, when the terminal executes the report generation method based on a large model in the embodiments of this application, it can also be executed by the client installed on it.

[0039] Taking the execution of the report generation method based on a large model in this embodiment by the server as an example, please refer to Figure 1 ,Figure 1 It is a schematic diagram of the hardware environment of an optional large model-based report generation method provided by an embodiment of the present application. As Figure 1 shown, the hardware environment of the large model-based report generation method includes: a terminal 102, and a server 104 connected to the terminal 102 through a network. The server 104 is used to deploy the large model and all data models debugged using model debugging data. The large model is used to execute the large model-based report generation method of the embodiment of the present application. First, it generates an SQL query statement according to the report generation information input by the user, then queries at least one target data model according to the SQL query statement to obtain target data, and finally generates a report according to the target data; the terminal 102 is used to interact with the large model to obtain report generation information, and at the same time, the terminal 102 is also used to display the generated SQL query statement and the report.

[0040] In this embodiment, the report generation information is used to indicate at least one target data model to be queried when generating a report and the corresponding query conditions. Each data model in the at least one target data model is constructed according to business requirements. The target data is used to generate a report.

[0041] Taking insurance business-related data as an example, the data models may include: user insurance data, customer complaint data, renewal data, and product data models. In specific practice, the data models are constructed based on the enterprise central data warehouse from a business perspective, that is, based on the enterprise central data warehouse, following the three normal form design idea, constructing data models that business personnel can understand, translating all the data in the model into a language that business personnel can understand. For example, status 20 represents "in force", and it is directly adjusted to "in force" in Chinese. In addition, there should be no duplication in the description of each field in the data model. For some enumerated type fields, all their enumerated values need to be listed.

[0042] In the process of the large model generating a report, it does not directly generate a report, but calls a pre-developed data interface, executes the corresponding task, and then obtains the result of the task execution through the data interface. In specific practice, the pre-developed data interface is a web interface that executes SQL language based on the enterprise internal central data warehouse environment, and it can return data results. The pre-developed data interfaces may include: a data acquisition interface, a data return interface, a report generation interface, and a data download interface.

[0043] In specific practices, to prevent inference bias in large models, before using a large model to generate reports, the role of the large model is first located using model fine-tuning data, and basic behavior constraint conditions are added. The core of the model fine-tuning data is to clearly define the data model and the relationships between data models, and at the same time inform the large model of the constraint conditions that are prone to errors, so that the large model can generate SQL query statements through reasoning under the configured data model. In this embodiment, the model debugging data includes: all data models, field information of each data model, relationships between data models, an indicator library, constraint conditions, calculation formulas for special indicators, and date functions for processing date data.

[0044] The report generation method based on a large model in this embodiment can be applied to scenarios such as enterprise-related personnel (e.g., business personnel) quickly querying reports. In today's rapidly changing business environment, enterprises are facing unprecedented data challenges and opportunities. With the rapid iteration of enterprise products and the increasing fierce market competition, the traditional working mode (i.e., business personnel put forward requirements, which are transmitted to data engineers for development through the product team) can no longer meet the high requirements of enterprises for data timeliness and flexibility. This mode not only leads to a lag in product function evaluation but also extends the cycle for business personnel to obtain data, seriously affecting the decision-making efficiency and market competitiveness of enterprises. To address data challenges, enterprises generally adopt two main data acquisition approaches: based on a report platform and based on an OLAP (Online Analytical Processing) system. However, both of these approaches have obvious limitations.

[0045] Report platforms usually provide preset dimensions and indicators. Although they can meet certain data requirements, their flexibility is insufficient. When business personnel need to deeply understand other indicators, especially calculation-based indicators, they often need to manually download data for secondary processing, which not only increases the workload but also easily introduces errors. In addition, if business personnel need to supplement new dimensional indicators, they need to resubmit data requirements to data engineers for development, which further extends the data acquisition cycle. Compared with report platforms, OLAP systems are more flexible in data model design and can enumerate more data dimensions to meet a wider range of business needs. However, OLAP systems still cannot solve the problem of flexible and changeable business. Especially when new business scenarios emerge, if data model development fails to keep up in a timely manner, the data requirements of these new business scenarios cannot be met. In addition, the scalability of OLAP systems is also limited and it is difficult to quickly adapt to the ever-changing data requirements of enterprises.

[0046] It can be seen that in the prior art, there are problems that it is impossible to quickly respond to the flexible and changeable data requirements of the business, resulting in low efficiency of data acquisition and processing, and it is difficult to meet the data analysis requirements of new business scenarios. To solve the above problems, in this embodiment, a large model-based report generation method running on the above server is provided. Please refer to Figure 2 , Figure 2 is a schematic flowchart of an optional large model-based report generation method provided by an embodiment of the present application. As Figure 2 shown, the large model-based report generation method of the embodiment of the present application specifically includes the following steps:

[0047] Step S201, obtain report generation information input by the user. Among them, the report generation information is used to indicate at least one target data model to be queried when generating a report and the corresponding query conditions. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data. The query conditions are used to indicate the business data to be filtered and extracted when generating a report;

[0048] Step S202, through a pre-debugged large model, automatically generate a corresponding SQL query statement according to the at least one target data model and the corresponding query conditions indicated by the report generation information. Among them, the large model is obtained by debugging the model according to the model debugging data corresponding to the business;

[0049] Step S203, through the large model, query at least one target data model according to the SQL query statement, and extract the target data that meets the query conditions;

[0050] Step S204, after receiving the report generation instruction input by the user, generate a target report through the large model according to the target data.

[0051] Through the above steps S201 to S204, first, obtain the report generation information input by the user, accurately locate the target data model to be queried and the query conditions, and solve the problem of slow response to data requirements in the traditional method; second, use the large model debugged by the business model to automatically generate SQL query statements, greatly improving the generation efficiency and accuracy of data query statements; then, directly query the target data model through the large model to quickly obtain the data required for the report, significantly improving the timeliness of data processing; finally, after receiving the user instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business, but also ensures that the report can flexibly adapt to the data analysis requirements of new business scenarios, and overall improves the intelligent level and business adaptation ability of report generation. Solve the problems in the prior art that it is impossible to quickly respond to the flexible and changeable data requirements of the business, resulting in low efficiency of data acquisition and processing, and it is difficult to meet the data analysis requirements of new business scenarios.

[0052] The following is combined with Figure 2 to explain the method for generating reports based on large models in the embodiments of the present application.

[0053] In the technical solution of step S201, report generation information input by the user is obtained. In this embodiment, the report generation information is used to indicate at least one target data model to be queried and the corresponding query conditions when generating a report. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data. The query conditions are used to indicate the business data to be filtered and extracted when generating a report.

[0054] Here, each data model being constructed according to business requirements means: based on the enterprise central data warehouse, constructing a data model from the business perspective, that is, based on the enterprise central data warehouse, following the third normal form design idea, constructing a data model that business personnel can understand, and translating all the data in the model into a language that business personnel can understand. Taking insurance business-related data as an example, the data model may include: user insurance application data, customer complaint data, renewal data, product data model. Among them, the status 20 in the user insurance application data represents "in force", and it is directly adjusted to the Chinese "in force".

[0055] As an alternative embodiment, constructing each data model in the at least one target data model according to business requirements includes: obtaining multiple business terms in the current business in the business system and the explanations of each business term; sorting out the original business data in the business system according to the multiple business terms to determine the data range of the business data corresponding to the current business; performing data cleaning on the sorted-out original business data to obtain the cleaned target business data. Among them, data cleaning is used to ensure the accuracy, integrity, and uniqueness of all business data. Data cleaning includes: processing missing values in the original business data, deleting duplicate values in the original business data, and converting the original business data into a unified format; constructing a data model corresponding to the current business according to the target business data. Among them, the model name of the data model is unique, and the data model includes a primary key and multiple fields, and each field corresponds to a data dimension.

[0056] In specific practice, first, perform requirement analysis and data governance from the business perspective. Performing requirement analysis and data governance from the business perspective specifically includes the following steps:

[0057] 1. Collect common terms used by business parties in key areas. Taking insurance business-related data as an example, common terms used by business parties include: annualized premium, receivable premium, collected premium, UV, policy volume, and order volume. Annualized premium refers to the average annual premium expenditure corresponding to the premium amount in accordance with the premium payment method specified in the policy within a one-year period; receivable premium refers to the premium that the insurance company should collect from the insured according to the contract but has not yet received; collected premium refers to the premium that the insurance company has received and registered in the account; UV (Unique Visitor) is usually used to measure the number of visits to a website or APP, that is, the number of natural persons who visit and browse the website or APP through the Internet; policy volume refers to the number of policies issued by an insurance company within a certain period of time; order is the unit of the insured when the insured insures and settles on the platform. When the insured fills in the insurance information and submits the payment, the system will generate a corresponding order for it. It is understandable that by collecting common terms used by business parties in key areas, it is possible to ensure that the data model is closely aligned with business reality, making data expression more intuitive and easy to understand, and facilitating business parties to understand and use the data model, thereby improving the efficiency and quality of data communication and promoting data-driven business decision-making and optimization.

[0058] 2. Sort out the existing business system data and determine the maximum data boundary. Take insurance business-related data as an example. For example, the definition of registered users is only the user registration time and basic information, and cannot include other user behavior data; transaction data is user payment and refund data; policy data is the data after the user successfully insures; appointment insurance is the data before the user insures. These data must clearly state the content. For the data that does not meet the specifications in the sorted data, data cleaning such as missing value processing, duplicate value processing, and format conversion is required to achieve data accuracy, completeness and uniqueness. It is understandable that by sorting out the existing business system data and determining the maximum data boundary, the accuracy and standardization of the data model can be ensured. At the same time, after data cleaning processing, the quality of the data can be effectively improved, including the accuracy, completeness and uniqueness of the data, thereby providing a reliable data foundation for subsequent data analysis and business decision-making, and promoting the effective use of data and maximizing business value.

[0059] Secondly, develop the data model corresponding to the business based on the data after data governance. The data model corresponding to the business includes the following specific steps:

[0060] 1. Design a data model based on the third normal form, and clarify the data granularity, primary key, and data dimensions of each data model. The data granularity represents the meaning of the primary key of each data table in the data model. Taking insurance business-related data as an example, for instance: the policy table represents the policy information of users' insurance applications, and the renewal data table. Each policy corresponds to 12 periods of renewal, and the table stores the renewal orders and details for each period. The data dimension is used to indicate the information associated with the parsed primary key. For example, if the policy number is the primary key, then the information such as the insurance company, product name, and policyholder corresponding to this policy are all dimension information. It should be noted that there should be no situation where the enumerated values of all dimension information are the same, nor should there be a situation where the field meanings are the same. Moreover, the explanations of these dimension information and enumerated values must be sourced from the information collected by the business side. For example, for the payment time and the field indicating whether it has been paid, only the payment time needs to be retained. It can be understood that adopting a data model designed based on the third normal form and clarifying the data granularity, primary key, and data dimensions for each data model can ensure the clarity, standardization, and consistency of the data structure, effectively avoid data redundancy and ambiguity, while ensuring that all dimension information is sourced from the business side, enhancing the business interpretability and usability of the data, and laying a solid foundation for the accurate analysis and efficient decision-making of the insurance business.

[0061] 2. Determine the model name. The model name is a high-level summary of the dimension information and there should be no situation where the model name conflicts with the dimension information of the data dimension. Taking insurance business-related data as an example, for instance, if the data model is about policy-related data, then it is not acceptable to write the model name and introduction as "insurance application data" or "user data". It can be understood that through the above steps, it can be ensured that the model name accurately reflects the dimension information it contains, can avoid information confusion and misunderstanding, make the data model clearer and easier to understand, facilitate communication and collaboration among team members, as well as the quick positioning and accurate execution of data analysis and business decisions, thereby improving the overall work efficiency and data value utilization rate.

[0062] 3. Update the model data. The model data is updated with the latest values every day. Since the data model fields in the traditional data warehouse have a high degree of redundancy and record historical data changes, etc., in this embodiment, the update strategy is not to update according to the traditional data warehouse development specifications, but according to the business model, and only one snapshot needs to be retained every day. It can be understood that by adopting the data update strategy in this application for the data of the data model, that is, the daily snapshot update strategy, the data model can be significantly simplified, the query efficiency can be improved, the storage cost can be reduced, while ensuring the accuracy and timeliness of the data, thereby optimizing the data processing process and providing faster, more accurate, and reliable data support for business decisions.

[0063] It is understandable that by systematically obtaining business terms and their explanations, clarifying the scope of business data, and performing data cleaning to ensure the accuracy, integrity, and uniqueness of data (including handling missing values, deleting duplicate values, and unifying data formats), and finally constructing a uniquely named data model (including a primary key and fields corresponding to multiple data dimensions) based on the cleaned target business data, the standardized management and efficient utilization of business data are achieved, the quality and consistency of data are improved, and a solid foundation is provided for business analysis and decision-making.

[0064] In this embodiment, the target data model is selected from all data models according to the report generation information input by the user from all pre-constructed data models. As an optional specific implementation manner, the following steps can be used to select the target data model from all data models: extract dimension information from the obtained report generation information input by the user; match the dimension information with all data models, and determine the matched data model as the target data model. It is understandable that through the above steps, the target data model can be accurately and quickly selected from all data models according to the specific needs of the user (through the dimension information in the report generation information), thereby improving the pertinence and efficiency of data processing.

[0065] In the technical solution of step S202, through a pre-debugged large model, according to at least one target data model indicated by the report generation information and the corresponding query conditions, the corresponding SQL query statement is automatically generated. In this embodiment, the large model is obtained by debugging the model according to the model debugging data corresponding to the business. The model debugging data is used to debug the large model and is a prerequisite for preventing the large model from having reasoning biases. Before using the large model to generate a report, first use the model fine-tuning data to locate the role of the large model and add basic behavior constraint conditions. The core of the model fine-tuning data is to clearly define the data model and the relationships between data models, and at the same time inform the large model of the constraint conditions that are prone to errors, so that the large model can generate an SQL query statement by reasoning under the configured data model. In this embodiment, the model debugging data includes: all data models, field information of each data model, relationships between data models, an index library, constraint conditions, calculation formulas for special indexes, and date functions for processing date data.

[0066] As an alternative embodiment, the large model is debugged according to the model debugging data corresponding to the business, including: configuring each data model, the field information of each data model, and the relationships between the data models into the basic framework of the large model; configuring an index library, where the index library stores multiple calculation indexes that meet business requirements, and each calculation index is an atomic index without other dimension modifications; configuring the constraint conditions of the large model according to the index library, business logic, and special requirements, where the constraint conditions are used to indicate the indexes that the large model cannot process; configuring the calculation formula of special indexes and the date function for processing date data.

[0067] In specific practice, debugging the large model using the model debugging data specifically includes the following steps:

[0068] 1. Configure all data models, the field information in each data model, and the relationships between the data models into the large model. It can be understood that by configuring all data models into the large model, the data range that the large model can automatically obtain is clarified. At the same time, by clarifying the structure and relationships of the data in the large model, problems such as data redundancy, inconsistency, or omission can be avoided, providing a solid foundation for subsequent data analysis. This helps to improve data processing efficiency and ensure data quality, and is a prerequisite for model debugging and data application.

[0069] 2. Configure the index library and provide the indexes that can be calculated to the large model. It should be noted that the indexes in the index library are atomic indexes and cannot be modified by other dimensions. Taking insurance business-related data as an example, the indexes in the index library are, for example, the number of policies, the number of users, and the number of orders. Suppose a user may ask how many takeaway orders there are. Regarding this question, the data model cannot answer because the data model cannot calculate takeaway orders here. It can be understood that using the indexes in the index library restricts what the large model can calculate. By integrating the indexes that can be calculated into the index library, the large model can easily call these indexes for data analysis without having to write calculation logic from scratch each time. This not only improves work efficiency but also ensures the consistency and accuracy of index calculation. In addition, the establishment of the index library also facilitates subsequent data analysis and model optimization.

[0070] 3. Configure the constraint conditions of the large model, the calculation formulas for special indicators, and the date functions for processing date data. The constraint conditions are determined in combination with business requirements and are used to restrict the indicators that the large model cannot generate. In this embodiment, the calculation formulas for special indicators need to be configured separately, and the dates need to be processed separately using date functions. Without fixing the date functions, the large model is prone to associations, resulting in problems such as a decrease or increase in data statistics for date filtering conditions. It can be understood that by configuring the constraint conditions, it is possible to ensure that the model follows certain rules and restrictions when processing data, avoiding data anomalies or unreasonable results. At the same time, configuring the calculation formulas for special indicators and date functions can meet specific data analysis requirements, enabling the model to more accurately reflect the actual situation of the data. This step helps to improve the accuracy and reliability of the model and provides strong support for data decision-making.

[0071] It can be understood that by comprehensively integrating the model debugging data and finely defining and configuring it into the basic framework of the large model, the large model's in-depth understanding and efficient response to business requirements are achieved. This not only ensures that the large model can accurately capture and process complex business logics but also significantly improves the flexibility and adaptability of the large model by configuring atomic indicators that meet business requirements, clear constraint conditions, and providing calculation formulas and date functions for special indicators, enabling it to accurately generate SQL query statements that meet business expectations, efficiently query and process data, thus effectively solving the problems of low data processing efficiency and difficulty in adapting to new business scenarios in traditional report generation methods.

[0072] In the technical solution of step S203, through the large model, at least one target data model is queried according to the SQL query statement, and the target data that meets the query conditions is extracted. In this embodiment, the SQL query statement is automatically generated by the large model based on the report generation information input by the user, and it is used to query the business data (i.e., the target data) required by the user, and this business data is finally presented in the form of a report.

[0073] In the process of the large model generating a report, it does not directly generate the report but calls a pre-developed data interface to execute the corresponding task, and then obtains the result of the task execution through the data interface. In specific practice, the pre-developed data interface is a web interface that executes SQL language based on the enterprise's internal central data warehouse environment and can return data results. The pre-developed data interface includes at least the following interfaces: data acquisition interface, data return interface, report generation interface, and data download interface.

[0074] When the large model needs to query the target data model according to the generated SQL query statement and extract the target data that meets the query conditions, usually the large model will call the data acquisition interface and the data return interface.

[0075] As an alternative embodiment, through a large model, at least one target data model is queried according to an SQL query statement, and target data meeting the query conditions is extracted, including: the large model calls a data acquisition interface, executes the SQL query statement, queries at least one target data model, and extracts target data meeting the query conditions; the returned target data is obtained through a data return interface and displayed in a preset display format, where the display format includes: chart format or view format.

[0076] In specific practice, the large model will call the data acquisition interface, send the SQL query statement to the cloud platform, so that the cloud platform directly executes the SQL query statement, obtains data from the target data model in the central data warehouse, calculates the metrics that need to be calculated, finally obtains the target data, and returns the target data to the large model through the data return interface. The large model automatically selects a display format for display according to the number of data records in the target data, where the display format includes chart format or view format.

[0077] It should be noted that before obtaining the returned target data through the data return interface, the data return interface needs to process the time, numbers, and strings in the target data into the standard format required by the business requester. For example: process the time data into the format of "YYYY - mm - dd HH:MM:SS"; handle special symbols such as "\N" in characters and numbers.

[0078] It can be understood that by using the large model to call the data acquisition interface to execute the SQL query statement, the target data for generating reports is efficiently queried from the target data model, and these data are returned through the data acquisition interface, and then displayed in a preset chart or view display format. This process not only improves the efficiency and accuracy of data query, but also enhances the intuitiveness and readability of the report, providing timely, accurate and easy - to - understand data information for decision - making support.

[0079] In specific practice, before the cloud platform executes the SQL query statement, it also needs to verify the legality of the SQL query statement to ensure that the SQL query statement can be executed.

[0080] As an alternative embodiment, before the large model calls the data acquisition interface and executes the SQL query statement, it includes: verifying the legality of the SQL query statement, where the verification content of the legality includes: whether the syntax of the SQL query statement conforms to the standard, whether the SQL query statement contains sensitive information, whether the data model in the SQL query statement exists, and whether the number of returned data records exceeds a preset value.

[0081] In specific practices, the content for the cloud platform to verify the legality of SQL includes at least the following: whether the SQL syntax conforms to the standard, verifying sensitive information, whether model information exists, and whether the number of returned data records exceeds a preset value. In actual applications, if the SQL is illegal or the queried table does not exist, the large model will remind the user that the SQL query statement is illegal; if there is sensitive information in the SQL, the large model will remind the user that there is sensitive information in the extracted data and the relevant data BP should be contacted.

[0082] It can be understood that by verifying the legality of the SQL query statement, including checking whether its syntax conforms to the standard, whether it contains sensitive information, whether the referenced data model exists, and estimating whether the number of returned data records exceeds a preset value, this step can significantly improve the security and efficiency of data queries. It effectively prevents system problems caused by incorrect or maliciously injected SQL query statements, ensures the accuracy of the data model, and avoids performance problems caused by excessive data volume, thus providing users with a more reliable and efficient data query service.

[0083] In the technical solution of step S204, after receiving the report generation instruction input by the user, the large model generates a target report based on the extracted target data.

[0084] As an optional embodiment, generating a target report based on the extracted target data by the large model includes: the large model calls a report generation interface to process the data format of the target data to obtain data in a target format, where the target format is a format that meets the requirements of the business requirement party; filling the data in the target format into a target report template to obtain a target report, where the target report template is a report template selected or designed by the large model according to business requirements, and the target report template is used to define the structure, layout, style, and data fields included in the report, and the target report is returned to the large model in the form of a report link through the report generation interface.

[0085] In specific practices, after receiving the report generation instruction input by the user, the large model calls a report generation interface, automatically creates a schedule through the report platform, automatically generates a report, and returns the report to the large model in the form of a report link through the report generation interface.

[0086] It can be understood that by the large model calling a report generation interface to process the format of the target data to meet business requirements and accurately filling the processed data into a pre-selected or designed target report template, this process greatly improves the automation and flexibility of report generation. It not only ensures the accuracy and compliance of report data, but also meets diverse business needs through customized report templates, making the structure, layout, style, and data display of the report more professional and intuitive, providing strong support for business decision-making.

[0087] It should be noted that the final target report is returned to the large model in the form of a report link through the report generation interface. The specific steps for the report calculation platform to generate the report link corresponding to the target report are not specifically limited herein.

[0088] As an alternative embodiment, after obtaining the target report, it includes: the large model obtains the returned report link through the report generation interface, where the report link is used to indicate the storage address of the generated report.

[0089] In specific practice, the report link is used for users to view data subsequently. When the user selects the report link to download the generated report, the large model calls the data download interface to download the report to the local.

[0090] It can be understood that after obtaining the target report, the large model further generates the corresponding report link and returns the link through the report generation interface, enabling users to conveniently access the address where the report is stored. This step significantly improves the usability and accessibility of the report. Users do not need to manually search for or download the report. They only need to click the link to quickly view the required content, thereby improving work efficiency and ensuring the timely transmission and effective utilization of report information.

[0091] In specific practice, the multi-round session mode is used to communicate with the user based on the user's intention, and at least the dimension information and time information are determined. In particular, in the data model, the field information that the model is not sure about needs to be confirmed by the user. Specifically, the large model extracts the dimensions and metrics according to the questions asked by the user and matches them with the table fields and metric libraries, and asks about the information that cannot be matched one by one. For example: if the user asks "What is the number of insurance policies in the last 30 days?", then the specific date of 30 days refers to the insurance application date or the effective date. This date is a vague period, so the large model needs to ask the user which date you need to use. After the user confirms the insurance application date, the large model automatically generates an SQL query statement and executes the SQL query statement to obtain the number of insurance policies corresponding to the insurance application date in the last 30 days (i.e., the target data). After receiving the report generation instruction input by the user, the target report is generated according to the target data.

[0092] In practice, if there is no business scenario for the use of time in the question, ask the user what business scenario the time is in, such as: insurance time, customer complaint time, policy effective time, payment time, receivable time, WeChat automatic deduction time, Rubik's Cube upgrade time, appointment order creation time, etc. If all the content in the question needs to be found in the table field and indicator library, ask the user what content to use as the limiting condition. If the user does not confirm, the SQL query statement is not allowed to be generated. If the question does not match the keyword, ask the user what the keyword means, for example: XX represents the insurance company, and Zhannei represents the department within the site. If there is a net premium collected in the question, inform the user of the calculation formula, and the payment time and refund time use the same time. There is no need to ask the user about the time scenario, but you can ask whether to consider other query conditions.

[0093] The large model uses a multi-round conversation mode to communicate with users based on user intent, and at least determines the interactive content of dimension information and time information. For examples, see Figure 3 , Figure 3 is a schematic diagram of an example of interactive content for determining dimension information and time information provided in an embodiment of the present application, such as Figure 3 As shown, the user wants to obtain the number of value insurance policies, but the user only provides the "number of value insurance policies" for report generation. Since this information does not contain time information, the big model cannot currently generate an SQL query statement based on this information. Therefore, the big model confirms the time information with the user; after the user confirms the time information, the big model generates an SQL query statement.

[0094] When the big model generates the SQL query statement corresponding to the value insurance policy amount, it will automatically execute the SQL query statement. This process is invisible to the user. For the content displayed after the final execution, please refer to Figure 4 , Figure 4 is a schematic diagram of an example of query result display provided in an embodiment of the present application, such as Figure 4 As shown, the query result content displayed after the SQL query statement is finally executed includes: the SQL query statement execution status, the executed SQL query statement, and the connection corresponding to the query result content. It should be noted that the data displayed in the link here is not displayed in the form of a report, but in a chart or view.

[0095] It can be understood that the present application, through a report generation method based on a large model, can quickly respond to the flexible and changeable data needs of the business, improve the efficiency of data acquisition and processing, and effectively adapt to the data analysis requirements of new business scenarios, thereby solving the data report generation problem in the prior art.

[0096] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0097] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of this application.

[0098] According to another aspect of the embodiments of this application, there is also provided a large model-based report generation device for implementing the above-mentioned large model-based report generation method. Please refer to Figure 5 , Figure 5 which is a structural block diagram of an optional large model-based report generation device provided by the embodiments of this application. As shown in Figure 5 , the large model-based report generation device 500 may include:

[0099] A data acquisition module 501, configured to acquire report generation information input by a user, where the report generation information is used to indicate at least one target data model to be queried and corresponding query conditions when generating a report. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data, and the query conditions are used to indicate the business data to be filtered and extracted when generating a report;

[0100] A query statement generation module 502, configured to automatically generate a corresponding SQL query statement according to the at least one target data model and corresponding query conditions indicated by the report generation information through a pre-debugged large model, where the large model is obtained by debugging the model according to the model debugging data corresponding to the business;

[0101] The data query module 503 is used to query at least one target data model according to the SQL query statement through the large model and extract the target data that meets the query conditions.

[0102] The report generation module 504 is used to generate a target report according to the extracted target data through the large model after receiving the report generation instruction input by the user.

[0103] It should be noted that the data acquisition module 501 in this embodiment can be used to execute the above step S201, the query statement generation module 502 in this embodiment can be used to execute the above step S202, the data query module 503 in this embodiment can be used to execute the above step S203, and the report generation module 504 in this embodiment can be used to execute the above step S204.

[0104] Regarding the report generation device 500 based on the large model in this embodiment, the specific manners in which its data acquisition module 501, query statement generation module 502, data query module 503, and report generation module 504 execute the above report generation method based on the large model have been described in detail in the embodiments related to the report generation method based on the large model, and will not be elaborated here.

[0105] It can be understood that for the technical solution provided in this embodiment, for each module in the report generation device based on the large model, first, it obtains the report generation information input by the user, accurately locates the target data model and query conditions to be queried, and solves the problem of slow response to data requirements in the traditional method; second, it uses the large model debugged through the business model to automatically generate SQL query statements, greatly improving the generation efficiency and accuracy of the data query statements; then, it directly queries the target data model through the large model to quickly obtain the data required for the report, significantly improving the timeliness of data processing; finally, after receiving the user instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business but also ensures that the report can flexibly adapt to the data analysis requirements of the new business scenario, overall improving the intelligent level and business adaptation ability of report generation. Through the report generation method based on the large model, this application can quickly respond to the flexible and changeable data requirements of the business, improve the efficiency of data acquisition and processing, and effectively adapt to the data analysis requirements of the new business scenario, thus solving the problem of data report generation in the prior art.

[0106] The device in this embodiment, in addition to including the above modules, may also include modules that execute any method in any of the foregoing embodiments of the report generation method based on the large model.

[0107] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run in the hardware environment for implementing the method as shown in Figure 1 and can be implemented by software or hardware. Among them, the hardware environment includes a network environment.

[0108] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above method for generating reports based on a large model. The electronic device can be a server, a terminal, or a combination thereof.

[0109] According to another embodiment of the present application, there is also provided an electronic device. Please refer to Figure 6 , Figure 6 which is a structural block diagram of an optional electronic device provided by the embodiments of the present application. As shown in Figure 6 , the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504. Among them, the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0110] The memory 1503 is used to store a computer program;

[0111] When the processor 1501 is used to execute the program stored in the memory 1503, the following steps are implemented:

[0112] Step S201: Obtain the report generation information input by the user. Among them, the report generation information is used to indicate at least one target data model required for querying when generating a report and the corresponding query conditions. Each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data. The query conditions are used to indicate the business data to be filtered and extracted when generating a report;

[0113] Step S202: Automatically generate a corresponding SQL query statement according to the at least one target data model and the corresponding query conditions indicated by the report generation information through a pre-debugged large model. Among them, the large model is obtained by debugging the model according to the model debugging data corresponding to the business;

[0114] Step S203: Query at least one target data model according to the SQL query statement through the large model, and extract the target data that meets the query conditions;

[0115] Step S204: After receiving the report generation instruction input by the user, generate a target report according to the extracted target data through the large model.

[0116] It can be understood that for the technical solution provided in this embodiment, the processor of the electronic device first obtains the report generation information input by the user, accurately locates the target data model and query conditions to be queried, and solves the problem of slow data demand response in the traditional method. Secondly, it uses the large model debugged by the business model to automatically generate SQL query statements, greatly improving the generation efficiency and accuracy of data query statements. Then, it directly queries the target data model through the large model to quickly obtain the data required for the report, significantly improving the timeliness of data processing. Finally, after receiving the user instruction, the large model immediately generates the target report, which not only meets the immediate needs of the business but also ensures that the report can flexibly adapt to the data analysis requirements of new business scenarios, overall improving the intelligent level and business adaptation ability of report generation. Through the report generation method based on the large model, this application can quickly respond to the flexible and changeable data needs of the business, improve the efficiency of data acquisition and processing, and effectively adapt to the data analysis requirements of new business scenarios, thus solving the problem of data report generation in the prior art.

[0117] Optionally, in this embodiment, the above communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above electronic device and other devices.

[0118] The memory may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0119] The above-mentioned processor may be a general-purpose processor, including but not limited to: CPU (Central Processing Unit, central processing unit), NP (Network Processor, network processor), etc.; it may also be a DSP (Digital Signal Processor, digital signal processor), ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), FPGA (Field-Programmable Gate Array, field-programmable gate array), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0120] The embodiment of the present application also provides a computer-readable storage medium, and the storage medium includes a stored program, wherein when the program runs, it executes the method steps of the above-mentioned method embodiment.

[0121] Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: various media that can store program codes such as USB flash drives, ROMs, RAMs, mobile hard disks, magnetic disks, or optical discs.

[0122] The serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0123] If the integrated unit in the above-mentioned embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above-mentioned computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in the storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application.

[0124] In the above-mentioned embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0125] In several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

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

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

[0128] The above is only the preferred embodiment of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A report generation method based on a large model, characterized in that: include: Acquiring report generation information input by a user, wherein the report generation information is used to indicate at least one target data model and corresponding query conditions required to be queried when generating a report, each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data, and the query conditions are used to indicate business data required to be screened and extracted when generating a report; Through the pre-debugged big model, the corresponding SQL query statement is automatically generated according to the at least one target data model indicated by the report generation information and the corresponding query condition in a multi-round conversation manner, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; the model debugging data includes: all data models, field information of each data model, relationship between data models, indicator library, constraint conditions, calculation formula of special indicators and date function for processing date data; the big model is obtained by model debugging according to the model debugging data corresponding to the business, including: configuring each data model, field information of each data model, and relationship between each data model into the basic framework of the big model; configuring the indicator library, wherein the indicator library stores multiple calculation indicators that meet business requirements, and each calculation indicator is an atomic indicator without other dimension modification; configuring the constraint conditions of the big model according to the indicator library, business logic and special requirements, wherein the constraint conditions are used to indicate indicators that cannot be processed by the big model; configuring the calculation formula of special indicators and the date function for processing date data; By using the large model, according to the SQL query statement, querying the at least one target data model, and extracting the target data that meets the query condition; After receiving the report generation instruction input by the user, the target report is generated according to the extracted target data through the large model.

2. The report generation method based on a large model according to claim 1 is characterized in that: Each data model in the at least one target data model is constructed according to business requirements, including: Obtain multiple business terms in the current business in the business system, as well as the explanation of each business term; Combing the original business data of the business system according to the multiple business terms to determine the data range of the business data corresponding to the current business; Performing data cleaning on the sorted original business data to obtain cleaned target business data, wherein the data cleaning is used to ensure the accuracy, completeness and uniqueness of all business data, and the data cleaning includes: processing missing values ​​in the original business data, deleting duplicate values ​​in the original business data, and converting the original business data into a unified format; A data model corresponding to the current business is constructed according to the target business data, wherein the model name of the data model is unique, and the data model includes a primary key and multiple fields, wherein each field corresponds to a data dimension.

3. The report generation method based on a large model according to claim 1 is characterized in that: By using the large model, according to the SQL query statement, querying the at least one target data model, and extracting target data that meets the query condition, including: The large model calls the data acquisition interface, executes the SQL query statement, queries the at least one target data model, and extracts target data that meets the query condition; The target data returned is obtained through a data return interface, and displayed in a preset display format, wherein the display format includes: a chart format or a view format.

4. The report generation method based on a large model according to claim 3 is characterized in that: Before the large model calls the data acquisition interface and executes the SQL query statement, it includes: Verify the legality of the SQL query statement, wherein the legality verification content includes: whether the syntax of the SQL query statement complies with the standard, whether the SQL query statement contains sensitive information, whether the data model in the SQL query statement exists, and whether the number of returned data records exceeds a preset value.

5. The report generation method based on a large model according to claim 1 is characterized in that: Generate a target report based on the extracted target data through the large model, including: The large model calls a report generation interface to process the data format of the target data to obtain data in a target format, wherein the target format is a format that meets the requirements of the business demander; The data in the target format is filled into the target report template to obtain the target report, wherein the target report template is a report template selected or designed by the big model according to business needs, and the target report template is used to define the structure, layout, style and data fields included in the report, and the target report is returned to the big model through the report generation interface in the form of a report link.

6. The report generation method based on a large model according to claim 5 is characterized in that: After obtaining the target report, including: The large model obtains the returned report link through the report generation interface, wherein the report link is used to indicate the address where the generated report is stored.

7. A report generation device based on a large model, characterized in that: include: A data acquisition module, used to acquire report generation information input by a user, wherein the report generation information is used to indicate at least one target data model and corresponding query conditions required to be queried when generating a report, each data model in the at least one target data model is constructed according to business requirements and is used to store and manage relevant business data, and the query conditions are used to indicate the business data required to be screened and extracted when generating a report; A query statement generation module is used to automatically generate a corresponding SQL query statement through a pre-debugged big model according to the at least one target data model indicated by the report generation information and the corresponding query conditions through multiple rounds of conversations, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; the model debugging data includes: all data models, field information of each data model, relationships between data models, indicator libraries, constraints, calculation formulas for special indicators, and date functions for processing date data; A data query module, used to query the at least one target data model through the large model according to the SQL query statement, and extract target data that meets the query condition; A report generation module, configured to generate a target report according to the extracted target data through the large model after receiving a report generation instruction input by a user; It also includes a module for debugging the model according to the model debugging data corresponding to the business to obtain the large model, including: configuring each data model, the field information of each data model, and the relationship between the data models into the basic framework of the large model; configuring an indicator library, wherein the indicator library stores a plurality of calculation indicators that meet business needs, and each calculation indicator is an atomic indicator without other dimensional modifications; configuring the constraint conditions of the large model according to the indicator library, business logic and special needs, wherein the constraint conditions are used to indicate indicators that cannot be processed by the large model; configuring calculation formulas for special indicators and date functions for processing date data.

8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is used to execute the report generation method based on the large model according to any one of claims 1 to 6 by running the computer program stored in the memory.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the report generation method based on a large model as claimed in any one of claims 1 to 6 when running.

Citation Information

Patent Citations

  • SQL statement generation method and device based on large model

    CN118981475A

  • Business intelligent report generation method and system based on large model and storage medium

    CN119202052A