Data processing method, electronic equipment, computer storage medium and program product

The data processing method uses a fine-tuned generative model for intent recognition and query rewriting to address the challenge of finding digital files in cloud storage, ensuring efficient and accurate task execution.

CN119127067APending Publication Date: 2024-12-13HANGZHOU DUANQU NETWORK MEDIA TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411112669.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Users face challenges in quickly and accurately finding digital files in cloud storage due to fragmented memory of storage paths, necessitating efficient task completion based on vague recollections.

Method used

A data processing method utilizing a fine-tuned generative model for intent recognition and query rewriting, combined with a toolset or general model, to accurately identify and execute user tasks in cloud storage scenarios.

Benefits of technology

Enables efficient and accurate task completion in cloud storage by identifying user intents and generating formatted task data, even with fragmented input, through a fine-tuned model and toolset integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127067A_ABST
    Figure CN119127067A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method, electronic equipment, a computer storage medium and a program product. The data processing method comprises the steps of obtaining to-be-processed input data; performing intention recognition and query rewriting on the input data through a first model to obtain task data of the target task; wherein the first model is obtained by performing fine tuning training on a first generative basic model according to training data; and according to the task data of the target task, calling the tool set or calling the second generative basic model for processing to obtain output data of the target task. The first model has the generalization ability of performing intention recognition and query rewriting on natural language data, and also has the ability of processing user input data in a specific application scene. The target task is accurately identified through the first model, and the output data of the target task can be obtained through the tool set in the application scene or the universal second generative basic model, so that the user task is efficiently completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a data processing method, electronic device, computer storage medium, and program product. Background Art

[0002] With the rapid development of informatization, users have an increasing demand for the storage scale of digital files. Currently, there are many cloud storage applications (APPs). Users can use cloud storage applications on various devices to store digital files on cloud servers. For example, users can store pictures, documents, audio and video files on cloud servers through mobile phones, tablets, desktop computers and other devices.

[0003] Users often organize directories when storing digital files. However, as time goes by and digital assets continue to increase, when users want to quickly and accurately find a certain content in their minds, they often have forgotten the storage path or other accurate storage information when they stored it. They usually only remember fragmented information such as past thoughts, momentary memories, or vague recollections of the content.

[0004] How to help users complete tasks quickly and efficiently based on the fragmented information provided by users is an urgent problem to be solved. Summary of the invention

[0005] In view of this, embodiments of the present application provide a data processing method, an electronic device, a computer storage medium, and a program product to at least partially solve the above problems.

[0006] According to a first aspect of an embodiment of the present application, a data processing method is provided, including: obtaining input data to be processed; performing intent recognition and query rewriting on the input data through a first model to obtain task data of a target task; wherein the first model is obtained by fine-tuning a first generative basic model according to training data; calling a toolset or calling a second generative basic model for processing according to the task data of the target task to obtain output data of the target task.

[0007] According to a second aspect of an embodiment of the present application, a data processing method is provided, comprising: obtaining training samples; wherein the training samples include training data corresponding to tasks corresponding to a toolset and general tasks respectively, and the training samples are used by a first generative basic model to perform intent recognition and query rewriting on the training samples to obtain task data of a target task; based on the training samples, fine-tuning training is performed on the first generative basic model to obtain a first model.

[0008] According to a third aspect of an embodiment of the present application, a data processing method is provided, including: receiving input data to be processed input by a user in a dialogue interface; sending the input data to a cloud device; wherein the cloud device deploys a first model, a toolset, and a second generative basic model; the first model is obtained by fine-tuning the first generative basic model according to training data, and is used to perform intent recognition and query rewriting on the input data to obtain task data of a target task, and the toolset or the second generative basic model is used to process the task data to obtain output data of the target task; receiving the output data sent by the cloud device; and displaying the output data in the dialogue interface.

[0009] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect, the second aspect or the third aspect.

[0010] According to a fifth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect, the second aspect, or the third aspect is implemented.

[0011] According to a sixth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method described in the first aspect, the second aspect, or the third aspect.

[0012] According to a data processing method provided by an embodiment of the present application, the input data to be processed is obtained, the input data is subjected to intent recognition and query rewriting through a first model, the task data of the target task is obtained, and the tool set is called or the second generative basic model is called for processing according to the task data of the target task to obtain the output data of the target task. Among them, the first model is obtained by fine-tuning the first generative basic model according to the training data. The first model has the generalization ability of intent recognition and query rewriting for natural language data, and also has the exclusive ability to process user input data for application scenarios. Through the first model, the quality requirements for input data are reduced. Even if fragmented information is input, the accurate target task can be determined by performing intent recognition and query rewriting on the input data, and accurate target task data can be generated. Then, the output data of the target task can be obtained through the tool set in the application scenario or the general second generative basic model, thereby efficiently completing the user task. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0014] Figure 1 A schematic diagram of an exemplary system applicable to the data processing method of an embodiment of the present application;

[0015] Figure 2 is a flowchart of a data processing method according to an embodiment of the present application;

[0016] Figure 3 for Figure 2 An example diagram of a scenario in the illustrated embodiment;

[0017] Figure 4 is a flowchart of another data processing method according to an embodiment of the present application;

[0018] Figure 5 for Figure 4 An example diagram of a scenario in the illustrated embodiment;

[0019] Figure 6 is a flowchart of another data processing method according to an embodiment of the present application;

[0020] Figures 7A to 7C for Figure 6 An example diagram of a scenario in the illustrated embodiment;

[0021] Figure 8 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0023] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.

[0024] Figure 1 An exemplary system for the data processing method applicable to the embodiment of the present application is shown. Figure 1As shown, the system 100 may include a cloud service end 102, a communication network 104 and / or one or more user devices 106. Figure 1 The example in FIG. 1 is a plurality of user devices.

[0025] The cloud server 102 may be any suitable device for storing information, data, programs and / or any other suitable type of content, including but not limited to distributed storage system devices, server clusters, computing cloud server clusters, etc. In some embodiments, the cloud server 102 may perform any suitable function. For example, in some embodiments, the cloud server 102 may receive input data to be processed sent by a user device, and the input data may be natural language data input by a user through a user device; the input data may be subjected to intent recognition and query rewriting by a first model to obtain task data of a target task; wherein the first model is obtained by fine-tuning a training sample under a preset scenario based on a first generative basic model; and the output data of the target task may be obtained by calling a tool set or calling a second generative basic model according to the task data of the target task. In some embodiments, if the target task belongs to a task corresponding to a tool set, the cloud server 102 may call a tool corresponding to the target task in the tool set according to the task data of the target task for processing; if the target task is a general task, or is not a task corresponding to a tool set, the cloud server 102 may call a second generative basic model to generate and process the task data of the target task through a general second generative basic model. In other embodiments, the cloud server 102 may obtain training samples in a preset scenario; wherein the training samples include training data corresponding to the tasks and general tasks of the toolset in the preset scenario, and the training samples are used by the first generative basic model to perform intent recognition and query rewriting on the training samples to obtain task data of the target task; the first generative basic model is fine-tuned based on the training samples to obtain the first model. In some embodiments, the cloud server 102 may send the output data of the target task to the user device so that the user device can display it to the user.

[0026] In some embodiments, the communication network 104 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 104 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN) and / or any other suitable communication network. The user device 106 can be connected to the communication network 104 via one or more communication links (e.g., communication link 112), and the communication network 104 can be linked to the cloud service end 102 via one or more communication links (e.g., communication link 114). The communication link may be any communication link suitable for transmitting data between the user device 106 and the cloud service end 102, such as a network link, a dial-up link, a wireless link, a hardwired link, any other suitable communication link, or any suitable combination of such links.

[0027] User device 106 may include any one or more user devices suitable for interacting with a user. In some embodiments, user device 106 may include any suitable type of device. For example, in some embodiments, user device 106 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, a wearable computer, a game console, a media player, a vehicle entertainment system, and / or any other suitable type of user device.

[0028] Based on the above system, an embodiment of the present application provides a data processing method, which is described below through multiple embodiments.

[0029] Figure 2 is a flowchart of a data processing method according to an embodiment of the present application, which can be Figure 1 The cloud server and other cloud devices shown are executed. This embodiment describes the solution of the embodiment of the present application from the perspective of using the first model.

[0030] like Figure 2 As shown, the data processing method provided in this embodiment may include:

[0031] Step S202: Obtain input data to be processed.

[0032] The input data to be processed may be input by the user through the user device. After receiving the input data, the user device sends the input data to the cloud server, and accordingly, the cloud server obtains the input data to be processed.

[0033] Optionally, the input data to be processed is natural language data.

[0034] Step S204: perform intent recognition and query rewriting on the input data through the first model to obtain task data of the target task. The first model is obtained by fine-tuning the first generative basic model according to the training data.

[0035] The first generative basic model is an artificial intelligence model that generates various outputs based on massive training data sets, neural networks and deep learning architectures, based on user input data, such as the Large Language Model (LLM). The LLM model can generate natural language text, understand text semantics, realize intent recognition, realize query rewrite, perform knowledge question and answer, and can handle a variety of natural language tasks. Among them, intent recognition is an important task in natural language processing. It can determine the intention or purpose expressed in the sentence entered by the user. Simply put, intent recognition is to understand the user's words semantically in order to determine the user's intention, so as to better answer the user's questions or provide related services. For example, if the user enters "I want to book a flight from Beijing to Shanghai", the intent recognition is: book a flight. For example, if the user enters "I want to see the photos taken at Huashan last year", the intent recognition is: find pictures. Query rewriting refers to rewriting queries to optimize their performance or structure by modifying, supplementing and replacing the query statements input by users without changing the query semantics, so as to provide users with better related services.

[0036] The training samples may be training samples in a preset scenario. For example, the preset scenario is a cloud storage scenario, in which a cloud storage application is installed on the user device, and the user may use the cloud storage application on the user device to perform tasks such as file search and coupon search. Accordingly, the training samples in the cloud storage scenario may at least include query information input by the user when using the cloud storage application on the user device to perform tasks such as file search and coupon search.

[0037] In this embodiment, the first model is obtained by pre-fine-tuning the first generative basic model according to training samples in a preset scenario. The first model is used to perform intent recognition and query rewriting on the input data to obtain task data of the target task.

[0038] Since the first model is obtained by fine-tuning and training based on the first generative basic model, the first model has the generalization capabilities of intent recognition, query rewriting, etc. for natural language texts. By using the rich world knowledge of the large language model as a user intent understander and as a user query rewriter, the first model has a better output effect based on the large language model. The first model is specifically obtained by fine-tuning and training the first generative basic model based on training samples in a preset scenario. Therefore, the first model also has the exclusive ability to accurately process user input data in the preset scenario. By using the first model to perform intent recognition and query rewriting on the input data, the target task that the user expects to perform in the preset scenario can be more accurately identified, and more accurate task data of the target task can be obtained through query rewriting for further processing.

[0039] For example, in a cloud storage scenario, when a user wants to find photos quickly and accurately, but the user only remembers some fragmented information (such as shooting time, photographed people, shooting environment, etc.), and does not remember the accurate information of the stored pictures (such as storage path, storage file name, etc.), the first model can perform intent recognition based on the fragmented information input by the user to determine the accurate target task, and obtain the task data of the target task through query rewriting.

[0040] Step S206: Call a toolset or call a second generative basic model for processing according to the task data of the target task to obtain output data of the target task.

[0041] Among them, the tool set includes multiple tools, and the tools are used to implement preset functions or tasks (which can be called exclusive tasks). It can be understood that the number of tools in the tool set and the functions or tasks implemented by the tools may be different in different application scenarios. For example. In the cloud storage scenario, the tasks corresponding to the tool set include at least one of the following: finding files, finding pictures, clearing storage space, and distributing coupons. Optionally, finding files includes at least one of the following: finding text files, finding audio files, and finding video files.

[0042] The second generative basic model is similar in principle to the first generative basic model, and both are universal models, which will not be described in detail here.

[0043] Compared with the second generative basic model, the toolset can realize dedicated tasks in preset scenarios, while the general second generative basic model has generalization ability and can realize general tasks. The tools in the toolset can have higher accuracy, efficiency and effect for dedicated tasks.

[0044] In this step, the target task determined by the first model may be a dedicated task implemented by the toolset, or it may be a general task. For example, in the cloud storage scenario, when the user enters "I want to see the photos taken at Huashan last year", the target task is to find pictures, which is a dedicated task that can be implemented by the toolset. When the user enters "the time of XX event", the target task is a general task that can be processed by the second generative basic model. Therefore, according to the task data of the target task, the toolset or the second generative basic model can be called for processing to obtain the output data of the target task.

[0045] It can be seen that the data processing method provided in this embodiment needs to be fine-tuned and trained based on the first generative basic model in advance according to the training samples to obtain the first model. The first model has generalization capabilities such as intent recognition and query rewriting for natural language text, and also has the exclusive ability to process user input data for application scenarios. The cloud service end is deployed with the first model, the tool set and the general second generative basic model. The cloud service end obtains the input data to be processed, performs intent recognition and query rewriting on the input data through the first model, determines the accurate target task and the task data of the target task, and calls the tool set or calls the second generative basic model for processing according to the task data of the target task to obtain the output data of the target task. The first model reduces the quality requirements for the input data. Even if the user inputs fragmented information, the accurate target task can be determined by performing intent recognition and query rewriting on the input data, and the accurate target task data is generated. Furthermore, by calling the tool set, the tasks that the tool set can achieve can be executed efficiently and quickly, or the task category is expanded through the general second generative basic model, thereby solving the problem of quickly and efficiently completing the task according to the fragmented information provided by the user.

[0046] In a feasible implementation, the input data is natural language data input by the user through the user device when the user device runs the cloud storage application.

[0047] In this implementation, the data processing method provided in this embodiment is applied to a cloud storage application scenario, and can realize end-to-end cloud storage interaction from user input of natural language routing to final completion of the task.

[0048] In a feasible implementation, the scale of the first generative base model is smaller than the scale of the second generative base model.

[0049] The size of the model includes, but is not limited to, at least one of the following: the number of parameters of the model and the number of layers of the model.

[0050] Specifically, the first model is obtained by fine-tuning the first generative basic model. It can be understood that the smaller the scale of the first generative basic model, the faster the fine-tuning training and the lower the cost. The second generative basic model is used to process the task data of the target task to generate output data. It can be understood that the larger the scale of the second generative basic model, the more accurate the output data of the target task.

[0051] In a feasible implementation, the scale of the first generative base model is smaller than a preset scale.

[0052] Among them, this embodiment does not limit the preset scale. For example, the preset scale includes the preset values ​​of the number of model parameters and the preset values ​​of the number of model layers.

[0053] In a feasible implementation, in S204, performing intent recognition and query rewriting on the input data by using the first model to obtain task data of the target task may include:

[0054] The first model is used to identify the intent of the input data and determine the target task;

[0055] The first model is used to query and rewrite the input data according to the target task to generate formatted task data matching the target task.

[0056] Specifically, the task data is formatted and related to the type of task. By generating formatted task data that matches the target task, it is convenient to subsequently call the tools in the tool set or the second generative basic model for processing, thereby improving the task processing efficiency.

[0057] In a feasible implementation, querying and rewriting the input data according to the target task through the first model to generate formatted task data matching the target task includes:

[0058] Acquire historical data related to the input data within a preset time period before the input data;

[0059] Through the first model, the input data and historical data are queried and rewritten according to the target task to generate formatted task data matching the target task.

[0060] This embodiment does not limit the length of the preset time period. Usually, the user enters input data once, and the cloud service returns the output data of the task based on the input data. If the user gets a satisfactory task result, the current conversation will end. If the user does not get a satisfactory task result, a new round of conversation will be initiated. Therefore, there is a scenario of multiple rounds of conversation.

[0061] In this scenario, through the first model, the user's latest input data and the historical data input by the user within a preset time period are queried and rewritten according to the target task, and the input data and historical data are integrated to generate formatted task data that matches the target task, thereby improving the accuracy of the task data and, in turn, improving the accuracy of the subsequent task output data obtained based on the task data.

[0062] Let's take an example. Suppose that the user inputs "a photo of me and A last November" for the first time, and the cloud server determines the target task as finding pictures based on the input data, and outputs the output data of this task. If the user wants to continue looking for photos and inputs "a photo of me with A and B", the cloud server determines the target task as finding pictures based on the input data. According to the last input data "a photo of me and A last November" (historical data) and the current input data "a photo of me with A and B", it can be understood that the user wants to find "a photo of me with A and B last November", which is time-limited (last November). Through the first model, the cloud server queries and rewrites the input data and historical data according to the target task, generates formatted task data that matches the target task, and improves the accuracy of determining the task data.

[0063] In a feasible implementation, in S206, calling a tool set or calling a second generative basic model for processing according to the task data of the target task includes:

[0064] If the target task is a task corresponding to the toolset, the interface function of the tool corresponding to the target task in the toolset is called according to the task data of the target task for processing;

[0065] If the target task is a general task, the second generative basic model is called to generate and process the task data of the target task.

[0066] The following, combined Figure 3 The above process is illustrated by taking a cloud storage scenario as an example.

[0067] Figure 3 for Figure 2 An example of a scenario in the embodiment shown is a cloud storage scenario. Figure 3As shown, a first model, a second generative basic model and a tool set are deployed on the cloud service end. Among them, the first model is obtained by fine-tuning the first generative basic model according to the training samples. The first generative basic model, the second generative basic model and the first model are all general large language models, wherein the first model can also be called a fine-tuned large language model. The first model is used to perform intent recognition and query rewriting on the user's input data, determine the target task, and generate task data for the target task. The second generative basic model is used to generate output data (i.e., task results) of general tasks when the target task is a general task. The tool set includes multiple tools. In the cloud storage scenario, the tasks corresponding to the tool set include: finding files, finding pictures, cleaning up storage space, and distributing coupons. The tools in the tool set are used to generate output data (i.e., task results) of exclusive tasks when the target task is an exclusive task (i.e., a task that can be achieved by the tool set).

[0068] Assume that the user inputs: photos taken at the beach in 2024 (i.e., input data to be processed). The cloud server obtains the input data, performs intent recognition and query rewriting on the input data through the first model, determines that the target task is "find pictures", and generates formatted task data that matches the task "find pictures". The cloud server calls the tool corresponding to "find pictures" in the tool set, searches for pictures according to the task data, and obtains photos taken at the beach in 2024 (i.e., output data of the target task).

[0069] Suppose the user inputs: What should I do if the storage space is insufficient? (i.e., the input data to be processed). The cloud server obtains the input data, performs intent recognition and query rewriting on the input data through the first model, determines that the target task is "clean up storage space", and generates formatted task data that matches the task "clean up storage space". The cloud server calls the tool corresponding to "clean up storage space" in the tool set to clean up the cloud storage space (i.e., the output data of the target task) according to the task data.

[0070] Assume that the user inputs: write a story (i.e., the input data to be processed). The cloud server obtains the input data, performs intent recognition and query rewriting on the input data through the first model, determines that the target task is a general task, and generates task data. The cloud server calls the second generative basic model, generates and processes the task data through the second generative basic model, and obtains a written story (i.e., the output data of the target task).

[0071] It can be seen that the first model reduces the quality requirements for user input data. The first model can accurately identify the target task and generate more accurate task data through query rewriting. When the target task is a task that can be implemented by the toolset, the target task is efficiently and quickly executed by calling the tools in the toolset; when the target task is a task that is not implemented by the toolset, the output data of the target task is obtained by calling the general second generative basic model. In the cloud storage application scenario, end-to-end cloud storage interaction can be achieved from user input natural language routing to the final completion of the task.

[0072] Figure 4 is a flowchart of another data processing method according to an embodiment of the present application, which can be Figure 1 The cloud server and other cloud devices shown are executed. This embodiment describes the solution of the embodiment of the present application from the perspective of training the first generative basic model to obtain the first model.

[0073] like Figure 4 As shown, the data processing method provided in this embodiment may include:

[0074] Step S402: Obtain training samples, wherein the training samples include training data corresponding to the tasks of the toolset and the general tasks, respectively, and the training samples are used by the first generative basic model to perform intent recognition and query rewriting on the training samples to obtain task data of the target task.

[0075] The first generative basic model is described above and will not be repeated here.

[0076] The training samples are training samples in a preset scenario. For example, the preset scenario is a cloud storage scenario, in which a cloud storage application may be installed on the user device, and the user may use the cloud storage application on the user device to perform tasks such as file search and coupon search. Accordingly, the training samples in the cloud storage scenario may at least include query information input by the user when using the cloud storage application on the user device to perform tasks such as file search and coupon search.

[0077] The training samples include training data corresponding to the tasks of the toolset and the general tasks, respectively. The training samples are used by the first generative basic model to perform intent recognition and query rewriting on the training samples to obtain task data of the target task. Specifically, the toolset includes multiple tools, and the tools are used to implement preset functions or tasks. It can be understood that the number of tools in the toolset and the functions or tasks implemented by the tools may be different in different application scenarios. For example. In the cloud storage scenario, the tasks corresponding to the toolset include at least one of the following: finding files, finding pictures, cleaning up storage space, and distributing coupons. Optionally, finding files includes at least one of the following: finding text files, finding audio files, and finding video files. The tasks implemented by the tools in the toolset can also be called exclusive tasks. Tasks corresponding to exclusive tasks can be called general tasks.

[0078] In this embodiment, the training samples include training data corresponding to different tasks under preset scenarios, which ensures the integrity of the training samples and further ensures the fine-tuning training effect of the model.

[0079] Step S404: fine-tune the first generative basic model based on the training samples to obtain a first model.

[0080] The data processing method provided in this embodiment is obtained by fine-tuning the first model based on the first generative basic model, so that the first model has generalization capabilities such as intent recognition and query rewriting for natural language text. The first model is obtained by fine-tuning the first generative basic model based on the training samples in the preset scenario, so that the first model also has the exclusive ability to accurately process the user input data in the preset scenario. Subsequently, in the use of the first model, the first model is used to perform intent recognition and query rewriting on the input data, so that the target task that the user expects to perform in the preset scenario can be more accurately identified, thereby improving the accuracy and efficiency of task processing.

[0081] In a feasible implementation, the scale of the first generative base model is smaller than a preset scale.

[0082] The scale of the model includes but is not limited to at least one of the following: the number of model parameters and the number of model layers. This embodiment does not limit the preset scale. For example, the preset scale includes a preset value of the number of model parameters and a preset value of the number of model layers.

[0083] The first model is obtained by fine-tuning the first generative basic model. In the model training phase, it is used to perform intent recognition and query rewriting on training samples, and in the model use phase, it is used to perform intent recognition and query rewriting on user input data. It can be understood that if the scale of the first generative basic model is small, the fine-tuning training speed will be faster and the cost will be lower.

[0084] In a feasible implementation, the training samples include:

[0085] Training data constructed by prompt engineering using a third generative base model; wherein the scale of the third generative base model is greater than the scale of the first generative base model;

[0086] Training data collected based on users’ online queries;

[0087] Manually constructed training data.

[0088] For example, see Figure 5 , Figure 5 for Figure 4 An example of a scenario in the embodiment shown is shown. Figure 5 As shown, the cloud server is deployed with the first generative basic model, the second generative basic model, the first model and the tool set. For the related concepts, please refer to the above description and will not be repeated here. Among them, the training samples include 3 parts. For the training data constructed by the third generative basic model with a larger scale through prompt engineering, highly realistic and diverse conversation data can be generated, and the training samples can be automatically constructed by simulating user conversations, which increases the number of training samples and improves the effect of model fine-tuning training. For the training data collected based on user online queries, not only the data authenticity of the training samples is improved, but also the real-time user needs and behavior patterns can be captured. For the manually constructed training data, challenging query samples are manually created, such as user conversations in complex scenarios or creating multiple rounds of user conversations, which ensures the effectiveness and diversification of training samples in complex scenarios, making the training samples more comprehensive and balanced. Combining the above three types of training data, the data volume and quality of the training samples are improved, thereby improving the generalization ability of the first model obtained by fine-tuning training based on the first generative basic model and its exclusive performance in different scenarios.

[0089] In a feasible implementation, in S404, fine-tuning the first generative basic model based on the training sample includes:

[0090] Based on the training samples, all parameters of the first generative base model are fine-tuned.

[0091] By adopting the method of full parameter fine-tuning, the processing effect of the first model on the input data in the preset field is improved, and the generalization ability of the first model for intent recognition and query rewriting of natural language text is guaranteed.

[0092] In a feasible implementation, in S404, fine-tuning the first generative basic model based on the training sample to obtain the first model further includes:

[0093] Obtain the generalization performance of the first generative base model after all-parameter fine-tuning training;

[0094] If the generalization performance does not meet the preset conditions, the training samples are updated or the fine-tuning training method is updated, and the first generative basic model is further fine-tuned based on the updated training samples or the updated fine-tuning training method to obtain the first model.

[0095] In this implementation, the first generative basic model is first fine-tuned according to the training samples using a full parameter fine-tuning method, and the generalization performance of the first generative basic model after the full parameter fine-tuning training is checked. If the generalization performance is poor and cannot meet the preset conditions, the training samples are updated or the fine-tuning training method is updated, and the first generative basic model is further fine-tuned based on the updated training samples or the updated fine-tuning training method to obtain the first model, thereby ensuring the generalization ability of the first model and balancing the generalization ability of the first model and its exclusive performance in different scenarios.

[0096] In a feasible implementation, in S404, fine-tuning the first generative basic model based on the training sample includes:

[0097] An early stopping strategy is adopted to fine-tune the first generative base model based on the training samples.

[0098] Among them, the early stopping strategy is a technology that decides whether to continue training based on the performance of the model during the training process. When the performance of the model reaches a certain preset threshold or begins to decline, you can consider stopping the training to save computing resources and avoid overfitting.

[0099] In this embodiment, by adopting an early stopping strategy to fine-tune the first generative base model, the generalization ability of the first model can be guaranteed, and the generalization ability of the first model and its exclusive performance in different scenarios are balanced.

[0100] Figure 6 is a flowchart of another data processing method according to an embodiment of the present application, which can be Figure 1 The user equipment shown is executed. This embodiment describes the solution of the embodiment of the present application from the perspective of the user equipment and in combination with the user's usage scenario.

[0101] like Figure 6 As shown, the data processing method provided in this embodiment may include:

[0102] Step S602: receiving input data to be processed input by the user in the dialogue interface.

[0103] Optionally, the input data to be processed is natural language data.

[0104] This embodiment does not limit the steps for displaying the dialogue interface, the content and layout included in the interface. For example, a cloud storage application is installed on the user device, and the cloud storage application includes an intelligent dialogue function. The user can click the icon of the cloud storage application on the user device to make the user device run the cloud storage application. The user can start the intelligent dialogue function in the cloud storage application, so that the user device displays the dialogue interface, and the user can enter the input data to be processed in the dialogue interface, so as to realize the human-computer dialogue between the user and the user device.

[0105] Step S604: Send input data to the cloud device. The cloud device deploys the first model, the tool set, and the second generative basic model. The first model is obtained by fine-tuning the first generative basic model according to the training data, and is used to perform intent recognition and query rewriting on the input data to obtain task data of the target task. The tool set or the second generative basic model is used to process the task data to obtain output data of the target task.

[0106] Among them, the first model, the toolset and the second generative basic model refer to the description in the above method embodiment and will not be repeated here.

[0107] Step S606: receiving output data sent by the cloud device.

[0108] Step S608: Display the output data in the dialogue interface.

[0109] Optionally, the output data may be displayed in the dialog interface in the form of a message card. Other information display methods may also be used to display the output data, which is not limited in this embodiment.

[0110] The data processing method provided in this embodiment is that the user device interacts with the cloud device to complete the target task expected by the user. The user device sends the input data to be processed input by the user to the cloud device, and the cloud device is deployed with a first model that is pre-trained based on the first generative basic model according to the training sample and fine-tuned to obtain the first model, a pre-trained second generative basic model, and a tool set. The first model has generalization capabilities such as intent recognition and query rewriting for natural language texts, and also has the exclusive ability to process user input data for application scenarios, determines the accurate target task and the task data of the target task, and obtains the output data of the target task by calling the second generative basic model or tool set. The cloud device sends the output data to the user device, so that the user device displays it so that the user can obtain the execution result of the target task, which solves the problem of quickly and efficiently completing the task based on the fragmented information provided by the user.

[0111] In one feasible implementation, the input data is natural language data input by a user in a dialogue interface when running a cloud storage application, and the tasks corresponding to the toolset include at least one of the following: finding files, finding pictures, clearing storage space, and distributing coupons.

[0112] Optionally, in step S608, the output data is displayed in the dialogue interface, including:

[0113] Output data and functional components are displayed in the dialogue interface, and the functional components are used for user operations to complete the target task.

[0114] In this implementation, in addition to displaying the output data, functional components related to the output data or the target task may also be displayed. The functional components may be operated by the user, and the operation methods are not limited to single-click, double-click, voice operation, etc. The functions of the functional components may further help the user complete the target task or other tasks related to the target task.

[0115] The following, combined Figures 7A to 7C , taking the cloud storage scenario as an example, the above process is exemplified.

[0116] Fig. 7A FIG. 4 shows a scenario in which a user searches for music files in a cloud storage scenario. Fig. 7A As shown, the user device displays a dialogue interface 701. The user enters the input data to be processed in the dialogue interface 701, specifically "listen to the songs of Journey to the West". The user device sends the input data to the cloud device for processing, receives the output data returned by the cloud device, and displays it. In this scenario, the cloud device determines that the target task is a specific task (finding files) in the cloud storage scenario through the first model, and obtains the output data by calling the tools in the tool set. The user device displays the output data through the message card 702, including the two song files found, namely: Song 1 and Song 2. The message card 702 also includes a functional component 703 for selecting other files. For example, when the user does not want to listen to Song 1 and Song 2, by clicking the functional component 703, the file search can be continued.

[0117] Figure 7B FIG. 1 shows a scenario of clearing storage space in a cloud storage scenario. Figure 7BAs shown, the user device displays a dialogue interface 701. The user enters input data to be processed in the dialogue interface 701, specifically "My disk is full". The user device sends the input data to the cloud device for processing, receives the output data returned by the cloud device, and displays it. In this scenario, the cloud device determines that the target task is a specific task (cleaning up storage space) in the cloud storage scenario through the first model, and obtains the output data by calling the tools in the tool set. The user device displays the text messages "File Cleanup" and "You can go to the management page to process the files you want to clean up." The user device also displays a functional component 704 for file cleanup operations. The user can click on the functional component 704 to enter the management page and continue to clean up the file.

[0118] Figure 7C The following figure shows the common tasks in the cloud storage scenario. Figure 7C As shown, the user device displays a dialogue interface 701. The user enters input data to be processed in the dialogue interface 701, specifically "three visits to the thatched cottage". The user device sends the input data to the cloud device for processing, receives the output data returned by the cloud device, and displays it. In this scenario, the cloud device determines that the target task is a general task through the first model, and obtains the output data by calling the second generative basic model. The user device displays the text message "Liu Bei's three visits to the thatched cottage comes from "The Memorial to the Emperor on Leaving the Capital" and "The Romance of the Three Kingdoms". It is the story of Liu Bei's visit to Zhuge Liang in the late Eastern Han Dynasty. Liu Bei visited Zhuge Liang three times and asked him to help him conquer the world. This story later became an idiom to describe the thirst for talent, and is used to describe sincere and repeated invitations.".

[0119] Reference Figure 8 , shows a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.

[0120] like Figure 8 As shown, the electronic device may include: a processor (processor) 502, a communication interface (Communications Interface) 504, a memory (memory) 506, and a communication bus 508.

[0121] in:

[0122] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .

[0123] The communication interface 504 is used to communicate with other electronic devices or servers.

[0124] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above data processing method embodiment.

[0125] Specifically, the program 510 may include program codes, which include computer operation instructions.

[0126] The processor 502 may be a CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0127] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0128] The program 510 may include multiple computer instructions. Specifically, the program 510 may enable the processor 502 to execute operations corresponding to the data processing method described in any of the aforementioned method embodiments through the multiple computer instructions.

[0129] The specific implementation of each step in program 510 can refer to the corresponding description of the corresponding steps and units in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.

[0130] The present application also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes but is not limited to: a compact disk (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk or a magneto-optical disk, etc.

[0131] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any data processing method in the above-mentioned multiple method embodiments.

[0132] In addition, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0133] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0134] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (for example, a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general purpose computer accesses code for implementing the methods shown herein, the execution of the code transforms the general purpose computer into a special purpose computer for executing the methods shown herein.

[0135] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0136] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.

Claims

1. A data processing method, comprising: Get input data to be processed; The first model is used to perform intent recognition and query rewriting on the input data to obtain task data of the target task; wherein the first model is obtained by fine-tuning the first generative basic model according to the training data; A tool set is called or a second generative basic model is called according to the task data of the target task for processing to obtain output data of the target task.

2. The method according to claim 1, wherein: The step of performing intent recognition and query rewriting on the input data by using the first model to obtain task data of the target task includes: Performing intent recognition on the input data through the first model to determine the target task; The input data is queried and rewritten according to the target task through the first model to generate formatted task data matching the target task.

3. The method according to claim 2, wherein: The querying and rewriting the input data according to the target task by using the first model to generate formatted task data matching the target task includes: Acquire historical data related to the input data within a preset time period before the input data; The input data and the historical data are queried and rewritten according to the target task through the first model to generate formatted task data matching the target task.

4. The method according to claim 1, wherein: The calling of a toolset or a second generative basic model for processing according to the task data of the target task includes: If the target task is a task corresponding to the toolset, calling the interface function of the tool corresponding to the target task in the toolset according to the task data of the target task for processing; If the target task is a general task, the second generative basic model is called to generate task data for the target task.

5. The method according to any one of claims 1 to 4, wherein: The scale of the first generative base model is smaller than the scale of the second generative base model.

6. The method according to any one of claims 1 to 4, wherein: The input data is natural language data input by a user through the user device when the user device runs a cloud storage application. The tasks corresponding to the toolset include at least one of the following: finding files, finding pictures, clearing storage space, and distributing coupons.

7. A data processing method, comprising: Acquire training samples; wherein the training samples include training data corresponding to the tasks of the toolset and the general tasks, respectively, and the training samples are used by the first generative basic model to perform intent recognition and query rewriting on the training samples to obtain task data of the target task; Fine-tune the first generative basic model based on the training samples to obtain a first model.

8. The method according to claim 7, wherein: The fine-tuning training of the first generative basic model based on the training sample includes: Based on the training samples, all parameters of the first generative basic model are fine-tuned.

9. The method according to claim 8, wherein: The fine-tuning training of the first generative basic model based on the training sample to obtain the first model also includes: Obtaining the generalization performance of the first generative base model after all-parameter fine-tuning training; If the generalization performance does not meet the preset conditions, the training samples are updated or the fine-tuning training method is updated, and the first generative basic model is further fine-tuned based on the updated training samples or the updated fine-tuning training method to obtain the first model.

10. The method according to any one of claims 7 to 9, wherein: The training samples include: Training data constructed by prompt engineering using a third generative base model; wherein the scale of the third generative base model is greater than the scale of the first generative base model; Training data collected based on users’ online queries; Manually constructed training data.

11. A data processing method, comprising: Receive input data to be processed entered by the user in the dialogue interface; The input data is sent to a cloud device; wherein the cloud device deploys a first model, a tool set, and a second generative basic model; the first model is obtained by fine-tuning the first generative basic model according to the training data, and is used to perform intent recognition and query rewriting on the input data to obtain task data of the target task, and the tool set or the second generative basic model is used to process the task data to obtain output data of the target task; receiving the output data sent by the cloud device; The output data is displayed in the dialog interface.

12. The method according to claim 11, wherein: The displaying the output data in the dialogue interface includes: The output data and functional components are displayed in the dialogue interface, and the functional components are used by the user to operate to complete the target task.

13. The method according to claim 11 or 12, wherein: The input data is natural language data input by the user in the dialogue interface when running the cloud storage application, and the tasks corresponding to the toolset include at least one of the following: finding files, finding pictures, clearing storage space, and distributing coupons.

14. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1-13.

15. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 13.

16. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method according to any one of claims 1 to 13.

Citation Information

Cited By

  • Sample generation method, model training method, data processing method and electronic equipment

    CN121681783A