Task processing method, virtual character dialogue method, computing device, computer readable storage medium and computer program product
By using key information and fragment division technology of historical task data in large models, the problem of insufficient memory capacity of large models in task processing and multi-round dialogues is solved, and the quality and personalization of task processing and dialogue responses are improved.
Patent Information
- Application Number
- CN202410635204.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-08-30
AI Technical Summary
Large models lack long-term memory capabilities when processing tasks, resulting in poor performance in multi-round conversations and complex task processing, and are unable to effectively memorize users' historical information and preferences.
By obtaining the historical task data of the target task, perform key information extraction and data fragment division, filter out the target key data, and input it with the reference task data into the task processing model, using the target key data as long-term memory and the reference task data as short-term memory. , guiding the model to generate coherent processing results.
Improves the quality of task processing results and personalization of conversation responses, ensuring that the model remembers previous task processing preferences and user information to provide more accurate and contextual responses.
Smart Images

Figure CN118569269A
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a task processing method, a virtual character dialogue method, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of computer technology, large models have begun to shine, showing extraordinary capabilities in language understanding, generation, interaction and reasoning, and are widely used in natural language processing fields such as dialogue, translation, and code generation. However, large models are designed to process and generate text and do not save historical information about interactions, which limits their capabilities.
[0003] Currently, historical conversation records are usually used in the model's "context window" to give the model a certain memory capacity. However, the size of the context window of a large model is usually limited, and the context length that exceeds the model context window will be discarded. These discarded contexts may include valid information, resulting in poor task processing quality for large models. Therefore, a high-quality task processing solution is urgently needed. Summary of the invention
[0004] In view of this, an embodiment of the present specification provides a task processing method. One or more embodiments of the present specification also relate to a virtual character dialogue device, a task processing device, a virtual character dialogue device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a task processing method is provided, including:
[0006] Get the task data of the target task;
[0007] According to the task data, target key data is screened out from the key task data of the target task, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the target task;
[0008] The task data, target key data and reference task data are input into the task processing model to obtain the task processing result of the target task, wherein the reference task data refers to the historical task data that is coherent with the task data.
[0009] According to a second aspect of the embodiments of this specification, a virtual character dialogue method is provided, comprising:
[0010] Get the task data of the virtual character dialogue task;
[0011] According to the task data, target key data is screened out from the key task data of the virtual character dialogue task, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the virtual character dialogue task;
[0012] The task data, target key data and reference task data are input into the task processing model to obtain the dialogue response result of the virtual character dialogue task, wherein the reference task data refers to the historical task data that is coherent with the task data.
[0013] According to a third aspect of an embodiment of this specification, there is provided a task processing device, including:
[0014] A first acquisition module is configured to acquire task data of a target task;
[0015] A first screening module is configured to screen target key data from the key task data of the target task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the target task;
[0016] The first input module is configured to input task data, target key data and reference task data into the task processing model to obtain the task processing result of the target task, wherein the reference task data refers to historical task data that is coherent with the task data.
[0017] According to a fourth aspect of the embodiments of this specification, a virtual character dialogue device is provided, comprising:
[0018] A second acquisition module is configured to acquire task data of a virtual character dialogue task;
[0019] The second screening module is configured to screen out target key data from key task data of the virtual character dialogue task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from historical task data of the virtual character dialogue task;
[0020] The second input module is configured to input task data, target key data and reference task data into the task processing model to obtain the dialogue response result of the virtual character dialogue task, wherein the reference task data refers to the historical task data that is consistent with the task data.
[0021] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:
[0022] Memory and processor;
[0023] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0024] According to the sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0025] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the method provided in the first aspect or the second aspect above.
[0026] A task processing method provided by an embodiment of the present specification includes: obtaining task data of a target task; filtering out target key data from key task data of the target task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from historical task data of the target task; inputting the task data, target key data and reference task data into a task processing model to obtain a task processing result of the target task, wherein the reference task data refers to historical task data that is coherent with the task data. When the task processing model processes the task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate task processing results that are coherent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous task processing preferences, thereby improving the quality of the task processing results. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is an architecture diagram of a task processing system provided by an embodiment of this specification;
[0028] Figure 2 is an architecture diagram of another task processing system provided by an embodiment of this specification;
[0029] Figure 3 is a flowchart of a task processing method provided by an embodiment of this specification;
[0030] Figure 4 is a data storage flow chart in a task processing method provided by an embodiment of this specification;
[0031] Figure 5 is a flow chart of a virtual character dialogue method provided by an embodiment of this specification;
[0032] Figure 6 is a flowchart of a processing process of a virtual character dialogue method provided by an embodiment of this specification;
[0033] Figure 7 This is a schematic diagram of a task processing interface provided by an embodiment of this specification;
[0034] Figure 8 is a structural diagram of a task processing device provided by an embodiment of this specification;
[0035] Fig. 9 It is a structural diagram of a virtual character dialogue device provided by an embodiment of this specification;
[0036] Fig.10 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0037] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0038] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0039] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0040] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0041] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model (Foundation Model 1). The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM, Large Language Model 1), a multi-modal pre-training model (multi-modal pre-training model 1), etc.
[0042] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image description (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0043] First, the terms involved in one or more embodiments of this specification are explained.
[0044] Conversational context: refers to the content and information of earlier interactions in a series of conversational interactions. This includes previous conversational turns, questions, answers, and any related guidance or constraints.
[0045] Long-term memory: Long-term memory is in contrast to short-term memory or working memory, which can only last from a few seconds to a few minutes and has a limited capacity. The long-term memory in the embodiments of this specification mainly refers to key information in historical task data, such as memory about personal experiences and specific events.
[0046] Deep Self-Attention (Transformer) Model: It is a deep learning architecture based on the attention mechanism, mainly used to process sequence data. The Transformer model consists of a series of encoders and decoders that can be repeatedly stacked. This design allows the Transformer to efficiently learn long-term dependencies and is suitable for a variety of natural language processing tasks including machine translation, text summarization, question-answering systems, etc.
[0047] Bidirectional Encoder Representations from Transformers (BERT) is a natural language processing (NLP) pre-training model. By learning a large amount of unlabeled text data, the model can capture the deep semantic information in the text and achieve significant performance improvements on many NLP tasks.
[0048] Large-scale language models can be applied to a variety of scenarios and fields due to their broad knowledge base and strong understanding capabilities, such as natural language understanding and generation, providing customer support as a chat machine, entertainment interaction, or personal assistant services. However, large-scale language models do not have the ability of "long-term memory" in the traditional sense. These models are designed to process and generate text, and they do not save historical information about individual interactions.
[0049] Currently, there are two solutions to enable the model to have specific memory capabilities. The first is parameterized knowledge: by pre-training the model on a large-scale dataset, the model learns to "remember" a wide range of information and knowledge. This knowledge is encoded through the model's weights, learned during the training process, and permanently preserved as the model is used, and can be used to answer questions or participate in conversations. The second is contextual memory: when processing a long text or a series of coherent conversations, the model is able to maintain memory within its "context window". This means that the model can refer to and use information presented in previous sentences or conversations. For Transformer-based models, the size of this context window is usually limited, depending on the model's "attention" mechanism. However, in the first solution, new knowledge needs to be continuously updated through iterative training on the model, and the training cost is high and the cycle is long, and new messages cannot be obtained quickly. In the second solution, the model has a length limit for the input of the context, and the historical conversation content cannot be maintained after multiple rounds of chat. Taking a one-to-one communication scenario as an example, historical conversation records are used in the conversation context to enable the model to have a certain memory ability, but the chatter's specific user information, preferences, or events that occurred at a specific time will be discarded because the chat exceeds the context length specified by the model.
[0050] In order to solve the above problems, the embodiments of this specification propose a solution that can enable a large-scale language model to have personalized memory, so that the model can remember the user's preferences and habits, and use the model to provide users with more personalized services.
[0051] Specifically, the embodiment of this specification proposes a task processing method, including: obtaining task data of a target task; based on the task data, screening out target key data from the key task data of the target task, wherein the key task data is data obtained by extracting key information and dividing the historical task data of the target task into data segments; inputting the task data, target key data and reference task data into a task processing model to obtain a task processing result of the target task, wherein the reference task data refers to historical task data that is coherent with the task data. When the task processing model processes the task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate task processing results that are coherent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers the previous task processing preferences, thereby improving the quality of the task processing results.
[0052] In this specification, a task processing method is provided. This specification also relates to a virtual character dialogue device, a task processing device, a virtual character dialogue device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0053] See also Figure 1 , Figure 1 An architecture diagram of a task processing system provided by an embodiment of the present specification is shown, and the task processing system may include a client 100 and a server 200;
[0054] The client 100 is used to send task data of the target task to the server 200;
[0055] The server 200 is used to filter out target key data from the key task data of the target task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the target task; input the task data, the target key data and the reference task data into the task processing model to obtain the task processing result of the target task, wherein the reference task data refers to the historical task data that is coherent with the task data; and send the task processing result of the target task to the client 100;
[0056] The client 100 is also used to receive the task processing result of the target task sent by the server 200.
[0057] By applying the solution of the embodiments of this specification, when the task processing model processes task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate task processing results that are consistent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous task processing preferences, thereby improving the quality of task processing results.
[0058] See also Figure 2 , Figure 2 The architecture diagram of another task processing system provided by an embodiment of the present specification is shown, and the task processing system may include multiple clients 100 and a server 200. Multiple clients 100 may establish a communication connection through the server 200. In the task processing scenario, the server 200 is used to provide task processing services between multiple clients 100. Multiple clients 100 may respectively serve as a sending end or a receiving end, and realize communication through the server 200.
[0059] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the task processing scenario, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates a task processing result based on the data stream and pushes the task processing result to other clients that have established communication.
[0060] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.
[0061] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0062] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content De l ivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0063] It is worth noting that the task processing method provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the task processing method provided in the embodiments of this specification. In other embodiments, the task processing method provided in the embodiments of this specification may also be jointly executed by the client and the server.
[0064] See also Figure 3 , Figure 3 A flowchart of a task processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps:
[0065] Step 302: Obtain task data of the target task.
[0066] Specifically, the target tasks can be tasks in different scenarios, such as tasks in emotional companionship scenarios, tasks in love and friendship scenarios, tasks in cute pet cultivation scenarios, tasks in educational service scenarios, and so on. The target tasks can be different types of tasks, such as intelligent question-and-answer tasks, summary extraction tasks, dialogue tasks, and so on. The task data can be data in text mode or data in non-text mode, such as image data, voice data, video data, and so on. In the case where the task data is in non-text mode, the task data can be modally converted to obtain task data in text mode. Among them, the modal conversion methods include audio conversion, image recognition, and so on.
[0067] In practical applications, there are many ways to obtain the task data of the target task, which can be selected according to the actual situation, and the embodiments of this specification do not limit this. In one possible implementation of this specification, the task data of the target task sent by the user through the client can be received. In another possible implementation of this specification, the task data of the target task can be read from other data acquisition devices or databases.
[0068] Step 304: Filter out target key data from the key task data of the target task according to the task data, wherein the key task data is data obtained by extracting key information and dividing the historical task data of the target task into data segments.
[0069] Specifically, the historical task data of the target task refers to the data generated by the target task during the historical processing, such as conversation history data. Key task data refers to the core part of the historical task data, such as personal experience, specific events, user preferences, user information, user emotions, etc. Since the key task data is extracted from the long-term historical task data of the target task, the key task data can be understood as long-term memory. Target key data refers to the data in the key task data that has a high similarity with the task data of the target task. Since the key task data includes key task information and multiple historical fragment data, the target key data includes the target key task (summary) information and the target historical fragment (hi story) data that have a high similarity with the task data.
[0070] In practical applications, there are many ways to filter out target key data from the key task data of the target task based on the task data, and the selection is made according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the similarity between the task data and the key task data can be calculated, and the key task data with a similarity greater than a preset similarity threshold can be determined as the target key data, wherein the similarity can be determined by calculation methods such as cosine similarity and Euclidean distance. In another possible implementation of this specification, keyword extraction can be performed on the task data and the key task data respectively, and the first keyword in the task data and the second keyword in the key task data can be obtained, and the word similarity between the first keyword and the second keyword can be calculated, and the key task data with a word similarity greater than a preset similarity threshold can be determined as the target key data, wherein the preset similarity threshold is specifically set according to the actual situation, and the embodiments of this specification do not impose any restrictions on this.
[0071] In an optional embodiment of the present specification, before filtering out the target key data from the key task data of the target task according to the task data, the key task data of the target task may be determined first, that is, before filtering out the target key data from the key task data of the target task according to the task data, the following steps may also be included:
[0072] Obtain historical task data of the target task;
[0073] Extract key information from historical task data to obtain key task information of the target task, and divide the historical task data into data segments to obtain multiple historical segment data;
[0074] Determine the key task data of the target task based on the key task information and multiple historical fragment data.
[0075] Specifically, historical task data refers to task data generated during the historical processing of the target task. If the target task is a dialogue task, the historical task data is the dialogue data historically generated between the dialogue objects. Key information extraction refers to the operation method of extracting key task information from historical task data. The methods of key information extraction include but are not limited to summary extraction, keyword extraction, and data subject extraction. Data segmentation refers to the operation method of dividing historical task data into multiple historical segment data. The methods of data segmentation include but are not limited to division based on a preset data length (such as 200 characters) and division based on a preset duration (such as 5 minutes), wherein the preset data length and the preset duration are selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this.
[0076] It should be noted that there are multiple ways to obtain the historical task data of the target task, which can be selected according to the actual situation, and the embodiments of this specification do not limit this. In one possible implementation of this specification, the historical task data of the target task can be read from a database or other data acquisition device. In another possible implementation of this specification, the historical task data of the target task sent by the user can be received.
[0077] In practical applications, when extracting key information from historical task data, key information extraction can be performed once for all historical task data to obtain key task information of the target task; key information extraction can also be performed multiple times on historical task data according to preset rounds, for example, key information extraction is performed once every 10 rounds of historical task data, and key task information of the target task is obtained after multiple key information extractions. When data segmentation is performed on historical task data, data segmentation can be performed once for all historical task data to obtain multiple historical segment data. There are many ways to extract key information from historical task data to obtain key task information of the target task, which can be selected according to actual conditions, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, historical task data can be input into a task processing model to extract key information to obtain key task information of the target task. In another possible implementation of this specification, key task information can be extracted using extraction rules constructed artificially based on prior knowledge, wherein the extraction rules, such as extracting keywords whose word frequency exceeds a preset word frequency threshold, are used as key task information.
[0078] Furthermore, key information is extracted from historical task data to obtain key task information of the target task, and the historical task data is divided into data segments. After obtaining multiple historical segment data, the key task information and multiple historical segment data can be merged to obtain the key task data of the target task.
[0079] By applying the solution of the embodiments of the present specification, by determining the key task data of the target task, the key task information corresponding to the task data can be determined, so that the long-term memory corresponding to the task data can be extracted for the model based on the key task information, making the model processing results more accurate, and by storing the complete historical task data according to the data segments, the historical segment data corresponding to the task data can be determined later, thereby providing the model with the complete context of the data segment, making the model processing results and the context more coherent, and at the same time, because the historical segment data corresponding to the task data is determined, the length of the model input sequence is effectively reduced, ensuring that the model can perform task processing normally.
[0080] In an optional embodiment of the present specification, after obtaining the key task data of the target task, the key task data can be stored so that the target key data corresponding to the task data can be retrieved from the key task data during subsequent task processing. That is, after determining the key task data of the target task based on the key task information and the plurality of historical fragment data, the following steps can also be included:
[0081] Extract features from key mission data to obtain key data features of the key mission data;
[0082] The mission-critical data and key data characteristics are stored in the data storage unit.
[0083] Specifically, feature extraction refers to learning key data features that can capture semantic information and contextual dependencies from key task data through neural networks, matrix decomposition or other machine learning methods. Key data features refer to embedded features that play a decisive role in predicting model performance, task understanding or goal achievement after feature extraction. Data storage unit refers to a physical space with data storage function. Data storage units include but are not limited to relational database service (RDS, Relative Database Service) database, distributed full-text search engine (ES, Elasticsearch), and are selected according to actual conditions. This specification embodiment does not make any restrictions on this.
[0084] In practical applications, after obtaining the key mission data, in the first possible implementation of this specification, only the key mission data may be stored in the data storage unit, and when the target key data is subsequently screened, only the mission data and the key mission data in the data storage unit are used for comparison and screening. In the second possible implementation of this specification, feature extraction may be performed on the key mission data to obtain key data features, and only the key data features may be stored in the data storage unit, and when the target key data is subsequently screened, only the task data features of the task data and the key mission features in the data storage unit are used for comparison and screening. In the third possible implementation of this specification, the key mission data and the key data features may be stored in the data storage unit at the same time, and when the target key data is subsequently screened, the target key data may be determined jointly based on the results of the feature comparison screening and the results of the data comparison screening.
[0085] It should be noted that when storing key task data and / or key data features in a data storage unit, assuming that the RDS database is used as the data storage unit, the key task data and / or key data features can be directly stored in the database. Assuming that the ES search engine is used as the data storage unit, the key task data and / or key data features can be first stored in the RDS database, and the data in the RDS database can be stored in the ES search engine at regular intervals, so that the ES search engine can be used to directly filter out the target key data corresponding to the task data from the key task data of the target task.
[0086] By applying the solution of the embodiment of this specification, feature extraction is performed on the key task data to obtain the key data features of the key task data; the key task data and the key data features are stored in the data storage unit. By storing the key task data and the key data features, the target key data can be determined by combining the data comparison results and the feature comparison results in the future, thereby improving the accuracy of the target key data.
[0087] See also Figure 4 , Figure 4 A data storage flow chart in a task processing method provided by an embodiment of the present specification is shown. Taking the task processing method in the virtual character dialogue scene as an example, after the virtual character dialogue begins, the dialogue data can be obtained to determine whether the dialogue data has reached the preset dialogue round (such as whether it has reached 10 rounds). If not, return to continue to obtain the dialogue data; if so, the acquired dialogue data is used as the historical task data to start long-term memory extraction. In the long-term memory extraction process, key information can be extracted and data segments can be divided from the historical task data to obtain key task data, and the long-term memory extraction process is ended. After obtaining the key task data, the key task data can be written into the RDS database. Furthermore, the data stored in the RDS database can be searched and a scheduled task can be constructed to determine whether there is unprocessed data in the RDS database. If so, the unprocessed data is stored in the ES search engine, wherein the scheduled task refers to a task that regularly stores unprocessed data in the ES search engine, and the unprocessed data refers to data in the RDS database that is not stored in the ES search engine.
[0088] The solution of the embodiments of this specification is applied. By extracting key information and dividing the data into segments from the conversation data generated by the conversation between virtual characters, the data is stored in the ES search engine in a specified format (key task data and / or key data features). When the virtual characters are conversing, in addition to writing the reference task data into the model input, the task data can also be used to recall related memory segments (target key data) from the ES search engine for input supplement, thereby effectively enhancing the model's memory of the user.
[0089] In an optional embodiment of the present specification, the above-mentioned filtering out target key data from the key task data of the target task according to the task data may include the following steps:
[0090] Comparing the task data with the key task data to determine the data comparison result; screening out the target key data from the data storage unit according to the data comparison result; and / or,
[0091] Perform feature extraction on task data to obtain task data features; compare task data features with key data features to determine feature comparison results; and filter out target key data from the data storage unit based on the feature comparison results.
[0092] Specifically, the data comparison result is used to describe the data similarity between the task data and the key task data. The feature comparison result is used to describe the feature similarity between the task data features and the key data features.
[0093] In practical applications, when the target key data is screened out from the data storage unit according to the data comparison result, the key task data whose data similarity with the task data is greater than a preset similarity threshold can be determined as the target key data. When the target key data is screened out from the data storage unit according to the feature comparison result, the key task data corresponding to the key task feature whose feature similarity with the task data feature is greater than a preset similarity threshold can be determined as the target key data.
[0094] It should be noted that if the data comparison results and feature comparison results are used simultaneously to screen out the target key data, the data similarity and feature similarity can be weighted, and the target key data can be determined based on the weighted results and a preset similarity threshold.
[0095] By applying the solution of the embodiments of this specification, the target key data is determined by using the data comparison results and / or feature comparison results, and the target key data determination process is made more flexible while ensuring the accuracy of the target key data.
[0096] Step 306: Input the task data, target key data and reference task data into the task processing model to obtain the task processing result of the target task, wherein the reference task data refers to the historical task data that is consistent with the task data.
[0097] Specifically, reference task data refers to historical task data that is coherent with the task data, and the coherence here can be understood as contextual coherence or temporal coherence. Reference task data can be extracted from historical task data based on reference time. Reference time can be obtained based on a preset duration or a preset processing round. Before inputting task data, target key data and reference task data into the task processing model, reference task data that is coherent with the task data can be extracted from the historical task data. For example, if the preset duration is 5 minutes and the current time is 12:20, then the reference time is 12:15, and the data in the historical task data after 12:15 can be determined as reference task data. For another example, if the preset processing round is 100 rounds, the data of 100 rounds before the current processing round is located, and the time of the data is determined as the reference time, and the data in the historical task data after the reference time is determined as reference task data. Short-term data that is coherent with the task data can be extracted from the historical task data through reference task data. Therefore, compared with key task data, reference task data can be understood as short-term memory.
[0098] The task processing model can be a large model or a deep learning model trained based on training data and training labels corresponding to the training data. Task processing models include but are not limited to Transformer models and BERT models. The task processing result is related to the target task. For example, if the target task is a summary extraction task, the task processing result is a summary of the long text; if the target task is a question-answering task, the task processing result is the answer to the question.
[0099] It should be noted that the task processing model includes an encoding unit and a decoding unit. The task data, target key data and reference task data are input into the task processing model. First, the encoding unit captures the complex dependencies between the elements in the model input data through the self-attention mechanism, and converts the model input data into a high-level semantic embedding representation layer by layer to obtain the encoding vector. Then, the decoding unit gradually decodes the encoding vector provided by the encoding unit through the self-attention mechanism and the mask mechanism to obtain the task processing result.
[0100] By applying the solution of the embodiments of this specification, when the task processing model processes task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate task processing results that are consistent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous task processing preferences, thereby improving the quality of task processing results.
[0101] In practical applications, the task data, target key data and reference task data are input into the task processing model, and the task processing model can be used to directly process the task to obtain the task processing result of the target task. The task processing model can also be used to first perform intent recognition, and then the task intent obtained by intent recognition is used as the input of the task processing model, combined with the task data, target key data and reference task data. The task processing model is then used again to perform task processing to obtain the task processing result of the target task.
[0102] In an optional embodiment of the present specification, the above-mentioned inputting the task data, the target key data and the reference task data into the task processing model to obtain the task processing result of the target task may include the following steps:
[0103] Inputting task data, target key data and reference task data into the task processing model for intention recognition to obtain the task intention of the target task;
[0104] The task intention, task data, target key data and reference task data are input into the task processing model for task processing to obtain the task processing result of the target task.
[0105] Specifically, the purpose of intent recognition is to understand the intention or purpose expressed by the task data, which can also be understood as the result of model thinking. Through intent recognition, the task intent including intent information and intent feedback information can be determined from the task data. The intent information is used to describe the task purpose of the task data, and the intent feedback information is the initial processing result corresponding to the intent information. For example, the task data is "Do you remember my name?", the task intent is "The user asked his name", and the intent feedback information is "Based on previous related memories, the user mentioned that his name is A". Therefore, the task intent is "The user asked his name, and based on previous related memories, the user mentioned that his name is A", and the task processing result is "Of course I know, your name is A".
[0106] By applying the solution of the embodiments of this specification, the task processing process is divided into two stages by utilizing the task processing model for intent recognition and task processing. In the intent recognition stage, the model performs self-evaluation to exclude irrelevant memories in the target key data and reference task data, thereby making the model processing process more accurate and improving the accuracy of the task processing results.
[0107] In an optional embodiment of the present specification, since the input length of the model is usually limited, it is possible to determine whether the input of the model meets the model processing conditions before the model is processed. That is, before the task data, target key data and reference task data are input into the task processing model and the task processing result of the target task is obtained, the following steps may be further included:
[0108] Determine the input sequence length of the task processing model based on the task data, target key data and reference task data;
[0109] When the input sequence length does not meet the model processing conditions, the reference task data is adjusted until the input sequence length meets the model processing conditions, thereby obtaining the adjusted reference task data;
[0110] Inputting task data, target key data and reference task data into the task processing model to obtain the task processing result of the target task may include the following steps:
[0111] The task data, target key data and adjusted reference task data are input into the task processing model to obtain the task processing result of the target task.
[0112] Specifically, the input sequence length refers to the length of the model input sequence obtained by combining the task data, target key data and reference task data of the input model. The model processing condition includes the model input length condition. For example, the model input length condition is that the input sequence length is less than or equal to 4000. Assuming that the input sequence length is 3000, it means that the input sequence length meets the model processing condition. Assuming that the input sequence length is 4500, it means that the input sequence length does not meet the model processing condition.
[0113] In practical applications, when the input sequence length meets the model processing conditions, it means that the task processing model will not discard the data in the model input sequence, and the model input sequence can be directly processed. Therefore, the task data, target key data and reference task data can be directly input into the task processing model to obtain the task processing result of the target task. When the input sequence length does not meet the model processing conditions, it means that the task processing model may discard the data in the model input sequence. At this time, in order to ensure the accuracy of task processing, the model input sequence can be trimmed. When trimming the model input sequence, since the task data represents the task processing content and the target key data is the long-term memory including key information, both directly affect the accuracy of the task processing result, and the introduction of the reference task data is mainly to ensure the consistency of the task processing result with the task context, which has little effect on the accuracy of the task processing result. Therefore, the reference task data can be trimmed, that is, the reference task data can be adjusted until the input sequence length meets the model processing conditions to obtain the adjusted reference task data, and the task data, target key data and adjusted reference task data are input into the task processing model to obtain the task processing result of the target task.
[0114] It should be noted that when adjusting the reference task data, the earlier data in the reference task data can be deleted because the data that is far away from the current task processing stage has a lower impact on the contextual coherence of the task processing results.
[0115] By applying the solution of the embodiment of this specification, by adjusting the reference task data, the task data, the target key data and the adjusted reference task data are input into the task processing model to obtain the task processing result of the target task, thereby avoiding the loss of input content of the task processing model due to the excessively long model input sequence, and ensuring the accuracy of the task processing process.
[0116] In an optional embodiment of the present specification, after inputting the task data, target key data and reference task data into the task processing model and obtaining the task processing result of the target task, the following steps may also be included:
[0117] Send the task processing results to the client;
[0118] Receive result feedback information sent by the client, wherein the result feedback information is information providing feedback on the task processing result based on the task information of the target task;
[0119] Based on the feedback information from the results, build a model to optimize the data;
[0120] Use model optimization data to adjust parameters of the task processing model.
[0121] Specifically, task information refers to the attribute information of the target task, such as task objectives, task types, task intentions, etc. Result feedback information can be information that provides feedback on the content, quality, and completion of task processing results, reflecting the user's true feelings and expectations of task processing results. Result feedback information includes but is not limited to result quality evaluation information, corrected accurate task processing results, and model optimization areas. Model optimization data refers to accurate optimization sample data used to optimize the task processing model.
[0122] In practical applications, there are many ways to construct model optimization data based on the result feedback information, which are selected according to the actual situation. The embodiments of this specification do not limit this. In one possible implementation of this specification, the model optimization data can be automatically constructed directly based on the result feedback information. In another possible implementation of this specification, optimization prompt information can be generated based on the result feedback information, and the model optimization data sent by the client based on the optimization prompt information can be received.
[0123] It should be noted that, taking the construction of model optimization data directly based on the result feedback information as an example, if the result feedback information is the corrected and accurate task processing result, the model optimization data can be constructed based on the task data of the target task and the corrected and accurate task processing result. If the result feedback information is the optimization field of the model, such as the XXX field, the sample data of the XXX field can be obtained, and the sample data of the XXX field can be determined as the model optimization data. Among them, the process of adjusting the parameters of the task processing model using the model optimization data can be supervised fine-tuning (SFT, Supervised Fine-Tun ing).
[0124] By applying the solution of the embodiments of this specification, the performance of the task processing model is continuously optimized by collecting and utilizing result feedback information to more accurately meet the actual needs of users and improve the quality and accuracy of the final task processing results.
[0125] In an optional embodiment of the present specification, the above-mentioned construction of model optimization data according to the result feedback information may include the following steps:
[0126] Generate optimization prompt information according to the result feedback information, wherein the optimization prompt information is used to guide the client to send model optimization data for optimizing the task processing model;
[0127] The optimization prompt information is sent to the client, and the model optimization data sent by the client based on the optimization prompt information is received.
[0128] It should be noted that there are multiple ways to generate optimization prompt information based on the result feedback information, and the specific selection is based on the actual situation. The embodiments of this specification do not impose any limitation on this.
[0129] In a possible implementation of this specification, the preset prompt information can be directly obtained, and the result feedback information can be added to the preset prompt information to obtain the optimized prompt information. For example, the preset prompt information is "I am very sorry for giving you inaccurate information. Please point out where the information is not accurate or provide the correct results of the relevant questions. I will correct and optimize my answers as soon as possible to better serve you." If the result feedback information is "the result is inaccurate", the optimized prompt information is "Regarding the inaccurate results you reported, I am very sorry for giving you inaccurate information. Please point out where the information is not accurate or provide the correct results of the relevant questions. I will correct and optimize my answers as soon as possible to better serve you."
[0130] In another possible implementation of the present specification, the result feedback information may be type identified to determine the information type of the result feedback information, further match the information type with the prompt type of each prompt information in the prompt information library, and determine the prompt information with the same prompt type as the information type as the optimized prompt information.
[0131] By applying the solution of the embodiments of this specification, model optimization data is obtained through an interactive guidance method, which improves the interactivity with users and further improves user satisfaction.
[0132] In an optional embodiment of the present specification, after inputting the task data, target key data and reference task data into the task processing model and obtaining the task processing result of the target task, the following steps may also be included:
[0133] Mark the key information in the task processing results to obtain the marked task processing results;
[0134] Send the marked task processing results to the client.
[0135] Specifically, key information refers to the content in the task processing results that helps users understand the main idea of the results, capture the core ideas, and identify important facts or details that are of decisive significance. This information is usually the core component of the task processing results. The key information in the task processing results includes but is not limited to keywords, topics, and entities, which are selected according to actual conditions, and this specification embodiment does not make any limitation on this.
[0136] In practical applications, the key information in the task processing results is annotated. Before obtaining the annotated task processing results, the key information of the task processing results can be identified to determine the key information in the task processing results. There are many ways to identify the key information of the task processing results, which are selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the task processing results can be matched with preset key information, and the information that appears in the task processing results and is the same as the preset key information is determined as key information. In another possible implementation of this specification, the task processing results can be input into a key information identification model to obtain key information, wherein the key information identification model is trained based on multiple sample data and key information labels for each sample data.
[0137] It should be noted that when marking key information in the task processing results, the key information can be bolded, highlighted, italicized, bordered, etc. The marking method of the key information is selected according to the actual situation, and the embodiments of this specification do not impose any restrictions on this.
[0138] By applying the solution of the embodiment of this specification, key information in the task processing result is marked to obtain the marked task processing result; the marked task processing result is sent to the client so that the user can view the result, thereby improving the user experience.
[0139] In an optional embodiment of the present specification, after inputting the task data, target key data and reference task data into the task processing model and obtaining the task processing result of the target task, the following steps may also be included:
[0140] Send the task processing results to the client;
[0141] Receive modification information sent by the client, where the modification information is used to modify the task processing result;
[0142] According to the modification information, the task processing result is modified to obtain the modified task processing result.
[0143] Specifically, the modification information is used to describe the user's modification requirements for the task processing results. Modification requirements include but are not limited to adding annotation requirements, deleting content requirements, replacing content requirements, and translating requirements. Furthermore, the modification requirements can also be modification requirements for key information in the task processing results.
[0144] It should be noted that there are many ways to modify the task processing results according to the modification information, and the specific selection is based on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, a modification template (such as a content replacement template, a content deletion template) corresponding to the modification information can be obtained, and the task processing results can be modified based on the modification template. In another possible implementation of this specification, a deep learning model (such as a translation model, a classification model) corresponding to the modification information can be determined, and the task processing results can be modified using the deep learning model corresponding to the modification information.
[0145] By applying the solution of the embodiments of this specification, the task processing result is modified according to the modification information sent by the user, which increases the human-computer interactivity and improves the adaptability and flexibility of task processing.
[0146] The following combination Figure 5 Taking the application of the task processing method provided in this specification in the virtual character dialogue scene as an example, the task processing method is further explained. Figure 5 A flowchart of a virtual character dialogue method provided by an embodiment of the present specification is shown, which specifically includes the following steps:
[0147] Step 502: Obtain task data of the virtual character dialogue task.
[0148] Step 504: Filter out target key data from key task data of the virtual character dialogue task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from historical task data of the virtual character dialogue task.
[0149] Step 506: Input the task data, target key data and reference task data into the task processing model to obtain the dialogue response result of the virtual character dialogue task, wherein the reference task data refers to the historical task data that is consistent with the task data.
[0150] Specifically, a virtual character dialogue task refers to a task in which a user conducts a dialogue with a task processing model. The task processing model can interact with the user as a virtual character, such as providing information query, entertainment interaction, customer service, educational guidance and other functions to the user. The user can turn on the long-term memory switch of the task processing model and actively enable the task processing model's ability to conduct dialogues based on target key data and reference task data. The user can also personalize the task processing model to obtain a virtual character with his or her own unique personality and style, and can conduct rich interactions in different specified scenarios, generating contextual, personalized dialogues and descriptions to make it more emotionally connected to himself or herself.
[0151] It should be noted that the implementation of steps 502 to 506 may refer to the implementation of steps 302 to 306 described above, and will not be described in detail in this embodiment of the specification.
[0152] By applying the solution of the embodiments of this specification, when the task processing model processes task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate dialogue response results that are coherent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous dialogue preferences, thereby improving the quality of the dialogue response results.
[0153] See also Figure 6 , Figure 6 The flowchart of a processing process of a virtual character dialogue method provided by an embodiment of the present specification is shown, taking the dialogue process between a user and an intelligent assistant as an example, specifically including:
[0154] The user sends the task data "Do you remember my name?" through the client;
[0155] The intelligent assistant performs long-term memory retrieval from the key task data (including key task information and multiple historical segment data) in the memory bank according to the task data, and obtains the target key data related to the task data, wherein the target key data includes the target historical segment data "user: my name is A; intelligent assistant: A, what a nice name; user: I grew up in city B; intelligent assistant: Wow, city B, a nice place" and the target key task information "user's knowledge: my name is A; I grew up in city B".
[0156] The intelligent assistant extracts short-term memory from historical task data and obtains the reference task data of the most recent 100 rounds "User: Sure; Intelligent Assistant: Okay, that's settled"; the task data, target key data and reference task data are input into the task processing model for intent recognition, and the task intent of the target task is obtained "The user asked about his name, and based on previous related memories, the user mentioned that his name is A"; the task intent, task data, target key data and reference task data are input into the task processing model for task processing, and the task processing result of the target task is obtained "Of course I know, your name is A", and the task processing result "Of course I know, your name is A" is displayed to the user through the client.
[0157] It should be noted that the above process can be understood as "memory recall, task processing", which is a real-time processing process. Before the intelligent assistant retrieves long-term memory from the memory bank according to the task data, it also includes an asynchronous processing process "long-term memory extraction". When extracting long-term memory, historical task data "User: My name is A; Intelligent Assistant: A, what a nice name; User: I grew up in City B; Intelligent Assistant: Wow, City B, a nice place;...; Intelligent Assistant: I have a good friend named C; User: When did you meet; Intelligent Assistant: In elementary school; User: Then I have known each other for a long time;..." can be obtained, and key information can be extracted from the historical task data and data segments can be divided to extract long-term memory. Specifically, key information can be extracted from the historical task data to obtain key task information, and the historical task data can be divided into data segments to obtain multiple historical segment data; the key task information and multiple historical segment data are determined as key task data and stored in the memory bank.
[0158] By applying the solution of the embodiments of this specification, by combining key task information in long-term memory, historical fragment data and data retrieval, key information can be extracted from historical task data, which can effectively reduce the input of the model in the conversation context, so that the latest memory content can be obtained without retraining the model, helping the model to better understand the context of the current conversation, so that the model can make more coherent and relevant responses; for tasks that require multi-step input or decision-making, the model remembers previous choices and preferences to more efficiently complete the entire task processing process and provide more personalized answers and suggestions.
[0159] Next, the task processing method proposed in the embodiment of this specification is further explained based on the conversation content between the user and the intelligent assistant:
[0160] Introduction to the smart assistant: Xiaohong, from City M, female, 172cm tall, extroverted, energetic, enthusiastic, confident and simple, likes cycling, listening to music, city walking (citywalk), and trying all kinds of new things.
[0161] Smart Assistant: (Walks into the room with confidence) Hello, I’m Xiaohong, a girl from City M!
[0162] User: I am Damao.
[0163] Smart Assistant: (Waving) Damao, what a coincidence! What kind of sports do you like? I’m really into cycling lately!
[0164] User: I like it too, but I have a cold that hasn’t healed yet.
[0165] Smart assistant: Oh, then you have to take good care of yourself, drink more water, and rest early. Health is the most important thing (winks with concern).
[0166] User: My throat hurts too.
[0167] Smart Assistant: (covering mouth nervously) Wow, that's serious, shouldn't I go see a doctor? Don't let a minor illness turn into a major one!
[0168] User: My whole body hurts.
[0169] Smart assistant: (clapping hands gently) You should rest even more. When you are better, we can go to the city walk together to experience the winter scenery of City M. How about that?
[0170] User: Uh-huh I want to take a nap.
[0171] Smart assistant: (Nodding with a smile) Good idea. Dreams can contain anything. Maybe I’ll even dream about sweet candies (makes a sweet gesture)!
[0172] User: Okay, see you tomorrow.
[0173] Smart assistant: OK, OK, remember to take your medicine. You can’t skimp on cold medicine. Don’t forget (putting on a reminder look)!
[0174] User: Yes, thank you.
[0175] Smart assistant: You’re welcome, you’re welcome. We are all friends (smiles cheerfully). I won’t disturb your rest then. Good night, Damao (waves gently)!
[0176] (the next day)
[0177] Smart Assistant: (jumps in happily) Damao, Damao, how are you feeling today (looks expectantly)?
[0178] User: Much better.
[0179] Smart Assistant: Great (clapping excitedly), now we can go on that city walk we talked about before! Where do you want to go?
[0180] User: You arrange it.
[0181] Smart Assistant: Okay, let me think about it... (frowns and thinks), well, we can go to Park A and watch people skating on the ice, how about that?
[0182] From the above conversation, we can see that after several rounds of conversation, the intelligent assistant remembered that the user was sick and made the correct response.
[0183] See also Figure 7 , Figure 7 The following is a schematic diagram of a task processing interface provided by an embodiment of the present specification. The task processing interface is divided into a request input interface and a result display interface. The request input interface includes a request input box, an "OK" control, and a "Cancel" control. The result display interface includes a result display box.
[0184] The user inputs a task processing request through the request input box displayed on the client. The task processing request carries the task data of the target task. The user clicks the "OK" control, and the server receives the task data sent by the client. According to the task data, the target key data is filtered out from the key task data of the target task, where the key task data is the data obtained by extracting key information and dividing the data into segments from the historical task data of the target task; the task data, target key data and reference task data are input into the task processing model to obtain the task processing result of the target task, where the reference task data refers to the historical task data that is coherent with the task data, and the task processing result is sent to the client. The client displays the task processing result in the result display box.
[0185] In actual applications, users can operate controls by clicking, double-clicking, touching, hovering the mouse, sliding, long pressing, voice control, or shaking, etc. The selection is based on actual conditions, and the embodiments of this specification do not impose any limitations on this.
[0186] Corresponding to the above-mentioned task processing method embodiment, this specification also provides a task processing device embodiment. Figure 8 FIG. 1 shows a schematic diagram of a task processing device provided by an embodiment of the present specification. Figure 8 As shown, the device comprises:
[0187] A first acquisition module 802 is configured to acquire task data of a target task;
[0188] The first screening module 804 is configured to screen target key data from the key task data of the target task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the target task;
[0189] The first input module 806 is configured to input task data, target key data and reference task data into the task processing model to obtain the task processing result of the target task, wherein the reference task data refers to historical task data that is consistent with the task data.
[0190] Optionally, the device also includes: an adjustment module, configured to determine the input sequence length of the task processing model based on the task data, target key data and reference task data; when the input sequence length does not meet the model processing conditions, adjust the reference task data until the input sequence length meets the model processing conditions, and obtain the adjusted reference task data; the first input module 806 is further configured to input the task data, target key data and adjusted reference task data into the task processing model to obtain the task processing result of the target task.
[0191] Optionally, the first input module 806 is further configured to input task data, target key data and reference task data into the task processing model for intent identification to obtain the task intent of the target task; input task intent, task data, target key data and reference task data into the task processing model for task processing to obtain the task processing result of the target task.
[0192] Optionally, the device also includes: a first extraction module, configured to obtain historical task data of the target task; extract key information from the historical task data to obtain key task information of the target task, and divide the historical task data into data segments to obtain multiple historical segment data; determine the key task data of the target task based on the key task information and multiple historical segment data.
[0193] Optionally, the device further includes: a second extraction module configured to perform feature extraction on the key mission data to obtain key data features of the key mission data; and store the key mission data and the key data features in a data storage unit.
[0194] Optionally, the first screening module 804 is further configured to compare task data and key task data to determine data comparison results; based on the data comparison results, screen out target key data from the data storage unit; and / or perform feature extraction on the task data to obtain task data features; compare task data features and key data features to determine feature comparison results; based on the feature comparison results, screen out target key data from the data storage unit.
[0195] Optionally, the device also includes: a receiving module, configured to send the task processing results to the client; receive result feedback information sent by the client, wherein the result feedback information is information that provides feedback on the task processing results based on the task information of the target task; construct model optimization data based on the result feedback information; and use the model optimization data to adjust parameters of the task processing model.
[0196] Optionally, the receiving module is further configured to generate optimization prompt information based on the result feedback information, wherein the optimization prompt information is used to guide the client to send model optimization data for optimizing the task processing model; send the optimization prompt information to the client, and receive the model optimization data sent by the client based on the optimization prompt information.
[0197] Optionally, the device further includes: a marking module configured to mark key information in the task processing result to obtain the marked task processing result; and send the marked task processing result to the client.
[0198] Optionally, the device also includes: a modification module, configured to send the task processing result to the client; receive modification information sent by the client, wherein the modification information is used to modify the task processing result; modify the task processing result according to the modification information to obtain a modified task processing result.
[0199] By applying the solution of the embodiments of this specification, when the task processing model processes task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate task processing results that are consistent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous task processing preferences, thereby improving the quality of task processing results.
[0200] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the above task processing method belong to the same concept, and the details of the technical scheme of the task processing device that are not described in detail can all be referred to the description of the technical scheme of the above task processing method.
[0201] Corresponding to the above-mentioned virtual character dialogue method embodiment, this specification also provides a virtual character dialogue device embodiment, Fig. 9 FIG. 1 is a schematic diagram showing the structure of a virtual character dialogue device provided by an embodiment of the present specification. Fig. 9 As shown, the device comprises:
[0202] The second acquisition module 902 is configured to acquire task data of the virtual character dialogue task;
[0203] The second screening module 904 is configured to screen target key data from the key task data of the virtual character dialogue task according to the task data, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the virtual character dialogue task;
[0204] The second input module 906 is configured to input task data, target key data and reference task data into the task processing model to obtain the dialogue response result of the virtual character dialogue task, wherein the reference task data refers to the historical task data that is consistent with the task data.
[0205] By applying the solution of the embodiments of this specification, when the task processing model processes task data, the reference task data is used as short-term memory to guide the model processing process, so that the model can generate dialogue response results that are coherent with the context. At the same time, the target key data is used as long-term memory to guide the model processing process, so that the model remembers previous dialogue preferences, thereby improving the quality of the dialogue response results.
[0206] The above is a schematic scheme of a virtual character dialogue device of this embodiment. It should be noted that the technical scheme of the virtual character dialogue device and the technical scheme of the virtual character dialogue method described above are of the same concept, and the details of the technical scheme of the virtual character dialogue device that are not described in detail can all be referred to the description of the technical scheme of the virtual character dialogue method described above.
[0207] Fig.10 The block diagram of a computing device provided by one embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.
[0208] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0209] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0210] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.
[0211] The processor 1020 is used to execute computer programs / instructions, which implement the steps of the above-mentioned task processing method or virtual character dialogue method when executed by the processor.
[0212] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned task processing method and virtual character dialogue method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned task processing method or virtual character dialogue method.
[0213] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned task processing method or virtual character dialogue method when executed by a processor.
[0214] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the task processing method and the virtual character dialogue method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the task processing method or the virtual character dialogue method described above.
[0215] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned task processing method or virtual character dialogue method when executed by a processor.
[0216] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the task processing method and the virtual character dialogue method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the task processing method or the virtual character dialogue method described above.
[0217] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0218] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0219] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0220] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0221] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A task processing method, include: Get the task data of the target task; According to the task data, target key data is screened out from the key task data of the target task, wherein the key task data is data obtained by extracting key information and dividing the historical task data of the target task into data segments; The task data, the target key data and the reference task data are input into a task processing model to obtain a task processing result of the target task, wherein the reference task data refers to historical task data that is coherent with the task data.
2. The method according to claim 1, wherein before inputting the task data, the target key data and the reference task data into the task processing model and obtaining the task processing result of the target task, include: Determining the input sequence length of the task processing model according to the task data, the target key data and the reference task data; When the input sequence length does not satisfy the model processing condition, adjusting the reference task data until the input sequence length satisfies the model processing condition, thereby obtaining adjusted reference task data; The step of inputting the task data, the target key data and the reference task data into a task processing model to obtain a task processing result of the target task includes: The task data, the target key data and the adjusted reference task data are input into a task processing model to obtain a task processing result of the target task.
3. The method according to claim 1, wherein the task data, the target key data and the reference task data are input into a task processing model to obtain a task processing result of the target task, include: Inputting the task data, the target key data and the reference task data into a task processing model to perform intent recognition, thereby obtaining the task intent of the target task; The task intention, the task data, the target key data and the reference task data are input into the task processing model to perform task processing, and obtain the task processing result of the target task.
4. The method according to claim 1, before filtering out target key data from the key task data of the target task according to the task data, further comprising: include: Acquire historical task data of the target task; Extracting key information from the historical task data to obtain key task information of the target task, and dividing the historical task data into data segments to obtain a plurality of historical segment data; The key task data of the target task is determined according to the key task information and the plurality of historical segment data.
5. The method according to claim 4, after determining the key task data of the target task based on the key task information and the plurality of historical segment data, further comprising: include: Extracting features from the key task data to obtain key data features of the key task data; The key task data and the key data features are stored in a data storage unit.
6. The method according to claim 5, wherein the target key data is screened out from the key task data of the target task according to the task data, include: Comparing the task data with the key task data to determine a data comparison result; According to the data comparison result, the target key data is screened out from the data storage unit; and / or, Extracting features from the task data to obtain task data features; comparing the task data features with the key data features to determine feature comparison results; and screening out the target key data from the data storage unit based on the feature comparison results.
7. The method according to any one of claims 1 to 6, wherein after inputting the task data, the target key data and the reference task data into the task processing model and obtaining the task processing result of the target task, include: Sending the task processing result to the client; Receiving result feedback information sent by the client, wherein the result feedback information is information providing feedback on the task processing result based on the task information of the target task; According to the result feedback information, a model is constructed to optimize the data; The model optimization data is used to adjust parameters of the task processing model.
8. The method according to claim 7, wherein the model optimization data is constructed based on the result feedback information. include: Generate optimization prompt information according to the result feedback information, wherein the optimization prompt information is used to guide the client to send model optimization data for optimizing the task processing model; The optimization prompt information is sent to the client, and the model optimization data sent by the client based on the optimization prompt information is received.
9. The method according to any one of claims 1 to 6, wherein after inputting the task data, the target key data and the reference task data into the task processing model and obtaining the task processing result of the target task, include: Marking key information in the task processing result to obtain the marked task processing result; The marked task processing result is sent to the client.
10. The method according to any one of claims 1 to 6, wherein after inputting the task data, the target key data and the reference task data into the task processing model and obtaining the task processing result of the target task, include: Sending the task processing result to the client; receiving modification information sent by the client, wherein the modification information is used to modify the task processing result; The task processing result is modified according to the modification information to obtain a modified task processing result.
11. A virtual character dialogue method, include: Get the task data of the virtual character dialogue task; According to the task data, target key data is screened out from the key task data of the virtual character dialogue task, wherein the key task data is data obtained by extracting key information and dividing data segments from the historical task data of the virtual character dialogue task; The task data, the target key data and the reference task data are input into the task processing model to obtain the dialogue response result of the virtual character dialogue task, wherein the reference task data refers to the historical task data that is coherent with the task data.
12. A computing device, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 10 or claim 11 are implemented.
13. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method described in any one of claims 1 to 10 or claim 11.
14. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10 or claim 11.
Citation Information
Cited By
Task processing method and data generation method
CN120710944A
