Data analysis method and device and related product
Through the combination of data analysis intelligent agent and target big model, target prompt words are generated and delivery data are processed, which solves the problems of low efficiency and unstable accuracy of manual analysis, and achieves efficient and accurate delivery data analysis.
Patent Information
- Application Number
- CN202510085022.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, manual analysis and data delivery are inefficient and unstable in accuracy, and are easily affected by subjective factors.
Through the data analysis intelligent agent, the target prompt words are generated based on the questions to be analyzed and the initial prompt words entered by the user, and the target big model is used to process the target prompt words and the data to be analyzed to generate analysis results.
It realizes the rapid and accurate mining of key information from the delivery data, identifying the effect differences and user behavior patterns under different delivery strategies, and improving the stability and efficiency of the analysis results.
Smart Images

Figure CN119887300A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of advertising and marketing technology and computer technology, and in particular, to a data analysis method, device and related products. Background Art
[0002] Delivery data refers to a series of key indicators used to measure and analyze advertising performance in advertising marketing activities, including the number of impressions, display cost, number of clicks, click-through rate, click cost, number of conversions, conversion rate, cost per conversion, add-on purchases, purchases, etc. In today's highly competitive business environment, in-depth analysis of delivery data is of vital importance. By mining and analyzing the rules behind delivery data, companies can more accurately understand market demand, optimize marketing strategies, and improve resource utilization efficiency, thereby gaining an advantage in the fierce market competition.
[0003] At present, manual methods are generally used to achieve information mining of delivery data. Data analysts use their professional knowledge and experience to interpret delivery data through some data analysis methods and tools to obtain the internal laws of delivery data, such as the correlation between delivery data. However, in the face of massive amounts of data, this method of analysis is inefficient and cannot provide timely decision support; moreover, manual analysis is easily affected by subjective factors, and the experience and judgment standards of different analysts may differ, resulting in unstable accuracy and reliability of analysis results. Summary of the invention
[0004] In view of the above situation, the embodiments of the present disclosure provide a data analysis method, device and related products, aiming to solve the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present disclosure provides a data analysis method, the method comprising:
[0006] Obtain the questions to be analyzed input by the user and the delivery data to be analyzed selected by the user;
[0007] Generate a target prompt word through a data analysis intelligent agent according to the problem to be analyzed and the initial prompt word used when constructing the data analysis intelligent agent;
[0008] The target macro model called by the data analysis intelligent agent is used to process the target prompt words and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed.
[0009] In a second aspect, an embodiment of the present disclosure further provides a data analysis device, the device comprising:
[0010] The acquisition module is used to acquire the questions to be analyzed input by the user and the delivery data to be analyzed selected by the user;
[0011] A generating module, used for generating target prompt words through a data analysis intelligent agent according to the problem to be analyzed and the initial prompt words used when constructing the data analysis intelligent agent;
[0012] The analysis module is used to process the target prompt words and the delivery data to be analyzed by using the target large model called by the data analysis intelligent agent to obtain the analysis results corresponding to the problem to be analyzed.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the steps of the above-mentioned data analysis method.
[0014] By means of the above technical scheme, the data analysis method, device and related products provided by the embodiments of the present disclosure, through the data analysis intelligent agent, first generate the target prompt words according to the problem to be analyzed and the initial prompt words when constructing the intelligent agent, effectively integrate the user needs with the preset analysis framework of the intelligent agent, so that the subsequent processing of the target large model is more targeted. Then, the target prompt words and the delivery data to be analyzed are processed using the target large model. The target large model can quickly mine key information from the delivery data to be analyzed, such as identifying the effect differences and user behavior patterns under different delivery strategies, etc., with its massive knowledge reserve and powerful data analysis capabilities, and is not affected by the subjective factors of the manual analyst, and always maintains a stable and efficient analysis state, so as to accurately and efficiently obtain the analysis results corresponding to the problem to be analyzed, effectively solving the problems of unstable accuracy and low efficiency in traditional manual analysis of delivery data, greatly improving the quality and speed of delivery data mining, and providing a reliable basis for subsequent work such as delivery strategy optimization.
[0015] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0017] Figure 1 A schematic diagram of an application environment of the data analysis method provided by an embodiment of the present disclosure is shown;
[0018] Figure 2 A schematic diagram of a process flow of a data analysis method provided by an embodiment of the present disclosure is shown;
[0019] Figure 3 A schematic diagram showing the structure of a data analysis device provided by an embodiment of the present disclosure is shown;
[0020] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below in combination with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 such usage is interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
[0024] As mentioned above, in the prior art, manual methods are generally used to achieve information mining of delivery data. However, in the face of massive amounts of data, this method has low analysis efficiency and cannot provide timely decision support; moreover, manual analysis is easily affected by subjective factors, and the experience and judgment criteria of different analysts may differ, resulting in unstable accuracy and reliability of analysis results. Based on this, the present invention proposes a data analysis method, device and related products, and the present disclosure is described in detail below through specific embodiments.
[0025] To facilitate understanding of this embodiment, the data analysis method disclosed in the embodiment of the present disclosure is first introduced in detail. The data analysis method provided in the embodiment of the present disclosure can be applied to Figure 1In the application environment, the client communicates with the server through the network. The server can receive the problem to be analyzed input by the user and the delivery data to be analyzed selected by the user through the client; through the data analysis intelligent agent, the target prompt word is generated according to the problem to be analyzed and the initial prompt word used when constructing the data analysis intelligent agent; the target prompt word and the delivery data to be analyzed are processed by the target large model called by the data analysis intelligent agent to obtain the analysis result corresponding to the problem to be analyzed and return it to the client. Among them, the client can be but not limited to various personal computers, laptops, smart phones and tablet computers. The server is generally a computer device with a certain computing power, and the computer device includes, for example: a terminal device or a server or other processing device, wherein the terminal device can be a user equipment (UserEquipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (PersonalDigitalAssistant, PDA), a handheld device, a computing device, etc. The server can be implemented by an independent server or a server cluster composed of multiple servers. In some possible implementations, the method can be implemented by a processor calling a computer-readable instruction stored in a memory. The present invention is described in detail below through specific embodiments.
[0026] Figure 2 A schematic diagram of the data analysis method provided by the embodiment of the present disclosure is shown. Figure 2 It can be seen that the embodiment of the present disclosure at least includes steps S201-S203:
[0027] S201: Obtaining the question to be analyzed input by the user and the delivery data to be analyzed selected by the user.
[0028] In the disclosed embodiment, the problem to be analyzed is a specific question aimed at digging out in-depth understanding and insight into the intrinsic relationships, trends, patterns, etc. of the data from specific delivery data to support decision-making and business optimization. The types of problems to be analyzed include, but are not limited to: correlation analysis problems between delivery data, delivery strategy analysis problems, delivery effect trend analysis problems, user clustering analysis problems, etc. For example, the problem to be analyzed is "Which factors will have a decisive impact on the amount of additional purchases?" For another example, the problem to be analyzed is "What delivery strategy should be adopted to increase the purchase volume by 20%?"
[0029] The present disclosure does not limit the method for obtaining the problem to be analyzed. For example, a user can enter the problem to be analyzed in a web form, a search box, or an input box in a mobile application, and then send it to a server deployed with the method provided by the embodiment of the present disclosure through a network request. The user can also use an intelligent voice device, such as an intelligent speaker, a voice assistant, etc. to input the problem to be analyzed by voice, and the voice data is converted into text data and sent to the server.
[0030] This embodiment does not limit the source of the delivery data to be analyzed, and it can be delivery data received through other e-commerce platform interfaces, or it can be delivery data uploaded by users.
[0031] S202: Generate target prompt words through the data analysis intelligent agent according to the problem to be analyzed and the initial prompt words used when constructing the data analysis intelligent agent.
[0032] It should be noted that an intelligent agent can be understood as a program that can automatically perform some target tasks. It does not require human intervention and is highly intelligent and self-learning.
[0033] The disclosed embodiments do not limit the specific type of data analysis intelligent agent. Exemplarily, the data analysis intelligent agent is constructed by calling the interface of the create_pandas_dataframe_agent plug-in in the open source framework LangChain library. The initial prompt words used when constructing the data analysis intelligent agent include: the task role and task description of answering the question to be analyzed. Among them, the task role can be set as a senior data analyst in the field of advertising and marketing. The task description is used to indicate the task requirements of the analysis. Exemplarily, the initial prompt words are "You are an intelligent data analyst who reasoned step by step. For user questions, you will conduct detailed analysis step by step to ensure that each step has a clear title and content. Task requirements: Analyze the problem according to the provided data structure and break it down into multiple steps; provide detailed explanations for each step; explore multiple possible answers; self-check during the reasoning process, perform deduplication processing, and avoid errors; finally give an analysis conclusion or draw an analysis chart. "Then, based on the problem to be analyzed and the initial prompt words, generate a target prompt word. For example, the problem to be analyzed can be added to the initial prompt word to obtain the target prompt word.
[0034] S203: Using the target macro model called by the data analysis intelligent agent, the target prompt word and the delivery data to be analyzed are processed to obtain an analysis result corresponding to the problem to be analyzed.
[0035] The target large model is any large language model, which is not limited in this embodiment. For example, the target large model is GPT-4O (Generative Pretrained Transformer-4o), Gemini 2.0 flashexp model (Google's experimental multimodal AI model), etc. In specific implementation, for example, the target large model generates a corresponding processing strategy (such as data query, operation code) based on the received target prompt word. Then, according to the processing strategy, data query, logical calculation and other processing are performed on the data to be analyzed, and finally the processing results and the problem to be analyzed are input into the target large model again, and the target large model generates the final analysis result.
[0036] It can be seen that the disclosed embodiment first generates target prompt words based on the problem to be analyzed and the initial prompt words when constructing the intelligent agent through data analysis intelligent agent, effectively integrates user needs with the preset analysis framework of the intelligent agent, and makes the subsequent processing of the target large model more targeted. Then, the target large model is used to process the target prompt words and the delivery data to be analyzed. The target large model can quickly mine key information from the delivery data to be analyzed, such as identifying the effect differences and user behavior patterns under different delivery strategies, etc., with its massive knowledge reserves and powerful data analysis capabilities, and is not affected by the subjective factors of the manual analyst, and always maintains a stable and efficient analysis state, so as to accurately and efficiently obtain the analysis results corresponding to the problem to be analyzed, effectively solving the problems of unstable accuracy and low efficiency in traditional manual analysis of delivery data, greatly improving the quality and speed of delivery data mining, and providing a reliable basis for subsequent work such as delivery strategy optimization.
[0037] Furthermore, in order to better illustrate the process of the above data analysis method, as a refinement and extension of the above embodiment, the embodiment of the present invention provides several embodiments, but is not limited thereto, as follows.
[0038] In some embodiments of the present disclosure, the method also includes: standardizing the column names in the delivery data to be analyzed according to a preset column name mapping relationship to obtain new delivery data to be analyzed; generating target prompt words according to the problem to be analyzed and the initial prompt words used when constructing the data analysis intelligent agent through the data analysis intelligent agent, including: generating the target prompt words according to the problem to be analyzed, the initial prompt words, and the structural data of the new delivery data to be analyzed; wherein the structural data includes: the definition of each column name in the new delivery data to be analyzed, and the corresponding column name positioning parameter set, and the structural data is stored in a preset knowledge base.
[0039] In order to standardize the column names of data from different sources, eliminate the differences in column names, and facilitate subsequent data processing and analysis, in this embodiment, the mapping relationship between the column names in the delivery data from different sources and the customized standardized column names can be determined in advance, which can be achieved by establishing a mapping table or a configuration file, etc. Then, according to the preset column name mapping relationship, the original column names of the delivery data to be analyzed are modified into standardized column names to obtain new delivery data to be analyzed.
[0040] When constructing the target prompt words, the structural data of the new delivery data to be analyzed can be added on the basis of the questions to be analyzed and the initial prompt words to improve the accuracy of the target large model's understanding of the delivery data. Here, the structural data includes: the definition of each column name in the new delivery data to be analyzed and the column name positioning parameter set corresponding to each column name. Among them, the column name positioning parameter set contains one or more nouns. These nouns are like "clue words". When the user asks a question to be queried, if the nouns in the set appear in the question, the large model can quickly determine that the question involves the column corresponding to this set. Exemplarily, if there is a column name "rack" in the new delivery data to be analyzed, the structural data includes the definition data of the column name "rack" and the column name positioning parameter set. The definition data is: the specifications of the server installed in the rack, and the column name positioning parameter set includes: 1U, 2U, 4U.
[0041] In some embodiments, the column name location parameter set can be expanded with the help of a large model. In specific implementation, the prompt word input by the user can be obtained from the front end. For example, the prompt word is "The column name is rack, and the column name location parameter set includes: 1U, 2U, 4U. Please expand the column name location parameter set." The large model outputs the expanded column name location parameters as "3U, 6U" based on the prompt word. The expanded column name location parameters are added to the original column name location parameter set. The large model is usually trained with a large amount of data and can cover a wide range of knowledge fields. This embodiment uses the large model to realize the automatic expansion of the column name location parameter set, and can timely include more words that may appear in the query question (including some uncommon words) in the set, thereby further improving the accuracy of the first target large model's understanding of the query question, and then obtaining more accurate query results. At the same time, the use of large models to achieve automatic expansion significantly improves the expansion efficiency.
[0042] This embodiment standardizes the column names in the delivery data to be analyzed, eliminates the confusion and differences in the column names of data from different sources, and makes the data structure clearer and more standardized. On this basis, when constructing the target prompt words, the column names and column name positioning parameter sets of the new delivery data to be analyzed are added, so that the target big model can better understand the structure and content of the delivery data to be analyzed, thereby more accurately capturing key data, quickly generating analysis results that are more in line with user needs, and significantly improving the reliability and practicality of the analysis results.
[0043] In actual application scenarios, the target large model called by the data analysis intelligent agent will report an error when outputting the analysis result. After research, it was found that there are mainly two reasons for the error. The first reason for the error: when the target large model generates a delivery data processing code, and the code is used to extract data according to the date, the date format in the data does not meet the requirements of the delivery data processing code, so that the corresponding delivery data cannot be extracted, and then the analysis result cannot be output. Based on this, in some embodiments of the present disclosure, the method also includes: modifying the format of any date data in the delivery data to be analyzed to the target format to obtain the formatted delivery data; using the target large model called by the data analysis intelligent agent to process the target prompt word and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed, including: using the target large model to process the target prompt word to obtain the delivery data processing code; the target format meets the requirements of the programming language used by the delivery data processing code; generating a processing result according to the delivery data processing code and the formatted delivery data; using the target large model to generate the analysis result according to the processing result and the problem to be analyzed.
[0044] During implementation, for the step of modifying the format of any date data in the delivery data to be analyzed into the target format to obtain the formatted delivery data, for example, the date string in the original format can be parsed into a date object first; then the parsed date object can be formatted into a string in the target format; and then the original date string can be replaced with the newly formatted date string to obtain the formatted delivery data.
[0045] In some embodiments, the target macro model can be used in combination with the target prompt word to analyze the problem to be analyzed, and an analysis result can be attempted to be generated. If an error occurs because the format of the date data in the delivery data to be analyzed does not meet the requirements of the programming language used by the delivery data processing code (the error message contains the date format, data type mismatch or a specific error code or prompt related to date processing), then in response to the error, the format of any date data in the delivery data to be analyzed is modified to the target format to obtain the formatted delivery data. Subsequently, the delivery data processing code extracted by the regular expression is used to process the formatted delivery data to obtain the processing result. Finally, the analysis result is generated using the target macro model, the processing result and the problem to be analyzed.
[0046] In some other embodiments, the format of the date data in all the delivery data can be uniformly modified to the target format. Then, the delivery data processing code is generated by combining the target prompt word with the target large model; the delivery data processing code and the formatted delivery data to be analyzed are used to generate the processing result. Finally, the analysis result is generated according to the target large model, the processing result and the problem to be analyzed. In the actual application scenario, although the formatting of the date data in all the delivery data is realized by the automated script, there will still be human participation in the process. Therefore, there may still be missing and unformatted date data in the delivery data to be analyzed. Based on this, if an error is still reported because the format of the date data in the delivery data to be analyzed does not meet the requirements of the programming language used by the delivery data processing code, the date data in the delivery data to be analyzed can be formatted again to obtain the formatted delivery data. Subsequently, the delivery data processing code extracted by the regular expression is used to process the formatted delivery data to obtain the processing result. Finally, the analysis result is generated using the target large model, the processing result and the problem to be analyzed.
[0047] This embodiment solves the error problem caused by date format mismatch by modifying the format of the date data in the delivery data to be analyzed into a target format that meets the requirements of the delivery data processing code, so that the processing code generated by the target large model can be effectively applied to obtain accurate processing results, thereby providing users with accurate and valuable analysis results, improving user experience and satisfaction, and enhancing the stability of the system.
[0048] The second reason for the error: when the delivery data processing code involves performing operations on the delivery data to be analyzed, and the 0 value in the delivery data to be analyzed is in the denominator during the operation, an error may be reported, and the analysis result cannot be generated. Based on this, in some embodiments of the present disclosure, the target large model called by the data analysis intelligent agent is used to process the target prompt word and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed, including: using the target large model to process the target prompt word to obtain the delivery data processing code; using the delivery data processing code to query and operate the delivery data to be analyzed to obtain the processing result; using the target large model to generate the analysis result according to the processing result and the problem to be analyzed; wherein, for any target division operation in the operation processing, if the denominator in the target division operation is zero, the target division operation is skipped.
[0049] For example, in the process of using the delivery data processing code to calculate the delivery data to be analyzed to explore the rules behind the data, many average calculations may be involved. When performing a division operation to calculate the average, it will first check whether the denominator is 0. If the denominator is 0, then the partial average calculation will be skipped, and the system will continue to calculate the average of the data whose denominator is not 0, and based on these valid calculated averages and other related data processing results, the target large model is used in combination with the problem to be analyzed to further generate the final analysis results.
[0050] This implementation ensures that when encountering the special situation where the denominator is 0, the entire data pattern mining and analysis process will not be interrupted due to the division operation error of a single abnormal data point, so that the overall analysis work can continue to proceed within an acceptable accuracy range, while also ensuring the validity and availability of the analysis results to a certain extent.
[0051] In some embodiments, if the analysis result is in the form of a graph or a table, the method further includes: generating a chart analysis prompt word based on the problem to be analyzed and the storage address of the analysis result; calling a preset multimodal interface to generate a chart analysis result based on the chart analysis prompt word, and using the chart analysis result as the final analysis result.
[0052] In specific implementation, exemplarily, the prompt word for the chart analysis is: Please refer to the user's question: Question A, by analyzing the graphic or table content under storage address A, generate the analysis result for question A. The preset multimodal interface is an interface that can process various types of data input (such as text, images, audio, etc.) and generate corresponding output. The embodiments of the present disclosure do not limit the preset multimodal interface, which can be selected according to actual needs. Exemplarily, the preset multimodal interface is the multimodal interface of Zhipu Qingyan.
[0053] This embodiment reprocesses the analysis results in the form of charts and graphs to accurately extract key information, clearly present data trends and internal connections in text, and enable users to quickly grasp the core points, greatly improving the efficiency and accuracy of information transmission.
[0054] In some embodiments, the method further includes: generating a deep analysis prompt word according to the problem to be analyzed and the analysis result; and processing the deep analysis prompt word using the target macro model to obtain a deep analysis result. Exemplarily, the deep analysis prompt word is: please refer to the problem to be analyzed input by the user: question B, and the analysis result generated by artificial intelligence: analysis result A, and perform a deep analysis on the user's problem.
[0055] This embodiment generates deep analysis prompt words based on the problem to be analyzed and the analysis results, and then uses the target large model for processing, which can effectively mine the deep information behind the data and provide more insightful, comprehensive, accurate and reliable deep analysis results.
[0056] In practice, it is found that the analysis results generated by the data analysis intelligent agent may be in a foreign language, which brings great inconvenience to the user's reading and understanding. Based on this, in some embodiments, if the deep analysis results are described in a non-target language, a preset translation interface is called to translate the deep analysis results, and the translation result is used as the final deep analysis result.
[0057] This embodiment does not limit the translation interface. For example, the translation interface is the Zhipu Qingyan translation interface. For example, if the deep analysis result is described in English, the translation interface can be called to translate the deep analysis result to obtain a new deep analysis result described in Chinese.
[0058] This embodiment can automatically translate the deep analysis results and generate analysis content that users can understand, thereby breaking the language barrier and significantly enhancing the user experience.
[0059] In some embodiments, the target large model is generated according to the following method: obtaining an initial data set; the features of the samples in the initial data set include initial sample prompt words, initial sample delivery data, and initial sample inference data; the labels of the samples are the initial sample analysis results; the initial sample prompt words include the initial sample questions to be analyzed, the task roles and task descriptions for answering the initial sample questions to be analyzed; using a preset large language model, a plurality of new samples are generated according to the initial data set; wherein the preset large language model is combined with a Monte Carlo tree search tree through an MCTSr algorithm; a fine-tuning data set is obtained according to each of the new samples; and the initial large language model is fine-tuned using the fine-tuning data set to obtain the target large model.
[0060] In this embodiment, an initial data set can be obtained first. The initial data set can be constructed manually or automatically generated with the help of a large model in combination with demand. Exemplarily, for a sample in the initial data set, the characteristics of the sample include initial sample delivery data A, initial sample prompt word B, and initial sample reasoning data C. Among them, the initial sample prompt word B is: You are an e-commerce delivery data analyst. Please analyze whether the key factors affecting the sales of M brand mobile phones include time based on the provided sample delivery data A. The initial sample reasoning data C is: Statistics on delivery data and sales data on different dates of the week and different time periods of the day, it is found that the sales data on weekends will be significantly improved, and the order volume from 8 to 10 pm is higher than other time periods, which shows that the delivery time is closely related to consumer purchasing habits. Weekends and specific evening time periods are important time influencing factors. Sample label, that is, the initial sample analysis result is: the key factors affecting the sales of M brand mobile phones include time.
[0061] Then, a preset large language model is used to generate multiple new samples based on the initial data set. Here, the MCTSr (MCT Self-Refine) algorithm is an innovative algorithm that combines Monte Carlo tree search (MCTS) with a large language model (LLM), which aims to improve the performance of complex mathematical reasoning tasks. The preset large language model can be any large language model combined with Monte Carlo tree search, which is not limited in this embodiment. In specific implementation, the preset large language model can generate multiple new samples based on the samples in the initial data set according to the sample extension prompt word. Here, the sample extension prompt word can be set according to actual needs, which is not limited in this embodiment. Exemplarily, the sample extension prompt word can be "analogous to the samples in the initial data set, create at least 15 new samples related to the delivery data. Each new sample must have obvious differences, and must contain detailed delivery data, prompt words for these delivery data, questions that need to be analyzed, answer reasoning process, and answers." After obtaining multiple new samples, the set consisting of multiple new samples can be directly used as a fine-tuning data set. Multiple new samples can also be added to the initial data set to obtain a fine-tuning data set.
[0062] After obtaining the fine-tuning data set, the fine-tuning data set is used to update and iterate the model parameters of the initial large language model, and finally obtain the target large model. The embodiment of the present disclosure does not limit the initial large language model, and it can be selected according to actual needs.
[0063] This embodiment obtains an initial data set containing features such as initial sample prompt words, delivery and inference data, and with analysis result labels, and generates new samples based on the initial data set with the help of a large language model. In the process of generating new samples, the Monte Carlo search tree can quickly traverse a large number of possible language combinations and find the optimal solution in the complex generation path, so that the generated new samples are of higher quality. A fine-tuning data set is constructed based on the new samples, and the initial large language model is fine-tuned using the fine-tuning data set to be applied to delivery data analysis in the advertising and marketing field, which can significantly improve the accuracy of the analysis results, enable the model to accurately understand the characteristics of the field, and reduce deviations.
[0064] The present disclosure also provides a data analysis method, comprising the following steps:
[0065] Step S1: Obtain the delivery data from each e-commerce platform and clean the delivery data. The data cleaning operation includes but is not limited to: adjusting the format of the date data in each delivery data to the "YYYY-MM-DD" format; filling the empty values of all delivery data, string type to "", integer type to 0, and floating point type to 0.0.
[0066] Step S2: Obtain the question to be analyzed input by the user and the delivery data to be analyzed selected by the user.
[0067] Step S3: According to the preset column name mapping relationship, the column names in the delivery data to be analyzed are standardized to obtain new delivery data to be analyzed.
[0068] Step S4: Generate target prompt words according to the problem to be analyzed, the initial prompt words, and the structural data of the new delivery data to be analyzed.
[0069] Step S5: Using the target macro model, the target prompt word is processed to obtain the delivery data processing code.
[0070] The target large model is generated according to the following method: obtaining an initial data set; the features of the samples in the initial data set include initial sample prompt words, initial sample delivery data, and initial sample inference data; the labels of the samples are the initial sample analysis results; the initial sample prompt words include the initial sample questions to be analyzed, the task roles and task descriptions for answering the initial sample questions to be analyzed; using a preset large language model, multiple new samples are generated according to the initial data set; wherein the preset large language model is combined with a Monte Carlo tree search tree through an MCTSr algorithm; a fine-tuning data set is obtained according to each new sample; and the initial large language model is fine-tuned using the fine-tuning data set to obtain the target large model.
[0071] Step S6: Use the delivery data processing code to query and calculate the delivery data to be analyzed to obtain the processing result. For any target division operation in the calculation process, if the denominator in the target division operation is zero, the target division operation is skipped.
[0072] During specific implementation, if a date format error occurs, any date data in the delivery data to be analyzed is formatted again to obtain the formatted delivery data; and a processing result is generated based on the delivery data processing code and the formatted delivery data.
[0073] Step S7: Generate analysis results using the target large model according to the processing results and the problem to be analyzed.
[0074] Step S8: If the analysis result is in the form of a graph or a table, a graph analysis prompt word is generated according to the problem to be analyzed and the storage address of the analysis result.
[0075] Step S9: calling a preset multimodal interface, generating a chart analysis result according to the chart analysis prompt word, and using the chart analysis result as the final analysis result.
[0076] Step S10: Generate in-depth analysis prompt words according to the problem to be analyzed and the analysis results.
[0077] Step S11: using the target large model, processing the deep analysis prompt words to obtain the deep analysis results.
[0078] Step S12: If the deep analysis result is described in a non-target language, a preset translation interface is called to translate the deep analysis result, and the translation result is used as the final deep analysis result.
[0079] Those skilled in the art will appreciate that, in the above method of the specific implementation manner, the writing order of the steps does not mean a strict execution order, but does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0080] It should be noted that, in practical applications, all the above possible implementation methods can be combined in any way to form possible embodiments of the present disclosure, which will not be described one by one here. The information (including but not limited to device information, user information, etc.) and data (including but not limited to data for analysis, storage and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The software tools or components appearing in the embodiments of the present disclosure are only examples and do not represent actual use.
[0081] Based on the same concept, the embodiment of the present disclosure further provides a data analysis device, which corresponds one-to-one to the data analysis method in the above embodiment. Figure 3 A schematic diagram of the structure of the data analysis device provided by the embodiment of the present disclosure is shown. Figure 3 As shown, the data analysis device 300 provided in the embodiment of the present disclosure includes:
[0082] The acquisition module 301 is used to acquire the question to be analyzed input by the user and the delivery data to be analyzed selected by the user;
[0083] A generating module 302 is used to generate a target prompt word through a data analysis intelligent agent according to the problem to be analyzed and the initial prompt word used when constructing the data analysis intelligent agent;
[0084] The analysis module 303 is used to process the target prompt words and the delivery data to be analyzed by using the target macro model called by the data analysis intelligent agent to obtain the analysis result corresponding to the problem to be analyzed.
[0085] In some embodiments, the device further comprises a cleaning module, which is used to:
[0086] According to the preset column name mapping relationship, the column names in the delivery data to be analyzed are standardized to obtain new delivery data to be analyzed;
[0087] The generating module 302 is used to generate the target prompt word according to the problem to be analyzed, the initial prompt word, and the structural data of the new delivery data to be analyzed; wherein the structural data includes: the definition of each column name in the new delivery data to be analyzed, and the corresponding column name positioning parameter set, and the structural data is stored in a preset knowledge base.
[0088] In some embodiments, the apparatus further comprises a format conversion module, configured to:
[0089] Modify the format of any date data in the delivery data to be analyzed into a target format to obtain formatted delivery data;
[0090] The analysis module 303 is used to: use the target macro model to process the target prompt word to obtain the delivery data processing code; the target format meets the requirements of the programming language used by the delivery data processing code; generate a processing result according to the delivery data processing code and the formatted delivery data; use the target macro model to generate the analysis result according to the processing result and the problem to be analyzed.
[0091] In some embodiments, in the above device, the analysis module 303 is used to:
[0092] Using the target macro model, the target prompt word is processed to obtain a delivery data processing code;
[0093] Using the delivery data processing code, query processing and operation processing are performed on the delivery data to be analyzed to obtain processing results;
[0094] Using the target large model, generating the analysis result according to the processing result and the problem to be analyzed;
[0095] Among them, for any target division operation in the operation processing, if the denominator in the target division operation is zero, the target division operation is skipped.
[0096] In some embodiments, if the analysis result is in the form of a graph or a table, the device further comprises a chart analysis module for:
[0097] Generate a chart analysis prompt word according to the problem to be analyzed and the storage address of the analysis result;
[0098] The preset multimodal interface is called, and a chart analysis result is generated according to the chart analysis prompt word, and the chart analysis result is used as the final analysis result.
[0099] In some embodiments, the device further comprises a depth analysis module, configured to:
[0100] Generate in-depth analysis prompt words according to the problem to be analyzed and the analysis result;
[0101] The deep analysis prompt words are processed using the target large model to obtain deep analysis results.
[0102] In some embodiments, the apparatus further comprises a translation module, configured to:
[0103] If the deep analysis result is described in a non-target language, a preset translation interface is called to translate the deep analysis result, and the translation result is used as the final deep analysis result.
[0104] In some embodiments, the device further comprises a fine-tuning module, configured to:
[0105] Acquire an initial data set; the features of the samples in the initial data set include initial sample prompt words, initial sample delivery data, and initial sample reasoning data; the labels of the samples are initial sample analysis results; the initial sample prompt words include initial sample questions to be analyzed, task roles and task descriptions for answering the initial sample questions to be analyzed;
[0106] Using a preset large language model, a plurality of new samples are generated according to the initial data set; wherein the preset large language model is combined with a Monte Carlo tree search tree through an MCTSr algorithm;
[0107] According to each of the new samples, a fine-tuning data set is obtained;
[0108] The initial large language model is fine-tuned using the fine-tuning dataset to obtain the target large model.
[0109] The present invention provides a data analysis device. Through a data analysis intelligent agent, a target prompt word is first generated based on the problem to be analyzed and the initial prompt word when the intelligent agent is constructed, and the user demand is effectively integrated with the preset analysis framework of the intelligent agent, so that the subsequent processing of the target large model is more targeted. Then, the target prompt word and the delivery data to be analyzed are processed using the target large model. The target large model can quickly mine key information from the delivery data to be analyzed, such as identifying the effect differences and user behavior patterns under different delivery strategies, by virtue of its massive knowledge reserve and powerful data analysis capabilities, and is not affected by the subjective factors of the manual analyst, and always maintains a stable and efficient analysis state, so as to accurately and efficiently obtain the analysis results corresponding to the problem to be analyzed, effectively solving the problems of unstable accuracy and low efficiency in traditional manual analysis of delivery data, greatly improving the quality and speed of delivery data mining, and providing a reliable basis for subsequent work such as delivery strategy optimization.
[0110] For the specific definition of the data analysis device, please refer to the definition of the data analysis method above, which will not be repeated here. Each module in the above-mentioned data analysis device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0111] Figure 4 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0112] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0113] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0114] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a data analysis device at the logical level. The processor executes the program stored in the memory and is specifically used to execute the above method.
[0115] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; 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 gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0116] The electronic device can execute the data analysis method provided by the multiple embodiments of the present disclosure, and realize the data analysis device in Figure 3 The functions of the illustrated embodiments will not be described in detail in the embodiments of the present disclosure.
[0117] The embodiments of the present disclosure also provide a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute the data analysis method provided by multiple embodiments of the present disclosure.
[0118] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0123] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0124] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0125] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the data analysis method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0126] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0127] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0128] It will be appreciated by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] The above are only embodiments of the present disclosure and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A data analysis method, characterized in that: The method comprises: Obtain the questions to be analyzed input by the user and the delivery data to be analyzed selected by the user; Generate a target prompt word through a data analysis intelligent agent according to the problem to be analyzed and the initial prompt word used when constructing the data analysis intelligent agent; The target macro model called by the data analysis intelligent agent is used to process the target prompt words and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed.
2. The method according to claim 1, characterized in that The method further comprises: According to the preset column name mapping relationship, the column names in the delivery data to be analyzed are standardized to obtain new delivery data to be analyzed; The method of generating target prompt words by the data analysis intelligent agent according to the problem to be analyzed and the initial prompt words used when constructing the data analysis intelligent agent includes: The target prompt word is generated according to the problem to be analyzed, the initial prompt word, and the structural data of the new delivery data to be analyzed; wherein the structural data includes: the definition of each column name in the new delivery data to be analyzed, and the corresponding column name positioning parameter set, and the structural data is stored in a preset knowledge base.
3. The method according to claim 1, characterized in that The method further comprises: Modify the format of any date data in the delivery data to be analyzed into a target format to obtain formatted delivery data; The target big model called by the data analysis intelligent agent is used to process the target prompt word and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed, including: The target prompt word is processed by using the target macro model to obtain a delivery data processing code; the target format meets the requirements of the programming language used by the delivery data processing code; Generate a processing result according to the delivery data processing code and the formatted delivery data; The target large model is used to generate the analysis result according to the processing result and the problem to be analyzed.
4. The method according to claim 1, characterized in that The target big model called by the data analysis intelligent agent is used to process the target prompt word and the delivery data to be analyzed to obtain the analysis result corresponding to the problem to be analyzed, including: Using the target macro model, the target prompt word is processed to obtain a delivery data processing code; using the delivery data processing code, the delivery data to be analyzed is queried and operated to obtain a processing result; using the target macro model, the analysis result is generated according to the processing result and the problem to be analyzed; Among them, for any target division operation in the operation processing, if the denominator in the target division operation is zero, the target division operation is skipped.
5. The method according to claim 1, characterized in that If the analysis result is in the form of a graph or a table, the method further comprises: Generate a chart analysis prompt word according to the problem to be analyzed and the storage address of the analysis result; The preset multimodal interface is called, and a chart analysis result is generated according to the chart analysis prompt word, and the chart analysis result is used as the final analysis result.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Generate in-depth analysis prompt words according to the problem to be analyzed and the analysis result; The deep analysis prompt words are processed using the target large model to obtain deep analysis results.
7. The method according to claim 6, characterized in that If the deep analysis result is described in a non-target language, a preset translation interface is called to translate the deep analysis result, and the translation result is used as the final deep analysis result.
8. The method according to any one of claims 1 to 5, characterized in that: The target macro model is generated according to the following method: Acquire an initial data set; the features of the samples in the initial data set include initial sample prompt words, initial sample delivery data, and initial sample reasoning data; the labels of the samples are initial sample analysis results; the initial sample prompt words include initial sample questions to be analyzed, task roles and task descriptions for answering the initial sample questions to be analyzed; Using a preset large language model, a plurality of new samples are generated according to the initial data set; wherein the preset large language model is combined with a Monte Carlo tree search tree through an MCTSr algorithm; According to each of the new samples, a fine-tuning data set is obtained; The initial large language model is fine-tuned using the fine-tuning dataset to obtain the target large model.
9. A data analysis device, characterized in that: The device comprises: The acquisition module is used to acquire the questions to be analyzed input by the user and the delivery data to be analyzed selected by the user; A generating module, used for generating target prompt words through a data analysis intelligent agent according to the problem to be analyzed and the initial prompt words used when constructing the data analysis intelligent agent; The analysis module is used to process the target prompt words and the delivery data to be analyzed by using the target large model called by the data analysis intelligent agent to obtain the analysis results corresponding to the problem to be analyzed.
10. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Natural language intelligent query method and device based on multi-agent interaction
CN118012900A
Data analysis method, system and equipment based on large language model and storage medium
CN118568212A
Internet of Things perception data analysis method and system, Internet of Things platform and storage medium
CN118689968A
Dataset construction method for strategic operation analysis events based on large model
CN118760894A
After-sales trigger management method and system based on multi-field analysis and fusion
CN118967147A