Data processing method and apparatus, and data exchange method, apparatus and system
By introducing a search enhancement strategy and code interpreter into the data processing model, and using correlation examples and target classification results to generate program code, the problem of time-consuming and resource-consuming training of data processing models in long-tail tasks is solved, and the effect of quickly adapting to user needs and improving result accuracy is achieved.
Patent Information
- Application Number
- PCT/CN2024/141890
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-22
- Filing Date
- 2024-12-24
- Publication Date
- 2025-07-31
AI Technical Summary
Existing data processing models need special training in long-tail tasks to have relevant capabilities, which makes training time-consuming and resource-intensive and difficult to quickly adapt to users' personalized needs.
Through the search enhancement strategy, the correlation examples of the pending data are determined from the search knowledge base, and the data processing model is used to generate program code based on the target classification results, and the code execution is carried out in combination with the code interpreter to realize the self-learning and correction of the data processing model.
There is no need to train the data processing model, which can quickly adapt to users' long-tail needs, improve processing efficiency and result accuracy, and enhance the self-correction and improvement capabilities of the data processing model.
Smart Images

Figure CN2024141890_31072025_PF_FP_ABST
Abstract
Description
Data processing method and device, data interaction method, device and system Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, a data processing device, a data interaction method, a data interaction device, a data interaction system, a computing device, a computer storage medium, and a computer program product. Background Art
[0002] In question-and-answer scenarios, most existing code execution agent solutions adopt a direct solution of "generate code - run code - perform the next step based on the running results". They rely on the existing capabilities of the data processing model itself. For long-tail tasks and self-correction, the data processing model needs to be specially trained to have the relevant capabilities, but data processing model training is very time-consuming and resource-intensive.
[0003] Therefore, a data processing method is urgently needed to solve the technical problem that the above-mentioned data processing model is limited by existing capabilities and needs to be trained to obtain relevant capabilities in order to output accurate responses. Summary of the Invention
[0004] In view of this, the present disclosure provides a data processing method. One or more embodiments of this specification also relate to a data interaction method, a data device, a data interaction device, a data interaction system, a computing device, a computer-readable storage medium, and a computer program product to address technical deficiencies in the prior art.
[0005] According to a first aspect of the present disclosure, a data processing method is provided, which is applied to a code execution intelligent system, comprising:
[0006] Determining data to be processed, and determining associated examples corresponding to the data to be processed according to a retrieval enhancement strategy, wherein the retrieval enhancement strategy is a strategy of searching from a retrieval knowledge base and applying the retrieval results to a data processing model;
[0007] Determining a target classification result of the associated example;
[0008] According to the data to be processed, the associated examples, and the target classification results, the data processing model is utilized to determine and run the program code corresponding to the data to be processed to obtain the target results corresponding to the data to be processed.
[0009] According to a second aspect of the present disclosure, a data interaction method is provided, which is applied to a client and includes:
[0010] Receive data to be processed through the interactive interface, and send the data to be processed to the server;
[0011] Receive the target result corresponding to the data to be processed obtained by applying the above-mentioned data processing method, which is returned by the server, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
[0012] According to a third aspect of the present disclosure, a data interaction method is provided, which is applied to a data interaction system, wherein the system includes a client and a server, wherein:
[0013] The client receives the data to be processed through the interactive interface and sends the data to be processed to the server;
[0014] The server receives the data to be processed, applies the above data processing method, obtains the target result corresponding to the data to be processed, and returns the target result to the client;
[0015] The client receives the target result, displays the target result through the interactive interface, and receives result feedback information for the target result returned through the interactive interface.
[0016] According to a fourth aspect of the present disclosure, a data processing device is provided, which is applied to a code execution intelligent system, comprising:
[0017] a first determining module configured to determine data to be processed and determine associated examples corresponding to the data to be processed according to a retrieval enhancement strategy, wherein the retrieval enhancement strategy is a strategy of searching from a retrieval knowledge base and applying the retrieval results to a data processing model;
[0018] a second determination module, configured to determine a target classification result of the associated example;
[0019] The result acquisition module is configured to determine and run the program code corresponding to the data to be processed using the processing data model based on the data to be processed, the associated examples, and the target classification result, so as to obtain the target result corresponding to the data to be processed.
[0020] According to a fifth aspect of the present disclosure, a data interaction device is provided, which is applied to a client and includes:
[0021] A receiving module is configured to receive the data to be processed through the interactive interface and send the data to be processed to the server;
[0022] The display module is configured to receive the target result corresponding to the data to be processed obtained by applying the above-mentioned data processing method and returned by the server, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
[0023] According to a sixth aspect of the present disclosure, a data interaction system is provided, comprising a client and a server, wherein:
[0024] The client is configured to receive the data to be processed through an interactive interface and send the data to be processed to the server;
[0025] The server is configured to receive the data to be processed, apply the above data processing method, obtain a target result corresponding to the data to be processed, and return the target result to the client;
[0026] The client is further configured to receive the target result, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
[0027] According to a seventh aspect of the present disclosure, there is provided a computing device, including:
[0028] memory and processor;
[0029] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned data processing method or data interaction method are implemented.
[0030] According to an eighth aspect of the present disclosure, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned data processing method or data interaction method.
[0031] According to a ninth aspect of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned data method or data interaction method when executed by a processor.
[0032] The data processing method provided by the present disclosure is applied to a code execution intelligent system, and includes: determining the data to be processed, and determining the associated examples corresponding to the data to be processed based on a retrieval enhancement strategy, wherein the retrieval enhancement strategy is a strategy for searching from a retrieval knowledge base and applying the retrieval results to a data processing model; determining the target classification results of the associated examples; and using a data processing model based on the data to be processed, the associated examples, and the target classification results, determining and running the program code corresponding to the data to be processed to obtain the target result corresponding to the data to be processed.
[0033] Based on this, the data processing method determines the associated examples corresponding to the data to be processed through a retrieval enhancement strategy, and determines the target classification results of the associated examples. According to the target classification results of the associated examples, the data to be processed and the associated examples are input into the data processing model. The context capability of the data processing model is used to determine the program code corresponding to the data to be processed, and the code interpreter can be called to execute the program code, thereby obtaining the target result corresponding to the data to be processed. There is no need to train the data processing model. The data processing model uses the target classification results of the associated examples. When processing the data to be processed, it can refer to the associated examples of the positive classification results more and reflect on the associated examples of the negative classification results, thereby breaking through the limitations of the existing capabilities of the data processing model, meeting the long-tail needs of users and improving processing efficiency. It can enable the data processing model to automatically learn to reflect, correct and improve, thereby improving the accuracy of the code execution intelligent system's response. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] FIG1 is a schematic diagram of a scenario of a data processing method provided by an embodiment of this specification;
[0035] FIG2 is a flow chart of a data processing method provided by one embodiment of this specification;
[0036] FIG3 is a flowchart of a data processing method according to an embodiment of the present disclosure;
[0037] FIG4 is a flow chart of a data interaction method applied to a client provided by one embodiment of this specification;
[0038] FIG5 is an interaction flow chart of a data interaction method applied to a data interaction system provided by one embodiment of this specification;
[0039] FIG6 is a schematic diagram of the structure of a data processing device provided by one embodiment of this specification;
[0040] FIG7 is a schematic structural diagram of a data interaction device applied to a client provided by one embodiment of this specification;
[0041] FIG8 is a schematic diagram of the structure of a data interaction system provided by one embodiment of this specification;
[0042] FIG9 is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0043] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0044] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0045] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0046] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0047] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a cornerstone model / foundation model. It is pre-trained on a large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large language model (LLM) and a multi-modal pre-training model.
[0048] When large models are used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0049] First, the terms involved in one or more embodiments of this specification are explained.
[0050] Intelligent agent: an entity with intelligence; now it mostly refers to an entity that uses a large language model (LLM) as its core to complete a series of complex tasks.
[0051] Retrieval enhancement: By connecting to external knowledge bases, we can break through the limitations of the model’s limited knowledge and improve model performance.
[0052] In-context learning: Contextual learning refers to learning within a specific context. It considers the context of the text, as well as the relationships between data and the influence of contextual information. In this approach, the learning algorithm leverages contextual information to improve the accuracy and effectiveness of predictions and classifications.
[0053] Long Tail: The protruding portion in the middle of a normal curve is called the "head"; the relatively flat portions on either side are called the "tails." From the perspective of human needs, most demands are concentrated in the head, while the demands distributed in the tail are personalized, scattered, and small-scale demands. These differentiated, small-scale demands form a long "tail" on the demand curve.
[0054] An agent is a program that simulates human intelligent behavior, aiming to enable computers to perceive, reason, and make decisions like humans. With the development of large models (LLMs), the application and development of AI (Artificial Intelligence) agents has made significant progress. These large models, acting as AI agents, can handle complex tasks and situations, enabling them to better interact and collaborate with humans.
[0055] Code execution is a common and complex task. An intelligent agent writes code based on human needs, invokes a code interpreter to run the code, and then considers the next step based on the results. However, ensuring that the code generated by a large model runs correctly and meets requirements is relatively difficult. Errors often require self-reflection and correction. Furthermore, user needs also have a long tail. Therefore, a low-cost, lightweight data processing method is urgently needed to enable large models to reflect on and incrementally expand their code execution capabilities, thereby meeting users' long-tail needs, improving processing efficiency, and increasing the accuracy of results.
[0056] In this specification, a data processing method and a data interaction method are provided. This specification also involves a data processing device, a data interaction device, a data interaction system, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0057] Refer to FIG1 , which shows a scenario diagram of a data processing method provided by an embodiment of this specification.
[0058] Specifically, the data processing method can be applied to various scenarios including question-answering scenarios and search scenarios. Taking the application of the data processing method to the question-answering scenario as an example, the data processing method is described in detail.
[0059] The data processing method is implemented using a client 102 and a code execution intelligent system 104, wherein the client 102 is the front-end part for the user to interact with the code execution intelligent system 104; it can be a web page, a mobile application or other types of user interfaces; the client 102 is used to receive user input (such as text questions, voice commands or pictures, etc.), send the user input to the code execution intelligent system 104, and display the results returned by the code execution intelligent system 104 to the user.
[0060] Specifically, the client 102 sends data to be processed to the code execution intelligent system 104. In the question-and-answer scenario, the data to be processed can be understood as questions input by the user, such as the question input by the user is "2+2 equals?"; in actual applications, the user can input questions in the interactive interface of the client 102 in text or voice. If voice is used, the client 102 will also include corresponding voice processing parts, such as voice analysis, voice-to-text, voice synthesis and other modules, which are used to convert questions input by the user through voice into text. This manual does not limit this.
[0061] The intelligent code execution system 104 includes a data processing model. In a question-and-answer scenario, this data processing model can be understood as a question-and-answer model. After receiving a question from the client 102, the intelligent code execution system 104 determines related examples related to the question based on the retrieval enhancement strategy. These related examples include related questions related to the user's input question, related answers corresponding to the related questions, and the probability of the first answer of the related answers. For example, related example 1 is "Question: What is 2 plus 2? Answer: 2 plus 2 equals 4. The probability of the first answer is 1." The probability of the first answer is used to indicate the user's emotional polarity toward the related answer. For example, if the probability of the first answer is 1, it indicates that the user has a positive emotional polarity toward the related answer, that is, the user is satisfied with the related answer.
[0062] In addition, the sentiment classification model can be used to classify the associated example 1 to obtain the classification probability, and the first answer probability and the classification probability can be weighted to obtain the target answer probability of the above-mentioned associated example 1, so as to determine the target classification result of the associated example according to the target answer probability. For example, the target classification result of the associated example 1 is a positive case; correspondingly, the same processing can be performed on multiple associated examples to obtain the target classification results of each associated example.
[0063] The associated examples and the questions input by the user are spliced together using a preset splicing template, and the spliced text is input into the data processing model, which generates a program code to solve the target problem, i.e.
[0064] "python
[0065] #Calculate 2+2
[0066] result=2+2
[0067] # Output results
[0068] print(result)"
[0069] Call the code interpreter to run the program code and obtain the running result "After running the above code, the output will be: 4". According to the running result, obtain the question response template "2+2 equals 4"; output the program code, running result, and question response template to obtain the target answer corresponding to the question entered by the user.
[0070] The code execution intelligent system 104 returns the obtained target answer to the client 102. When the client 102 receives the target answer, it displays the target answer to the user through the interactive interface and displays the "like" and "dislike" icons so that the user can click the corresponding icons to provide feedback on the target answer and obtain the user's answer feedback information for the target answer; of course, if the user does not perform the "like" and "dislike" behavior, the user's answer feedback information for the target answer can also be obtained through the user's next reply, such as "OK, I understand" or "No, this is not the answer I want."
[0071] After receiving the user's answer feedback information for the target answer, the client 102 can send the answer feedback information to the code execution intelligent system 104, so that the code execution intelligent system 104 obtains the first answer probability of the target answer based on the answer feedback information. For example, when the user clicks the "Like" icon, the answer probability of obtaining the target answer is 1. Of course, the user may click incorrectly, so the classification probability of the sentiment classification model and the above-mentioned answer probability can be combined to obtain the first answer probability of the target answer; the input question, target answer and the first answer probability of the target answer are stored in the retrieval knowledge base for subsequent use.
[0072] The client 102 may include a browser, an APP (Application), or a web application such as an H5 (Hypertext Markup Language 5) application, a light application (also known as a mini-program, a lightweight application), or a cloud application. The client 102 may be based on a software development kit (SDK) of a corresponding service provided by the server, such as one developed based on a real-time communication (RTC) SDK. The client may be deployed in an electronic device and may rely on the device to run or on certain APPs in the device to run. The electronic device may have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, tablet computer, or personal computer. Various other types of applications may also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0073] The code execution intelligent system 104 can be understood as a code execution intelligent agent, which is a backend service or software application, for example, providing communication services for multiple clients, or providing services for processing data sent by clients.
[0074] It is worth noting that the data processing method provided in the present disclosure can be executed by the code execution intelligent system 104. In other embodiments of this specification, the data processing model can be deployed in the client 102, so that the client 102 can also have similar functions as the code execution intelligent system 104, thereby executing the data processing method provided in the present disclosure; in other embodiments, the data processing method provided in the present disclosure can also be jointly executed by the client 102 and the code execution intelligent system 104.
[0075] The data processing method provided by the present disclosure determines the associated examples corresponding to the data to be processed from the retrieval knowledge base and determines the target classification results of the associated examples. According to the target classification results of the associated examples, the data to be processed and the associated examples are input into the data processing model, and the contextual capabilities of the data processing model are utilized to obtain the target results corresponding to the data to be processed. There is no need to train the data processing model, and it can break through the limitations of the existing capabilities of the data processing model, meet the long-tail needs of users and improve processing efficiency. It can also enable the data processing model to automatically learn to reflect, correct and improve, thereby improving the accuracy of the results.
[0076] Referring to FIG. 2 , FIG. 2 shows a flow chart of a data processing method provided in an embodiment of this specification, which specifically includes the following steps.
[0077] Specifically, the data processing method is applied to a code execution intelligent system, wherein the code execution intelligent system can be understood as a code execution agent, which is an artificial intelligence system that can understand and generate code to perform specific tasks or solve problems.
[0078] Step 202: Determine the data to be processed, and determine the associated examples corresponding to the data to be processed according to the retrieval enhancement strategy, wherein the retrieval enhancement strategy is a strategy of searching from a retrieval knowledge base and applying the retrieval results to a data processing model.
[0079] Among them, the association example includes association data, the association result corresponding to the association data, and the first association result probability of the association result; among them, the data to be processed can be understood as different meanings depending on the application scenario. For example, in the question-and-answer scenario, the data to be processed can be understood as the question that the user wants to query by entering through the interactive interface of the client; for example, the question entered by the user is "There are 30 chickens and rabbits in the same cage, and there are 80 legs in total. How many legs does each have?"; or in the search scenario, the data to be processed can be understood as the keywords entered by the user through the interactive interface of the client.
[0080] The retrieval enhancement strategy can be understood as a strategy of searching in the retrieval knowledge base and applying the retrieval results to the data processing model to enhance the effect of the data processing model; the retrieval knowledge base can be understood as a database containing various data examples. The various data examples can be obtained from historical data or through human input, and there is no limitation here.
[0081] Related examples can be understood as similar cases corresponding to the data to be processed; related data can be understood as data similar to the data to be processed. For example, the related data corresponding to the question input by the user above can be related questions such as "There is a group of chickens and rabbits. The total number of legs is 60 more than twice the total number of heads. How many rabbits are there?" or "There are chickens and rabbits in the same cage. There are 123 heads and 462 legs in total. How many chickens and rabbits are there?"
[0082] The first association result probability can be understood as the probability of the user's emotional polarity towards the association result stored in the retrieval knowledge base. The first association result probability includes a first positive probability and a first negative probability. The first positive probability can be understood as the probability that the user's emotional polarity towards the association result is positive, and the first negative probability can be understood as the probability that the user's emotional polarity towards the association result is negative. For example, the first association result probability can be 1 or 0, 1 represents the first positive probability, and 0 represents the first negative probability. Through the first association result probability, it can be understood that the user's emotional polarity towards the association result corresponding to the associated data.
[0083] Specifically, taking the application of the data processing method in the question-answering scenario as an example, at this time, the data to be processed can be understood as the target question input by the user; the associated examples can be understood as the associated question-answering examples; and the first associated result probability can be understood as the first answer probability of the associated answer.
[0084] The server receives the target question input by the user through the interactive interface of the client, and determines the associated question and answer examples corresponding to the target question from the question and answer examples retrieved from the knowledge base. The associated question and answer examples include not only the associated questions and the associated answers corresponding to the associated questions, but also the first answer probability of the associated answers; thus, it can be determined whether the associated question and answer example is a positive case for the target question or a negative case for the target question based on the first answer probability of the associated answers.
[0085] In one or more embodiments of this specification, to reduce the workload of the data processing model and improve data processing efficiency, a preset number of associated examples may be selected when searching the knowledge base for associated examples corresponding to the data to be processed. Based on the preset number of associated examples and the data to be processed, a target result corresponding to the data to be processed is obtained. The specific implementation is as follows:
[0086] The determining of the data to be processed and determining the associated examples corresponding to the data to be processed according to the retrieval enhancement strategy includes:
[0087] The data to be processed is determined, and a preset number of associated examples corresponding to the data to be processed are selected from a search knowledge base.
[0088] The preset number can be set according to actual needs, such as 10, 20, etc.
[0089] Taking the preset number as 10 for an exemplary description, the data to be processed is determined, and 10 associated examples corresponding to the data to be processed are selected from the retrieval knowledge base.
[0090] The data processing method provided by the present disclosure allows users to select a preset number of related examples corresponding to the data to be processed from the retrieval knowledge base according to actual needs, when the preset number can be set according to actual needs. This can reduce the workload of the data processing model and speed up data processing efficiency when the data to be processed and the related examples are subsequently input into the data processing model.
[0091] Step 204: Determine the target classification result of the associated example.
[0092] In one or more embodiments of this specification, determining the target classification result of the associated example includes:
[0093] Determining a target result probability of the association example, wherein the target result probability is used to represent a probability of a user's sentiment polarity toward an association result in the association example;
[0094] A target classification result of the associated example is determined according to the target result probability.
[0095] Among them, the target result probability of the associated example can be understood as the probability of the user's emotional polarity towards the associated result in the associated example; the target classification result can be understood as the classification result after classifying the associated example, including positive classification results and negative classification results; the positive classification result can be understood as the associated example being a positive example of the data to be processed, and the negative classification result can be understood as the associated example being a negative example of the data to be processed.
[0096] Specifically, by determining the probability of the user's emotional polarity for the associated result in the associated example, the associated example is classified, thereby determining whether the associated example is a positive example of the data to be processed or a positive example of the data to be processed; for example, when the target result probability of the associated example is 0.8, it means that the user's emotional polarity for the associated result in the associated example tends to be positive, therefore, it can be determined that the associated example is a positive example of the data to be processed, so that when the data processing model processes the data to be processed, it can refer to the associated example more and obtain a more accurate target result.
[0097] In one or more embodiments of this specification, to ensure the accuracy of the target result probability of the obtained association example, when the association example retrieved from the knowledge base includes a first association result probability, a sentiment classification model is also used to obtain a second association result probability of the association result. The specific implementation method is as follows:
[0098] Determining the target result probability of the association example includes:
[0099] Obtaining a second association result probability of the association result according to the sentiment classification model, wherein the second association result probability is used to represent a probability of the user's sentiment polarity towards the association result obtained by the sentiment classification model;
[0100] The target result probability of the association example is determined according to the first association result probability of the association result and the second association result probability of the association result.
[0101] Among them, the sentiment classification model can be a separate classification model used to analyze the attitude expressed in the text, whether it tends to be positive or negative; in actual applications, the sentiment classification model can also be implemented using a data processing model, that is, using the data processing model to obtain the second association result probability of the association result.
[0102] Among them, the second association result probability can be understood as the probability of the user's emotional polarity towards the association result calculated by the sentiment classification model. The second association result probability includes a second positive probability and a second negative probability. The second positive probability can be understood as the probability that the user's emotional polarity towards the association result is positive, and the second negative probability can be understood as the probability that the user's emotional polarity towards the association result is negative; the first association result probability can be expressed in the form of a percentage. For example, when the second positive probability is greater than or equal to fifty percent, it means that the user's emotional polarity towards the association result is positive. Of course, when the second positive probability is greater than or equal to seventy percent, it means that the user's emotional polarity towards the association result is positive. Similarly, when the second negative probability is greater than or equal to fifty percent, it means that the user's emotional polarity towards the association result is negative. The specific settings can be made according to actual conditions and are not limited here.
[0103] In practical applications, when determining the target classification result of the associated example based on the first association result probability in the retrieved knowledge base, the target classification result may be inaccurate or accidental; therefore, in order to ensure the accuracy of the target classification result of the associated example, the sentiment classification model must also be used to obtain the second association result probability of the associated result.
[0104] For example, if the associated result contains a statement such as "I cannot determine the number of rabbits because the code interpreter returned an error. This may be because I entered the variable name or equation incorrectly. Please check and provide the correct number of heads and legs, and I will try to solve this problem again.", the negative probability of the associated result can be increased.
[0105] Specifically, based on the first association result probability of the association result stored in the retrieval knowledge base and the second association result probability of the association result obtained by using the sentiment classification model, the first association result probability and the second association result probability can be calculated by averaging or weighted calculation to obtain the target result probability. For example, when the first association result probability is 0.8 and the second association result probability is 0.6, the target result probability is calculated to be 0.7 by averaging the first association result probability and the second association result probability; thus, the target classification result of the association example is determined based on the target result probability.
[0106] The data processing method provided by the present disclosure, on the basis of retrieving the association examples of the knowledge base including the first association result probability, can also use the sentiment classification model to obtain the second association result probability of the association result, thereby determining the target result probability of the association example based on the first association result probability and the second association result probability, thereby improving the accuracy of the target result probability.
[0107] In one or more embodiments of this specification, the association examples may include multiple ones, and a preset probability threshold may be used to determine whether the target classification result of each association example is a positive classification result or a negative classification result. The specific implementation method is as follows:
[0108] The association examples include multiple;
[0109] Determining the target result probability of the association example according to the first association result probability of the association result and the second association result probability of the association result includes:
[0110] Determining a target result probability for each association example according to the first association result probability of each association result and the second association result probability of each association result;
[0111] Determining the target classification result of the associated question and answer example according to the target result probability includes:
[0112] When the target result probability is greater than or equal to a preset probability threshold, determine the positive classification results of each related question and answer example, or
[0113] When the target result probability is less than the preset probability threshold, a negative classification result of each associated question and answer example is determined.
[0114] Among them, the preset probability threshold can be set according to actual conditions, such as the preset probability threshold is 0.5; the positive classification result can be understood as the classification result of the associated example being classified as the positive case corresponding to the data to be processed; the negative classification result can be understood as the classification result of the associated example being classified as the negative case corresponding to the data to be processed.
[0115] In actual applications, the first association result probability and the second association result probability are the probabilities of the user's emotional polarity towards the associated answer. Here, the probability of the user's emotional polarity towards the associated answer being positive is taken as an example for detailed explanation.
[0116] For example, when the probability of the first associated result of the associated result in the associated example is 0.8, it means that the probability that the user's emotional polarity towards the associated result stored in the retrieved knowledge base is positive is 0.8; when the probability of the second associated result is 0.6, it means that the probability that the user's emotional polarity towards the associated result obtained by using the sentiment classification model is positive is 0.6; the target result probability calculated by averaging is 0.7, and the target result probability is greater than the preset probability threshold of 0.5, so it can be determined that the target classification result of the associated example is a positive classification result, that is, the associated question and answer example is a positive case of the data to be processed; accordingly, if the target result probability of another associated question and answer example is less than the preset probability threshold of 0.5, it can be determined that the target classification result of the associated example is a negative classification result, that is, the associated example is a negative case of the data to be processed.
[0117] The data processing method provided by the present disclosure can accurately determine whether the target classification result of each associated example is a positive classification result or a negative classification result based on the target result probability of each associated example when there are multiple associated examples by determining a preset probability threshold.
[0118] In one or more embodiments of this specification, different weight values may be assigned to the first association result probability and the second association result probability, thereby determining the target result probability of the association example based on the first association result probability, the weight value corresponding to the first association result probability, and the second association result probability, the weight value corresponding to the second association result probability. The specific implementation method is as follows:
[0119] Determining the target result probability of the association example according to the first association result probability of the association result and the second association result probability of the association result includes:
[0120] Determining a first weight value of the first association result probability and a second weight value of the second association result probability;
[0121] The target result probability of the association example is determined according to the first association result probability, the first weight value, the second association result probability, and the second weight value.
[0122] The target classification result of the associated example is determined by the first associated result probability and the second associated result probability. Therefore, different weight values can be assigned to the first associated result probability and the second associated result probability, such as the first weight value corresponding to the first associated result probability is w1, and the second weight value corresponding to the second answer probability is w2.
[0123] Continuing with the above example, when the probability of the first association result of the association result in the association example is 0.8 and the probability of the second association result is 0.6, the target result probability is obtained according to w1*0.8+w2*0.6. For example, when w1 is 0.6 and w2 is 0.4, the target result probability is calculated as 0.6*0.8+0.4*0.6, that is, the target result probability is 0.72, and the target answer probability is greater than 0.5. Therefore, it can be determined that the target classification result of the association example is a positive classification result, that is, the association example is a positive case of the data to be processed.
[0124] The data processing method provided by the present disclosure can reasonably assign weight values to the first association result probability and the second association result probability according to actual conditions when assigning weight values to the first association result probability and the second association result probability, thereby more accurately determining the target result probability of the association example.
[0125] In one or more embodiments of this specification, the first association result probability may include a first positive probability or a first negative probability, that is, the probability that the user's emotional polarity toward the association result is positive, or the probability that the user's emotional polarity toward the association result is negative; correspondingly, the second association result probability may also include a second positive probability or a second negative probability. The specific implementation is as follows:
[0126] The first association result probability of the association result includes a first positive probability or a first negative probability, and the second association result probability of the association result includes a second positive probability or a second negative probability;
[0127] Specifically, the target result probability of the association example may be determined according to the first positive probability or the first negative probability, the second positive probability or the second negative probability.
[0128] Among them, the first positive probability can be understood as the probability that the user's emotional polarity towards the associated result stored in the retrieval knowledge base is positive; the first negative probability can be understood as the probability that the user's emotional polarity towards the associated result stored in the retrieval knowledge base is negative.
[0129] The second positive probability can be understood as the probability that the user's emotional polarity towards the associated result is positive, obtained using the sentiment classification model; the second negative probability can be understood as the probability that the user's emotional polarity towards the associated result is negative, obtained using the sentiment classification model.
[0130] Specifically, the probability stored in the retrieval knowledge base can be the probability that the user's emotional polarity towards the associated result is positive, or the probability that the user's emotional polarity towards the associated result is negative; correspondingly, the probability obtained using the sentiment classification model can be the probability that the user's emotional polarity towards the associated result is positive, or the probability that the user's emotional polarity towards the associated result is negative.
[0131] In actual applications, when the first positive probability is a, the first negative probability is b, the second positive probability is c, and the second negative probability is d, following the above example, w1*a+w2*c can be used to obtain the positive classification result of the associated example, and w1*b+w2*d can be used to obtain the negative classification result of the associated example.
[0132] The data processing method provided by the present disclosure can obtain the probability that the user's emotional polarity towards the associated result is positive, or the probability that the user's emotional polarity towards the associated result is negative, thereby more flexibly determining the target classification result of the associated example based on the probability that the user's emotional polarity towards the associated result is positive, or the probability that the user's emotional polarity towards the associated result is negative.
[0133] Step 206: Based on the data to be processed, the associated examples, and the target classification result, the data processing model is used to determine and run the program code corresponding to the data to be processed to obtain the target result corresponding to the data to be processed.
[0134] Specifically, based on the data to be processed, associated examples, and target classification results of the associated examples, the contextual capabilities of the data processing model can be used to autonomously learn positive associated examples, reflect on how to avoid negative associated examples, determine the program code corresponding to the data to be processed, and run the program code by calling a code interpreter to obtain the target results corresponding to the data to be processed.
[0135] In one or more embodiments of this specification, a preset target splicing template can be used to splice the data to be processed and the associated examples, and the spliced text can be input into the data processing model to obtain the target result corresponding to the data to be processed output by the data processing model. The specific implementation method is as follows:
[0136] The method of determining and running a program code corresponding to the data to be processed using the data processing model based on the data to be processed, the association examples, and the target classification result to obtain a target result corresponding to the data to be processed includes:
[0137] splicing the data to be processed and the associated examples according to the target splicing template and the target classification results of the associated examples and inputting the spliced data and the associated examples into the data processing model;
[0138] The data processing model is used to determine and run the program code corresponding to the data to be processed, and obtain the target result output by the data processing model and corresponding to the data to be processed.
[0139] The target splicing template can be understood as a template for splicing the data to be processed and the associated question and answer examples; for example, the target splicing template is:
[0140] Here are some examples of tasks that were solved correctly. Please learn from them:
[0141] {Positive Case}
[0142] The following are examples of incorrect responses. Please learn from them and avoid making similar mistakes in the future:
[0143] {Negative Case}
[0144] Data to be processed: {data to be processed}
[0145] Target result: {target result}"
[0146] According to the target splicing template and the target classification results of the associated examples, the associated examples whose target classification results are positive classification results are spliced to "{positive case}", and the associated examples whose target classification results are negative classification results are spliced to "{negative case}", so that the spliced data to be processed and the associated examples are input into the data processing model. Using the data processing model, the program code corresponding to the data to be processed is determined and run to obtain the target result corresponding to the data to be processed output by the data processing model.
[0147] The data processing method provided by the present invention unifies the input format of the data to be processed and the associated examples into the data processing model by means of the target splicing template and the target classification results of the associated examples, thereby improving the processing efficiency of the data processing model and being able to quickly obtain the target results corresponding to the data to be processed.
[0148] In one or more embodiments of this specification, a data processing model is used to obtain program code corresponding to the data to be processed, and a code interpreter is called to obtain the corresponding running result of the program code, obtain a question response template, and thus obtain the target result corresponding to the data to be processed. The specific implementation method is as follows:
[0149] The method of determining and running a program code corresponding to the data to be processed using the data processing model based on the data to be processed, the associated question and answer examples, and the target classification result to obtain a target result corresponding to the data to be processed includes:
[0150] According to the data to be processed, the associated examples, and the target classification result, using the data processing model, obtaining a program code corresponding to the data to be processed;
[0151] Calling a code interpreter through the data processing model to run the program code, obtaining an operation result corresponding to the program code, and obtaining a question answering template according to the operation result;
[0152] According to the program code, the running result and the question answering template, a target result corresponding to the data to be processed is obtained.
[0153] The question response template can be understood as a supplementary response based on the running results. If the program code runs correctly, the supplementary response based on the running results can be "The number of chickens is A, and the number of rabbits is B." If the program code runs incorrectly, the supplementary response based on the running results can be "Because the code interpreter returned an error, I cannot determine the number of rabbits. This may be because I entered the variable name or equation incorrectly. Please check and provide the correct number of heads and legs, and I will try to solve this problem again."
[0154] For example, using a data processing model to obtain the program code corresponding to the data to be processed: Let the number of chickens be x and the number of rabbits be y. Based on the problem, the following two equations can be listed: x + y = 30 (number of heads) 2x + 4y = 80 (number of legs).
[0155] {Program code in any programming language}
[0156] The data processing model calls the code interpreter to run the program code generated above and obtains the corresponding running results of the program code:
[0157] (20,10)
[0158] Based on the running results, the data processing model obtains the question-answering template "There are 20 chickens and 10 rabbits." The program code, running results, and question-answering template are combined to output the target answer for the data to be processed:
[0159] Let x be the number of chickens and y be the number of rabbits. Based on the question, we can formulate the following two equations: x + y = 30 (number of heads) and 2x + 4y = 80 (number of legs).
[0160] {Program code in any programming language}
[0161] (20,10)
[0162] There are 20 chickens and 10 rabbits.
[0163] In actual applications, the code execution agent obtains feedback from the code running results. When the code runs incorrectly, the code execution agent can correct the generated code to improve accuracy. In other words, the code execution agent can allow the model to automatically learn to reflect, correct, and improve based on the feedback of the running results returned by the code interpreter.
[0164] The data processing method provided by the present invention utilizes a data processing model and an autonomous intelligent agent solution for code execution. Code is written according to human needs, a code interpreter tool is called to run the code, and the next step of operation is considered based on the results of the code execution. The data processing model can automatically learn to reflect, correct, and improve from the feedback of the code execution, thereby improving the accuracy of the results.
[0165] In one or more embodiments of this specification, to accurately obtain the first target result probability of the target result, after presenting the target result corresponding to the data to be processed to the user, result feedback information regarding the target result returned by the user is received, and the first target result probability of the target result is obtained based on the result feedback information. The specific implementation method is as follows:
[0166] After obtaining the target result corresponding to the data to be processed, the method further includes:
[0167] Displaying the target result through the interactive interface of the client, and receiving result feedback information returned by the client for the target result;
[0168] Obtaining a first target result probability of the target result according to the result feedback information, wherein the first target result probability is used to represent the probability of the user's emotional polarity towards the target result;
[0169] The data to be processed, the target result corresponding to the data to be processed, and the first target result probability of the target result are stored in a retrieval knowledge base.
[0170] Among them, the interactive interface can be understood as the interface for users to interact with the client; the result feedback information can be understood as the result feedback information of the user regarding the target result, such as the result feedback information can include the user's like / dislike behavior regarding the target result, the user's reply information regarding the target result, etc.
[0171] Specifically, when the target result is displayed to the user through the interactive interface of the client, a "like / dislike" button for the target result can be displayed on the interactive interface, and the first target result probability of the target result can be obtained through the user's click behavior of "like / dislike" on the target result; or when the user does not click "like / dislike", the first target result probability of the target result can be obtained based on the user's reply information to the target result; and when the first target result probability is obtained, the data to be processed, the target result corresponding to the data to be processed, and the first target result probability of the target result are stored in the retrieval knowledge base for subsequent use.
[0172] The data processing method provided by the present disclosure can more accurately obtain the first target result probability of the target result by receiving result feedback information returned by the user for the target result, and when storing the data to be processed, the target result corresponding to the data to be processed, and the first target result probability of the target result in the retrieval knowledge base, the number of related examples and the data richness in the retrieval knowledge base are increased, thereby improving the accuracy of the target result output by the subsequent model.
[0173] In one or more embodiments of this specification, in order to obtain the first target result probability of the target result more comprehensively and accurately, the first target result probability of the target result can be obtained by flexibly using a variety of implementation methods based on the information contained in the result feedback information. The specific implementation methods are as follows:
[0174] Obtaining a first target result probability of the target result according to the result feedback information includes:
[0175] If the result feedback information includes the user's satisfaction click behavior for the target result, then the first target result probability of the target result is obtained according to the satisfaction click behavior, or
[0176] Obtaining a first target result probability of the target result according to the satisfaction click behavior and the sentiment classification model;
[0177] If the result feedback information does not include the user's satisfaction click behavior for the target result, then when the result feedback information includes result feedback text for the target result, the first target result probability of the target result is obtained according to the result feedback text, or
[0178] A first target result probability of the target result is obtained according to the result feedback text and the sentiment classification model.
[0179] Among them, the satisfaction click behavior can be understood as the user's click behavior of likes / dislikes on the target result in the above embodiment, and the result feedback text can be understood as the user's reply information on the target result in the above embodiment.
[0180] Specifically, when the target result is displayed to the user through the client's interactive interface, a "Like / Dislike" button for the target result can be displayed on the interactive interface. When the user clicks the "Like / Dislike" button, the result feedback information includes the user's satisfaction click behavior for the target result. For example, if the user clicks the "Like" button, the probability of obtaining the first target result of the target result is 1. Or, in the case that the user may click incorrectly, in order to ensure the accuracy of the probability of the first target result, the target result is analyzed using a sentiment classification model, so as to obtain the first target result probability of the target result based on the user's satisfaction click behavior and the sentiment classification model.
[0181] When the user does not click the "Like / Dislike" button but responds to the target result, the result feedback information includes the result feedback text for the target result. For example, after obtaining the target result, the user responds with "OK, I understand". The first target result probability of the target result can be obtained based on the response text; or similar to the above, in order to ensure the accuracy of the first target result probability, the target result is analyzed using the sentiment classification model, so as to obtain the first target result probability of the target result based on the result feedback text and the sentiment classification model.
[0182] Of course, in actual applications, there may be situations where the user neither performs satisfaction click behavior nor replies to the answer feedback text. In this case, the sentiment classification model can be directly used to analyze the target result to obtain the first target result probability of the target result.
[0183] The data processing method provided by the present disclosure can flexibly obtain the first target result probability of the target result based on different result feedback information according to the different information contained in the result feedback information; and in order to ensure the accuracy of the first target result probability, the first target result probability of the target result can be obtained based on the result feedback information and the sentiment classification model.
[0184] In one or more embodiments of this specification, when obtaining the first target result probability of the target result based on the satisfaction click behavior and the sentiment classification model, the behavior result probability and the sentiment result probability of the target result are obtained respectively, thereby obtaining the first target result probability of the target result based on the behavior result probability and the sentiment result probability. The specific implementation method is as follows:
[0185] The obtaining, based on the satisfaction click behavior and the sentiment classification model, a first target result probability of the target result includes:
[0186] Obtaining a behavior result probability of the target result based on the satisfaction click behavior, wherein the behavior result probability is used to represent the probability of the user's emotional polarity towards the target result obtained through the user's satisfaction click behavior;
[0187] Using the sentiment classification model, obtaining a sentiment result probability of the target result, wherein the sentiment result probability is used to represent the probability of the user's sentiment polarity towards the target result obtained by the sentiment classification model;
[0188] A first target result probability of the target result is obtained according to the behavior result probability and the emotion result probability.
[0189] Specifically, when the probability of behavioral results and the probability of emotional results are obtained, the first target result probability of the target result can be calculated by weighted calculation or direct averaging. For example, when the user clicks the "Like" button, the behavioral result probability of the target result is 1, and the probability of the user's emotional polarity towards the target result obtained by the sentiment classification model is 0.7. Then, when the weight of likes / dislikes is w1 (such as 0.6) and the weight of the sentiment classification model is w2 (such as 0.4), the probability of the first target result is 0.88 obtained by using 0.6*1+0.4*0.7; or the probability of the first target result is (1+0.7) / 2 obtained by averaging, that is, the probability value is 0.85.
[0190] The data processing method provided by the present disclosure can effectively avoid the problem of inaccurate probability of the first target result caused by erroneous clicks in user satisfaction click behavior, when obtaining the probability of the first target result based on the satisfaction click behavior and the sentiment classification model.
[0191] In one or more embodiments of this specification, when the first result probability of the target result is obtained based on the result feedback text and the sentiment classification model, the feedback result probability and the sentiment result probability of the target result are obtained respectively, thereby obtaining the first result probability of the target result based on the feedback result probability and the sentiment result probability. The specific implementation method is as follows:
[0192] The obtaining, according to the result feedback text and the sentiment classification model, a first target result probability of the target result includes:
[0193] Obtaining a feedback result probability of the target result based on the result feedback text, wherein the feedback result probability is used to represent a probability of the user's sentiment polarity toward the target result obtained through the user's result feedback text;
[0194] Using the sentiment classification model, obtaining the sentiment result probability of the target result;
[0195] A first target result probability of the target result is obtained according to the feedback result probability and the emotion result probability.
[0196] Among them, the feedback result probability can be understood as the probability of the user's emotional polarity towards the target result obtained based on the user's result feedback text; for example, when the user's result feedback text is "OK, I understand, thank you", the user's emotional polarity towards the target result is likely to be positive; when the user's result feedback text is "No, this is not the result I want", the user's emotional polarity towards the target result is likely to be negative.
[0197] When the feedback result probability and the emotional result probability are obtained, the first target result probability of the target result can be calculated by weighted calculation or direct averaging. The specific implementation is similar to the above embodiment and will not be repeated here.
[0198] The data processing method provided by the present disclosure can reasonably and accurately obtain the first target result probability of the target result based on the feedback result probability and the emotional result probability when obtaining the first target result probability based on the result feedback text and the sentiment classification model.
[0199] The data processing method provided by the present disclosure determines the associated examples corresponding to the data to be processed through a retrieval enhancement strategy, and determines the target classification results of the associated examples. According to the target classification results of the associated examples, the data to be processed and the associated examples are input into the data processing model, and the contextual capabilities of the data processing model are utilized to obtain the target results corresponding to the data to be processed. There is no need to train the data processing model, and it can break through the limitations of the existing capabilities of the data processing model, meet the long-tail needs of users and improve the efficiency of question and answer. It can also enable the data processing model to automatically learn to reflect, correct and improve, thereby improving the accuracy of the target results.
[0200] Referring to FIG3 , FIG3 shows a flow chart of a data processing method provided in one embodiment of this specification, which specifically includes the following steps.
[0201] Taking the application of the data processing method in the question-answering scenario as an example, the data processing method is explained in detail.
[0202] Step 302: User input.
[0203] The user inputs the target question to be queried (i.e., the data to be processed in the above embodiment), for example, "There are 30 chickens and rabbits in the same cage, and there are 80 legs in total. How many legs does each have?"
[0204] Step 304: Retrieve and feedback enhancement.
[0205] Specifically, according to the target problem, cases similar to the current target problem (ie, the associated examples in the above embodiment) are retrieved from the knowledge base; in actual application, the number of associated examples can also be adjusted according to actual conditions.
[0206] Among them, the sentiment polarity of the associated examples is distinguished according to the user's "likes" and "dislikes", "likes" indicate positive sentiment polarity, and "dislikes" indicate negative sentiment polarity; and the sentiment classification model is used to classify the associated examples, and the user's "likes / dislikes" are weighted with the classification results of the sentiment classification model to obtain more reliable user feedback.
[0207] The following method can be used to splice the retrieved related examples and user feedback (emotional polarity) before user input, so that the data processing model can autonomously learn positive cases through context and reflect on and avoid negative cases.
[0208] Here are some examples of tasks that were solved correctly. Please learn from them:
[0209] {Positive Case}
[0210] The following are examples of incorrect responses. Please learn from them and avoid making similar mistakes in the future:
[0211] {Negative Case}
[0212] Question: {User Input}
[0213] reply:"
[0214] Step 306: Generate program code.
[0215] Specifically, when the spliced target problem and related examples are input into the data processing model, the data processing model generates a response and generates a program code to solve the user's target problem.
[0216] Step 308: Call the code interpreter.
[0217] After the program code is generated, the data processing model is interrupted and the code interpreter is called to run the program code to obtain the corresponding running results of the program code.
[0218] Step 310: Model recovery.
[0219] The running results are spliced into the generated response of the data processing model. The data processing model completes the response based on the running results and outputs the target answer to the target question (i.e., the target result in the above embodiment).
[0220] The data processing method provided by the present invention does not require incremental training of the model. It enables the incremental expansion of the data processing model through a low-cost and lightweight method of retrieving the knowledge base and context learning. Moreover, the data processing model does not need to be trained. It can automatically learn to reflect, correct, and improve from user emotional feedback and code execution feedback, thereby improving the accuracy of the response.
[0221] Referring to FIG. 4 , FIG. 4 shows a flow chart of a data interaction method applied to a client provided in an embodiment of this specification, which specifically includes the following steps.
[0222] Step 402: Receive data to be processed through the interactive interface, and send the data to be processed to the server.
[0223] Step 404: Receive the target result corresponding to the data to be processed obtained by applying the above data processing method and returned by the server, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
[0224] For the specific implementation, please refer to the above embodiment and will not be described in detail here.
[0225] The data interaction method provided by the present disclosure can receive the data to be processed input by the user through the interactive interface, and display the target results to the user through the interactive interface, making it convenient for the user to operate using the interactive interface, improving the interaction efficiency, and providing a good user experience.
[0226] The above is a schematic diagram of a data interaction method applied to a client in this embodiment. It should be noted that the technical solution of the data interaction method applied to the client and the technical solution of the data processing method described above are based on the same concept. For details not described in detail in the technical solution of the data interaction method applied to the client, please refer to the description of the technical solution of the data processing method described above.
[0227] Referring to FIG5 , FIG5 shows an interaction flow chart of a data interaction method applied to a data interaction system provided by an embodiment of this specification, which specifically includes the following steps.
[0228] Specifically, the data interaction system includes a client and a server.
[0229] Step 502: The client receives the data to be processed through the interactive interface and sends the data to be processed to the server.
[0230] Step 504: The server receives the data to be processed, applies the above data processing method, obtains the target result corresponding to the data to be processed, and returns the target result to the client.
[0231] Step 506: The client receives the target result, displays the target result through the interactive interface, and receives result feedback information for the target result returned through the interactive interface.
[0232] After receiving the result feedback information for the target result returned through the interactive interface, the method further includes:
[0233] The client sends the feedback information to the server;
[0234] The server receives the result feedback information, obtains the first target result probability of the target result according to the result feedback information, and stores the data to be processed, the target result, and the first target result probability of the target result in a retrieval knowledge base.
[0235] The data interaction method provided by the present disclosure receives the data to be processed input by the user through the client, and displays the target result to the user, obtains the target result corresponding to the data to be processed through the server, and utilizes the interaction between the client and the server to improve the efficiency of the user in obtaining the target result.
[0236] The above is a schematic diagram of a data interaction method applied to a data interaction system according to this embodiment. It should be noted that the technical solution of the data interaction method applied to the data interaction system and the technical solution of the aforementioned data processing method are based on the same concept. For details not described in detail in the technical solution of the data interaction method applied to the data interaction system, please refer to the description of the technical solution of the aforementioned data processing method.
[0237] Corresponding to the above method embodiments, this specification also provides a question-and-answer device embodiment. Figure 6 shows a schematic diagram of the structure of a data processing device provided in one embodiment of this specification. As shown in Figure 6, the device is applied to a code execution intelligent system and includes:
[0238] A first determining module 602 is configured to determine data to be processed and determine associated examples corresponding to the data to be processed according to a search enhancement strategy, wherein the search enhancement strategy is a strategy of searching from a search knowledge base and applying the search results to a data processing model;
[0239] A second determination module 604 is configured to determine a target classification result of the associated example;
[0240] The result acquisition module 606 is configured to determine and run the program code corresponding to the data to be processed based on the data to be processed, the associated examples, and the target classification results using the data processing model to obtain the target result corresponding to the data to be processed.
[0241] Optionally, the result obtaining module 606 is further configured to:
[0242] According to the data to be processed, the associated examples, and the target classification result, using the data processing model, obtaining a program code corresponding to the data to be processed;
[0243] Calling a code interpreter through the data processing model to run the program code, obtaining an operation result corresponding to the program code, and obtaining a question answering template according to the operation result;
[0244] According to the program code, the running result and the question answering template, a target result corresponding to the data to be processed is obtained.
[0245] Optionally, the second determining module 604 is further configured to:
[0246] Determining a target result probability of the association example, wherein the target result probability is used to represent a probability of a user's sentiment polarity toward an association result in the association example;
[0247] A target classification result of the associated example is determined according to the target result probability.
[0248] The device further comprises:
[0249] The storage module is configured to display the target result through the interactive interface of the client and receive result feedback information returned by the client for the target result; obtain a first target result probability of the target result based on the result feedback information, wherein the first target result probability is used to represent the probability of the user's emotional polarity towards the target result; and store the data to be processed, the target result corresponding to the data to be processed, and the first target result probability of the target result in a retrieval knowledge base.
[0250] Optionally, the storage module is further configured to:
[0251] If the result feedback information includes the user's satisfaction click behavior for the target result, then the first target result probability of the target result is obtained according to the satisfaction click behavior, or
[0252] Obtaining a first target result probability of the target result according to the satisfaction click behavior and the sentiment classification model;
[0253] If the result feedback information does not include the user's satisfaction click behavior for the target result, then when the result feedback information includes result feedback text for the target result, the first target result probability of the target result is obtained according to the result feedback text, or
[0254] A first target result probability of the target result is obtained according to the result feedback text and the sentiment classification model.
[0255] Optionally, the storage module is further configured to:
[0256] Obtaining a behavior result probability of the target result based on the satisfaction click behavior, wherein the behavior result probability is used to represent the probability of the user's emotional polarity towards the target result obtained through the user's satisfaction click behavior;
[0257] Using the sentiment classification model, obtaining a sentiment result probability of the target result, wherein the sentiment result probability is used to represent the probability of the user's sentiment polarity towards the target result obtained by the sentiment classification model;
[0258] A first target result probability of the target result is obtained according to the behavior result probability and the emotion result probability.
[0259] Optionally, the storage module is further configured to:
[0260] Obtaining a feedback result probability of the target result based on the result feedback text, wherein the feedback result probability is used to represent a probability of the user's sentiment polarity toward the target result obtained through the user's result feedback text;
[0261] Using the sentiment classification model, obtaining the sentiment result probability of the target result;
[0262] A first target result probability of the target result is obtained according to the feedback result probability and the emotion result probability.
[0263] Optionally, the second determining module 604 is further configured to:
[0264] Obtaining a second association result probability of the association result according to the sentiment classification model, wherein the second association result probability is used to represent a probability of the user's sentiment polarity for the association result obtained by the sentiment classification model;
[0265] The target result probability of the association example is determined according to the first association result probability of the association result and the second association result probability of the association result.
[0266] Optionally, the second determining module 604 is further configured to:
[0267] Determining a first weight value of the first association result probability and a second weight value of the second association result probability;
[0268] The target result probability of the association example is determined according to the first association result probability, the first weight value, the second association result probability, and the second weight value.
[0269] Optionally, the second determining module 604 is further configured to:
[0270] Determining a target result probability for each association example according to the first association result probability of each association result and the second association result probability of each association result;
[0271] When the target result probability is greater than or equal to a preset probability threshold, determining the positive classification result of each associated example, or
[0272] When the target result probability is less than the preset probability threshold, a negative classification result of each associated example is determined.
[0273] Optionally, the result obtaining module 606 is further configured to:
[0274] splicing the data to be processed and the associated examples according to the target splicing template and the target classification results of the associated examples and inputting the spliced data and the associated examples into the data processing model;
[0275] The data processing model is used to determine and run the program code corresponding to the data to be processed, and obtain the target result output by the data processing model and corresponding to the data to be processed.
[0276] Optionally, the first determining module 602 is further configured to:
[0277] The data to be processed is determined, and a preset number of associated examples corresponding to the data to be processed are selected from the search knowledge base.
[0278] The data processing device provided by the present disclosure determines the associated examples corresponding to the data to be processed through a retrieval enhancement strategy, and determines the target classification results of the associated examples. According to the target classification results of the associated examples, the data to be processed and the associated examples are input into the data processing model, and the contextual capabilities of the data processing model are used to obtain the target results corresponding to the data to be processed. There is no need to train the data processing model, and it can break through the limitations of the existing capabilities of the data processing model, meet the long-tail needs of users and improve processing efficiency. It can also enable the data processing model to automatically learn to reflect, correct and improve, thereby improving the accuracy of the results.
[0279] The above is a schematic diagram of a data processing device according to this embodiment. It should be noted that the technical solution of the data processing device and the technical solution of the above-mentioned data processing method are based on the same concept. For details not described in detail in the technical solution of the data processing device, please refer to the description of the technical solution of the above-mentioned data processing method.
[0280] Corresponding to the above method embodiment, this specification also provides an embodiment of a data interaction device applied to a client. FIG7 shows a schematic diagram of the structure of a data interaction device applied to a client provided by one embodiment of this specification. As shown in FIG7, the device includes:
[0281] The receiving module 702 is configured to receive the data to be processed through the interactive interface and send the data to be processed to the server;
[0282] The display module 704 is configured to receive the target result corresponding to the data to be processed obtained by applying the above-mentioned data processing method and returned by the server, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
[0283] The data interaction device provided by the present disclosure can receive the data to be processed input by the user through the interactive interface, and display the target results to the user through the interactive interface, making it convenient for the user to operate using the interactive interface, improving the interaction efficiency, and providing a good user experience.
[0284] The above is a schematic diagram of a data interaction device applied to a client in accordance with this embodiment. It should be noted that the technical solution of the data interaction device applied to the client and the technical solution of the data interaction method applied to the client are based on the same concept. For details not described in detail in the technical solution of the data interaction device applied to the client, please refer to the description of the technical solution of the data interaction method applied to the client.
[0285] Corresponding to the above method embodiment, this specification also provides a data interaction system embodiment. FIG8 shows a structural diagram of a data interaction system 800 provided by an embodiment of this specification. As shown in FIG8, the system includes a client 802 and a server 804, wherein:
[0286] The client 802 is configured to receive data to be processed through an interactive interface and send the data to be processed to the server;
[0287] The server 804 is configured to receive the data to be processed, apply the above data processing method, obtain the target result corresponding to the data to be processed, and return the target result to the client 802;
[0288] The client 802 is further configured to receive the target result, display the target result through the interactive interface, and receive result feedback information regarding the target result returned through the interactive interface.
[0289] Optionally, the client 802 is further configured to:
[0290] Sending the feedback information to the server 804;
[0291] Optionally, the client 804 is further configured to:
[0292] The result feedback information is received, and a first target result probability of the target result is obtained according to the result feedback information, and the data to be processed, the target result, and the first target result probability of the target result are stored in a retrieval knowledge base.
[0293] The data interaction system provided by the present disclosure receives the data to be processed input by the user through the client, and displays the target result to the user, obtains the target result corresponding to the data to be processed through the server, and utilizes the interaction between the client and the server to improve the efficiency of the user in obtaining the target result.
[0294] The above is a schematic scheme of a data interaction system of this embodiment. It should be noted that the technical scheme of the data interaction system and the technical scheme of the above-mentioned data interaction method are of the same concept. For details not described in detail in the technical scheme of the data interaction system, please refer to the description of the technical scheme of the above-mentioned data interaction method.
[0295] Figure 9 shows a block diagram of a computing device 900 according to one embodiment of this specification. Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.
[0296] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.
[0297] In one embodiment of the present specification, the aforementioned components of computing device 900 and other components not shown in FIG9 may also be connected to each other, for example, via a bus. It should be understood that the computing device structure block diagram shown in FIG9 is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0298] The computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 may also be a mobile or stationary server.
[0299] The processor 920 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned data processing method or data interaction method.
[0300] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the aforementioned data processing method or data interaction method are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the aforementioned data processing method or data interaction method.
[0301] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned data processing method or data interaction method when executed by a processor.
[0302] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solution of the aforementioned data processing method or data interaction method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the aforementioned data processing method or data interaction method.
[0303] An embodiment of the present specification further provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method or data interaction method when executed by a processor.
[0304] The above is an illustrative solution of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the aforementioned data processing method or data interaction method are based on the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the aforementioned data processing method or data interaction method.
[0305] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0306] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0307] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0308] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0309] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this disclosure. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of this disclosure, so that those skilled in the art can better understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A data processing method, applied to an intelligent code execution system, includes: Determine the data to be processed, and determine the associated example corresponding to the data to be processed according to the retrieval enhancement strategy, where the retrieval enhancement strategy is a strategy of retrieving from a retrieval knowledge base and applying the retrieval result to a data processing model; Determine the target classification result of the associated example; According to the data to be processed, the associated example, and the target classification result, use the data processing model to determine and run the program code corresponding to the data to be processed, and obtain the target result corresponding to the data to be processed.
2. The data processing method according to claim 1, where the step of using the data processing model to determine and run the program code corresponding to the data to be processed according to the data to be processed, the associated example, and the target classification result, and obtain the target result corresponding to the data to be processed includes: According to the data to be processed, the associated example, and the target classification result, use the data processing model to obtain the program code corresponding to the data to be processed; Call a code interpreter through the data processing model to run the program code, obtain the running result corresponding to the program code, and obtain a question reply template according to the running result; According to the program code, the running result, and the question reply template, obtain the target result corresponding to the data to be processed.
3. The data processing method according to claim 1, where the step of determining the target classification result of the associated example includes: Determine the target result probability of the associated example, where the target result probability is used to represent the probability of the user's emotional polarity towards the associated result in the associated example; Determine the target classification result of the associated example according to the target result probability.
4. The data processing method according to claim 1, after obtaining the target result corresponding to the data to be processed, further includes: Display the target result through the interaction interface of the client, and receive the result feedback information returned by the client for the target result; According to the result feedback information, obtain the first target result probability of the target result, where the first target result probability is used to represent the probability of the user's emotional polarity towards the target result; Store the data to be processed, the target result corresponding to the data to be processed, and the first target result probability of the target result in the retrieval knowledge base.
5. The data processing method according to claim 4, where the step of obtaining the first target result probability of the target result according to the result feedback information includes: If the result feedback information contains the user's satisfaction click behavior for the target result, then obtain the first target result probability of the target result according to the satisfaction click behavior, or Obtain the first target result probability of the target result according to the satisfaction click behavior and the emotion classification model; If the result feedback information does not include the user's satisfaction click behavior for the target result, then when the result feedback information includes result feedback text for the target result, the first target result probability of the target result is obtained according to the result feedback text, or A first target result probability of the target result is obtained according to the result feedback text and the sentiment classification model.
6. The data processing method according to claim 5, wherein obtaining the first target result probability of the target result based on the satisfaction click behavior and the sentiment classification model comprises: Obtaining a behavior result probability of the target result based on the satisfaction click behavior, wherein the behavior result probability is used to represent the probability of the user's emotional polarity towards the target result obtained through the user's satisfaction click behavior; Using the sentiment classification model, obtaining a sentiment result probability of the target result, wherein the sentiment result probability is used to represent the probability of the user's sentiment polarity towards the target result obtained by the sentiment classification model; A first target result probability of the target result is obtained according to the behavior result probability and the emotion result probability.
7. The data processing method according to claim 5, wherein obtaining a first target result probability of the target result based on the result feedback text and the sentiment classification model comprises: Obtaining a feedback result probability of the target result based on the result feedback text, wherein the feedback result probability is used to represent a probability of the user's sentiment polarity toward the target result obtained through the user's result feedback text; Using the sentiment classification model, obtaining the sentiment result probability of the target result; A first target result probability of the target result is obtained according to the feedback result probability and the emotion result probability.
8. The data processing method according to claim 3, wherein the association example comprises association data corresponding to the data to be processed, an association result corresponding to the association data, and a first association result probability of the association result; Determining the target result probability of the association example includes: Obtaining a second association result probability of the association result according to the sentiment classification model, wherein the second association result probability is used to represent a probability of the user's sentiment polarity for the association result obtained by the sentiment classification model; The target result probability of the association example is determined according to the first association result probability of the association result and the second association result probability of the association result.
9. The data processing method according to claim 8, wherein determining the target result probability of the association example according to the first association result probability and the second association result probability of the association result comprises: Determining a first weight value of the first association result probability and a second weight value of the second association result probability; The target result probability of the association example is determined according to the first association result probability, the first weight value, the second association result probability, and the second weight value.
10. The data processing method according to claim 8, wherein the association example comprises a plurality of; Determining the target result probability of the association example according to the first association result probability of the association result and the second association result probability of the association result includes: Determining a target result probability for each association example according to the first association result probability of each association result and the second association result probability of each association result; Determining the target classification result of the associated example according to the target result probability includes: When the target result probability is greater than or equal to a preset probability threshold, determining the positive classification result of each associated example, or When the target result probability is less than the preset probability threshold, a negative classification result of each associated example is determined.
11. The data processing method according to claim 1, wherein the step of determining and running a program code corresponding to the data to be processed using the data processing model based on the data to be processed, the association examples, and the target classification result to obtain a target result corresponding to the data to be processed comprises: splicing the data to be processed and the associated examples according to the target splicing template and the target classification results of the associated examples and inputting the spliced data and the associated examples into the data processing model; The data processing model is used to determine and run the program code corresponding to the data to be processed, and obtain the target result output by the data processing model and corresponding to the data to be processed. 12 . The data processing method according to claim 8 , wherein the first association result probability of the association result includes a first positive probability or a first negative probability, and the second association result probability of the association result includes a second positive probability or a second negative probability.
13. The data processing method according to claim 1, wherein determining the data to be processed and determining the associated examples corresponding to the data to be processed according to the retrieval enhancement strategy comprises: The data to be processed is determined, and a preset number of associated examples corresponding to the data to be processed are selected from the search knowledge base.
14. A data interaction method, applied to a client, comprising: Receive data to be processed through the interactive interface, and send the data to be processed to the server; Receive the target result corresponding to the data to be processed, which is returned by the server and obtained by applying any data processing method according to claims 1 to 13, display the target result through the interactive interface, and receive result feedback information for the target result returned through the interactive interface.
15. A data interaction method, applied to a data interaction system, the system comprising a client and a server, wherein: The client receives the data to be processed through the interactive interface and sends the data to be processed to the server; The server receives the data to be processed, applies the data processing method according to any one of claims 1 to 13, obtains a target result corresponding to the data to be processed, and returns the target result to the client; The client receives the target result, displays the target result through the interaction interface, and receives result feedback information for the target result returned through the interaction interface.
16. The data interaction method according to claim 15, after receiving the result feedback information for the target result returned through the interaction interface, further includes: The client sends the result feedback information to the server; The server receives the result feedback information, obtains a first target result probability of the target result according to the result feedback information, and stores the to-be-processed data, the target result, and the first target result probability of the target result in the retrieval knowledge base.
17. A data processing device, applied to a code execution intelligent system, includes: A first determination module configured to determine to-be-processed data and determine an associated example corresponding to the to-be-processed data according to a retrieval enhancement strategy, where the retrieval enhancement strategy is a strategy of retrieving from a retrieval knowledge base and applying the retrieval result to a data processing model; A second determination module configured to determine a target classification result of the associated example; A result obtaining module configured to determine and run a program code corresponding to the to-be-processed data according to the to-be-processed data, the associated example, and the target classification result, and use the data processing model to obtain a target result corresponding to the to-be-processed data.
18. A data interaction device, applied to a client, includes: A receiving module configured to receive to-be-processed data through an interaction interface and send the to-be-processed data to a server; A display module configured to receive the target result corresponding to the to-be-processed data obtained by applying the data processing method according to any one of claims 1-13 returned by the server, display the target result through the interaction interface, and receive result feedback information for the target result returned through the interaction interface.
19. A data interaction system includes a client and a server, where The client is configured to receive to-be-processed data through an interaction interface and send the to-be-processed data to the server; The server is configured to receive the to-be-processed data, apply the data processing method according to any one of claims 1-13, obtain a target result corresponding to the to-be-processed data, and return the target result to the client; The client is further configured to receive the target result, display the target result through the interaction interface, and receive result feedback information for the target result returned through the interaction interface.
20. A computing device comprising: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 13 or the steps of the data interaction method according to any one of claims 14 to 16 are implemented.
21. A computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the data processing method described in any one of claims 1 to 13 or the steps of the data interaction method described in any one of claims 14 to 16 are implemented.
22. A computer program product stores a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the data processing method described in any one of claims 1 to 13 or the steps of the data interaction method described in any one of claims 14 to 16 are implemented.
Citation Information
Patent Citations
Answer identification method and device based on artificial intelligence, medium and electronic equipment
CN111930908A
Answer sorting method and device
CN113761140A
A kettle measuring liquid
KR102272825B1