Report generation method and device based on large model and electronic equipment
Through the report generation method based on the 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, efficient data processing and flexible report generation are realized, and data analysis needs are adapted to the data analysis needs of new business scenarios.
Patent Information
- Application Number
- CN202510054405.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-14
AI Technical Summary
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.
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.
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.
Smart Images

Figure CN119474108A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a report generation method, device and electronic equipment 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 increasingly fierce market competition, the traditional working model (i.e. business personnel put forward requirements, which are passed on to data engineers by product teams for development) can no longer meet the high requirements of enterprises for data timeliness and flexibility. This model 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. In order to cope with data challenges, enterprises generally adopt two main data acquisition methods: based on reporting platforms and based on OLAP (online analytical processing) systems. However, both methods have obvious limitations.
[0003] Reporting platforms usually provide preset dimensions and indicators. Although they can meet certain data needs, they are not flexible enough. When business personnel need to have a deeper understanding of other indicators, especially calculation 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 add new dimensional indicators, they need to resubmit the data requirements to data engineers for development, which further prolongs the data acquisition cycle. Compared with reporting platforms, OLAP systems are more flexible in data model design and can exhaust 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 time, 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 changing data needs of enterprises.
[0004] It can be seen that the existing technology is unable to quickly respond to the flexible and changeable data needs of the business, resulting in low efficiency in data acquisition and processing, and is difficult to adapt 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 problem that the prior art cannot quickly respond to the flexible and changeable data needs of the business, resulting in low efficiency in data acquisition and processing, and difficulty in adapting to the data analysis requirements of new business scenarios.
[0006] In order to achieve the above purpose, the technical solution adopted in this application is as follows: According to one aspect of an embodiment of the present application, a report generation method based on a big model is provided, comprising: obtaining 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 needs and is used to store and manage related business data, and the query conditions are used to indicate business data required to be screened and extracted when generating a report; automatically generating a corresponding SQL query statement according to at least one target data model and corresponding query conditions indicated by the report generation information through a pre-debugged big model, wherein the big model is obtained by model debugging based on model debugging data corresponding to the business; querying at least one target data model through the big model according to the SQL query statement, and extracting target data that meets the query conditions; after receiving the report generation instruction input by the user, generating a target report according to the extracted target data through the big model.
[0007] According to the above technical means, firstly, the report generation information input by the user is obtained, and the target data model and query conditions required for query are accurately located, which solves the problem of slow response to data demand in traditional methods; secondly, the big model that has been debugged by the business model is used to automatically generate SQL query statements, which greatly improves the generation efficiency and accuracy of data query statements; then, the target data model is directly queried through the big model to quickly obtain the data required for the report, which significantly improves the timeliness of data processing; finally, after receiving the user's instructions, the big model instantly generates the target report, which not only meets the immediacy 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 intelligence level of report generation and business adaptability.
[0008] Furthermore, model debugging data includes: all data models, field information of each data model, relationships between data models, indicator library, constraints, calculation formulas of special indicators, and date functions for processing date data. Model debugging is performed according to the model debugging data corresponding to the business to obtain a large model, including: configuring each data model, field information of each data model, and the relationship between each data model into the basic framework of the large model; configuring the indicator library, wherein the indicator library stores multiple calculation indicators that meet business needs, and each calculation indicator is an atomic indicator without modification of other dimensions; configuring the constraints of the large model according to the indicator library, business logic, and special needs, wherein the constraints are used to indicate indicators that cannot be processed by the large model; configuring the calculation formulas of special indicators and the date functions for processing date data.
[0009] Based on the above technical means, by fully integrating model debugging data and carefully defining and configuring it into the basic framework of the big model, the big model can achieve a deep understanding of business needs and efficient response. This not only ensures that the big model can accurately capture and process complex business logic, but also significantly improves the flexibility and adaptability of the big model by configuring atomic indicators that meet business needs, clear constraints, and calculation formulas and date functions for special indicators, so that it can accurately generate SQL query statements that meet business expectations, efficiently query and process data, and effectively solve the problems of low data processing efficiency and difficulty in adapting to new business scenarios in traditional report generation methods.
[0010] Furthermore, each data model in at least one target data model is constructed according to business requirements, including: obtaining multiple business terms in the current business in the business system and 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 combed original business data to obtain cleaned target business data, wherein data cleaning is used to ensure the accuracy, completeness and uniqueness of all business data, and 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, 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.
[0011] Based on the above technical means, by systematically acquiring business terms and their explanations, clarifying the scope of business data, and performing data cleansing to ensure the accuracy, completeness and uniqueness of the data (including processing missing values, deleting duplicate values, and unifying data formats), and finally building a uniquely named data model (including a primary key and multiple fields corresponding to data dimensions) based on the cleaned target business data, standardized management and efficient use 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.
[0012] Furthermore, through the big model, according to the SQL query statement, at least one target data model is queried, and the target data that meets the query conditions is extracted, including: the big 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 according to a preset display format, wherein the display format includes: chart format or view format.
[0013] According to the above technical means, by using the big model to call the data acquisition interface to execute SQL query statements, the target data for generating reports can be efficiently queried from the target data model, and the data can be returned through the data acquisition interface, and then displayed in a preset display format such as a chart or view. 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 support.
[0014] Furthermore, 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, 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 the preset value.
[0015] Based on the above technical means, by verifying the legitimacy of SQL query statements, including checking whether their syntax conforms to standards, whether they contain sensitive information, whether the referenced data model exists, and whether the estimated 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, thereby providing users with more reliable and efficient data query services.
[0016] Furthermore, a target report is generated according to the extracted target data through the big model, including: the big model calls the report generation interface, processes the data format of the target data, and obtains 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 a target report template to obtain a 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 included data fields of the report, and the target report is returned to the big model through the report generation interface in the form of a report link.
[0017] According to the above technical means, the report generation interface is called through the big model to process the target data in a format that meets business requirements, and the processed data is accurately filled into the 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.
[0018] Further, after obtaining the target report, the method includes: the large model obtains a returned report link through a report generation interface, wherein the report link is used to indicate an address where the generated report is stored.
[0019] According to the above technical means, after obtaining the target report, the big model further generates the corresponding report link and returns the link through the report generation interface, so that users can easily access the address where the report is stored. This step significantly improves the availability and accessibility of the report. Users do not need to manually search or download the report, but only need to click the link to quickly view the required content, thereby improving work efficiency and ensuring the timely delivery and effective use of report information.
[0020] According to another aspect of the embodiment of the present application, a report generation device based on a big model is also provided, including: a data acquisition module, used to obtain 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 needs, and is used to store and manage related 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, used to automatically generate corresponding SQL query statements according to at least one target data model and corresponding query conditions indicated by the report generation information through a pre-debugged big model, wherein the big model is obtained by model debugging based on model debugging data corresponding to the business; a data query module, used to query at least one target data model through the big model according to the SQL query statement, and extract target data that meets the query conditions; a report generation module, used to generate a target report according to the extracted target data through the big model after receiving the report generation instruction input by the user.
[0021] 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, 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; and the processor is used to execute the large model-based report generation method in any of the above embodiments by running the computer program stored in the memory.
[0022] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the report generation method based on the large model in any of the above embodiments when running.
[0023] Beneficial effects of this application: First, this application obtains the report generation information input by the user, accurately locates the target data model and query conditions required for query, and solves the problem of slow response to data needs in traditional methods; secondly, it uses a large model that has been debugged by the business model to automatically generate SQL query statements, which greatly improves the generation efficiency and accuracy of data query statements; then, the target data model is directly queried through the large model to quickly obtain the data required for the report, which significantly improves the timeliness of data processing; finally, after receiving the user's instructions, the large model instantly generates the target report, which not only meets the immediacy 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 intelligence level of report generation and business adaptability. This application uses a report generation method based on a large model to 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 It is a schematic diagram of a hardware environment of an optional report generation method based on a large model provided in an embodiment of the present application; Figure 2 It is a flowchart of an optional report generation method based on a large model provided in an embodiment of the present application; Figure 3 This 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; Figure 4 is a schematic diagram of an example of query result display provided in an embodiment of the present application; Figure 5 It is a structural block diagram of an optional report generation device based on a large model provided in an embodiment of the present application; Figure 6 It is a structural block diagram of an optional electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to one aspect of an embodiment of the present application, a report generation method based on a large model is provided. Optionally, in this embodiment, the report generation method based on a large model can be applied to a hardware environment consisting of a terminal and a server. The server is connected to the terminal via a network, and can be used to provide services for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server.
[0030] The above network may include but is not limited to at least one of the following: wired network, wireless network. The above wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, etc.
[0031] The report generation method based on the big model of the embodiment of the present application can be executed by the server, or by the terminal, or by both the server and the terminal. The terminal can also execute the report generation method based on the big model of the embodiment of the present application by the client installed thereon.
[0032] Take the example of the report generation method based on the large model in this embodiment executed by the server, Figure 1 , Figure 1Schematic diagram of a hardware environment of an optional report generation method based on a large model provided in an embodiment of the present application, such as Figure 1 As shown, the hardware environment of the report generation method based on the big model includes: a terminal 102, and a server 104 connected to the terminal 102 through a network. The server 104 is used to deploy the big model and all data models debugged with the model debugging data. The big model is used to execute the report generation method based on the big model of the embodiment of the present application. First, an SQL query statement is generated according to the report generation information input by the user, and then at least one target data model is queried according to the SQL query statement to obtain the target data, and finally a report is generated according to the target data; the terminal 102 is used for the interaction between the big model and the user to obtain the report generation information, and the terminal 102 is also used to display the generated SQL query statement and report.
[0033] In this embodiment, the report generation information is used to indicate at least one target data model and corresponding query conditions to be queried when generating a report, and 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.
[0034] Taking insurance business-related data as an example, the data model may include: user insurance data, customer complaint data, renewal data, and product data model. In specific practice, the data model is based on the enterprise central data warehouse to build a data model from a business perspective, that is, based on the enterprise central data warehouse, follow the three-paradigm design approach to build a data model that business personnel can understand, and all data in the model are translated into a language that business personnel can understand. For example, status 20 represents insured, which is directly adjusted to "insured" in Chinese. In addition, the description of each field in the data model should not be repeated, and all enumeration values of certain enumeration type fields need to be listed.
[0035] In the process of generating reports from a large model, instead of directly generating reports, a pre-developed data interface is called to execute the corresponding task, and then the results of the task execution are obtained through the data interface. In specific practice, the pre-developed data interface is a web interface that executes the SQL language and is developed based on the enterprise's internal central data warehouse environment, which can return data results. The pre-developed data interface may include: data acquisition interface, data return interface, report generation interface, and data download interface.
[0036] In practice, in order to prevent the big model from reasoning bias, before using the big model to generate reports, first use the model fine-tuning data to position the role of the big model and add basic behavioral constraints. The core of the model fine-tuning data is to clearly define the data model and the relationship between the data models, and at the same time inform the big model of the constraints that are prone to errors, so that the big model can infer and generate SQL query statements 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, indicator libraries, constraints, calculation formulas for special indicators, and date functions for processing date data.
[0037] The report generation method based on the large model in this embodiment can be applied to scenarios such as quick query of reports by relevant personnel of the enterprise (for example, business personnel). In today's rapidly changing business environment, enterprises are facing unprecedented data challenges and opportunities. With the rapid iteration of enterprise products and increasingly fierce market competition, the traditional working mode (that is, business personnel put forward requirements, which are passed to data engineers for development through product teams) can no longer meet the high requirements of enterprises for data timeliness and flexibility. This model 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 the enterprise. In order to meet data challenges, enterprises generally adopt two main data acquisition methods: based on reporting platforms and based on OLAP (online analytical processing) systems. However, both approaches have obvious limitations.
[0038] Reporting platforms usually provide preset dimensions and indicators. Although they can meet certain data needs, they are not flexible enough. When business personnel need to have a deeper understanding of other indicators, especially calculation 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 add new dimensional indicators, they need to resubmit the data requirements to data engineers for development, which further prolongs the data acquisition cycle. Compared with reporting platforms, OLAP systems are more flexible in data model design and can exhaust 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 time, 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 changing data needs of enterprises.
[0039] It can be seen that the existing technology cannot quickly respond to the flexible and ever-changing data needs of the business, resulting in low efficiency in data acquisition and processing, and it is difficult to adapt to the data analysis requirements of new business scenarios. To solve the above problems, this embodiment provides a report generation method based on a large model running on the above server, please refer to Figure 2 , Figure 2 It is a flowchart of an optional report generation method based on a large model provided in an embodiment of the present application, such as Figure 2 As shown, the report generation method based on the large model in the embodiment of the present application specifically includes the following steps: Step S201, obtaining 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; Step S202, automatically generating a corresponding SQL query statement according to at least one target data model indicated by the report generation information and the corresponding query condition through the pre-debugging big model, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; Step S203, querying at least one target data model through the big model according to the SQL query statement, and extracting target data that meets the query conditions; Step S204, after receiving the report generation instruction input by the user, a target report is generated according to the target data through the large model.
[0040] Through the above steps S201 to S204, firstly, the report generation information input by the user is obtained, and the target data model and query conditions required for query are accurately located, which solves the problem of slow response to data demand in the traditional method; secondly, the large model debugged by the business model is used to automatically generate SQL query statements, which greatly improves the generation efficiency and accuracy of data query statements; then, the target data model is directly queried through the large model to quickly obtain the data required for the report, which significantly improves the timeliness of data processing; finally, after receiving the user's instructions, the large model instantly generates the target report, which not only meets the immediacy requirements of the business, but also ensures that the report can flexibly adapt to the data analysis requirements of the new business scenario, and overall improves the intelligence level of report generation and business adaptability. It solves the problem that the existing technology cannot quickly respond to the flexible and changeable data requirements of the business, resulting in low efficiency of data acquisition and processing, and difficulty in adapting to the data analysis requirements of new business scenarios.
[0041] Combine the following Figure 2The report generation method based on the large model in the embodiment of the present application is explained.
[0042] In the technical solution of step S201, the 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 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. The query condition is used to indicate the business data required to be screened and extracted when generating a report.
[0043] Here, each data model is constructed according to business needs, which means: based on the enterprise central data warehouse, a data model from a business perspective is constructed, that is, based on the enterprise central data warehouse, following the three-paradigm design idea, a data model that business personnel can understand is constructed, and all data in the model is translated into a language that business personnel can understand. Taking insurance business-related data as an example, the data model may include: user insurance data, customer complaint data, renewal data, and product data model. Among them, the status 20 in the user insurance data represents insured, which is directly adjusted to "insured" in Chinese.
[0044] As an optional embodiment, each data model in at least one target data model is constructed according to business needs, including: obtaining multiple business terms in the current business in the business system, and 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 cleansing on the combed original business data to obtain cleaned target business data, wherein data cleaning is used to ensure the accuracy, completeness and uniqueness of all business data, and 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, 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.
[0045] In specific practice, first, demand analysis and data governance are carried out from a business perspective. Demand analysis and data governance from a business perspective specifically include the following steps: 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.
[0046] 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.
[0047] 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: 1. Design the data model based on the three paradigms, and clarify the data granularity, primary key, and data dimension of each data model. Data granularity indicates the meaning of the primary key of each data table in the data model. Take insurance business-related data as an example, for example: the policy table represents the policy information of the user's insurance, and the renewal data table, each policy corresponds to 12 renewals, and the table stores the renewal orders and details of 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 insurance company, product name, and policyholder information corresponding to this policy are all dimension information. It should be noted that all dimension information cannot have the same enumeration value or the same field meaning, and the interpretation of these dimension information and enumeration values must come from the information collected by the business side, for example: the payment time and whether the payment has been paid field, just keep the payment time. It is understandable that adopting a data model based on the three-paradigm design and specifying the data granularity, primary key and data dimension for each data model can ensure the clarity, standardization and consistency of the data structure, effectively avoid data redundancy and ambiguity, and at the same time ensure that all dimensional information comes from the business side, thereby enhancing the business interpretation and availability of the data and laying a solid foundation for accurate analysis and efficient decision-making of the insurance business.
[0048] 2. Determine the model name. The model name is a high-level summary of dimensional information, and the model name cannot be inconsistent with the dimensional information of the data dimension. Taking insurance business-related data as an example, if the data model is about policy-related data, then the model name and introduction cannot be written as insurance data or user data. It can be understood that through the above steps, it can be ensured that the model name accurately reflects the dimensional information it contains, which can avoid information confusion and misunderstanding, making the data model clearer and easier to understand, facilitating communication and collaboration between team members, and the rapid positioning and precise execution of data analysis and business decisions, thereby improving overall work efficiency and data value utilization.
[0049] 3. Update model data. Model data is updated with the latest value every day. Since the data model fields of traditional data warehouses are highly redundant and record historical data changes, etc., in this embodiment, the update strategy is not updated according to the traditional data warehouse development specifications, but according to the business model, only one snapshot is retained every day. It can be understood that the data of the data model adopts the data update strategy in this application and the daily snapshot update strategy, which can significantly simplify the data model, improve query efficiency, reduce storage costs, and ensure 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.
[0050] It is understandable that by systematically acquiring business terms and their explanations, clarifying the scope of business data, and performing data cleaning to ensure data accuracy, completeness, and uniqueness (including processing missing values, deleting duplicate values, and unifying data formats), and ultimately building a uniquely named data model based on the cleaned target business data (including a primary key and multiple fields corresponding to data dimensions), standardized management and efficient use 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.
[0051] In this embodiment, the target data model is selected from all pre-built data models according to the report generation information input by the user. As an optional specific implementation method, the following steps can be used to select the target data model from all data models: extracting dimension information from the report generation information input by the user; matching the dimension information with all data models, and determining the matched data model as the target data model. It can be understood that the above steps can accurately and quickly select the target data model 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.
[0052] In the technical solution of step S202, the corresponding SQL query statement is automatically generated according to at least one target data model indicated by the report generation information and the corresponding query condition through the pre-debugged big model. In this embodiment, the big model is obtained by model debugging according to the model debugging data corresponding to the business. The model debugging data is used to debug the big model, which is a prerequisite for preventing the big model from reasoning bias. Before using the big model to generate a report, the model fine-tuning data is first used to locate the role of the big model and add basic behavior constraints. The core of the model fine-tuning data is: clearly define the data model and the relationship between the data model, and at the same time inform the big model of the constraints that are prone to errors, so that the big model can infer and generate SQL query statements under the configured data model. In this embodiment, the model debugging data includes: all data models, field information of each data model, relationship between data models, indicator library, constraints, calculation formulas for special indicators, and date functions for processing date data.
[0053] As an optional embodiment, the big model is obtained by debugging the model according to the model debugging data corresponding to the business, 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 big model; configuring an indicator library, wherein the indicator library stores multiple calculation indicators that meet business needs, and each calculation indicator is an atomic indicator without other dimensional modifications; configuring the constraints of the big model according to the indicator library, business logic and special needs, wherein the constraints are used to indicate indicators that the big model cannot handle; configuring calculation formulas for special indicators and date functions for processing date data.
[0054] In practice, using model debugging data to debug a large model includes the following steps: 1. All data models, field information in each data model, and the relationship between data models are configured to the big model. It is understandable that by configuring all data models to the big model, it is clear that the big model can automatically obtain the data range. At the same time, by clarifying the structure and relationship of the data in the big model, data redundancy, inconsistency or omission problems can be avoided, providing a solid foundation for subsequent data analysis, which helps to improve data processing efficiency and ensure data quality, and is a prerequisite for model debugging and data application.
[0055] 2. Configure the indicator library and provide the calculable indicators to the big model. It should be noted that the indicators in the indicator library are atomic indicators and cannot be modified by other dimensions. Taking insurance business-related data as an example, the indicators in the indicator library include: number of policies, number of users, and number of orders. If the user may ask how many takeout orders there are, the data model cannot answer this question because the data model cannot calculate takeout orders here. It is understandable that the use of indicators in the indicator library constrains what the big model can calculate. By integrating the calculable indicators into the indicator library, the big model can easily call these indicators for data analysis without having to write the calculation logic from scratch every time. This not only improves work efficiency, but also ensures the consistency and accuracy of indicator calculation. In addition, the establishment of the indicator library also facilitates subsequent data analysis and model optimization.
[0056] 3. Configure the constraints of the large model, the calculation formulas of special indicators, and the date functions for processing date data. The constraints are determined in combination with business needs and are used to constrain the indicators that cannot be generated by the large model. In this embodiment, the calculation formulas of special indicators need to be configured separately, and the dates need to be processed separately using date functions. If the date functions are not fixed, the large model is prone to associations, resulting in the problem of reduced or increased data statistics in the date filtering conditions. It can be understood that by configuring the constraints, it can be ensured that the model follows certain rules and restrictions when processing data to avoid data anomalies or unreasonable results. At the same time, configuring the calculation formulas and date functions of special indicators can meet specific data analysis needs, so that the model can more accurately reflect the actual situation of the data. This step helps to improve the accuracy and reliability of the model and provide strong support for data decision-making.
[0057] It is understandable that by fully integrating model debugging data and carefully defining and configuring it into the basic framework of the big model, the big model has achieved a deep understanding of business needs and efficient response. This not only ensures that the big model can accurately capture and process complex business logic, but also significantly improves the flexibility and adaptability of the big model by configuring atomic indicators that meet business needs, clear constraints, and providing calculation formulas and date functions for special indicators, so that it can accurately generate SQL query statements that meet business expectations, efficiently query and process data, and effectively solve the problem of low data processing efficiency and difficulty in adapting to new business scenarios in traditional report generation methods.
[0058] In the technical solution of step S203, at least one target data model is queried through the big model 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 big 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 the business data is finally displayed in the form of a report.
[0059] In the process of generating reports from a large model, instead of directly generating reports, a pre-developed data interface is called to execute the corresponding task, and then the results of the task execution are obtained through the data interface. In specific practice, the pre-developed data interface is a web interface that executes the SQL language and is developed based on the enterprise's internal central data warehouse environment, which 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.
[0060] When the big model needs to query the target data model and extract the target data that meets the query conditions based on the generated SQL query statement, the big model usually calls the data acquisition interface and the data return interface.
[0061] As an optional embodiment, at least one target data model is queried through a big model according to an SQL query statement, and target data that meets the query conditions is extracted, including: the big model calls a data acquisition interface, executes an SQL query statement, queries at least one target data model, and extracts target data that meets the query conditions; the returned target data 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.
[0062] In specific practice, the big model will call the data acquisition interface and send the SQL query statement to the cloud platform, so that the cloud platform will directly execute the SQL query statement, obtain data from the target data model of the central data warehouse, calculate the indicators that need to be calculated, and finally obtain the target data. The target data is returned to the big model through the data return interface. The big model automatically selects the display format according to the number of data records in the target data, where the display format includes a chart format or a view format.
[0063] 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 demander. For example: process the time data into the "YYYY-mm-dd HH:MM:SS" format; remove special symbols such as "\N" in characters and numbers.
[0064] It can be understood that by using the big model to call the data acquisition interface to execute SQL query statements, the target data for generating reports can be efficiently queried from the target data model, and the data can be returned through the data acquisition interface, and then displayed in a preset display format such as a chart or view. 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 support.
[0065] In actual practice, the cloud platform needs to verify the legitimacy of the SQL query statement before executing it to ensure that the SQL query statement can be executed.
[0066] As an optional 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, 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 the preset value.
[0067] In actual practice, the cloud platform verifies the legality of SQL statements, including at least the following: whether the SQL syntax complies with the standard, whether sensitive information and model information exist, and whether the number of returned data records exceeds the preset value. In actual applications, if the SQL statement is illegal and the queried table does not exist, the big model will remind the user that the SQL query statement is illegal; if there is sensitive information in the SQL statement, the big model will remind the user that if sensitive information is present in the extracted data, please contact the relevant data BP.
[0068] It is understandable that by verifying the legitimacy of SQL query statements, including checking whether their syntax conforms to standards, whether they contain sensitive information, whether the referenced data model exists, and whether the estimated 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, thereby providing users with more reliable and efficient data query services.
[0069] In the technical solution of step S204, 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.
[0070] As an optional embodiment, a target report is generated according to the extracted target data through the big model, including: the big model calls the report generation interface, processes the data format of the target data, and obtains the data in the target format, wherein the target format is a format that meets the requirements of the business demand party; 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 included data fields of the report, and the target report is returned to the big model through the report generation interface in the form of a report link.
[0071] In specific practice, after receiving the report generation instruction input by the user, the big model calls the report generation interface, automatically creates a schedule through the report platform, automatically generates a report, and returns it to the big model through the report generation interface in the form of a report link.
[0072] It is understandable that the process of calling the report generation interface through the big model, formatting the target data to meet business needs, and accurately filling the processed data into the pre-selected or designed target report template has greatly improved 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.
[0073] It should be noted that the final target report is returned to the big 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 here.
[0074] As an optional embodiment, after obtaining the target report, the method includes: the large model obtains a returned report link through a report generation interface, wherein the report link is used to indicate an address where the generated report is stored.
[0075] In actual practice, report links are used by users to view data later. When users select a report link to download a generated report, the big model calls the data download interface to download the report to the local computer.
[0076] It is understandable that after obtaining the target report, the large model further generates a corresponding report link and returns the link through the report generation interface, so that users can easily access the address where the report is stored. This step significantly improves the availability and accessibility of the report. Users do not need to manually search or download the report, but only need to click the link to quickly view the required content, thereby improving work efficiency and ensuring the timely delivery and effective use of report information.
[0077] In practice, a multi-round conversation mode is used to communicate with users based on their intentions, and at least dimension information and time information are determined. In particular, in the data model, field information that the model cannot accurately judge needs to be confirmed by the user. Specifically, the big model extracts dimensions and indicators according to the questions raised by the user, matches them with the table fields and indicator library, and inquires about the information that cannot be matched one by one. For example: the user asked, "What is the number of insurance policies in the last 30 days?", then the date of 30 days specifically refers to the insurance date or the effective date. This date is a vague period, which requires the big model to ask the user what date you need to use. If the user confirms the insurance date, the big model automatically generates a SQL query statement and executes the SQL query statement to obtain the number of insurance policies corresponding to the insurance date in the last 30 days (that is, the target data). After receiving the report generation instruction entered by the user, the target report is generated according to the target data.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and 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 the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory, read-only memory) / RAM (Random Access Memory, random access memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0084] According to another aspect of the embodiment of the present application, a report generation device based on a large model is provided for implementing the report generation method based on a large model. Figure 5 , Figure 5 is a structural block diagram of an optional report generation device based on a large model provided in an embodiment of the present application, such as Figure 5 As shown, the report generation device 500 based on the large model may include: The data acquisition module 501 is used to acquire report generation information input by the 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 related 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 generating module 502 is used to automatically generate a corresponding SQL query statement based on a pre-debugged big model and at least one target data model indicated by the report generation information and a corresponding query condition, wherein the big model is obtained by model debugging based on model debugging data corresponding to the business; The data query module 503 is used to query at least one target data model through the big model according to the SQL query statement, and extract the target data that meets the query conditions; The report generation module 504 is used to generate a target report according to the extracted target data through the large model after receiving a report generation instruction input by the user.
[0085] 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.
[0086] Regarding the report generating device 500 based on the big model in this embodiment, the specific manner in which its data acquisition module 501, query statement generating module 502, data query module 503 and report generating module 504 execute the above-mentioned report generating method based on the big model has been described in detail in the embodiment of the report generating method based on the big model, and will not be elaborated here.
[0087] It can be understood that the technical solution provided by this embodiment, each module in the report generation device based on the big model, first, obtains the report generation information input by the user, accurately locates the target data model and query conditions required for query, and solves the problem of slow response to data demand in the traditional method; secondly, the big model debugged by the business model is used to automatically generate SQL query statements, which greatly improves the generation efficiency and accuracy of data query statements; then, the target data model is directly queried through the big model to quickly obtain the data required for the report, which significantly improves the timeliness of data processing; finally, after receiving the user's instructions, the big model instantly generates the target report, which not only meets the immediacy requirements of the business, but also ensures that the report can flexibly adapt to the data analysis requirements of the new business scenario, and overall improves the intelligence level of report generation and business adaptability. This application can quickly respond to the flexible and changeable data needs of the business through a report generation method based on a big model, 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.
[0088] The device in this embodiment, in addition to the above modules, may also include a module for executing any method in any of the above embodiments of the report generation method based on a large model.
[0089] It should be noted that the above modules and corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can be run in the implementation of Figure 1 The hardware environment of the method shown may be implemented by software or hardware, wherein the hardware environment includes a network environment.
[0090] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned report generation method based on a large model is also provided. The electronic device can be a server, a terminal, or a combination thereof.
[0091] According to another embodiment of the present application, an electronic device is also provided. Figure 6 , Figure 6 is a structural block diagram of an optional electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0092] Memory 1503, used for storing computer programs; The processor 1501 is used to implement the following steps when executing the program stored in the memory 1503: Step S201, obtaining 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; Step S202, automatically generating a corresponding SQL query statement according to at least one target data model indicated by the report generation information and the corresponding query condition through the pre-debugging big model, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; Step S203, querying at least one target data model through the big model according to the SQL query statement, and extracting target data that meets the query conditions; Step S204, after receiving the report generation instruction input by the user, a target report is generated according to the extracted target data through the large model.
[0093] It can be understood that the technical solution provided by this embodiment is that 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 required for query, and solves the problem of slow response to data demand in the traditional method; secondly, the large model debugged by the business model is used to automatically generate SQL query statements, which greatly improves the generation efficiency and accuracy of data query statements; then, the target data model is directly queried through the large model to quickly obtain the data required for the report, which significantly improves the timeliness of data processing; finally, after receiving the user's instructions, the large model instantly generates the target report, which not only meets the immediacy requirements of the business, but also ensures that the report can flexibly adapt to the data analysis requirements of the new business scenario, and overall improves the intelligence level of report generation and business adaptability. This application can quickly respond to the flexible and changeable data needs of the business through a report generation method based on a large model, 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.
[0094] Optionally, in this embodiment, the above-mentioned communication bus can be a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used 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-mentioned electronic device and other devices.
[0095] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0096] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0097] An embodiment of the present application further provides a computer-readable storage medium, the storage medium including a stored program, wherein the method steps of the above method embodiment are executed when the program is run.
[0098] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0099] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0100] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0101] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0102] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0105] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present 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; Automatically generate a corresponding SQL query statement according to the at least one target data model indicated by the report generation information and the corresponding query condition through a pre-debugged big model, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; 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: 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; The large model is obtained by performing model debugging according to the model debugging data corresponding to the business, including: Configuring each data model, field information of each data model, and the relationship between the data models into the basic framework of the large model; Configure an 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 modifications; According to the indicator library, business logic and special needs, configure the constraint conditions of the large model, wherein the constraint conditions are used to indicate the indicators that the large model cannot process; Configure calculation formulas for special indicators and date functions for working with date data.
3. 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.
4. 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.
5. The report generation method based on a large model according to claim 4 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.
6. 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.
7. The report generation method based on a large model according to claim 6 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.
8. 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, used to automatically generate a corresponding SQL query statement according to the at least one target data model indicated by the report generation information and the corresponding query condition through a pre-debugged big model, wherein the big model is obtained by model debugging according to the model debugging data corresponding to the business; 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; The report generation module is used to generate a target report according to the extracted target data through the large model after receiving a report generation instruction input by the user.
9. 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 7 by running the computer program stored in the memory.
10. 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 7 when running.
Citation Information
Patent Citations
Application method and system of intelligent report in government affair industry based on large model
CN118820316A
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
Data query method and apparatus
WO2015195830A2
Cited By
Logistics report generation method and system based on large model technology
CN119990086A
Table processing method, device and equipment based on intelligent agent and storage medium
CN120257964A
Report generation method and related product
CN120633619A
Data generation method and device, computer equipment and storage medium
CN120804176A
Method for quickly generating report template according to picture
CN121581004A