Data analysis method and device, electronic equipment and computer program product
By using a large language model to generate result query statements and query content in the data to be analyzed, the data analysis speed problem caused by the increase in the amount of data is solved, and fast and efficient data analysis is achieved, and the professional threshold is lowered.
Patent Information
- Application Number
- CN202411462139.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-14
AI Technical Summary
As the amount of data increases, how to ensure the speed of data analysis has become a technical problem that those skilled in the art need to solve urgently.
By using a large language model, the corresponding result query statement is quickly generated according to the analysis requirements of the data to be analyzed, and then the corresponding content of the query with the target in the data to be analyzed is obtained according to the result query statement to obtain the data analysis results.
It ensures the rapid progress of data analysis speed when the amount of data increases. There is no need to process all the data to be analyzed. It only needs to search for the corresponding data based on the results of the large language model, which lowers the professional threshold.
Smart Images

Figure CN119441251A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to a data analysis method, device, electronic device and computer program product. Background Art
[0002] Traditional decision-making often relies on the experience and intuition of decision-makers, and cannot ensure the accuracy of decisions. Data analysis can provide various forms of data insights through deep mining of data, reducing uncertainty and risks in decision-making. However, as the amount of data increases, how to ensure the speed of data analysis has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0003] In view of this, the present application proposes a data analysis method, device, electronic device and computer program product, which can ensure the data analysis speed when the data volume increases.
[0004] The technical solutions proposed in this application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a data analysis method, comprising:
[0006] Obtaining analysis requirements for the data to be analyzed; the analysis requirements are analysis requirements in natural language form;
[0007] Inputting the analysis requirement into the large language model to obtain a result query statement output by the large language model; the result query statement includes information about the target data required to respond to the analysis requirement and information about the data analysis result required by the analysis requirement;
[0008] According to the result query statement, the target data is queried from the data to be analyzed, and the target data is analyzed to generate the data analysis result required for the analysis.
[0009] In a second aspect, an embodiment of the present application provides a data analysis device, comprising:
[0010] An acquisition module, used to acquire analysis requirements for the data to be analyzed; the analysis requirements are analysis requirements in natural language form;
[0011] An input module, used to input the analysis requirement into the large language model to obtain a result query statement output by the large language model; the result query statement includes information about the target data required to respond to the analysis requirement and information about the data analysis result required by the analysis requirement;
[0012] A generation module is used to query the target data from the data to be analyzed according to the result query statement, and analyze the target data to generate the data analysis result of the analysis requirement.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0014] A memory and a processor; wherein the memory is used to store programs; and the processor is used to implement any of the methods described above by running the programs in the memory.
[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, any of the methods described above is implemented.
[0016] The data analysis method proposed in this application can use a large language model to quickly generate a corresponding result query statement according to the analysis requirements of the data to be analyzed, and then query the corresponding content in the data to be analyzed in a targeted manner according to the result query statement to obtain the data analysis result. With this arrangement, it is not necessary to process all the data to be analyzed, and only the corresponding data needs to be searched according to the result query statement of the large language model, and the data analysis speed is fast. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0018] Figure 1 It is a flow chart of a data analysis method provided in an embodiment of the present application.
[0019] Figure 2 This is a schematic diagram of a recommendation question output provided in an embodiment of the present application.
[0020] Figure 3 It is a structural schematic diagram of a data analysis device provided in an embodiment of the present application.
[0021] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 are within the scope of protection of this application.
[0023] Traditional decision-making often relies on the experience and intuition of decision-makers, and cannot ensure the accuracy of decisions. Data analysis can help enterprise management gain key business insights by integrating complex data sources, conducting in-depth data analysis and visual display, and ultimately draw data conclusions and business insights to support enterprises in adjusting strategies and reduce uncertainty and risks when making decisions. However, as the amount of data increases, data analysis is difficult to complete quickly, which affects the decision-making process of enterprises. Therefore, how to ensure the speed of data analysis when the amount of data increases has become a technical problem that technicians in this field need to solve urgently.
[0024] Based on this, the present application proposes a data analysis method, device, electronic device and computer program product. The technical solution utilizes a large language model to generate corresponding result query statements according to the analysis requirements of the data to be analyzed, and then queries the corresponding content in the data to be analyzed according to the result query statement to obtain the data analysis results. There is no need to analyze all the data to be analyzed, thereby achieving the effect of rapid data analysis.
[0025] The present application embodiment provides a data analysis method, which can be executed by an electronic device, which can be any device with data and instruction processing functions, such as a notebook computer, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a personal digital assistant, a dedicated messaging device) and other types of user terminals, or a combination of any two or more of these electronic devices, or a server. Figure 1 As shown, the method includes:
[0026] S101: Obtain analysis requirements for data to be analyzed.
[0027] The above-mentioned data to be analyzed refers to the data that needs to be analyzed. The specific type of the data to be analyzed is not limited in the embodiments of the present application. For example, the data to be analyzed can be a comma separated values (CSV) file or an Excel file. The acquisition method of the data to be analyzed is also not limited in the embodiments of the present application. For example, the data to be analyzed can be a data file to be analyzed uploaded directly by the user; the user can also provide database connection parameters, such as database address, port, user name, password, etc., and automatically connect to the database based on the database connection parameters to obtain the data to be analyzed. The database can be MySQL, Oracle, PostgreSQL, etc., which is not limited in this embodiment; in addition, the user can also provide an application programming interface (Application Programming Interface, API) interface, and the user can configure the API's uniform resource locator (Uniform Resource Locator, URL), request method, authentication information, etc., and automatically call the API based on the above-mentioned URL, request method, authentication information, etc. of the API to obtain the data to be analyzed.
[0028] The above analysis requirements can be input by the user. Specifically, the analysis requirements are in the form of natural language, that is, the user can obtain the data analysis results by describing his or her analysis requirements in natural language, without the need for the user to manually perform steps such as data collection, cleaning, conversion, analysis and visualization, which greatly reduces the threshold for data analysis. For example, if the data to be analyzed is the e-commerce sales data of a certain brand in various regions, when the user wants to know the average unit price of each region in the data to be analyzed, the user can directly edit the "average unit price of each region" as the analysis requirement input; when the user wants to know the number of group purchase orders in January in the data to be analyzed, the user can directly edit the "number of group purchase orders in January" as the analysis requirement input.
[0029] S102: Input the analysis requirements into the large language model to obtain the result query statement output by the large language model.
[0030] The above-mentioned large language model is obtained by learning the feature data in the data to be analyzed, and the feature data includes metadata and data samples of the data to be analyzed. Among them, the metadata of the data to be analyzed is used to explain the structure and meaning of the data to be analyzed, including key business attributes, field information, data types, data sources and other contents. The data sample refers to a part of specific data selected from the data to be analyzed, which can represent the structure and content of the entire data to be analyzed. By viewing the data sample, the approximate structure and content of the data can be quickly understood, thereby providing a reference for subsequent data analysis and processing. In some embodiments, several rows of data in the data to be analyzed are selected as data samples. It should be noted that the data samples cannot be selected too few, otherwise the large language model cannot learn the structure and content of the data to be analyzed, and the data samples cannot be selected too much, otherwise the learning speed of the large language model will be reduced. Exemplarily, the first three rows of data in the data to be analyzed can be selected as data samples. In some embodiments, after the data to be analyzed is obtained, the metadata and data samples of the data to be analyzed can be extracted and stored in a temporary table.
[0031] Input the feature data in the data to be analyzed into the large language model so that the large language model can learn the feature data in the data to be analyzed and understand the structure and content of the data to be analyzed. In this way, only the feature data in the data to be analyzed needs to be input into the large language model, and all the data to be analyzed does not need to be input into the large language model. Therefore, the large language model can learn the structure and content of the data to be analyzed by learning only the feature data in the data to be analyzed, and does not need to learn all the data to be analyzed, which greatly shortens the learning time of the large language model and improves the data analysis speed.
[0032] The above result query statement includes information about target data required to respond to analysis requirements and information about data analysis results required to respond to analysis requirements.
[0033] Specifically, the target data required to respond to the analysis requirements refers to the data required to meet the user's analysis requirements. The data analysis results required for the analysis requirements refer to the analysis results corresponding to the analysis requirements. For example, if the user's analysis requirement is "average unit price in each region", in order to obtain the "average unit price in each region", the two sets of data "unit price in each region" and "number of regions" are required. The target data are the two sets of data "unit price in each region" and "country count". The data corresponding to the "average unit price in each region" calculated using the "unit price in each region" and the "country count" is the data analysis result.
[0034] Furthermore, the information of the target data required for the above analysis requirement refers to a statement indicating that the target data required for the analysis requirement is queried from the data to be analyzed, and the information of the data analysis result required for the above analysis requirement refers to a statement indicating that the target data is analyzed to obtain the data analysis result. As described in the above embodiment, if the user's analysis requirement is "average unit price of each region", the information of the target data required for the analysis requirement refers to a statement indicating that the two sets of data "unit price of each region" and "number of regions" are queried from the data to be analyzed, and the information of the data analysis result required for the analysis requirement refers to a statement indicating that the "average unit price of each region" is calculated by the two sets of data "unit price of each region" and "number of regions".
[0035] In some embodiments, the result query statement can use structured query language (Structured Query Language, SQL), that is, the large language model generates a result query statement in SQL format. In the embodiments of the present application, after obtaining the result query statement in SQL format, the corresponding content is queried from the data to be analyzed based on the result query statement and the corresponding calculation is performed to obtain the data analysis results required for analysis.
[0036] It should be noted that some data samples and data labels can be constructed in advance to fine-tune the large language model so that the large language model has the ability to generate result query statements. For example, natural language analysis requirements can be constructed as training samples, and result query statements corresponding to the training samples can be constructed as training labels. The large language model can be fine-tuned with the goal of enabling the large language model to generate result query statements.
[0037] The type of the large language model is not limited in the embodiments of the present application, for example, it may be chatgpt, etc., which is not limited in this embodiment.
[0038] S103. According to the result query statement, query the target data from the data to be analyzed, and analyze the target data to generate the data analysis results required for analysis.
[0039] According to the above result query statement, the target data is queried from the data to be analyzed, and then the target data is analyzed to generate the data analysis results required for analysis.
[0040] For example, if the user's analysis requirement is "average unit price in each region", the analysis requirement is input into the large language model, and the large language model outputs instructions to query the two sets of data "unit price in each region" and "regional quantity" from the data to be analyzed, and the statement of "average unit price in each region" is calculated by the two sets of data "unit price in each region" and "regional quantity". According to the above result query statement, "unit price in each region" and "regional quantity" are queried from the data to be analyzed, and then the sum of "unit price in each region" is calculated, and then the ratio of the sum of "unit price in each region" to "regional quantity" is calculated to obtain "average unit price in each region", that is, the corresponding data analysis result is obtained.
[0041] In the above embodiment, the large language model can be used to quickly generate corresponding result query statements according to the analysis requirements of the data to be analyzed, and then the corresponding content is targeted in the data to be analyzed according to the result query statement to obtain the data analysis results. With this arrangement, there is no need to process all the data to be analyzed, only the corresponding data needs to be searched according to the result query statement of the large language model, and the data analysis speed is fast. In addition, users do not need to have professional data operation skills and programming capabilities, and can generate data analysis results by simply inputting natural language, which reduces the professional threshold.
[0042] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment obtain the analysis requirements for the data to be analyzed, which may specifically include the following steps:
[0043] The metadata and data samples in the data to be analyzed, as well as the industry information of the industry to which the data to be analyzed belong, are input into the large language model so that the large language model generates recommended requirements corresponding to the data to be analyzed; at least one recommended requirement generated by the large language model is obtained, and a target requirement selected by a user from the at least one recommended requirement is determined as an analysis requirement.
[0044] Specifically, in addition to the user inputting analysis requirements as described in the above embodiments, the large language model can also predict and output the analysis requirements. The user only needs to select the analysis requirements of interest, without manual input, thus saving user time.
[0045] The metadata and data samples of the data to be analyzed, as well as the industry information of the industry to which the data to be analyzed belongs, are input into the big language model, so that the big language model can learn the feature data and industry information in the data to be analyzed, and understand the structure and content of the data to be analyzed, as well as the industry information of the data to be analyzed.
[0046] In some embodiments, the large language model can be made to learn only once, and the metadata and data samples of the data to be analyzed, as well as the industry information of the industry to which the data to be analyzed belongs, can be input into the large language model, so that the large language model understands the structure and content of the data to be analyzed, as well as the industry information of the data to be analyzed, and has the ability to perform downstream tasks such as generating result query statements and generating recommendation requirements for the data to be analyzed. Then, the large language model is fine-tuned differently according to the specific downstream tasks. For example, according to the records of the above embodiments, the large language model is fine-tuned with the goal of enabling the large language model to have the ability to generate result query statements.
[0047] In order to enable the large language model to perform the task of generating recommendation requirements for the data to be analyzed, the large language model can also be appropriately fine-tuned. For example, metadata and data samples of the data to be analyzed, as well as industry information of the industry to which the data to be analyzed belongs, can be constructed as training samples, and multiple recommendation requirements corresponding to the training samples can be constructed as training labels. The large language model can be fine-tuned with the goal of enabling the large language model to predict multiple recommendation requirements.
[0048] With such a configuration, the large language model has the ability to generate recommended requirements. After relevant data is input into the large language model, the large language model can generate and output at least one recommended requirement. In an embodiment of the present application, at least one recommended requirement generated by the large language model can be output, and the user can select a target requirement of interest therefrom, and the target requirement selected by the user from the at least one recommended requirement is determined as the analysis requirement.
[0049] Figure 2 The following is a schematic diagram of a recommended requirement output corresponding to an embodiment. Figure 2 Area A in the figure is part of the data to be analyzed, and area B is the output recommended requirements. It should also be noted that area C is a recommended requirement replacement button. After the user clicks the recommended requirement replacement button, other recommended requirements can be generated and output according to the records of the above embodiment.
[0050] In the above embodiments, the recommended requirements can be directly output, so that users can directly select the analysis requirements they are interested in without manual input, saving user time; at the same time, outputting the recommended requirements can also serve as a prompt, prompting users to browse more types of data analysis results and improve the scientific nature of decision-making.
[0051] As an optional implementation, another embodiment of the present application discloses that the analysis requirements of the above embodiment include data analysis requirements. The steps of the above embodiment query target data from the data to be analyzed according to the result query statement, and analyze the target data to generate the data analysis results of the analysis requirements, which may specifically include the following steps:
[0052] According to the result query statement, the first target data required to respond to the data analysis requirement is queried from the data to be analyzed; the first target data is analyzed to generate the data analysis result required by the data analysis.
[0053] The above analysis requirements include data analysis requirements, which mainly refer to some question-and-answer requirements, such as "average unit price in each region" and "number of group purchase orders in January". The first target data refers to the data required to analyze the question-and-answer requirements, and the data analysis results of the data analysis requirements refer to the answers corresponding to the question-and-answer requirements. Based on the question-and-answer requirements, the large language model outputs the corresponding result query statement, and then queries the first target data required to respond to the question-and-answer requirements from the data to be analyzed based on the result query statement; analyzes the first target data to generate the data analysis results of the question-and-answer requirements.
[0054] In the above embodiment, it is not necessary to process all the data to be analyzed. It is only necessary to search for the corresponding data according to the result query statement of the large language model to obtain the answer corresponding to the question and answer requirement, and the data analysis speed is fast.
[0055] As an optional implementation, another embodiment of the present application discloses that the analysis requirements of the above embodiment include report requirements. The steps of the above embodiment query target data from the data to be analyzed according to the result query statement, and analyze the target data to generate the data analysis results of the analysis requirements, which may specifically include the following steps:
[0056] A report template is determined according to the result query statement, and second target data required to respond to the report requirement is queried from the data to be analyzed; the second target data is analyzed, and a report is generated using the data analysis result of the second target data and the report template.
[0057] Report requirements refer to the requirements for generating reports, such as line graphs, pie charts, bar charts, etc. Different from question-and-answer requirements, in addition to calculating the target data, report requirements also require determining the report template corresponding to the report requirements. Therefore, if the analysis requirements include report requirements, then the information of the target data required by the result query statement in response to the analysis requirements, or the information of the data analysis results required by the analysis requirements, also includes a statement indicating the report template corresponding to the report requirement. For example, if the report requirement is "a line graph comparing user age and purchasing power", then the information of the target data required by the result query statement in response to the analysis requirements, or the information of the data analysis results required by the analysis requirements, also includes the line graph template corresponding to the "a line graph comparing user age and purchasing power".
[0058] In an embodiment of the present application, a report template is determined based on a result query statement, and second target data required to respond to the report requirement is queried from the data to be analyzed. The second target data refers to the data required to analyze the report requirement. The second target data is analyzed to obtain the data required to be filled in the report template, and then the data is filled into the corresponding position in the report template.
[0059] In the above embodiment, it is not necessary to process all the data to be analyzed. It is only necessary to search for the corresponding data according to the result query statement of the large language model to obtain the report corresponding to the report requirement. The data analysis speed is fast, which greatly simplifies the report production process and production time.
[0060] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment analyze the second target data, and generate a report using the data analysis result of the second target data and the report template, which may specifically include the following steps:
[0061] Based on the second target data, the third target data to be filled in the report template is calculated; the third target data is filled into the report template to obtain a report.
[0062] Specifically, the second target data can be analyzed and calculated according to the content to be filled in the report template to obtain the third target data to be filled in the report template, and then the third target data can be filled into the report template to obtain the corresponding report.
[0063] More specifically, after obtaining the data to be analyzed, the user can manually specify the indicator column and dimension column, wherein the indicator column refers to the column that needs to be counted and analyzed, such as power generation, income value, etc., and the dimension column refers to the column used as a screening condition, such as time, location, etc. After obtaining the result query statement corresponding to the report requirement, the relevant indicators of the data to be analyzed are extracted based on the result query statement, and the relevant dimensions of the data to be analyzed are extracted as the second target data, and the current value of the indicator or the year-on-year and month-on-month value and other indicator value results are calculated according to the dimension as the third target data, and the indicator value results are summarized to form a data conclusion, and finally the required line chart, pie chart or bar chart is generated.
[0064] As an optional implementation, another embodiment of the present application discloses that the steps of the above embodiment input the analysis requirements into the large language model to obtain the result query statement output by the large language model, which may specifically include the following steps:
[0065] The report requirements are input into the big language model, and the result query statement corresponding to the general report of the industry to which the data to be analyzed belongs output by the big language model is obtained.
[0066] In some embodiments, if the user does not specify the type of report in the report requirement, but only has the need to generate a report, then the large language model can generate a result query statement corresponding to a general report of the industry to which the data to be analyzed belongs, so as to generate a general report of the industry to which the data to be analyzed belongs based on the result query statement for the user to browse.
[0067] In some embodiments, even if the user does not input a report requirement, a result query statement corresponding to a general report of the industry to which the data to be analyzed belongs can be automatically generated, so that a general report of the industry to which the data to be analyzed belongs can be generated based on the result query statement, so that the data analysis results can be displayed more clearly.
[0068] It should be noted that the current large language model already has the ability to determine the general reports in a field based on the industry field. In order to optimize this ability, different industries can be constructed as training samples in advance, and the general reports corresponding to the training samples can be constructed as labels. The large language model can be fine-tuned with the goal of predicting the general reports corresponding to each industry.
[0069] In the above embodiment, a general report for the industry can be automatically generated without the user specifying the type of report, which has a high degree of intelligence.
[0070] As an optional implementation, another embodiment of the present application discloses that before the steps of the above embodiment obtain the analysis requirements for the data to be analyzed, the following steps may be specifically included:
[0071] Obtain a first data file of any type from a plurality of setting file types, and use the first data file as the data to be analyzed; and / or, obtain a database connection parameter of any type from a plurality of setting database types, and obtain a second data file in the database based on the database connection parameter as the data to be analyzed; and / or, call a third data file in an external data source through a data calling interface as the data to be analyzed.
[0072] In the embodiments of the present application, the specific type of the data to be analyzed is not limited, and it may be any type of first data file, for example, the first data file may be a CSV file or an Excel file.
[0073] The embodiments of the present application do not limit the method for obtaining the data to be analyzed. For example, the data to be analyzed may be a data file to be analyzed directly uploaded by a user; or it may be a second data file in a database obtained based on database connection parameters. Specifically, the user may provide database connection parameters, such as database address, port, user name, password, etc., and automatically connect to the database based on the database connection parameters to obtain the second data file. The database may be MySQL, Oracle, PostgreSQL, etc., which is not limited in this embodiment. In addition, it may be a third data file obtained by calling an external data source through a data call interface. Specifically, an API interface may be provided by a user, and the user may configure the URL, request method, authentication information, etc. of the API. Based on the above-mentioned URL, request method, authentication information, etc. of the API, the API is automatically called to obtain the third data file.
[0074] In the above embodiments, complex data sources can be integrated, the data processing flow can be simplified, and the accuracy and efficiency of data processing can be improved.
[0075] In some embodiments, in order to facilitate user operation, an intuitive and easy-to-use user interface is provided, which supports drag-and-drop operations, natural language queries and other functions to meet the personalized needs of different users. In some embodiments, before outputting the data analysis results, the user can adjust the color theme style according to his or her preferences, and preview it, and output the data analysis results after confirming that they are correct. Exemplarily, the data analysis results in an editable format can be generated, and the editable format refers to support for text editing operations and drag-and-drop operations, etc., and the user can further adjust and optimize the data analysis results.
[0076] Corresponding to the above data analysis method, the present application embodiment also discloses a data analysis device, see Figure 3 As shown, the device comprises:
[0077] The acquisition module 100 is used to acquire analysis requirements for the data to be analyzed; the analysis requirements are analysis requirements in natural language form;
[0078] The input module 110 is used to input the analysis requirements into the large language model to obtain the result query statement output by the large language model; the result query statement includes information of the target data required to respond to the analysis requirements and information of the data analysis results required for the analysis requirements;
[0079] The generating module 120 is used to query the target data from the data to be analyzed according to the result query statement, and analyze the target data to generate the data analysis result required for analysis.
[0080] As an optional implementation, another embodiment of the present application discloses that the acquisition module in the above embodiment, when acquiring the analysis requirements for the data to be analyzed, is specifically used to:
[0081] The metadata and data samples in the data to be analyzed, as well as the industry information of the industry to which the data to be analyzed belong, are input into the large language model so that the large language model generates recommended requirements corresponding to the data to be analyzed; at least one recommended requirement generated by the large language model is obtained, and a target requirement selected by a user from the at least one recommended requirement is determined as an analysis requirement.
[0082] As an optional implementation, another embodiment of the present application discloses that the analysis requirement includes a data analysis requirement; the generation module of the above embodiment, when querying the target data from the data to be analyzed according to the result query statement, and analyzing the target data to generate the data analysis result of the analysis requirement, is specifically used to:
[0083] According to the result query statement, the first target data required to respond to the data analysis requirement is queried from the data to be analyzed; the first target data is analyzed to generate the data analysis result required by the data analysis.
[0084] As an optional implementation, another embodiment of the present application discloses that the analysis requirement includes a report requirement; the generation module of the above embodiment, when querying the target data from the data to be analyzed according to the result query statement, and analyzing the target data to generate the data analysis result of the analysis requirement, is specifically used to:
[0085] A report template is determined according to the result query statement, and second target data required to respond to the report requirement is queried from the data to be analyzed; the second target data is analyzed, and a report is generated using the data analysis result of the second target data and the report template.
[0086] As an optional implementation, another embodiment of the present application discloses that the generation module of the above embodiment, when analyzing the second target data and generating a report using the data analysis result of the second target data and the report template, is specifically used to:
[0087] Based on the second target data, the third target data to be filled in the report template is calculated; the third target data is filled into the report template to obtain a report.
[0088] As an optional implementation, another embodiment of the present application discloses that the generation module of the above embodiment, when inputting the analysis requirement into the large language model and obtaining the result query statement output by the large language model, is specifically used to:
[0089] The report requirements are input into the big language model, and the result query statement corresponding to the general report of the industry to which the data to be analyzed belongs output by the big language model is obtained.
[0090] As an optional implementation, another embodiment of the present application discloses that the device in the above embodiment further includes:
[0091] The file acquisition module is used to acquire a first data file of any type from a plurality of set file types, and use the first data file as the data to be analyzed; and / or, to acquire a database connection parameter of any type from a plurality of set database types, and acquire a second data file in the database based on the database connection parameter as the data to be analyzed; and / or, to call a third data file in an external data source as the data to be analyzed through a data calling interface.
[0092] Specifically, the device provided in this embodiment belongs to the same application concept as the method provided in the above embodiment of this application, can execute the method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For the technical details not fully described in this embodiment, please refer to the specific processing content of the method provided in the above embodiment of this application, which will not be repeated here.
[0093] The functions implemented by the above modules can be implemented by the same or different processors respectively, and the embodiments of the present application are not limited thereto.
[0094] It should be understood that the units in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by the configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of hardware circuits, or in part by a processor calling software, and the remaining part is implemented in the form of hardware circuits.
[0095] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
[0096] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0097] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0098] An embodiment of the present application further provides a control device, which includes a processor and an interface circuit. The processor in the control device is connected to an input-output component through the interface circuit of the control device.
[0099] The input-output component specifically refers to a hardware component that enables a user to input information and output information to the user, such as a microphone, keyboard, handwriting tablet, touch screen, display, speaker, printer, etc.
[0100] The above-mentioned interface circuit can be any interface circuit that can realize the data communication function, for example, it can be a USB interface circuit, a Type-C interface circuit, a serial port circuit, a PCIE circuit, etc.
[0101] The processor in the control device is a circuit with signal processing capability, which improves the data analysis speed by executing any one of the data analysis methods introduced in the above embodiments. The specific implementation of the processor can refer to the above processor implementation, and the embodiments of this application are not strictly limited.
[0102] When the control device is applied to a device with a human-computer interaction function, the input and output components of the control device may be input components and output components on the device, such as a microphone, a keyboard, a handwriting tablet, a touch screen, a display, an audio player, etc. At the same time, the processor of the control device may be a CPU or GPU, etc. provided by the device, and the interface circuit of the control device may be an interface circuit between the information input component of the device and a processor such as a CPU or GPU.
[0103] Corresponding to the above data analysis method, the present application embodiment also discloses an electronic device, see Figure 4 As shown, the electronic device includes:
[0104] Memory 200 and processor 210;
[0105] The memory 200 is connected to the processor 210 and is used to store programs;
[0106] The processor 210 is used to implement the data analysis method disclosed in any of the above embodiments by running the program stored in the memory 200.
[0107] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
[0108] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.
[0109] A bus may include a pathway that transfers information between components of a computer system.
[0110] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0111] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0112] The memory 200 stores a program for executing the technical solution of the present application, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0113] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0114] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0115] The communication interface 220 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0116] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement the various steps of the data analysis method provided in the above embodiments of the present application.
[0117] In addition to the above-mentioned methods and devices, the embodiments of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the various steps of the data analysis method provided in the above-mentioned embodiments.
[0118] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0119] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK).
[0120] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes each step of the data analysis method provided in the above embodiment.
[0121] The computer readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0122] Specifically, the specific working contents of each part of the above-mentioned electronic device, computer program product and storage medium, as well as the specific processing contents when the computer program product or the computer program on the above-mentioned storage medium is executed by the processor, can be found in the contents of the various embodiments of the above-mentioned data analysis method, and will not be repeated here.
[0123] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0124] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0125] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0126] The modules and sub-modules in the devices and terminals in the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0127] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0128] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0130] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0131] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0132] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0133] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data analysis method, characterized in that: include: Obtain analysis requirements for the data to be analyzed; The analysis requirement is an analysis requirement in natural language form; Inputting the analysis requirement into the large language model to obtain a result query statement output by the large language model; the result query statement includes information about the target data required to respond to the analysis requirement and information about the data analysis result required by the analysis requirement; According to the result query statement, the target data is queried from the data to be analyzed, and the target data is analyzed to generate the data analysis result required for the analysis.
2. The method according to claim 1, characterized in that The obtaining of analysis requirements for the data to be analyzed includes: Inputting metadata and data samples in the data to be analyzed, as well as industry information of the industry to which the data to be analyzed belongs, into the large language model, so that the large language model generates recommendation requirements corresponding to the data to be analyzed; At least one recommended requirement generated by the large language model is obtained, and a target requirement selected by a user from the at least one recommended requirement is determined as an analysis requirement.
3. The method according to claim 1 or 2, characterized in that: The analysis requirement includes a data analysis requirement; the querying the target data from the data to be analyzed according to the result query statement, and analyzing the target data to generate the data analysis result of the analysis requirement, including: According to the result query statement, query the first target data required to respond to the data analysis requirement from the data to be analyzed; The first target data is analyzed to generate a data analysis result required for the data analysis.
4. The method according to claim 1 or 2, characterized in that: The analysis requirement includes a report requirement; the querying the target data from the data to be analyzed according to the result query statement, and analyzing the target data to generate the data analysis result of the analysis requirement, including: Determining a report template according to the result query statement, and querying second target data required to respond to the report requirement from the data to be analyzed; The second target data is analyzed, and a report is generated using the data analysis result of the second target data and the report template.
5. The method according to claim 4, characterized in that The analyzing the second target data and generating a report using the data analysis result of the second target data and the report template includes: Based on the second target data, third target data to be filled in the report template is calculated; Fill the third target data into the report template to obtain the report.
6. The method according to claim 4, characterized in that The step of inputting the analysis requirement into a large language model to obtain a result query statement output by the large language model includes: The report requirement is input into the large language model to obtain a result query statement output by the large language model corresponding to the general report of the industry to which the data to be analyzed belongs.
7. The method according to claim 1, characterized in that Before obtaining the analysis requirements for the data to be analyzed, the method further includes: Acquire a first data file of any type among a plurality of setting file types, and use the first data file as data to be analyzed; and / or, Obtaining a database connection parameter of any type among a plurality of set database types, and obtaining a second data file in the database as data to be analyzed based on the database connection parameter; and / or, The third data file in the external data source is called through the data calling interface as the data to be analyzed.
8. A data analysis device, characterized in that: include: An acquisition module, used to obtain analysis requirements for the data to be analyzed; The analysis requirement is an analysis requirement in natural language form; An input module, used to input the analysis requirement into the large language model to obtain a result query statement output by the large language model; the result query statement includes information about the target data required to respond to the analysis requirement and information about the data analysis result required by the analysis requirement; A generation module is used to query the target data from the data to be analyzed according to the result query statement, and analyze the target data to generate the data analysis result of the analysis requirement.
9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to implement the method according to any one of claims 1 to 7 by running the program in the memory.
10. A computer program product, characterized in that The computer program product comprises a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Uniformity AI multi-modal data acquisition method and platform
CN120146012A