Data analysis method and device, electronic equipment and computer storage medium
By integrating the original inquiry content and analysis points in the large language model to construct the target inquiry content, the problem of the lack of professionalism and pertinence of the large language model in analyzing marketing data in brand operation scenarios is solved, and more accurate and specific results are achieved. Targeted analysis results.
Patent Information
- Application Number
- CN202411365768.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-21
AI Technical Summary
When the existing large language model analyzes marketing data in brand operation scenarios, the responses generated are too broad, lack industry professionalism and targetedness, and cannot accurately respond to specific operational goals or customer needs.
By obtaining the original inquiry content and analysis points, the prompt engineering integration is carried out to construct the target inquiry content and input it into the pre-trained large language model to obtain more targeted and guided analysis results.
It clarifies the specific direction and focus of the analysis, effectively avoids the broad or off-topic analysis results produced by the model, and improves the accuracy and pertinence of the answers.
Smart Images

Figure CN119337998A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data analysis method, device, electronic device and computer storage medium. Background Art
[0002] In the scenario of brand operation, a large amount of marketing data needs to be reviewed and analyzed, such as the need to analyze store sales profiles, store traffic and other scenarios.
[0003] In related technologies, large language models are used to analyze data. However, when applied to actual operational scenarios, the answers generated by large language models are often too broad. They lack common sense and industry background knowledge about different industries and brands, as well as professional understanding of the characteristics of the e-commerce industry, brand freedom activities, platform promotion activities, etc., and cannot accurately respond to specific operational goals or customer needs.
[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention
[0005] The present application provides a data analysis method, device, electronic device and computer storage medium to solve the above-mentioned technical problems existing in the related technology.
[0006] According to one embodiment of the present application, a data analysis method is provided, including: obtaining original query content to be analyzed, and obtaining analysis points corresponding to the original query content; integrating the original query content and the analysis points through a prompting project to obtain target query content; inputting the target query content into a pre-trained large language model to obtain analysis results corresponding to the target query content.
[0007] According to another embodiment of the present application, a data analysis device is provided, including: an acquisition module, used to acquire original query content to be analyzed, and acquire analysis points corresponding to the original query content; an integration module, used to integrate the original query content and the analysis points through a prompt project to obtain target query content; and an analysis module, used to input the target query content into a pre-trained large language model to obtain analysis results corresponding to the target query content.
[0008] Optionally, the integration module includes a query unit for querying a data table required for the original inquiry content; a calculation unit for performing mathematical operations related to the original inquiry content on the numerical values in the data table to obtain calculation results; and an integration unit for integrating the analysis points, the calculation results and the original inquiry content through a prompt project to obtain target inquiry content.
[0009] Optionally, the query unit includes a detection subunit for detecting whether there are multiple data tables related to the original query content; and a merging subunit for performing a data integration operation to merge data in multiple data tables if there are multiple data tables.
[0010] Optionally, the data analysis device also includes a construction module for constructing a training data set, the training data set including an input sample and an output sample, wherein the input sample is a target query content after the original query content and the analysis points are integrated; the output sample is a complete analysis sentence analyzed for the target query content; and a fine-tuning module is used to use the training data set to fine-tune the initial large language model to obtain a pre-trained large language model.
[0011] Optionally, the acquisition module includes an identification unit for performing semantic understanding on the original inquiry content and determining the inquiry type corresponding to the original inquiry content; and a determination unit for determining the analysis points of the original inquiry content according to the inquiry type.
[0012] Optionally, the determination unit includes a first determination subunit, which is used to determine that the analysis points of the original inquiry content are the activity date, discount rate and promotion information corresponding to the target product if the inquiry type is sales analysis of the target product.
[0013] Optionally, the determination unit includes a second determination subunit, which is used to determine that the analysis points of the original inquiry content are the proportion and trend of each traffic entrance of the target store platform if the inquiry type is the traffic analysis of the target store platform.
[0014] According to another embodiment of the present application, a computer storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0015] According to another embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0016] According to yet another embodiment of the present application, a computer program product comprising instructions is also provided, which enables the computer to execute the steps in the above method when the computer program product is executed on the computer.
[0017] Through the embodiments of the present application, the key points of the analysis are integrated with the original inquiry content to construct a more targeted and guiding target inquiry content, clarify the specific direction and focus of the analysis, effectively avoid the broad or off-topic analysis results generated by the model, and improve the accuracy of the answer. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a computer according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a data analysis method according to an embodiment of the present application;
[0021] Figure 3 is a flowchart of a query example of an embodiment of the present application;
[0022] Figure 4 It is a capability range diagram of the main model of the embodiment of the present application;
[0023] Figure 5 It is a structural block diagram of a data analysis device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] Example 1
[0027] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, a computer, a tablet or a similar computing device. Taking running on a computer as an example, Figure 1 is a hardware structure block diagram of a computer in an embodiment of the present application. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data analysis method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] In this embodiment, a data analysis method is provided. Figure 2 is a flow chart of a data analysis method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0031] Step S10, obtaining the original inquiry content to be analyzed, and obtaining the analysis points corresponding to the original inquiry content;
[0032] Step S20, integrating the original inquiry content and the analysis points through a prompting process to obtain a target inquiry content;
[0033] Step S30: input the target query content into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
[0034] In this embodiment, the inquiry content can be in the form of text data. In one example, the user inputs the original inquiry text "Analyze the basic information of an online store". The key points that need to be analyzed in the original inquiry content can be determined according to preset rules or user customization. Among them, the analysis points can be determined based on the established key point template. The template contains the standardized analysis dimensions required for various types of inquiries, and also supports users to customize specific analysis points according to actual needs. For example, for the target user, the key points of concern are the changing trend of store ratings and whether the store ratings in the same industry are high or low, so as to ensure the accuracy and personalization of the analysis. In view of the extensiveness and non-specificity of the large model, the above-mentioned key analysis points may not be within the scope of the prior knowledge of the large model. If these key points are not explicitly provided to the model as input or guidance, the model may analyze from other perspectives and ignore the key points that the user wants to analyze. Therefore, this embodiment integrates the key points of analysis with the original inquiry content through prompt engineering, constructs a more targeted and guiding target inquiry content, clarifies the specific direction and focus of the analysis, effectively avoids the broad or off-topic analysis results generated by the model, and provides analysis of specific aspects that meet business needs from the specific perspective of business and operational requirements, thereby improving the accuracy of answers.
[0035] In data analysis, mathematical calculations on data tables are often involved. The current large language models have relatively weak computing capabilities for data (see Figure 4 The capabilities of the main models shown in the figure are limited. In actual application scenarios, it is impossible to correctly analyze the data in the table and draw correct conclusions.
[0036] In view of this problem, in one implementation of this embodiment, the original query content and the analysis points are integrated through a prompting process to obtain the target query content including:
[0037] S21, querying the data table required for the original inquiry content;
[0038] S22, performing a mathematical operation related to the original query content on the values in the data table to obtain a calculation result;
[0039] S23, integrating the analysis points, the calculation results and the original inquiry content through a prompting process to obtain a target inquiry content.
[0040] Based on the original query content input by the user, an SQL query statement is constructed and executed, and the required data is retrieved through the query statement, which is e-commerce marketing data in this embodiment.
[0041] The original inquiry content includes but is not limited to: store basic information analysis, store category analysis, store product detail analysis, store new product analysis, store sales overview analysis and store traffic analysis. Among them, store basic information analysis: store information needs to be queried and analyzed, such as brand offline store information query, online platform store information query, etc. Offline store information includes store address, contact information, etc., and online store information includes store name, number of fans, store level, rating, etc. For example, based on the store service quality score and product rating, you can compare the rating data of the same industry to obtain an overall operation analysis related to the store. Store category analysis: product sales need to be queried and summarized by category, such as the proportion of transaction amount in each category in each month, the most popular category, and the category with the fastest sales increase, and it is necessary to combine the monthly marketing plan of each category and the time point of the big promotion for analysis. Store product detail analysis: TOP product analysis, product price and sales share analysis, also need to be combined with product marketing plan, discount rate changes, big promotion time point and other related factors for analysis. Store new product analysis: new product sales trend, new product rhythm analysis. Store sales overview analysis: sales, number of visitors, number of paying customers, average order value, conversion rate, member / non-member comparison analysis. Store traffic analysis: store traffic entrance proportion and trend analysis.
[0042] Determine the data to be queried based on the inquiry content, such as the store, category, product sales, number of visitors, number of buyers, selling price, whether the buyer is a member, and other information for subsequent analysis.
[0043] In this embodiment, when it is necessary to analyze the query content of numerical type, mathematical operations related to the query content of numerical type are performed in advance, such as sorting, filtering the maximum value, calculating percentage, average value, standard deviation, etc., to reduce the computational burden of the large language model in the real-time analysis process and ensure the accuracy of the data. Then, the pre-processed operation results, analysis points and original query content are integrated through prompt engineering to construct the complete target query content.
[0044] Through this implementation, the problem of insufficient computing power of current large language models in data analysis is effectively solved. By integrating pre-mathematical operation processing with prompt engineering, the performance of the model in complex data analysis tasks is significantly improved.
[0045] Optionally, the data tables required to query the original query content include:
[0046] S211, detecting whether there are multiple data tables related to the original query content;
[0047] S212: If there are multiple data tables, perform a data integration operation to merge the data in the multiple data tables.
[0048] In practical applications, a complex query may involve multiple data tables with different sources or structures. For example, when analyzing the sales profile of a store, you may need to consider multiple data sources such as the product sales data table, the customer purchase behavior data table, and the promotion activity data table.
[0049] In this embodiment, the original query content is first parsed to identify the key data elements and potential data table associations involved therein. Subsequently, database query technology (such as SQL JOIN operation or NoSQL database aggregation query) is used to search for data tables matching these key elements in the database system. If the search results show that there are multiple data tables that are highly related to the original query content, the next step of data integration operation is entered.
[0050] Optionally, the integration can use the JOIN statement of SQL to connect multiple tables according to the common fields between the data tables (such as product ID, customer ID, etc.) to obtain a comprehensive data set containing all necessary information. This data set will serve as the input for subsequent mathematical operations and prompt engineering integration, supporting the large language model to perform in-depth and accurate analysis of the original query content. This implementation method can better cope with complex and changing data analysis scenarios and improve the flexibility and practicality of data analysis.
[0051] In another implementation of this embodiment, before inputting the target query content into the pre-trained large language model, the method further includes:
[0052] Step A1, constructing a training data set, wherein the training data set includes an input sample and an output sample, wherein the input sample is a target query content after the original query content and the analysis key points are integrated; and the output sample is a complete analysis statement for analyzing the target query content;
[0053] Step A2: fine-tune the initial large language model using the training data set to obtain a pre-trained large language model.
[0054] In this embodiment, before applying the large language model for data analysis, the model is fine-tuned so that the model learns to analyze data from a specific perspective. A training data set is constructed, which includes input samples and output samples, wherein the input samples are complete prompts for each inquiry content, and the output samples are complete analysis sentences determined by operation experts for analyzing different inquiry contents from a specific perspective. Using the training data set constructed as above, the initial large language model is fine-tuned. This process enables the model to learn and internalize the mapping relationship between input samples and output samples through iterative training. The pre-trained large language model not only enhances the general language understanding ability, but also improves the performance in analysis tasks in specific fields.
[0055] The fine-tuned large language model is loaded into the system. The system can be used to query the database for data of any time period and any type. The complete prompt is constructed for the queried data in the same way, and then passed into the large language model to return the corresponding analysis results.
[0056] This implementation method improves the analysis accuracy of mathematical problems through prompt word engineering and fine-tuning of large language models, and allows the model to analyze data from a specified perspective, thereby providing more meaningful analysis results, helping brands to quickly obtain more reliable analysis conclusions based on operational data during operations.
[0057] In another implementation of this embodiment, the key points of analysis for obtaining the original inquiry content include:
[0058] S11, performing semantic understanding on the original query content to determine the query type corresponding to the original query content;
[0059] S12: determining the key points of analysis of the original inquiry content according to the inquiry type.
[0060] In this implementation, a comprehensive semantic understanding is performed on the original query content, including basic vocabulary and syntactic analysis, integration of context understanding, domain knowledge base, etc., to identify the query type corresponding to the original query.
[0061] Accurately match the corresponding analysis points according to the identified inquiry type. Pre-build a comprehensive analysis point library that contains preset analysis dimensions, key indicators, and potential focus points for different inquiry types. Filter out relevant analysis dimensions and indicators in the key point library according to the inquiry type, and then dynamically adjust and optimize these dimensions and indicators based on the specific information in the original inquiry (such as keywords, context, etc.) to ensure that the final analysis points meet the general characteristics of the inquiry type and closely meet the specific needs of users.
[0062] In the first application scenario of this embodiment, determining the key points of analysis of the original inquiry content according to the inquiry type includes: if the inquiry type is a sales analysis of a target product, determining the key points of analysis of the original inquiry content as the activity date, discount rate, and promotion information corresponding to the target product. For example, when it is necessary to analyze the monthly sales changes of a certain product in the past year, the brand's activity date, discount rate, and platform promotion nodes are determined as analysis points, which are used for the subsequent prompt model to analyze the sales changes under key promotion nodes.
[0063] In another application scenario of this embodiment, determining the analysis points of the original inquiry content according to the inquiry type includes: if the inquiry type is a traffic analysis of the target store platform, then determining the analysis points of the original inquiry content as the proportion and trend of each traffic entrance of the target store platform.
[0064] Reference Figure 3 , Figure 3 It is an implementation flow chart of the embodiment of the present application, including:
[0065] Step 1: Identify the problem that needs to be analyzed and query the required data through SQL.
[0066] Step 2: If you need to analyze numerical problems, calculate the order and proportion of the values in the table in advance.
[0067] Step 3: Determine the key points that need to be analyzed based on the type of problem.
[0068] Step 4: Build a complete prompt based on prompt engineering according to the query values and key points.
[0069] Step 5: Construct a batch of fine-tuning samples, where the input samples are complete prompts for each question, and the output samples are complete analysis sentences determined by operation experts for different questions from specific angles. This batch of samples is used for large language fine-tuning.
[0070] Step 6: Load the fine-tuned large language model into the system. The system can query the database for data of any time period and any type. The retrieved data is used to construct a complete prompt in the same way, and then passed into the large language model to obtain the analysis results.
[0071] This embodiment performs e-commerce marketing data analysis based on a large language model. When analyzing numerical type problems, the numerical order, proportion, etc. in the table are calculated in advance, the key points to be analyzed are determined in advance, and then the corresponding numerical values and key points are constructed into specific prompts through prompt engineering. These prompts are then used as input samples of the model, the analysis results written in advance by professional operators are used as model output samples, and the input and output are combined as training corpus to fine-tune the large language model. After fine-tuning the model, when analyzing more problems of the same type, the trained model is loaded first, and prompts are constructed in the same way according to the queried data and the specific problems to be analyzed, and then the prompts are passed into the model to obtain the corresponding analysis. This solves the problem that the current large model lacks the ability to analyze numerical values and certain specific angles of e-commerce, improves the brand's data insight and analysis capabilities, and improves overall operational efficiency.
[0072] In this embodiment, a specific query example is provided:
[0073] Enter the original inquiry content: "Please analyze the correlation between the changing trends of the average order value and the payment conversion rate from November 2021 to October 2022", and at the same time, enter the key analysis information of the big promotion month and the flat sales month; if this information is not informed to the model, the model will often make mistakes when identifying the month corresponding to the highest value, and will not combine the promotion information, and will not conduct a comprehensive analysis based on the big promotion month and the flat sales month. After fine-tuning the large language model, the stability and accuracy of the model's answers can be further improved. Find the corresponding data table, as shown in Table 1 below, "The average order value and payment conversion rate of a store from November 2021 to October 2022":
[0074] Store Name Date (month) Average order value Payment conversion rate XXXX official flagship store 2021-11 301 13.8% XXXX official flagship store 2021-12 298 7.6% XXXX official flagship store 2022-01 270 5.2% XXXX official flagship store 2022-02 274 7.7% XXXX official flagship store 2022-03 271 7.9% XXXX official flagship store 2022-04 284 5.5% XXXX official flagship store 2022-05 298 3.7% XXXX official flagship store 2022-06 308 11.9% XXXX official flagship store 2022-07 279 8.1% XXXX official flagship store 2022-08 278 9.3% XXXX official flagship store 2022-09 303 7.9% XXXX official flagship store 2022-10 278 5.8%
[0075] Based on the key points and data tables, a complete prompt is constructed: "June is the 618 promotion period, November is the Double 11 promotion period, January to May is the first half of the year's flat sales period, and July to October is the second half of the year's flat sales period. Analyze the correlation between the changing trends of average order value and payment conversion rate. Among them, the average order value is highest in 2022-06 and 2022-11, and the payment conversion rate is highest in 2021-11 and 2022-06." Enter the complete prompt into the large language model. The following is an example of a correct analysis result. However, if the above prompt is not added or fine-tuned, the analysis accuracy of the large language model will be low, and it is easy to make mistakes in certain values, such as finding the month corresponding to the maximum value of the average order value or payment conversion rate, and then making incorrect analysis based on the wrong value.
[0076] Based on the given data, we can analyze the changing trends in the average order value and payment conversion rate of a certain official flagship store from November 2021 to November 2022.
[0077] First, we can classify the data by date, dividing it into the first half of the year (January to May), the second half of the year (July to October), and the big promotion months (June and November).
[0078] Then, we can calculate the average of the average customer price and payment conversion rate in each time period to understand their changing trends. According to the prompts, we can get the following results: the average customer price in the first half of the year (January to May) is a; the average payment conversion rate in the first half of the year (January to May) is b; the average customer price in the second half of the year (July to October) is c; the average payment conversion rate in the second half of the year (July to October) is d; the average customer price in the big promotion months (June and November) is e; the average payment conversion rate in the big promotion months (June and November) is f.
[0079] According to the above calculation results, we can draw the following conclusions:
[0080] 1. The average order value is highest during the big promotion months (June and November), followed by the flat sales period in the second half of the year (July to October), and the lowest is the flat sales period in the first half of the year (January to May).
[0081] 2. The payment conversion rate is highest in the promotion months (June and November), followed by the second half of the year during the flat sales period (July to October), and the lowest is the first half of the year during the flat sales period (January to May).
[0082] In summary, there is a certain correlation between the average order value and the payment conversion rate. The average order value is higher in the promotion month, and the payment conversion rate is also higher. This may be because the promotional activities during the promotion period attracted more customers, so that a higher payment conversion rate was still achieved in the fierce competition; while there were no obvious promotional activities in the second half of the year during the flat sales period, and customers' willingness to buy was relatively low.
[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0084] Example 2
[0085] In this embodiment, a data analysis device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0086] Figure 5 is a structural block diagram of a data analysis device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0087] The acquisition module 51 is used to acquire the original inquiry content to be analyzed and acquire the analysis points corresponding to the original inquiry content;
[0088] An integration module 52, configured to integrate the original inquiry content and the analysis key points through a prompting process to obtain a target inquiry content;
[0089] The analysis module 53 is used to input the target query content into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
[0090] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0091] Example 3
[0092] An embodiment of the present application further provides a computer storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0093] Optionally, in this embodiment, the computer storage medium may be configured to store a computer program for performing the following steps:
[0094] S1, obtaining the original inquiry content to be analyzed, and obtaining the analysis points corresponding to the original inquiry content;
[0095] S2, integrating the original inquiry content and the analysis key points through a prompting process to obtain a target inquiry content;
[0096] S3, inputting the target query content into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
[0097] Optionally, in this embodiment, the above-mentioned computer storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0098] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0099] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0100] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0101] S1, obtaining the original inquiry content to be analyzed, and obtaining the analysis points corresponding to the original inquiry content;
[0102] S2, integrating the original inquiry content and the analysis key points through a prompting process to obtain a target inquiry content;
[0103] S3, inputting the target query content into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
[0104] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0105] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0106] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0111] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data analysis method, characterized in that: The method comprises: Obtaining the original inquiry content to be analyzed, and obtaining the analysis points corresponding to the original inquiry content; Integrate the original inquiry content and the analysis points through prompt engineering to obtain target inquiry content; The target query content is input into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
2. The method according to claim 1, characterized in that According to the original inquiry content and the analysis points, the target inquiry content is integrated through prompt engineering, including: Query the data table required for the original inquiry content; Performing mathematical operations related to the original query content on the values in the data table to obtain operation results; The analysis points, the calculation results and the original inquiry content are integrated through prompt engineering to obtain target inquiry content.
3. The method according to claim 2, characterized in that The data tables required to query the original inquiry content include: Detect whether there are multiple data tables related to the original query content; If there are multiple data tables, a data integration operation is performed to merge the data in the multiple data tables.
4. The method according to claim 1, characterized in that: Before inputting the target query content into the pre-trained large language model, the method further includes: Constructing a training data set, wherein the training data set includes an input sample and an output sample, wherein the input sample is a target query content after the original query content and the analysis key points are integrated; and the output sample is a complete analysis statement for analyzing the target query content; The training data set is used to fine-tune the initial large language model to obtain a pre-trained large language model.
5. The method according to claim 1, characterized in that The key points of analysis for obtaining the original inquiry content include: Performing semantic understanding on the original query content to determine the query type corresponding to the original query content; The analysis key points of the original inquiry content are determined according to the inquiry type.
6. The method according to claim 5, characterized in that The key points of analyzing the original inquiry content according to the inquiry type include: If the inquiry type is a sales analysis of a target product, the analysis key points of the original inquiry content are determined to be the activity date, discount rate and promotion information corresponding to the target product.
7. The method according to claim 1, characterized in that The key points of analyzing the original inquiry content according to the inquiry type include: If the inquiry type is a traffic analysis of a target store platform, the analysis key points of the original inquiry content are determined to be the proportion and trend of each traffic entrance of the target store platform.
8. A data analysis device, characterized in that: include: An acquisition module, used to acquire the original inquiry content to be analyzed, and acquire the analysis points corresponding to the original inquiry content; An integration module, used to integrate the original inquiry content and the analysis key points through a prompting process to obtain a target inquiry content; The analysis module is used to input the target query content into a pre-trained large language model to obtain an analysis result corresponding to the target query content.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the data analysis method according to any one of claims 1 to 7 by running a program stored in a memory.
10. A computer storage medium, characterized in that: The computer storage medium includes a stored program, wherein the program executes the data analysis method according to any one of claims 1 to 7 when executed.