Data processing method, device and equipment and readable storage medium
By pre-training and optimizing the task decomposition model, combined with the direct preference optimization algorithm, the problem of inaccurate understanding of complex search content by large language models is solved, and the accurate decomposition of search tasks and the rationality of the answer content are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2026-04-10
AI Technical Summary
When faced with non-standard or complex user search content, large language models have difficulty accurately understanding and providing answers. Traditional chain-of-thought reasoning strategies lead to inconsistent decomposition results and a lack of logical order.
By pre-training the task decomposition model and combining it with the direct preference optimization algorithm, the decomposition results are corrected and optimized to improve the model's decomposition accuracy. The model is pre-trained and optimized using training samples, and the decomposition results are corrected and adjusted based on the task decomposition criteria.
It improves the accuracy and logic of the search task breakdown results, optimizes the breakdown effect, and ensures that the output solutions are more accurate and reasonable.
Smart Images

Figure CN121834009A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a data processing method and device, equipment and a readable storage medium. BACKGROUND
[0002] The search answer refers to the process that a user inputs the content of a search query in a search application and issues a search task, and a machine gives corresponding answer content for the search task issued by the user.
[0003] In actual application, the answer content corresponding to the search task can be generated by calling a large language model. The large language model can understand the search content input by the user and then output the corresponding answer content. However, due to the influence of factors such as non-standard form of the search content of the user and overly complex description, the large language model may be difficult to understand the search content, and thus cannot provide accurate answer content. In order to solve this problem, in the traditional technology, the search content is first disassembled into a plurality of reasoning tasks according to a chain-of-thought reasoning strategy, and each reasoning task is a short sentence. These short sentences are easier to understand, so that the large language model can output more accurate answer content based on the short sentences that are easier to understand.
[0004] However, the disassembly of the search task by using the chain-of-thought reasoning strategy is limited by the variability and disorder of the chain-of-thought reasoning strategy. For the same search task, the disassembly results obtained in succession may not be consistent, and each obtained disassembly result may also not have a logical sequence, and the disassembly effect is not good. It can be seen that the traditional disassembly of the search task cannot obtain accurate disassembly results. SUMMARY
[0005] The embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the accuracy of the disassembly result and optimize the disassembly effect in the disassembly business of the search task.
[0006] The embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the accuracy of the disassembly result and optimize the disassembly effect in the disassembly business of the search task.
[0007] Obtain task data of a first search task;
[0008] According to the task data of the first search task, call a pre-trained task disassembly model to perform task disassembly processing on the first search task, and obtain a first task disassembly result. The first task disassembly result includes at least one disassembly execution step obtained by disassembling the first search task and subtask data corresponding to each disassembly execution step.
[0009] The first task correction result is obtained based on the first task decomposition result, and the first task correction result is obtained by correcting the first task decomposition result according to a task decomposition standard, and the first task correction result includes at least one labeled execution step of the first search task obtained by correction and subtask data corresponding to each labeled execution step.
[0010] The pre-trained task decomposition model is optimized based on the difference between the first task decomposition result and the first task correction result, and an optimized task decomposition model is obtained.
[0011] Embodiments of the present application provide a data processing apparatus, comprising:
[0012] The data acquisition module is configured to acquire task data of a first search task.
[0013] The decomposition module is configured to call the pre-trained task decomposition model to perform task decomposition processing on the first search task according to the task data of the first search task, and obtain a first task decomposition result, wherein the first task decomposition result includes at least one decomposition execution step of the first search task obtained by decomposition and subtask data corresponding to each decomposition execution step.
[0014] The correction result acquisition module is configured to obtain a first task correction result for the first search task based on the first task decomposition result, wherein the first task correction result is obtained by correcting the first task decomposition result according to a task decomposition standard, and the first task correction result includes at least one labeled execution step of the first search task obtained by correction and subtask data corresponding to each labeled execution step.
[0015] The model optimization module is configured to optimize the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result, and obtain an optimized task decomposition model.
[0016] In an embodiment, the data processing apparatus can further comprise a pre-training module configured to pre-train the task decomposition model to obtain the pre-trained task decomposition model.
[0017] The pre-training process of the pre-trained task decomposition model comprises:
[0018] The training sample comprises task data of a core search task, at least one labeled execution step of the core search task obtained by decomposition, and subtask data corresponding to each labeled execution step.
[0019] The task decomposition model is pre-trained using the training sample to obtain the pre-trained task decomposition model.
[0020] In one embodiment, the specific implementation method of the pre-training module obtaining training samples includes:
[0021] Obtain at least one second search task executed by the sample object within a historical time period, and the task data for each second search task;
[0022] Data enrichment analysis is performed on the task data of at least one second search task to obtain data enrichment results. The data enrichment results include the core search task obtained by enrichment analysis of at least one second search task, the core words of the task used to characterize the core search task, and N related task data corresponding to the core search task. The semantics of each related task data is similar to the semantics of the core words of the task. N is a positive integer.
[0023] Based on the data enrichment results, the preceding language understanding model is invoked to decompose the core search task, resulting in a second task decomposition result. The second task decomposition result includes at least one initial label execution step obtained from the decomposition of the core search task and the subtask data corresponding to each initial label execution step.
[0024] Based on the second task decomposition results, the second task correction results for the core search task are obtained; the second task correction results include at least one label execution step obtained by the core search task after correction and the sub-task data corresponding to each label execution step.
[0025] The data enrichment results are combined with the correction results from the second task to obtain training samples.
[0026] In one embodiment, each historical task data is text data;
[0027] The pre-training module performs data enrichment analysis on task data from at least one second search task to obtain the data enrichment results. Specific implementation methods include:
[0028] Obtain the core keywords corresponding to the task data of at least one second search task;
[0029] Using core keywords, identify Q core task data points from the task data of at least one second search task; Q is a positive integer.
[0030] Based on Q core task data, the preceding task recognition model is called to perform task recognition processing on at least one second search task, so as to obtain the core search task and the task core words corresponding to the core search task.
[0031] Based on the semantics of the core keywords corresponding to the core search task, retrieve the data of N related tasks corresponding to the core search task from the database;
[0032] The core search task corresponding to at least one second search task, the core keywords of the core search task, and the data of N related tasks corresponding to the core search task are assembled to obtain the data enrichment result.
[0033] In one embodiment, the specific implementation of the pre-training module obtaining the core words corresponding to the task data of at least one second search task includes:
[0034] The task data for each second search task is segmented into words to obtain the word set corresponding to each second search task.
[0035] Obtain the union of the word segmentation sets corresponding to at least one search task;
[0036] The frequency of each word in at least one word set is statistically analyzed and collected, and the word with the highest frequency is identified as the core word corresponding to the task data of at least one second search task.
[0037] In one embodiment, the pre-training module uses training samples to pre-train the task decomposition model, resulting in a specific implementation of the pre-trained task decomposition model, including:
[0038] Based on the task data of the core search task in the training samples, the task decomposition model is invoked to decompose the core search task and obtain the third task decomposition result. The third task decomposition result includes at least one predicted decomposition execution step obtained by decomposing the core search task and the sub-task data corresponding to each predicted decomposition execution step.
[0039] Based on the differences between at least one label execution step of the core search task and at least one prediction decomposition execution step of the core search task, as well as the differences between the subtask data corresponding to each prediction decomposition execution step and the subtask data corresponding to each label execution step, the task decomposition model is trained and optimized to obtain a pre-trained task decomposition model.
[0040] In one embodiment, the model optimization module optimizes the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result, to obtain an optimized task decomposition model, including:
[0041] Calculate the first error loss between at least one disassembly execution step in the first task disassembly result and at least one annotation execution step in the first task correction result;
[0042] Calculate the second error loss between the subtask data corresponding to each decomposition execution step in the first task decomposition result and the subtask data corresponding to each labeled execution step in the first task correction result;
[0043] Based on the first error loss and the second error loss, the model parameters of the pre-trained task decomposition model are optimized and adjusted to obtain the optimized task decomposition model.
[0044] In one embodiment, the correction result acquisition module acquires a first task correction result for the first search task based on the first task decomposition result, including:
[0045] The first task decomposition result is pushed to the result correction object. The result correction object corrects at least one decomposition execution step in the first task decomposition result according to the task decomposition standard. After obtaining at least one labeled execution step, the execution order of at least one labeled execution step is determined, and the corresponding subtask data is determined for each labeled execution step based on the subtask data corresponding to each decomposition execution step.
[0046] The received result correction object returns at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step;
[0047] The first task correction result is assembled by combining at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step.
[0048] In one embodiment, after the model optimization module optimizes the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain an optimized task decomposition model, the model optimization module is further specifically used for:
[0049] Retrieve the configuration task data set. A configuration task data in the configuration task data set refers to the task data of a configuration search task.
[0050] Based on each configuration task data, the optimized task decomposition model is invoked to decompose the configuration search task corresponding to each configuration task data, and the configuration decomposition result corresponding to each configuration search task is obtained. The configuration decomposition result corresponding to each configuration search task includes at least one configuration decomposition execution step corresponding to the configuration search task, and the subtask data corresponding to each configuration decomposition execution step.
[0051] The task data for each configuration search task is associated with the configuration breakdown results corresponding to each configuration search task and stored in the configuration library.
[0052] In one embodiment, the model optimization module is further specifically used for:
[0053] Receive result query requests sent by terminal devices; the result query request is used to request the configuration breakdown results corresponding to the target task data. The target task data is the configuration task data determined from the configuration task data set based on the target search content, which is used to indicate the task requirements of the search task corresponding to the target search content; the target search content refers to the content entered by the search object in the search interface displayed on the terminal device; the result query request is sent by the terminal device after the target task data in the search interface is triggered.
[0054] The configuration breakdown results corresponding to the target task data are obtained from the configuration library and returned to the terminal device. The terminal device then displays the configuration breakdown results corresponding to the target task data in the search object.
[0055] One embodiment of this application provides a computer device, including: a processor and a memory;
[0056] The memory stores a computer program, which, when executed by a processor, causes the processor to perform the methods described in the embodiments of this application.
[0057] One aspect of this application provides a computer-readable storage medium storing a computer program, which includes program instructions. When executed by a processor, the program instructions perform the methods described in this application.
[0058] One aspect of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in one aspect of the embodiments of this application.
[0059] This application provides a task decomposition scheme for search tasks, which enables the decomposition results to meet task decomposition standards, thereby optimizing the decomposition results and improving their accuracy. Specifically, after obtaining the task data of the first search task, this scheme first calls a pre-trained task decomposition model to perform task decomposition processing, obtaining a first task decomposition result. Then, this application can obtain a task decomposition result obtained after correcting the first task decomposition result. Based on the difference between the first task decomposition result and the corrected task decomposition result, the pre-trained task decomposition model can be further optimized to obtain an optimized task decomposition model. In this way, the optimized task decomposition model can output more accurate decomposition results. It should be understood that while this application enables a pre-trained task decomposition model to possess task decomposition capabilities, the decomposition results output by this pre-trained model may have issues and differ from the task decomposition standards (e.g., logical order disorder, incomplete expression, etc.). To reduce these differences and enhance the logic and standardization of the decomposition results, this solution introduces a direct preference optimization technique to further optimize the pre-trained task decomposition model. Specifically, for the first task decomposition result output by the pre-trained model, this solution will revise it again based on the task decomposition standards to obtain a revised first task result. Then, this solution can optimize the pre-trained task decomposition model based on this revised first task result, making its output increasingly closer to the revised first task result. The optimized task decomposition model can output more accurate and reasonable decomposition results, and can then be applied to various scenarios requiring task decomposition. In summary, this application can improve the accuracy of decomposition results and optimize the decomposition effect in search task decomposition. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a schematic diagram of the architecture of a search task decomposition system provided by an exemplary embodiment of this application;
[0062] Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application;
[0063] Figure 3 This is a schematic diagram illustrating a search solution scenario provided in an embodiment of this application;
[0064] Figure 4 This is a schematic diagram of the optimized logical architecture of a task decomposition model provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of the pre-training process of a task decomposition model provided in an embodiment of this application;
[0066] Figure 6 This is a schematic diagram of the logical architecture for generating training samples provided in an embodiment of this application;
[0067] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0068] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0069] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0070] This application involves technical terms such as large language model. For ease of understanding, the following will first explain some of the terms involved in the embodiments of this application.
[0071] Large language model (LLM):
[0072] A large language model is a language model composed of artificial neural networks with many parameters (usually billions or more weights). It refers to a generative deep neural network model based on the Transformer structure, which has powerful semantic understanding and multi-turn dialogue capabilities. A common example of a large language model is GPT4.
[0073] Supervised Fine-Tuning (SFT):
[0074] SFT is a technique for natural language processing that fine-tunes a pre-trained language model to suit a specific task. The main idea of SFT is to build upon a large pre-trained model and then fine-tune it for a specific task. During the fine-tuning process, the model's parameters and structure are adjusted according to the characteristics of the task to improve its performance on that task.
[0075] Direct Preference Optimization (DPO):
[0076] Direct Preference Optimization (DPO) is an algorithm used for training large language models. It directly optimizes the model's output to better match expectations. Unlike traditional reinforcement learning, DPO does not rely on explicit reward modeling or reinforcement learning processes. Instead, it adjusts the model based on good results (expected results) and bad responses (the model's output). Furthermore, DPO is computationally more efficient and stable, requiring no complex hyperparameter tuning.
[0077] Prompt:
[0078] A prompt can be understood as an instruction or command. It is a command that needs to be sent to AI (such as a large language model) when having a conversation with AI. It can be a text description, such as "Please recommend a popular song for me" when talking to AI, or it can be a parameter description in a certain format, such as describing the relevant drawing parameters when asking AI to draw a drawing in a certain format.
[0079] The design concept of the embodiments of this application will be briefly introduced below.
[0080] In practical applications, an increasing number of applications are exploring the combination of search-based answering (knowledge-based question answering) and deep learning, using generative deep learning models (such as large language models) to output answers that match the user's query. However, due to factors such as the non-standard format and overly complex descriptions of user-input search content, large language models often struggle to understand the user's input, thus failing to provide accurate answers. Therefore, to address the problem of deep learning models being unable to provide accurate answers to complex descriptions, traditional techniques break down the search content into several reasoning tasks using a chain-of-thoughts strategy. Each reasoning task is represented by a short, easier-to-understand sentence, allowing the large language model to output more accurate answers based on these easier-to-understand sentences.
[0081] However, using a chain-of-thought reasoning strategy to break down search tasks is limited by the variability and unordered nature of this strategy. For the same search task, the breakdown results obtained at different times may be inconsistent, and each breakdown result may not have a logical order, resulting in poor breakdown performance. Therefore, traditional methods of breaking down search tasks cannot yield accurate and effective results.
[0082] Based on this, in order to improve the decomposition results of search tasks and optimize the decomposition effect, this application provides a decomposition scheme for search tasks. Specifically, this application can first train and optimize the task decomposition model, and then use the trained and optimized task decomposition model to perform task decomposition processing on a certain search task that needs to be decomposed, so as to obtain the task decomposition result of the search task. Since the task decomposition model has been pre-trained and optimized according to this scheme, it has better performance, so the output task decomposition result can be more accurate. In other words, this application essentially provides a training and optimization scheme for task decomposition models. Through this scheme, the task decomposition performance of the model can be improved, so that the task decomposition model with higher task decomposition performance can output more accurate and better decomposition results. The model training and optimization scheme provided by this application can generally include the following five steps: 1. Obtain training samples for pre-training the task decomposition model, and then use the training samples to pre-train the task decomposition model to obtain a pre-trained task decomposition model. The training samples may include task data for the search task as samples and the decomposition results of the search task that can be used as training labels. The search task as samples may be obtained by performing data enrichment analysis on a historical search task (which can be called a second search task, such as a task to search for the weather in country A, or a task to search for essay writing skills) performed by a sample object (such as a user) within a certain historical time period. The task data may refer to data that reflects the task requirements of the search task. The presentation form of the task data may include, but is not limited to, text. That is, the task data of a search task may be text data. This application prefers the presentation form of the task data to be text. For example, for a user a, after entering the text data "how to teach children to be self-disciplined" within a historical time period, a search operation is performed. Then it can be considered that user a performed a search task (the search task is to find methods to teach children to be self-disciplined). The text data "how to teach children to be self-disciplined" can be understood as data that reflects the task requirements of the search task (the requirement to find answers to teach children to be self-disciplined), and can be called the task data of the search task. It should be understood that by pre-training the task decomposition model using the aforementioned training samples, the task decomposition model can acquire task decomposition capabilities. 2. Based on the task decomposition model's task decomposition capabilities, in order to further improve its task decomposition performance and make its output decomposition results more accurate and reasonable, this application will further optimize the pre-trained task decomposition model based on a direct preference optimization algorithm.Specifically, this application can obtain task data for a certain search task, and then call a pre-trained task decomposition model to decompose the search task, thereby obtaining a task decomposition result. This result may include the decomposition execution steps of the search task (i.e., a step that needs to be executed during the execution of the search task; one decomposition execution step can be understood as a subtask to be executed), and the subtask data corresponding to each decomposition execution step (this subtask data reflects the task requirements of the subtask; similar to the previous example, this subtask data can also be text data); 3. The task decomposition result obtained after decomposing the task using the task decomposition model can be corrected according to a task decomposition standard. This task decomposition standard may refer to a pre-set decomposition standard, which may include the pre-set decomposition logic and expression methods for different search tasks. The criteria, such as task decomposition, can be determined based on factors like the decomposition habits / preferences, reading habits / logic of different objects (e.g., users). Based on these criteria, the task decomposition results output by the task decomposition model can be modified. For example, the description of each decomposition execution step can be modified, a decomposition execution step not included in the model can be added, or a redundant step can be deleted. Ultimately, by modifying each decomposition execution step, modified execution steps can be obtained. For ease of distinction, these modified execution steps can be called labeled execution steps. For each labeled execution step, the task decomposition criteria can also determine its execution order. Furthermore, for each labeled execution step, subtask data can be added, modified, or deleted according to the task decomposition criteria, ultimately yielding the subtask data corresponding to each standard execution step. In other words, the task decomposition results output by the task decomposition model may not be clear enough regarding the execution steps, their descriptions, and the subtask data. Furthermore, the execution order of these steps may not be accurate. Therefore, these steps can be corrected, and the corrected result can be called the task correction result. 4. After obtaining the task correction result, it can be used as a label to optimize the task decomposition model. Specifically, the task correction result can be designated as a "good" result, while the task decomposition result can be considered a "bad" result. This approach uses the "good" result as the model's training label, continuously adjusting the model to make its output increasingly closer to the "good" result. For example, this approach can use a loss function to calculate the difference between the model's output (i.e., the task decomposition result) and the task correction result, and update the model parameters based on this difference. This allows the task decomposition model to better understand and match the task decomposition criteria, resulting in output results that increasingly approximate the task correction result.
[0083] It should be understood that pre-training a task decomposition model using training samples enables it to decompose tasks. However, the decomposition results output by this pre-trained model may have issues (e.g., disordered logical order of execution steps, incomplete descriptions), differing from the task decomposition standards. To reduce these differences and enhance the logic and standardization of the decomposition results, this solution introduces direct preference optimization technology to further optimize the pre-trained task decomposition model. Specifically, the task decomposition results output by the pre-trained model are further corrected based on the task decomposition standards to obtain corrected results. These corrected results are then used as training labels to optimize the pre-trained model, making its output increasingly closer to the corrected results. The optimized task decomposition model outputs more accurate and reasonable decomposition results, which can then be applied to various scenarios requiring task decomposition. This optimizes the accuracy and rationality of the decomposition results for each search task, improving the overall decomposition effect.
[0084] The solution provided in this application can be applied to any application scenario that requires searching for answers, including but not limited to: intelligent question-answering scenarios and search scenarios, etc. Wherein:
[0085] A search scenario can refer to the process where a user inputs search terms, a computer device performs semantic recognition on those terms, and provides the user with answers based on the semantic recognition results. This includes, but is not limited to, various search domains such as product transactions, advertising search, and video search. Taking video search as an example, a user might input search terms containing negative semantics (e.g., searching for movies not starring actor A). In this case, the solution provided in this application can accurately identify the negative intent of the search terms, thereby filtering out movies starring actor A from the video database (e.g., a database used to store videos) and pushing them to the user. In the search scenario, the task data for the search task in this application embodiment can refer to the search terms input by the user during the search process.
[0086] Intelligent question-answering scenarios refer to scenarios where humans and computer devices interact through question-and-answer dialogues using voice or text. This includes, but is not limited to, question-and-answer scenarios in fields such as intelligent transportation, intelligent vehicles (e.g., in-vehicle intelligent assistants), and intelligent robots (e.g., physical robots, or robots in conversational applications (text robots, voice robots, multimodal digital humans, intelligent quality inspection, agent assistance, etc.)). For example, a question-and-answer interaction scenario where an intelligent robot in a hotel (or other service scenarios such as customer service) engages in dialogue with a human; another example is a question-and-answer interaction scenario where an in-vehicle application engages in dialogue with a human; and so on. It is worth noting that in intelligent question-and-answer scenarios, the dialogue between a human and a computer device (such as an intelligent robot with dialogue capabilities) can be a single dialogue or multiple dialogues; this application embodiment does not limit this. In intelligent question-and-answer scenarios, the task data for a search task in this application embodiment can refer to text data entered by the user during the dialogue.
[0087] In summary, the search task decomposition scheme provided in this application can accurately and reasonably decompose each search task, optimize the decomposition effect, and thus improve the accuracy and rationality of the search task's answer content. To a certain extent, it can effectively improve business coverage (such as expanding applicable scenarios).
[0088] It should be noted that the above-mentioned application scenarios are merely examples and do not limit the application scenarios to which the solutions provided in the embodiments of this application are applicable.
[0089] Furthermore, the search task decomposition scheme provided in this application embodiment can be executed by a computer device, which may include a terminal or a server, and may further include both a terminal and a server. To facilitate understanding of the search task decomposition scheme provided in this application embodiment, the following is combined with... Figure 1 The decomposition system for the search task shown illustrates the application scenarios involved in the embodiments of this application; wherein, Figure 1 This is a schematic diagram of the architecture of a search task decomposition system provided by an exemplary embodiment of this application, such as... Figure 1 As shown, the system for disassembling this search task includes a terminal 101 and a server 102; wherein:
[0090] 1) Terminal 101 may include the terminal device used by the user. Of course, depending on the application scenario and field in which the search task breakdown scheme is applied, the terminal providing the search task breakdown scheme in this application embodiment may vary. Terminal devices may include, but are not limited to: smartphones (such as smartphones running the Android system, or smartphones running the Internetworking Operating System (IOS), tablet computers, portable personal computers, mobile Internet devices (MIDs), in-vehicle devices, head-mounted smart home devices, and smart voice interaction devices, etc. This application embodiment does not limit the type of terminal device, which is stated here.
[0091] 2) Server 102 can be a server corresponding to the terminal, used to interact with the terminal to provide computing and application service support. Specifically, this server is a backend server corresponding to the application deployed in the terminal, used to interact with the terminal to provide computing and application services for the application. Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0092] An application can refer to a computer program designed to perform one or more specific tasks. Classifying applications according to different dimensions (such as how they run and their functions) can yield different types of the same application. For example, based on how they run, applications can include, but are not limited to: clients installed on a terminal, small programs that can be used without downloading and installation (as subroutines of the client), and World Wide Web (Web) applications opened through a browser. Another example is based on their functional type, which can include, but is not limited to: instant messaging (IM) applications, interactive content applications, audio applications, or video applications. Instant messaging applications refer to applications that facilitate instant communication and social interaction over the internet, and can include, but are not limited to: applications with communication functions, map applications with interactive functions, and game applications. Interactive content applications are applications capable of content interaction, such as sharing platforms, personal spaces, and news applications. Audio applications are applications that implement audio functions over the internet, and can include, but are not limited to: music applications with music playback and editing capabilities, radio applications with radio playback capabilities, or live streaming applications with live streaming capabilities. A video application is an application that can play videos. Video applications can include, but are not limited to, applications that play short videos (videos are often short, such as a few seconds or a few minutes), applications that play long videos (such as movies or TV series, which are often longer), and so on.
[0093] Of course, the solutions provided in this application can be deployed directly on devices (such as intelligent robots) or outside of applications, or they can be deployed on devices or applications in the form of plug-ins. This application does not limit the carrier of the deployment solution.
[0094] The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this. Furthermore, this application does not limit the number of terminals and servers; Figure 1 The number of terminals 101 and servers 102 is only a single example. In actual applications, multiple servers may be distributed in a distributed manner. This is just a brief explanation.
[0095] Based on the above-described solution and system architecture, the following points should also be noted:
[0096] ①The embodiments of this application mentioned above Figure 1The system shown is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application and does not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art will understand that, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems. For example, the executing entity "computer device" in the embodiments of this application may include a terminal and a server, that is, the solution provided in the embodiments of this application is jointly executed by the terminal and the server. In practical applications, the computer device may also be a terminal or a server, meaning that it supports the execution of the solution provided in the embodiments of this application by either the terminal or the server alone.
[0097] ② The data collection and processing in this application embodiment should strictly comply with the requirements of relevant laws and regulations. Obtaining personal information requires the knowledge or consent of the individual (or a legal basis for information acquisition), and subsequent data use and processing should be carried out within the scope of laws, regulations, and the authorization of the personal information subject. For example, when this application embodiment is applied to specific products or technologies, such as obtaining the user's search content or historically executed search tasks, the user's permission or consent is required. Furthermore, the collection, use, and processing of related data (such as the collection and publication of bullet comments by the user) must comply with the relevant laws, regulations, and standards of the relevant regions.
[0098] Based on the search task decomposition scheme described above, this application proposes a more detailed search task decomposition method. The search task decomposition method proposed in this application will be described in detail below with reference to the accompanying drawings.
[0099] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application. The flowchart can refer to the task decomposition method provided in the embodiments of this application, and can essentially be understood as a training and optimization process for a task decomposition model. This data processing method can be executed by a computer device in the aforementioned system, such as a terminal and / or a server; the data processing method can include at least the following steps S201-S204:
[0100] Step S201: Obtain the task data for the first search task.
[0101] In this application, a search task may refer to a task issued by a user through a search operation, and the first search task may refer to any search task. The task data of the first search task may refer to text data for reflecting the search intention / requirement of the user's current search task (that is, the text data to be searched to complete the first search task). Specifically, the acquisition methods of task data may include but are not limited to: ① directly input by the user; for example, the computer device is equipped with a display screen, so that the user can directly input the text content to be searched in the display screen through the physical keyboard (such as an external keyboard) or virtual keyboard of the computer device. After inputting the search content, if the user triggers a search operation, it can be considered that the user has issued a search task, and the search content input by the user can reflect the search intention of the current search task, and it is the task data of the current search task. ② obtained by converting the voice output by the user; for example, the user can emit a voice signal, so that the computer device can collect the voice signal in the physical environment where the user is located through the microphone and perform text conversion on the voice signal to obtain the text corresponding to the voice output by the user. That is, in some scenarios, the user can trigger a search operation by emitting a voice signal. After the user emits a voice signal, it can be considered that the user has issued a search task, and the computer device can perform text conversion on the voice signal, and the obtained text corresponding to the voice can be used as the task data of the current search task. ③ obtained by the user's trigger; for example, the computer device is equipped with a display screen, so that the user can directly input the text content to be searched in the display screen through the physical keyboard (such as an external keyboard) or virtual keyboard of the computer device. Based on the input search content by the user, the potential search requirement of the user can be analyzed. Then, the computer device can output text data for reflecting the potential search requirement in the display screen. If the user triggers the text data, it can be considered that the user has issued a search task, and the text data reflecting the potential search requirement by the user is the task data of the current search task.
[0102] Among them, when the task data is text data, it may include one or more characters. The characters may include at least one of the following: Chinese characters (i.e., Chinese words), English characters (i.e., letters), numbers, and punctuation marks (such as comma ",", period ".", square brackets "【】"). The embodiments of this application do not limit the type and quantity of characters included in the obtained task data.
[0103] Step S202: According to the task data of the first search task, call the pre-trained task decomposition model to perform task decomposition processing on the first search task, and obtain a first task decomposition result. The first task decomposition result includes at least one decomposition execution step obtained by decomposing the first search task and the sub-task data corresponding to each decomposition execution step.
[0104] In this application, the task decomposition model can be pre-trained to enable it to perform task decomposition. Specifically, this application can pre-configure training samples, which should include one or more search tasks as samples (in this application, the search tasks as samples can be determined based on at least one historical search task / secondary search task executed by the sample object within a historical time period, and the final search task as samples is essentially the core search task corresponding to at least one secondary search task), the task data of the core search task, and the task decomposition results (referred to as labeled task decomposition results) obtained by decomposing the core search task as training labels. The labeled task decomposition results include at least one labeled decomposition step of the core search task, and the subtask data corresponding to each labeled decomposition step. It can be understood that each labeled decomposition step refers to the step to be executed during the execution of the core search task after the core search task is decomposed, which can be understood as a subtask to be executed, and the subtask data corresponding to the labeled decomposition step refers to the data (text data, that is, the text data to be searched to complete the step) used to reflect the search requirements of the step. For the annotation task decomposition results of the core search task, this solution provides a method for determining the results based on a language understanding model (e.g., a large language model). The specific determination process can be found in the following sections. Figure 5 The relevant descriptions in the corresponding embodiments, that is, the methods for obtaining training samples, can be found in the following sections. Figure 5 The relevant descriptions in the corresponding embodiments.
[0105] It should be understood that after obtaining the training samples, the labeled task decomposition results of the core search task can be used as training labels to train the task decomposition model, thereby enabling it to decompose tasks. The task decomposition model in this application can refer to any model with language understanding capabilities; for example, it can be a large language model. After pre-training with the training samples, the pre-trained task decomposition model can be called to decompose the aforementioned first search task, thus obtaining a task decomposition result (which can be referred to as the first task decomposition result). It is worth noting that the number of first and second search tasks in this application can be one or more, and the first and second search tasks can be the same task or different tasks. In some feasible embodiments, the second search task used to generate training samples for model pre-training can be an offline task, while the first search task can be an online task used as experimental data for online testing of the pre-trained model.
[0106] Step S203: Based on the first task decomposition result, obtain the first task correction result for the first search task; the first task correction result is obtained after correcting the first task decomposition result according to the task decomposition standard, and the first task correction result includes at least one labeled execution step obtained by the first search task after correction and the sub-task data corresponding to each labeled execution step.
[0107] In this application, to improve the task decomposition performance of the task decomposition model and ensure that its decomposition results conform to the task decomposition standards, the pre-trained task decomposition model can be further optimized using the DPO algorithm. Specifically, the first task decomposition result can be corrected to obtain a corrected task result (which can be referred to as the first task corrected result) that better conforms to the task decomposition standards. For example, the first task decomposition result can be pushed to a result correction object (which can be an object used to label various search tasks). The result correction object can correct at least one decomposition execution step in the first task decomposition result according to the task decomposition standards to obtain at least one labeled execution step. When correcting at least one decomposition execution step in the first task decomposition result, the result correction object can perform operations such as adding, modifying, or deleting at least one decomposition execution step. For example, the result correction object can modify each decomposition execution step. The process of refining execution steps—such as describing the steps, deleting a step, or adding a new step—can be used to create a new batch of execution steps, which can be called labeled execution steps. Then, for at least one labeled execution step, the result correction object can sort these steps according to the task decomposition criteria, thus determining their execution order. Simultaneously, the result correction object can also modify the subtask data of each execution step. For example, it can modify the subtask data based on the labeled execution steps, add subtask data for a newly added labeled execution step, or delete subtask data for a deleted execution step. Ultimately, this process yields at least one labeled execution step, the execution order of these steps, and the subtask data for each labeled execution step.
[0108] Furthermore, the computer device can receive at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step returned by the result correction object. Then, the computer device can assemble the at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step (e.g., splicing or aggregating to obtain a set) to obtain the first task correction result.
[0109] It is worth noting that the number of result modification objects in this application may be one or more, and the task decomposition criteria in this application can be determined through negotiation based on one or more result modification objects. In this way, the task decomposition criteria can better align with the perceptions of different result modification objects. The task decomposition criteria can include guidelines for different items, such as guidelines for the way steps are described, guidelines for the way subtask data is described, guidelines for the logical structure of the decomposition, and guidelines for the order in which different steps are arranged. In general, the task decomposition criteria can be formulated based on the task decomposition preferences of the result modification objects, and the task decomposition criteria can be modified and changed accordingly based on changes in the task decomposition preferences of the result modification objects. That is to say, the task decomposition criteria can be a standard formulated based on the task decomposition logic of the result modification objects, and it conforms to the task decomposition preferences of the result modification objects.
[0110] Step S204: Based on the difference between the first task decomposition result and the first task correction result, optimize the pre-trained task decomposition model to obtain the optimized task decomposition model.
[0111] In this application, after obtaining the first task decomposition result and the first task correction result, the first task correction result can be designated as a "good" result and used as the training label, while the first task decomposition result can be designated as a "bad" result and used as the data to be optimized. The pre-trained task decomposition model can then be trained using both the "good" and "bad" results. The core idea of DPO is to directly optimize the model (LM) to conform to human preferences, rather than first fitting a reward model and then using reinforcement learning (RL) for optimization. DPO is essentially a binary classification task; it compares good and bad responses and then adjusts the model to increase the probability of good responses. Its goal is to maximize the probability of generating "good" results while minimizing the probability of generating "bad" results. Based on this, this application employs a binary cross-entropy loss function to optimize the pre-trained task decomposition model.
[0112] Specifically, this application updates model parameters by calculating the difference between the model output (i.e., the first task decomposition result) and the true label (i.e., the first task correction result). This process is similar to backpropagation and gradient descent techniques in supervised learning. In each post-training cycle, the corrected data is used to adjust the model parameters. The specific implementation of optimizing the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain the optimized task decomposition model can include, but is not limited to: First, using a binary cross-entropy loss function to calculate the first error loss between at least one decomposition execution step in the first task decomposition result and at least one labeled execution step in the first task correction result; using a binary cross-entropy loss function to calculate the second error loss between the sub-task data corresponding to each decomposition execution step in the first task decomposition result and the sub-task data corresponding to each labeled execution step in the first task correction result; based on the first and second error losses, a total loss can be calculated. Based on this total loss, the model parameters of the pre-trained task decomposition model can be optimized and adjusted to finally obtain the optimized task decomposition model.
[0113] It should be understood that pre-training a task decomposition model using training samples enables it to decompose tasks. However, the decomposition results output by this pre-trained model may have problems (e.g., disordered logical order of execution steps, incomplete descriptions), and may not conform to human perception. To reduce these discrepancies and enhance the logic and standardization of the decomposition results, this solution introduces direct preference optimization techniques. By employing human preference learning, the pre-trained task decomposition model is further optimized. Specifically, the task decomposition results output by the pre-trained model are revised again based on task decomposition standards (determined by human decomposition preferences). The order, logic, and description of the decomposition steps are adjusted to obtain a revised task result. Then, this solution can directly perform preference optimization based on this revised task result, making the decomposition results of the task decomposition model more accurate and reasonable, with a clear sequence and logical consistency.
[0114] The optimized task decomposition model (i.e., the optimized task decomposition model) can be applied. To facilitate understanding of its application process, an application scenario of the optimized task decomposition model will be described below. Specifically, in a search scenario, after obtaining the optimized task decomposition model, this application can call the optimized task decomposition model to perform task decomposition processing for each configuration search task to obtain the task decomposition results for each configuration search task. Then, these task decomposition results of configuration search tasks can be provided to the front end for use. For example, when a search object (such as a user) triggers a configuration search task, the terminal device can obtain the task decomposition results of the configuration search task. Then, the terminal device can display the task decomposition results in the search object, so that the search object can obtain the detailed answer content of the configuration search task. Specifically, after obtaining the optimized task decomposition model, a configuration task data set can be acquired. Each configuration task data set refers to the task data of a configuration search task. Each configuration search task can refer to a pre-configured search task by a relevant operational object (e.g., an object developing a search application in a search scenario). The configuration task data of a configuration search task is the text data configured by the operational object to reflect its search needs. Based on each configuration task data, the optimized task decomposition model can be invoked to decompose the configuration search task corresponding to each configuration task data, obtaining the configuration decomposition result for each configuration search task. The configuration decomposition result for each configuration search task includes at least one configuration decomposition execution step corresponding to the configuration search task, and subtask data corresponding to each configuration decomposition execution step. Then, the task data of each configuration search task and the configuration decomposition result corresponding to each configuration search task can be associated and stored in the configuration library.
[0115] Furthermore, after associating and storing the configuration breakdown results of each configuration search task with the task data of the configuration search task, if a search object enters a search content (which can be called the target search content) in the search interface displayed on the terminal device, and the target task data in the configuration task data set can completely match the actual search intent / requirement of the target search content, then the terminal device can display the target task data in the search interface for the search object to trigger a search. If the search object triggers the target task data, then it can be considered that the search object has performed a search operation and issued the configuration search task indicated by the target task data. The terminal device can then generate a result query request to request the computer device to obtain the configuration breakdown results associated with the target task data. The computer device can obtain the configuration breakdown results associated with the target task data from the configuration library and return them to the terminal device. In this way, the terminal device can display the configuration breakdown results on the search object. For example, the terminal device can display a results details page to the search target. The results details page can display the answer to the current search task, as well as the sub-task data in the configuration breakdown results associated with each target task data. If the search target wants to know how a certain configuration breakdown execution step is specifically performed, it can trigger the sub-task data, and the terminal device can then display the detailed answer to the configuration breakdown execution step to the search target.
[0116] To facilitate understanding of the application process, the following explanation will be provided in conjunction with the accompanying drawings. Please refer to the attached diagrams. Figure 3 , Figure 3 This is a schematic diagram illustrating a search solution scenario provided in an embodiment of this application. Wherein, as... Figure 3 The scenario shown is an example of applying search results to a search context. For example... Figure 3 As shown, assuming user a launches a search application through terminal device 100a, the search application can first display a search interface 3001 to user a. The search interface 3001 may contain a search box M, in which user a can enter the content they want to search for in the search box M.
[0117] like Figure 3As shown, assume that the search content entered by user a in the search box M is the text data "teacher's speech at the parents' meeting". Based on the search content entered by this user a, the search application can obtain search terms that contain the search content entered by this user a. Since these search terms contain the search content entered by user a, the search terms may be able to match the search needs / intentions of user a. In addition, the search application can also analyze the potential search needs based on the search content entered by this user a to find the target task data (text data) in the configured task data set that can accurately reflect the search needs of user a. This target task data may not contain the search content entered by this user a, but it can accurately reflect the search intention / needs of user a. For example, as Figure 3 shown, after user a enters the search content, the search application can obtain each search term that contains the search content. These search terms are, for example: search term 1 "teacher's speech at the parents' meeting", search term 2 "concise and incisive teacher's speech at the parents' meeting", search term 3 "wonderful beginning of the teacher's speech at the parents' meeting", search term 4 "teacher's speech draft for the parents' meeting"; at the same time, the search application can also obtain the target task data used to reflect the search intention of user a this time, and this target task data is the text data "preparation for the key links of the teacher's first parents' meeting". Then, the terminal device 100a can display the above-mentioned various search terms and target task data in the search interface for user a to trigger a search. Among them, when the terminal device 100a displays each search term, it can highlight the characters that are different from the search content (for example, as Figure 3 shown, for the search term "concise and incisive teacher's speech at the parents' meeting", the characters "concise", "incisive", and "penetrating" are all characters different from the search content "teacher's speech at the parents' meeting", so they can be bolded) to highlight the difference from the original search content; and when displaying the target task data "preparation for the key links of the teacher's first parents' meeting", all the content can be highlighted to form a difference from each search term (for example, as Figure 3 shown, for the target task data "preparation for the key links of the teacher's first parents' meeting", its entire content can be bolded).
[0118] It should be understood that for any displayed search term or target task data, user a can trigger it to execute a search operation, and then send a search task for the triggered content. Of course, user a can also trigger the search control in the search box to send a search operation for this search content, and then send a search task for this search content. Here, assume that user a clicks on Figure 3The displayed target task data triggered an operation, indicating that user A has executed a search operation and issued a search task. The terminal device can respond to this search operation by generating a result query request for the task breakdown of the target task data and sending it to server 1000 (which can be the backend server corresponding to the search application). As described above, server 1000 can pre-configure a set of configuration task data and, through optimizing the task breakdown model, configure associated configuration task breakdown results for each set of configuration task data. Based on this, server 1000 can retrieve the configuration task breakdown results associated with the target task data from the configuration library and return them to terminal device 100a. After receiving the configuration task breakdown results, terminal device 100a can display them to user A according to the actual business requirements of the scenario.
[0119] For example, such as Figure 3 As shown, since the configuration task decomposition result will include at least one configuration decomposition execution step associated with the target task data, and the sub-task data corresponding to each configuration decomposition execution step, the terminal device 100a can first display a result details page 3002. In the result details page 3002, the terminal device 100a can display a rough answer area P1 and a decomposition area P2. In the rough answer area P1, the terminal device 100a can display a rough answer content (relatively vague) for this search task. If the data volume of the rough answer content is large, the rough answer area P1 cannot fully display the rough answer content. In this case, the terminal device 100a can provide a full-text view control in the rough answer area. User A can view the complete rough answer content by triggering the full-text view control. In the disassembly area P2, terminal device 100a can display the subtask data corresponding to each configuration disassembly execution step of the target task data. Each subtask data can be considered a knowledge point, and user a can trigger a specific subtask data to view the detailed explanation of that disassembly execution step. If the number of configuration disassembly execution steps for the target task data is large, the number of corresponding subtask data will also be large, and it may not be possible to display all the subtask data in disassembly area P2. In such cases, the subtask data corresponding to the more critical disassembly execution steps can be displayed first.
[0120] For example, such as Figure 3As shown, the configuration breakdown execution steps of the target task data include: Step 1: Answering the questions asked at the parent-teacher meeting in detail; Step 2: Expressing expectations and requirements to students, hoping they can meet them; Step 3: Based on the expectations for students, making requests to parents to help them achieve those expectations. The sub-task data for Step 1 is Sub-task Data 1: "What questions will parents ask at the parent-teacher meeting?"; the sub-task data for Step 2 is Sub-task Data 2: "How to express expectations and requirements to students at the parent-teacher meeting?"; and the sub-task data for Step 3 is Sub-task Data 3: "How to accurately express requirements to parents at the parent-teacher meeting?". Then, in the breakdown area P2, terminal device 100a can display Sub-task Data 1, Sub-task Data 2, and Sub-task Data 3. User a can trigger any one of the sub-task data to obtain the detailed answers to the corresponding steps. For example, after user a triggers Sub-task Data 3, terminal device 100a can display a detailed answer page, showing the detailed execution process of Step 3.
[0121] It should be noted that the embodiments in this application are only for the purpose of facilitating understanding of the application scenarios of the optimized task decomposition model. Therefore, the application process is illustrated using a search scenario as an example. This does not mean that the application scenarios of the optimized task decomposition model are limited to this. The application scenarios of the optimized task decomposition model can be appropriately expanded based on its beneficial effects.
[0122] In this embodiment, pre-training the task decomposition model using training samples enables it to decompose tasks. However, the decomposition results output by the pre-trained model may have problems (e.g., disordered logical order of execution steps, incomplete descriptions), and do not conform to human perception. To reduce this discrepancy and enhance the logic and standardization of the decomposition results, this solution introduces direct preference optimization technology. By employing human preference learning, the pre-trained task decomposition model is further optimized. Specifically, for the task decomposition results output by the pre-trained model, this solution will revise them again based on task decomposition standards (determined by human decomposition preferences). The order, logic, and description of the decomposition steps will be adjusted to obtain a revised task result. Then, this solution can directly perform preference optimization based on the revised task result, making the decomposition results of the task decomposition model more accurate and reasonable, with a clear sequence and logical consistency.
[0123] Furthermore, for ease of understanding the model optimization logic provided in this application, please also refer to... Figure 4 , Figure 4 This is a schematic diagram of the optimized logical architecture of a task decomposition model provided in an embodiment of this application. For example... Figure 4As shown, this logical architecture may include at least the following components: a model pre-training component, a result correction component, and a model optimization component. The functions implemented by each component will be briefly described below:
[0124] Model pre-training component: The model pre-training component can be used to pre-train the task decomposition model based on training samples. The training process is as follows: First, the model pre-training component inputs the training samples into the task decomposition model. Then, after reading the data, the task decomposition model performs forward propagation, which means calculating the layers through which the training samples pass, and finally obtaining the prediction result. This prediction result is the task decomposition result obtained by decomposing the search task in the training samples (for ease of distinction, it can be called the second task decomposition result). Next, the task decomposition model can calculate the error loss between the prediction result and the true result (that is, the decomposition result obtained as a label from the search task in the training samples, which can be called the labeled decomposition result; this labeled task decomposition result contains at least one labeled decomposition step of the search task in the training samples, and the sub-task data corresponding to each labeled decomposition step). Further, the task decomposition model performs backpropagation, which means updating the parameters of each layer from the output layer to the input layer according to the gradient of the error loss. This process is implemented using the chain rule and gradient descent algorithm. This forward and backward propagation process is repeatedly performed on the training samples. Each iteration improves the model's performance, ultimately resulting in a pre-trained task decomposition model that meets the convergence criteria. The number of iterations during model pre-training can be set based on actual business needs; for example, it could be set to 5 iterations, and the learning rate could be set to 1. e -5.
[0125] Result Correction Component: For the pre-trained task decomposition model described above, this application can further optimize it by learning human preferences. Specifically, this application can randomly select multiple search tasks (e.g., the first search task), and then use the pre-trained task decomposition model to decompose each second search task, obtaining the task decomposition results for each second search task (such as the first task decomposition results). Afterwards, the result correction component can correct each first task decomposition result according to the task decomposition criteria to obtain the corrected first task results for each second search task. It is worth noting that for some second search tasks, the first task decomposition results output by the pre-trained task decomposition model already possess high accuracy and reasonableness; therefore, these first task decomposition results may not require correction. Based on this, this application can select the corrected first task decomposition results as data for further optimization of the task decomposition model.
[0126] Model Optimization Component: This component further optimizes the pre-trained task decomposition model using the DPO algorithm. For the first task decomposition result and the first task correction result, the component calculates the difference between them and updates the model parameters based on this difference. This process iterates repeatedly on the first task decomposition result and the first task correction result, improving model performance with each iteration until an optimized task decomposition model that meets the convergence criteria is obtained. The number of iterations for model optimization can be set based on actual business needs; for example, it could be set to 10 iterations, and the learning rate could be set to 1. e -5. This stage enables the task breakdown model to better understand and adapt to human preferences.
[0127] For details on the implementation of the model pre-training component, result correction component, and model optimization component, please refer to the relevant descriptions in the preceding sections. They will not be elaborated upon here, nor will their beneficial effects be discussed further.
[0128] Furthermore, to better understand the pre-training process of the task decomposition model provided in this application, the following explanation will be provided in conjunction with the accompanying drawings. Please refer to the attached figures. Figure 5 , Figure 5 This is a schematic diagram of the pre-training process of a task decomposition model provided in an embodiment of this application. This process can correspond to the above figure. Figure 2 In the corresponding embodiment, regarding the pre-training process of the task decomposition model, a pre-trained task decomposition model can be obtained through pre-training. For example... Figure 5 As shown, the process may include at least the following steps S501-S502:
[0129] Step S501: Obtain training samples; the training samples include task data of the second search task, at least one label execution step obtained by decomposing the second search task, and subtask data corresponding to each label execution step.
[0130] In this application, the specific implementation process for obtaining training samples may include, but is not limited to, the following: First, users who have performed search tasks within a historical time period can be selected as sample objects. The search tasks performed by the sample objects within the historical time period can be identified as historical search tasks or second search tasks. At least one second search task performed by the sample objects within the historical time period, as well as the task data of each second search task, can be obtained. For example, if a user has searched for "how to mix apples and bananas", "home-style recipe for spicy crayfish", and "how to make scallion oil noodles" within a historical time period, then it can be determined that the user has performed three search tasks within the historical time period. Each search task can be identified as a second search task, and the text data "how to mix apples and bananas", "home-style recipe for spicy crayfish", and "how to make scallion oil noodles" can be used as the task data of the corresponding second search tasks.
[0131] Further, after obtaining the task data of at least one second search task, data enrichment analysis processing can be performed on the task data of the at least one second search task to obtain a data enrichment result. The data enrichment result includes the core search tasks obtained by enrichment analysis of the at least one second search task, the task core words used to represent the core search tasks, and N associated task data corresponding to the core search tasks. The semantics of each associated task data is similar to the semantics of the task core words. N is a positive integer. The enrichment analysis processing in this application can refer to extracting valuable information or features from the task data of at least one second search task through a specific algorithm for subsequent data processing. Here, assuming that each historical task data is text data as an example, for the specific implementation process of performing data enrichment analysis processing on the task data of at least one second search task to obtain a data enrichment result, it can at least include but is not limited to: First, the data core words corresponding to the task data of at least one second search task can be obtained. Specifically, for the task data of each second search task, word segmentation processing can be performed on it. In this way, the word segmentation sets corresponding to each second search task can be obtained. For example, taking the task data of the historical search task as "home cooking method" as an example, after performing word segmentation processing on it, the words "home", "usual", "do", "method", "home cooking", "usually do", "cooking method", "home cooking do", "usual cooking method" can be obtained. These words can form the word segmentation set of the search task corresponding to the task data "home cooking method". After obtaining the word segmentation sets of each second search task, the union of these word segmentation sets can be taken, and thus the union of these word segmentation sets can be obtained. Further, the frequency of occurrence of each word in at least one word segmentation set (since the number of second search tasks is at least one, there are also at least one corresponding word segmentation sets) in the union can be counted (that is, for each word in the union, the number of word segmentation sets containing this word can be counted, and this number can be used as the frequency of occurrence of this word in at least one word segmentation set. For example, for a certain word in the union, in all the word segmentation sets, 6 word segmentation sets contain this word, then it can be considered that the frequency of occurrence of this word in each word segmentation set is 6). After obtaining the frequency of occurrence of each word in at least one word segmentation set in the union, the word with the highest frequency of occurrence can be determined as the data core word corresponding to the task data of the at least one second search task.
[0132] Furthermore, after obtaining the core data words corresponding to the task data of at least one second search task, Q core task data can be determined from the task data of at least one second search task using the core data words; Q is a positive integer. Specifically, based on the core data words, the task data of each second search task can be traversed. If the task data of a certain second search task contains the core data words, then the task data can be determined as the first type of core task data. For task data that does not contain the core data words, it can be determined as the remaining task data. In this application, the shortest first type of core task data can be obtained from the first type of core task data. Here, the data length can refer to the number of characters contained in the task data. The shortest first type of core task data can be called the shortest core task data. Based on the shortest core task data, second type core task data can be determined from the remaining task data. For example, the similarity between each remaining task data and the shortest core task data can be calculated. Then, the remaining task data with a similarity greater than the similarity threshold (the similarity threshold can be set based on actual business needs) can be selected as the second type of core task data. Then, both the first type of core task data and the second type of core task data can be identified as core task data, thus obtaining Q core task data.
[0133] It is worth noting that the similarity between two task data sets can be calculated using vector similarity. That is, the two task data sets can be first converted into vectors, and then the similarity between the two vectors can be calculated. The similarity between the two vectors can then be used to determine the similarity between the two task data sets. Of course, other methods can also be used to calculate the similarity between two task data sets. This application does not limit the specific method used to calculate the similarity between two task data sets. For example, the semantic similarity between the two task data sets can be calculated and used as the overall similarity between them.
[0134] After identifying Q core task data points, a pre-defined task identification model can be invoked to perform task identification processing on at least one second search task based on these Q core task data points. This yields the core search task and the core keyword corresponding to the core search task for each second search task. Specifically, after identifying the Q core task data points, they can be sorted according to the execution time of the sample objects from earliest to latest, resulting in a task data sequence. This task data sequence can then be input into the pre-defined task identification model, which can be a large model with task identification capabilities. Based on this task data sequence, the model can output a search task name corresponding to the task data sequence, as well as a core keyword corresponding to the search task name (this core keyword reflects the textual semantics of the search task name). The search task name output by the model can then be used as a core search task corresponding to the at least one second search task.
[0135] Furthermore, based on the semantics of the core words corresponding to the core search task, N related task data corresponding to the core search task can be retrieved from the database. Specifically, the semantic similarity between the task data of each search task in the database and the core words of that task can be calculated. Then, task data with a semantic similarity greater than the similarity threshold can be selected as related task data of the core search task.
[0136] After obtaining the associated task data, the core search task corresponding to at least one second search task, the core keywords corresponding to the core search task, and the N associated task data corresponding to the core search task can be assembled (e.g., spliced or aggregated into a set), thereby obtaining the data enrichment result. In summary, the data enrichment analysis in this application aims to analyze and extract the core search task, the core keywords corresponding to the core search task, and the N associated task data of the sample object within a historical time period, based on a large amount of historical search task data.
[0137] After obtaining the data enrichment results, the preceding language understanding model can be invoked to decompose the core search task based on the data enrichment results, thereby obtaining the second task decomposition result. Here, the language understanding model can refer to a large language model with task decomposition capabilities (e.g., the GPT4 model). Based on the data enrichment results, the second search task can be decomposed using this language understanding model, thereby obtaining a task decomposition result (which can be referred to as the second task decomposition result). Specifically, after obtaining the data enrichment results, this application can construct a decomposition prompt. Then, based on this decomposition prompt, it can request OpenAI's interface to call the language understanding model. The language understanding model can, based on the instructions of the decomposition prompt, divide the core search task into different decomposition execution steps and subtask data for each decomposition execution step. The task decomposition results output by the language understanding model can be used as the initial training labels for subsequent task decomposition models. At least one decomposition execution step obtained by decomposing the core search task contained in the task decomposition results can be called the initial label execution step, and the subtask data of the decomposition execution steps contained in the results can be called the subtask data corresponding to each initial label execution step.
[0138] Furthermore, based on the second task decomposition results, a second task correction result for the core search task can be obtained. This second task correction result includes at least one label execution step obtained after correction of the core search task, and the subtask data corresponding to each label execution step. As described above, this second task decomposition result can be pushed to a result correction object, which can then correct the second task decomposition result based on the task decomposition criteria to obtain the second task correction result. Assembling the data enrichment result with the second task correction result yields the training samples. For a clearer understanding of the specific process of generating training samples, please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of a training sample generation logic architecture provided in an embodiment of this application. For example... Figure 6 As shown, this logical architecture can only include a data enrichment component, a prompt word assembly component, a model request component, a result parsing component, and a result correction component. The functions implemented by each component will be briefly described below:
[0139] Data Enrichment Component: The data enrichment component can be used to obtain task data of at least one second search task performed by a sample object within a historical time period, and perform data enrichment analysis to obtain the data enrichment result. This data enrichment result includes the core search task corresponding to at least one second search task, the core keywords corresponding to the core search task, and N related task data associated with the core search task.
[0140] Prompt assembly component: The prompt assembly component can be used to design prompts based on the core search task in the data enrichment results, the core keywords of the core search task, and the N related task data associated with the core search task, so as to obtain the decomposed prompt.
[0141] Model Request Component: The Model Request Component can be used to invoke the interface of a pre-designed and assembled decomposition prompt request language understanding model (such as GPT4) to call the language understanding model.
[0142] Result parsing component: For the language understanding model mentioned above, task decomposition processing can be performed based on the decomposition prompt, and the decomposition results in JSON format will be output. The result parsing component can be used to extract the execution steps of each decomposition and the subtask data corresponding to each step from the model output results.
[0143] Result Correction Component: The result correction component can be used to correct the data of each step and the corresponding subtask extracted by the result parsing component, so as to ensure that each step and the corresponding subtask data are accurate and reasonable, and finally obtain the task correction result.
[0144] For details on the specific implementation methods of the above components, please refer to [link / reference]. Figure 5 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0145] Step S502: Use training samples to pre-train the task decomposition model to obtain the pre-trained task decomposition model.
[0146] In this application, after obtaining the training samples, a prompt can be designed based on the training samples to obtain a task prompt. This task prompt can then be input into a task decomposition model for pre-training. During pre-training of the task decomposition model, the SFT training mechanism can be used. Specifically, based on the task data of the core search task in the training samples, the task decomposition model can be invoked to decompose the core search task, thereby obtaining a third task decomposition result. This third task decomposition result includes at least one predicted decomposition execution step obtained from the decomposition of the core search task and the sub-task data corresponding to each predicted decomposition execution step. Then, based on the difference between at least one label execution step of the core search task and at least one predicted decomposition execution step of the core search task, and the difference between the sub-task data corresponding to each predicted decomposition execution step and the sub-task data corresponding to each label execution step, an error loss value can be calculated. Based on this error loss value, the task decomposition model can be trained and optimized, ultimately obtaining a pre-trained task decomposition model.
[0147] In this embodiment, the task decomposition model can be pre-trained using training samples, and then further optimized using the DPO mechanism to improve its decomposition performance. During the configuration of training samples, this application does not use manual annotation. Instead, it first utilizes the language understanding model's capabilities to generate a batch of task decomposition results, and then corrects them. This ensures that the decomposition style of each result is consistent and uniform, reduces the manual workload of annotation, improves annotation efficiency, thereby increasing sample generation efficiency and ultimately improving model training efficiency.
[0148] Based on the foregoing description, this application provides a task decomposition scheme for search tasks. First, the scheme collects task data of search tasks performed by sample objects within a historical time period, performs data enrichment processing to obtain enrichment results. Then, the scheme can call a pre-existing language understanding model to perform task decomposition processing, and the resulting task decomposition results can be used as initial labels. Further, these labels can be corrected to obtain final corrected task results, which can be used as final training labels. This process improves sample configuration efficiency. After obtaining training samples, the scheme can pre-train the task decomposition model based on the training samples and further optimize it using a DPO mechanism. This improves the accuracy and rationality of the decomposition results and optimizes the model's decomposition effect. Finally, the optimized task decomposition model can be used offline to calculate the decomposition results of each configured search task. The decomposition results of each configured search task can be used by users in subsequent search operations to improve search efficiency and enhance user experience.
[0149] Further, please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application. The data processing apparatus can be a computer program (including program code) running on a computer device; for example, the data processing apparatus is an application software. The data processing apparatus can be used to execute... Figure 3 The method shown. (As illustrated) Figure 7 As shown, the data processing device 1 may include: a data acquisition module 11, a disassembly module 12, a correction result acquisition module 13, and a model optimization module 14.
[0150] Data acquisition module 11 is used to acquire task data for the first search task;
[0151] The decomposition module 12 is used to call a pre-trained task decomposition model to decompose the first search task according to the task data of the first search task, and obtain the first task decomposition result. The first task decomposition result includes at least one decomposition execution step obtained by decomposing the first search task and the sub-task data corresponding to each decomposition execution step.
[0152] The correction result acquisition module 13 is used to acquire the first task correction result for the first search task based on the first task decomposition result; the first task correction result is obtained after correcting the first task decomposition result according to the task decomposition standard, and the first task correction result includes at least one labeled execution step obtained by the first search task after correction and the sub-task data corresponding to each labeled execution step;
[0153] The model optimization module 14 is used to optimize the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result, so as to obtain the optimized task decomposition model.
[0154] The specific implementation methods of the data acquisition module 11, the decomposition module 12, the correction result acquisition module 13, and the model optimization module 14 can be found in the above description. Figure 2 The descriptions of steps S201-S204 in the corresponding embodiments will not be repeated here.
[0155] In one embodiment, the data processing device 1 may further include a pre-training module 15, which is used to pre-train the task decomposition model to obtain a pre-trained task decomposition model.
[0156] The pre-training process of the pre-trained task decomposition model includes:
[0157] Obtain training samples; the training samples include task data of the core search task, at least one label execution step obtained by decomposing the core search task, and subtask data corresponding to each label execution step;
[0158] The task decomposition model is pre-trained using training samples to obtain the pre-trained task decomposition model.
[0159] For the specific implementation of the pre-training module 15, please refer to the above. Figure 5 The descriptions of steps S501-S502 in the corresponding embodiments will not be repeated here.
[0160] In one embodiment, the specific implementation of the pre-training module 15 acquiring training samples includes:
[0161] Obtain at least one second search task executed by the sample object within a historical time period, and the task data for each second search task;
[0162] Data enrichment analysis is performed on the task data of at least one second search task to obtain data enrichment results. The data enrichment results include the core search task obtained by enrichment analysis of at least one second search task, the core words of the task used to characterize the core search task, and N related task data corresponding to the core search task. The semantics of each related task data is similar to the semantics of the core words of the task. N is a positive integer.
[0163] Based on the data enrichment results, the preceding language understanding model is invoked to decompose the core search task, resulting in a second task decomposition result. The second task decomposition result includes at least one initial label execution step obtained from the decomposition of the core search task and the subtask data corresponding to each initial label execution step.
[0164] Based on the second task decomposition results, the second task correction results for the core search task are obtained; the second task correction results include at least one label execution step obtained by the core search task after correction and the sub-task data corresponding to each label execution step.
[0165] The data enrichment results are combined with the correction results from the second task to obtain training samples.
[0166] In one embodiment, each historical task data is text data;
[0167] The pre-training module 15 performs data enrichment analysis on the task data of at least one second search task to obtain the data enrichment results. Specific implementation methods include:
[0168] Obtain the core keywords corresponding to the task data of at least one second search task;
[0169] Using core keywords, identify Q core task data points from the task data of at least one second search task; Q is a positive integer.
[0170] Based on Q core task data, the preceding task recognition model is called to perform task recognition processing on at least one second search task, so as to obtain the core search task and the task core words corresponding to the core search task.
[0171] Based on the semantics of the core keywords corresponding to the core search task, retrieve the data of N related tasks corresponding to the core search task from the database;
[0172] The core search task corresponding to at least one second search task, the core keywords of the core search task, and the data of N related tasks corresponding to the core search task are assembled to obtain the data enrichment result.
[0173] In one embodiment, the specific implementation of the pre-training module 15 acquiring the core words corresponding to the task data of at least one second search task includes:
[0174] The task data for each second search task is segmented into words to obtain the word set corresponding to each second search task.
[0175] Obtain the union of the word segmentation sets corresponding to at least one search task;
[0176] The frequency of each word in at least one word set is statistically analyzed and collected, and the word with the highest frequency is identified as the core word corresponding to the task data of at least one second search task.
[0177] In one embodiment, the pre-training module 15 uses training samples to pre-train the task decomposition model, obtaining a specific implementation of the pre-trained task decomposition model, including:
[0178] Based on the task data of the core search task in the training samples, the task decomposition model is invoked to decompose the core search task and obtain the third task decomposition result. The third task decomposition result includes at least one predicted decomposition execution step obtained by decomposing the core search task and the sub-task data corresponding to each predicted decomposition execution step.
[0179] Based on the differences between at least one label execution step of the core search task and at least one prediction decomposition execution step of the core search task, as well as the differences between the subtask data corresponding to each prediction decomposition execution step and the subtask data corresponding to each label execution step, the task decomposition model is trained and optimized to obtain a pre-trained task decomposition model.
[0180] In one embodiment, the model optimization module 14 optimizes the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain an optimized task decomposition model, including:
[0181] Calculate the first error loss between at least one disassembly execution step in the first task disassembly result and at least one annotation execution step in the first task correction result;
[0182] Calculate the second error loss between the subtask data corresponding to each decomposition execution step in the first task decomposition result and the subtask data corresponding to each labeled execution step in the first task correction result;
[0183] Based on the first error loss and the second error loss, the model parameters of the pre-trained task decomposition model are optimized and adjusted to obtain the optimized task decomposition model.
[0184] In one embodiment, the specific implementation method of the correction result acquisition module 13 acquiring the first task correction result for the first search task based on the first task decomposition result includes:
[0185] The first task decomposition result is pushed to the result correction object. The result correction object corrects at least one decomposition execution step in the first task decomposition result according to the task decomposition standard. After obtaining at least one labeled execution step, the execution order of at least one labeled execution step is determined, and the corresponding subtask data is determined for each labeled execution step based on the subtask data corresponding to each decomposition execution step.
[0186] The received result correction object returns at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step;
[0187] The first task correction result is assembled by combining at least one annotation execution step, the execution order of at least one annotation execution step, and the subtask data corresponding to each annotation execution step.
[0188] In one embodiment, after the model optimization module 14 optimizes the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain an optimized task decomposition model, the model optimization module 14 is further specifically used for:
[0189] Retrieve the configuration task data set. A configuration task data in the configuration task data set refers to the task data of a configuration search task.
[0190] Based on each configuration task data, the optimized task decomposition model is invoked to decompose the configuration search task corresponding to each configuration task data, and the configuration decomposition result corresponding to each configuration search task is obtained. The configuration decomposition result corresponding to each configuration search task includes at least one configuration decomposition execution step corresponding to the configuration search task, and the subtask data corresponding to each configuration decomposition execution step.
[0191] The task data for each configuration search task is associated with the configuration breakdown results corresponding to each configuration search task and stored in the configuration library.
[0192] In one embodiment, the model optimization module 14 is further specifically used for:
[0193] Receive result query requests sent by terminal devices; the result query request is used to request the configuration breakdown results corresponding to the target task data. The target task data is the configuration task data determined from the configuration task data set based on the target search content, which is used to indicate the task requirements of the search task corresponding to the target search content; the target search content refers to the content entered by the search object in the search interface displayed on the terminal device; the result query request is sent by the terminal device after the target task data in the search interface is triggered.
[0194] The configuration breakdown results corresponding to the target task data are obtained from the configuration library and returned to the terminal device. The terminal device then displays the configuration breakdown results corresponding to the target task data in the search object.
[0195] In this embodiment, pre-training the task decomposition model using training samples enables it to decompose tasks. However, the decomposition results output by the pre-trained model may have problems (e.g., disordered logical order of execution steps, incomplete descriptions), and do not conform to human perception. To reduce this discrepancy and enhance the logic and standardization of the decomposition results, this solution introduces direct preference optimization technology. By employing human preference learning, the pre-trained task decomposition model is further optimized. Specifically, for the task decomposition results output by the pre-trained model, this solution will revise them again based on task decomposition standards (determined by human decomposition preferences). The order, logic, and description of the decomposition steps will be adjusted to obtain a revised task result. Then, this solution can directly perform preference optimization based on the revised task result, making the decomposition results of the task decomposition model more accurate and reasonable, with a clear sequence and logical consistency. In configuring training samples, this application does not use manual annotation. Instead, it first uses the language understanding model to generate a batch of task breakdown results, and then corrects them. This ensures that the breakdown style of each breakdown result is consistent and uniform, reduces the manual workload of the annotation object, improves annotation efficiency, thereby improving sample generation efficiency, and ultimately improves model training efficiency.
[0196] Further, please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 8As shown, the aforementioned computer device 8000 may include: a processor 8001, a network interface 8004, and a memory 8005. Furthermore, the computer device 8000 also includes: a user interface 8003, and at least one communication bus 8002. The communication bus 8002 is used to enable communication between these components. The user interface 8003 may include a display screen and a keyboard; optionally, the user interface 8003 may also include a standard wired interface or a wireless interface. The network interface 8004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 8005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 8005 may also be at least one storage device located remotely from the aforementioned processor 8001. Figure 8 As shown, the memory 8005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0197] exist Figure 8 In the computer device 8000 shown, the network interface 8004 provides network communication functionality; the user interface 8003 is mainly used to provide an input interface for the user; and the processor 8001 can be used to call the device control application program stored in the memory 8005 to achieve:
[0198] Obtain the task data for the first search task;
[0199] Based on the task data of the first search task, the pre-trained task decomposition model is invoked to decompose the first search task and obtain the first task decomposition result. The first task decomposition result includes at least one decomposition execution step obtained by decomposing the first search task and the subtask data corresponding to each decomposition execution step.
[0200] Based on the first task decomposition result, the first task correction result for the first search task is obtained; the first task correction result is obtained after correcting the first task decomposition result according to the task decomposition standard, and the first task correction result includes at least one labeled execution step obtained by the first search task after correction and the sub-task data corresponding to each labeled execution step.
[0201] Based on the difference between the first task decomposition result and the first task correction result, the pre-trained task decomposition model is optimized to obtain the optimized task decomposition model.
[0202] It should be understood that the computer device 8000 described in the embodiments of this application can execute the foregoing text. Figures 2 to 5The description of the data processing method in the corresponding embodiment can also be performed as described above. Figure 7 The description of the data processing apparatus 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0203] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the aforementioned data processing computer device 8000. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figures 2 to 5 The description of the data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.
[0204] The aforementioned computer-readable storage medium can be an internal storage unit of the data processing apparatus or computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0205] One aspect of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method provided in one aspect of the embodiments of this application.
[0206] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0207] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0208] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0209] The methods and related apparatuses provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
[0210] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: Obtain the task data for the first search task; Based on the task data of the first search task, a pre-trained task decomposition model is invoked to perform task decomposition processing on the first search task to obtain a first task decomposition result. The first task decomposition result includes at least one decomposition execution step obtained by decomposing the first search task and subtask data corresponding to each decomposition execution step. Based on the first task decomposition result, a first task correction result is obtained for the first search task; the first task correction result is obtained after correcting the first task decomposition result according to the task decomposition standard, and the first task correction result includes at least one labeled execution step obtained by the first search task after correction and subtask data corresponding to each labeled execution step. Based on the difference between the first task decomposition result and the first task correction result, the pre-trained task decomposition model is optimized to obtain an optimized task decomposition model.
2. The method according to claim 1, characterized in that, The pre-training process of the pre-trained task decomposition model includes: Obtain training samples; the training samples include task data of the core search task, at least one label execution step obtained by decomposing the core search task, and subtask data corresponding to each label execution step; The task decomposition model is pre-trained using the training samples to obtain the pre-trained task decomposition model.
3. The method according to claim 2, characterized in that, The acquisition of training samples includes: Obtain at least one second search task executed by the sample object within a historical time period, and task data for each second search task; The task data of the at least one second search task are subjected to data enrichment analysis to obtain data enrichment results. The data enrichment results include the core search task obtained by the enrichment analysis of the at least one second search task, the task core words used to characterize the core search task, and N related task data corresponding to the core search task. The semantics of each related task data is similar to the semantics of the task core words. N is a positive integer. Based on the data enrichment results, the preceding language understanding model is invoked to perform task decomposition processing on the core search task, resulting in a second task decomposition result. The second task decomposition result includes at least one initial label execution step obtained from the decomposition of the core search task and subtask data corresponding to each initial label execution step. Based on the second task decomposition result, a second task correction result is obtained for the core search task; the second task correction result includes at least one tag execution step obtained by the correction of the core search task and subtask data corresponding to each tag execution step. The data enrichment results are combined with the second task correction results to obtain training samples.
4. The method according to claim 3, characterized in that, Each of the historical task data is text data; The process of performing data enrichment analysis on the task data of the at least one second search task to obtain data enrichment results includes: Obtain the core keywords corresponding to the task data of the at least one second search task; Using the core keywords, Q core task data are determined from the task data of the at least one second search task; Q is a positive integer. Based on the Q core task data, the pre-defined task recognition model is invoked to perform task recognition processing on the at least one second search task to obtain the core search task corresponding to the at least one second search task and the task core words corresponding to the core search task. Based on the semantics of the core keywords corresponding to the core search task, retrieve N related task data corresponding to the core search task from the database; The core search task corresponding to the at least one second search task, the core keywords of the core search task, and the data of N related tasks corresponding to the core search task are assembled to obtain the data enrichment result.
5. The method according to claim 4, characterized in that, The acquisition of the core keywords corresponding to the task data of the at least one second search task includes: The task data for each second search task is segmented into words to obtain the word set corresponding to each second search task. Obtain the union of the word segmentation sets corresponding to the at least one search task; The frequency of each word in at least one word set is statistically analyzed and collected, and the word with the highest frequency is determined as the core word corresponding to the task data of the at least one second search task.
6. The method according to claim 2, characterized in that, The step of pre-training the task decomposition model using the training samples to obtain the pre-trained task decomposition model includes: Based on the task data of the core search task in the training samples, the task decomposition model is invoked to decompose the core search task and obtain a third task decomposition result. The third task decomposition result includes at least one predicted decomposition execution step obtained by decomposing the core search task and subtask data corresponding to each predicted decomposition execution step. Based on the differences between at least one label execution step of the core search task and at least one prediction decomposition execution step of the core search task, and the differences between the subtask data corresponding to each prediction decomposition execution step and the subtask data corresponding to each label execution step, the task decomposition model is trained and optimized to obtain the pre-trained task decomposition model.
7. The method according to claim 1, characterized in that, The step of optimizing the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain an optimized task decomposition model includes: Calculate the first error loss between the at least one disassembly execution step in the first task disassembly result and the at least one annotation execution step in the first task correction result; Calculate the second error loss between the subtask data corresponding to each of the decomposition execution steps in the first task decomposition result and the subtask data corresponding to each of the annotation execution steps in the first task correction result; Based on the first error loss and the second error loss, the model parameters of the pre-trained task decomposition model are optimized and adjusted to obtain an optimized task decomposition model.
8. The method according to claim 1, characterized in that, The step of obtaining a first task correction result for the first search task based on the first task decomposition result includes: The first task decomposition result is pushed to the result correction object, which corrects at least one decomposition execution step in the first task decomposition result according to the task decomposition standard to obtain at least one marked execution step. Then, the execution order of the at least one marked execution step is determined, and the corresponding subtask data is determined for each marked execution step based on the subtask data corresponding to each decomposition execution step. Receive the at least one annotation execution step, the execution order of the at least one annotation execution step, and the subtask data corresponding to each annotation execution step returned by the result correction object; The at least one annotation execution step, the execution order of the at least one annotation execution step, and the subtask data corresponding to each annotation execution step are assembled into a first task correction result.
9. The method according to claim 1, characterized in that, After optimizing the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result to obtain an optimized task decomposition model, the method further includes: Obtain a configuration task data set, wherein one configuration task data in the configuration task data set refers to the task data of a configuration search task; Based on each configuration task data, the optimized task decomposition model is invoked to perform task decomposition processing on the configuration search task corresponding to each configuration task data, so as to obtain the configuration decomposition result corresponding to each configuration search task; the configuration decomposition result corresponding to each configuration search task includes at least one configuration decomposition execution step corresponding to the configuration search task, and subtask data corresponding to each configuration decomposition execution step; The task data of each configuration search task is associated with the configuration decomposition result corresponding to each configuration search task and stored in the configuration library.
10. The method according to claim 9, characterized in that, The method further includes: The system receives a result query request from a terminal device. The result query request is used to request a query for the configuration breakdown result corresponding to the target task data. The target task data is configuration task data determined from the configuration task data set based on the target search content, used to indicate the task requirements of the search task corresponding to the target search content. The target search content refers to the content entered by the search object in the search interface displayed on the terminal device. The result query request is sent by the terminal device after the target task data in the search interface is triggered. The configuration breakdown result corresponding to the target task data is obtained from the configuration library and returned to the terminal device, which then displays the configuration breakdown result corresponding to the target task data in the search object.
11. A data processing apparatus, characterized in that, The device includes: The data acquisition module is used to acquire the task data for the first search task; The decomposition module is used to call a pre-trained task decomposition model to decompose the first search task according to the task data of the first search task, and obtain the first task decomposition result. The task decomposition result includes at least one decomposition execution step obtained by decomposing the first search task and subtask data corresponding to each decomposition execution step. The correction result acquisition module is used to acquire a first task correction result for the first search task based on the first task decomposition result; the first task correction result is obtained after correcting the first task decomposition result according to the task decomposition standard, and the first task correction result includes at least one labeled execution step obtained by the first search task after correction and subtask data corresponding to each labeled execution step. The model optimization module is used to optimize the pre-trained task decomposition model based on the difference between the first task decomposition result and the first task correction result, so as to obtain an optimized task decomposition model.
12. A computer device, characterized in that, include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide network communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs to cause the computer device to execute the method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and to execute the method according to any one of claims 1-10.
14. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, the computer program being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-10.