Interaction method and device, equipment and storage medium
By introducing a filtering mechanism of recommendation level and recommendation reasons in the knowledge question and answer system, the problem of low matching of user input is solved, more accurate and detailed reply content is generated, and the interaction quality is improved.
Patent Information
- Application Number
- CN202411352764.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-17
AI Technical Summary
In the knowledge question and answer tasks entered by users, it is difficult to accurately determine the reference information matching the user's input, resulting in the generated reply content not being accurate enough, including noisy information, and unable to effectively solve the user's problems.
By responding to user input, the recommendation level and recommendation reasons of candidate reference information are determined, the target reference information is filtered out, and the reply content is generated based on the target reference information and recommendation reasons is generated, so as to improve the filtering and recommendation accuracy of candidate reference information.
It significantly improves the accuracy and quality of the reply content, ensures that the generated answers are more accurate, and can explain the reasons in detail, enhances the correlation between user input and answers, and improves the quality of interaction.
Smart Images

Figure CN119323257A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, apparatuses, devices, and storage media for interaction. Background Art
[0002] With the development of information technology, various terminal devices can provide various services to people in work and life. Applications that provide services can be deployed in terminal devices. The terminal devices present corresponding content through the user interface of the application to achieve interaction with the user. In some cases, users initiate knowledge question and answer task requests about the target field in the application. Therefore, how to accurately determine the reply content corresponding to the knowledge question and answer task request is a problem of concern. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for interaction is provided. The method may include: in response to receiving user input, determining at least one candidate reference information matching the user input and a corresponding recommendation attribute of at least one candidate reference information, wherein the corresponding recommendation attribute of the candidate reference information in the at least one candidate reference information includes a recommendation level and a recommendation reason of the candidate reference information. Based on the corresponding recommendation attribute of the at least one candidate reference information, determining target reference information from the at least one candidate reference information. Based on the target reference information and the recommendation reason of the target reference information, generating reply content corresponding to the user input.
[0004] In a second aspect of the present disclosure, a device for interaction is provided. The device may include: a candidate material determination module, configured to determine, in response to receiving a user input, at least one candidate reference information matching the user input and a corresponding recommendation attribute of at least one candidate reference information, wherein the corresponding recommendation attribute of the candidate reference information in the at least one candidate reference information includes a recommendation level and a recommendation reason of the candidate reference information. A target material determination module, configured to determine target reference information from at least one candidate reference information based on the corresponding recommendation level of at least one candidate reference information. An interaction execution module, configured to generate reply content corresponding to the user input based on the target reference information and the recommendation reason of the target reference information.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which includes computer executable instructions, and when the computer executable instructions are executed by a processor, the method of the first aspect is implemented.
[0008] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A flowchart of a method for interaction according to some embodiments of the present disclosure is shown;
[0012] Figure 3 An example diagram of an interactive interface according to some embodiments of the present disclosure is shown;
[0013] Figure 4 An example diagram showing an interaction process according to some embodiments of the present disclosure;
[0014] Figure 5 An example diagram showing a process of determining first-category candidate reference information according to some embodiments of the present disclosure;
[0015] Figure 6 An example diagram showing the working principle of a reference information recommendation model according to some embodiments of the present disclosure is shown;
[0016] Figure 7 A schematic structural block diagram of a vehicle control device according to some embodiments of the present disclosure is shown; and
[0017] Figure 8 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0020] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0021] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0022] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0023] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0024] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0025] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0026] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0027] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. An application 120 is installed in a terminal device 110. A user 140 can interact with the application 120 via the terminal device 110 and / or an attached device of the terminal device 110. The application 120 may include or be implemented as a digital assistant 122.
[0028] The digital assistant 122 may be configured to have an intelligent conversation. Figure 1 In the example shown, the digital assistant 122 can be integrated into the application 120 as part of the application 120 to assist in executing task processing within the application 120. In other examples, the digital assistant 122 can be configured as an independently running application, such as a web application or other types of applications. In such an example, the digital assistant 122 and the application 120 can be regarded as the same application. The digital assistant 122 is provided to assist users with various task processing needs in different applications and scenarios. During the interaction with the digital assistant 122, the user inputs an interactive message, and the digital assistant 122 provides a reply message in response to the received user input. Typically, the digital assistant 122 can support users to input questions in natural language, and perform tasks and provide replies based on the understanding of natural language input and logical reasoning ability.
[0029] In some implementations, digital assistant 122 can interact with user 145 as a contact. For example, digital assistant 122 can be implemented in an instant messaging (IM) application. Digital assistant 122 can interact with user 145 in a single chat session with user 145. In some implementations, digital assistant 122 can interact with multiple users in a group chat session including multiple users.
[0030] For each user 145, the client of the application running part can present the interactive interface 142 of the application 120 or the digital assistant 122 in the client interface, such as a conversation window with the digital assistant 122. In some embodiments, depending on the configuration of the application 120, the interactive message with the application 120 may include messages in a multimodal form, such as text messages (e.g., natural language text), voice messages, image messages, video messages, and the like.
[0031] In some embodiments, the application 120 may be associated with a corresponding database 130, which stores data or information required for the execution of the application. For example, the database 130 may be an internal database or a private database, storing data resources that the digital assistant 122 relies on to perform interactions, and the data resources in the database 130 may be used as internal resources. The application 120 may be an application related to the automotive field, for scenarios where users raise questions related to the automotive field. Articles related to the automotive field may be stored in the database 130 as internal resources.
[0032] The application 120 may be deployed locally on the terminal device 110 of the user 145, and / or may be supported by a server device (not shown). For example, the terminal device 110 of the user 145 may run a client of the application 120, which may support the interaction between the user 145 and the application 120. In the case where the application 120 is local to the user's terminal device 110, the user 145 may directly interact with the local application 120 using the terminal device 110. In the case where the application 120 is running on the server device, the server device may provide services to the client running in the terminal device 110 based on the communication connection with the terminal device 110. The application 120 presents a corresponding interactive interface 142 to the user 145 based on the operation of the user 145, so as to output information related to the use of the application to the user 145 and / or receive information from the user 145 from the user 145.
[0033] In some embodiments, the implementation of at least part of the functions of application 120 and / or the implementation of at least part of the functions of digital assistant 122 in application 120 can be implemented based on a model. During the creation or operation of application 120, one or more models, such as the capabilities of the model, can be called. In application 120, digital assistant 122 can use the model to understand user input and provide a response to the user based on the output of the model. The model can be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model can be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. The model can also be based on other appropriate models.
[0034] The terminal device 110 may be a suitable electronic device. The electronic device here may be any type of device with computing capabilities, including a terminal device or a server device. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. In some embodiments, the terminal device 110 may be implemented based on a cloud service. It should be understood that the structure and function of the environment 100 are described only for exemplary purposes, without implying any limitation on the scope of the present disclosure.
[0035] In the knowledge question and answer scenario, the method usually adopted is to retrieve relevant reference information based on user input, and then generate reply content based on the reference information. Although the above technology can satisfy the association between reference information and user input, it cannot guarantee that the reference information can provide valid information. For example, take the car buying and car use scenarios corresponding to the automotive field as an example. The user input is "introducing vehicle A". The retrieved relevant reference information may include an introduction to the performance of vehicle A, or it may include an analysis of the reasons for the high or low sales of vehicle A, or an analysis of the high volume of discussion topics for vehicle A, etc. However, usually, only the introduction to the performance of vehicle A is what the user really wants to know, and other reference information, although related to the user input, is actually noise reference information. Therefore, when generating reply content based on reference information, although the reply content is related to the user input, it cannot really solve the question raised by the user.
[0036] In an embodiment of the present disclosure, an improved scheme for interaction is proposed. In the scheme, in response to receiving user input, at least one candidate reference information matching the user input and the corresponding recommended attribute of at least one candidate reference information are determined, and the corresponding recommended attribute of the candidate reference information in the at least one candidate reference information includes the recommendation level and the recommendation reason of the candidate reference information. Based on the corresponding recommendation level of the at least one candidate reference information, the target reference information is determined from the at least one candidate reference information. Based on the target reference information and the recommendation reason of the target reference information, a reply content corresponding to the user input is generated.
[0037] Through the above process, by introducing the recommendation level and recommendation reason, the accuracy of screening and recommendation of candidate reference information is significantly improved. By selecting the target reference information based on the recommendation level and generating the reply content in combination with the recommendation reason, it can not only provide more accurate answers, but also provide users with detailed explanations. Based on this, the quality of the reply content can be improved.
[0038] Figure 2 FIG. 2 shows an example flow of a method 200 for interaction according to some embodiments of the present disclosure. For ease of discussion, reference will be made to Figure 1 The process 200 is described in the environment 100. In the environment 100, the digital assistant 122 can complete the interaction with the user. The interaction process is generated by taking the content input by the user corresponding to the target field as an example. The target field can be the automotive field, the electronic product field, the game field, etc.
[0039] In box 201, in response to receiving user input, the terminal device 110 determines at least one candidate reference information that matches the user input and the corresponding recommended attributes of at least one candidate reference information, wherein the corresponding recommended attributes of the candidate reference information in the at least one candidate reference information include a recommendation level and a recommendation reason for the candidate reference information.
[0040] Figure 3 An example diagram of an interactive interface 300 according to some embodiments of the present disclosure is shown. Taking the target field as the automobile field as an example. The user input may be "introduce the advantages and disadvantages of vehicle A". In response to the received user input, the terminal device 110 may parse the user input based on natural language processing technology to obtain a parsing result. Based on the parsing result, the terminal device 110 may retrieve candidate reference information related to the user input from the database 130. Figure 3 In the example shown, three items of candidate reference information are shown.
[0041] The terminal device 110 can determine the recommendation attributes of each candidate reference information. The recommendation attributes may include a recommendation level and a recommendation reason. The recommendation level indicates the degree of match between the candidate reference information and the user input. The recommendation reason may reflect the basis for judging the recommendation level and the thought chain deduction process for deriving the recommendation level. For example, if the recommendation level is high, then the recommendation reason indicates the reason behind the recommendation level. Exemplarily, the recommendation reason may include key matching points with the user input, contextual relevance, historical data support, etc.
[0042] In block 202, the terminal device 110 determines target reference information from at least one candidate reference information based on the corresponding recommended attributes of the at least one candidate reference information. Once the recommended attributes of each candidate reference information are determined, the terminal device 110 performs screening of the candidate reference information according to the recommended attributes.
[0043] Exemplarily, the terminal device 110 will sort the recommendation level and recommendation reason of each candidate reference information to identify the candidate reference information with the highest degree of matching with the user input. After the sorting is completed, the terminal device 110 will select the target reference information from the sorting results. The target reference information can be used as the main basis for the terminal device 110 to finally generate the user input response content.
[0044] In block 203, the terminal device 110 generates a reply content corresponding to the user input based on the target reference information and the recommendation reason of the target reference information. The recommendation reason of the target reference information can be used as prompt information. The prompt information can provide sufficient basis for the generated reply content.
[0045] On the one hand, the terminal device 110 can extract key points from the target reference information based on language processing technology to generate reply content. The fusion result of the recommendation reason and the reply content is presented on the interactive interface 142. The reply content can generally include the presentation of key points in the target reference information, the analysis of the reasons for recommending the target reference information, etc. For example Figure 3 In the example given above, the reason for recommendation can be used as an anchor point for the reply content to generate an analytical overview of the advantages and disadvantages of vehicle A.
[0046] On the other hand, in some scenarios where visual assistance is needed, the terminal device 110 can generate reply content including images, tables or charts. By combining the target reference information with the recommendation reasons, a more intuitive explanation can be provided to the user.
[0047] In the above process, by analyzing the recommendation level and recommendation reason of the candidate reference information, the terminal device 110 can accurately screen out the target reference information that meets the user input. The reply content generated based on the target reference information can highly match the user's needs, improving the quality of interaction. In addition, the terminal device 110 not only provides reply content that matches the user input, but also reflects why the target reference information is selected in the reply content. In this way, the relevance of the reply content to the user input can be enhanced, making the generated reply content more professional.
[0048] In the process of determining candidate reference information, the first category of candidate reference information may be preferentially retrieved from the database 130 corresponding to the target field related to the user input. If the first category of candidate reference information does not meet the preset conditions, the second category of candidate reference information may be retrieved from external resources using an external retrieval system. That is, the category of candidate reference information may be associated with its source.
[0049] The process of determining candidate reference information may include: determining a first category of candidate reference information based on a first feature representation input by a user. In response to the first category of candidate reference information not satisfying a preset condition, determining a search instruction based on the user input. Determining a second category of candidate reference information based on the search instruction. Determining the first category of candidate reference information and the second category of candidate reference information as at least a portion of at least one item of candidate reference information.
[0050] Figure 4 An example diagram of an interaction process 400 according to some embodiments of the present disclosure is shown. First, based on a first feature representation 401 of a user input (and context information associated with the user input), the terminal device 110 retrieves from the database 130 first-category candidate reference information 131 that matches the first feature representation 401 of the user input. Exemplarily, the database 130 may be an internal database or a private database of the application 120, and the reference information in the database 130 may be reference information that belongs to the target field and has a high degree of expertise. The reference information in the database 130 may be an internal resource of the application 120.
[0051] If the screened first category candidate reference information 131 fails to meet the preset condition, the terminal device 110 may generate a search instruction based on the user input or the first feature representation 401 of the user input. Exemplarily, the preset condition may be a number threshold. For example, if the number threshold is K (K is a positive integer), and the number of the first category candidate reference information 131 retrieved from the database 130 fails to meet the number threshold, it may be determined that the first category candidate reference information 131 fails to meet the preset condition. In addition, the preset condition may also indicate the author of the reference information, the time when the reference information is published, the number of words in the reference information content, and so on.
[0052] The terminal device 110 may perform a broad search from the external resource 420 using an external search system based on the generated search instruction to determine the second type of candidate reference information 421. The external resource 420 may be a resource that has been published on the network.
[0053] Compared with the internal database or private database, the external retrieval system can retrieve a larger amount of reference information. Therefore, the above process ensures that even if the internal database or private database cannot provide enough reference information to meet the preset conditions, the required reference information can still be obtained through external resources.
[0054] After determining the first category candidate reference information 131 and the second category candidate reference information 421, in box 402, the terminal device 110 can determine the recommended attributes of each candidate reference information. Thereafter, the terminal device 110 can determine the target reference information based on the recommended attributes of each candidate reference information. If the target reference information can be determined, the reply content can be generated based on the target reference information in box 403. Conversely, if the target reference information cannot be determined, the reply content can be directly generated in box 404. The specific process of determining the target reference information and generating the reply content will be described in detail later.
[0055] The following first introduces the process of determining the first type of candidate reference information 131. The terminal device 110 uses the feature representation model to process the user input and the context information associated with the user input to obtain a first feature representation of the user input. Based on the matching degree between the first feature representation and each second feature representation in the feature representation library, at least one candidate second feature representation is determined from the feature representation library, and each second feature representation in the feature representation library corresponds to a reference information. Reference information corresponding to at least one candidate second feature representation is determined as at least a part of at least one candidate reference information.
[0056] Figure 5 An example diagram of a process 500 for determining the first type of candidate reference information according to some embodiments of the present disclosure is shown. First, the terminal device 110 treats the user input and the context information related to the input as a multi-round dialogue 510. A first feature representation corresponding to the multi-round dialogue 510 is generated using a feature representation model 530. The first feature representation is a highly abstract and structured representation of the multi-round dialogue 510, aiming to capture its core information. Next, the terminal device 110 matches the first feature representation with each second feature representation in the feature representation library 540. The feature representation library 540 contains multiple second feature representations, each of which corresponds to a reference information. It is not difficult to understand that the multiple second feature representations in the feature representation library 540 can be obtained by processing the reference information (internal resources) in the database 130 by the feature representation model 530.
[0057] By calculating the matching degree between the first feature representation and each second feature representation, the terminal device 110 can identify at least one candidate second feature representation, which is a representation whose relevance to the multi-round dialogue 510 satisfies a predetermined condition. Then, the terminal device 110 extracts the reference information corresponding to the candidate second feature representation as at least a part of at least one item of candidate reference information.
[0058] Through the above process, it can be ensured that the terminal device 110 can give priority to selecting high-quality reference information that best matches the user input in the database 130, thereby providing a professional basis for the generation of subsequent reply content.
[0059] In the process of determining the first feature representation of the multi-round dialogue 510, the feature representation model 530 is involved. The feature representation model 530 is trained using samples of the target domain, and the training process may include: obtaining reference information samples related to the target domain. Based on the reference information samples related to the target domain, a first positive sample is generated using a semantic similarity algorithm. The obtained reference information samples related to a domain other than the target domain are used as negative samples. The feature representation model 530 is trained using the first positive sample and the negative sample.
[0060] The training process of the feature representation model 530 can be completed during the creation process of the application 120 and continuously optimized during the operation of the application 120. Exemplarily, the feature representation model 530 can be trained on the basis of an existing general feature extraction model. The existing general feature extraction model may include Bidirectional Encoder Representations from Transformers (BERT). For the training samples of the feature representation model 530, a large number of reference information samples related to the target field (such as the automotive field) may be included. These samples represent the knowledge and information in the target field and are the basis for model training.
[0061] Based on the reference information samples related to the target domain, a semantic similarity algorithm can be used to generate a first positive sample. Thus, the first positive sample can include a sample pair or sample set that is highly semantically related to each other, which is used to train the feature representation model 530 so that it can capture the semantic features in the target domain.
[0062] Compared with the first positive sample, the reference information samples related to other fields (non-target fields) are used as negative samples. The role of negative samples is to enable the trained feature representation model 530 to distinguish the difference between the target field and other fields, thereby enhancing the recognition ability of the feature representation model 530 for the target field.
[0063] Since the feature representation model 530 is specially trained and optimized in the target domain, the trained feature representation model 530 can more accurately understand and process user input in the target domain.
[0064] As mentioned above, the first positive sample can be a reference information sample related to the target domain. In addition, a second positive sample can also be included. The second positive sample can be generated based on interaction history information. Exemplarily, the second positive sample is generated based on historical interaction information with different users. The second positive sample can also be used as training data for the feature representation model 530.
[0065] The interaction history information may include historical records of the digital assistant 122 performing interactions with different users, which records cover multiple rounds of conversations between the digital assistant 122 and the users. Using these interaction history information, a second positive sample can be generated. These second positive samples can enrich the training data of the feature representation model 530 and enhance the adaptability of the feature representation model 530 to diversified inputs in real scenarios other than reference articles. As a result, the trained feature representation model 530 has the ability to handle complex conversation scenarios. Especially in tasks involving contextual semantic associations, the feature representation model 530 can understand the user's intentions more accurately.
[0066] The above example is mainly directed to the process of determining the first type of candidate reference information in the database 130. For the second type of candidate reference information, the terminal device 110 can generate a search instruction based on the user input and the context information associated with the user input. Based on the search instruction, at least a portion of at least one item of candidate reference information is determined.
[0067] In order to expand the coverage of reference articles for user input, some embodiments of the present disclosure may use a search engine as a search tool. The search engine is used to recall the second category of candidate reference information related to the user input. Based on the user input and the context information associated with the user input, the terminal device 110 may determine that the user 140 may ask a series of related questions. Taking into account the user input and the correlation with the context information, the core query topic is extracted from it, and it is simplified and refined into at least one search instruction (search query). Based on the search instruction, the search engine is used to obtain external resources related to the user.
[0068] Through this method, the terminal device can expand to external resources when the candidate reference information in the internal database or private database is insufficient to meet the preset conditions. Ensure that comprehensive and accurate reference information is provided to users. This strategy based on search instruction generation makes the entire interaction not only limited to the internal data in the internal database or private database, but also fully utilizes the breadth and depth of external resources to improve the overall information matching capability.
[0069] Based on the first category of candidate reference information in an internal database or a private database and the second category of candidate reference information obtained by the search engine, a corresponding recommendation level of each candidate reference information can be determined to determine the target reference information. The recommendation level can be based on a reference information recommendation model. Based on a description of the information recommendation task, user input, and at least one candidate reference information, first prompt information of the reference information recommendation model is generated. Based on the first prompt information, the reference information recommendation model is used to determine the recommendation information of the candidate reference information in the at least one candidate reference information.
[0070] Figure 6 An example diagram of the working principle 600 of the reference information recommendation model according to some embodiments of the present disclosure is shown. The description 601 of the information recommendation task can serve as a basic instruction and example for the reference information recommendation model 610. The description 601 of the information recommendation task is used to provide the reference information recommendation model 610 with an explanation of the output results and an example of the output results. For example, the description 601 of the information recommendation task can be "Refer to the following examples, please determine the recommendation level and recommendation reason of the reference information. Example 1: XXX; Example 2: XXXX". The description 601 of the information recommendation task can serve as the first prompt information of the reference information recommendation model 610.
[0071] In addition, the first prompt information may also include user input 602 and candidate reference information 603. The first prompt information may provide clear guidance on task instructions, user needs, and candidate information to the reference information recommendation model 610. Through the first prompt information, the reference information recommendation model 610 can better understand the user's intentions and needs, thereby determining the recommendation level 604 and recommendation reasons 605 of the candidate reference information. The recommendation level 604 indicates the relevance and priority of the candidate reference information relative to the user's needs, while the recommendation reasons 605 explain in detail why the candidate reference information is given a specific recommendation level 604.
[0072] The reference information recommendation model 610 can be trained by a next token prediction (Next token) training method. Exemplarily, in the training phase, the input to the reference information recommendation model 610 includes a first prompt information sample, and the output includes annotations of the recommendation level and the recommendation reason. The reference information recommendation model 610 needs to predict the next word based on the existing annotations. By continuously predicting the next word, the reference information recommendation model 610 eventually has the ability to generate reasonable content based on the context. This method enables the reference information recommendation model 610 to understand the semantics of the user input, and then assign a recommendation level 604 and recommendation reason 605 to each candidate reference information.
[0073] Through the above process, compared with traditional models that usually only output simple matching, mismatching, or good, general, and bad classification results, it is difficult for users to understand the reasons behind these results. In some embodiments of the present disclosure, the reference information recommendation model not only outputs the recommendation level, but also provides recommendation reasons to help users understand why a certain reference information is recommended first. This transparency can increase users' trust in the recommendation results. In addition, the recommendation reasons are not only helpful for the recommendation process itself, but can also be directly used for subsequent question and answer content generation. The terminal device can integrate the recommendation reasons into the generated reply content to make the answer more explanatory and convincing.
[0074] After determining the target reference information based on the recommended attributes, the terminal device 110 can generate a reply content corresponding to the user input based on the target reference information and the recommendation reason of the target reference information. Specifically, the second prompt information is generated based on the description of the interactive question-and-answer task, the user input, the target reference information and the recommendation reason. Based on the second prompt information, the reply content is determined using the reply content generation model.
[0075] After determining the target reference information and the reason for recommendation, the terminal device 110 may generate second prompt information for generating a reply content. The second prompt information is generated based on the description of the interactive question-answering task, user input, the target reference information and the reason for recommendation.
[0076] Through the second prompt information, the reference information recommendation model can comprehensively consider the user input and the recommendation reason of the target reference information, and generate a response content related to the user input. This generation process not only considers the user input, but also integrates the recommendation reason to ensure that the generated response content not only meets the user's needs, but also provides sufficient explanation and relevance.
[0077] In some embodiments of the present disclosure, if the target reference information cannot be determined from the candidate reference information based on the recommended attributes, the second prompt information can be generated based only on the description of the interactive question-answering task and the user input, and the reply content generation model generates the reply content based on the second prompt information. Correspondingly, in the process of training the reply content generation model, the second prompt information sample can be generated based on the description of the interactive question-answering task, the user input sample, the target reference information sample and the recommendation reason sample. Based on the second prompt information sample and the reply content sample, the reply content generation model is preliminarily trained. In addition, the second prompt information sample can be generated based on the description of the interactive question-answering task and the user input sample (the target reference information sample and the recommendation reason sample are empty). Based on the second prompt information sample and the reply content sample, the reply content generation model is fine-tuned. In this way, the trained reply content generation model can have sufficient generalization ability.
[0078] Figure 7 A schematic structural block diagram of an apparatus 700 for interaction according to some embodiments of the present disclosure is shown. The apparatus 700 may be implemented in or included in the terminal device 110, for example. Each module / component in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
[0079] As shown in the figure, the device 700 includes a candidate material determination module 701, which is configured to determine at least one candidate reference information matching the user input and the corresponding recommendation attribute of at least one candidate reference information in response to receiving the user input, and the corresponding recommendation attribute of the candidate reference information in the at least one candidate reference information includes the recommendation level and recommendation reason of the candidate reference information. The target material determination module 702 is configured to determine the target reference information from the at least one candidate reference information based on the corresponding recommendation level of the at least one candidate reference information. The interactive execution module 703 is configured to generate a reply content corresponding to the user input based on the target reference information and the recommendation reason of the target reference information.
[0080] In some embodiments of the present disclosure, the candidate material determination module 701 may be configured to: determine the first category of candidate reference information based on the first feature representation input by the user. In response to the first category of candidate reference information not satisfying a preset condition, determine a search instruction based on the user input. Determine the second category of candidate reference information based on the search instruction. Determine the first category of candidate reference information and the second category of candidate reference information as at least a part of at least one item of candidate reference information.
[0081] In some embodiments of the present disclosure, the candidate material determination module 701 may also be configured to: process the user input and the context information associated with the user input using the feature representation model to obtain a first feature representation of the user input. Based on the degree of matching between the first feature representation and each second feature representation in the feature representation library, determine at least one candidate second feature representation from the feature representation library, each second feature representation in the feature representation library corresponding to a reference information. Determine the reference information corresponding to the at least one candidate second feature representation as at least a part of at least one candidate reference information.
[0082] In some embodiments of the present disclosure, a training module is further included, and the training module can be configured to: obtain reference information samples related to the target domain. Based on the reference information samples related to the target domain, a first positive sample is generated using a semantic similarity algorithm. The obtained reference information samples related to a domain other than the target domain are used as negative samples. The feature representation model is trained using the first positive sample and the negative sample.
[0083] In some embodiments of the present disclosure, a second positive sample generation module is further included, and the module is configured to: generate a second positive sample based on historical interaction information of interactions with different users, and the training of the feature representation model further utilizes the second positive sample.
[0084] In some embodiments of the present disclosure, the candidate material determination module 701 may also be configured to: generate a search instruction based on a user input and context information associated with the user input, and determine at least a portion of at least one item of candidate reference information based on the search instruction.
[0085] In some embodiments of the present disclosure, the target material determination module 702 may be specifically configured to: generate first prompt information based on a description of the information recommendation task, user input, and at least one candidate reference information, and determine recommendation information of candidate reference information in at least one candidate reference information using a reference information recommendation model based on the first prompt information.
[0086] In some embodiments of the present disclosure, the interactive execution module 703 may be specifically configured to: generate second prompt information based on the description of the interactive question-answering task, user input, target reference information, and recommendation reasons, and determine the reply content based on the second prompt information using the reply content generation model.
[0087] Figure 8 8 is a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 8 The electronic device 800 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 8 The electronic device 800 shown may include or be implemented as Figure 1 The terminal device 110, or Figure 7 Device 700.
[0088] like Figure 8 As shown, the electronic device 800 is in the form of a general electronic device. The components of the electronic device 800 may include, but are not limited to, one or more processors or processing units 810, a memory 820, a storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 800.
[0089] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 800.
[0090] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 8 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0091] The communication unit 840 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0092] The input device 850 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 860 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 800 may also communicate with one or more external devices (not shown) through the communication unit 840 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 800, or communicate with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0093] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0094] According to an exemplary implementation of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 2 The methods provided in the various optional methods are therefore not described in detail here.
[0095] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0096] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0097] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0098] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0099] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. An interactive method, comprising: In response to receiving a user input, determining at least one item of candidate reference information matching the user input and a corresponding recommendation attribute of the at least one item of candidate reference information, wherein the corresponding recommendation attribute of the candidate reference information in the at least one item of candidate reference information includes a recommendation level and a recommendation reason of the candidate reference information; Determining target reference information from the at least one item of candidate reference information based on a corresponding recommendation attribute of the at least one item of candidate reference information; as well as Based on the target reference information and the reason for recommending the target reference information, a reply content corresponding to the user input is generated.
2. The method according to claim 1, wherein determining at least one candidate reference information matching the user input comprises: Determining a first category of candidate reference information based on the first feature representation input by the user; In response to the first category of candidate reference information not satisfying a preset condition, determining a search instruction based on the user input; Based on the search instruction, determining the second category of candidate reference information; as well as The first category of candidate reference information and the second category of candidate reference information are determined as at least a part of the at least one item of candidate reference information.
3. The method according to claim 1, wherein determining at least one candidate reference information matching the user input comprises: Processing the user input and context information associated with the user input using a feature representation model to obtain a first feature representation of the user input; Determining at least one candidate second feature representation from the feature representation library based on a degree of matching between the first feature representation and each second feature representation in a feature representation library, each second feature representation in the feature representation library corresponding to an item of reference information; and Reference information corresponding to the at least one candidate second feature representation is determined as at least a part of the at least one item of candidate reference information.
4. The method of claim 3, wherein the user input is associated with a target domain and the feature representation model is trained by: Obtain a sample of reference information related to the target area; Based on the reference information sample related to the target field, generating a first positive sample using a semantic similarity algorithm; Using the obtained reference information samples related to fields other than the target field as negative samples; as well as The feature representation model is trained using the first positive sample and the negative sample.
5. The method according to claim 4, further comprising: Based on historical interaction information of interactions with different users, a second positive sample is generated, and the training of the feature representation model further utilizes the second positive sample.
6. The method according to claim 1, wherein determining at least one candidate reference information matching the user input comprises: generating a search instruction based on the user input and context information associated with the user input; as well as Based on the search instruction, at least a portion of the at least one item of candidate reference information is determined.
7. The method according to claim 1, wherein determining the recommendation information of the candidate reference information in the at least one candidate reference information comprises: Generate first prompt information based on the description of the information recommendation task, the user input and the at least one candidate item reference information; as well as Based on the first prompt information, the reference information recommendation model is used to determine the recommended information of the candidate reference information in the at least one candidate reference information.
8. The method according to claim 1, wherein generating a reply content corresponding to the user input comprises: Generate second prompt information based on the description of the interactive question-answering task, the user input, the target reference information and the recommendation reason; as well as Based on the second prompt information, the reply content is determined using a reply content generation model.
9. A device for interaction, comprising: a candidate material determination module, configured to, in response to receiving a user input, determine at least one item of candidate reference information matching the user input and a corresponding recommendation attribute of the at least one item of candidate reference information, wherein the corresponding recommendation attribute of the candidate reference information in the at least one item of candidate reference information includes a recommendation level and a recommendation reason of the candidate reference information; a target material determination module, configured to determine target reference information from the at least one item of candidate reference information based on a corresponding recommendation level of the at least one item of candidate reference information; as well as The interactive execution module is configured to generate reply content corresponding to the user input based on the target reference information and the recommendation reason of the target reference information.
10. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processing unit.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product, comprising computer executable instructions, wherein when the computer executable instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Cboth recommendation method, system and device and storage medium
CN121579682A