Data processing method and device based on human-computer interaction model, and program product

By configuring prompt information in the human-computer interaction model, positioning the target knowledge required for reply information and generating reply information with source marks, the problem of poor traceability in the existing technology is solved, and the traceability quality and reliability of reply information is improved.

CN120429385APending Publication Date: 2025-08-05ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410146782.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the existing human-computer interaction scheme based on search enhancement to generate RAG, the traceability capability is poor, uncontrollable traceability marks are easy to generate, and the traceability quality is low.

Method used

By configuring the prompt information, the user input information, candidate knowledge and prompt information are input into the human-computer interaction model. The model locates the target knowledge required for the reply information under the prompt, and generates reply information with source marks to control the source marks of the reply information to take values in the target knowledge marks.

Benefits of technology

It improves the traceability and quality of reply information, and improves the reliability and credibility of reply information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429385A_ABST
    Figure CN120429385A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device based on a human-computer interaction model and a program product. The method comprises the steps that input information, candidate knowledge matched with the input information and the prompt information are input into the human-computer interaction model by configuring the prompt information, and the human-computer interaction model carries out data processing on the input information under the prompt of the prompt information; the method comprises the following steps: firstly, positioning target knowledge required for replying input information, and taking the target knowledge as source knowledge of reply information so as to narrow the range of the source knowledge of the reply information; then, the reply information is generated according to the target knowledge, meanwhile, the source mark of the reply information is generated, the value of the source mark of the reply information in the mark of the target knowledge can be controlled, the source mark of the reply information cannot be the mark of other knowledge irrelevant to the reply information, and the reply information traceability and quality can be improved; and the accuracy of source marking of the reply information is improved, so that the reliability and credibility of the reply information are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a data processing method, device, and program product based on a human-computer interaction model. Background Art

[0002] With the continuous advancement of human-computer interaction technology, customers in these scenarios are hoping to cost-effectively leverage their existing data, including historical interaction data, databases, documents, and knowledge bases, to improve the quality of human-computer interaction. Increasingly, these scenarios require more specialized personnel, drawing on domain expertise to generate more professional responses. This is where Retrieval-Augmented Generation (RAG) technology comes in.

[0003] Based on the Retrieval Enhanced Generation (RAG) technology framework, the retrieval module retrieves relevant documents from unstructured documents related to the user's question. These documents are then fed into the human-computer interaction model to generate responses and traceability information. Users are very concerned about the source of responses, and traceability and identification of the source of responses is a core capability of this solution.

[0004] The current human-computer interaction solution based on retrieval-enhanced generation of RAGs relies entirely on the generative human-computer interaction model itself for traceability. Since generative models inherently have the common problem of uncontrollable generation results, they are prone to generating uncontrollable traceability tags. For example, the source knowledge corresponding to the traceability tag is irrelevant to the response, resulting in poor traceability and low quality. Summary of the Invention

[0005] The present application provides a data processing method, device and program product based on a human-computer interaction model to solve the problem that the existing RAG-based human-computer interaction solution easily generates uncontrollable traceability marks, has poor traceability capabilities and low quality.

[0006] In a first aspect, the present application provides a data processing method based on a human-computer interaction model, which is applied to a given first server running a human-computer interaction system, and the method includes:

[0007] Receive user input information and obtain candidate knowledge matching the input information;

[0008] Inputting the input information, candidate knowledge, and configured prompt information into a human-computer interaction model, locating target knowledge required to answer the input information from the candidate knowledge based on the prompt information through the human-computer interaction model, using the target knowledge as the source knowledge of the answer information, and generating answer information with a source tag based on the target knowledge, wherein the source tag is used to mark the source knowledge of the answer information;

[0009] Outputting the reply information with the source tag and the source knowledge of the reply information.

[0010] In a second aspect, the present application provides a data processing method based on a human-computer interaction model, which is applied to a second server running the human-computer interaction model, and the method includes:

[0011] Receiving a call request from the first server to the human-computer interaction model, the call request including user input information, candidate knowledge matched by the input information, and prompt information;

[0012] Inputting the user's input information, candidate knowledge matched with the input information, and prompt information into a human-computer interaction model, locating target knowledge required to reply to the input information from the candidate knowledge through the prompt of the human-computer interaction model based on the prompt information, using the target knowledge as the source knowledge of the reply information, and generating reply information with a source tag based on the target knowledge, wherein the source tag is used to mark the source knowledge of the reply information;

[0013] The reply information with the source tag is sent to the first server.

[0014] In a third aspect, the present application provides a server, comprising:

[0015] at least one processor;

[0016] and a memory communicatively coupled to the at least one processor;

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the server to perform the method provided in any of the aforementioned aspects.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method provided in any of the aforementioned aspects is implemented.

[0019] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method provided in any of the aforementioned aspects.

[0020] The data processing method, device and program product based on the human-computer interaction model provided by the present application input the input information, the candidate knowledge matched by the input information and the prompt information into the human-computer interaction model by configuring prompt information. Under the prompt of the prompt information, the human-computer interaction model first locates the target knowledge required to reply to the input information, and uses these target knowledge as the source knowledge of the reply information, thereby narrowing the scope of the source knowledge of the reply information; then generates the reply information according to these target knowledge, and generates the source tag of the reply information at the same time, which can control the source tag of the reply information to take the value in the tag of the target knowledge, and cannot be the tag of other knowledge unrelated to the reply information, which can improve the ability and quality of tracing the reply information, improve the accuracy of the source tag of the reply information, and thus improve the reliability and credibility of the reply information. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0022] Figure 1 A schematic diagram of an exemplary system architecture applicable to this application;

[0023] Figure 2 A flow chart of a data processing method based on a human-computer interaction model provided by an exemplary embodiment of the present application;

[0024] Figure 3 A flowchart of data processing based on a human-computer interaction model provided by an exemplary embodiment of the present application;

[0025] Figure 4 A flowchart of a human-computer interaction method including a traceability verification strategy provided for an exemplary embodiment of the present application;

[0026] Figure 5 A flow chart of a data processing method based on a human-computer interaction model provided by another exemplary embodiment of the present application;

[0027] Figure 6 A flowchart for fine-tuning the traceability generation capability of the human-computer interaction model provided in one embodiment of the present application;

[0028] Figure 7 An interactive flow chart of a data processing method based on a human-computer interaction model provided in one embodiment of the present application;

[0029] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application.

[0030] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0032] It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0033] First, let’s explain the terms involved in this application:

[0034] Knowledge tracing: refers to tracing the source of the generated response in the human-computer interaction solution based on retrieval-enhanced RAG generation, and marking the source in the response.

[0035] Fine-tuning training: also known as fine-tuning, refers to training the pre-trained model using supervised data of a specific task, so that the pre-trained model can adapt to specific tasks and scenarios.

[0036] Prompts: Also known as prompt engineering, or prompt templates in Chinese, refer to a carefully designed set of question patterns used in the design of instructions related to large models. Algorithm engineers, through methods such as intent understanding, fill in user questions into these patterns, deriving instructions for input into the large model, which is then fed into the model. Well-designed prompts often unleash the potential of large models, achieving better results than without them.

[0037] Chain of Thought (COT): Broadly speaking, it refers to a series of logical reasoning steps that ultimately form a complete semantic understanding process. In large-scale models, this specifically refers to the semantic understanding process integrated into prompt engineering for specific types of instructions, such as the steps required to answer and key points to focus on. Chain of Thought is like factoring, breaking down complex problems into smaller pieces to ultimately produce high-quality answers.

[0038] Slots define key information that needs to be filled in the prompt. Preset placeholders are used in the prompt. To fill a slot, simply replace the placeholder with data. In this embodiment, there are two types of slots that need to be filled in the prompt: one type is used to fill the user's input information (query), called the first slot; the other type is used to fill candidate knowledge, called the second slot.

[0039] Visual question answering task: Given an input image and a question, determine the answer to the question from the visual information of the input image.

[0040] Image description task: Generate description text for the input image.

[0041] Visual entailment task: predict the semantic relevance of an input image and text, i.e., entailment, neutrality, or contradiction.

[0042] Referential expression and comprehension task: locate the image area corresponding to the input text in the input image based on the input text.

[0043] Image generation task: Generate an image based on the input description text.

[0044] Text-based sentiment classification task: predict the sentiment classification information of the input text.

[0045] Text summarization task: Generate summary information of the input text.

[0046] Multimodal tasks: refers to downstream tasks whose input and output data involve multiple modal data such as images and text, such as visual question answering tasks, image description tasks, visual implication tasks, referential expression and understanding tasks, image generation tasks, etc.

[0047] Multimodal pre-trained model: refers to a pre-trained model whose input and output data involve multiple modal data such as images and text. After fine-tuning and training, it can be applied to multimodal task processing.

[0048] Pre-trained language model: A pre-trained model obtained by pre-training a large-scale language model (LLM).

[0049] Large models refer to deep learning models with large-scale model parameters, typically containing hundreds of millions, tens of billions, or even hundreds of billions of model parameters. Large models, also known as foundation models (FMs), are pre-trained on large amounts of unlabeled corpora, producing pre-trained models with parameters exceeding 100 million. These models are adaptable to a wide range of downstream tasks and exhibit good generalization capabilities, such as large language models (LLMs) and multi-modal pre-training models.

[0050] When large models are used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0051] In response to the problems that the existing human-computer interaction scheme based on retrieval enhancement generation of RAG is prone to generate uncontrollable traceability marks, poor traceability capabilities and low quality, the present application provides a data processing method based on a human-computer interaction model, including: receiving user input information, retrieving candidate knowledge matching the input information; based on the input information, candidate knowledge and configured prompt information, calling the human-computer interaction model, locating the target knowledge required to reply to the input information in the candidate knowledge based on the prompt information of the human-computer interaction model, using the target knowledge as the source knowledge of the reply information, generating reply information with a source tag based on the target knowledge, and the source tag being used to mark the source knowledge of the reply information; outputting the reply information with the source tag and the source knowledge of the reply information.

[0052] In actual applications, the candidate knowledge that matches the retrieved input information is relatively broad, but not all candidate knowledge is required to reply to the input information. In many cases, a part of the candidate knowledge can be used to generate a reply. In the method of the embodiment of the present application, by configuring prompt information, under the prompt of the prompt information, the human-computer interaction model first locates the target knowledge required to reply to the input information, and uses these target knowledge as the source knowledge of the reply information, thereby narrowing the scope of the source knowledge of the reply information; then, the reply information is generated based on these target knowledge, and the source tag of the reply information is generated at the same time. The source tag of the reply information can be controlled to take values in the tag of the target knowledge, and cannot be the tag of other knowledge unrelated to the reply information, so as to improve the ability and quality of knowledge traceability of the reply information, and improve the reliability and credibility of the reply information. Moreover, by first locating the target knowledge required to reply to the input information to narrow the scope of the candidate knowledge, and then generating the reply information based on the located target knowledge, the accuracy of the generated reply information and the source tag can be improved to a certain extent.

[0053] Figure 1 This is a schematic diagram of an example system architecture applicable to this application. Figure 1 As shown, the system architecture includes a first server, a second server, and an end-side device. A communication link is provided between the first server and the end-side device, enabling communication between the first server and the end-side device. A communication link is provided between the first server and the second server, enabling communication between the first server and the second server.

[0054] The first server is a device that implements human-computer interaction functions. Specifically, it can be a device with computing power deployed in the cloud or locally, such as a human-computer interaction system for various human-computer dialogue scenarios, such as digital assistants and intelligent robots. The first server is responsible for configuring prompt information for use, receiving user input information sent by the end-side device, obtaining candidate knowledge that matches the input information, and based on the user input information, candidate knowledge, and prompt information, calling the human-computer interaction model to generate reply information with source tags and source knowledge of the reply information. The first server then outputs the reply information with source tags and source knowledge of the reply information to the end-side device.

[0055] End-side devices refer to electronic devices used by users of the human-computer interaction system. Specifically, they can be hardware devices with network communication, computing, and information display functions, including but not limited to smartphones, tablets, desktop computers, local servers, cloud servers, etc. Users send their input information to the first server through the end-side device, receive reply information with source tags and source knowledge of the reply information from the first server, and output the reply information with source tags and source knowledge of the reply information to the user.

[0056] The second server is a computing device deployed in the cloud or locally, such as a cloud cluster. It stores a human-computer interaction model that can generate source-tracing information based on prompts and obtain source-tagged responses. In an optional embodiment, the second server can also be responsible for constructing a fine-tuning dataset and prompt information, and fine-tuning the pre-trained model to obtain a human-computer interaction model with this traceability capability.

[0057] based on Figure 1 The system architecture shown in the figure, the specific process of human-computer interaction includes:

[0058] The user inputs the user's input information through the terminal-side device, and the terminal-side device sends the user's input information to the first server.

[0059] The first server receives the user's input information sent by the terminal device, obtains candidate knowledge matching the input information, and sends a call request for the human-computer interaction model to the second server. The call request includes prompt information based on the input information, candidate knowledge and configuration.

[0060] The second server inputs the input information, candidate knowledge, and configured prompt information into the human-computer interaction model. Based on the prompt information, the human-computer interaction model locates the target knowledge required to respond to the input information from the candidate knowledge. The target knowledge is used as the source knowledge for the response information. Based on the target knowledge, the second server generates response information with a source tag. The source tag is used to identify the source knowledge of the response information. Furthermore, the second server returns the response information with the source tag to the first server.

[0061] The first server receives the reply information with the source tag returned by the second server, and sends the reply information with the source tag and the source knowledge of the reply information to the terminal device.

[0062] The terminal side device receives the reply information with the source tag and the source knowledge of the reply information sent by the first server, and outputs the reply information with the source tag and the source knowledge of the reply information to the user.

[0063] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0064] Figure 2 This is a flow chart of a data processing method based on a human-computer interaction model provided by an exemplary embodiment of the present application. The execution subject of this embodiment is the first server running the human-computer interaction system. Figure 2 As shown, the specific steps of this method are as follows:

[0065] Step S201: Receive user input information.

[0066] In actual applications, the user can input user input information through the terminal side device, and the terminal side device sends the user input information to the first server running the human-computer interaction system. The first server receives the user input information sent by the terminal side device.

[0067] Step S202: Obtain candidate knowledge that matches the input information.

[0068] The human-computer interaction system for generating RAG based on retrieval enhancement includes a retrieval module, which is loaded into a knowledge base to retrieve candidate knowledge matching input information.

[0069] Optionally, the first server has a retrieval module function. In this step, the first server retrieves candidate knowledge matching the input information from the knowledge base.

[0070] Alternatively, the retrieval module of the human-computer interaction system may be implemented using a separate retrieval engine. In this step, the first server sends a retrieval request containing input information to the retrieval engine. In response to the retrieval request, the retrieval engine searches the knowledge base for candidate knowledge matching the input information based on the input information and returns the retrieved candidate knowledge to the first server. The first server receives the candidate knowledge matching the input information sent by the retrieval engine.

[0071] In an optional embodiment, the knowledge base stores both knowledge text and vector representations of the knowledge text. When searching the knowledge base for candidate knowledge matching the input information, the first server may obtain the vector representation of the input information and perform a multi-path search in the knowledge base based on the text and vector representations of the input information to obtain candidate knowledge matching the input information.

[0072] Specifically, the first server performs a first search based on the text of the input information, and performs a second search based on the vector representation of the input information.

[0073] Among them, the process of the first retrieval is as follows: the first server matches the text of the input information with the knowledge text in the knowledge base for text similarity, and determines the knowledge with higher text similarity to the input information as the candidate knowledge matching the input information based on the text similarity between the input information and the knowledge in the knowledge base.

[0074] Optionally, the first server may retrieve, from the knowledge base, knowledge items whose textual similarity to the input information is greater than or equal to a textual similarity threshold based on the textual similarity between the input information and the knowledge items in the knowledge base, thereby obtaining candidate knowledge items that match the input information. The textual similarity threshold can be set and adjusted based on actual application scenarios and empirical data, and is not specifically limited herein.

[0075] Optionally, the first server may further recall a first preset number of candidate knowledge items based on the textual similarity between the input information and the knowledge items in the knowledge base. The first preset number is a positive integer, and the value of the first preset number can be set and adjusted based on actual application scenarios and empirical values. For example, the first preset number can be 1, 3, 5, etc., and is not specifically limited here.

[0076] The textual similarity between the input information and the knowledge in the knowledge base, that is, the textual similarity between the input information and the knowledge text, can be implemented using a text matching algorithm based on term frequency, such as a text matching algorithm based on term frequency-inverse document frequency (TF-IDF) or the BM25 algorithm. The TF-IDF and BM25 algorithms are mainstream algorithms for calculating similarity scores between user input information (query) and documents. This embodiment is used to calculate the textual similarity between user input information and knowledge in the knowledge base.

[0077] The process of the second retrieval is as follows: the first server performs vector similarity matching on the vector representation of the input information and the vector representation of the knowledge in the knowledge base, calculates the similarity between the vector representation of the input information and the vector representation of the knowledge in the knowledge base as the vector similarity between the input information and the knowledge in the knowledge base, and determines the knowledge with higher vector similarity with the input information as the candidate knowledge matching the input information.

[0078] Optionally, based on the vector similarity between the input information and the knowledge in the knowledge base, the first server may retrieve knowledge from the knowledge base whose vector similarity to the input information is greater than or equal to a vector similarity threshold, thereby obtaining candidate knowledge that matches the input information. The vector similarity threshold can be set and adjusted based on actual application scenarios and empirical values, and is not specifically limited here.

[0079] Optionally, the first server may further recall a second preset number of candidate knowledge items based on vector similarity between the input information and the knowledge in the knowledge base. The second preset number is a positive integer. The value of the second preset number can be set and adjusted based on actual application scenarios and experience. For example, the second preset number can be 1, 3, 5, etc., and is not specifically limited here.

[0080] Among them, the vector similarity between the input information and the knowledge in the knowledge base can be the cosine similarity between the vector representation of the input information and the vector representation of the knowledge, or it can be other other vector similarity or distance indicators commonly used to measure the similarity between two vector representations, such as Euclidean distance, Manhattan distance, etc., which are not specifically limited here in this embodiment.

[0081] In another optional embodiment, the knowledge base may only store knowledge texts. When searching the knowledge base for candidate knowledge matching the input information, the first server may obtain the candidate knowledge matching the input information through the aforementioned first search based on text similarity.

[0082] In another optional embodiment, the knowledge base may store vector representations of knowledge texts. When searching the knowledge base for candidate knowledge matching the input information, the first server may obtain candidate knowledge matching the input information through the aforementioned first search based on text similarity.

[0083] Obtain a vector representation of the input information. When searching the knowledge base for candidate knowledge matching the input information based on the text and vector representation of the input information, the first server can obtain the vector representation of the input information and obtain the candidate knowledge matching the input information through the aforementioned second-path retrieval based on vector similarity.

[0084] In this embodiment, the specific implementation of the search module in the human-computer interaction system can be implemented using any existing solution with similar functions, and is not specifically limited here.

[0085] Step S203: Input the input information, candidate knowledge and configured prompt information into the human-computer interaction model. Through the prompt information, the human-computer interaction model locates the target knowledge required to reply to the input information in the candidate knowledge. The target knowledge is used as the source knowledge of the reply information. Reply information with a source tag is generated according to the target knowledge. The source tag is used to mark the source knowledge of the reply information.

[0086] After obtaining the input information and the matching candidate knowledge, in this step, the first server uses the human-computer interaction model to first locate the target knowledge required to reply to the input information in the candidate knowledge based on the prompt information, and uses the target knowledge as the source knowledge of the reply information to narrow the scope of the source knowledge of the reply information; then generates reply information with a source tag based on the target knowledge, which can control the source tag of the reply information to take values in the tag of the target knowledge, and cannot be the tag of other candidate knowledge that is not related to the reply information. Among them, the source knowledge of the reply information refers to the candidate knowledge that contributes to the generation of the reply information, that is, the candidate knowledge used to generate the reply information. In this embodiment, the source knowledge can be determined for the reply information as a whole, that is, coarse-grained tracing can be performed; or the source knowledge can be determined for one or more content segments in the reply information, that is, fine-grained tracing can be performed.

[0087] In this embodiment, the prompt information includes: a first slot for inserting input information, a second slot for inserting candidate knowledge, a thinking chain, and a response output mode.

[0088] A slot is a definition of key information that needs to be filled in a prompt. Preset placeholders are used in the prompt. To fill a slot, simply replace the placeholder with data. In this embodiment, there are two types of slots that need to be filled in the prompt: one for the user's input information (query), referred to as the first slot; the other for candidate knowledge, referred to as the second slot. There are two types of slots that need to be filled in the prompt: the first slot and the second slot.

[0089] The thought chain breaks down the process of generating a response into the following steps: S1. Locate the target knowledge required to respond to the input information within the candidate knowledge set, using this knowledge as the source knowledge for the response; S2. Generate a response with a source tag based on the target knowledge. Furthermore, the thought chain can include requirements for tracing back to the source, such as language for refusing a response or fallbacks for when a response cannot be generated. It can also include one or more dialogue examples that illustrate the thought process based on the thought chain.

[0090] The reply output mode specifies the location of the source tag in the reply information. Different prompt information has different reply output modes, and different reply output modes correspond to different traceability granularity.

[0091] For example, the following is an example of a prompt message:

[0092] “Based on the provided traceability generation requirements and candidate knowledge, answer the user’s relevant questions in accordance with the requirements of the traceability generation requirements:

[0093] #Traceability generation requirements:

[0094] ##Guaranteed Talk

[0095] none

[0096] ##Reply output mode

[0097] Use [number] at the appropriate place in the reply message to indicate the source of the reply message.

[0098] Other Requirements

[0099] Please output in the following two steps: 1. Locate what knowledge is needed to answer the user's question; 2. Generate reply information that conforms to the reply output mode based on the knowledge located in the previous step (note that the source tag [number] in the reply information should be the tag of the knowledge located in the previous step); 3. Output the reply information generated in the previous step.

[0100] #Example

[0101] User question: ...?

[0102] Candidate knowledge: {[1]knowledge_1,[2]knowledge_2,…,[n]knowledge_n};

[0103] Thinking process: In order to answer user questions, we need to refer to the content in knowledge [1] and [2].

[0104] Reply: …[1], …, …[2], ….

[0105] ...(several examples omitted here)...

[0106] #The following are user questions and candidate knowledge

[0107] User question: {query}

[0108] Candidate knowledge: {knowledge s}

[0109] Reply message: ".

[0110] The thought chain in the prompt message reads: "Please output in the following two steps: 1. Locate the knowledge needed to answer the user's question; 2. Generate a response that conforms to the response output mode based on the knowledge located in the previous step (note that the source tag [number] in the response should be the tag of the knowledge located in the previous step); 3. Output the response generated in the previous step." This thought chain divides the response generation process into two steps: locating the target knowledge required to answer the input information as the source knowledge of the response information; and generating the response information with the source tag based on the target knowledge. {query} represents the first slot to be filled with the input information. {knowledge s} represents the second slot to be filled with the candidate knowledge. When filling in the candidate knowledge, it can be filled in based on the format of "[1]knowledge_1,[2]knowledge_2,……,[n]knowledge_n". Different candidate knowledge is separated by commas, and the "[]" part in front of each candidate knowledge is the tag of the candidate knowledge.

[0111] In this embodiment, the specific content and format of the prompt information used by the human-computer interaction system can be designed and configured by relevant technical personnel (such as administrators of the human-computer interaction system) based on actual system requirements and experience, and are not specifically limited here.

[0112] In an optional embodiment, the first server may pre-store multiple prompts of different traceability granularities as alternative prompts for the relevant technician to select and configure as the prompt information currently used by the human-computer interaction system. In this way, when applied to different human-computer interaction systems, the relevant technician can select prompts of appropriate traceability granularity according to their own application requirements.

[0113] Among them, the reply output modes for different prompt information are different, and different reply output modes correspond to different traceability granularities. Coarse-grained traceability can be used to trace the entire reply information, that is, to mark which target knowledge the reply information as a whole comes from. Finer-grained traceability can be used to trace the longer content segments (such as a sentence, a paragraph, content segments separated by punctuation marks, etc.) in the reply information, that is, to mark the source of each longer content segment. Finer-grained traceability can be used to trace the shorter content segments (such as a word, a phrase, a sentence, etc.) in the reply information, that is, to mark the source of each shorter content segment.

[0114] Specifically, a technician can submit a prompt information configuration request to the first server via a front-end visual interface or a command line. In response to the prompt information configuration request, the first server can output multiple alternative prompt information. Different prompt information has different response output modes, and different response output modes correspond to different traceability granularities.

[0115] Optionally, the first server can also output multiple alternative prompt information through a visual interface, and output description information of the traceability granularity of each prompt information. The description information describes the traceability granularity of the prompt information, for example, the traceability granularity of the prompt information can be explained through one or more dialogue examples.

[0116] A relevant technician can select an alternative prompt information on the visual interface as the prompt information currently used by the human-computer interaction system. In response to the selection operation of any prompt information, the first server configures the selected prompt information as the currently used prompt information. The selection operation of any prompt information can be an operation of selecting any alternative prompt information and determining to submit it as the final selected alternative prompt information. The specific implementation method is not specifically limited here.

[0117] In an optional embodiment, the following alternative prompt information can be pre-constructed and provided: coarse-grained prompt information and fine-grained prompt information. The coarse-grained prompt information has a reply output mode of outputting all source tags at the end of the reply information. The fine-grained prompt information has a reply output mode of inserting a source tag for at least one content segment into the reply information.

[0118] For example, an example of a reply output mode of coarse-grained prompt information is as follows:

[0119] Use [number] at the end of your reply to identify all sources of your reply.

[0120] Accordingly, the format of a reply message generated based on the above coarse-grained prompt information is as follows:

[0121] …, …, …, …[1][2][3]. The reply information indicates that the entire reply information comes from knowledge [1][2] and [3].

[0122] For example, an example of a reply output mode of fine-grained prompt information is as follows:

[0123] Use [number] at the appropriate place in the reply message to indicate the source of the reply message.

[0124] Accordingly, the format of a reply message generated based on the above fine-grained prompt information is as follows:

[0125] …[1], …[2], …, …[2][3]. The omitted reply fragment at the first “…” in the reply message comes from knowledge [1], the omitted reply fragment at the second “…” comes from knowledge [2], the omitted reply fragment at the fourth “…” comes from knowledge [2] and [3], and the omitted reply fragment at the third “…” has no corresponding knowledge source and may be a general wording.

[0126] In an optional system architecture, the human-computer interaction model can run on the first server. In this step, the first server can call the locally running human-computer interaction model, insert the input information and candidate knowledge into the corresponding slots of the prompt information, and obtain a traceability generation instruction; the traceability generation instruction is input into the human-computer interaction model, and the human-computer interaction model generates a reply message with a source tag. Optionally, the first server can also splice the input information, candidate knowledge, and prompt information and input them into the human-computer interaction model, and the human-computer interaction model generates a reply message with a source tag.

[0127] Step S204: output the reply information with the source tag and the source knowledge of the reply information.

[0128] After generating the reply information with the source tag, the first server outputs the reply information with the source tag and the source knowledge of the reply information to the terminal device, so as to provide the reply information to the user while providing a reliable source of the reply information, thereby improving the credibility and reliability of the reply information.

[0129] The method of this embodiment configures prompt information, so that the human-computer interaction model first locates the target knowledge required to reply to the input information under the prompt of the prompt information, and uses this target knowledge as the source knowledge of the reply information, so as to narrow the scope of the source knowledge of the reply information; then the reply information is generated based on this target knowledge, and the source tag of the reply information is generated at the same time. The source tag of the reply information can be controlled to take values in the tag of the target knowledge, and cannot be the tag of other knowledge unrelated to the reply information. The ability and quality of tracing the reply information can be improved, and the accuracy of the source tag of the reply information can be improved, thereby improving the reliability and credibility of the reply information.

[0130] Figure 3 The process framework diagram of data processing based on the human-computer interaction model provided in this embodiment is as follows: Figure 3As shown in the figure, the process framework includes: receiving user input information, retrieving candidate knowledge matching the input information from the knowledge base based on the input information; after filling the input information and candidate knowledge into the prompt information, inputting it into the human-computer interaction model, and generating reply information with source tags through the human-computer interaction model. The human-computer interaction model can be obtained by fine-tuning the pre-trained model by fine-tuning the dataset. Among them, the pre-trained model can be any existing human-computer interaction model based on retrieval enhancement to generate RAG, and can be obtained by training a basic large model such as a large-scale pre-trained language model (LLM).

[0131] In an optional embodiment, after obtaining the reply information with a source tag, the first server can also determine the relevance of the marked reply content and the corresponding source knowledge based on the source tag carried by the reply information; according to the configured traceability verification strategy, according to the relevance of the marked reply content and the corresponding source knowledge, the source tag carried by the reply information is corrected, so that the source knowledge corresponding to the source tag is strongly correlated with the marked reply content, which can improve the accuracy and quality of the source tag of the reply information.

[0132] Among them, for any source tag in the reply information, the source tag corresponds to a source knowledge, and the source tag is used to mark the source of the reply information as a whole or a content fragment in the reply information. For specific examples, please refer to the example of the format of the reply information generated based on coarse-grained prompt information and fine-grained prompt information in the aforementioned embodiment, which will not be repeated here.

[0133] Specifically, for any source tag in the reply information, the first server can verify and correct it in the following manner: obtain the reply content marked by the source tag in the reply information, and the source knowledge corresponding to the source tag, and calculate the correlation between the marked reply content and the source knowledge corresponding to the source tag. The correlation between the marked reply content and the source knowledge can be calculated using a correlation calculation algorithm, specifically a low-order similarity calculation algorithm such as the longest common substring, edit distance, or a high-order similarity calculation algorithm such as a single tower model based on a cross encoder, which is not specifically limited in this embodiment.

[0134] Optionally, the configured traceability verification strategy may include: deleting low-relevance source tags in the reply information. Specifically, when the relevance between the marked reply content and the corresponding source knowledge is less than or equal to a first relevance threshold, it indicates that the marked reply content has a low relevance to the corresponding source knowledge. The source tag is deleted from the reply information to reduce the number of source tags in the reply information that are less relevant to the reply information, thereby improving the accuracy and quality of the source tags in the reply information.

[0135] Optionally, the configured traceability verification strategy may include replacing less relevant source tags in the reply information with more relevant source tags. Specifically, the relevance between the marked reply content and each target knowledge is calculated. If there is at least one target knowledge whose relevance to the marked reply content is greater than the relevance between the marked reply content and the source knowledge corresponding to the source tag, the tag of the target knowledge with the highest relevance to the marked reply content is used to replace the source tag.

[0136] Optionally, the configured traceability verification strategy may include: in the case of fine-grained traceability, for content fragments for which no source tag is given in the reply information, calculating the relevance of the content fragment with each target knowledge, and marking the content fragment with the source tag of the target knowledge with the highest relevance to the content fragment.

[0137] In addition, the correlation calculation algorithm used can also be configured in the traceability verification strategy, and different traceability verification strategies can be configured to use different correlation calculation algorithms.

[0138] It should be noted that the relevance of the source tag in this embodiment refers to the relevance between the source knowledge corresponding to the source tag and the tagged reply content. In actual applications, the traceability verification strategy can be configured and adjusted by relevant technical personnel based on actual system requirements. For example, users in different human-computer interaction systems have different requirements for the relevance of the source tag in the reply information. Some users want the reply content with the source tag to be strongly related to the corresponding source knowledge, while others feel that a rough reference source tag is sufficient. Relevant technical personnel can configure different traceability verification strategies based on the user's requirements for the relevance of the source tag in the reply information. The verification method of the traceability verification strategy is not specifically limited here.

[0139] In an optional embodiment, the first server may pre-store multiple alternative verification strategies with varying degrees of strictness for the relevant technician to select and configure as the traceability verification strategy currently used by the human-computer interaction system. In this way, when applied to different human-computer interaction systems, the relevant technician can select the appropriate traceability verification strategy and configure it according to their own application requirements.

[0140] Relevant technicians can submit a traceability verification strategy configuration request to the first server through a front-end visual interface or a command line. In response to the traceability verification strategy configuration request, the first server can output multiple alternative verification strategies.

[0141] Optionally, in response to a configuration request for a traceability verification strategy, multiple alternative verification strategies with different verification strictness levels are output. Furthermore, the first server may also output, via the visual interface, descriptive information about the verification strictness of each alternative verification strategy, so that users can understand the different verification strictness levels of different alternative verification strategies based on this descriptive information. For example, a ranking of the verification strictness of multiple alternative verification strategies may be provided, or examples of source markings based on different alternative verification strategies may be provided for the same set of response information and candidate knowledge.

[0142] Relevant technicians can select an alternative verification strategy on the visual interface as the traceability verification strategy currently used by the human-computer interaction system. In response to the selection operation of any alternative verification strategy, the first server configures the selected alternative verification strategy as the currently used traceability verification strategy. The selection operation of any alternative verification strategy can be an operation of selecting any alternative verification strategy and determining to submit it as the final selected traceability verification strategy. The specific implementation method is not specifically limited here.

[0143] Figure 4 A flowchart of a human-computer interaction method including a traceability verification strategy is provided for an exemplary embodiment of the present application, such as Figure 4 As shown, the specific steps of this method are as follows:

[0144] Step S401: Receive user input information.

[0145] Step S402: Obtain candidate knowledge that matches the input information.

[0146] Step S403: Input the input information, candidate knowledge and configured prompt information into the human-computer interaction model. Through the prompt information, the human-computer interaction model locates the target knowledge required to reply to the input information in the candidate knowledge. The target knowledge is used as the source knowledge of the reply information. Reply information with a source tag is generated based on the target knowledge. The source tag is used to mark the source knowledge of the reply information.

[0147] Step S404: Determine the relevance between the marked reply content and the corresponding source knowledge based on the source tag carried by the reply information.

[0148] Step S405: According to the configured traceability verification strategy, the source tag of the reply information is corrected according to the relevance between the marked reply content and the corresponding source knowledge, and the reply information with the corrected source tag is obtained.

[0149] Step S406: output the reply information with the corrected source tag and the source knowledge of the reply information.

[0150] It should be noted that when the source tag of the reply information changes, the source knowledge of the reply information also changes with the change of the source tag. In this step, the source knowledge of the reply information output includes the source knowledge corresponding to the revised source tag.

[0151] The implementation principles and technical effects of each step in this embodiment refer to the above embodiments and will not be repeated here.

[0152] In an example scenario, based on Figure 1 In the system architecture shown, the human-computer interaction system runs on the first server, and the human-computer interaction model runs on the second server. In the following embodiment, the processing flow of the second server running the human-computer interaction system is described in detail.

[0153] Figure 5 This is a flow chart of a data processing method based on a human-computer interaction model provided by another exemplary embodiment of the present application. The execution subject of this embodiment is a second server running the human-computer interaction model. Figure 5 As shown, the specific steps of this method are as follows:

[0154] Step S501: Receive a call request from a first server to a human-computer interaction model, where the call request includes user input information, candidate knowledge matched with the input information, and prompt information.

[0155] In this embodiment, the second server receives a call request for the human-computer interaction model sent by the first server, where the call request includes user input information, candidate knowledge matched with the input information, and prompt information.

[0156] The prompt information includes at least: the first slot to insert the input information, the second slot to insert the candidate knowledge, a thought chain, and a response output mode. The thought chain instructs the human-computer interaction model to split the response generation process into the following steps: locating the target knowledge required to respond to the input information within the candidate knowledge as the source knowledge for the response; and generating a response with a source tag based on the target knowledge. The response output mode specifies the location of the source tag in the response information, with different response output modes corresponding to different traceability granularity.

[0157] Step S502: input the user's input information, candidate knowledge matching the input information, and prompt information into the human-computer interaction model; locate the target knowledge required to reply to the input information in the candidate knowledge through the prompt of the human-computer interaction model based on the prompt information; use the target knowledge as the source knowledge of the reply information; generate reply information with a source tag based on the target knowledge; the source tag is used to mark the source knowledge of the reply information.

[0158] In an example scenario, the first server inserts the input information and candidate knowledge into the configured prompt information, generates a traceability generation instruction, uses the traceability generation instruction as input data, and sends a call request for the service interface of the human-computer interaction model to the second server, where the call request contains the traceability generation instruction. In the aforementioned step S501, after receiving the call request for the human-computer interaction model, the second server can extract the traceability generation instruction from the call request, where the traceability generation instruction contains the user's input information, candidate knowledge matched with the input information, and prompt information. In step S502, the second server inputs the traceability generation instruction into the human-computer interaction model, locates the target knowledge required to reply to the input information in the candidate knowledge based on the prompt information in the traceability generation instruction through the human-computer interaction model, uses the target knowledge as the source knowledge of the reply information, and generates reply information with a source tag based on the target knowledge.

[0159] In another example scenario, the first server can splice the user's input information, the candidate knowledge that matches the input information, and the prompt information, and use them as input data for the human-computer interaction model, and carry them in a call request to send them to the second server. In the aforementioned step S501, after receiving the call request for the human-computer interaction model, the second server can extract the splicing result of the user's input information, the candidate knowledge that matches the input information, and the prompt information from the call request. In step S502, the second server inputs the splicing result of the user's input information, the candidate knowledge that matches the input information, and the prompt information into the human-computer interaction model, and locates the target knowledge required to reply to the input information in the candidate knowledge based on the prompt information in the splicing result through the human-computer interaction model, uses the target knowledge as the source knowledge of the reply information, and generates reply information with a source tag based on the target knowledge.

[0160] Step S503: Send a reply message with a source tag to the first server.

[0161] After generating the reply information with the source tag through the human-computer interaction model, the second server sends the reply information with the source tag to the first server.

[0162] In this embodiment, through a human-computer interaction model with traceability generation capabilities, under the prompt of prompt information, the target knowledge required to reply to the input information is first located, and these target knowledge are used as the source knowledge of the reply information, so as to narrow the scope of the source knowledge of the reply information; then the reply information is generated based on these target knowledge, and the source tag of the reply information is generated at the same time. The source tag of the reply information can be controlled to take values in the tag of the target knowledge, and cannot be the tag of other knowledge unrelated to the reply information, which can improve the ability and quality of knowledge traceability of the reply information and improve the reliability and credibility of the reply information.

[0163] Figure 6This is a flow chart for fine-tuning the source generation capability of the human-computer interaction model provided by an exemplary embodiment of the present application. Figure 6 As shown, the human-computer interaction model in any of the aforementioned method embodiments is obtained by fine-tuning and training in the following manner:

[0164] Step S601: Construct at least one prompt message, where different prompt messages correspond to different traceability granularities.

[0165] The prompt information includes at least: a first slot for inserting input information, a second slot for inserting candidate knowledge, a thought chain, and a response output mode. The thought chain instructs the human-computer interaction model to split the response generation process into the following steps: locating the target knowledge required to respond to the input information among the candidate knowledge as the source knowledge for the response; and generating response information with a source tag based on the target knowledge.

[0166] In addition, the reply output modes for different prompt information are different. The reply output mode specifies the tag position of the source tag in the reply information. Different reply output modes correspond to different traceability granularities.

[0167] For examples of prompt information, please refer to the examples provided in the above embodiments and will not be repeated here.

[0168] In an optional embodiment, the following prompt information can be pre-constructed and provided: coarse-grained prompt information and fine-grained prompt information. The coarse-grained prompt information's reply output mode is to output all source tags at the end of the reply information. The fine-grained prompt information's reply output mode is to insert a source tag for at least one content segment into the reply information.

[0169] For example, an example of a reply output mode of coarse-grained prompt information is as follows:

[0170] Use [number] at the end of your reply to identify all sources of your reply.

[0171] Accordingly, the format of a reply message generated based on the above coarse-grained prompt information is as follows:

[0172] …, …, …, …[1][2][3]. The reply information indicates that the entire reply information comes from knowledge [1][2] and [3].

[0173] For example, an example of a reply output mode of fine-grained prompt information is as follows:

[0174] Use [number] at the appropriate place in the reply message to indicate the source of the reply message.

[0175] Accordingly, the format of a reply message generated based on the above fine-grained prompt information is as follows:

[0176] …[1], …[2], …, …[2][3]. The omitted reply fragment at the first “…” in the reply message comes from knowledge [1], the omitted reply fragment at the second “…” comes from knowledge [2], the omitted reply fragment at the fourth “…” comes from knowledge [2] and [3], and the omitted reply fragment at the third “…” has no corresponding knowledge source and may be a general wording.

[0177] In this embodiment, the specific content and format of at least one prompt message during the fine-tuning training process can be designed and configured by relevant technical personnel (such as professional technical personnel responsible for fine-tuning training) based on actual system requirements and experience, and are not specifically limited here.

[0178] During the fine-tuning training process, training is performed on prompt information of multiple different granularities, so that the human-computer interaction model has the ability to generate multi-granularity traceability.

[0179] Step S602: construct a fine-tuning dataset corresponding to each prompt information respectively. The fine-tuning dataset includes multiple training data. The training data includes user input, candidate knowledge corresponding to the user input, and replies with source tags.

[0180] Since the response output modes are different in different prompt information, a corresponding fine-tuning dataset is constructed for each prompt information so that the output mode of the response with source mark in the fine-tuning dataset is consistent with the response output mode in the corresponding prompt information.

[0181] Step S603: Based on each prompt information and the corresponding fine-tuning data set, fine-tune the pre-trained model to obtain a human-computer interaction model.

[0182] Among them, the pre-trained model can be any existing human-computer interaction model based on retrieval enhancement to generate RAG, and can be obtained by training basic large models such as large-scale pre-trained language models (LLM).

[0183] During fine-tuning training, for each piece of training data in the fine-tuning dataset, the user input, the candidate knowledge corresponding to the user input, and the corresponding prompt information in the training data are input into the pre-training model. The pre-training model locates the target knowledge required to reply to the user input in the candidate knowledge based on the prompt information, and uses the target knowledge as the source knowledge of the reply information, and generates reply information with source tags based on the target knowledge.

[0184] Furthermore, a loss function is calculated based on the source-tagged responses generated by the pre-trained model and the source-tagged responses in the fine-tuning dataset, and the parameters of the pre-trained model are updated. The loss function used in fine-tuning training can be a cross-entropy loss function, or other loss functions used in fine-tuning training of human-computer interaction models, which are not specifically limited here.

[0185] After fine-tuning training is completed, a human-computer interaction model with multi-granularity traceability generation capabilities is obtained.

[0186] The method of this embodiment can obtain training data of at least one traceability granularity by pre-constructing at least one prompt information, where different prompt information corresponds to different traceability granularities, and respectively constructing a fine-tuning data set corresponding to each prompt information. Based on each prompt information and the corresponding fine-tuning data set, the pre-trained model is fine-tuned, which can improve the multi-granularity traceability capability of the human-computer interaction model.

[0187] Figure 7 This is an interactive flow chart of a data processing method based on a human-computer interaction model provided by an exemplary embodiment of the present application. Figure 7 As shown in the figure, the overall interaction process of human-computer interaction based on the multi-granularity traceability capability of the human-computer interaction model is as follows:

[0188] Step S701: The terminal device obtains user input information.

[0189] Step S702: The terminal device sends the user's input information to the first server.

[0190] Step S703: The first server obtains candidate knowledge that matches the input information.

[0191] Step S704: The first server inserts the input information and candidate knowledge into the configured prompt information to generate a traceability generation instruction.

[0192] Step S705: The first server sends a call request for the human-computer interaction model API to the second server, where the call request includes a traceability generation instruction.

[0193] Step S706: The second server inputs the traceability generation instruction into the human-computer interaction model, and through the prompt of the human-computer interaction model based on the prompt information in the traceability generation instruction, locates the target knowledge required to reply to the input information in the candidate knowledge, uses the target knowledge as the source knowledge of the reply information, and generates reply information with a source mark based on the target knowledge.

[0194] Step S707: The second server returns a reply message with a source tag to the first server.

[0195] Step S708: The first server returns the reply information with the source tag and the source knowledge of the reply information to the terminal device.

[0196] Step S709: The terminal device outputs the reply information with the source tag and the source knowledge of the reply information to the user.

[0197] The implementation principles and technical effects of each step in this embodiment can be found in the aforementioned embodiments and will not be described again here.

[0198] Figure 8 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. Figure 8 As shown, the server includes a memory 801 and a processor 802. Memory 801 is configured to store computer-executable instructions and may be configured to store various other data to support operations on the server. Processor 802 is communicatively coupled to memory 801 and configured to execute the computer-executable instructions stored in memory 801 to implement the technical solutions provided by any of the above-described method embodiments. The specific functions and technical effects achieved by these embodiments are similar and will not be further described here.

[0199] Optional, such as Figure 8 As shown, the server also includes: a firewall 803, a load balancer 804, a communication component 805, a power supply component 806 and other components. Figure 8 Only some components are shown schematically, which does not mean that the server only includes Figure 8 Components shown. Figure 8 The server is only taken as a cloud server deployed in the cloud as an example for exemplary description. The server can also be deployed locally, and this embodiment is not specifically limited here.

[0200] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented. The specific functions and technical effects that can be achieved are not repeated here.

[0201] The present application also provides a computer program product, including a computer program. When executed by a processor, the computer program implements the method of any of the aforementioned embodiments. The computer program is stored in a readable storage medium. At least one processor of a server can read the computer program from the readable storage medium. The at least one processor executes the computer program, causing the server to perform the technical solution provided by any of the aforementioned method embodiments. The specific functions and technical effects achieved are not further described here.

[0202] The present application provides a chip comprising: a processing module and a communication interface. The processing module is capable of executing the technical solution of the server in the aforementioned method embodiments. Optionally, the chip further comprises a storage module (e.g., a memory) configured to store instructions, and the processing module configured to execute the instructions stored in the storage module. Execution of the instructions stored in the storage module causes the processing module to execute the technical solution provided by any of the aforementioned method embodiments.

[0203] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0204] It should be understood that the above-mentioned processor can be a processing unit (Central Processing Unit, referred to as CPU), or it can be other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as DSP), application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include high-speed random access memory (Random Access Memory, referred to as RAM), and may also include non-volatile storage, such as at least one disk storage, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0205] The above storage may be an object storage service (OSS).

[0206] The above-mentioned memory can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0207] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a mobile hotspot (WiFi), a second-generation mobile communication system (2G), a third-generation mobile communication system (3G), a fourth-generation mobile communication system (4G) / Long Term Evolution (LTE), a fifth-generation mobile communication system (5G) and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared technology, ultra-wide band (UWB) technology, Bluetooth technology and other technologies.

[0208] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.

[0209] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0210] An exemplary storage medium is coupled to a processor, such that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an application-specific integrated circuit. Of course, the processor and storage medium can also exist as discrete components in an electronic device or a host control device.

[0211] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0212] The order of the above-mentioned embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. In addition, in some of the processes described in the above-mentioned embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or in parallel. They are only used to distinguish between different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. The meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0213] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of each embodiment of the present application.

[0214] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

[0215] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data processing method based on a human-computer interaction model, characterized in that: Applied to running a given first server of a human-computer interaction system, the method includes: Receive user input information and obtain candidate knowledge matching the input information; Inputting the input information, candidate knowledge, and configured prompt information into a human-computer interaction model, locating target knowledge required to answer the input information from the candidate knowledge based on the prompt information through the human-computer interaction model, using the target knowledge as the source knowledge of the answer information, and generating answer information with a source tag based on the target knowledge, wherein the source tag is used to mark the source knowledge of the answer information; Outputting the reply information with the source tag and the source knowledge of the reply information.

2. The method according to claim 1, characterized in that The prompt information includes: a first slot to be inserted into the input information, a second slot to be inserted into the candidate knowledge, a thought chain, and a reply output mode; The thought chain instructs the human-computer interaction model to split the process of generating reply information into the following steps: locating the target knowledge required to reply to the input information in the candidate knowledge as the source knowledge of the reply information; generating reply information with source tags based on the target knowledge; The reply output mode specifies the tag position of the source tag in the reply information.

3. The method according to claim 2, characterized in that Also includes: In response to a prompt information configuration request, multiple alternative prompt information are output, with different prompt information having different reply output modes, and different reply output modes correspond to different traceability granularities; In response to a selection operation on any prompt information, the selected prompt information is configured as the currently used prompt information.

4. The method according to claim 3, characterized in that The plurality of alternative prompt information includes: coarse-grained prompt information and fine-grained prompt information; The reply output mode of the coarse-grained prompt information is: outputting all source tags at the end of the reply information; The reply output mode of the fine-grained prompt information is: inserting a source tag of at least one content segment into the reply information.

5. The method according to claim 1, wherein The step of inputting the input information, candidate knowledge, and configured prompt information into a human-computer interaction model, locating target knowledge required to answer the input information from the candidate knowledge based on the prompt information through the human-computer interaction model, using the target knowledge as source knowledge of answer information, and generating answer information with a source tag based on the target knowledge includes: Inserting the input information and candidate knowledge into the configured prompt information to generate a traceability generation instruction; Using the traceability generation instruction as input data, sending a call request for a service interface of the human-computer interaction model to a second server running the human-computer interaction model; Receive the reply information with the source tag sent by the second server.

6. The method according to any one of claims 1 to 5, characterized in that After obtaining the reply information with source mark, it also includes: Determining, based on the source tag of the reply information, the relevance between the tagged reply content and the corresponding source knowledge; According to the configured traceability verification strategy, the source tag of the reply information is corrected according to the relevance between the marked reply content and the corresponding source knowledge.

7. The method according to claim 6, characterized in that Also includes: In response to a request for configuring a traceability verification strategy, output multiple alternative verification strategies with different verification strictness levels; In response to a selection operation on any candidate verification strategy, the selected candidate verification strategy is configured as the currently used traceability verification strategy.

8. A data processing method based on a human-computer interaction model, characterized in that: The second server is applied to run the human-computer interaction model, and the method includes: Receiving a call request from the first server to the human-computer interaction model, the call request including user input information, candidate knowledge matched by the input information, and prompt information; Inputting the user's input information, candidate knowledge matched with the input information, and prompt information into a human-computer interaction model, locating target knowledge required to reply to the input information from the candidate knowledge through the prompt of the human-computer interaction model based on the prompt information, using the target knowledge as the source knowledge of the reply information, and generating reply information with a source tag based on the target knowledge, wherein the source tag is used to mark the source knowledge of the reply information; The reply information with the source tag is sent to the first server.

9. The method according to claim 8, characterized in that The training process of the human-computer interaction model includes: Construct at least one prompt message. Different prompt messages correspond to different traceability granularities. Constructing a fine-tuning dataset corresponding to each prompt information respectively, wherein the fine-tuning dataset includes multiple training data, and the training data includes user input, candidate knowledge corresponding to the user input, and a reply with a source tag; Based on each of the prompt information and the corresponding fine-tuning data set, the pre-trained model is fine-tuned to obtain the human-computer interaction model.

10. The method according to claim 9, characterized in that The prompt information at least includes: a first slot to be inserted into the input information, a second slot to be inserted into the candidate knowledge, a thought chain, and a reply output mode; The thought chain instructs the human-computer interaction model to split the process of generating reply information into the following steps: locating the target knowledge required to reply to the input information in the candidate knowledge as the source knowledge of the reply information; generating reply information with source tags based on the target knowledge; Different prompt information has different reply output modes, and the reply output mode specifies the mark position of the source mark in the reply information. Different reply output modes correspond to different traceability granularities.

11. The method according to claim 10, characterized in that The at least one prompt information includes: coarse-grained prompt information and fine-grained prompt information; The reply output mode of the coarse-grained prompt information is: outputting all source tags at the end of the reply information; The reply output mode of the fine-grained prompt information is: inserting a source tag of at least one content segment into the reply information.

12. A server, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the server to execute the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 11 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.