Dialogue task execution method and device, electronic equipment and nonvolatile storage medium

By acquiring specialized datasets and using dialogue data extraction and model selection for automated fine-tuning, the accuracy problem of intelligent dialogue systems in specialized fields has been solved, improving the accuracy and efficiency of dialogue task execution.

CN119692480BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411996670.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2026-01-27
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing intelligent dialogue systems are unable to accurately understand and execute information in specialized fields when handling highly specialized dialogue tasks, resulting in inaccurate responses.

Method used

By acquiring a professional dataset, dialogue data extraction and selection models are used to automatically extract and select dialogue data that matches the professional dataset. The dialogue task model is then fine-tuned to construct a professional dataset, and the fine-tuned model is used to execute the dialogue task to be processed.

Benefits of technology

It improves the knowledge understanding ability of the dialogue task model in professional fields, enhances the execution accuracy of dialogue tasks, saves manual annotation costs, and improves fine-tuning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692480B_ABST
    Figure CN119692480B_ABST
Patent Text Reader

Abstract

The application discloses a dialogue task execution method and device, electronic equipment and a nonvolatile storage medium, and applies to the technical field of artificial intelligence. The method comprises the following steps: inputting a first prompt word and professional data of a professional field to which a to-be-processed dialogue task belongs into a dialogue data extraction model to obtain a plurality of groups of original dialogue data; when it is detected that the dialogue data extraction model is executed, automatically inputting each original dialogue data, the professional data and a second prompt word into a dialogue data selection model to obtain each target dialogue data; fine-tuning a dialogue task model which has completed a pre-training process by using each target dialogue data; and executing the to-be-processed dialogue task by using the fine-tuned dialogue task model. The application can solve the problem that the dialogue task is not accurate in the related art, and can accurately solve the dialogue task with high professionalism.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a dialogue task execution method and device, electronic equipment and nonvolatile storage medium. BACKGROUND

[0002] With the aid of massive data and powerful computing capability, an intelligent dialogue system constructed based on a large-scale deep learning network model can interact with a user and provide the user with accurate and fast information query and answering services.

[0003] With the wide application of the intelligent dialogue system in various professional fields, the intelligent dialogue system of the related technology cannot completely understand and learn information with strong professional nature through learning of a general knowledge base, so that the intelligent dialogue system cannot accurately solve tasks with strong professional nature.

[0004] Therefore, improving the accuracy of the intelligent dialogue system in processing dialogue tasks with strong professional nature is a technical problem to be solved by those skilled in the art.

[0005] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present application, and therefore can include information that does not constitute prior art known to those skilled in the art. SUMMARY

[0006] The present application provides a dialogue task execution method and device, electronic equipment and nonvolatile storage medium, which effectively improves the execution accuracy of the intelligent dialogue system for dialogue tasks with strong professional nature.

[0007] To solve the above technical problems, the present application provides the following technical solutions:

[0008] In one aspect, the present application provides a dialogue task execution method, comprising:

[0009] According to a professional field to which a to-be-processed dialogue task belongs, matched professional data, a first prompt word and a second prompt word are acquired; the first prompt word and the professional data are input into a pre-trained dialogue data extraction model to obtain multiple groups of original dialogue data; the first prompt word is used to prompt the dialogue data extraction model to extract dialogue data from the professional data; when it is detected that the task execution of the dialogue data extraction model is completed, each original dialogue data, the professional data and the second prompt word are automatically input into a pre-trained dialogue data selection model to obtain each target dialogue data, so as to construct a professional data set; the second prompt word is used to prompt the dialogue data selection model to select dialogue data matched with the professional data from each original dialogue data; the professional data set is used to fine-tune a dialogue task model that has completed a pre-training process, and the fine-tuned dialogue task model is used to execute the to-be-processed dialogue task.

[0010] In the first exemplary embodiment, before the automatic input of each original dialogue data, the professional data and the second prompt word into the pre-trained dialogue data selection model, the method further includes: acquiring a supervised classification sample data set, the supervised classification sample data set contains less than a first quantity threshold, each supervised classification sample includes multiple groups of document sample data and corresponding dialogue sample data, each supervised classification sample has a similarity value label and a label of whether the dialogue sample data meets a similarity condition, the similarity label is used to identify the similarity between the document sample data and the corresponding dialogue sample data; the supervised classification sample data set is used to train a target language model, so that the target language model has the ability to select dialogue data meeting the similarity condition; when the target training language model reaches a preset model training stop condition, the current obtained target training language model is taken as the dialogue data selection model.

[0011] In the second exemplary embodiment, after the fine-tuning of the dialog task model that has completed the pre-training process using the professional dataset, the method further comprises: obtaining historical questions, historical answers and user feedback results of the dialog task model in executing historical dialog tasks, wherein the user feedback results at least include correct answers, incorrect answers and corresponding user correct answers; constructing a question and answer task dataset according to each historical question, the corresponding historical answer and the user feedback result; determining the weight value of the loss corresponding to each of the task question dataset and the professional dataset according to the influence degree of the task question dataset and the professional dataset on the task execution result; adjusting the loss function of the dialog task model in the initial fine-tuning process according to the weight value of the loss corresponding to each of the task question dataset and the professional dataset, to obtain a joint loss function; and when the data scale of the question and answer task dataset reaches a preset scale threshold, using the joint loss function to fine-tune the dialog task model again using the task question dataset and the professional dataset.

[0012] In the third exemplary embodiment, after the fine-tuning of the dialog task model that has completed the pre-training process using the professional dataset, the method further comprises: obtaining historical questions, historical answers and user feedback results of the dialog task model in executing historical dialog tasks, wherein the user feedback results at least include correct answers, incorrect answers and corresponding user correct answers; constructing a question and answer task dataset according to each historical question, the corresponding historical answer and the user feedback result; and whenever the newly added data scale of the question and answer task dataset reaches a preset quantity threshold, fine-tuning the dialog task model using the task question dataset.

[0013] In the fourth exemplary embodiment, the executing the to-be-processed dialogue task by using the fine-tuned dialogue task model comprises: pre-processing a plurality of text data in blocks, and converting each text block into corresponding text vector data, so as to construct a knowledge base according to each text vector data; obtaining a target historical task of the dialogue task model related to the to-be-processed dialogue task; generating historical text according to historical dialogue, historical prediction result and corresponding historical user feedback result of each target historical task; performing block processing on the historical text, and calling a text vectorization model to perform vectorization processing on each historical text block to obtain historical text vectors; sending the historical text vectors to the knowledge base; performing vectorization processing on the to-be-processed task to obtain a to-be-queried dialogue vector; determining at least one candidate text vector satisfying a preset vector similarity condition for the to-be-queried dialogue vector in the knowledge base; inputting a third prompt word, the at least one candidate text vector and a to-be-processed dialogue corresponding to the to-be-processed task into the fine-tuned dialogue task model; and the third prompt word is used to prompt the fine-tuned dialogue task model to generate a corresponding result for the to-be-processed dialogue.

[0014] In the fifth exemplary embodiment, the to-be-processed dialogue task is a question and answer task, and at least comprises a to-be-processed question. After the executing the to-be-processed dialogue task by using the fine-tuned dialogue task model, the method further comprises: obtaining a predicted answer corresponding to the to-be-processed question; obtaining a feedback result of a user's satisfaction and accuracy for the predicted answer; taking the to-be-processed question corresponding to the to-be-processed dialogue task, the predicted answer and the corresponding user feedback result as a group of historical question and answer sample data, and importing the historical question and answer sample data into the knowledge base of the dialogue task model.

[0015] In the sixth exemplary embodiment, the dialogue data extraction model comprises a first dialogue data extraction sub-model, a second dialogue data extraction sub-model and a third dialogue data extraction sub-model. The inputting the first prompt word and the professional data into the pre-trained dialogue data extraction model comprises: inputting the first prompt word and the professional data into the first dialogue data extraction sub-model, the second dialogue data extraction sub-model and the third dialogue data extraction sub-model respectively, and the first dialogue data extraction sub-model, the second dialogue data extraction sub-model and the third dialogue data extraction sub-model respectively extract dialogue data from the professional data according to the first prompt word; obtaining a plurality of groups of original dialogue data according to dialogue data extracted by the first dialogue data extraction sub-model, the second dialogue data extraction sub-model and the third dialogue data extraction sub-model respectively.

[0016] In another aspect, the present application provides a dialogue task execution device, comprising:

[0017] The professional data acquisition module is configured to acquire professional data, a first prompt word and a second prompt word according to a professional field to which the to-be-processed dialogue task belongs; the dialogue data extraction module is configured to input the first prompt word and the professional data into a pre-trained dialogue data extraction model to obtain a plurality of groups of original dialogue data; the first prompt word is used to prompt the dialogue data extraction model to extract dialogue data from the professional data; the dialogue data extraction module is configured to, when detecting that the dialogue data extraction model completes a task execution, automatically input each original dialogue data, the professional data and the second prompt word into a pre-trained dialogue data selection model to obtain each target dialogue data, so as to construct a professional data set; the second prompt word is used to prompt the dialogue data selection model to select dialogue data matched with the professional data from each original dialogue data; and the dialogue task execution module is configured to fine-tune a dialogue task model that completes a pre-training process by using the professional data set, and execute the to-be-processed dialogue task by using the fine-tuned dialogue task model.

[0018] The application further provides an electronic device comprising a processor configured to implement the steps of the dialogue task execution method according to any one of the preceding embodiments when executing a computer program stored in a memory.

[0019] The application further provides a non-volatile storage medium having a computer program stored thereon, the computer program being configured to implement the steps of the dialogue task execution method according to any one of the preceding embodiments when executed by a processor.

[0020] The application provides the technical solution with the advantages that a large amount of professional and industry data matched with a professional field to which a to-be-processed dialogue task belongs is acquired, a dialogue data extraction model and a dialogue data selection model are used to autonomously select a supervision data set that can be used for fine-tuning of a dialogue task model from the professional data, the labels of the supervision data set are implemented by the dialogue data extraction function of the dialogue data extraction model and the dialogue data selection function of the dialogue data selection model, manual labeling is not required, the extraction of the fine-tuning supervision data is automated, the efficiency of fine-tuning of the dialogue task model is effectively improved, the artificial cost is saved, the knowledge of the dialogue task model in the professional field is effectively enhanced, and the accuracy of dialogue task execution is improved.

[0021] In addition, the application further provides a corresponding implementation device, an electronic device and a non-volatile storage medium for the dialogue task execution method, so that the method is more practical, and the device, the electronic device and the non-volatile storage medium have corresponding advantages.

[0022] The technical features mentioned above, the technical features mentioned below, and the technical features shown in the drawings alone can be combined with each other arbitrarily, as long as the technical features to be combined are not contradictory to each other. All feasible combinations of features are explicitly described herein. Any one of the multiple sub-features included in the same sentence can be applied independently, and does not have to be applied together with other sub-features. It should be understood that the general description above and the detailed description below are only exemplary and do not limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the present application or related art, the drawings needed to be used in the embodiments or related art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0024] Figure 1 A flowchart of a dialogue task execution method provided by the present application;

[0025] Figure 2 An exemplary acquisition method flowchart of a professional dataset provided by the present application;

[0026] Figure 3 A flowchart of another dialogue task execution method provided by the present application;

[0027] Figure 4 A framework diagram of an exemplary application scenario of the dialogue task execution method provided by the present application;

[0028] Figure 5 A specific embodiment structure diagram of a dialogue task execution device provided by the present application;

[0029] Figure 6 A specific embodiment structure diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the technical solutions of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments. In the specification and the above drawings, the terms "first", "second", "third", etc. are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. The term "exemplary" means "serving as an example, embodiment or illustration". Any embodiment described as "exemplary" herein is not necessarily interpreted as superior or better than other embodiments.

[0031] With the rapid development of artificial intelligence (AI) technology, information is exploding, and users' need for quick and accurate filtering of valuable content from massive amounts of information is becoming increasingly urgent. Benefiting from the intelligent interaction insights provided by AI technology, and relying on massive amounts of data and powerful computing capabilities, intelligent dialogue systems built on large-scale deep learning models have emerged. These intelligent dialogue systems possess high accuracy and efficiency, enabling them to not only engage in dialogue with users but also quickly provide accurate information retrieval and answer services. Furthermore, they are gradually evolving from simple dialogue functions towards more intelligent and personalized solutions.

[0032] To improve the accuracy of responses from intelligent dialogue systems and reduce the "illusion phenomenon"—that is, to avoid situations where intelligent dialogue systems spout seemingly nonsensical statements—related technologies employ methods such as Retrieval-Augmented Generation (RAG), Agent, and Prompt Engineering to enable dialogue models to utilize information more effectively, thereby improving their performance and response quality. Taking RAG, which combines retrieval and generation methods, as an example, RAG, as a natural language processing technique, is widely used in natural language processing tasks requiring high accuracy and context sensitivity. When handling tasks such as dialogue and text generation, it can more effectively utilize large amounts of information, providing private knowledge references for language model generation. It is more suitable for handling question-and-answer tasks requiring specialized knowledge or up-to-date information. When providing dialogue services, it can offer more personalized and information-rich responses. Furthermore, it can assist in generating high-quality content by retrieving relevant materials and generate or suggest code snippets based on existing codebases.

[0033] However, intelligent dialogue systems in related technologies are usually trained on large amounts of publicly available data. Therefore, in specialized fields, the training corpus is limited, and the understanding of proprietary knowledge documents in that field is limited. This results in answers that fail to meet user needs even when given relevant corpus materials. Furthermore, limitations in current document vectorization lead to low recall accuracy, causing intelligent dialogue systems to frequently provide irrelevant answers. To address this technical problem, this invention acquires a large amount of specialized and industry-specific data matching the profession of the dialogue task to be processed. Based on dialogue data extraction and selection models, it autonomously selects supervised datasets from this specialized data for fine-tuning the dialogue task model. This not only effectively improves the efficiency of fine-tuning the dialogue task model and saves labor costs, but also effectively enhances the dialogue task model's knowledge in the specialized field, improving the accuracy of dialogue task execution. After introducing the technical solution of this invention, various non-limiting embodiments are described in detail below. To better illustrate this invention, numerous specific details are given in the following detailed embodiments. Those skilled in the art should understand that this invention can be implemented without these specific details. In other instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the spirit of the invention.

[0034] Please see first. Figure 1 , Figure 1 This is a flowchart illustrating a dialogue task execution method provided in this embodiment. This embodiment may include the following:

[0035] S101: Based on the professional field to which the dialogue task to be processed belongs, obtain matching professional data, first prompt words, and second prompt words.

[0036] The dialogue tasks to be processed can be categorized into task-oriented dialogue tasks, question-and-answer dialogue tasks, and open-domain dialogue tasks. Task-oriented dialogue tasks have clear objectives and can precisely define the user's intent and actions; intelligent assistants use them for tasks such as booking tickets and navigation. Question-and-answer dialogue tasks require accurately answering user questions to meet their information query needs or provide solutions; examples include dialogue tasks provided by voice customer service systems in banks, telecommunications operators, and e-commerce stores. Open-domain dialogue tasks are not limited to any particular domain or topic, similar to chatbots. Therefore, to improve the accuracy of the dialogue tasks to be processed, a sufficient understanding of the professional domain is required. Professional data refers to a set of data that is highly specialized and industry-specific for a particular field. This data can be obtained through authorized access to the private databases of companies corresponding to that field, or from public databases and related literature, videos, and other materials. Professional data can include specialized documents in that field, such as various types of documents, technical documents, product documents, regulations, etc., as well as professional video and audio materials, such as videos or audio explaining industry-specific phenomena or rules. This does not affect the implementation of this invention. Professional data includes professional terms, technical terms, and jargon related to that field. The first prompt word instructs the dialogue data extraction model in S102 to extract dialogue data from the professional data, i.e., it indicates what task the dialogue data extraction model should perform. The second prompt word instructs the dialogue data selection model in S103 to select dialogue data that matches the professional data from the various original dialogue data, i.e., it indicates what task the dialogue data selection model should perform. After obtaining the professional data, the first prompt word, and the second prompt word, the fine-tuning dataset for fine-tuning the dialogue task model in S104 can be automatically extracted, realizing automatic annotation of each fine-tuning sample data in the fine-tuning dataset of the dialogue task model.

[0037] S102: Input the first prompt word and professional data into the pre-trained dialogue data extraction model to obtain multiple sets of raw dialogue data.

[0038] After obtaining the professional data in the previous step, regardless of its format, it cannot be directly used to fine-tune the dialogue task model. Supervised fine-tuning data with dialogue format needs to be extracted, such as question-and-answer data. However, extracting high-quality dialogue data from a large amount of raw professional data requires specialized knowledge and is a time-consuming, labor-intensive, and somewhat tedious task; dedicating manpower to this task is impractical. Therefore, this invention implements an automated fine-tuning data extraction method through steps S102 and S103. The dialogue data extraction model can be any open-source large-scale language network model or a free model API (Application Programming Interface). A large model API typically refers to an application programming interface provided for large pre-trained models, such as natural language processing models or image recognition models. Correspondingly, the training sample set can consist of multiple sample data sets, each labeled with dialogue format data, enabling the model to learn to extract dialogue format data from the input data. The training method can be any training method documented in relevant technologies that matches the selected network model structure. A well-trained dialogue data extraction model can automatically extract dialogue-style data from input data under the guidance of the first prompt word. For ease of description, the predicted data output by the dialogue data extraction model, that is, the dialogue-style data extracted from professional data, can be defined as the original dialogue data.

[0039] S103: When the task of the dialogue data extraction model is completed, the original dialogue data, professional data and second prompt words are automatically input into the pre-trained dialogue data selection model to obtain the target dialogue data and construct the professional dataset.

[0040] Considering that the raw dialogue data may have task execution biases due to the performance of the dialogue data extraction model, and that the raw dialogue data may contain data that is not closely related to the professional data, it is necessary to filter the raw dialogue data extracted by S102 in order to improve the task execution accuracy of the dialogue task model. This invention can also use an open-source large-scale language network model or a free model API to label the training sample set with screening criteria, such as similarity or having the same keywords, so that the model can identify whether the input data is a match. The target dialogue data is the dialogue data selected from the raw dialogue data that is more relevant and matched to the professional data. The obtained target dialogue data is used to form a professional dataset as a fine-tuning dataset. This invention is based on an automated method for extracting dialogue-type supervision data from the acquired professional data using a multi-model hybrid approach. It eliminates the need to invest a lot of manpower and time in manually labeling dialogue-type supervision data from professional data. This not only solves the problem that traditional data labeling requires a lot of manpower and time, but also solves the problem that manually labeled question-and-answer data is difficult to guarantee in terms of data quality.

[0041] S104: Fine-tune the pre-trained dialogue task model using a professional dataset, and then use the fine-tuned dialogue task model to perform the dialogue task to be processed.

[0042] The models used in intelligent question-answering systems, chatbots, and intelligent dialogue systems are implemented through pre-training and fine-tuning. Pre-training on a large-scale corpus allows the model to learn rich linguistic knowledge and semantic information. Then, fine-tuning is performed for specific application scenarios and tasks to better adapt to and meet user needs. This step can obtain any model that has already completed the pre-training process, meaning the dialogue task model has already learned rich linguistic knowledge and semantic information. To enhance the dialogue task model's knowledge in professional domains and improve the accuracy of professional dialogue tasks, the professional dataset obtained in the previous step is used to fine-tune the dialogue task model that already understands linguistic knowledge and semantic information. This fine-tuned model can then understand the professional domain knowledge corresponding to the dialogue task being processed, thereby outputting results that match that professional domain. Taking the dialogue task to be processed as a question-answering task and the professional data as document data as an example, the corresponding dialogue data extraction model is a question-answer pair extraction model, and the dialogue data selection model is a question-answer pair selection model, such as... Figure 2As shown, S102 extracts question-and-answer pairs from the document data based on prompt word 1. S103 filters the question-and-answer pairs output by the question-and-answer pair extraction model using prompt word 2 to obtain target question-and-answer pairs that better match the professional data. The professional dataset constructed using the target question-and-answer pairs is used to fine-tune the dialogue task model, thereby enhancing the knowledge of the dialogue task model in the professional domain, improving the accuracy of performing the question-and-answer task, and outputting more accurate answers that meet user needs.

[0043] In the technical solution provided in this embodiment, a large amount of specialized and industry-specific data matching the profession of the dialogue task to be processed is acquired. Based on the dialogue data extraction model and the dialogue data selection model, a supervision dataset that can be used for fine-tuning of the dialogue task model is automatically selected from this specialized data. The labels of the supervision dataset are implemented through the dialogue data extraction function of the dialogue data extraction model and the dialogue data selection function of the dialogue data selection model, without the need for manual annotation, thus realizing automated extraction of supervision data for fine-tuning. This not only effectively improves the efficiency of fine-tuning the dialogue task model and saves labor costs, but also effectively enhances the knowledge of the dialogue task model in the professional field and improves the accuracy of dialogue task execution.

[0044] In the above embodiments, no limitations are placed on obtaining the dialogue data selection model. To further improve the execution efficiency and accuracy of dialogue tasks, the present invention also provides a training method for the dialogue data selection model, which may include the following:

[0045] Obtain a supervised classification sample dataset and use it to train the target language model so that the target language model has the ability to select dialogue data that meets similar conditions. When the target trained language model reaches the preset model training stopping condition, the currently obtained target trained language model is used as the dialogue data selection model.

[0046] The target language model can be any network model architecture capable of learning language knowledge and semantic information, such as the Transformer model. The supervised classification sample dataset contains fewer supervised classification samples than a first threshold, which can be around 100. For example, the supervised classification sample dataset can contain 10-100 samples. Each supervised classification sample includes multiple sets of document samples and corresponding dialogue samples. Each supervised classification sample has a similarity value label and a label indicating whether the dialogue samples meet the similarity criteria. The similarity label is used to identify the degree of similarity between the document samples and their corresponding dialogue samples. For example, a similarity value of more than 95% can be selected as the similarity criterion. By training with a small number of supervised samples, the optimal dialogue data can be quickly selected from candidate question-answer pairs given a context. The preset model training stopping conditions can be reaching a preset number of iterations, the model accuracy reaching a prediction accuracy threshold, or model convergence.

[0047] As can be seen from the above, this embodiment uses a small number of supervised samples to train a dialogue data selection model, which can quickly select the optimal dialogue data based on similarity, thus improving the accuracy of dialogue task execution.

[0048] To further improve the task execution accuracy of the dialogue data extraction model and obtain more accurate dialogue data, based on the above embodiments, the present invention may further include the following:

[0049] The dialogue data extraction model in this embodiment may include a first dialogue data extraction sub-model, a second dialogue data extraction sub-model, and a third dialogue data extraction sub-model. Of course, the number of sub-models included in the dialogue data extraction model can be selected according to the computing resources and model operation in the actual running scenario, which does not affect the implementation of the present invention. The first prompt word and professional data are respectively input into the first, second, and third dialogue data extraction sub-models. The first, second, and third dialogue data extraction sub-models extract dialogue data from the professional data according to the first prompt word. Based on the dialogue data extracted by each of the first, second, and third dialogue data extraction sub-models, multiple sets of original dialogue data are obtained. Figure 2 For example, the dialogue data extraction model is a question-answer pair extraction model, which can include n large models. Each large model will output question-answer pairs, and all question-answer pairs are input into the subsequent question-answer pair selection model for filtering.

[0050] As can be seen from the above, this embodiment integrates multiple large models to process the same data, allowing multiple large models to extract conversational data and form multiple conversational data sets. This can overcome the bias of a single model and obtain more accurate conversational data.

[0051] Artificial intelligence systems differ from traditional software systems in that they are data-driven systems. As the system runs, it accumulates more and more data, which in turn drives model updates. Ultimately, the overall system performance continuously evolves and improves with system operation. Therefore, in order to further improve the accuracy of dialogue task execution, based on the above embodiments, this invention also provides an implementation method for enhancing the accuracy of dialogue task execution models by effectively utilizing user feedback, which may include the following:

[0052] In this embodiment, after each dialogue task is completed, the system provides an answer evaluation function. Users can give likes or criticisms based on the quality of the dialogue task model's answer. If a user is dissatisfied with the dialogue task model's answer, a user feedback function for an ideal answer is added. This way, after each dialogue task is completed, satisfactory answers can be collected. These answers can include both the better answers output by the dialogue task model and answers that meet the user's needs. This invention utilizes the collected user feedback data, which can be imported into the training samples used in the pre-training and / or fine-tuning processes of the dialogue task model. When user feedback data is obtained, it can be automatically imported after being processed according to the required data format at the import location. This user feedback data forms a knowledge base, continuously improving its quality. Simultaneously, these questions with labeled answers serve as high-quality supervised fine-tuning data. When a certain amount is accumulated, the dialogue task model can be fine-tuned, improving its understanding of text content in professional domains. For different scenarios, this invention provides the following various implementation methods for using this user feedback data, including the following:

[0053] In one exemplary implementation, the present invention can fine-tune a dialogue task model using user feedback data and a professional dataset, and may include the following: obtaining historical questions, historical answers, and user feedback results of the dialogue task model's execution of historical dialogue tasks; wherein, the user feedback results include at least satisfactory answers, incorrect answers, and corresponding correct user answers; constructing a question-and-answer task dataset based on each historical question and its corresponding historical answer and user feedback results; determining the weight values ​​of the losses corresponding to the task question dataset and the professional dataset respectively based on the degree of influence of the task question dataset and the professional dataset on the task execution results; adjusting the loss function of the dialogue task model in the initial fine-tuning process according to the weight values ​​of the losses corresponding to the task question dataset and the professional dataset to obtain a joint loss function; when the data size of the question-and-answer task dataset reaches a preset size threshold, the joint loss function is used to fine-tune the dialogue task model again using the task question dataset and the professional dataset. In this embodiment, the joint loss function includes the loss for fine-tuning the dialogue task model based on the task question dataset and the loss for fine-tuning the dialogue task model based on the professional dataset. These two losses can be adjusted according to the actual situation to ensure that the dialogue task model can adapt to various dialogue tasks.

[0054] In another exemplary implementation, the present invention can fine-tune the dialogue task model using a sufficient amount of user feedback data, which may include the following: obtaining historical questions, historical answers, and user feedback results of the dialogue task model's execution of historical dialogue tasks; wherein, the user feedback results include at least satisfactory answers, incorrect answers, and corresponding correct user answers; constructing a question-and-answer task dataset based on each historical question and its corresponding historical answer and user feedback results; whenever the scale of new data in the question-and-answer task dataset reaches a preset threshold, the dialogue task model is fine-tuned using the task question dataset. The preset threshold can be flexibly selected according to actual conditions, and the present invention does not impose any limitations on it.

[0055] In another exemplary implementation, such as Figure 3As shown, this invention can improve the retrieval accuracy of the dialogue task to be processed by using user feedback data, thereby improving the accuracy of the output results of the dialogue task to be processed. It may include the following: pre-processing multiple text data into blocks and converting each text block into corresponding text vector data to construct a knowledge base based on each text vector data; obtaining the historical execution tasks of the dialogue task model and the target historical tasks related to the dialogue task to be processed; generating historical text based on the historical dialogues, historical prediction results, and corresponding historical user feedback results corresponding to each target historical task; processing the historical text into blocks and calling a text vectorization model to vectorize each historical text block to obtain historical text vectors; sending the historical text vectors to the knowledge base; vectorizing the task to be processed to obtain the query dialogue vector; determining at least one candidate text vector in the knowledge base that satisfies a preset vector similarity condition for the query dialogue vector; inputting a third prompt word, at least one candidate text vector, and the dialogue to be processed corresponding to the task to be processed into the fine-tuned dialogue task model; the third prompt word is used to prompt the fine-tuned dialogue task model to generate corresponding results for the dialogue to be processed. In this embodiment, to improve the task execution accuracy of the dialogue task model and ensure that the final output answer meets the user's needs, the present invention imports all historical data related to the dialogue task to be processed into a knowledge base, so that the dialogue task model can learn knowledge that better meets the user's needs when executing the dialogue task. When the knowledge base is updated, the dialogue task model executes the dialogue task in two stages: retrieval and generation. The retrieval stage includes: firstly, retrieving a small amount of information or fragments most relevant to the input dialogue task from a large-scale knowledge base or document set using methods such as TF-IDF (termfrequency–inverse document frequency, a common weighting technique for information retrieval and data mining), BM25 (Best Matching 25), or a large text vectorization model. In this embodiment, these are defined as candidate text vectors. Secondly, the knowledge base needs to be preprocessed and indexed: the knowledge base can be cleaned, processed, and converted into a format suitable for the dialogue task model. This may involve steps such as text segmentation, entity recognition, and vectorization representation. The processed data is stored in efficient data structures, such as inverted indexes or vector databases using approximate nearest neighbor algorithms, to accelerate subsequent retrieval processes. Then, natural language understanding technology is used to understand and parse the task at hand, accurately extracting keywords or converting them into search queries.The generation phase includes the following steps: To further improve task accuracy, the retrieved information can be preprocessed, such as re-ranking, merging, filtering, and sorting the search results. This preprocessed information, along with the dialogue to be processed, is then input into a fine-tuned dialogue task model. The fine-tuned model utilizes this contextual information to generate the final answer through a decoding process. This fine-tuned model is based not only on its own parameters and training data but also on the specific content dynamically retrieved according to the query. This results in a more accurate and informative final answer that incorporates the latest, domain-specific, or user-preferred knowledge.

[0056] In another exemplary implementation, the present invention can use user feedback data to improve the quality of the knowledge base, which may include the following: obtaining answer prediction data and user feedback results on the answer prediction data; using the dialogue to be processed, the answer prediction data, and the corresponding user feedback results corresponding to the dialogue task to be processed as a set of historical training sample data, and importing the historical training sample data into the knowledge base of the dialogue task model. Taking the dialogue task to be processed as a question-and-answer task as an example, the dialogue task to be processed includes at least a question to be processed, obtaining the predicted answer corresponding to the question to be processed; obtaining user feedback results on the satisfaction and accuracy of the predicted answer; using the question to be processed, the predicted answer, and the corresponding user feedback results corresponding to the dialogue task to be processed as a set of historical question-and-answer sample data, and importing the historical question-and-answer sample data into the knowledge base of the dialogue task model.

[0057] As can be seen from the above, this embodiment adds a user feedback function. When a user is not satisfied with the answer, they can provide feedback and input what they consider to be the ideal answer. In this way, user feedback data during operation can effectively improve the quality of the knowledge base, form effective data reuse, and fine-tune the dialogue task model with user feedback data, effectively improving the performance of the dialogue task model, improving the execution accuracy of the dialogue task, and meeting user needs.

[0058] It is understandable that the fine-tuning method of the dialogue task model affects the model performance. In order to further improve the execution accuracy of the dialogue task, accelerate the fine-tuning speed of the dialogue task model, and save computing resources, based on the above embodiments, this embodiment also provides an exemplary fine-tuning method, which may include the following:

[0059] First training parameters A and second training parameters B are pre-constructed. The hyperparameters controlling the number of parameters in first training parameters A and second training parameters B are rank parameters. The input dimension of the first training parameter is the same as the input dimension of the dialogue task model, and the first difference between the output dimension and the output dimension of the dialogue task model is greater than a first preset threshold. The output dimension of the second training parameter is the same as the output dimension of the pre-trained language model, and the second difference between the input dimension and the input dimension of the dialogue task model is greater than a second preset threshold. The first training parameter is initialized to a Gaussian distribution, and the second training parameter is initialized to 0. During the fine-tuning of the dialogue task model using a professional dataset, the pre-trained model parameters of the dialogue task model are kept unchanged, and the dimension of the pre-trained model parameters of the dialogue task model is d×d. The first training parameters and the second training parameters are updated. When the first training parameters and the second training parameters are trained, the first training parameters, the second training parameters, and the model parameters are merged using a parameter re-evaluation method.

[0060] This embodiment uses LoRA (Low-Rank) to fine-tune the dialogue task model to adapt it to downstream tasks. This allows for achieving good results with only a small number of parameters when adapting the dialogue task model to downstream tasks. LoRA utilizes specialized datasets and adapts the model to the task of interacting with users through dialogue by training only the newly added parameters. For example, LoRA adds two parameters, A and B, to the dialogue task model, initialized to Gaussian distribution and 0 respectively. At the beginning of training, the added parameters are 0. The input dimension of A and the output dimension of B are the same as the input and output dimensions of the original model, while the output dimension of A and the input dimension of B are much smaller than the input and output dimensions of the original model, significantly reducing the number of parameters to be trained. During training, only the parameters of A and B are updated; the pre-trained model parameters remain fixed. After the new parameters are trained, the concept of parameter re-adjustment can be used during inference to merge the new and old model parameters. This achieves the effect of fine-tuning the entire model on new tasks without increasing inference time, effectively improving model training efficiency.

[0061] It should be noted that there is no strict order of execution between the steps in this invention. As long as they conform to the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 and Figure 3 This is just an illustrative example and does not mean that this is the only possible execution order.

[0062] Finally, based on the above-described technical solution of the present invention, the following is combined with... Figure 4 Examples of possible application scenarios related to the technical solutions of this invention are provided below. Figure 4 A schematic diagram of the hardware framework applicable to an intelligent question-answering system provided by the present invention may include the following:

[0063] The hardware framework may include a first electronic device 41 and a second electronic device 42, which are connected via a network 43. The first electronic device 41 deploys a processor for executing the dialogue task execution method described in any of the above embodiments, and the second electronic device 42 deploys a user terminal for providing a human-computer interaction interface. The first electronic device 41 sends a fine-tuned dialogue task model to the second electronic device 42, which directly processes the received dialogue task by invoking the dialogue task model. Alternatively, when the second electronic device 42 receives a user's dialogue task, such as a question-and-answer task, it sends the question directly to the first electronic device 41, which then uses the dialogue task model to process the question and sends the answer to the second electronic device 42, which displays the answer on its human-computer interaction interface.

[0064] It should be noted that the above application scenarios are shown only to facilitate understanding of the ideas and principles of the present invention, and the embodiments of the present invention are not limited in any way. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.

[0065] This invention also provides a corresponding apparatus for the dialogue task execution method, further enhancing the method's practicality. The apparatus can be described from both a functional module perspective and a hardware perspective. The dialogue task execution apparatus provided by this invention is described below. This apparatus is used to implement the dialogue task execution method provided by this invention. In this embodiment, the dialogue task execution apparatus may include or be divided into one or more program modules. These program modules are stored in a storage medium and executed by one or more processors to complete the dialogue task execution method disclosed in Embodiment 1. The program module referred to in this embodiment is a series of computer program instruction segments capable of performing a specific function, which is more suitable than the program itself for describing the execution process of the dialogue task execution apparatus in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment. The dialogue task execution apparatus described below can be referred to in correspondence with the dialogue task execution method described above.

[0066] From the perspective of functional modules, see Figure 5 , Figure 5 This is a structural diagram of the dialogue task execution device provided in this embodiment under one specific implementation. The device may include:

[0067] The professional data acquisition module 501 is used to acquire matching professional data, first prompt words, and second prompt words based on the professional field to which the dialogue task to be processed belongs.

[0068] The dialogue data extraction module 502 is used to input the first prompt word and professional data into the pre-trained dialogue data extraction model to obtain multiple sets of original dialogue data; the first prompt word is used to prompt the dialogue data extraction model to extract dialogue data from the professional data.

[0069] The dialogue data selection module 503 is used to automatically input the original dialogue data, professional data and second prompt words into the pre-trained dialogue data selection model when the task of the dialogue data extraction model is detected to be completed, so as to obtain the target dialogue data and construct the professional dataset; the second prompt words are used to prompt the dialogue data selection model to select dialogue data that matches the professional data from the original dialogue data.

[0070] The dialogue task execution module 504 is used to fine-tune the dialogue task model that has completed the pre-training process using a professional dataset, and to execute the dialogue task to be processed using the fine-tuned dialogue task model.

[0071] For example, in some embodiments of this example, the dialogue data selection module 503 can also be used to: obtain a supervised classification sample dataset, wherein the supervised classification sample dataset contains less than a first quantity threshold, each supervised classification sample includes multiple sets of document sample data and corresponding dialogue sample data, each supervised classification sample has a similarity value label and a label indicating whether the dialogue sample data meets the similarity condition, the similarity label being used to identify the degree of similarity between the document sample data and its corresponding dialogue sample data; train the target language model using the supervised classification sample dataset, so that the target language model has the ability to select dialogue data that meets the similarity condition; when the target trained language model reaches the preset model training stopping condition, the currently obtained target trained language model is used as the dialogue data selection model.

[0072] For example, in some other embodiments of this example, the above-mentioned apparatus may further include a user feedback module, which is used to: acquire historical questions, historical answers, and user feedback results of the dialogue task model executing historical dialogue tasks; wherein, the user feedback results include at least satisfactory answers, incorrect answers, and corresponding correct user answers; construct a question-and-answer task dataset based on each historical question and its corresponding historical answer and user feedback results; determine the weight values ​​of the losses corresponding to the task question dataset and the professional dataset respectively based on the degree of influence of the task question dataset and the professional dataset on the task execution results; adjust the loss function of the dialogue task model in the initial fine-tuning process according to the weight values ​​of the losses corresponding to the task question dataset and the professional dataset respectively, to obtain a joint loss function; when the data size of the question-and-answer task dataset reaches a preset size threshold, the joint loss function is used to fine-tune the dialogue task model again using the task question dataset and the professional dataset.

[0073] For example, in some other embodiments of this example, the above-mentioned device may further include a user feedback module, which may also be used to: obtain historical questions, historical answers, and user feedback results of the dialogue task model performing historical dialogue tasks; wherein, the user feedback results include at least satisfactory answers, incorrect answers, and corresponding correct user answers; construct a question-and-answer task dataset based on each historical question and its corresponding historical answer and user feedback results; and fine-tune the dialogue task model using the task question dataset whenever the new data scale of the question-and-answer task dataset reaches a preset threshold.

[0074] For example, in some other embodiments of this embodiment, the dialogue task execution module 504 can also be used to: pre-process multiple text data into blocks and convert each text block into corresponding text vector data to construct a knowledge base based on each text vector data; obtain the historical execution task of the dialogue task model and the target historical task related to the dialogue task to be processed; generate historical text based on the historical dialogue, historical prediction results and corresponding historical user feedback results corresponding to each target historical task; process the historical text into blocks and call the text vectorization model to vectorize each historical text block to obtain historical text vectors; send the historical text vectors to the knowledge base; process the task to be processed into vectors to obtain the dialogue vector to be queried; determine at least one candidate text vector that meets the preset vector similarity conditions for the dialogue vector to be queried in the knowledge base; input the third prompt word, at least one candidate text vector and the dialogue to be processed corresponding to the task to be processed into the fine-tuned dialogue task model; the third prompt word is used to prompt the fine-tuned dialogue task model to generate the corresponding result for the dialogue to be processed. For example, in some other embodiments of this example, the above-mentioned device may further include a user feedback module, which may also be used to: obtain the predicted answer corresponding to the question to be processed; obtain the user's feedback results on the satisfaction and accuracy of the predicted answer; take the question to be processed, the predicted answer and the corresponding user feedback results corresponding to the dialogue task to be processed as a set of historical question and answer sample data, and import the historical question and answer sample data into the knowledge base of the dialogue task model.

[0075] For example, in some other embodiments of this embodiment, the dialogue data extraction module 502 can also be used as follows: the dialogue data extraction model includes a first dialogue data extraction sub-model, a second dialogue data extraction sub-model, and a third dialogue data extraction sub-model; the first prompt word and professional data are respectively input into the first dialogue data extraction sub-model, the second dialogue data extraction sub-model, and the third dialogue data extraction sub-model; the first dialogue data extraction sub-model, the second dialogue data extraction sub-model, and the third dialogue data extraction sub-model extract dialogue data from the professional data according to the first prompt word; and multiple sets of original dialogue data are obtained based on the dialogue data extracted by the first dialogue data extraction sub-model, the second dialogue data extraction sub-model, and the third dialogue data extraction sub-model.

[0076] The dialogue task execution device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Figure 6 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. For example... Figure 6 As shown, the electronic device includes a memory 60 for storing a computer program; and a processor 61 for executing the computer program to implement the steps of the dialogue task execution method as described in any of the above embodiments.

[0077] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may also be a controller, microcontroller, microprocessor, or other data processing chip. The processor 61 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0078] The memory 60 may include one or more computer non-volatile storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the memory 60 may be an internal storage unit of an electronic device, such as a server hard drive. In other embodiments, the memory 60 may be an external storage device of an electronic device, such as a plug-in hard drive on a server, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the memory 60 may include both internal and external storage units of the electronic device. The memory 60 can be used not only to store application software and various types of data installed on the electronic device, such as program code during the execution of a dialogue task execution method, but also to temporarily store data that has been output or will be output. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, can implement the relevant steps of the dialogue task execution method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include, but is not limited to, data corresponding to the execution results of the dialogue task.

[0079] In some embodiments, the above-mentioned electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64 (or network interface), a power supply 65, and a communication bus 66. The display screen 62 and the input / output interface 63, such as a keyboard, are user interfaces. Exemplary user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a display screen or display unit, used to display information processed in the electronic device and to display a visual user interface. The communication interface 64 may exemplary include wired and / or wireless interfaces, such as a Wi-Fi interface, a Bluetooth interface, etc., typically used to establish communication connections between the electronic device and other electronic devices. The communication bus 66 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0080] It is understood that if the dialogue task execution method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the related technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes, but is not limited to, various media capable of storing program code, such as: USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, removable disk, CD-ROM, magnetic disk, or optical disk. Based on this, the present invention also provides a non-volatile storage medium storing a computer program, which, when executed by a processor, performs the steps of the dialogue task execution method as described in any of the above embodiments.

[0081] It is understood that if the dialogue task execution method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, the computer software product may not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities via a wired or wireless network to execute all or part of the steps of the methods in the various embodiments of the present invention. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the related technology, or all or part of the technical solution, can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product storing a computer program, which, when executed by a processor, performs the steps of the dialogue task execution method as described in any of the above embodiments.

[0082] The foregoing has provided a detailed description of the dialogue task execution method, electronic device, non-volatile storage medium, computer program product, and server provided by the present invention. The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Whether the units and algorithm steps of the various examples described in the disclosed embodiments are executed in electronic hardware or computer software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, and such implementations should not be considered beyond the scope of the present invention. Several improvements and modifications can be made to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A method for performing a dialogue task, characterized in that, include: Based on the professional field to which the dialogue task to be processed belongs, obtain matching professional data, first prompt words, and second prompt words; The first prompt word and the professional data are input into a pre-trained dialogue data extraction model to obtain multiple sets of raw dialogue data. The first prompt word is used to prompt the dialogue data extraction model to extract dialogue data from the professional data; When the task of the dialogue data extraction model is completed, the original dialogue data, the professional data, and the second prompt word are automatically input into the pre-trained dialogue data selection model to obtain the target dialogue data and construct the professional dataset. The second prompt word is used to prompt the dialogue data selection model to select dialogue data that matches the professional data from each original dialogue data; The dialogue task model that has completed the pre-training process was fine-tuned using the aforementioned professional dataset; The dialogue task to be processed is executed using the fine-tuned dialogue task model: Multiple text data are pre-processed into blocks, and each text block is converted into corresponding text vector data in order to build a knowledge base based on each text vector data; Obtain the historical execution task of the dialogue task model and the target historical task related to the dialogue task to be processed; Historical text is generated based on the historical dialogues, historical prediction results, and corresponding historical user feedback results for each target historical task. The historical text is divided into blocks, and the text vectorization model is called to vectorize each historical text block to obtain historical text vectors. Send historical text vectors to the knowledge base; The task to be processed is vectorized to obtain the query dialogue vector; For the query dialogue vector in the knowledge base, determine at least one candidate text vector that meets the preset vector similarity conditions; Input the third prompt word, at least one candidate text vector, and the dialogue to be processed corresponding to the task to be processed into the fine-tuned dialogue task model. The third prompt word is used to prompt the fine-tuned dialogue task model to generate corresponding results for the dialogue to be processed.

2. The dialogue task execution method according to claim 1, characterized in that, Before automatically inputting the original dialogue data, the professional data, and the second prompt word into the pre-trained dialogue data selection model, the method further includes: Obtain a supervised classification sample dataset, wherein the supervised classification sample dataset contains less than a first quantity threshold, each supervised classification sample includes multiple sets of document sample data and corresponding dialogue sample data, each supervised classification sample has a similarity value label and a label indicating whether the dialogue sample data meets the similarity condition, the similarity label is used to identify the degree of similarity between the document sample data and its corresponding dialogue sample data; The target language model is trained using the supervised classification sample dataset so that the target language model has the ability to select dialogue data that meets similar conditions; When the target training language model reaches the preset model training stop condition, the currently obtained target training language model is used as the dialogue data selection model.

3. The dialogue task execution method according to claim 1, characterized in that, After fine-tuning the dialogue task model that has completed the pre-training process using the professional dataset, the process further includes: The system obtains historical questions, historical answers, and user feedback results from the dialogue task model's execution of historical dialogue tasks; wherein the user feedback results include at least satisfactory answers, incorrect answers, and the corresponding correct user answers. A question-answering task dataset is constructed based on each historical question, its corresponding historical answers, and user feedback. Based on the degree of influence of the task problem dataset and the professional dataset on the task execution results, determine the weight values ​​of the loss corresponding to each of the task problem dataset and the professional dataset; Based on the weight values ​​of the losses corresponding to the task problem dataset and the professional dataset, the loss function of the dialogue task model in the initial fine-tuning process is adjusted to obtain the joint loss function; When the data size of the question-answering task dataset reaches a preset size threshold, the joint loss function is used to fine-tune the dialogue task model again using the task question dataset and the professional dataset.

4. The dialogue task execution method according to claim 1, characterized in that, After fine-tuning the dialogue task model that has completed the pre-training process using the professional dataset, the process further includes: The system obtains historical questions, historical answers, and user feedback results from the dialogue task model's execution of historical dialogue tasks; wherein the user feedback results include at least satisfactory answers, incorrect answers, and the corresponding correct user answers. A question-answering task dataset is constructed based on each historical question, its corresponding historical answers, and user feedback. Whenever the new data size of the question-answering task dataset reaches a preset threshold, the dialogue task model is fine-tuned using the task question dataset.

5. The dialogue task execution method according to claim 1, characterized in that, The dialogue task to be processed is a question-and-answer task, which includes at least a question to be processed. After executing the dialogue task to be processed using the fine-tuned dialogue task model, the process further includes: Obtain the predicted answer corresponding to the problem to be processed; Obtain user feedback on the satisfaction and accuracy of the predicted answers; The unprocessed questions, predicted answers, and corresponding user feedback results corresponding to the dialogue task to be processed are used as a set of historical question-and-answer sample data, and the historical question-and-answer sample data is imported into the knowledge base of the dialogue task model.

6. The dialogue task execution method according to any one of claims 1 to 5, characterized in that, The dialogue data extraction model includes a first dialogue data extraction sub-model, a second dialogue data extraction sub-model, and a third dialogue data extraction sub-model. The step of inputting the first prompt word and the professional data into a pre-trained dialogue data extraction model includes: The first prompt word and the professional data are respectively input into the first dialogue data extraction sub-model, the second dialogue data extraction sub-model and the third dialogue data extraction sub-model. The first dialogue data extraction sub-model, the second dialogue data extraction sub-model and the third dialogue data extraction sub-model extract dialogue data from the professional data according to the first prompt word. Multiple sets of original dialogue data are obtained based on the dialogue data extracted by the first dialogue data extraction sub-model, the second dialogue data extraction sub-model, and the third dialogue data extraction sub-model.

7. A dialogue task execution device, characterized in that, include: The professional data acquisition module is used to acquire matching professional data, first prompt words, and second prompt words based on the professional field to which the dialogue task to be processed belongs; The dialogue data extraction module is used to input the first prompt word and the professional data into a pre-trained dialogue data extraction model to obtain multiple sets of original dialogue data. The first prompt word is used to prompt the dialogue data extraction model to extract dialogue data from the professional data; The dialogue data selection module is used to automatically input each original dialogue data, the professional data, and the second prompt word into the pre-trained dialogue data selection model when the task of the dialogue data extraction model is detected to be completed, so as to obtain each target dialogue data and construct a professional dataset. The second prompt word is used to prompt the dialogue data selection model to select dialogue data that matches the professional data from each original dialogue data; The dialogue task execution module is used to fine-tune the dialogue task model that has completed the pre-training process using the professional dataset, and to execute the dialogue task to be processed using the fine-tuned dialogue task model. The dialogue task execution module is further configured to: pre-process multiple text data into blocks and convert each text block into corresponding text vector data to construct a knowledge base based on each text vector data; obtain the target historical tasks related to the dialogue task to be processed from the historical execution tasks of the dialogue task model; generate historical text based on the historical dialogues, historical prediction results, and corresponding historical user feedback results corresponding to each target historical task; process the historical text into blocks and call the text vectorization model to vectorize each historical text block to obtain historical text vectors; send the historical text vectors to the knowledge base; vectorize the task to be processed to obtain the query dialogue vector; determine at least one candidate text vector in the knowledge base that meets the preset vector similarity conditions for the query dialogue vector; input the third prompt word, at least one candidate text vector, and the task to be processed corresponding to the task to be processed into the fine-tuned dialogue task model; the third prompt word is used to prompt the fine-tuned dialogue task model to generate corresponding results for the task to be processed.

8. An electronic device, characterized in that, It includes a processor and a memory, wherein the processor is configured to implement the steps of the dialogue task execution method as described in any one of claims 1 to 6 when executing a computer program stored in the memory.

9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, which, when executed by a processor, implements the steps of the dialogue task execution method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Knowledge base text matching question and answer method, device and equipment based on dialogue model

    CN118427326A

  • Text dialogue generation model training method, text dialogue generation method and equipment

    CN118520976A