Model training method, question answering generation method, device, equipment and medium

By training a model using dialogue vector transformation and attribute attention mechanism, the problems of inaccurate and unpersonalized responses in dialogue recommendation systems are solved, and accurate response generation is achieved.

CN119202146BActive Publication Date: 2026-11-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310769116.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-11-20
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Existing dialogue recommendation systems suffer from delayed reward problems, which make it impossible to accurately respond to questions in early rounds and to generate personalized responses based on user preferences.

Method used

By acquiring the historical dialogue information sequence of the target user, vector transformation is performed to generate dialogue vectors. An attribute attention mechanism model is then used to train and generate an attribute question information set. The model is adjusted based on the attribute loss information until training is complete, thus generating the attribute attention mechanism model.

Benefits of technology

It enables the accurate generation of answers tailored to user preferences, avoids reward delay issues, and improves the accuracy of answering questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202146B_ABST
    Figure CN119202146B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a model training method, a reply question generation method, an apparatus, a device and a medium. A specific embodiment of the method comprises: obtaining a first historical dialogue information sequence; performing vector conversion on each first historical dialogue information to generate a first dialogue vector, thereby obtaining a first dialogue vector sequence; selecting historical dialogue information as a target sample, and performing the following training steps: inputting the corresponding first dialogue vector into an initial attribute attention mechanism model to obtain an attribute question information set; generating attribute loss information according to the attribute question information set and a corresponding actual question attribute information set; determining whether the initial attribute attention mechanism model is model training completed; and in response to the training being completed, determining the initial attribute attention mechanism model as an attribute attention mechanism model. The embodiment is related to artificial intelligence, and the attribute attention mechanism model can accurately generate a reply question for a preset question attribute.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, specifically to model training methods, question response generation methods, apparatus, devices, and media. Background Technology

[0002] Currently, recommending the best items or services through dialogue with users is an important development direction in the field of artificial intelligence. For generating response questions, the common approach is to utilize a Conversational Recommendation System (CRS) to generate response questions for the target round.

[0003] However, the inventors discovered that the following technical problems often arise when using the above method:

[0004] First, the dialogue recommendation system has the problem of delayed rewards, which makes it impossible to accurately answer questions in the early rounds;

[0005] Second, it cannot generate personalized answers based on user preferences, resulting in inaccurate answers.

[0006] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0008] Some embodiments of this disclosure provide model training methods, response question generation methods, apparatuses, devices, and media to address the technical problems mentioned in the background section above.

[0009] In a first aspect, some embodiments of this disclosure provide a model training method, comprising: acquiring a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: a set of actual question attribute information for historical dialogue questions; performing vector transformation 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; selecting historical dialogue information from the first historical dialogue information sequence as target samples, and performing the following training steps: inputting the first dialogue vector corresponding to the target sample into an initial attribute attention mechanism model to generate an attribute question information set for the question attribute set; generating attribute loss information based on the attribute question information set and the corresponding actual question attribute information set; determining whether the initial attribute attention mechanism model has been trained successfully based on the attribute loss information; and determining the initial attribute attention mechanism model as an attribute attention mechanism model in response to training completion.

[0010] Optionally, the above method further includes: in response to determining that the initial attribute attention mechanism model has not been trained, adjusting the 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 perform the above training steps.

[0011] Optionally, generating attribute loss information based on the aforementioned set of attribute problem information and the corresponding set of actual problem attribute information includes: for each attribute problem information in the aforementioned set of attribute problem information, performing the following determination steps: determining sub-problem information of a predetermined attribute problem category in the aforementioned 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 aforementioned attribute problem information and the aforementioned target sub-problem information; and generating the aforementioned attribute loss information based on the obtained set of problem loss information.

[0012] Optionally, the above-mentioned 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 the initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector; inputting 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: at least one sub-question information corresponding to an attribute question category.

[0013] Secondly, some embodiments of this disclosure provide a model training apparatus, 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: a set of actual question attribute information 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, thereby obtaining a first dialogue vector sequence; and an execution unit configured to select historical dialogue information from the first historical dialogue information sequence as a target sample, and to perform the following training steps: inputting the first dialogue vector corresponding to the target sample into an initial attribute attention mechanism model to generate an attribute question information set for the question attribute set; generating attribute loss information based on the attribute question information set and the corresponding actual question attribute information; determining whether the initial attribute attention mechanism model has been trained successfully based on the attribute loss information; and determining the initial attribute attention mechanism model as an attribute attention mechanism model in response to training completion.

[0014] Optionally, the apparatus further includes: in response to determining that the initial attribute attention mechanism model has not been trained, adjusting the 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 perform the above training steps.

[0015] Optionally, the execution unit can be configured to perform the following determination steps for each attribute problem information in the above attribute problem information set: determine the sub-problem information of the predetermined attribute problem category in the above 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 attribute problem information and the above target sub-problem information; and generate the above attribute loss information based on the obtained problem loss information set.

[0016] Optionally, the execution unit can be configured to: input the first dialogue vector to the initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector; input the dialogue context vector to 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 set includes: at least one sub-question information corresponding to an attribute question category.

[0017] Thirdly, some embodiments of this disclosure provide a method for generating a response question, including: acquiring a second historical dialogue information sequence for a target user; performing vector transformation 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 dialogue question; and inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate a next response question information for the second historical dialogue information sequence corresponding to the at least one question attribute, wherein the attribute attention mechanism model is generated based on the method corresponding to the first aspect of this disclosure.

[0018] Optionally, the at least one question attribute includes a user response question attribute representing whether the user has responded; and the above-mentioned inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response question information corresponding to the at least one question attribute for the second historical dialogue information sequence includes: determining the user response question attribute information corresponding to the user response question attribute; inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to output next response question information for the user response question attribute information.

[0019] Optionally, the above-mentioned at least one problem attribute is at least one problem attribute in the problem attribute set.

[0020] Fourthly, some embodiments of this disclosure provide a response question generation apparatus, 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 second historical dialogue information sequence to generate a second dialogue vector, thereby obtaining a second dialogue vector sequence; a determination unit configured to determine at least one question attribute for a next dialogue question; and a generation unit configured to input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response question information for the second historical dialogue information sequence corresponding to the at least one question attribute, wherein the attribute attention mechanism model is generated based on the method corresponding to the first aspect of this disclosure.

[0021] Optionally, the at least one question attribute includes a user response question attribute representing whether the user has responded; and the generation unit can be configured to: determine the user response question attribute information corresponding to the user response question attribute; and input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to output the next response question information for the user response question attribute information.

[0022] Fifthly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any of the implementations of the first and third aspects.

[0023] Sixthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any of the implementations of the first and third aspects.

[0024] In a seventh aspect, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the implementations of the first and third aspects above.

[0025] The above embodiments of this disclosure have the following beneficial effects: By using the model training method of some embodiments of this disclosure, and utilizing the attribute attention mechanism model, response questions for preset question attributes can be accurately generated. Specifically, the reasons for the inaccuracy in generating related response questions are: first, the dialogue recommendation system has a delayed reward problem, resulting in inaccurate response questions in early rounds; second, it cannot generate personalized response questions based on user preferences, resulting in inaccurate generated response questions. Based on this, the model training method of some embodiments of this disclosure firstly acquires a first historical dialogue information sequence for the target user. The first historical dialogue information includes: a set of actual question attribute information for historical dialogue questions. Here, the acquired first historical dialogue information sequence is used as training data for subsequent training of the initial attribute attention mechanism model. Here, the set of actual question attribute information included in each first historical dialogue information is used as a label for the training data corresponding to the previous historical dialogue information for subsequent training of the initial attribute attention mechanism model. Next, each first historical dialogue information in the above-mentioned first historical dialogue information sequence is vector-transformed to generate a first dialogue vector, resulting in a first dialogue vector sequence. Here, vector transformation is used to extract dialogue feature information for each first historical dialogue message, facilitating subsequent input into the initial attribute attention mechanism model. Finally, historical dialogue information is selected from the aforementioned first historical dialogue information sequence as target samples, and the following training steps are performed: First, the first dialogue vector corresponding to the target sample is input into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. Here, the initial attribute attention mechanism model extracts not only user attribute feature information from each round of responses in the first dialogue vector but also dialogue context information to accurately generate an attribute question information set that matches the user attribute feature information, achieving personalized generation of response questions tailored to user preferences. Second, attribute loss information is generated based on the aforementioned attribute question information set and the corresponding actual question attribute information set. The obtained attribute loss information is used for subsequent training of the initial attribute attention mechanism model. Third, based on the aforementioned attribute loss information, it can be accurately determined whether the initial attribute attention mechanism model has completed training. Fourth, in response to training completion, the initial attribute attention mechanism model is confirmed as the attribute attention mechanism model. In summary, sequence prediction not only effectively avoids the reward delay problem but also leverages an attribute attention mechanism model to learn user attribute features specific to the target user within the dialogue information, enabling personalized generation of responses tailored to user preferences. Therefore, using an attribute attention mechanism model, responses can be accurately generated based on preset question attributes. Attached Figure Description

[0026] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0027] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method according to some embodiments of the present disclosure;

[0028] Figure 2 This is a flowchart of some embodiments of the model training method according to this disclosure;

[0029] Figure 3 These are flowcharts of other embodiments of the model training method according to this disclosure;

[0030] Figure 4 This is a flowchart of some embodiments of the method for generating response information according to this disclosure;

[0031] Figure 5 This is a schematic diagram of the structure of some embodiments of the model training apparatus according to the present disclosure;

[0032] Figure 6 These are schematic diagrams illustrating the structure of some embodiments of the question-answering information generation apparatus according to this disclosure;

[0033] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0035] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0037] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0038] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0039] Before performing any operations involving the collection, storage, or use of user information (such as historical conversation information) as disclosed in this disclosure, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, informing personal information subjects, and obtaining prior authorization and consent from personal information subjects.

[0040] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0041] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method according to some embodiments of the present disclosure.

[0042] exist Figure 1In this application scenario, firstly, the electronic device 101 can acquire a first historical dialogue information sequence 103 for the target user 102. The first historical dialogue information includes a set of actual question attribute information for the historical dialogue questions. In this application scenario, the first historical dialogue information sequence 103 includes first historical dialogue information 1031 and first historical dialogue information 1032. First historical dialogue information 1031 could be "Question 1: Which brand of washing machine do you prefer? Answer: *** brand; Actual question attribute information: User has replied." First historical dialogue information 1032 could be "Question 2: Do you need to wash clothes separately? Answer: Empty; Actual question attribute information: User has not replied." Then, the electronic device 101 can perform vector transformation on each first historical dialogue information in the above first historical dialogue information sequence 103 to generate a first dialogue vector, resulting in 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 aforementioned first historical dialogue information sequence as target samples, and perform the following training steps: First, input the first dialogue vector corresponding to the target sample into the initial attribute attention mechanism model 105 to generate an attribute question information set for the question 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. Attribute question information 106 can be "Do you need to process clothes and shoes in batches?". Second, generate attribute loss information based on the aforementioned attribute question information set and the corresponding actual question attribute information set. In this application scenario, for the first dialogue vector 1042 and attribute question information 106, the attribute loss information 107 can be "0.9". Third, determine whether the aforementioned initial attribute attention mechanism model 105 has been trained successfully based on the aforementioned attribute loss information. Fourth, in response to the completion of training, determine the aforementioned initial attribute attention mechanism model 105 as attribute attention mechanism model 108.

[0043] It should be noted that the aforementioned electronic device 101 can be either 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 as a single server or a single terminal device. When the electronic device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0044] It should be understood that Figure 1 The number of electronic devices shown is merely illustrative. Any number of electronic devices can be used depending on the implementation requirements.

[0045] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of a model training method according to the present disclosure. This model training method includes the following steps:

[0046] Step 201: Obtain the first historical dialogue information sequence for the target user.

[0047] In some embodiments, the execution entity of the above model training method (e.g. Figure 1 The electronic device 101 shown can acquire a first historical dialogue information sequence for a target user via a wired or wireless connection. The first historical dialogue information includes a set of actual question attribute information for historical dialogue questions. The target user can be a user with existing dialogue records. The first historical dialogue information sequence can be a sequence of communication records between the target user and the intelligent dialogue system. In practice, the actual response question attribute information can be the question attribute information from historical dialogue questions (i.e., questions posed by the intelligent dialogue system awaiting user response). In practice, the question attribute information can be the attribute values ​​of question attributes. In practice, question attributes can be, but are not limited to, one of the following: number of question rounds, question type. The intelligent dialogue system can be a dialogue system that interacts with the user and is equipped with artificial intelligence algorithms.

[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 response information A. Historical dialogue information B includes: historical dialogue question B and historical user response information B. Historical dialogue information C includes: historical dialogue question C and historical user response information C. Historical dialogue information D includes: historical dialogue question D and historical user response information D. The set of actual problem attribute information corresponding to the historical dialogue question may include: actual problem attribute information A, actual problem attribute information B, and actual problem attribute information C.

[0049] Optionally, the first historical dialogue information may include: a set of actual problem attribute information, historical dialogue questions, historical user response information, and user information.

[0050] Step 202: Perform vector transformation on each piece of first historical dialogue information in the above first historical dialogue information sequence to generate a first dialogue vector, and obtain a first dialogue vector sequence.

[0051] In some embodiments, the executing entity may perform vector transformation on each piece of first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector, thereby obtaining a first dialogue vector sequence. The first dialogue vector can represent the dialogue feature information of the first historical dialogue information.

[0052] As an example, the aforementioned execution entity can input each piece of first historical dialogue information in the first historical dialogue information sequence into the BERT (Bidirectional Encoder Representation from Transformers) model to generate a first dialogue vector, thus obtaining a first dialogue vector sequence.

[0053] Step 203: Select historical dialogue information from the first historical dialogue information sequence mentioned above as the target sample, and perform 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 entity can 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 the question attribute set. The initial attribute attention mechanism model can be an attribute attention mechanism model that has not yet finished training. The attribute attention mechanism model can be an attention mechanism neural network model that learns question attribute feature information. Alternatively, the attribute attention mechanism model can be a model that learns dialogue context feature information. In practice, the attribute attention mechanism model can be a Transformer model. The question attribute set can be question attributes pre-set for training the initial attribute attention mechanism model and associated with the query question. Specific details about the question attributes are not elaborated further. There is a one-to-one correspondence between the attribute question information in the attribute question information set and the question attributes in the question attribute set. The attribute question information can be question information specific to the corresponding question attribute. For example, if the question attribute is a question type, the corresponding attribute question information is question information under that question type. For example, if the question attribute is an attribute representing whether the user is interested, then the attribute question information can be question information under which the user is not interested, or it can be question information under which the user is interested.

[0056] In some optional implementations of certain embodiments, the above-mentioned 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] The first step involves the execution entity inputting the first dialogue vector into the initial sub-attention layer of the initial attribute attention mechanism model to output a dialogue context vector. This initial sub-attention layer can be a sub-attention layer that has not yet finished training. In practice, the sub-attention layer can be a network layer that includes a multi-head attention mechanism. The dialogue context vector can represent the feature information of dialogue context association features in historical dialogue information.

[0058] The second step involves the execution entity inputting 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. Each attribute question information set includes at least one sub-question information corresponding to an attribute question category. The initial question prediction model may be a question prediction model that has not yet finished training. In practice, the question prediction model can be a model that outputs attribute question information. In practice, the aforementioned question prediction model can be a multi-layered, serially connected fully connected layer. The attribute question category can be the question category corresponding to the attribute question. For example, for attribute question information representing whether the user is interested in a question attribute, the attribute question category can 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 can 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 sub-problem information includes not only the problem information under the corresponding attribute problem category, but also the probability of the problem information under the attribute problem category. The probability represents the accuracy of the problem information under the attribute problem 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 executing entity can generate attribute loss information based on the attribute problem information set and the corresponding actual problem attribute information set. The attribute loss information can characterize the information difference between the attribute problem information set and the corresponding actual problem attribute information set.

[0062] As an example, the aforementioned execution entity can input the attribute problem information set and the corresponding actual problem attribute information set into the cross-entropy loss function to generate attribute loss information.

[0063] Step 2033: Based on the attribute loss information mentioned above, determine whether the initial attribute attention mechanism model has been successfully trained.

[0064] In some embodiments, the execution entity may determine whether the initial attribute attention mechanism model has been trained successfully 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, the initial attribute attention mechanism model training is determined to be complete. In response to determining that the attribute loss information is greater than or equal to the predetermined threshold, the initial attribute attention mechanism model training is determined to be incomplete.

[0066] Step 2034: In response to the completion of training, the initial attribute attention mechanism model is determined as the attribute attention mechanism model.

[0067] In some embodiments, in response to training completion, the aforementioned execution entity may determine the aforementioned initial attribute attention mechanism model as an attribute attention mechanism model.

[0068] In some optional implementations of certain embodiments, after step 203, the steps further include:

[0069] In response to the determination that the initial attribute attention mechanism model has not been fully trained, the aforementioned execution entity may adjust the relevant parameters in the initial attribute attention mechanism model, and reselect target samples from the aforementioned first historical dialogue information sequence, using the adjusted attribute attention mechanism model as the initial attribute attention mechanism model, and continue to execute the aforementioned training steps. The selected target samples are different from the original target samples used as training data.

[0070] As an example, the aforementioned execution entity can adjust the relevant parameters in the initial attribute attention mechanism model using backpropagation based on the attribute loss information.

[0071] The above embodiments of this disclosure have the following beneficial effects: By using the model training method of some embodiments of this disclosure, and utilizing the attribute attention mechanism model, response questions for preset question attributes can be accurately generated. Specifically, the reasons for the inaccuracy in generating related response questions are: first, the dialogue recommendation system has a delayed reward problem, resulting in inaccurate response questions in early rounds; second, it cannot generate personalized response questions based on user preferences, resulting in inaccurate generated response questions. Based on this, the model training method of some embodiments of this disclosure firstly acquires a first historical dialogue information sequence for the target user. The first historical dialogue information includes: a set of actual question attribute information for the previous historical dialogue information. Here, the acquired first historical dialogue information sequence is used as training data for subsequent training of the initial attribute attention mechanism model. Here, the set of actual question attribute information included in each first historical dialogue information is used as a label for the training data corresponding to the previous historical dialogue information for subsequent training of the initial attribute attention mechanism model. Next, each first historical dialogue information in the above-mentioned first historical dialogue information sequence is vector-transformed to generate a first dialogue vector, resulting in a first dialogue vector sequence. Here, vector transformation is used to extract dialogue feature information for each first historical dialogue message, facilitating subsequent input into the initial attribute attention mechanism model. Finally, historical dialogue information is selected from the aforementioned first historical dialogue information sequence as target samples, and the following training steps are performed: First, the first dialogue vector corresponding to the target sample is input into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. Here, the initial attribute attention mechanism model extracts not only user attribute feature information from each round of responses in the first dialogue vector but also dialogue context information to accurately generate an attribute question information set that matches the user attribute feature information, achieving personalized generation of response questions tailored to user preferences. Second, attribute loss information is generated based on the aforementioned attribute question information set and the corresponding actual question attribute information set. The obtained attribute loss information is used for subsequent training of the initial attribute attention mechanism model. Third, based on the aforementioned attribute loss information, it can be accurately determined whether the initial attribute attention mechanism model has completed training. Fourth, in response to training completion, the initial attribute attention mechanism model is confirmed as the attribute attention mechanism model. In summary, sequence prediction not only effectively avoids the reward delay problem but also leverages an attribute attention mechanism model to learn user attribute features specific to the target user within the dialogue information, enabling personalized generation of responses tailored to user preferences. Therefore, using an attribute attention mechanism model, responses can be accurately generated based on preset question attributes.

[0072] Further reference Figure 3The diagram illustrates flow 300 of some other embodiments of the model training method according to this disclosure. This model training method includes the following steps:

[0073] Step 301: Obtain the first historical dialogue information sequence for the target user.

[0074] Step 302: Perform vector transformation on each piece of first historical dialogue information in the above first historical dialogue information sequence to generate a first dialogue vector, and obtain a first dialogue vector sequence.

[0075] Step 303: Select historical dialogue information from the first historical dialogue information sequence mentioned above as the target sample, and perform the following training steps:

[0076] Step 3031: 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.

[0077] Step 3032: For each attribute problem information in the above attribute problem information set, perform the following determination steps:

[0078] Step 30321: Determine the sub-problem information of the predetermined attribute problem category in the above attribute problem information, and use it as the target sub-problem information.

[0079] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can determine the sub-problem information of the predetermined attribute problem category in the above-mentioned attribute problem information as the target sub-problem information. The predetermined attribute problem category can be a pre-determined problem category that corresponds to the attribute category of the target actual problem attribute information.

[0080] Step 30322: Based on the actual problem attribute information corresponding to the above attribute problem information and the above target sub-problem information, generate problem loss information for the corresponding actual problem attribute information.

[0081] In some embodiments, the execution entity may generate problem loss information for the corresponding 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 aforementioned execution entity can determine the cosine similarity between the vector corresponding to the actual problem attribute information and the vector corresponding to the target sub-problem information. Then, the difference between the cosine similarity and the target value is determined as the problem loss information.

[0083] Step 3033: Generate the aforementioned attribute loss information based on the obtained problem loss information set.

[0084] In some embodiments, the aforementioned execution entity may generate the aforementioned attribute loss information based on the obtained problem loss information set.

[0085] As an example, the aforementioned executing entity can determine the average loss value corresponding to the problem loss information set as attribute loss information.

[0086] Step 3034: Based on the attribute loss information mentioned above, determine whether the initial attribute attention mechanism model has been successfully trained.

[0087] Step 3035: In response to the completion of training, the initial attribute attention mechanism model described above is determined as the attribute attention mechanism model.

[0088] In some embodiments, the specific implementation of steps 301-302, 3031, and 3034-3035 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-202 and 2033-2034 in the corresponding embodiments will not be repeated here.

[0089] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, the model training method process 300 sets a predetermined attribute problem category for each attribute problem information, so that the subsequent initial attribute attention mechanism model can learn the corresponding feature information in a targeted manner for the predetermined attribute problem category, 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 to Figure 4 The diagram illustrates a flow 400 of some embodiments of a question-response generation method according to the present disclosure. This question-response generation method includes the following steps:

[0091] Step 401: Obtain the second historical dialogue information sequence for the target user.

[0092] In some embodiments, the entity executing the above-described question-response generation method (e.g.) Figure 1 The electronic device 101 shown can acquire a second historical dialogue information sequence targeting a user via wired or wireless means. The historical time period corresponding to the second historical dialogue information sequence may be different from the historical time period corresponding to the first historical dialogue information sequence. For a detailed explanation of the second historical dialogue information sequence, please refer to the first historical dialogue information sequence.

[0093] Step 402: Perform vector transformation 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.

[0094] In some embodiments, the executing entity may perform vector transformation on each piece of second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector, thus obtaining a second dialogue vector sequence. For the specific implementation and explanation of the second dialogue vector, please refer to the specific implementation and explanation of the first dialogue vector.

[0095] Step 403: Determine at least one question attribute for the next dialogue question.

[0096] In some embodiments, the aforementioned implementing entity may determine at least one question attribute for the next dialogue question. This at least one question attribute may be pre-set. In practice, the at least one question attribute may include: a question attribute representing whether the user is interested.

[0097] Step 404: Input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate the next response question information corresponding to at least one question attribute for the second historical dialogue information sequence.

[0098] In some embodiments, the executing entity may input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response question information corresponding to 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 of this disclosure. In practice, the next response question information may be response question information generated based on the question attribute indicating whether the user is interested in the question.

[0099] In some optional implementations of certain embodiments, the at least one question attribute mentioned above includes a user-responded question attribute, which indicates whether the user has responded. The attribute category corresponding to the user-responded question attribute may include: a user-responded category and a user-not-responded category.

[0100] Optionally, the above-mentioned inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate the next response question information corresponding to 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 response question attribute information corresponding to the aforementioned user response question attributes. This user response question attribute information can be the attribute content of the user response question attributes. Specifically, the user response question attribute information can be one of the following: user responds to a question, or user does not respond to a question.

[0102] The second step involves inputting the aforementioned second dialogue vector sequence into a pre-trained attribute attention mechanism model to output the next response question information based on the aforementioned user response question attribute information. Specifically, the next response question information can be the response question information based on the user's response question information, or it can be the response question information based on the user's no response question information.

[0103] In some optional implementations of certain embodiments, the aforementioned at least one problem attribute is at least one problem attribute in a set of problem attributes. That is, at least one problem attribute is a subset of the set of problem attributes.

[0104] The above embodiments of this disclosure have the following beneficial effects: the response question generation method of some embodiments of this disclosure can accurately generate the next response question information for the next dialogue based on at least one set question attribute.

[0105] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a model training apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, this 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: a set of actual question attribute information 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, resulting in a first dialogue vector sequence; the execution unit 503 is configured to select historical dialogue information from the first historical dialogue information sequence as target samples, and perform the following training steps: inputting the first dialogue vector corresponding to the target sample into an initial attribute attention mechanism model to generate an attribute question information set for the question attribute set; generating attribute loss information based on the attribute question information set and the corresponding actual question attribute information set; determining whether the initial attribute attention mechanism model has completed training based on the attribute loss information; and determining the initial attribute attention mechanism model as an attribute attention mechanism model in response to training completion.

[0107] In some optional implementations of certain embodiments, the apparatus 500 further includes an adjustment unit (not shown in the figure). The adjustment unit can be configured to: in response to determining that the initial attribute attention mechanism model has not been fully trained, adjust the 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 performing the above training steps.

[0108] In some optional implementations of some embodiments, the execution unit 503 may be further configured to: for each attribute problem information in the above attribute problem information set, perform the following determination steps: determine the sub-problem information of the predetermined attribute problem category in the above 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 attribute problem information and the above target sub-problem information; and generate the above 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 to the initial sub-attention layer included in the initial attribute attention mechanism model to output a dialogue context vector; input the dialogue context vector to 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: at least one sub-question information corresponding to an attribute question category.

[0110] It is understandable that the units described in the model training device 500 are related to the reference... Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the model training device 500 and the units contained therein, and will not be repeated here.

[0111] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a question-response generation apparatus, which are similar to... Figure 4 Corresponding to the method embodiments shown, this question-and-answer generation device can be specifically applied to various electronic devices.

[0112] like Figure 6As shown, a response question generation 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 piece of second historical dialogue information in the second historical dialogue information sequence to generate a second dialogue vector, resulting in a second dialogue vector sequence; the determination unit 603 is configured to determine at least one question attribute for the next dialogue question; and the generation unit 604 is configured to input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response question information for the second historical dialogue information sequence corresponding to the at least one question attribute, wherein the attribute attention mechanism model is generated based on the model training method of this disclosure.

[0113] In some optional implementations of some embodiments, the at least one question attribute mentioned above includes a user response question attribute representing whether the user has responded; and the generation unit 604 may be further configured to: determine the user response question attribute information corresponding to the user response question attribute; input the second dialogue vector sequence to a pre-trained attribute attention mechanism model to output the next response question information for the user response question attribute information.

[0114] In some alternative implementations of some embodiments, the above-mentioned at least one problem attribute is at least one problem attribute in a set of problem attributes.

[0115] It is understandable that the units described in the question-response generation device 600 and the reference Figure 4 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the question generation device 600 and the units contained therein, and will not be repeated here.

[0116] The following is for reference. Figure 7 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of electronic device 101)700 in the middle. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0117] like Figure 7As shown, the electronic device 700 may include a processing unit (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. The random access memory 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, the read-only memory 702, and the random access memory 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.

[0118] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, 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 alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.

[0119] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via 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, it performs the functions defined in the methods of some embodiments of this disclosure.

[0120] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this 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 some embodiments of this 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 propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0121] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0122] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: a set of actual question attribute information for historical dialogue questions; perform vector transformation on each piece of first historical dialogue information in the first historical dialogue information sequence to generate a first dialogue vector, obtaining a first dialogue vector sequence; select historical dialogue information from the first historical dialogue information sequence as target samples, 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 the question attribute set; generate attribute loss information based on the attribute question information set and the corresponding actual question attribute information set; determine whether the initial attribute attention mechanism model has completed training based on the attribute loss information; and, in response to training completion, determine the initial attribute attention mechanism model as an attribute attention mechanism model. A second historical dialogue information sequence for the target user is obtained; each second historical dialogue information in the second historical dialogue information sequence is vector-transformed to generate a second dialogue vector, resulting in a second dialogue vector sequence; at least one question attribute for the next dialogue question is determined; the second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to generate the next response 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 publicly available model training method.

[0123] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0125] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first acquisition unit, a first vector transformation unit, and an execution unit. The names of these units do not necessarily limit the specific unit; for example, the first acquisition unit may also be described as "a unit for acquiring a first sequence of historical dialogue information for a target user."

[0126] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0127] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the model training methods or question response generation methods described above.

[0128] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A model training method, comprising: Obtain the first historical dialogue information sequence for the target user, wherein the first historical dialogue information includes: a set of actual question attribute information for the historical dialogue questions, and the actual question attribute information is the question attribute information in the historical dialogue questions; Each piece of first historical dialogue information in the first historical dialogue information sequence is transformed into a vector to generate a first dialogue vector, thus obtaining a first dialogue vector sequence. Select historical dialogue information from the first historical dialogue information sequence as target samples, and perform the following training steps: The first dialogue vector corresponding to the target sample is input into the initial attribute attention mechanism model to generate an attribute question information set for the question attribute set. The question attribute set is a question attribute set that is pre-set for training the initial attribute attention mechanism model and is associated with the question. 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 is the question information for the corresponding question attribute. Based on the attribute problem information set and the corresponding actual problem attribute information set, attribute loss information is generated; Based on the attribute loss information, determine whether the initial attribute attention mechanism model has completed training; Upon completion of training, the initial attribute attention mechanism model is determined as an attribute attention mechanism model.

2. The method according to claim 1, wherein, The method further includes: In response to the determination that the initial attribute attention mechanism model has not been fully trained, the relevant parameters in the initial attribute attention mechanism model are adjusted, and a new target sample is selected from the first historical dialogue information sequence. The adjusted attribute attention mechanism model is then used as the initial attribute attention mechanism model, and the training steps are continued.

3. The method according to claim 1, wherein, The step of generating attribute loss information based on the attribute problem information set and the corresponding actual problem attribute information set includes: For each attribute problem information in the attribute problem information set, perform the following determination steps: The sub-problem information of the predetermined attribute problem category in the attribute problem information is determined as the target sub-problem information. The predetermined attribute problem category is a pre-determined problem category that is the same as the attribute category corresponding to the actual problem attribute information. The sub-problem information includes not only the problem information under the corresponding attribute problem category, but also the probability corresponding to the problem information under the attribute problem category. Based on the actual problem attribute information corresponding to the attribute problem information and the target sub-problem information, generate problem loss information for the corresponding actual problem attribute information; The attribute loss information is generated based on 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: The first dialogue vector is input into the initial sub-attention layer included in the initial attribute attention mechanism model to output the 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: at least one sub-question information corresponding to the attribute question category, and 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.

5. A method for generating answers to questions, comprising: Obtain a second historical dialogue sequence for the target user; Each piece of second historical dialogue information in the second historical dialogue information sequence is transformed into a vector to generate a second dialogue vector, thus obtaining a second dialogue vector sequence. Determine at least one question attribute for the next dialogue question; The second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to generate next response 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 any one of claims 1-4.

6. The method according to claim 5, wherein, The at least one question attribute includes a user response question attribute that indicates whether the user has responded; as well as The step of inputting the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response question information corresponding to the at least one question attribute for the second historical dialogue information sequence includes: Determine the user response question attribute information corresponding to the user response question attribute; The second dialogue vector sequence is input into a pre-trained attribute attention mechanism model to output the next response question information based on the user's response question attribute information.

7. The method according to claim 5, wherein, The at least one question attribute is at least one question attribute in the question attribute set.

8. A model training device, comprising: The first acquisition unit is configured to acquire a first historical dialogue information sequence for a target user, wherein the first historical dialogue information includes: a set of actual question attribute information for historical dialogue questions, wherein the actual question attribute information is the question attribute information in the historical dialogue questions; The first vector conversion unit 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 is configured to select historical dialogue information from the first historical dialogue information sequence as a target sample, and to perform the following training steps: inputting 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, wherein the question attribute set is a pre-set question attribute associated with the query question for training the initial attribute attention mechanism model, and there is a one-to-one correspondence between the attribute question information in the attribute question information set and the question attributes in the question attribute set, and the attribute question information is question information for the corresponding question attribute; generating attribute loss information based on the attribute question information set and the corresponding actual question attribute information set; determining whether the initial attribute attention mechanism model has completed training based on the attribute loss information; and determining the initial attribute attention mechanism model as an attribute attention mechanism model in response to training completion.

9. A device for generating response information, comprising: The second acquisition unit is configured to acquire a second historical dialogue information sequence for the target user; The second vector conversion unit 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, thereby obtaining a second dialogue vector sequence. The determining unit is configured to determine at least one question attribute for the next dialogue question; The generation unit is configured to input the second dialogue vector sequence into a pre-trained attribute attention mechanism model to generate next response 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 any one of claims 1-4.

10. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

11. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.

12. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Model generation method and device, conversation generation method and device and electronic equipment

    CN115238052A

  • Knowledge-driven dialogue method based on unified generative model

    CN115952265A