Data analysis report generation method and related device

Through a large language model, determine the components and requirements of data analysis reports, automatically obtain data and select analysis algorithms, and generate data analysis reports, solving the problem of high complexity in the existing technology, improving efficiency and accuracy.

CN119250051AInactive Publication Date: 2025-01-03ASIAINFO TECH CHINA INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411776503.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the generation of data analysis reports is relatively complex, dependent on the professional skills and experience of data analysts, and the efficiency and accuracy of generating reports are difficult to guarantee.

Method used

A large language model is used to determine the components of the reference report sample and its data analysis requirements, obtain the data to be analyzed from the database, and select the appropriate data analysis algorithm for processing, and finally generate a data analysis report.

Benefits of technology

It reduces the complexity of data analysis report generation, improves the efficiency and accuracy of report generation, reduces the limitations on custom report structure, and improves the flexibility of data analysis reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250051A_ABST
    Figure CN119250051A_ABST
Patent Text Reader

Abstract

The invention discloses a data analysis report generation method and a related device, and relates to the technical field of data analysis, and the method comprises the following steps: determining at least one component of a reference report sample uploaded by a user and a data analysis demand of each component by using a large language model; for each constituent part, based on the data analysis requirement of the constituent part, determining to-be-analyzed data corresponding to the constituent part from a database by using a large language model, and determining at least one target data analysis algorithm from a plurality of data analysis algorithms; analyzing and processing the to-be-analyzed data corresponding to the components according to at least one target data analysis algorithm to obtain data analysis results of the components; and generating a data analysis report by using a large language model in combination with at least one component of the reference report sample and the to-be-analyzed data and the data analysis result corresponding to each component. According to the scheme, the complexity of generating the data analysis report can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data analysis technology, and in particular to a data analysis report generation method and related devices. Background Art

[0002] Enterprises and scientific research institutions often involve data analysis and need to generate corresponding data analysis reports.

[0003] At present, data analysis reports are mainly written manually by data analysts. Based on this, after analyzing the data, data analysts still need to rely on their own professional skills and experience to complete the writing of data analysis reports, making the generation of data analysis reports more complicated. Summary of the invention

[0004] In view of the above problems, the present application provides a data analysis report generation method and related devices to reduce the complexity of generating data analysis reports.

[0005] The first aspect of the present application provides a method for generating a data analysis report, comprising: Obtaining a reference report sample uploaded by a user, wherein the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results to be presented; Determine at least one component of the reference report sample and data analysis requirements of each component by using a large language model; For each component of the reference report sample, based on the data analysis requirements of the component, using the large language model to determine the data to be analyzed corresponding to the component from the database; Based on the data analysis requirements of the component, determine at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model; Analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component; The data analysis report is generated using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results corresponding to each component.

[0006] In a possible implementation manner of the first aspect, the using a large language model to determine at least one component of the reference report sample and a data analysis requirement for each component includes: Determine the data analysis scenario type corresponding to the reference report sample using a large language model; Determining at least one prompt word associated with the data analysis scenario type from a prompt word library, wherein the prompt word library includes: a plurality of prompt words extracted from data analysis report samples corresponding to different types of data analysis scenarios, wherein the prompt word is used to characterize a sample component of the data analysis report sample; Based on at least one prompt word associated with the data analysis scenario type, the large language model is used to determine at least one component of the reference report sample and the data analysis requirements of each component.

[0007] In another possible implementation manner of the first aspect, the determining, based on the data analysis requirement of the component, the data to be analyzed corresponding to the component from a database by using the large language model includes: Querying at least one set of target table information matching the data analysis requirements of the component from a table information repository, wherein the table information repository includes multiple sets of table information, each set of table information corresponds to a data table in a database, and the table information is used to characterize component feature information of the data table; Based on the data analysis requirements corresponding to the components and the at least one set of target table information, generating a data query statement using the large language model; The data query statement is used to query the data to be analyzed corresponding to the component from the database.

[0008] In another possible implementation of the first aspect, based on the data analysis requirements of the component, determining at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model includes: Obtaining algorithm feature description information of each of the preset multiple data analysis algorithms; Based on the data analysis requirements of the component and the algorithm feature description information of each of the preset multiple data analysis algorithms, the large language model is used to determine at least one target data analysis algorithm suitable for the component from the multiple data analysis algorithms.

[0009] In another possible implementation manner of the first aspect, after determining at least one component of the reference report sample and the data analysis requirement of each component, the method further includes: Outputting at least one component of the reference report sample and data analysis requirements of each component to an interactive interface; If a modification description sentence input by the user in the interactive interface is obtained, the user's modification intention for at least one component is determined using the large language model based on the modification description sentence and a preset intention template, wherein the intention template records the modifiable component types and the modifiable methods corresponding to each component type; In combination with the user's modification intention to the at least one component, the large language model is used to adjust the at least one component of the reference report sample and the data analysis requirements of each component.

[0010] In another possible implementation manner of the first aspect, before analyzing and processing the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm, the method further includes: Using principal component analysis technology to perform dimensionality reduction processing on the data to be analyzed of the component to obtain the dimensionality reduced data corresponding to the component; The analyzing and processing the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm includes: The dimensionally reduced data corresponding to the components are analyzed and processed according to the at least one target data analysis algorithm.

[0011] A second aspect of the present application provides a data analysis report generating device, comprising: A sample obtaining unit, used to obtain a reference report sample uploaded by a user, wherein the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results to be presented; A sample analysis unit, used for determining at least one component of the reference report sample and a data analysis requirement of each component by using a large language model; A data query unit, configured to determine, for each component of the reference report sample, based on data analysis requirements of the component, data to be analyzed corresponding to the component from a database using the large language model; an algorithm determination unit, configured to determine at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model based on the data analysis requirements of the component; A data analysis unit, configured to analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component; The report generating unit is used to generate the data analysis report by using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results corresponding to each component.

[0012] In a third aspect of the present application, a computer program product is provided, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the data analysis report generation method as described in any one of the above.

[0013] In a fourth aspect of the present application, an electronic device is provided, comprising at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the data analysis report generating method as described in any one of the above.

[0014] In a fifth aspect of the present application, a computer storage medium is provided, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the data analysis report generation method as described in any one of the above.

[0015] From the above content, it can be seen that this application can determine at least one component of the reference report sample uploaded by the user and the data analysis requirements of each component with the help of a large language model, and can obtain the data to be analyzed corresponding to the component from the database and determine the target data analysis algorithm suitable for the component in combination with the data analysis requirements of each component. On this basis, after analyzing the data to be analyzed corresponding to the component according to at least one target data analysis algorithm corresponding to each component, the large language model can be used to generate the required data analysis report in combination with each component and its corresponding data to be analyzed and data analysis results. Therefore, the user only needs to upload a reference report sample that can characterize the component structure of the data analysis report to be generated and the data analysis results to be presented, without having to perform complex operations such as data analysis and analysis report writing, and then the data analysis report can be generated, reducing the complexity of generating the data analysis report. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0017] Figure 1 A flow chart of a method for generating a data analysis report provided in this application; Figure 2 A schematic diagram of another process of the method for generating a data analysis report provided in this application; Figure 3A schematic diagram of an implementation principle framework of the data analysis report generation method provided in this application; Figure 4 A schematic diagram of the structure of a data analysis report generating device provided in this application; Figure 5 A schematic diagram of the composition architecture of an electronic device provided in this application. DETAILED DESCRIPTION

[0018] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0019] 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 need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0020] like Figure 1 , showing a flow chart of the data analysis report generation method provided in an embodiment of the present application. The method of this embodiment can be applied to an electronic device, which can be a node device in a cloud platform, a cluster system or a distributed system, or a separate server, or a personal computer device, etc., without limitation.

[0021] The method of this embodiment may include: S101, obtaining a reference report sample uploaded by a user.

[0022] Among them, the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results that need to be presented.

[0023] For example, the components of the reference report sample may be the same as or similar to the components required for the data analysis report to be generated, and each component in the reference report sample indicates the data analysis results that the corresponding component in the data analysis report needs to present.

[0024] For example: In one example, the reference report sample may be a historical data analysis report belonging to the same data analysis scenario as the data analysis report to be generated. In this case, the reference report sample may have the same components as the data analysis report to be generated, and the data analysis results presented by the components in the reference report sample are of the same type as the data analysis results that need to be presented in the data analysis report, except that the data analysis results in the reference report sample are obtained based on the historical data analysis in the data analysis scenario, while the data analysis report to be generated needs to be generated based on the latest data in the data analysis scenario.

[0025] In another example, the reference report sample may be a report template constructed by the user. In this case, the reference report sample may include various components corresponding to the data analysis report that the user wishes to generate, and each component of the reference report sample may include descriptive information for describing the data analysis results that the component wishes to present.

[0026] Of course, there may be other possibilities for the reference report sample, and this application does not limit the specific form and acquisition method of the reference report sample.

[0027] In the present application, in order to facilitate interaction with the user, the electronic device can also output an interactive interface, and the user can upload the reference report sample on the interactive interface, without specific restrictions.

[0028] S102: Determine, using a large language model, at least one component of a reference report sample and data analysis requirements for each component.

[0029] For example, a reference report sample and a first prompt statement for instructing the large language model to determine the data analysis requirements of each component in the reference report sample are input into the large language model. The large language model can output the name or number of each component of the reference report sample and the data analysis requirements of each component in combination with the first prompt statement and the reference report sample.

[0030] The components of the sample reference report are the various parts that make up the sample reference report, and each component can be a module of the sample reference report. For example, the parts under each title or subtitle in the sample reference report are a component of the sample reference report. For example, the sample reference report can be divided into several components, such as an introduction, a data overview, a detailed analysis, and a summary.

[0031] The data analysis requirements of a component are used to characterize the data source that needs to be analyzed by the component, as well as the expected data analysis method or the desired data analysis results.

[0032] For example, the data analysis requirement can be to query the income of users in each province, analyze the per capita income of different regions in each province, and determine the per capita income of the top three provinces with the highest average income and the per capita income of the three provinces with the lowest average income. Therefore, it can be seen that the data to be analyzed for this data analysis requirement is: the per capita income data of each province, and the desired data analysis result is the per capita income of the three provinces with the highest per capita income and the three provinces with the lowest average income.

[0033] S103, for each component of the reference report sample, based on the data analysis requirements of the component, the large language model is used to determine the to-be-analyzed data corresponding to the component from the database.

[0034] The data to be analyzed corresponding to the component is obtained from the database and is the data required to be analyzed to achieve the data analysis requirement, that is, the data that needs to be analyzed by the component.

[0035] S104: Based on the data analysis requirements of the component, at least one target data analysis algorithm suitable for the component is determined from a plurality of preset data analysis algorithms using a large language model.

[0036] The target data analysis algorithm suitable for the component is a data analysis algorithm suitable for analyzing and processing the data to be analyzed corresponding to the component. In the application, for the sake of distinction, the data analysis algorithm suitable for the component is referred to as the target data analysis algorithm.

[0037] It can be understood that the data analysis requirements of each component can characterize what kind of analysis needs to be performed on the data of the component or what kind of analysis results need to be obtained. Therefore, through the data analysis requirements, with the help of the large language model, it is possible to determine the data analysis algorithm suitable for processing the data to be analyzed for the component.

[0038] For example, in a possible implementation, the present application can obtain algorithm feature description information of each of the preset multiple data analysis algorithms. On this basis, for each component in the reference report sample, based on the data analysis requirements of the component and the algorithm feature description information of each of the preset multiple data analysis algorithms, a large language model is used to determine at least one target data analysis algorithm suitable for the component from the multiple data analysis algorithms.

[0039] The algorithm feature description information of the data analysis algorithm may at least include the application purpose of the data analysis algorithm, such as the application purpose indicates what type of data analysis is performed and what the result of the data analysis is, etc. Of course, the algorithm feature description information may also include part or all of the application scenarios, advantages and disadvantages of the data analysis algorithm.

[0040] For example, the data analysis requirements of the component, the identification of each data analysis algorithm (such as the name), the algorithm feature description information of each data analysis algorithm, and a second prompt statement for prompting the large language model to determine a suitable data analysis algorithm can be input into the large language model to obtain information such as the identification of at least one target data analysis algorithm output by the large language model.

[0041] In this application, the preset multiple data analysis algorithms can be configured according to actual needs without restriction. For example, the preset multiple data analysis algorithms include but are not limited to: standard score (Z-score) anomaly detection, year-on-year analysis, and sliding average data analysis algorithms. Among them, the Z-score anomaly detection algorithm is suitable for identifying extreme values ​​or abnormal points in the data. The year-on-year analysis algorithm is used to compare the changes in data in different time periods (such as year-on-year and year-on-year); the sliding average algorithm is used to smooth data fluctuations and reveal the long-term trends behind the data.

[0042] Of course, the preset multiple data analysis algorithms may also include other data analysis algorithms for identifying abnormal points and trend changes in data, and there may be multiple data analysis algorithms with the same function.

[0043] S105, analyzing and processing the data to be analyzed corresponding to the component according to at least one target data analysis algorithm to obtain a data analysis result of the component.

[0044] It can be understood that after determining the target data analysis algorithm applicable to the component, the analysis and processing process of the data to be analyzed based on the target data analysis algorithm may be related to the specific algorithm implementation of the target data analysis algorithm, and this application does not impose any restrictions on the specific implementation.

[0045] In an optional manner, in order to reduce the data analysis efficiency caused by the high dimension of the data to be analyzed, the present application can also use principal component analysis (PCA) and other dimensionality reduction techniques to reduce the dimensionality of the data to be analyzed of the component before analyzing and processing the data to be analyzed corresponding to the component, so as to obtain the reduced dimensionality data corresponding to the component. Accordingly, the reduced dimensionality data corresponding to the component can be analyzed and processed based on at least one target data analysis algorithm, thereby improving the efficiency of data analysis and processing.

[0046] In particular, when at least one target data analysis algorithm includes an anomaly detection algorithm such as Z-score, after performing an anomaly analysis on the component data to be analyzed based on the anomaly detection algorithm, the present application can also use clustering algorithms such as K-means to cluster the data to be analyzed to obtain dimensional data corresponding to multiple clusters. Then, based on these dimensional data, a root cause dimension set can be constructed, and the abnormal data can be deeply analyzed based on the root cause analysis algorithm of HotSpot to locate the root cause of the anomaly, and the specific process is not limited.

[0047] It can be understood that for each component of the reference report sample, the above steps S103 to S105 need to be performed to finally obtain the data to be analyzed and the data analysis results of each component.

[0048] S106, generating the data analysis report using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results corresponding to each component.

[0049] For example, the large language model can combine at least one component of the reference report sample, as well as the data to be analyzed and the data analysis results corresponding to each component in the report to be analyzed that needs to be generated, and merge the data to be analyzed and the data analysis results corresponding to each component to obtain a data analysis report.

[0050] It is understandable that after the data analysis report is generated using the large language model, the present application can also output the data analysis report to the interactive interface so that the user can view the data analysis report in a timely manner.

[0051] From the above content, it can be seen that this application can determine at least one component of the reference report sample uploaded by the user and the data analysis requirements of each component with the help of a large language model, and can obtain the data to be analyzed corresponding to the component from the database and determine the target data analysis algorithm suitable for the component in combination with the data analysis requirements of each component. On this basis, after analyzing the data to be analyzed corresponding to the component according to at least one target data analysis algorithm corresponding to each component, the large language model can be used to generate the required data analysis report in combination with each component and its corresponding data to be analyzed and data analysis results. Therefore, the user only needs to upload a reference report sample that can characterize the component structure of the data analysis report to be generated and the data analysis results to be presented, without having to perform complex operations such as data analysis and analysis report writing, and then the data analysis report can be generated, reducing the complexity of generating the data analysis report.

[0052] In addition, the solution of the present application uses a large language model to automatically determine the components of the reference report samples uploaded by the user and their data analysis requirements, and can be applied to the analysis and processing of any type of reference report samples, thereby eliminating the need for users to strictly prepare data according to the preset template format, reducing restrictions on custom report structures, and improving the flexibility of data analysis reports.

[0053] Moreover, the present application uses a large language model to complete data query, analysis, and report generation, and can use the data processing performance of the large language model to improve the efficiency and accuracy of data analysis report generation.

[0054] In the present application, there are many possibilities for the specific implementation of determining the data to be analyzed of a component with the help of a large language model. For example, in one possible implementation, for each component, the large language model can be used to query the data to be analyzed corresponding to the component based on the data analysis requirements of the component and the data tables contained in the database.

[0055] Due to the large number of data tables in the database, if the large language model is used to query the data to be analyzed directly based on the data analysis requirements, it will inevitably lead to excessive data query volume, which is not only time-consuming but also affects the accuracy of the obtained data to be analyzed. Based on this, in another possible implementation method, the present application also pre-constructs a table information library, which includes multiple groups of table information, each group of table information corresponds to a data table in the database, and each table information is used to characterize the composition feature information of a data table.

[0056] The table information base can be obtained by analyzing the composition of multiple data tables in the database.

[0057] The composition characteristic information of the data table may at least represent the name of the data table and the fields it contains. For example, the composition characteristic information of the data table may include part or all of the information such as the table name of the data table, the fields included in the data table, the relationship between the fields, the dimensions and meanings of the data under certain fields in the data table, the metadata information of the data table, and the business definition corresponding to the data recorded in the data table.

[0058] On this basis, the present application can first query at least one set of target table information matching the data analysis requirements of the component from the table information library, and then, based on the data analysis requirements corresponding to the component and the at least one set of target table information, generate a data query statement using the large language model. On this basis, the data query statement can be used to query the data to be analyzed corresponding to the component from the database.

[0059] It is understandable that there are many possibilities for the specific implementation of the present application to determine the components of the reference report sample and the data analysis requirements of the components by means of a large language model. The following is an introduction to the data analysis report generation method of the present application in conjunction with an implementation method.

[0060] like Figure 2 , shows another flow chart of the method for generating a data analysis report provided by the present application. The method of this embodiment may include: S201, obtaining a reference report sample uploaded by a user.

[0061] Among them, the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results that need to be presented.

[0062] In the present application, the reference report sample may be in a text format, such as a word document, or in a picture format, such as a PDF format, etc., without limitation.

[0063] Before executing step S202, the present application may also pre-process the reference report sample, such as converting the reference report sample in image format such as PDF into text; and performing data cleaning on the reference report sample, for example, removing irrelevant formats such as spaces and placeholders in the reference report sample, or removing image data contained therein.

[0064] S202: Determine the data analysis scenario type corresponding to the reference report sample using a large language model.

[0065] The data analysis scenario type is used to characterize the type of data analysis scenario that the reference report sample is targeting. For example, the types of possible data analysis scenarios may include, but are not limited to, consumer behavior data analysis in the business field, business decision data analysis in the business field, credit rating data analysis in the financial industry, and product sales data analysis in the retail industry.

[0066] S203: Determine at least one prompt word associated with the data analysis scenario type from the prompt word library.

[0067] The prompt word library includes: multiple prompt words extracted from data analysis report samples corresponding to different types of data analysis scenarios. The prompt word is used to characterize a component of the data analysis report sample. In order to distinguish it from the components of the reference report sample, each component of the data analysis report sample is called a sample component.

[0068] For example, the prompt word may be the name of a sample component in the data analysis report sample. It is understandable that, since the components involved in different data analysis report samples are not exactly the same, the names of multiple components may be extracted from multiple data analysis report samples as prompt words.

[0069] For example, the prompt words in the prompt word library may include prompt words such as "introduction", "data overview", "detailed analysis", "conclusion and suggestion" and "summary".

[0070] It can be understood that the at least one prompt word associated with the data analysis scenario type is a prompt word extracted from a data analysis report sample belonging to the data analysis scenario type.

[0071] S204: Based on at least one prompt word associated with the data analysis scenario type, use a large language model to determine at least one component of the reference report sample and a data analysis requirement for each component.

[0072] In this embodiment, since the prompt words are words such as the names of the components that make up the data analysis report, the large language model combined with the prompt words associated with the data analysis scenario type corresponding to the reference report sample can more accurately determine at least one component of the reference report sample, and thus can more accurately determine the data analysis requirements of each component.

[0073] It should be noted that the above steps S202 to S204 are an implementation method for determining the components of the reference report sample and the data analysis requirements of each component. However, it can be understood that other methods mentioned in other embodiments of the present application are also applicable to this embodiment and are not limited to this.

[0074] S205: For each component of the reference report sample, query a table information library for at least one set of target table information that matches the data analysis requirements of the component.

[0075] The table information library includes multiple sets of table information, each set of table information corresponds to a data table in the database, and the table information is used to characterize the composition feature information of the data table.

[0076] In a possible implementation, the table information library may be a table information vector library, and accordingly, the table information vector library may include a set of table information information vectors corresponding to each of the multiple data tables. On this basis, the present application may first determine the target vector corresponding to the data analysis requirements of the component, and then search the table information corresponding to at least one set of information vectors matching the target vector from the table information vector library to obtain at least one set of table information.

[0077] S206: Generate a data query statement using a large language model based on the data analysis requirements corresponding to the components and at least one set of target table information.

[0078] It can be understood that at least one set of target table information that matches the data analysis requirements of the component is actually information about the fields contained in the data table that may be involved in completing the data analysis requirements corresponding to the component and the relationship between the fields. Based on this, combined with the at least one set of target table information and the data analysis requirements, the large language model can determine the data table, fields, and the relationship between the fields involved in the query data, as well as the conditions that the data table and fields need to meet, so that the data query statement required for querying the data can be reasonably constructed.

[0079] There are many possibilities for the data query statement, for example, the data query statement can be a SQL statement, etc., and there is no limitation on this.

[0080] S207, using a data query statement to query the to-be-analyzed data corresponding to the component from the database.

[0081] In this embodiment, at least one set of target table information matching the data analysis requirements of the component is queried from the table information library, which can provide a basis for the large language model to determine the data tables, fields, and conditions that may be involved in the data to be queried. On this basis, based on the data analysis requirements of the component and the at least one target table information, the large language model can generate data query statements more accurately, and the data query statements can be used to efficiently query the required data to be analyzed from the database.

[0082] S208, based on the data analysis requirements of the component and the algorithm feature description information corresponding to each of the multiple preset data analysis algorithms, use the large language model to determine at least one target data analysis algorithm suitable for the component from the multiple data analysis algorithms.

[0083] The step S208 can be referred to the previous introduction and will not be described in detail again.

[0084] It is understandable that if the target data analysis algorithm is determined by other methods mentioned in the previous embodiments, it is also applicable to this embodiment and will not be described in detail here.

[0085] S209: Analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component.

[0086] S210, generating the data analysis report using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results of each component.

[0087] In any of the above embodiments of the present application, after determining at least one component of the reference report sample and the data analysis requirements of each component, the at least one component of the reference report sample and the data analysis requirements of each component can also be output to the interactive interface so that the user can check whether the components and data analysis requirements extracted from the reference report sample are reasonable.

[0088] If the user believes that the extracted components and their corresponding data analysis requirements are reasonable, the user can click the confirmation button on the interactive interface or enter a confirmation instruction through other means. The present application can continue to obtain the data to be analyzed and perform data analysis on the data to be analyzed for each component, and no further details will be given.

[0089] On the contrary, if it is considered that the extracted components or the data analysis requirements corresponding to the components are unreasonable, the user can also instruct the electronic device to adjust the components extracted from the reference report sample or the data analysis requirements corresponding to the components by inputting natural language. Accordingly, if a modification description statement input by the user in the interactive interface is obtained, the user's modification intention for at least one component is determined based on the modification description statement and the preset intention template using the large language model. Based on this, combined with the user's modification intention for at least one component, the large language model is used to adjust at least one component of the reference report sample and the data analysis requirements of each component.

[0090] There may be multiple preset intent templates. The intent template is used to indicate the user's intention to modify the extracted components or the possible modification information of the data analysis requirements. For example, the intent template records the modifiable component types and the modifiable methods corresponding to each component type. The large language model combined with the intent template can more accurately analyze the modification intention used.

[0091] Among them, using the large language model to adjust at least one component of the reference report sample and the data analysis requirements of each component can be to combine the modification intention and the reference report sample, and use the large language model to redefine at least one component of the reference report sample and the data analysis requirements of each component.

[0092] To facilitate understanding of the implementation of the solution of this application, please refer to Figure 3 . Figure 3 A schematic diagram of an implementation principle framework of the data analysis report generation method provided in the present application is shown.

[0093] exist Figure 3In the example, a report generation system (i.e., a report generation program) uses a large language model to complete the generation of data analysis reports. Figure 3 It can be seen that the user uploaded a reference report sample ( Figure 3 After uploading the report in the reference report sample, the present application can use the large language model to determine the components of the reference report sample and the data analysis requirements of each component, that is, by performing report analysis on the reference report sample, the report outline of the reference report sample can be determined.

[0094] After determining the report outline of the reference report sample, the user can trigger the report generation system to call the large language model to analyze the user's modification intention by inputting natural language in the interactive interface, and adjust the outline of the reference report sample based on the modification intention.

[0095] After the outline of the reference report sample is determined, the outline is parsed first, that is, for each component, at least one set of target table information matching the data analysis requirements of the component is searched from the vector library (i.e., the table information vector library). Figure 3 In the vector library, the metadata information corresponding to multiple data tables and the dimension data of the data involved in the data package and other information are included.

[0096] Then, the report generation system calls the large language model, combines at least one target table information and the data analysis requirements of the component to construct an SQL query statement, and queries the data to be analyzed of the component from the data warehouse (ie, database) based on the SQL query statement.

[0097] On the basis of the above, the report generation system calls the large language model to determine at least one target data analysis algorithm suitable for the component from the algorithm library based on the data analysis requirements of the component. The report generation system performs data analysis on the data analysis requirements of the component based on the at least one target data analysis algorithm to obtain the data analysis results of the component. Finally, in combination with the data to be analyzed and the data analysis results of each component, the report generation system calls the large language model to generate a data analysis report.

[0098] Corresponding to a data analysis report generation method of the present application, the present application also provides a data analysis report generation device. Figure 4 , shows a schematic diagram of a composition structure of a data analysis report generating device provided in an embodiment of the present application. The device of this embodiment may include: The sample obtaining unit 401 is used to obtain a reference report sample uploaded by a user, wherein the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results to be presented; A sample analysis unit 402, configured to determine at least one component of the reference report sample and a data analysis requirement for each component by using a large language model; A data query unit 403 is used to determine, for each component of the reference report sample, based on the data analysis requirements of the component, the data to be analyzed corresponding to the component from the database using the large language model; An algorithm determination unit 404, configured to determine at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model based on the data analysis requirements of the component; A data analysis unit 405 is used to analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component; The report generating unit 406 is used to generate the data analysis report by using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results of each component.

[0099] In a possible implementation, the sample analysis unit includes: A scenario determination subunit, configured to determine the data analysis scenario type corresponding to the reference report sample using a large language model; a prompt word determination subunit, configured to determine at least one prompt word associated with the data analysis scenario type from a prompt word library, wherein the prompt word library includes: a plurality of prompt words extracted from data analysis report samples corresponding to different types of data analysis scenarios, wherein the prompt word is used to characterize a sample component of the data analysis report sample; The sample analysis subunit is used to determine at least one component of the reference report sample and the data analysis requirements of each component by using the large language model based on at least one prompt word associated with the data analysis scenario type.

[0100] In yet another possible implementation, the data query unit includes: An information determination subunit, used to query at least one set of target table information matching the data analysis requirements of the component from a table information library, wherein the table information library includes multiple sets of table information, each set of table information corresponds to a data table in a database, and the table information is used to characterize component characteristic information of the data table; A statement construction subunit, configured to generate a data query statement using the large language model based on the data analysis requirements corresponding to the components and the at least one set of target table information; The data query subunit is used to query the to-be-analyzed data corresponding to the component from the database using the data query statement.

[0101] In yet another possible implementation, the algorithm determination unit includes: A description obtaining subunit is used to obtain algorithm feature description information of each of the preset multiple data analysis algorithms; The algorithm determination subunit is used to determine at least one target data analysis algorithm suitable for the component from the multiple data analysis algorithms using the large language model based on the data analysis requirements of the component and the algorithm feature description information of each of the multiple data analysis algorithms preset.

[0102] In another possible implementation, the device further includes: an information output unit, configured to output, to the interactive interface, the at least one component of the reference report sample and the data analysis requirement of each component after the sample analysis unit determines the at least one component of the reference report sample and the data analysis requirement of each component; an intention recognition unit, configured to, if a modification description sentence input by a user in the interactive interface is obtained, determine the user's modification intention for at least one component by using the large language model based on the modification description sentence and a preset intention template, wherein the intention template records modifiable component types and modifiable modes corresponding to each component type; The information modification unit is used to adjust the at least one component of the reference report sample and the data analysis requirements of each component by using a large language model in combination with the user's modification intention to the at least one component.

[0103] In another possible implementation, the device further includes: a dimensionality reduction processing unit, which is used to perform dimensionality reduction processing on the data to be analyzed of the component by using a principal component analysis technique before the data analysis unit performs analysis processing on the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm, so as to obtain the dimensionality reduced data corresponding to the component; The data analysis unit is specifically used to analyze and process the dimensionally reduced data corresponding to the component according to the at least one target data analysis algorithm.

[0104] In another aspect, the present application also provides an electronic device, such as Figure 5 As shown, it shows a schematic diagram of a composition structure of the electronic device, and the electronic device at least includes a processor 501 and a memory 502; The memory 502 is used to store computer programs; The processor 501 is used to execute the computer program so that the electronic device can implement the data analysis report generation method of any one of the above embodiments.

[0105] It can be understood that the electronic device may further include a display unit 503 and an input unit 504 .

[0106] Of course, the electronic device may also have Figure 5 There may be more or fewer components, without limitation.

[0107] On the other hand, the present application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the data analysis report generating method as described in any one of the above embodiments.

[0108] On the other hand, the present application also provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the data analysis report generation method described in any of the above embodiments.

[0109] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0110] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0111] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0112] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A method for generating a data analysis report, characterized in that: include: Obtaining a reference report sample uploaded by a user, wherein the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results to be presented; Determine at least one component of the reference report sample and data analysis requirements of each component by using a large language model; For each component of the reference report sample, based on the data analysis requirements of the component, using the large language model to determine the data to be analyzed corresponding to the component from the database; Based on the data analysis requirements of the component, determine at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model; Analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component; The data analysis report is generated using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results corresponding to each component.

2. The data analysis report generation method according to claim 1, characterized in that: The method of using a large language model to determine at least one component of the reference report sample and the data analysis requirements of each component includes: Determine the data analysis scenario type corresponding to the reference report sample using a large language model; Determining at least one prompt word associated with the data analysis scenario type from a prompt word library, wherein the prompt word library includes: a plurality of prompt words extracted from data analysis report samples corresponding to different types of data analysis scenarios, wherein the prompt word is used to characterize a sample component of the data analysis report sample; Based on at least one prompt word associated with the data analysis scenario type, the large language model is used to determine at least one component of the reference report sample and the data analysis requirements of each component.

3. The data analysis report generation method according to claim 1, characterized in that: The step of determining the data to be analyzed corresponding to the component from a database by using the large language model based on the data analysis requirements of the component comprises: Querying at least one set of target table information matching the data analysis requirements of the component from a table information repository, wherein the table information repository includes multiple sets of table information, each set of table information corresponds to a data table in a database, and the table information is used to characterize component feature information of the data table; Based on the data analysis requirements corresponding to the components and the at least one set of target table information, generating a data query statement using the large language model; The data query statement is used to query the data to be analyzed corresponding to the component from the database.

4. The data analysis report generation method according to claim 1, characterized in that: The step of determining at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms based on the data analysis requirements of the component by using the large language model comprises: Obtaining algorithm feature description information of each of the preset multiple data analysis algorithms; Based on the data analysis requirements of the component and the algorithm feature description information of each of the preset multiple data analysis algorithms, the large language model is used to determine at least one target data analysis algorithm suitable for the component from the multiple data analysis algorithms.

5. The method for generating a data analysis report according to claim 1, characterized in that: After determining at least one component of the reference report sample and the data analysis requirements of each component, the method further includes: Outputting at least one component of the reference report sample and data analysis requirements of each component to an interactive interface; If a modification description sentence input by the user in the interactive interface is obtained, the user's modification intention for at least one component is determined using the large language model based on the modification description sentence and a preset intention template, wherein the intention template records the modifiable component types and the modifiable methods corresponding to each component type; In combination with the user's modification intention to the at least one component, the large language model is used to adjust the at least one component of the reference report sample and the data analysis requirements of each component.

6. The method for generating a data analysis report according to claim 1, characterized in that: Before analyzing and processing the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm, the method further includes: Using principal component analysis technology to perform dimensionality reduction processing on the data to be analyzed of the component to obtain the dimensionality reduced data corresponding to the component; The analyzing and processing the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm includes: The dimensionally reduced data corresponding to the components are analyzed and processed according to the at least one target data analysis algorithm.

7. A data analysis report generating device, characterized in that: include: A sample obtaining unit, used to obtain a reference report sample uploaded by a user, wherein the reference report sample is used to characterize the composition structure of the data analysis report to be generated and the data analysis results to be presented; A sample analysis unit, used for determining at least one component of the reference report sample and a data analysis requirement of each component by using a large language model; A data query unit, configured to determine, for each component of the reference report sample, based on data analysis requirements of the component, data to be analyzed corresponding to the component from a database using the large language model; an algorithm determination unit, configured to determine at least one target data analysis algorithm suitable for the component from a plurality of preset data analysis algorithms using the large language model based on the data analysis requirements of the component; A data analysis unit, configured to analyze and process the data to be analyzed corresponding to the component according to the at least one target data analysis algorithm to obtain a data analysis result of the component; The report generating unit is used to generate the data analysis report by using a large language model in combination with at least one component of the reference report sample and the data to be analyzed and the data analysis results corresponding to each component.

8. A computer program product, characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the data analysis report generating method as described in any one of claims 1 to 6.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the data analysis report generating method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The computer storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the data analysis report generating method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Report analysis and report generation method and system based on large language model

    CN117610527A

  • Database query statement generation method, system and equipment and medium

    CN118467682A

  • Data analysis report generation method based on large language model

    CN118626523A

  • Apparatus and method for creating comprehensive real estate analysis report for real estate based on big data

    KR102574180B1