Data analysis method and device, storage medium and electronic equipment

By introducing analysis outline agents, data analysis agents and analysis report agents, the generation of analysis reports is solved, and efficient, accurate and professional data analysis report generation is achieved.

CN119938600APending Publication Date: 2025-05-06HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411873588.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, manual generation of analysis reports is inefficient and cannot meet the needs of modern enterprises for real-time data insights.

Method used

By introducing analysis outline agents, data analysis agents and analysis report agents, automated analysis report generation. The specific steps include: inputting the data information of the data file to be analyzed to the analysis outline agent to generate an analysis outline; inputting the analysis outline and data information to the data analysis agent, generating multiple analysis subtasks and executing data analysis code; inputting the target analysis results, analysis outline and data information to the analysis report agent to generate an analysis report.

Benefits of technology

It realizes automated analysis report generation, improves the efficiency of data analysis and report production, ensures the accuracy and professionalism of reports, and solves the problem of low efficiency of human-generated reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938600A_ABST
    Figure CN119938600A_ABST
Patent Text Reader

Abstract

The invention discloses a data analysis method and device, a storage medium and electronic equipment, and relates to the technical field of data analysis, and the data analysis method comprises the steps: inputting data information of a to-be-analyzed data file into an analysis outline agent, so that the analysis outline agent determines an analysis outline of the data file according to the data file; inputting the analysis outline and the data information into a data analysis agent, so that the data analysis agent generates a plurality of analysis sub-tasks based on the analysis outline and the data information; generating data analysis codes corresponding to the plurality of analysis subtasks based on a large language model, and executing the data analysis codes through a data analysis agent to generate a target analysis result corresponding to the data file; and inputting the target analysis result, the analysis outline and the data information into an analysis report agent, so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.
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 method and device, a storage medium, and an electronic device. Background Art

[0002] In the current field of big data analysis, traditional analysis report generation methods usually rely on manual operations by professional data analysts or data scientists. Although this manual method can provide in-depth and customized analysis reports, due to the explosive growth of data volume and the diversification of analysis needs, the efficiency and speed of manual report generation can no longer meet the needs of modern enterprises for real-time data insights. In addition, the manual report generation process often requires multiple steps such as data understanding, statistical analysis, and data visualization, each of which may involve different tools and skills, so the efficiency of generating analysis reports is low.

[0003] In recent years, with the development of artificial intelligence technology, especially the emergence of large language models (LLM), automatic data analysis report generation has become possible. LLM can understand natural language input, convert it into data analysis code, perform analysis and present results, greatly improving the efficiency of data analysis. However, when dealing with complex data analysis tasks, native LLM often has interrupted output content and incorrect semantic understanding due to its contextual limitations and potential hallucination problems, which makes data analysis unable to proceed normally and also lacks the ability to generate analysis reports. Therefore, in the related technology, manual generation of analysis reports is still the main method.

[0004] With regard to the problem of low efficiency in manually generating analysis reports in related technologies, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a data analysis method and device, a storage medium, and an electronic device to at least solve the problem of low efficiency in manually generating analysis reports in the related art.

[0006] According to one embodiment of the embodiments of the present application, a data analysis method is provided, including: inputting data information of a data file to be analyzed into an analysis outline agent, so that the analysis outline agent determines an analysis outline of the data file according to the data file; inputting the analysis outline and the data information into a data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information; generating data analysis codes corresponding to the plurality of analysis subtasks based on a large language model, and executing the data analysis codes through a data analysis agent to generate a target analysis result corresponding to the data file; inputting the target analysis result, the analysis outline and the data information into an analysis report agent, so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

[0007] In an exemplary embodiment, data information of a data file to be analyzed is input into an analysis outline agent so that the analysis outline agent determines an analysis outline of the data file based on the data file, including: determining an analysis subject to be analyzed of the data file based on a first input operation of a target object; inputting data information of the data file to be analyzed and the analysis subject into an analysis outline agent so that the analysis outline agent determines an analysis outline of the data file based on the data file and the analysis subject.

[0008] In an exemplary embodiment, the data information of the data file to be analyzed and the analysis subject are input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file and the analysis subject, including: verifying the integrity of the data information and the correctness of the analysis subject; if the data information and the analysis subject pass the verification, converting the data information into first structured data, and converting the analysis subject into second structured data, and inputting the first structured data and the second structured data into the analysis outline agent; if the analysis outline agent receives the first structured data and the second structured data, controlling the analysis outline agent to analyze the first structured data based on the second structured data to generate the analysis outline.

[0009] In an exemplary embodiment, the analysis outline and the data information are input into a data analysis agent so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information, including: parsing the first message body shared by the analysis outline agent by the data analysis agent to obtain the data information and the analysis outline; parsing the analysis outline to determine key information in the analysis outline, wherein the key information includes at least one of the following: analysis objectives, time range, data dimensions, and analysis logic; matching the key information with the target field in the data information to determine a data source in the data information that matches the key information; and generating a plurality of analysis subtasks based on the key information and the data source that matches the key information.

[0010] In an exemplary embodiment, the target analysis result, the analysis outline and the data information are input into an analysis report agent so that the analysis report agent generates an analysis report corresponding to the data file based on the target analysis result, the analysis outline and the data information, including: determining a data analysis report template based on a second input operation of the target object; matching the target analysis result, the analysis outline and the data information with the data analysis report template to determine the position and display method of the target analysis result, the analysis outline and the data information in the data analysis report template; generating the analysis report based on the position and display method of the target analysis result, the analysis outline and the data information in the data analysis report template.

[0011] In an exemplary embodiment, before inputting data information of a data file to be analyzed into an analysis outline intelligent agent, the method further includes: acquiring the data file and extracting basic information of the data file, wherein the basic information includes at least one of the following: field name, field type, field data example; converting the basic information into third structured data, and converting the third structured data into the data information based on standard information of the analysis outline intelligent agent.

[0012] In an exemplary embodiment, after the target analysis result, the analysis outline and the data information are input into the analysis report agent so that the analysis report agent generates an analysis report corresponding to the data file based on the target analysis result, the analysis outline and the data information, the method further includes: converting the analysis report into a target analysis report in a target format through a target tool; configuring access information of an object storage service, wherein the access information includes at least one of the following: an access key, identification information of the access key, an access point of the object storage service, and a storage space name; uploading the target analysis report to the storage space of the object storage service according to the storage space name, and generating a uniform resource locator to obtain the target analysis report based on the uniform resource locator.

[0013] According to another embodiment of the embodiment of the present application, a data analysis device is also provided, including: an analysis outline intelligent agent, used to receive data information of a data file to be analyzed, and determine the analysis outline of the data file based on the data file; a data analysis intelligent agent, used to receive the analysis outline and the data information, and generate multiple analysis subtasks based on the analysis outline and the data information; and execute data analysis code to generate a target analysis result corresponding to the data file, wherein the data analysis code is a data analysis code corresponding to the multiple analysis subtasks generated by a large language model; an analysis report intelligent agent, used to receive the target analysis result, the analysis outline and the data information, and generate an analysis report corresponding to the data file based on the target analysis result, the analysis outline and the data information.

[0014] 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 above-mentioned data analysis method when running.

[0015] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data analysis method through the computer program.

[0016] According to another aspect of the embodiments of the present application, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the data analysis method is implemented.

[0017] In an embodiment of the present application, the data information of the data file to be analyzed is input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file; the analysis outline and the data information are input into the data analysis agent, so that the data analysis agent generates multiple analysis subtasks based on the analysis outline and the data information; the data analysis code corresponding to the multiple analysis subtasks is generated based on the large language model, and the data analysis code is executed by the data analysis agent to generate the target analysis result corresponding to the data file; the target analysis result, the analysis outline and the data information are input into the analysis report agent, so that the analysis report agent generates the analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information; that is, by introducing the analysis outline agent, the data analysis agent and the analysis report agent, the automatic analysis report generation is realized, which not only improves the efficiency of data analysis and report production, but also ensures the accuracy and professionalism of the report. The above technical solution solves the problem of low efficiency of manually generating analysis reports. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] 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.

[0019] 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.

[0020] Figure 1 It is a schematic diagram of the hardware environment of a data analysis method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of a data analysis method according to an embodiment of the present application;

[0022] Figure 3 is a timing diagram of a data analysis method according to an embodiment of the present application;

[0023] Figure 4 is a structural block diagram of a data analysis device according to an embodiment of the present application (I);

[0024] Figure 5 This is a structural block diagram of a data analysis device according to an embodiment of the present application (II). DETAILED DESCRIPTION

[0025] 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.

[0026] 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.

[0027] According to one aspect of an embodiment of the present application, a data analysis method is provided. The data analysis method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above data analysis method can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) 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 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0028] The network may include but is not limited to at least one of the following: wired network, wireless network. The 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 wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0029] In this embodiment, a data analysis method is provided, which is applied to the above terminal device. Figure 2 is a flow chart of a data analysis method according to an embodiment of the present application, the flow chart comprising the following steps:

[0030] Step S202, inputting data information of the data file to be analyzed into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file;

[0031] It should be noted that the task of the analysis outline agent is to understand the characteristics of the data file, including data type, structure, possible analysis angles, etc., and generate an analysis outline based on this information. The analysis outline can be regarded as a blueprint for data analysis, which is used to indicate the steps and directions that should be followed in subsequent data analysis.

[0032] Step S204, inputting the analysis outline and the data information into the data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information;

[0033] Step S206, generating data analysis codes corresponding to the plurality of analysis subtasks based on the large language model, and executing the data analysis codes through a data analysis agent to generate a target analysis result corresponding to the data file;

[0034] For example, suppose a user uploads an Excel file containing sales data and specifies an analysis topic through the Analysis Outline Agent: "Analyze the sales trends of each product in the past three months and identify the best-selling products." This analysis topic will be converted into a structured analysis outline, which may include the time range of the analysis, statistical requirements for product sales, and instructions for trend analysis.

[0035] The data analysis agent first parses the data information (data includes: data table structure, field name, data type, etc.) and the analysis outline (the last three months, product sales trends, best-selling products).

[0036] The data analysis intelligence will decompose the entire analysis task into multiple specific analysis subtasks according to the analysis outline. For example, the analysis subtasks include but are not limited to:

[0037] 1. Time range screening: filter out the sales records of the last three months from the data.

[0038] 2. Sales trend analysis: Group the filtered data by product ID, and then draw a time series graph to analyze the sales trend of each product.

[0039] 3. Best-selling product identification: Calculate the total sales of each product and find the product with the highest sales.

[0040] For each decomposed analysis subtask, the data analysis agent will generate the corresponding data analysis code based on the large language model (LLM). For example, for the subtask of time range screening, the agent may generate the following Python code snippet.

[0041] The data analysis agent executes the code generated by the large language model to generate analysis results for each analysis subtask. For example, after executing the code for time range filtering, a DataFrame containing only the sales data for the last three months will be obtained. After executing the code for sales trend analysis, a series of time series graphs or statistical results may be generated to show the sales trend of each product over time. After executing the code for best-selling product identification, a table may be obtained that lists the total sales of all products and marks the products with the highest sales.

[0042] Finally, the data analysis agent will integrate the results of all analysis subtasks to generate the final target analysis results.

[0043] Step S208, inputting the target analysis result, the analysis outline and the data information into the analysis report agent, so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

[0044] The analysis report agent is used to receive the target analysis results, analysis outline and data information, and convert these contents into a formal analysis report. The analysis report agent should not only be able to understand the analysis results, but also be able to integrate the analysis results, charts, explanations, etc. into a standardized report document according to the preset report template or format requirements.

[0045] Through the above steps, the data information of the data file to be analyzed is input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file; the analysis outline and the data information are input into the data analysis agent, so that the data analysis agent generates multiple analysis subtasks based on the analysis outline and the data information; the data analysis code corresponding to the multiple analysis subtasks is generated based on the large language model, and the data analysis code is executed by the data analysis agent to generate the target analysis result corresponding to the data file; the target analysis result, the analysis outline and the data information are input into the analysis report agent, so that the analysis report agent generates the analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information; that is, by introducing the analysis outline agent, the data analysis agent and the analysis report agent, the automatic analysis report generation is realized, which not only improves the efficiency of data analysis and report production, but also ensures the accuracy and professionalism of the report. The above technical solution solves the problem of low efficiency of manually generating analysis reports.

[0046] Optionally, the above-mentioned step S202 can be implemented in the following manner: determine the analysis subject to be analyzed of the data file according to the first input operation of the target object; input the data information of the data file to be analyzed and the analysis subject into the analysis outline intelligent agent, so that the analysis outline intelligent agent determines the analysis outline of the data file according to the data file and the analysis subject.

[0047] In the embodiment of the present application, the analysis outline generation process is defined, specifically:

[0048] The analysis subject of the data file to be analyzed is determined according to the first input operation of the target object. That is, the user first selects or uploads a data file, and specifies the subject or question to be analyzed through some interactive method (such as filling out a form, voice input or natural language description).

[0049] For example, suppose an e-commerce company wants to analyze its sales data for the most recent quarter. The user might enter "analyze sales trends and customer purchasing behavior for the most recent quarter."

[0050] The data information of the data file to be analyzed and the analysis topic are input into the analysis outline agent. After receiving this information, the analysis outline agent will generate a systematic analysis outline based on the structure and type of the data and the analysis topic specified by the user. This outline usually includes various steps of data analysis, such as data cleaning, data exploration, statistical analysis, trend analysis, customer behavior analysis, etc.

[0051] For example, taking e-commerce sales data as an example, the analysis outline agent may generate the following analysis outline:

[0052] 1. Data cleaning: remove invalid or duplicate records and handle missing values.

[0053] 2. Data exploration: monthly distribution of overall sales volume and sales revenue.

[0054] 3. Statistical analysis: Calculate the mean, median, mode and other statistical indicators of sales.

[0055] 4. Trend analysis: Analyze the time trend of sales within a quarter, including daily sales trends, weekly sales trends and monthly sales trends.

[0056] 5. Customer behavior analysis: analyze customer purchase frequency, purchase preferences, customer segmentation, etc.

[0057] Through the embodiments of the present application, a logically clear and structurally complete analysis framework can be automatically generated based on the characteristics of the data file and the needs of the user. This not only saves the time of data analysts in formulating analysis plans, but also ensures the comprehensiveness and professionalism of the analysis, avoiding possible bias or omissions in human planning.

[0058] Optionally, the data information of the data file to be analyzed and the analysis topic are input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file and the analysis topic, including: verifying the integrity of the data information and the correctness of the analysis topic; when the data information and the analysis topic pass the verification, converting the data information into first structured data, and converting the analysis topic into second structured data, and inputting the first structured data and the second structured data into the analysis outline agent; when the analysis outline agent receives the first structured data and the second structured data, controlling the analysis outline agent to analyze the first structured data based on the second structured data to generate the analysis outline.

[0059] In an embodiment of the present application, before inputting the data information and analysis topic of the data file, the terminal device will perform integrity verification and correctness verification. Integrity verification ensures that the data file contains all necessary information, such as the field, type, number of records, etc. of the data, and that there is no missing or damaged data. Correctness verification is aimed at the analysis topic to ensure that it is clear, unambiguous and relevant to the data file, avoiding subsequent analysis work based on unclear or wrong topics. For example, if a user uploads a file about sales data, but the analysis topic is entered as "weather pattern forecast", the terminal device will prompt that the topic does not match the data and needs to be re-entered.

[0060] When the data information and analysis topic are verified, the terminal device will convert the unstructured information into a structured data format. The data information is converted into the first structured data. The analysis topic is converted into the second structured data, such as JSON data. After the structured data is input into the analysis outline agent, the agent will generate an analysis outline based on this information and the user's analysis topic. The analysis outline agent will parse the topic keywords and goals in the second structured data, and then check the fields and data types in the first structured data to determine which analysis methods and steps are applicable to the current data set. For example, the agent may generate an outline that indicates that data cleaning should be performed first to remove outliers and missing values; then perform time series analysis to compare sales volume and sales in different months; and finally perform customer grouping analysis to divide customers into several categories based on purchasing behavior.

[0061] Through the above steps, the analysis outline agent ensures the accuracy and efficiency of the subsequent analysis process. The use of structured data allows the agent to understand and process input information more accurately, while the verification step avoids analysis bias caused by incorrect information. The overall process improves the automation level of data analysis and the quality of reports.

[0062] Optionally, the above-mentioned step S204 can also be implemented in the following manner: the data analysis agent parses the first message body shared by the analysis outline agent to obtain the data information and the analysis outline; the analysis outline is parsed to determine the key information in the analysis outline, wherein the key information includes at least one of the following: analysis objectives, time range, data dimensions, and analysis logic; the key information is matched with the target field in the data information to determine the data source that matches the key information in the data information; and a plurality of analysis subtasks are generated according to the key information and the data source that matches the key information.

[0063] In an embodiment of the present application, the data analysis agent first performs a deep semantic analysis of the analysis outline, using the capabilities of natural language processing (NLP) and large language models (LLM) to understand the analysis objectives, time ranges, data dimensions, and specific analysis logic implied in the outline.

[0064] For example, an analysis outline might ask, "Compare sales data for the first quarter of 2023 with that for the second quarter, paying particular attention to changes in sales of products A and B."

[0065] The agent will match the elements mentioned in the analysis outline with the actual fields in the dataset, ensuring that the analysis is based on the accurate data source.

[0066] The agent identified fields in the dataset related to “First Quarter of 2023”, “Second Quarter”, “Products A and B”, and “Sales Volume”.

[0067] The data analysis agent subdivides the entire analysis task into multiple independent or dependent analysis subtasks. For example, subtask 1 may be "extracting the sales data of products A and B in the first and second quarters of 2023 from the data set", subtask 2 is "calculating the total sales volume of the two quarters", and subtask 3 is "comparing the sales volume changes in the two quarters and making a chart".

[0068] Optionally, the above step S206 can also be implemented in the following manner: determine the data analysis report template based on the second input operation of the target object; match the target analysis result, the analysis outline and the data information with the data analysis report template to determine the position and display method of the target analysis result, the analysis outline and the data information in the data analysis report template; generate the analysis report according to the position and display method of the target analysis result, the analysis outline and the data information in the data analysis report template.

[0069] The user selects or customizes a report template through the second input operation. The report template may contain a preset structure and style, such as title, subtitle, chart position, table style and text format. For example, the user may select a standard report template, which has the following layout: Cover page, including the report title and date. Table of contents, listing the main chapters of the report.

[0070] After receiving the target analysis results, analysis outline and data information, the analysis report agent will match them with the selected data analysis report template. This matching process determines how the analysis results are filled into the report template, such as the specific location and display method of the text description, charts and tables of the analysis results in the template. For example, the results of the sales trend analysis may be matched to the "Overview of Analysis Results" section in the template and displayed in the form of a time series line chart; the results of the product category sales volume comparison are matched to the "Product Category Analysis" section and presented in the form of tables and bar charts; and the detailed analysis of the best-selling products is filled in the "Best-selling Product Details" section, which may include product ID, name, total sales volume, sales change chart, etc.

[0071] Based on the matching results, the analysis report agent integrates the target analysis results, analysis outline and data information into the report template to generate the final analysis report. This process includes but is not limited to: formatting the data, ensuring that the data in the charts and tables are presented in a clear and easy-to-read format, and editing the text description to make the report content coherent and logically clear. For example, when generating a report, the analysis report agent will place the sales trend line chart under the "Analysis Results Overview" title, using a suitable title and explanatory text to describe the trend; in the "Product Category Analysis" section, it will generate and fill in a table comparing the sales volume of different product categories, and attach a bar chart; in the "Best-selling Product Details" section, it will list product information and display a line chart of sales changes.

[0072] Through the embodiments of the present application, the analysis report agent can automatically generate professional and formatted reports, presenting complex data analysis results to end users in an intuitive and easy-to-understand manner. This not only saves the time of data analysts in manually writing reports, but also ensures the standardization and consistency of reports, and improves the efficiency and accuracy of information transmission.

[0073] Optionally, before inputting the data information of the data file to be analyzed into the analysis outline intelligent agent, it also includes: obtaining the data file and extracting basic information of the data file, wherein the basic information includes at least one of the following: field name, field type, field data example; converting the basic information into third structured data, and converting the third structured data into the data information based on the standard information of the analysis outline intelligent agent.

[0074] In the embodiment of the present application, the device will obtain a data file from a data source uploaded or specified by the user. This can be a file in any format, such as CSV, Excel, JSON, or database query results.

[0075] The device performs a preliminary analysis of the data file and extracts its basic information, which includes at least the field name (name of the data column), field type (such as value, text, date, etc.), and field data examples (i.e., several actual values ​​of the data column). For example, for a CSV file containing sales records, the system may extract the following basic information:

[0076] 1. Field names: product ID, product name, sales date, sales volume, sales amount, etc.

[0077] 2. Field type: product ID (text), sales date (date), sales volume (integer), sales amount (floating point number), etc.

[0078] 3. Field data examples: Product ID may contain example values ​​such as "001", "002"; Sales date may contain example values ​​such as "2023-01-01", "2023-01-02".

[0079] The extracted basic information is then converted into a structured data format, the third structured data. This conversion helps the agent process and understand the data information more efficiently. For example, a JSON object containing field names, types, and examples can be considered as third structured data.

[0080] Finally, the analysis outline agent uses its internal standard information to transform the third structured data into more specific and agent-operable data information. This transformation is to ensure that the agent can accurately generate an analysis outline based on the characteristics of the data and the user's analysis needs. For example, the agent may recognize that the "sales date" field is time series data, and automatically include the relevant steps of time series analysis when generating the analysis outline.

[0081] In an exemplary embodiment, after the target analysis result, the analysis outline and the data information are input into the analysis report agent so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information, it also includes: converting the analysis report into a target analysis report in a target format through a target tool; configuring access information of an object storage service, wherein the access information includes at least one of the following: an access key, identification information of the access key, an access point of the object storage service, and a storage space name; uploading the target analysis report to the storage space of the object storage service according to the storage space name, and generating a uniform resource locator to obtain the target analysis report based on the uniform resource locator.

[0082] In the embodiment of the present application, after the analysis report agent generates the analysis report, it will further use the target tool to convert the report into the target format specified by the user, so as to facilitate viewing and sharing on different devices and platforms. The target format can be PDF, Word document, HTML page or any other format required by the user. For example, if the user needs a printable report, the PDF format may be selected; if the user wants to view the report directly in the email, the HTML or Word document may be selected.

[0083] In order to store analysis reports in the cloud securely and efficiently, the system needs to configure the access information of the object storage service. The access information includes at least the access key, the identification information of the access key, the access point of the object storage service (i.e. the specific URL or API endpoint of the cloud service provider), and the storage space name (i.e. the container or directory name used to store files in the cloud storage). For example:

[0084] Access key: A key assigned by a cloud service provider for identity authentication.

[0085] Access key identification information: This can be a user name or account ID, used to identify the user who uses the access key.

[0086] Object storage service access point: such as Alibaba Cloud OSS access point `oss-cn-beijing.aliyuncs.com`.

[0087] Storage space name: the storage space created by the user in the cloud storage service, for example, `my-sales-reports`.

[0088] After configuring the access information, the system will upload the target analysis report to the specified storage space of the object storage service according to the storage space name. The upload process may involve encryption, compression and other operations to protect data security and optimize storage efficiency. Once the upload is successful, the system will generate a Uniform Resource Locator (URL), through which users can access and download the analysis report stored in the cloud.

[0089] Through the embodiments of the present application, not only can professional data analysis reports be generated, but also the format of the reports can be ensured to meet user needs, be securely stored in the cloud, and be convenient for users to access and share through the network, greatly improving the availability and flexibility of data reports.

[0090] In order to better understand the process of the above-mentioned data analysis method, the implementation method flow of the above-mentioned data analysis is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0091] In this embodiment, a data analysis method is provided. Figure 3 is a timing diagram of a data analysis method according to an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:

[0092] Step 1: The user builds an intelligent analysis report task;

[0093] 1.1. Users can select a data set by checking the specified data set from the preset list or directly uploading their own data file.

[0094] 1.2. The user enters the analysis topic, that is, based on the uploaded or selected data set, clearly indicates the core issue of the data analysis.

[0095] 1.3. The user selects a matching report template from the analysis report template library.

[0096] Step 2: Data source connection and data file reading. The system automatically links to the database or reads the uploaded data file, extracts and outputs the basic information of the data set, and lays the data foundation for subsequent analysis.

[0097] Step 3: Intelligent generation of data analysis outline:

[0098] 3.1. Analysis Outline The Agent receives basic data information and the analysis topic specified by the user, and generates a data analysis outline list, which clearly displays the analysis steps and goals.

[0099] 3.2. The data analysis outline list is passed item by item to the next level data analysis agent.

[0100] 3.3. The analysis outline agent and the data analysis agent transmit basic data information through the shared message body mechanism.

[0101] Step 4: Data analysis in depth execution;

[0102] 4.1. Data Analysis Agent generates data analysis results based on the received analysis outline.

[0103] 4.2. The data analysis results are fed back to the front end in real time for users to view immediately.

[0104] 4.3. Both the basic data information and the data analysis results are transmitted to the next level analysis report agent through the shared agent message body mechanism.

[0105] Step 5: Application and delivery of analysis report templates. The report template selected by the user is delivered to the lower-level analysis report agent to ensure that report generation complies with the user's customization requirements.

[0106] Step 6: The report content is constructed piece by piece. The analysis report agent constructs the report content piece by piece according to the analysis results and report template, including text description, charts and data analysis conclusions, to realize the automatic generation of the report.

[0107] Step 7: Output analysis report.

[0108] Among them, the professional analysis report output module is called to convert the constructed report content into PDF format for easy reading and sharing. The PDF file is uploaded to the object storage service OSS to generate an accessible HTTP link, providing users with a convenient way to download and view.

[0109] Step 8: Report presentation and download function of the user interface. The data analysis report is fully displayed in the user interface for users to view, download and share instantly.

[0110] In the embodiment of the present application, multiple agents collaborate and share message bodies. Through the collaboration of multiple agents, the applicability of LLM is improved, and the message body is shared to improve the collaboration performance between agents. Based on the analysis report template and combined with the LLM capability, a data analysis report is generated to solve the LLM illusion and the disorder of the analysis report layout, and to generate a complete and usable data analysis report. In the process of multiple agents collaborating and performing their respective duties, the accuracy and efficiency of completing data analysis are improved; with the support of the analysis report template, the LLM generation range and layout are stabilized, the occurrence of hallucinations is reduced, and the usability of LLM in data analysis applications is further improved.

[0111] 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 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 / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0112] Figure 4 is a structural block diagram of a data analysis device according to an embodiment of the present application (I); Figure 4 As shown, including:

[0113] An analysis outline agent 42 is used to receive data information of a data file to be analyzed, and determine an analysis outline of the data file according to the data file;

[0114] The data analysis agent 44 is used to receive the analysis outline and the data information, generate a plurality of analysis subtasks based on the analysis outline and the data information; and execute the data analysis code to generate the target analysis result corresponding to the data file, wherein the data analysis code is the data analysis code corresponding to the plurality of analysis subtasks generated by the large language model;

[0115] The analysis report agent 46 is used to receive the target analysis result, the analysis outline and the data information, and generate an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

[0116] Through the above device, the data information of the data file to be analyzed is input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file; the analysis outline and the data information are input into the data analysis agent, so that the data analysis agent generates multiple analysis subtasks based on the analysis outline and the data information; the data analysis code corresponding to the multiple analysis subtasks is generated based on the large language model, and the data analysis code is executed by the data analysis agent to generate the target analysis result corresponding to the data file; the target analysis result, the analysis outline and the data information are input into the analysis report agent, so that the analysis report agent generates the analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information; that is, by introducing the analysis outline agent, the data analysis agent and the analysis report agent, the automatic analysis report generation is realized, which not only improves the efficiency of data analysis and report production, but also ensures the accuracy and professionalism of the report. The above technical solution solves the problem of low efficiency of manually generating analysis reports.

[0117] In an exemplary embodiment, Figure 5 As shown, the above device further includes: a receiving module 52, which is used to determine the analysis subject to be analyzed of the data file according to the first input operation of the target object;

[0118] The analysis outline agent 42 is further used to receive data information of the data file to be analyzed and the analysis subject, and determine the analysis outline of the data file according to the data file and the analysis subject.

[0119] In an exemplary embodiment, the receiving module is also used to verify the integrity of the data information and the correctness of the analysis subject; when the data information and the analysis subject are verified, the data information is converted into first structured data, and the analysis subject is converted into second structured data; the analysis outline agent 42 is used to analyze the first structured data based on the second structured data to generate the analysis outline.

[0120] In an exemplary embodiment, the data analysis agent is used to parse the first message body shared by the analysis outline agent to obtain the data information and the analysis outline; parse the analysis outline to determine key information in the analysis outline, wherein the key information includes at least one of the following: analysis objectives, time range, data dimensions, and analysis logic; match the key information with the target field in the data information to determine a data source in the data information that matches the key information; and generate multiple analysis subtasks based on the key information and the data source that matches the key information.

[0121] In an exemplary embodiment, the receiving module is used to determine a data analysis report template according to a second input operation of the target object;

[0122] An analysis report intelligent agent is used to match the target analysis results, the analysis outline and the data information with the data analysis report template to determine the location and display method of the target analysis results, the analysis outline and the data information in the data analysis report template; and generate the analysis report according to the location and display method of the target analysis results, the analysis outline and the data information in the data analysis report template.

[0123] In an exemplary embodiment, a receiving module is used to obtain the data file and extract basic information of the data file, wherein the basic information includes at least one of the following: field name, field type, field data example; convert the basic information into third structured data, and convert the third structured data into the data information based on the standard information of the analysis outline intelligent body.

[0124] In an exemplary embodiment, Figure 5 As shown, the above-mentioned device also includes: an upload module 54, which is used to convert the analysis report into a target analysis report in a target format through a target tool; configure access information of the object storage service, wherein the access information includes at least one of the following: an access key, identification information of the access key, an access point of the object storage service, and a storage space name; upload the target analysis report to the storage space of the object storage service according to the storage space name, and generate a uniform resource locator to obtain the target analysis report based on the uniform resource locator.

[0125] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0126] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0127] S1, inputting data information of a data file to be analyzed into an analysis outline agent, so that the analysis outline agent determines an analysis outline of the data file according to the data file;

[0128] S2, inputting the analysis outline and the data information into a data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information;

[0129] S3, generating data analysis codes corresponding to the multiple analysis subtasks based on the large language model, and executing the data analysis codes through the data analysis agent to generate target analysis results corresponding to the data file;

[0130] S4, inputting the target analysis result, the analysis outline and the data information into the analysis report intelligent body, so that the analysis report intelligent body generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

[0131] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0132] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0133] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0134] S1, inputting data information of a data file to be analyzed into an analysis outline agent, so that the analysis outline agent determines an analysis outline of the data file according to the data file;

[0135] S2, inputting the analysis outline and the data information into a data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information;

[0136] S3, generating data analysis codes corresponding to the multiple analysis subtasks based on the large language model, and executing the data analysis codes through the data analysis agent to generate target analysis results corresponding to the data file;

[0137] S4, inputting the target analysis result, the analysis outline and the data information into the analysis report intelligent body, so that the analysis report intelligent body generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

[0138] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0139] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0140] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0141] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0142] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0143] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0144] The above is only a preferred implementation 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 data analysis method, characterized in that: include: Inputting data information of the data file to be analyzed into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file; Inputting the analysis outline and the data information into a data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information; Generate data analysis codes corresponding to the plurality of analysis subtasks based on the large language model, and execute the data analysis codes through a data analysis agent to generate target analysis results corresponding to the data file; The target analysis result, the analysis outline and the data information are input into the analysis report intelligent body, so that the analysis report intelligent body generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information.

2. The data analysis method according to claim 1, characterized in that: Inputting data information of a data file to be analyzed into an analysis outline agent, so that the analysis outline agent determines an analysis outline of the data file according to the data file, including: Determining an analysis subject to be analyzed of the data file according to a first input operation of the target object; The data information of the data file to be analyzed and the analysis theme are input into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file and the analysis theme.

3. The data analysis method according to claim 2, characterized in that: Inputting data information of the data file to be analyzed and the analysis subject into the analysis outline agent, so that the analysis outline agent determines the analysis outline of the data file according to the data file and the analysis subject, including: Verify the integrity of the data information and the correctness of the analysis subject; When the data information and the analysis subject are verified, the data information is converted into first structured data, the analysis subject is converted into second structured data, and the first structured data and the second structured data are input into the analysis outline agent; When the analysis outline agent receives the first structured data and the second structured data, the analysis outline agent is controlled to analyze the first structured data based on the second structured data to generate the analysis outline.

4. The data analysis method according to claim 1, characterized in that: The analysis outline and the data information are input into a data analysis agent, so that the data analysis agent generates a plurality of analysis subtasks based on the analysis outline and the data information, including: Parsing the first message body shared by the analysis outline agent through the data analysis agent to obtain the data information and the analysis outline; Parsing the analysis outline to determine key information in the analysis outline, wherein the key information includes at least one of the following: analysis target, time range, data dimension, and analysis logic; matching the key information with a target field in the data information to determine a data source matching the key information in the data information; A plurality of analysis subtasks are generated according to the key information and a data source matching the key information.

5. The data analysis method according to claim 1, characterized in that: Inputting the target analysis result, the analysis outline and the data information into the analysis report agent, so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information, including: Determine a data analysis report template according to a second input operation of the target object; Matching the target analysis result, the analysis outline and the data information with the data analysis report template to determine the location and display method of the target analysis result, the analysis outline and the data information in the data analysis report template; The analysis report is generated according to the target analysis results, the analysis outline and the location and display method of the data information in the data analysis report template.

6. The data analysis method according to claim 1, characterized in that: Before inputting the data information of the data file to be analyzed into the analysis outline intelligent body, the method further comprises: Acquire the data file and extract basic information of the data file, wherein the basic information includes at least one of the following: field name, field type, and field data example; The basic information is converted into third structured data, and the third structured data is converted into the data information based on standard information of the analysis outline agent.

7. The data analysis method according to claim 1, characterized in that: After inputting the target analysis result, the analysis outline and the data information into the analysis report agent so that the analysis report agent generates an analysis report corresponding to the data file according to the target analysis result, the analysis outline and the data information, the method further includes: Converting the analysis report into a target analysis report in a target format by a target tool; Configure access information for the object storage service, wherein the access information includes at least one of the following: an access key, identification information of the access key, an access point for the object storage service, and a storage space name; The target analysis report is uploaded to the storage space of the object storage service according to the storage space name, and a uniform resource locator is generated to obtain the target analysis report based on the uniform resource locator.

8. A data analysis device, characterized in that: include: An analysis outline agent, used for receiving data information of a data file to be analyzed, and determining an analysis outline of the data file according to the data file; A data analysis agent, configured to receive the analysis outline and the data information, and generate a plurality of analysis subtasks based on the analysis outline and the data information; and executing a data analysis code to generate a target analysis result corresponding to the data file, wherein the data analysis code is a data analysis code corresponding to the multiple analysis subtasks generated by the large language model; The analysis report agent is used to receive the target analysis result, the analysis outline and the data information, and generate an analysis report corresponding to the data file based on the target analysis result, the analysis outline and the data information.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Cited By

  • Municipal infrastructure data report generation method and equipment based on large language model

    CN121766293A