Model training method, reply question generation method, device, equipment and medium
By training the attribute attention mechanism model, using the user's historical dialogue information to generate personalized answer questions, solving the delay reward and personalized questions of the dialogue recommendation system, and improving the accuracy and accuracy of the answer questions.
Patent Information
- Application Number
- CN202310769116.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2024-12-27
AI Technical Summary
The existing dialogue recommendation system has delayed reward problems and the inability to personalize the generation of replies to users' preferences, resulting in the generated replies being inaccurate and accurate enough.
By obtaining the historical dialogue information sequence of the target user, performing vector conversion and training the attribute attention mechanism model, generating attribute problem information set for problem attributes, and using attribute loss information to adjust model parameters until the model training is completed, thereby generating a personalized reply question.
It effectively avoids the reward delay problem, learns user attribute feature information, realizes the generation of personalized answer questions for user preferences, and improves the accuracy and accuracy of answer questions.
Smart Images

Figure CN119202146A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a model training method, a question answer generation method, an apparatus, a device, and a medium. Background Art
[0002] At present, recommending the best items or services through dialogue with users is an important development direction in the field of artificial intelligence. For the generation of answer questions, the usual method is to use a conversational recommendation system (CRS) to generate answer questions of the target round.
[0003] However, the inventors have found that when the above method is adopted, the following technical problems often occur:
[0004] First, the dialogue recommendation system has the problem of delayed rewards, which leads to the problem of not being able to accurately answer early rounds;
[0005] Second, it is not possible to generate personalized responses to questions based on user preferences, resulting in the generated responses being inaccurate.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0008] Some embodiments of the present disclosure propose model training methods, question answer generation methods, devices, equipment and media to solve the technical problems mentioned in the above background technology section.
[0009] In a first aspect, some embodiments of the present disclosure provide a model training method, comprising: obtaining a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual problem attribute information set for a historical dialogue problem; performing vector conversion on each first historical dialogue information in the above-mentioned first historical dialogue information sequence to generate a first dialogue vector and obtain a first dialogue vector sequence; selecting historical dialogue information from the above-mentioned first historical dialogue information sequence as a target sample, and performing the following training steps: inputting the first dialogue vector corresponding to the above-mentioned target sample into an initial attribute attention mechanism model to generate an attribute problem information set for a problem attribute set; generating attribute loss information based on the above-mentioned attribute problem information set and the corresponding actual problem attribute information set; determining whether the above-mentioned initial attribute attention mechanism model has completed model training based on the above-mentioned attribute loss information; in response to the completion of the training, determining the above-mentioned initial attribute attention mechanism model as the attribute attention mechanism model.
[0010] Optionally, the method further includes: in response to determining that the initial attribute attention mechanism model has not been trained, adjusting relevant parameters in the initial attribute attention mechanism model, and reselecting target samples from the first historical dialogue information sequence, using the adjusted attribute attention mechanism model as the initial attribute attention mechanism model, and continuing to execute the training steps.
[0011] Optionally, the above-mentioned generating attribute loss information based on the above-mentioned attribute problem information set and the corresponding actual problem attribute information set includes: for each attribute problem information in the above-mentioned attribute problem information set, performing the following determination steps: determining sub-problem information of a predetermined attribute problem category in the above-mentioned attribute problem information as target sub-problem information; generating problem loss information for the corresponding actual problem attribute information based on the actual problem attribute information corresponding to the above-mentioned attribute problem information and the above-mentioned target sub-problem information; generating the above-mentioned attribute loss information based on the obtained problem loss information set.
[0012] Optionally, the above-mentioned inputting the first dialogue vector corresponding to the above-mentioned target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set includes: inputting the above-mentioned first dialogue vector into the initial sub-attention layer included in the above-mentioned initial attribute attention mechanism model to output a dialogue context vector; inputting the above-mentioned dialogue context vector into the initial question prediction model included in the above-mentioned initial attribute attention mechanism model to output an attribute question information set, wherein each attribute question information includes: sub-question information corresponding to at least one attribute question category.
[0013] In a second aspect, some embodiments of the present disclosure provide a model training device, comprising: a first acquisition unit, configured to acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual problem attribute information set for a historical dialogue problem; a first vector conversion unit, configured to perform vector conversion on each first historical dialogue information in the above-mentioned first historical dialogue information sequence to generate a first dialogue vector and obtain a first dialogue vector sequence; an execution unit, configured to select historical dialogue information from the above-mentioned first historical dialogue information sequence as a target sample, and perform the following training steps: input the first dialogue vector corresponding to the above-mentioned target sample into an initial attribute attention mechanism model to generate an attribute problem information set for a problem attribute set; generate attribute loss information based on the above-mentioned attribute problem information set and the corresponding actual problem attribute information; determine whether the above-mentioned initial attribute attention mechanism model has completed model training based on the above-mentioned attribute loss information; in response to the completion of the training, determine the above-mentioned initial attribute attention mechanism model as the attribute attention mechanism model.
[0014] Optionally, the device also includes: in response to determining that the initial attribute attention mechanism model has not been trained, adjusting relevant parameters in the initial attribute attention mechanism model, and reselecting target samples from the above-mentioned first historical dialogue information sequence, using the adjusted attribute attention mechanism model as the initial attribute attention mechanism model, and continuing to execute the above-mentioned training steps.
[0015] Optionally, the execution unit can be configured to: for each attribute problem information in the above-mentioned attribute problem information set, perform the following determination steps: determine the sub-problem information of a predetermined attribute problem category in the above-mentioned attribute problem information as the target sub-problem information; generate problem loss information for the corresponding actual problem attribute information based on the actual problem attribute information corresponding to the above-mentioned attribute problem information and the above-mentioned target sub-problem information; generate the above-mentioned attribute loss information based on the obtained problem loss information set.
[0016] Optionally, the execution unit can be configured to: input the above-mentioned first dialogue vector into the initial sub-attention layer included in the above-mentioned initial attribute attention mechanism model to output a dialogue context vector; input the above-mentioned dialogue context vector into the initial question prediction model included in the above-mentioned initial attribute attention mechanism model to output an attribute question information set, wherein each attribute question information includes: sub-question information corresponding to at least one attribute question category.
[0017] In a third aspect, some embodiments of the present disclosure provide a method for generating a reply question, comprising: obtaining a second historical dialogue information sequence for a target user; performing vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector and obtain a second dialogue vector sequence; determining at least one question attribute for the next dialogue question; inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate the next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence, wherein the attribute attention mechanism model is generated based on the method corresponding to the first aspect of the present disclosure.
[0018] Optionally, the at least one question attribute includes a user reply question attribute representing whether the user has replied; and the second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to generate the next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence, including: determining the user reply question attribute information corresponding to the user reply question attribute; inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to output the next reply question information for the user reply question attribute information.
[0019] Optionally, the at least one question attribute is at least one question attribute in a question attribute set.
[0020] In a fourth aspect, some embodiments of the present disclosure provide a reply question generating device, comprising: a second acquisition unit, configured to acquire a second historical dialogue information sequence for a target user; a second vector conversion unit, configured to perform vector conversion on each second historical dialogue information in the above second historical dialogue information sequence to generate a second dialogue vector and obtain a second dialogue vector sequence; a determination unit, configured to determine at least one question attribute for the next dialogue question; and a generation unit, configured to input the above second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate a next reply question information corresponding to the above at least one question attribute for the above second historical dialogue information sequence, wherein the above attribute attention mechanism model is generated based on the method corresponding to the first aspect of the present disclosure.
[0021] Optionally, the at least one question attribute includes a user reply question attribute characterizing whether the user has replied; and the generating unit may be configured to: determine user reply question attribute information corresponding to the user reply question attribute; input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to output the next reply question information for the user reply question attribute information.
[0022] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the implementation methods in the first and third aspects.
[0023] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the implementation modes of the first aspect and the third aspect is implemented.
[0024] In a seventh aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, implements the method described in any one of the implementation modes of the first and third aspects above.
[0025] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the model training method of some embodiments of the present disclosure, using the attribute attention mechanism model, it is possible to accurately generate reply questions for preset question attributes. Specifically, the reasons for the inaccurate generation of relevant reply questions are: first, the dialogue recommendation system has the problem of delayed rewards, which leads to the inability to accurately answer questions in early rounds; second, the inability to generate personalized reply questions for user preferences, resulting in the generated reply questions being inaccurate. Based on this, the model training method of some embodiments of the present disclosure first obtains a first historical dialogue information sequence for the target user. Among them, the first historical dialogue information includes: an actual question attribute information set for the historical dialogue question. Here, the first historical dialogue information sequence obtained is used as training data for the subsequent training of the initial attribute attention mechanism model. Here, the actual question attribute information set included in each first historical dialogue information is used as a label of the training data corresponding to the previous historical dialogue information to train the subsequent initial attribute attention mechanism model. Then, each first historical dialogue information in the above-mentioned first historical dialogue information sequence is vectorized to generate a first dialogue vector and obtain a first dialogue vector sequence. Here, through vector conversion, the dialogue feature information of each first historical dialogue information is extracted, and it is convenient to input it into the initial attribute attention mechanism model later. Finally, historical dialogue information is selected from the above-mentioned first historical dialogue information sequence as the target sample, and the following training steps are performed: the first step is to input the first dialogue vector corresponding to the above-mentioned target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. Here, through the initial attribute attention mechanism model, not only the user attribute feature information in each round of replies in the first dialogue vector is extracted, but also the dialogue context information is extracted to accurately generate an attribute question information set that fits the user attribute feature information, so as to realize the personalized generation of reply questions for user preferences. The second step is to generate attribute loss information according to the above-mentioned attribute question information set and the corresponding actual question attribute information set. Here, the obtained attribute loss information is used for the subsequent training of the initial attribute attention mechanism model. The third step is to accurately determine whether the model training of the above-mentioned initial attribute attention mechanism model is completed according to the above-mentioned attribute loss information. The fourth step is to determine the above-mentioned initial attribute attention mechanism model as the attribute attention mechanism model in response to the completion of the training. In summary, through the method of sequence prediction, not only can the problem of reward delay be effectively avoided, but also the attribute attention mechanism model can be used to learn the user attribute feature information of the target user in the dialogue information, so as to realize the personalized generation of reply questions based on the user's preferences. Therefore, using the attribute attention mechanism model, the reply questions for the preset question attributes can be accurately generated. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] 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. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0027] Figure 1 is a schematic diagram of an application scenario of a model training method according to some embodiments of the present disclosure;
[0028] Figure 2 is a flowchart of some embodiments of the model training method according to the present disclosure;
[0029] Figure 3 is a flowchart of other embodiments of the model training method according to the present disclosure;
[0030] Figure 4 is a flow chart of some embodiments of the method for generating answer question information according to the present disclosure;
[0031] Figure 5 is a schematic diagram of the structure of some embodiments of the model training device according to the present disclosure;
[0032] Figure 6 It is a schematic diagram of the structure of some embodiments of the apparatus for generating answer information according to the present disclosure;
[0033] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0034] 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.
[0035] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.
[0037] It should be noted that the modifications of "one" and "plurality" 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, it should be understood as "one or more".
[0038] 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.
[0039] With regard to the collection, storage, and use of user information (such as historical conversation information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0040] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0041] Figure 1 It is a schematic diagram of an application scenario of the model training method according to some embodiments of the present disclosure.
[0042] exist Figure 1In the application scenario, first, the electronic device 101 can obtain the first historical dialogue information sequence 103 for the target user 102. The first historical dialogue information includes: an actual question attribute information set for the historical dialogue questions. In this application scenario, the first historical dialogue information sequence 103 includes: a first historical dialogue information 1031 and a first historical dialogue information 1032. The first historical dialogue information 1031 can be "Question 1: Which brand of washing machine do you prefer? Answer: *** brand; actual question attribute information: the user has replied". The first historical dialogue information 1032 can be "Question 2: Do you need to wash clothes separately? Answer: empty; actual question attribute information: the user has not replied". Then, the electronic device 101 can perform vector conversion on each first historical dialogue information in the above first historical dialogue information sequence 103 to generate a first dialogue vector and obtain a first dialogue vector sequence 104. The first dialogue vector sequence 104 includes: a first dialogue vector 1041 corresponding to the first historical dialogue information 1031, and a first dialogue vector 1042 corresponding to the first historical dialogue information 1032. Finally, the electronic device 101 can select historical dialogue information from the above-mentioned first historical dialogue information sequence as a target sample, and perform the following training steps: Step 1, input the first dialogue vector corresponding to the above-mentioned target sample into the initial attribute attention mechanism model 105 to generate an attribute question information set for the problem attribute set. In this application scenario, the target sample is the first historical dialogue information 1032. The electronic device 101 can input the first dialogue vector 1042 into the initial attribute attention mechanism model 105 to generate attribute question information 106. The attribute question information 106 can be "Do you need to process clothes and shoes in batches?" Step 2, generate attribute loss information based on the above-mentioned attribute question information set and the corresponding actual problem attribute information set. In this application scenario, for the first dialogue vector 1042 and the attribute question information 106, the attribute loss information 107 can be "0.9". Step 3, determine whether the above-mentioned initial attribute attention mechanism model 105 has been trained based on the above-mentioned attribute loss information. Step 4, in response to the completion of the training, determine the above-mentioned initial attribute attention mechanism model 105 as the attribute attention mechanism model 108.
[0043] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0044] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0045] Continue to refer Figure 2 , shows a process 200 of some embodiments of the model training method according to the present disclosure. The model training method comprises the following steps:
[0046] Step 201: Acquire a first historical conversation information sequence for a target user.
[0047] In some embodiments, the execution entity of the above model training method (for example Figure 1 The electronic device 101 shown) can obtain a first historical dialogue information sequence for the target user through a wired connection method or a wireless connection method. Among them, the first historical dialogue information includes: an actual question attribute information set for historical dialogue questions. Among them, the target user can be a user with a dialogue record. The above-mentioned first historical dialogue information sequence can be a communication record information sequence of a dialogue exchange between the target user and the intelligent dialogue system. In practice, the actual answer question attribute information can be the question attribute information in the historical dialogue question (that is, the question raised by the intelligent dialogue system to be answered by the user). In practice, the above-mentioned question attribute information can be the attribute value of the question attribute. In practice, the question attribute can be but is not limited to one of the following: the number of question rounds, the question type. The above-mentioned intelligent dialogue system can be a dialogue system that interacts with the user and is equipped with an artificial intelligence algorithm.
[0048] For example, the first historical dialogue information sequence includes: historical dialogue information A, historical dialogue information B, historical dialogue information C, and historical dialogue information D. Historical dialogue information A includes: historical dialogue question A and historical user reply information A. Historical dialogue information B includes: historical dialogue question B and historical user reply information B. Historical dialogue information C includes: historical dialogue question C and historical user reply information C. Historical dialogue information D includes: historical dialogue question D and historical user reply information D. The actual question attribute information set corresponding to the historical dialogue question may include: actual question attribute information A, actual question attribute information B, and actual question attribute information C.
[0049] Optionally, the first historical dialogue information may include: an actual question attribute information set, historical dialogue questions, historical user reply information, and user information.
[0050] Step 202: Perform vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector, thereby obtaining a first dialogue vector sequence.
[0051] In some embodiments, the execution subject may perform vector conversion on each first historical conversation information in the first historical conversation information sequence to generate a first conversation vector and obtain a first conversation vector sequence, wherein the first conversation vector may represent conversation feature information of the first historical conversation information.
[0052] As an example, the execution entity may input each first historical dialogue information in the first historical dialogue information sequence into a BERT (Bidirectional Encoder Representation from Transformers) model to generate a first dialogue vector and obtain a first dialogue vector sequence.
[0053] Step 203, selecting historical dialogue information from the first historical dialogue information sequence as a target sample, and performing the following training steps:
[0054] Step 2031: input the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set.
[0055] In some embodiments, the execution subject may input the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. The initial attribute attention mechanism model may be an attribute attention mechanism model that has not yet been trained. The attribute attention mechanism model may be an attention mechanism neural network model that learns the attribute feature information of the question. In addition, the attribute attention mechanism model may be a model that learns the context feature information of the dialogue. In practice, the attribute attention mechanism model may be a Transformer model. The question attribute set may be a question attribute associated with the inquiry question that is pre-set for the training of the initial attribute attention mechanism model. The question attributes are not described in detail. There is a one-to-one correspondence between the attribute question information in the attribute question information set and the question attribute in the question attribute set. The attribute question information may be question information for the corresponding question attribute. For example, for the question attribute being the question type, the corresponding attribute question information is question information under the question type. For example, the question attribute is an attribute that characterizes whether the user is interested. Then the attribute question information may be question information for the user who is not interested, or may be question information for the user who is interested.
[0056] In some optional implementations of some embodiments, the step of inputting the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set may include the following steps:
[0057] In the first step, the execution subject may input the first dialogue vector into the initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector. The initial sub-attention layer may be a sub-attention layer that has not been trained yet. In practice, the sub-attention layer may be a network layer including a multi-head attention mechanism. The dialogue context vector may represent feature information of dialogue context-related features in the historical dialogue information.
[0058] In the second step, the execution subject may input the conversation context vector into the initial question prediction model included in the initial attribute attention mechanism model to output a set of attribute question information. Each attribute question information includes: sub-question information corresponding to at least one attribute question category. The initial question prediction model may be a question prediction model that has not yet been trained. In practice, the question prediction model may be a model that outputs attribute question information. In practice, the question prediction model may be a multi-layer serially connected fully connected layer. The attribute question category may be a question category corresponding to the attribute question. For example, the attribute question information is question information corresponding to the question attribute that characterizes whether the user is interested. The attribute question category may be one of the following: a question category that the user is not interested in and a question category that the user is interested in. The corresponding sub-question information may be one of the following: question information that the user is not interested in and question information that the user is interested in.
[0059] It should be noted that the sub-question information includes not only the question information under the corresponding attribute question category, but also the probability corresponding to the question information under the attribute question category. The probability represents the accuracy of the question information under the attribute question category.
[0060] Step 2032: Generate attribute loss information based on the above attribute problem information set and the corresponding actual problem attribute information set.
[0061] In some embodiments, the execution subject may generate attribute loss information based on the attribute problem information set and the corresponding actual problem attribute information set, wherein the attribute loss information may represent the information difference between the attribute problem information set and the corresponding actual problem attribute information set.
[0062] As an example, the execution entity may input the attribute problem information set and the corresponding actual problem attribute information set into a cross entropy loss function to generate attribute loss information.
[0063] Step 2033, based on the attribute loss information, determine whether the initial attribute attention mechanism model has been trained.
[0064] In some embodiments, the execution entity may determine whether the initial attribute attention mechanism model has been trained based on the attribute loss information.
[0065] As an example, in response to determining that the attribute loss information is less than a predetermined threshold, it is determined that the initial attribute attention mechanism model training is completed. In response to determining that the attribute loss information is greater than or equal to the predetermined threshold, it is determined that the initial attribute attention mechanism model training is not completed.
[0066] Step 2034, in response to the training being completed, the above-mentioned initial attribute attention mechanism model is determined as the attribute attention mechanism model.
[0067] In some embodiments, in response to the completion of training, the execution entity may determine the initial attribute attention mechanism model as the attribute attention mechanism model.
[0068] In some optional implementations of some embodiments, after step 203, the steps further include:
[0069] In response to determining that the initial attribute attention mechanism model has not been trained, the execution subject may adjust relevant parameters in the initial attribute attention mechanism model, reselect target samples from the first historical dialogue information sequence, use the adjusted attribute attention mechanism model as the initial attribute attention mechanism model, and continue to perform the training step. The selected target samples are different from the original target samples used as training data.
[0070] As an example, the above-mentioned execution entity can adjust the relevant parameters in the initial attribute attention mechanism model by back propagation according to the attribute loss information.
[0071] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the model training method of some embodiments of the present disclosure, using the attribute attention mechanism model, it is possible to accurately generate reply questions for preset question attributes. Specifically, the reasons for the inaccurate generation of relevant reply questions are: first, the dialogue recommendation system has the problem of delayed rewards, which leads to the inability to accurately answer questions in early rounds; second, the inability to generate personalized reply questions for user preferences, resulting in the generated reply questions being inaccurate. Based on this, the model training method of some embodiments of the present disclosure first obtains a first historical dialogue information sequence for the target user. Among them, the first historical dialogue information includes: an actual question attribute information set for the previous historical dialogue information. Here, the first historical dialogue information sequence obtained is used as training data for the subsequent training of the initial attribute attention mechanism model. Here, the actual question attribute information set included in each first historical dialogue information is used as a label of the training data corresponding to the previous historical dialogue information to train the subsequent initial attribute attention mechanism model. Then, each first historical dialogue information in the above-mentioned first historical dialogue information sequence is vectorized to generate a first dialogue vector and obtain a first dialogue vector sequence. Here, through vector conversion, the dialogue feature information of each first historical dialogue information is extracted, and it is convenient to input it into the initial attribute attention mechanism model later. Finally, historical dialogue information is selected from the above-mentioned first historical dialogue information sequence as the target sample, and the following training steps are performed: the first step is to input the first dialogue vector corresponding to the above-mentioned target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. Here, through the initial attribute attention mechanism model, not only the user attribute feature information in each round of replies in the first dialogue vector is extracted, but also the dialogue context information is extracted to accurately generate an attribute question information set that fits the user attribute feature information, so as to realize the personalized generation of reply questions for user preferences. The second step is to generate attribute loss information according to the above-mentioned attribute question information set and the corresponding actual question attribute information set. Here, the obtained attribute loss information is used for the subsequent training of the initial attribute attention mechanism model. The third step is to accurately determine whether the model training of the above-mentioned initial attribute attention mechanism model is completed according to the above-mentioned attribute loss information. The fourth step is to determine the above-mentioned initial attribute attention mechanism model as the attribute attention mechanism model in response to the completion of the training. In summary, through the method of sequence prediction, not only can the problem of reward delay be effectively avoided, but also the attribute attention mechanism model can be used to learn the user attribute feature information of the target user in the dialogue information, so as to realize the personalized generation of reply questions based on the user's preferences. Therefore, using the attribute attention mechanism model, the reply questions for the preset question attributes can be accurately generated.
[0072] Further references Figure 3, shows a process 300 of other embodiments of the model training method according to the present disclosure. The model training method comprises the following steps:
[0073] Step 301: Acquire a first historical conversation information sequence for a target user.
[0074] Step 302: Perform vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector, thereby obtaining a first dialogue vector sequence.
[0075] Step 303, selecting historical dialogue information from the first historical dialogue information sequence as a target sample, and performing the following training steps:
[0076] Step 3031: input the first dialogue vector corresponding to the above target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set.
[0077] Step 3032: for each attribute question information in the attribute question information set, perform the following determination steps:
[0078] Step 30321, determine the sub-question information of the predetermined attribute question category in the above attribute question information as the target sub-question information.
[0079] In some embodiments, an execution entity (e.g. Figure 1 The electronic device 101 shown in the figure can determine the sub-question information of the predetermined attribute question category in the above attribute question information as the target sub-question information. The predetermined attribute question category can be a predetermined question category that is the same as the attribute category corresponding to the target actual question attribute information.
[0080] Step 30322: Generate problem loss information corresponding to the actual problem attribute information based on the actual problem attribute information corresponding to the attribute problem information and the target sub-problem information.
[0081] In some embodiments, the execution entity may generate problem loss information corresponding to the actual problem attribute information based on the actual problem attribute information corresponding to the attribute problem information and the target sub-problem information.
[0082] As an example, the execution subject may determine the cosine similarity between the vector corresponding to the actual problem attribute information and the vector corresponding to the target sub-problem information, and then determine the difference between the cosine similarity and the target value as the problem loss information.
[0083] Step 3033, generating the above-mentioned attribute loss information according to the obtained problem loss information set.
[0084] In some embodiments, the execution entity may generate the attribute loss information according to the obtained problem loss information set.
[0085] As an example, the above-mentioned execution entity can determine the loss average value corresponding to the problem loss information set as the attribute loss information.
[0086] Step 3034, based on the attribute loss information, determine whether the initial attribute attention mechanism model has been trained.
[0087] Step 3035, in response to the training being completed, the above-mentioned initial attribute attention mechanism model is determined as the attribute attention mechanism model.
[0088] In some embodiments, the specific implementation of steps 301-302, step 3031, and steps 3034-3035 and the technical effects thereof can be referred to. Figure 2 Steps 201-202 and steps 2033-2034 in the corresponding embodiments are not repeated here.
[0089] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 In the process 300 of the model training method in some corresponding embodiments, a predetermined attribute question category is set for each attribute question information, so that the subsequent initial attribute attention mechanism model can learn the corresponding feature information for the predetermined attribute question category, thereby making the training of the initial attribute attention mechanism model more efficient and the obtained attribute attention mechanism model more accurate.
[0090] Continue to refer Figure 4 , shows a process 400 of some embodiments of the method for generating a reply question according to the present disclosure. The method for generating a reply question comprises the following steps:
[0091] Step 401: Acquire a second historical conversation information sequence for a target user.
[0092] In some embodiments, the execution subject of the above-mentioned answer question generation method (for example Figure 1 The electronic device 101 shown in the figure can obtain the second historical conversation information sequence for the target user by wired or wireless means. The historical time period corresponding to the second historical conversation information sequence can be different from the historical time period corresponding to the first historical conversation information sequence. For a specific explanation of the second historical conversation information sequence, refer to the first historical conversation information sequence.
[0093] Step 402: Perform vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector, thereby obtaining a second dialogue vector sequence.
[0094] In some embodiments, the execution subject may perform vector conversion on each second historical conversation information in the second historical conversation information sequence to generate a second conversation vector and obtain a second conversation vector sequence. The specific implementation and explanation of the second conversation vector refer to the specific implementation and explanation of the first conversation vector.
[0095] Step 403: Determine at least one question attribute for the next dialogue question.
[0096] In some embodiments, the execution subject may determine at least one question attribute for the next dialogue question. The at least one question attribute may be preset. In practice, the at least one question attribute may include: a question attribute that indicates whether the user is interested.
[0097] Step 404: input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next answer question information corresponding to the at least one question attribute for the second historical dialogue information sequence.
[0098] In some embodiments, the execution subject may input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate the next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence. The attribute attention mechanism model is generated based on the model training method disclosed in the present invention. In practice, the next reply question information may be the reply question information generated based on the question attribute that the user is interested in.
[0099] In some optional implementations of some embodiments, the at least one question attribute includes a user reply question attribute representing whether the user replies. The attribute categories corresponding to the user reply question attribute may include: user reply category and user non-reply category.
[0100] Optionally, the step of inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next answer question information corresponding to the at least one question attribute for the second historical dialogue information sequence may include the following steps:
[0101] The first step is to determine the user answer question attribute information corresponding to the above user answer question attribute. The user answer question attribute information may be the attribute content of the user answer question attribute. Specifically, the user answer question attribute information may be one of the following: user answer question information, user non-answer question information.
[0102] In the second step, the second dialogue vector sequence is input into the pre-trained attribute attention mechanism model to output the next reply question information for the attribute information of the user's reply question. Specifically, the next reply question information can be the reply question information under the premise that the user replies to the question information, or the reply question information under the premise that the user does not reply to the question information.
[0103] In some optional implementations of some embodiments, the at least one problem attribute is at least one problem attribute in a problem attribute set, that is, the at least one problem attribute is a subset of the problem attribute set.
[0104] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the reply question generation method of some embodiments of the present disclosure, the next reply question information for the next conversation can be accurately generated according to at least one set question attribute.
[0105] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a model training device, and these device embodiments are Figure 2 Corresponding to the method embodiments shown, the model training device can be specifically applied to various electronic devices.
[0106] like Figure 5 As shown, a model training device 500 includes: a first acquisition unit 501, a first vector conversion unit 502 and an execution unit 503. The first acquisition unit 501 is configured to acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual question attribute information set for the previous historical dialogue information; the first vector conversion unit 502 is configured to perform vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector and obtain a first dialogue vector sequence; the execution unit 503 is configured to select historical dialogue information from the first historical dialogue information sequence as a target sample, and perform the following training steps: input the first dialogue vector corresponding to the target sample into an initial attribute attention mechanism model to generate an attribute question information set for a question attribute set; generate attribute loss information according to the attribute question information set and the corresponding actual question attribute information set; determine whether the initial attribute attention mechanism model has completed model training according to the attribute loss information; and determine the initial attribute attention mechanism model as an attribute attention mechanism model in response to completion of training.
[0107] In some optional implementations of some embodiments, the apparatus 500 further includes: an adjustment unit (not shown in the figure). The adjustment unit may be configured to: in response to determining that the initial attribute attention mechanism model has not been trained, adjust relevant parameters in the initial attribute attention mechanism model, reselect target samples from the first historical dialogue information sequence, use the adjusted attribute attention mechanism model as the initial attribute attention mechanism model, and continue to perform the training steps.
[0108] In some optional implementations of some embodiments, the execution unit 503 can be further configured to: for each attribute problem information in the above-mentioned attribute problem information set, perform the following determination steps: determine the sub-problem information of a predetermined attribute problem category in the above-mentioned attribute problem information as the target sub-problem information; generate problem loss information for the corresponding actual problem attribute information based on the actual problem attribute information corresponding to the above-mentioned attribute problem information and the above-mentioned target sub-problem information; generate the above-mentioned attribute loss information based on the obtained problem loss information set.
[0109] In some optional implementations of some embodiments, the execution unit 503 may be further configured to: input the first dialogue vector into the initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector; input the dialogue context vector into the initial question prediction model included in the initial attribute attention mechanism model to output an attribute question information set, wherein each attribute question information includes: sub-question information corresponding to at least one attribute question category.
[0110] It is understandable that the units recorded in the model training device 500 are similar to the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the model training device 500 and the units contained therein, and will not be repeated here.
[0111] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for generating a response question. These device embodiments are similar to Figure 4 Corresponding to the method embodiments shown, the answer question generating device can be specifically applied to various electronic devices.
[0112] like Figure 6As shown, a reply question generating device 600 includes: a second acquisition unit 601, a second vector conversion unit 602, a determination unit 603 and a generation unit 604. The second acquisition unit 601 is configured to acquire a second historical dialogue information sequence for a target user; the second vector conversion unit 602 is configured to perform vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector and obtain a second dialogue vector sequence; the determination unit 603 is configured to determine at least one question attribute for the next dialogue question; the generation unit 604 is configured to input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate the next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence, wherein the attribute attention mechanism model is generated based on the model training method disclosed in the present invention.
[0113] In some optional implementations of some embodiments, the at least one question attribute includes a user reply question attribute representing whether the user has replied; and the generation unit 604 may be further configured to: determine the user reply question attribute information corresponding to the user reply question attribute; input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to output the next reply question information for the user reply question attribute information.
[0114] In some optional implementations of some embodiments, the at least one question attribute is at least one question attribute in a question attribute set.
[0115] It can be understood that the units recorded in the answer question generating device 600 are similar to the reference Figure 4 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the answer question generating device 600 and the units included therein, and will not be described in detail here.
[0116] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)700. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0117] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage device 708 into a random access memory 703. Various programs and data required for the operation of the electronic device 700 are also stored in the random access memory 703. The processing device 701, the read-only memory 702, and the random access memory 703 are connected to each other via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0118] Typically, the following devices may be connected to the input / output interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0119] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0120] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0121] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected 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 future developed network.
[0122] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual problem attribute information set for a historical dialogue problem; performs vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector and obtain a first dialogue vector sequence; selects historical dialogue information from the first historical dialogue information sequence as a target sample, and performs the following training steps: inputs the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute problem information set for a problem attribute set; generates attribute loss information based on the attribute problem information set and the corresponding actual problem attribute information set; determines whether the initial attribute attention mechanism model has completed model training based on the attribute loss information; and determines the initial attribute attention mechanism model as the attribute attention mechanism model in response to the completion of training. Acquire a second historical dialogue information sequence for a target user; perform vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector and obtain a second dialogue vector sequence; determine at least one question attribute for a next dialogue question; input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next answer question information corresponding to the at least one question attribute for the second historical dialogue information sequence, wherein the attribute attention mechanism model is generated based on a public model training method.
[0123] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including 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 separate 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).
[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 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 implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a first acquisition unit, a first vector conversion unit, and an execution unit. The names of these units do not constitute limitations on the units themselves in some cases, for example, the first acquisition unit may also be described as "a unit for acquiring a first historical conversation information sequence for a target user".
[0126] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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.
[0127] Some embodiments of the present disclosure also provide a computer program product, including a computer program, which implements any of the above-mentioned model training methods or answer question generation methods when executed by a processor.
[0128] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A model training method, comprising: Acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual question attribute information set for historical dialogue questions; Performing vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector, thereby obtaining a first dialogue vector sequence; Select historical dialogue information from the first historical dialogue information sequence as a target sample, and perform the following training steps: Inputting the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set; Generate attribute loss information according to the attribute problem information set and the corresponding actual problem attribute information set; Determining whether the initial attribute attention mechanism model has completed model training according to the attribute loss information; In response to the training being completed, the initial attribute attention mechanism model is determined as the attribute attention mechanism model.
2. The method according to claim 1, wherein: The method further comprises: In response to determining that the initial attribute attention mechanism model has not been trained, relevant parameters in the initial attribute attention mechanism model are adjusted, and target samples are reselected from the first historical dialogue information sequence, and the adjusted attribute attention mechanism model is used as the initial attribute attention mechanism model to continue executing the training step.
3. The method according to claim 1, wherein: The generating of attribute loss information according to the attribute problem information set and the corresponding actual problem attribute information set includes: For each attribute question information in the attribute question information set, the following determination steps are performed: Determine sub-question information of a predetermined attribute question category in the attribute question information as target sub-question information; Generate problem loss information corresponding to the actual problem attribute information according to the actual problem attribute information corresponding to the attribute problem information and the target sub-problem information; The attribute loss information is generated according to the obtained problem loss information set.
4. The method according to claim 1, wherein: The step of inputting the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set includes: Inputting the first dialogue vector into an initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector; The dialogue context vector is input into the initial question prediction model included in the initial attribute attention mechanism model to output an attribute question information set, wherein each attribute question information includes: sub-question information corresponding to at least one attribute question category.
5. A method for generating a response question, comprising: Obtaining a second historical conversation information sequence for the target user; performing vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector, thereby obtaining a second dialogue vector sequence; determining at least one question attribute for a next conversation question; The second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to generate next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence, wherein the attribute attention mechanism model is generated based on the method described in one of claims 1-4.
6. The method according to claim 5, wherein: The at least one question attribute includes a user answer question attribute indicating whether the user answers; as well as The step of inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next answer question information corresponding to the at least one question attribute for the second historical dialogue information sequence includes: Determine user answer question attribute information corresponding to the user answer question attribute; The second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to output next answer question information for the attribute information of the user's answer question.
7. The method according to claim 5, wherein: The at least one problem attribute is at least one problem attribute in a problem attribute set.
8. A model training device, comprising: A first acquisition unit is configured to acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: an actual question attribute information set for historical dialogue questions; a first vector conversion unit configured to perform vector conversion on each first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector and obtain a first dialogue vector sequence; The execution unit is configured to select historical dialogue information from the first historical dialogue information sequence as a target sample, and perform the following training steps: input the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model to generate an attribute question information set for the problem attribute set; generate attribute loss information according to the attribute question information set and the corresponding actual problem attribute information set; determine whether the initial attribute attention mechanism model has completed model training according to the attribute loss information; in response to the completion of training, determine the initial attribute attention mechanism model as the attribute attention mechanism model.
9. A device for generating answer information, comprising: A second acquisition unit is configured to acquire a second historical conversation information sequence for the target user; a second vector conversion unit configured to perform vector conversion on each second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector and obtain a second dialogue vector sequence; a determination unit configured to determine at least one question attribute for a next dialogue question; A generation unit is configured to input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next reply question information corresponding to the at least one question attribute for the second historical dialogue information sequence, wherein the attribute attention mechanism model is generated based on the method described in one of claims 1-4.
10. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
11. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Model training method, dialogue generation method and device, equipment and medium
CN110188182A
Multi-product demand matching method and system based on graph generation free dialogue
CN110555100A
Conversation reply method and device based on attribute tag control and computer equipment
CN111859989A
Conversation processing method and device, electronic equipment and storage medium
CN112559718A
Customer service dialogue template generation method and device
CN115147132A
