Question generation method and device, content display method and device, medium and electronic equipment
By training the model in the dialogue system to generate candidate problems with high interaction rates, the problem of low interaction rates in the prior art is solved, and the Q&A efficiency between users and the system is improved.
Patent Information
- Application Number
- CN202510600672.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-15
AI Technical Summary
The problems provided by existing dialogue systems cannot ensure high interaction rates, affecting the efficiency of question-and-answer between users and the system.
By obtaining user interaction data in the conversation system, the model is trained to generate candidate problems with high interaction rates, and update the conversation system, optimizing the quality of candidate problems with preset evaluation rules and distillation strategies.
It improves the interaction rate between users and the dialogue system output candidate questions and improves the efficiency of question-and-answer.
Smart Images

Figure CN120492585A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to a question generating method, a content display method, a device, a medium, and an electronic device. Background Art
[0002] In a dialogue system, users generally interact with the dialogue system through text input. After answering the questions input by the user, the dialogue system can provide additional questions for the user, so that the user can quickly re-enter the questions through interactive methods such as clicking, thereby improving the question-answering efficiency of the dialogue system.
[0003] However, the dialogue system provides high-quality questions that can increase the user's interaction rate with the question. Therefore, improving the quality of the questions provided by the dialogue system is one way to improve the question-answering efficiency of the dialogue system. Summary of the Invention
[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a question generation method, comprising: Obtaining first sample data and first annotated data corresponding to the first sample data, wherein the first sample data includes a first conversation of a user in a dialogue system, and the first annotated data is a first candidate question that has been interacted with by the user among a plurality of first candidate questions recommended by the dialogue system for the first conversation; Training a first model based on the first sample data and the first labeled data to obtain a trained first model; A plurality of second candidate questions for a second dialogue are generated using the trained first model, wherein the plurality of second candidate questions are used to update the dialogue system.
[0006] In a second aspect, the present disclosure provides a content display method, comprising: Display the intelligent interaction page of the dialogue system; In response to the question input by the user in the intelligent interaction page, the reply content output by the dialogue system for the question and multiple candidate questions are displayed in the intelligent interaction page, and the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on the multiple second candidate questions in the method described in the first aspect.
[0007] In a third aspect, the present disclosure provides a question generating device, comprising: an acquisition module, configured to acquire first sample data and first annotated data corresponding to the first sample data, wherein the first sample data includes a first conversation of a user in a dialogue system, and the first annotated data is a first candidate question that has been interacted with by the user among a plurality of first candidate questions recommended by the dialogue system for the first conversation; A first training module, configured to train a first model based on the first sample data and the first labeled data to obtain a trained first model; A generation module is used to generate multiple second candidate questions for the second dialogue using the trained first model, wherein the multiple second candidate questions are used to update the dialogue system.
[0008] In a fourth aspect, the present disclosure provides a content display device, comprising: A first display module is used to display the intelligent interaction page of the dialogue system; A second display module is used to respond to the question input by the user in the intelligent interaction page and display the reply content and multiple candidate questions output by the dialogue system for the question in the intelligent interaction page, wherein the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on the multiple second candidate questions in the method described in the first aspect.
[0009] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect or the steps of the method described in the second aspect.
[0010] In a sixth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect or the steps of the method in the second aspect.
[0011] In a seventh aspect, the present disclosure provides a computer program product, comprising a computer program, which, when executed by a processor, performs the steps of the method described in the first aspect, or the steps of the method described in the second aspect.
[0012] Through the above technical solution, since the first labeled data is the first candidate question that has been interacted with by the user among the multiple first candidate questions recommended by the dialogue system for the first dialogue, a distillation strategy for the first labeled data is proposed. The first model is trained based on the first labeled data and the first sample data corresponding to the first labeled data, so that the trained first model can output multiple second candidate questions with a high interaction rate for the second dialogue; further, updating the dialogue system based on the multiple second candidate questions with a high interaction rate generated by the first model can improve the quality of the multiple candidate questions output by the dialogue system for the dialogue, thereby improving the interaction rate between the user and the multiple candidate questions output by the dialogue system, and providing a basis for improving the question-answering efficiency of the dialogue system.
[0013] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a schematic diagram of an intelligent interaction page of a dialogue system according to an embodiment of the present disclosure.
[0015] Figure 2 FIG. 4 is a flowchart of a method for generating questions according to an embodiment of the present disclosure.
[0016] Figure 3 The flowchart of the content display method according to an embodiment of the present disclosure is shown.
[0017] Figure 4 FIG. 4 is a block diagram of a question generating device according to an embodiment of the present disclosure.
[0018] Figure 5 FIG. 4 is a block diagram of a content display device according to an embodiment of the present disclosure.
[0019] Figure 6 It is a structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The following describes embodiments of the present disclosure in more detail 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 limited to the embodiments described herein. Rather, 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 for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0022] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0023] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0024] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0026] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0027] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0030] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0031] The dialogue system can provide an intelligent interactive page, through which users interact with the dialogue system. Figure 1 1 is a schematic diagram of an intelligent interaction page of a dialogue system according to an embodiment of the present disclosure. A question 102 input by a user is displayed in the intelligent interaction interface 101. In response to the question 102, the dialogue system provides a reply content 103 for the question 102, and provides multiple candidate questions 104 for the reply content 103; the user can click on one of the multiple candidate questions 104. For example, after the user clicks on the control "Candidate Question 1XXX" among the multiple candidate questions 104 in the intelligent interaction interface 101, the intelligent interaction page 101 is updated to the intelligent interaction page 105, and the intelligent interaction page 105 further displays the candidate question 106, and the dialogue system responds to the candidate question 106, provides a reply content 107 for the candidate question 106, and provides multiple candidate questions 108 for the reply content 107, so that the user can quickly re-enter the question in the dialogue system by clicking, thereby improving the question-answering efficiency of the dialogue system.
[0032] Among them, although the candidate questions provided in the dialogue system are related to the current dialogue in the dialogue system, in related technologies, it is not possible to ensure a high interaction rate between users and the candidate questions provided in the dialogue system. However, the dialogue system provides high-quality questions that can improve the interaction rate between users and the questions. Therefore, improving the quality of the questions provided by the dialogue system is one of the ways to improve the question-answering efficiency of the dialogue system.
[0033] In view of this, the embodiments of the present disclosure provide a question generation method, a content display method, a question generation device, a content display device, a medium, an electronic device and a program product to improve the interaction rate between the user and the multiple candidate questions output by the dialogue system, thereby providing a basis for improving the question-answering efficiency of the dialogue system.
[0034] The embodiments of the present disclosure are further explained and illustrated below with reference to the accompanying drawings.
[0035] Figure 2 This is a flowchart of a question generation method according to an embodiment of the present disclosure. The question generation method can be applied to an electronic device and can be executed by a question generation device, wherein the question generation device can be implemented by software and / or hardware, and the software and / or hardware can be configured in the electronic device. Figure 2 , the question generating method may include step 210, step 220 and step 230.
[0036] In step 210, first sample data and first annotated data corresponding to the first sample data are obtained, wherein the first sample data includes the first conversation of the user in the dialogue system, and the first annotated data is the first candidate question interacted with by the user among multiple first candidate questions recommended by the dialogue system for the first conversation.
[0037] The first conversation is real data collected online by the dialogue system. The first conversation may include a question input by the user and the response output by the dialogue system using the prompt word. As another example, the first conversation in this embodiment may also only include the response output by the dialogue system using the prompt word.
[0038] Prompts are words or phrases used in a dialogue system to guide the conversation, help the system understand the user's intent, or stimulate specific responses. They help users express their needs more clearly and enable the system to provide more precise assistance. For example, when a user is speaking with a dialogue system, they can use prompts like "Help me write a paragraph about..." to let the system know they need writing help, or use the prompt "Explain..." to have the system explain a concept. The "..." in the prompt can be the question text entered by the user.
[0039] The question input by the user can be directly entered through text input or converted from speech to text. The first candidate question can be text, and the first candidate question output by the dialogue system (i.e., text) can also be converted into speech and announced.
[0040] A dialogue system can be understood as a conversational product that supports conversations. The dialogue system can provide intelligent interactive pages through which users interact with the dialogue system. The dialogue system can be integrated with a machine learning model. For example, the machine learning model can be a large language model or other neural network model, although this disclosure does not limit this.
[0041] The interaction in this embodiment may refer to click and slide interactions. Figure 1 For example, the first annotation data may be a candidate question 106 that has been clicked by the user. The following embodiment is illustratively described using click as an example.
[0042] The number of first candidate questions output by the dialogue system for the first dialogue may be three, or may be configured by the user, which is not limited in this embodiment. Furthermore, in the following embodiment, the number of candidate questions output by the dialogue system for the dialogue is three for exemplary description.
[0043] In some embodiments, the above-mentioned question generation method may further include the steps of: updating the prompt words in the dialogue system based on preset evaluation rules, wherein the updated prompt words are used by the dialogue system to determine the first candidate question, and the first sample data and the first labeled data are collected after the prompt words are updated.
[0044] The number of times the prompt words in the dialogue system are updated based on the preset evaluation rules can be set according to actual conditions, and this embodiment does not limit this.
[0045] The preset evaluation rules are used to improve the quality of the first labeled data. The preset evaluation rules can describe scenarios in which the dialogue system is suitable for providing candidate questions and scenarios in which the dialogue system is not suitable for providing candidate questions. The preset evaluation rules can also describe the text quality of the candidate questions. The text quality can be evaluated based on, for example, the grammatical correctness of the candidate questions, the authenticity of the candidate questions, the content value of the candidate questions, the redundancy of the candidate questions, the rationality of the personal references in the candidate questions, and the repetitiveness of the content of the candidate questions.
[0046] In this way, before collecting the first sample data and the first labeled data, the prompt words of the dialogue system are updated to improve the quality of the first candidate question output by the dialogue system, thereby providing a basis for improving the question-answering efficiency of the dialogue system updated based on the first candidate question.
[0047] In step 220, the first model is trained based on the first sample data and the first labeled data to obtain a trained first model.
[0048] In step 230 , a plurality of second candidate questions for the second dialogue are generated using the trained first model, wherein the plurality of second candidate questions are used to update the dialogue system.
[0049] The second dialogue may be different from or the same as the first dialogue, and this embodiment does not limit this. Similar to the first dialogue, the explanation and description of the second dialogue can refer to the above-mentioned related embodiments, and this embodiment will not be repeated here.
[0050] It should be noted that among the multiple first candidate questions output by the dialogue system, there are first candidate questions that are not clicked by users, and there are first candidate questions that are clicked by users. The first candidate questions that users have clicked on can improve the user's click-through rate, but since the user can only click on at most one of the multiple first candidate questions, in order to ensure that the multiple candidate questions output by the dialogue system for the same dialogue are all high-quality texts, it is proposed to use the first sample data and the first labeled data to train the first model, so that the first model can learn to obtain other high-quality candidate questions similar to the candidate questions clicked by the user for the same dialogue.
[0051] Through the above technical solution, since the first labeled data is the first candidate question that has been interacted with by the user among the multiple first candidate questions recommended by the dialogue system for the first dialogue, a distillation strategy for the first labeled data is proposed. The first model is trained based on the first labeled data and the first sample data corresponding to the first labeled data, so that the trained first model can output multiple second candidate questions with a high interaction rate for the second dialogue; further, updating the dialogue system based on the multiple second candidate questions with a high interaction rate generated by the first model can improve the quality of the multiple candidate questions output by the dialogue system for the dialogue, thereby improving the interaction rate between the user and the multiple candidate questions output by the dialogue system, and providing a basis for improving the question-answering efficiency of the dialogue system.
[0052] In some embodiments, the first model may be an LLM (Large Language Model). The first model may be trained based on cross-entropy loss. For example, the first model outputs a predicted candidate question based on the first sample data, constructs a loss function by constructing the difference between the predicted candidate question and the first annotated data, and then iterates the first model with the minimum value of the loss function as the optimization goal. As an example, the difference between the predicted candidate question and the first annotated data can be described based on dimensions such as text sentence structure and text sentence relevance, which is not limited in this embodiment.
[0053] In some embodiments, the number of second candidate questions output by the first model for the second dialogue is greater than the number of first candidate questions, that is, greater than the number of candidate questions provided by the dialogue model for the user's online input question. In this case, the question generation method may further include: screening the plurality of second candidate questions to obtain target second candidate questions, wherein the number of target second candidate questions is the same as the number of first candidate questions.
[0054] In some embodiments, multiple second candidate questions may be deduplicated based on their semantics, and then the remaining second candidate questions after deduplication may be screened based on random selection.
[0055] It can be understood that in the above embodiment, if the number of second candidate questions remaining after deduplication is equal to the number of first candidate questions, the second candidate questions remaining after deduplication can be determined as the target second candidate questions; if the number of second candidate questions remaining after deduplication is less than the number of first candidate questions, the second candidate questions remaining after deduplication can be used as noise samples, and the introduction of noise samples can be avoided when training the first model.
[0056] In some embodiments, multiple second candidate questions can be deduplicated based on their semantics, and then each remaining second candidate question after deduplication can be evaluated, and the remaining second candidate questions after deduplication can be screened based on the evaluation results. For example, the above-mentioned step of screening multiple second candidate questions to obtain the target second candidate question can be implemented in the following manner: based on the semantics of multiple second candidate questions, multiple second candidate questions are deduplicated to obtain intermediate candidate questions; when the number of intermediate candidate questions is greater than the number of first candidate questions, the rank of the intermediate candidate questions is determined, wherein the rank is used to represent the user's preference for the corresponding intermediate candidate question; based on the rank of all intermediate candidate questions, all intermediate candidate questions are screened to obtain the target second candidate question.
[0057] From the above content, it can be seen that when the number of intermediate candidate questions is equal to the number of first candidate questions, each intermediate candidate question can be determined as the target second candidate question; when the number of intermediate candidate questions is less than the number of first candidate questions, the intermediate candidate questions can be determined as noise samples, and the introduction of noise samples can be avoided when training the first model.
[0058] In this embodiment, the priority of determining a high-ranking intermediate candidate question as the target second candidate question is higher than the priority of determining a low-ranking intermediate candidate question as the target second candidate question. In addition, the ranking of the intermediate candidate questions can be represented by a score, so the priority of determining a high-ranking intermediate candidate question as the target second candidate question is higher than the priority of determining a low-ranking intermediate candidate question as the target second candidate question.
[0059] In some embodiments, the rank of the intermediate candidate questions can be determined by a model, where the model may refer to a classification model. For example, the intermediate candidate questions can be processed by a trained second model to obtain the rank corresponding to the intermediate candidate questions. The second model is trained in the following manner: obtaining second sample data and second annotation data corresponding to the second sample data, wherein the second sample data is the third conversation of the user in the first model, and the second annotation data is used to characterize the positive sample or negative sample of the second sample data. For each third candidate question of the third conversation, the positive sample and negative sample of the third conversation are constructed according to the order of the third candidate questions that have been interacted with in all the third candidate questions and the order of the third candidate questions that have not been interacted with in all the third candidate questions; the second model is trained according to the second sample data and the second annotation data.
[0060] It should be noted that the second model is a classification model, which is used to feedback the user's interaction preference. As an example, the classification model can be a multi-layer perceptron.
[0061] The traditional idea of building the second model is to manually mark the third candidate questions that users have clicked on, but it is difficult to manually mark which of the third candidate questions has a higher click rate. Figure 1 As shown, multiple candidate questions for a certain dialogue are arranged vertically in sequence. Generally speaking, the user's visual focus is preferentially concentrated on the candidate questions arranged in front. With this help, each third candidate question for the third dialogue is proposed. According to the arrangement order of the third candidate questions that have been interacted with among all the third candidate questions and the arrangement order of the third candidate questions that have not been interacted with among all the third candidate questions, the positive and negative samples of the third dialogue are constructed. That is, for the same dialogue, the third candidate question that has been interacted with can be determined as the positive sample, and the third candidate question that is located before the third candidate question that has been interacted with in the intelligent interaction interface of the interactive system can be determined as the negative sample.
[0062] For example, continue to refer to Figure 1 Among the multiple candidate questions 104, the candidate question in the first row is recorded as sug1, the candidate question in the second row is recorded as sug2, and the candidate question in the third row is recorded as sug3. If the user clicks on sug2, it is considered that the user's click preference for sug2 is higher than sug1; similarly, if the user clicks on sug3, it is considered that the user's click preference for sug3 is higher than sug1 and sug2. Therefore, based on these data reflecting click preferences, when the user clicks on sug2, the candidate question corresponding to sug2 is constructed as a positive sample, and the candidate question corresponding to sug1 is constructed as a negative sample. When the user clicks on sug3, sug3 is constructed as a positive sample, and the candidate questions corresponding to sug1 and sug2 can both be used as negative samples.
[0063] The explanation and description of the third dialogue may refer to the explanation and description of the first dialogue, and will not be elaborated here in this embodiment.
[0064] In this embodiment, the second model can be trained by taking the third candidate question with the highest preference in the second sample data and the second labeled data as a positive sample pair, and taking the third candidate question other than the third candidate question with the highest preference in the second sample data and the second labeled data as a negative sample pair, with the goal of assigning a higher score to the positive sample pair by the second model.
[0065] For the trained second model, after inputting the second conversation and the intermediate candidate questions into the second model, a score prediction can be made for the second candidate questions, with the top three intermediate candidate questions among the multiple intermediate candidate questions being used as the target second candidate questions. In some embodiments, the dialogue system includes a third model and a fourth model. The third model is used to output responses to questions input by the user, and the fourth model is used to provide multiple candidate questions for the dialogue in the dialogue system. In this case, the question generation method can also include the step of performing reinforcement learning on the fourth model based on the target second candidate question and the second conversation to obtain an updated fourth model.
[0066] As an example, the third model and the fourth model may both be LLMs.
[0067] Among them, the explanation and description of the dialogue in this embodiment can refer to the explanation and description of the first dialogue mentioned above; the explanation and description of the candidate questions can refer to the first candidate question, and this embodiment will not be repeated here.
[0068] As an example, the reinforcement learning of the fourth model can be implemented based on PPO (Proximal Policy Optimization). For explanation and description of PPO, please refer to the relevant technology, and this embodiment will not be described in detail here.
[0069] This embodiment improves the fourth model for providing multiple candidate questions based on the target second candidate question and the second dialogue, thereby avoiding the influence of the third model and improving learning efficiency. In addition, using reinforcement learning to train the fourth model can further optimize the model's training effect.
[0070] Figure 3 This is a flow chart of a content display method according to an embodiment of the present disclosure. The content display method can be applied to an electronic device and performed by a content display device. The content display device can be implemented by software and / or hardware, and the software and / or hardware can be configured in the electronic device. Figure 3, the content display method may include step 310 and step 320.
[0071] In step 310, the intelligent interaction page of the dialogue system is displayed.
[0072] In step 320, in response to the question input by the user in the intelligent interaction page, the reply content output by the dialogue system for the question and multiple candidate questions are displayed in the intelligent interaction page, and the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on multiple second candidate questions.
[0073] For the explanation and description of the technical terms involved in the method steps in this embodiment, reference can be made to the above-mentioned related embodiments, and this embodiment will not be described in detail here.
[0074] Figure 4 FIG is a block diagram of a question generating device according to an embodiment of the present disclosure. Figure 4 , the question generating device 400 may include: Acquisition module 401 is configured to acquire first sample data and first annotated data corresponding to the first sample data, wherein the first sample data includes a first conversation of a user in a dialogue system, and the first annotated data is a first candidate question that has been interacted with by the user among multiple first candidate questions recommended by the dialogue system for the first conversation; A first training module 402 is configured to train a first model based on the first sample data and the first labeled data to obtain a trained first model; The generation module 403 is used to generate multiple second candidate questions for the second dialogue using the trained first model, wherein the multiple second candidate questions are used to update the dialogue system.
[0075] In some embodiments, the number of the plurality of second candidate questions is greater than the number of the first candidate questions, and the question generating device 400 further includes: A screening module is used to screen the multiple second candidate questions to obtain target second candidate questions, wherein the number of the target second candidate questions is the same as the number of the first candidate questions.
[0076] In some embodiments, the screening module comprises: a deduplication submodule, configured to dedupe the plurality of second candidate questions based on the semantics of the plurality of second candidate questions to obtain intermediate candidate questions; a determination submodule, configured to determine a rank of the intermediate candidate questions if the number of the intermediate candidate questions is greater than the number of the first candidate questions, wherein the rank is used to represent the user's preference for the corresponding intermediate candidate questions; The screening submodule is configured to screen all the intermediate candidate questions according to their ranks to obtain a target second candidate question.
[0077] In some embodiments, the determination submodule is further configured to process the intermediate candidate question using a trained second model to obtain a level corresponding to the intermediate candidate question, wherein the second model is trained in the following manner: Obtaining second sample data and second annotated data corresponding to the second sample data, wherein the second sample data is a third conversation of the user in the first model, and the second annotated data is used to represent a positive sample or a negative sample of the second sample data; for each third candidate question of the third conversation, constructing a positive sample and a negative sample of the third conversation based on the order of the third candidate questions that have been interacted with among all the third candidate questions and the order of the third candidate questions that have not been interacted with among all the third candidate questions; The second model is trained based on the second sample data and the second labeled data.
[0078] In some embodiments, the dialogue system includes a third model and a fourth model. The third model is used to output a reply to a question input by the user, and the fourth model is used to provide multiple candidate questions for a dialogue in the dialogue system. The question generating device 400 further includes: The second training module is used to perform reinforcement learning on the fourth model based on the target second candidate question and the second dialogue to obtain an updated fourth model.
[0079] In some embodiments, the question generating device 400 further includes: An updating module is used to update the prompt words in the dialogue system based on preset evaluation rules, wherein the updated prompt words are used by the dialogue system to determine the first candidate question, and the first sample data and the first labeled data are collected after the prompt words are updated.
[0080] The implementation of each module in the question generating device 400 may refer to the relevant embodiments of the above method, and will not be described in detail in this embodiment.
[0081] Figure 5 1 is a block diagram of a content display device according to an embodiment of the present disclosure. Figure 5 , the content display device 500 may include: A first display module 501 is used to display an intelligent interaction page of the dialogue system; The second display module 501 is used to respond to the question input by the user in the intelligent interaction page, and display the reply content output by the dialogue system for the question and multiple candidate questions in the intelligent interaction page, wherein the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated by the multiple second candidate questions.
[0082] The implementation of each module in the content display device 500 may refer to the relevant embodiments of the above method, and will not be described in detail in this embodiment.
[0083] The embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, which implements the steps of the above-mentioned question generating method or content display method when executed by a processing device.
[0084] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the steps of the above-mentioned question generating method or content display method when executed by a processor.
[0085] The present disclosure also provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned question generating method or content display method.
[0086] Reference below Figure 6 , which shows a schematic structural diagram of an electronic device 600 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0087] like Figure 6As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0088] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0089] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0090] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0091] In some embodiments, electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can interconnect with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0092] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0093] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains first sample data and first annotation data corresponding to the first sample data, wherein the first sample data includes the user's first dialogue in the dialogue system, and the first annotation data is the first candidate question that has been interacted with by the user among multiple first candidate questions recommended by the dialogue system for the first dialogue; trains the first model based on the first sample data and the first annotation data to obtain a trained first model; generates multiple second candidate questions for the second dialogue through the trained first model, wherein the multiple second candidate questions are used to update the dialogue system.
[0094] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: displays an intelligent interaction page of the dialogue system; In response to the question input by the user in the intelligent interaction page, the reply content output by the dialogue system for the question and multiple candidate questions are displayed in the intelligent interaction page, and the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on the multiple second candidate questions.
[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0098] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0101] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0102] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A question generation method, characterized in that: include: Obtaining first sample data and first annotated data corresponding to the first sample data, wherein the first sample data includes a first conversation of a user in a dialogue system, and the first annotated data is a first candidate question that has been interacted with by the user among a plurality of first candidate questions recommended by the dialogue system for the first conversation; Training a first model based on the first sample data and the first labeled data to obtain a trained first model; A plurality of second candidate questions for a second dialogue are generated using the trained first model, wherein the plurality of second candidate questions are used to update the dialogue system.
2. The method according to claim 1, characterized in that The number of the plurality of second candidate questions is greater than the number of the first candidate questions, and the method further comprises: The plurality of second candidate questions are screened to obtain target second candidate questions, wherein the number of the target second candidate questions is the same as the number of the first candidate questions.
3. The method according to claim 2, characterized in that The screening of the plurality of second candidate questions to obtain a target second candidate question includes: Based on the semantics of the plurality of second candidate questions, deduplication of the plurality of second candidate questions is performed to obtain intermediate candidate questions; When the number of the intermediate candidate questions is greater than the number of the first candidate questions, determining a rank of the intermediate candidate questions, wherein the rank is used to represent the user's preference for the corresponding intermediate candidate questions; All the intermediate candidate questions are screened according to their ranks to obtain a target second candidate question.
4. The method according to claim 3, characterized in that Determining the ranking of the intermediate candidate questions includes: The intermediate candidate questions are processed by a trained second model to obtain a level corresponding to the intermediate candidate questions, wherein the second model is trained in the following manner: Obtaining second sample data and second annotated data corresponding to the second sample data, wherein the second sample data is a third conversation of the user in the first model, and the second annotated data is used to represent a positive sample or a negative sample of the second sample data; for each third candidate question of the third conversation, constructing a positive sample and a negative sample of the third conversation based on the order of the third candidate questions that have been interacted with among all the third candidate questions and the order of the third candidate questions that have not been interacted with among all the third candidate questions; The second model is trained based on the second sample data and the second labeled data.
5. The method according to claim 2, characterized in that The dialogue system includes a third model and a fourth model, the third model being configured to output a reply to a question input by the user, and the fourth model being configured to provide a plurality of candidate questions for a dialogue in the dialogue system. The method further includes: Based on the target second candidate question and the second dialogue, reinforcement learning is performed on the fourth model to obtain an updated fourth model.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The prompt words in the dialogue system are updated based on preset evaluation rules, wherein the updated prompt words are used by the dialogue system to determine the first candidate question, and the first sample data and the first labeled data are collected after the prompt words are updated.
7. A content display method, characterized in that: include: Display the intelligent interaction page of the dialogue system; In response to the question input by the user in the intelligent interaction page, the reply content output by the dialogue system for the question and multiple candidate questions are displayed in the intelligent interaction page, and the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on the multiple second candidate questions as described in claim 1.
8. A question generating device, characterized in that: include: an acquisition module, configured to acquire first sample data and first annotated data corresponding to the first sample data, wherein the first sample data includes a first conversation of a user in a dialogue system, and the first annotated data is a first candidate question that has been interacted with by the user among a plurality of first candidate questions recommended by the dialogue system for the first conversation; A first training module, configured to train a first model based on the first sample data and the first labeled data to obtain a trained first model; A generation module is used to generate multiple second candidate questions for the second dialogue using the trained first model, wherein the multiple second candidate questions are used to update the dialogue system.
9. A content display device, characterized in that: include: A first display module is used to display the intelligent interaction page of the dialogue system; A second display module is used to respond to the question input by the user in the intelligent interaction page and display the reply content and multiple candidate questions output by the dialogue system for the question in the intelligent interaction page, wherein the multiple candidate questions are used to support the interaction between the user and the dialogue system, wherein the dialogue system is updated based on the multiple second candidate questions as described in claim 1.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 or the steps of the method according to claim 7 are implemented.
11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6, or the steps of the method according to claim 7.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 or the steps of the method according to claim 7 are performed.
Citation Information
Patent Citations
Conversation question generation method and device, equipment and storage medium
CN116186206A
Recommendation question generation method and device, related equipment and computer program product
CN118861427A
Method and device for video processing and medium
CN119156823A
Recommendation question generation method and device based on large model, electronic equipment and medium
CN119537537A
Training method of recommendation question generation model and recommendation question generation method and device
CN119719284A