Human-computer interaction model training method and device and computer equipment
By screening the matching degree between interactive image messages and setting information of the human-computer interaction system, the problem of low data cleaning in the prior art is solved, and the training accuracy and efficiency of the human-computer interaction model are improved.
Patent Information
- Application Number
- CN202510285221.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-17
AI Technical Summary
The existing human-computer interaction model training data cleaning technology has low cleaning strength, resulting in low sample data accuracy.
By obtaining the dialogue data samples of the human-computer interaction system, setting information for each interaction image, filtering according to the degree of matching between the interaction image message and the setting information, obtaining the corresponding second dialogue content information, and training the human-computer interaction model based on this.
It improves the accuracy and efficiency of human-computer interaction model training, ensures the accuracy of sample data, and reduces the cost of model training.
Smart Images

Figure CN120162591A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and particularly to a method, device, computer device, storage medium, and computer program product for training a human-computer interaction model. Background Art
[0002] In a human-computer interaction system, it is necessary to pre-train a human-computer interaction model to achieve conversations between humans and machines. For example, simulating human conversations and role-playing. During the process of training the human-computer interaction model, it is necessary to clean the sample data.
[0003] The current model training data cleaning technology has the problem of low cleaning intensity. As a result, the accuracy of the cleaned sample data is low. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer device, storage medium, and computer program product for training a human-computer interaction model to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for training a human-computer interaction model. The method includes:
[0006] Obtaining a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interaction image setting information; the first dialogue content information includes interaction image messages;
[0007] For each piece of the interaction image setting information, screening the interaction image messages according to the matching degree between the interaction image messages included in the first dialogue content information and the interaction image setting information, to obtain second dialogue content information corresponding to the interaction image setting information;
[0008] Training a human-computer interaction model according to the interaction image setting information and the corresponding second dialogue content information.
[0009] In a second aspect, the present application provides a device for training a human-computer interaction model. The device includes:
[0010] A sample acquisition module, configured to obtain a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interaction image setting information; the first dialogue content information includes interaction image messages;
[0011] A screening module, configured to screen the interaction image messages according to the matching degree between the interaction image messages included in the first dialogue content information and the interaction image setting information for each piece of the interaction image setting information, to obtain second dialogue content information corresponding to the interaction image setting information;
[0012] A model training module, configured to train a human-computer interaction model according to the interaction image setting information and the corresponding second dialogue content information.
[0013] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:
[0014] Obtain a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interaction image setting information; the first dialogue content information includes interaction image messages;
[0015] For each of the interaction image setting information, screen the interaction image messages according to the matching degree between the interaction image messages included in the first dialogue content information and the interaction image setting information, so as to obtain second dialogue content information corresponding to the interaction image setting information;
[0016] Train a human-computer interaction model according to the interaction image setting information and the corresponding second dialogue content information.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, the following steps are implemented:
[0018] Obtain a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interaction image setting information; the first dialogue content information includes interaction image messages;
[0019] For each of the interaction image setting information, screen the interaction image messages according to the matching degree between the interaction image messages included in the first dialogue content information and the interaction image setting information, so as to obtain second dialogue content information corresponding to the interaction image setting information;
[0020] Train a human-computer interaction model according to the interaction image setting information and the corresponding second dialogue content information.
[0021] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0022] Obtain a dialogue data sample of the human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes interactive image messages;
[0023] For each of the interactive image setting information, screen the interactive image messages according to the matching degree between the interactive image messages included in the first dialogue content information and the interactive image setting information, so as to obtain second dialogue content information corresponding to the interactive image setting information;
[0024] Train the human-computer interaction model according to the interactive image setting information and the corresponding second dialogue content information.
[0025] In the above human-computer interaction model training method, device, computer device, storage medium and computer program product, first, a dialogue data sample of the human-computer interaction system can be obtained; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes interactive image messages; further, for each interactive image setting information, the interactive image messages can be screened according to the matching degree between the interactive image messages included in the first dialogue content information and the interactive image setting information, so as to obtain second dialogue content information corresponding to the interactive image setting information; finally, the human-computer interaction model can be trained according to the interactive image setting information and the corresponding second dialogue content information. In the method provided in the embodiments of the present application, the dialogue sample data can be divided according to the interactive image setting information, and the interactive image messages included in the dialogue content information can be screened in multiple dimensions to ensure the accuracy of the sample data used for the human-computer interaction model. Further, the accuracy of the human-computer interaction model training and the accuracy of the human-computer interaction model function can be improved. Due to the reduction of the sample data volume, the training efficiency of the human-computer interaction model can also be improved, and the cost of model training can be reduced. Brief Description of the Drawings
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained without creative efforts based on these drawings.
[0027] Figure 1 It is a schematic flowchart of a method for training a human-computer interaction model provided by an embodiment of the present application;
[0028] Figure 2 It is a schematic flowchart of dividing the dialogue data sample provided by an embodiment of the present application;
[0029] Figure 3 A schematic flowchart of a process for obtaining second dialogue content information through primary screening provided by an embodiment of the present application;
[0030] Figure 4 A schematic flowchart of a process for masking and marking a first unmatched interactive image message provided by an embodiment of the present application;
[0031] Figure 5 A schematic flowchart of a process for obtaining second dialogue content information through secondary screening provided by an embodiment of the present application;
[0032] Figure 6 Another schematic flowchart of a process for obtaining second dialogue content information through secondary screening provided by an embodiment of the present application;
[0033] Figure 7 Yet another schematic flowchart of a process for obtaining second dialogue content information through secondary screening provided by an embodiment of the present application;
[0034] Figure 8 A schematic flowchart of a process for obtaining identification information of the interactive image setting information provided by an embodiment of the present application;
[0035] Figure 9 A schematic flowchart of another method for training a human - machine interaction model provided by an embodiment of the present application;
[0036] Figure 10 A structural block diagram of a human - machine interaction model training device provided by an embodiment of the present application;
[0037] Figure 11 An internal structure diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0038] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] In an exemplary embodiment, as Figure 1 shown, a method for training a human - machine interaction model is provided. In this embodiment, the method is described by taking its application to a server as an example. It can be understood that this method can also be applied to a terminal, or to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0040] Step 102: Obtain the dialogue data sample of the human-computer interaction system; the dialogue data sample includes the first dialogue content information and one or more interactive image setting information; the first dialogue content information includes the interactive image message.
[0041] Among them, the human-computer interaction system (HCI) can refer to the process of interaction between a user and a computer system. The dialogue data sample can be the dialogue data of the human-computer interaction system in the historical time period corresponding to the current time period. The dialogue data sample includes the first dialogue content information and one or more interactive image setting information; the first dialogue content information can include the interaction information between the user and the interactive image of the human-computer interaction system; the interaction information included in the first dialogue content information can include the user message and the interactive image message. The interactive image can be an image set in the human-computer interaction system for chatting with the user, for example, a system assistant and a voice assistant, etc. The user message can be the input message of the user in the human-computer interaction system, and the interactive image message can be the reply message obtained by the human-computer interaction system for the input message of the user. The reply message can be output through the interactive image and can be called the assistant message. The interactive image setting information can include the dialogue scene setting information. The dialogue scene setting information can include but is not limited to the user nickname, the assistant nickname, the assistant style, the story background, the relationship between the user and the assistant, and the current time of the current round of dialogue, etc. The interactive image setting information can include static setting information and dynamic setting information. If the interactive image setting information is static setting information, it means that for the human-computer interaction system, the interactive image setting information is fixed and unchanged, and for each assistant message, the corresponding interactive image setting information is the same; if the interactive image setting information is dynamic setting information, it means that for the human-computer interaction system, the interactive image setting information can change. For example, the story background can change, the assistant nickname and the assistant style can also change, and for each assistant message, the corresponding interactive image setting information can be different.
[0042] Step 104: For each interactive image setting information, screen the interactive image message according to the matching degree between the interactive image message included in the first dialogue content information and the interactive image setting information, and obtain the second dialogue content information corresponding to the interactive image setting information.
[0043] Among them, the dialogue data sample may include one or more interactive image setting information. If the dialogue data sample includes multiple interactive image setting information, the dialogue data sample may be divided according to the interactive image setting information to obtain multiple dialogue data sub-samples corresponding to the dialogue data sample. In a possible implementation manner, for each interactive image setting information, a combination of user messages and interactive image messages (assistant messages) corresponding to the same interactive image setting information may be determined as the second dialogue content message corresponding to the interactive image setting information. The second dialogue content information may be the dialogue content information of the user and the interactive image in an interaction round of the human-computer interaction system. Each of the multiple dialogue data sub-samples may include one interactive image setting information and the second dialogue content information corresponding to the interactive image setting information, and the second dialogue content information includes user messages and interactive image messages. For example, as Figure 2 shown, the interactive image message may be determined as the assistant message, and the interactive image setting information may be determined as the character setting information. Figure 2 As shown in the dialogue data sample, it includes 3 interactive image setting information, which may include character setting information 1, character setting information 2, and character setting information 3. Furthermore, according to the character setting information, the dialogue data sample may be divided into 3 dialogue data sub-samples. That is, the combination of user message 1 and assistant message 1 corresponding to character setting information 1 may be determined as the second dialogue content information 1, and the combination of the character setting information 1 and the second dialogue content information 1 may be determined as the dialogue data sub-sample 1; the combination of user message 2, assistant message 2, user message 3, and assistant message 3 corresponding to character setting information 2 may be determined as the second dialogue content information 2, and the combination of the character setting information 2 and the second dialogue content information 2 may be determined as the dialogue data sub-sample 2; the combination of user message 4, assistant message 4, user message 5, assistant message 5, user message 6, and assistant message 6 corresponding to character setting information 3 may be determined as the second dialogue content information 3, and the combination of the character setting information 3 and the second dialogue content information 3 may be determined as the dialogue data sub-sample 3.
[0044] In this step, the first dialogue content information may include one or more interactive image messages. According to the matching degree between the one or more interactive image messages and the interactive image setting information included in the first dialogue content information, the one or more interactive image messages may be screened, and the interactive image messages with the matching degree greater than or equal to the matching degree threshold may be determined as the matching interactive image messages. Furthermore, according to the matching interactive image messages, the second dialogue content information corresponding to the interactive image setting information may be obtained. The second dialogue content information may include the interactive image setting information, as well as the user messages and the matching interactive image messages corresponding to the interactive image setting information.
[0045] Step 106: Train the human-computer interaction model according to the interaction image setting information and the corresponding second dialogue content information.
[0046] Among them, each interaction image setting information and the corresponding second dialogue content information can be used as a dialogue data sub-sample. Furthermore, one or more dialogue data sub-samples obtained from the dialogue data sample can be used to train the human-computer interaction model, which can be used to implement the dialogue interaction between the user and the computer device. For example, the human-computer interaction model can be a dialogue model, which can be a natural language model. The natural language model can parse and understand the user message input by the user, such as lexical analysis, syntactic analysis, and semantic understanding, and convert the natural language input by the user into a semantic representation that can be processed by the computer. Furthermore, combined with the corresponding interaction image setting information, context information, and the current user information input by the user, a reply message for the current user information can be generated and output through the interaction image, which is the interaction image message or the assistant message.
[0047] In the method of this embodiment, first, the dialogue data sample of the human-computer interaction system can be obtained; the dialogue data sample includes the first dialogue content information and one or more interaction image setting information; the first dialogue content information includes the interaction image message. Further, for each interaction image setting information, the interaction image message can be screened according to the matching degree between the interaction image message included in the first dialogue content information and the interaction image setting information to obtain the second dialogue content information corresponding to the interaction image setting information. Finally, the human-computer interaction model can be trained according to the interaction image setting information and the corresponding second dialogue content information. In the method provided by the embodiments of the present application, the dialogue sample data can be divided into samples according to the interaction image setting information, and the interaction image messages included in the dialogue content information can be screened in multiple dimensions to ensure the accuracy of the sample data used for the human-computer interaction model. Furthermore, the accuracy of the human-computer interaction model training and the accuracy of the human-computer interaction model function can be improved. Due to the reduction of the sample data volume, the training efficiency of the human-computer interaction model can also be improved, and the cost of model training can be reduced.
[0048] In an exemplary embodiment, as Figure 3 shown, step 104 may include steps 302 to 308. Among them:
[0049] Step 302: Obtain the matching degree between the interaction image message included in the first dialogue content information and the interaction image setting information.
[0050] Among them, the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content message may include a user message and an interactive image message, the interactive image message may include a user reply message and a dialogue frame message, and the dialogue frame message may include, but is not limited to, a dialogue opening, a paragraph opening, and an ending, etc. For each interactive image setting information, a combination of the user message and the interactive image message (assistant message) corresponding to the same interactive image setting information can be determined as the second dialogue content message corresponding to the interactive image setting information, and the second dialogue content information may be the dialogue content information between the user and the interactive image of the human-computer interaction system in an interaction turn. In this step, for each interactive image setting information in the dialogue data sample, according to the matching degree between one or more interactive image messages included in the first dialogue content information and the interactive image setting information, the matching interactive image message of the interactive image setting information can be filtered out from the one or more interactive image messages. The matching degree can be used to characterize the association degree between the interactive image message and the interactive image setting information. In a possible implementation manner, the matching degree between each interactive image message and the interactive image setting information can be obtained by using the pre-similarity based on the vector space model. Specifically, first, each interactive image message can be converted into a corresponding first vector, and the interactive image setting information can be converted into a corresponding second vector; further, the cosine value of the included angle between the first vector and the second vector can be calculated to measure the association degree between the interactive image message and the interactive image setting information. If the cosine value is closer to 1, it indicates that the directions of the two vectors are more similar, that is, the matching degree of the texts of the interactive image message and the interactive image setting information is higher; if the cosine value is closer to 0, it indicates that the directions of the two vectors are less similar, that is, the matching degree of the texts of the interactive image message and the interactive image setting information is lower. The higher the matching degree of the texts of the interactive image message and the interactive image setting information, the higher the association degree between the interactive image message and the interactive image setting information; the lower the matching degree of the texts of the interactive image message and the interactive image setting information, the lower the association degree between the interactive image message and the interactive image setting information.
[0051] Step 304, determine the interactive image message with a matching degree less than the matching degree threshold as the first non-matching interactive image message of the interactive image setting information.
[0052] Among them, the matching degree threshold can be preset. The number of corresponding interaction image messages of the interaction image setting information can be determined according to the sample data volume of the human-computer interaction model. Furthermore, the matching degree threshold can be determined according to the number of corresponding interaction image messages of the interaction image setting information. Thus, one or more interaction image messages can be screened according to the matching degree threshold. If the matching degree of the interaction image message and the interaction image setting information is greater than or equal to the matching degree threshold, it indicates that the association degree between the interaction image message and the interaction image setting information meets the association condition, and the interaction image message is determined as the first matching interaction image message of the interaction image setting information. If the matching degree of the interaction image message and the interaction image setting information is less than the matching degree threshold, it indicates that the association degree between the interaction image message and the interaction image setting information does not meet the association condition, and the interaction image message is determined as the first non-matching interaction image message of the interaction image setting information. The first non-matching interaction image message can be an interaction image message that does not match the interaction image setting information.
[0053] Step 306: Mask and mark the first non-matching interaction image message to obtain the first marked interaction image message of the first dialogue content information.
[0054] Among them, the first non-matching interaction image message can be masked, that is, the first non-matching interaction image message is masked and marked to obtain the first marked interaction image message of the first dialogue content information. The first marked interaction image message is the marked first non-matching interaction image message. The first marked interaction image message does not participate in the training of the human-computer interaction model. As Figure 4 shown, the interaction image message can be determined as the assistant message, and the interaction image setting information can be determined as the persona information. There are two interaction image setting information in the dialogue data sample, which can include persona information 1 and persona information 2. Furthermore, according to the persona information, the dialogue data sample can be divided into two dialogue data sub-samples, namely dialogue data sub-sample 1 and dialogue data sub-sample 2. The first dialogue content information of the dialogue data sample includes user message 1, assistant message 1, user message 2, assistant message 2, user message 3, assistant message 3, user message 4, assistant message 4, user message 5, assistant message 5, user message 6 and assistant message 6. From Figure 4As shown, for the persona information 1, the corresponding first matching interactive image messages are assistant message 2 and assistant message 3, and the corresponding first non-matching interactive image messages are assistant message 4, assistant message 5, and assistant message 6. The first non-matching interactive image messages, namely assistant message 4, assistant message 5, and assistant message 6, can be masked to obtain the first marked interactive image messages, namely the marked assistant message 4, the marked assistant message 5, and the marked assistant message 6. For the persona information 2, the corresponding first matching interactive image messages are assistant message 1, assistant message 4, assistant message 5, and assistant message 6, and the corresponding first non-matching interactive image messages are assistant message 2 and assistant message 3. The first non-matching interactive image messages, namely assistant message 2 and assistant message 3, can be masked to obtain the first marked interactive image messages, namely the marked assistant message 2 and the marked assistant message 3.
[0055] Step 308: Obtain the second conversation content information corresponding to the interactive image setting information according to the unmarked first matching interactive image messages other than the first marked interactive image messages in the first conversation content information.
[0056] Among them, for each interactive image setting information, the second conversation content information corresponding to the interactive image setting information can be obtained according to the combination of the first matching interactive image messages and the corresponding user messages. Furthermore, according to the combination of the interactive image setting information and the second conversation content information corresponding to the interactive image setting information, the corresponding dialogue data sub-sample can be obtained, and the dialogue data sub-sample can be used to participate in the training of the human-computer interaction model. As Figure 4 shown, the second conversation content information corresponding to the persona information 1 may include user message 1, assistant message 1, user message 2, assistant message 2, user message 3, and assistant message 3; the second conversation content information corresponding to the persona information 2 may include user message 1, assistant message 1, user message 4, assistant message 4, user message 5, assistant message 5, user message 6, and assistant message 6. The dialogue data sub-sample 1 can be obtained according to the combination of the persona information 1 and the corresponding second conversation content information; the dialogue data sub-sample 2 can be obtained according to the combination of the persona information 2 and the corresponding second conversation content information. The dialogue data sub-sample 1 and the dialogue data sub-sample 2 can be used to participate in the training of the human-computer interaction model.
[0057] In the method of this embodiment, the dialogue sample data can be divided according to the interactive image setting information. For each interactive image setting information, one or more interactive image messages can be screened according to the matching degree to obtain the first matching interactive image messages and the first non-matching interactive image messages of the interactive image setting information, which can ensure the accuracy of the sample data for the human-computer interaction model. Moreover, the first non-matching interactive image messages of the interactive image setting information can be masked and marked, and the marked first marked interactive image messages do not participate in the training of the human-computer interaction model, which can streamline the sample data volume, improve the training efficiency of the human-computer interaction model, and reduce the cost of model training.
[0058] In an exemplary embodiment, as Figure 5 shown, step 308 may include steps 502 to 504. Among them:
[0059] Step 502, obtaining a message quality evaluation value of the first matching interactive image message included in the first dialogue content information through a message quality evaluation model.
[0060] Among them, the message quality evaluation model can be a natural language model. For example, a large language model (LLM), which is an artificial intelligence model based on deep learning technology. In this step, at least one evaluation index for the first matching interactive image message included in the first dialogue content information can be preset. For example, the relevance, accuracy, and integrity of the first matching interactive image message and the corresponding user message. Furthermore, the message quality evaluation value of the first matching interactive image message included in the first dialogue content information can be obtained by using the large language model and the at least one evaluation index. The large language model may include at least one convolutional layer and at least one pooling layer. The convolutional layer is used to extract the features of the input data; the pooling layer is used to sample the input data. Both the convolutional layer and the pooling layer include activation functions.
[0061] Specifically, the convolutional layer can be used to extract the initial features of the text information of the first matching interactive image message. In the first step, the text information of the first matching interactive image message is vectorized to obtain multiple text information vectors, and the multiple text information vectors can be combined into a text information vector matrix. In the second step, the text information vector matrix is input into the convolutional layer, and a convolutional operation is performed using a convolutional kernel and the text information vector matrix, that is, the inner product operation is performed between the text information vector matrix and the convolutional kernel to obtain the convolutional result corresponding to the text information vector matrix. Next, based on the activation function, a non-linear transformation is performed on the convolutional result, and a bias vector is added to obtain the initial feature vector. In the third step, the initial feature vector is input into the pooling layer, and feature sampling can be performed on the initial feature vector. Then, based on the activation function, a non-linear transformation is performed on the feature sampling result, and a bias vector is added to obtain the evaluation feature of the first matching interactive image message.
[0062] Furthermore, the classification module included in the large language model can obtain the message quality evaluation value of the first matching interactive image message based on the evaluation feature of the first matching interactive image message. The classification module can include at least one fully connected layer, and the fully connected layer can classify the evaluation feature to obtain the message quality evaluation value of the first matching interactive image message. In addition, the fully connected layer can include an activation function, and the activation function includes a weight matrix and a bias constant.
[0063] Specifically, the evaluation feature can be input into the fully connected layer, and based on the weight matrix and bias vector of the activation function, a non-linear transformation is performed on the evaluation feature, and then through normalization, the message quality evaluation value of the first matching interactive image message is obtained. The message quality evaluation value can be used to measure the overall quality of the first matching interactive image message.
[0064] Step 504, determine the first matching interactive image message with a message quality evaluation value lower than the evaluation value threshold as the second non-matching interactive image message of the interactive image setting information.
[0065] Among them, the lowest message quality evaluation value of the interactive image message used for human-computer interaction model training can be used as the evaluation value threshold. If the message quality evaluation value of the first matching interactive image message is lower than the evaluation value threshold, it indicates that the first matching interactive image message does not meet the quality conditions of the training samples of the human-computer interaction model, and then the first matching interactive image message is determined as the second non-matching interactive image message of the interactive image setting information, and the second non-matching interactive image message does not participate in the training of the human-computer interaction model.
[0066] In the method of this embodiment, the first matching interactive image messages that have undergone a first screening can be secondarily screened. The message quality evaluation model is used to evaluate the first matching interactive image messages, and the first matching interactive image messages with unqualified evaluation results are removed from the first dialogue content information, which can improve the accuracy of the sample data for the human-computer interaction model. Moreover, the sample data volume can be streamlined, the training efficiency of the human-computer interaction model can be improved, and the cost of model training can be reduced.
[0067] In another exemplary embodiment, as Figure 6 shown, step 308 may include steps 602 to 604. Among them:
[0068] Step 602, for each first matching interactive image message included in the first dialogue content information, obtain the sum of the similarities between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message.
[0069] Among them, the embodiments of the present application can be used to detect the repeatability of the first matching interactive image messages in the first dialogue content information, and determine the repeated first matching interactive image messages as the second non-matching interactive image messages, and the second non-matching interactive image messages do not participate in the training of the human-computer interaction model. For each first matching interactive image message included in the first dialogue content information, the sum of the similarities can be used to measure the difference degree between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message. If the difference degree between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message is greater than or equal to the difference degree threshold, it indicates that the first matching interactive image message does not exist in duplicate, and then the first matching interactive image message can be retained; if the difference degree between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message is less than the difference degree threshold, it indicates that the first matching interactive image message exists in duplicate, and then the first matching interactive image message can be removed from the first dialogue content information.
[0070] Step 604, determine the first matching interactive image messages with the sum of similarities greater than the preset similarity threshold as the second non-matching interactive image messages of the interactive image setting information.
[0071] Among them, the sum of the minimum similarities corresponding to the repeated first matching interactive image messages can be determined as the preset similarity threshold. If the sum of the similarities corresponding to the first matching interactive image message is greater than the preset similarity threshold, it indicates that the difference degree between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message is less than the difference degree threshold, which indicates that the first matching interactive image message has duplicates. Then, the first matching interactive image message can be removed from the first conversation content information. Thus, the first matching interactive image message with the sum of similarities greater than the preset similarity threshold can be determined as the second non-matching interactive image message of the interactive image setting information. If the sum of the similarities corresponding to the first matching interactive image message is less than or equal to the preset similarity threshold, it indicates that the difference degree between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message is greater than or equal to the difference degree threshold, which indicates that the first matching interactive image message has no duplicates. Then, the first matching interactive image message can be retained in the first conversation content information.
[0072] In the method of this embodiment, the first matching interactive image messages that have been screened once can be screened a second time, and the duplicate matching interactive image messages in the first matching interactive image messages included in the first conversation content information can be removed, which can improve the accuracy of the sample data for the human-computer interaction model. Moreover, the amount of sample data can be streamlined, the training efficiency of the human-computer interaction model can be improved, and the cost of model training can be reduced.
[0073] In another exemplary embodiment, as Figure 7 shown, step 308 may include steps 702 to 704. Among them:
[0074] Step 702, use the sensitive information detection model to obtain the first matching interactive image message containing sensitive information.
[0075] Among them, first, the types of sensitive information to be detected can be determined. For example, user identification information numbers, contact information, passwords, bank card numbers, home addresses, medical records, etc. In one possible implementation, for sensitive information with a fixed format, such as user identification information numbers, contact information, passwords, and bank card numbers, the sensitive information detection model can use the regular expression matching algorithm. In another possible implementation, if the first matching interactive image message is in text form, the sensitive information detection model can use classification algorithms in machine learning, such as support vector machines and naive Bayes. In yet another possible implementation, the sensitive information detection model can also use deep learning algorithms, such as recurrent neural networks, long short-term memory networks, and convolutional neural networks.
[0076] Step 704, determine the first matching interactive image message containing sensitive information as the second non-matching interactive image message of the interactive image setting information.
[0077] Among them, if the first matching interactive image message contains sensitive information, the first matching interactive image message can be determined as the second non-matching interactive image message, and the second non-matching interactive image message does not participate in the training of the human-computer interaction model.
[0078] In the method of this embodiment, the first matching interactive image message that has been screened once can be screened again, and the first matching interactive image message containing sensitive information in the first dialogue content information can be screened out, which can improve the accuracy of the sample data for the human-computer interaction model.
[0079] In an exemplary embodiment, after step 504, step 604, and / or step 704, it may further include:
[0080] Perform a mask marking on the second non-matching interactive image message to obtain the second marked interactive image message of the first dialogue content information; obtain the second dialogue content information corresponding to the interactive image setting information according to the unmarked second matching interactive image message other than the second marked interactive image message in the first dialogue content information.
[0081] Among them, the second non-matching interactive image message can be masked, that is, a mask marking is performed on the second non-matching interactive image message to obtain the second marked interactive image message of the first dialogue content information; the second marked interactive image message is the marked second non-matching interactive image message. The second marked interactive image message does not participate in the training of the human-computer interaction model. Furthermore, for each interactive image setting information, the second dialogue content information corresponding to the interactive image setting information can be obtained according to the combination of the second matching interactive image message and the corresponding user message. Thus, according to the interactive image setting information and the combination of the second dialogue content information corresponding to the interactive image setting information, the corresponding dialogue data sub-sample can be obtained, and the dialogue data sub-sample can be used to participate in the training of the human-computer interaction model.
[0082] In the method of this embodiment, the second non-matching interactive image message screened out for the second time can be masked. After marking, the second non-matching interactive image message will not participate in the training of the human-computer interaction model, ensuring the accuracy of the sample data for the human-computer interaction model.
[0083] In an exemplary embodiment, step 106 may include:
[0084] Obtain the number of marked interactive image messages in the first marked interactive image message and the second marked interactive image message included in the first conversation content information; train the human-computer interaction model according to the second conversation content information corresponding to the first conversation content information with the number of marks less than the mark threshold.
[0085] Among them, the number of masked interactive image messages marked in the two screenings for the first conversation content information can be summarized, that is, the number of marks of the first marked interactive image message and the second marked interactive image message. During the training process of the human-computer interaction model, the combination of the interactive image setting information and the second conversation content information corresponding to the interactive image setting information can be used as a sub-sample of conversation data, and the sub-sample of conversation data can be used to participate in the training of the human-computer interaction model. If the number of marks of the first marked interactive image message and the second marked interactive image message in the first conversation content information is greater than or equal to the mark threshold, it indicates that too many interactive image messages are removed after the two screenings of the first conversation content information, resulting in insufficient interactive image messages included in the obtained second conversation content information. The sub-sample of conversation data corresponding to the second conversation content information with insufficient interactive image messages does not meet the training conditions of the human-computer interaction model. Therefore, the sub-sample of conversation data corresponding to the second conversation content information with insufficient interactive image messages can be removed from the sample data. If the number of marks of the first marked interactive image message and the second marked interactive image message in the first conversation content information is less than the mark threshold, it indicates that the number of interactive image messages included in the second conversation content information corresponding to the first conversation content information meets the training conditions of the human-computer interaction model. Therefore, the sub-sample of conversation data corresponding to the second conversation content information can participate in the training of the human-computer interaction model.
[0086] In the method of this embodiment, the sub-sample of conversation data corresponding to the second conversation content information with insufficient interactive image messages can be removed from the sample data, further improving the accuracy of the sample data used for the human-computer interaction model.
[0087] In an exemplary embodiment, step 302 may include:
[0088] Obtain the matching degree between the interactive image message included in the first conversation content information and the interactive image setting information according to the identification information corresponding to the interactive image setting information.
[0089] Among them, the identification information may be the unique identification of the interactive image setting information. In this embodiment, the identification information corresponding to the interactive image setting information may be the interactive image hash value, and the matching degree between the interactive image message included in the first conversation content information and the interactive image hash value of the interactive image setting information may be used as the matching degree between the interactive image message included in the first conversation content information and the interactive image setting information.
[0090] In the method of this embodiment, the interaction image hash value of the interaction image setting information can be used as the identification information corresponding to the interaction image setting information to participate in identification and calculation, which improves the simplicity and accuracy of the calculation.
[0091] In an exemplary embodiment, as Figure 8 shown, the step of obtaining the matching degree between the interaction image message included in the first dialogue content information and the interaction image setting information according to the identification information corresponding to the interaction image setting information may include the following steps, which are used to provide a way to obtain the identification information of the interaction image setting information, and may include step 802 to step 806. Wherein:
[0092] Step 802, extract the parameter identification information of each setting parameter among the multiple setting parameters included in the interaction image setting information.
[0093] Among them, the interaction image setting information may include multiple setting parameters. For example, user information parameters, scene description parameters, time parameters, etc. In a possible implementation manner, the interaction image setting information may be dynamic setting information, and the multiple setting parameters may include one or more variable parameters. For the one or more variable parameters, the corresponding parameter identification information may be placeholder variables. The parameter identification information can identify and occupy the corresponding setting parameter.
[0094] Step 804, obtain the setting parameter sequence corresponding to the interaction image setting information according to the parameter identification information.
[0095] Among them, multiple setting parameters can be sorted to obtain the setting parameter sequence corresponding to the interaction image setting information, and the setting parameter sequence can be multiple setting parameters arranged in the target parameter order.
[0096] Step 806, obtain the identification information corresponding to the interaction image setting information according to the setting parameter sequence.
[0097] Among them, the parameter identification information of each setting parameter in the setting parameter sequence has been replaced by the parameter value of the setting parameter. Furthermore, according to the parameter values of the various setting parameters in the setting parameter sequence, the interaction image hash value corresponding to the interaction image setting information can be obtained, and the interaction image hash value can be determined as the identification information corresponding to the interaction image setting information.
[0098] In an exemplary embodiment, step 804 may include:
[0099] Arrange and process the multiple parameter identification information corresponding to multiple set parameters according to the target parameter order to obtain a parameter identification sequence corresponding to the interactive image setting information; replace each parameter identification information included in the parameter identification sequence with the parameter value of the corresponding set parameter to obtain a set parameter sequence corresponding to the interactive image setting information.
[0100] Among them, the target parameter order can be the arranged order of the multiple set parameters set in advance. The placeholder variable of each set parameter in the multiple set parameters can be extracted, that is, the parameter identification information, and the parameter identification information of the multiple set parameters is sorted according to the target parameter order to obtain a parameter identification sequence corresponding to the interactive image setting information. The parameter identification sequence can be the parameter identification information of the multiple set parameters arranged according to the target parameter order. Furthermore, the parameter identification information of each set parameter can be replaced with the parameter value corresponding to each set parameter, and thus a set parameter sequence corresponding to the interactive image setting information can be obtained.
[0101] In the method of this embodiment, the interactive image hash value of the interactive image setting information can be obtained by using the parameter values of the multiple set parameters after arrangement, which is convenient for subsequent screening and marking of interactive image messages.
[0102] In an exemplary embodiment, the step of replacing each parameter identification information included in the parameter identification sequence with the parameter value of the corresponding set parameter may include:
[0103] Obtain one or more parameter value intervals that meet the target parameter value quantity for the variable parameter according to the target parameter value quantity of the variable parameter; determine the variable parameter value of the variable parameter according to the one or more parameter value intervals; replace the parameter identification information corresponding to the variable parameter with the variable parameter value.
[0104] Among them, if the set parameter is a variable parameter and the variable parameter is a parameter that changes with time, for example, time, in order to streamline the data volume of human-computer interaction model training, the target parameter value quantity of the variable parameter can be set. Taking the variable parameter as time as an example, the target parameter value quantity of the time parameter can be determined to be 7. Furthermore, according to the target parameter value quantity of the time parameter, the parameter values of the time parameter can be divided into 7 parameter value intervals, namely early morning, morning, forenoon, noon, afternoon, evening, and night. Each parameter value interval corresponds to a parameter value, and the parameter values within each parameter value interval are the same. Furthermore, the variable parameter value corresponding to the time parameter can be determined according to the parameter value interval corresponding to the time parameter, and thus the parameter identification information corresponding to the time parameter can be replaced with the variable parameter value.
[0105] In the method of this embodiment, the number of parameter values of the set parameters can be streamlined, which is convenient for improving the simplicity and accuracy of obtaining the identification information corresponding to the interactive image setting information.
[0106] In another exemplary embodiment, as Figure 9 shown, a method for training a human-computer interaction model is provided, which may include steps 902 to 922. Among them:
[0107] Step 902, obtaining a dialogue data sample of the human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes interactive image messages.
[0108] Among them, a plurality of dialogue data sub-samples can be derived from the dialogue data sample.
[0109] Step 904, extracting the parameter identification information of each set parameter among the multiple set parameters included in the interactive image setting information.
[0110] Among them, the multiple set parameters include one or more variable parameters, and the parameter identification information of the variable parameter can be a placeholder variable. Extract the placeholder variables of the multiple set parameters included in the interactive image setting information.
[0111] Step 906, arranging and processing the multiple parameter identification information corresponding to the multiple set parameters in the target parameter order to obtain a parameter identification sequence corresponding to the interactive image setting information.
[0112] Step 908, replacing each parameter identification information included in the parameter identification sequence with the parameter value of the corresponding set parameter to obtain a set parameter sequence corresponding to the interactive image setting information.
[0113] Among them, if the set parameter is a variable parameter and the variable parameter is a parameter that changes over time, for example, time, in order to streamline the data volume of human-computer interaction model training, the number of target parameter values of the variable parameter can be set. Taking the variable parameter as time as an example, the number of target parameter values of the time parameter can be determined to be 7. Furthermore, according to the number of target parameter values of the time parameter, the parameter values of the time parameter can be divided into 7 parameter value intervals, namely early morning, morning, forenoon, noon, afternoon, evening, and night. Each parameter value interval corresponds to a parameter value, and the parameter values within each parameter value interval are the same. Furthermore, according to the parameter value interval corresponding to the time parameter, the variable parameter value corresponding to the time parameter can be determined. Thus, the parameter identification information corresponding to the time parameter can be replaced with the variable parameter value.
[0114] Step 910, obtaining the identification information corresponding to the interactive image setting information according to the set parameter sequence.
[0115] Among them, the dialogue data sample may include one or more interactive image setting information, and the duplicate removal process can be performed on the identification information of the one or more interactive image setting information. The identification information may be the interactive image hash value of the interactive image setting information. Furthermore, each interactive image hash value can be traversed. Each time a traversal is performed, a copy of the dialogue data sample is first made, and then each interactive image message in the first dialogue content information is traversed. The interactive image messages that do not match the interactive image hash value are marked with a mask, that is, the interactive image messages marked with a mask do not participate in the training of the human-computer interaction model.
[0116] Step 912: Obtain the matching degree between the interactive image messages included in the first dialogue content information and the interactive image setting information according to the identification information corresponding to the interactive image setting information.
[0117] Step 914: Determine the first non-matching interactive image messages of the interactive image setting information for the interactive image messages with a matching degree less than the matching degree threshold.
[0118] Step 916: Mark the first non-matching interactive image messages with a mask to obtain the first marked interactive image messages of the first dialogue content information.
[0119] Step 918: Obtain the second dialogue content information corresponding to the interactive image setting information according to the unmarked first matching interactive image messages in the first dialogue content information except the first marked interactive image messages.
[0120] Among them, in a possible implementation manner, a message quality evaluation value of a first matching interactive image message included in the first conversation content information is obtained through a message quality evaluation model; a first matching interactive image message with a message quality evaluation value lower than an evaluation value threshold is determined as a second non-matching interactive image message of the interactive image setting information. In another possible implementation manner, for each first matching interactive image message included in the first conversation content information, a sum of similarities between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message is obtained; a first matching interactive image message with a sum of similarities greater than a preset similarity threshold is determined as a second non-matching interactive image message of the interactive image setting information. In still another possible implementation manner, a first matching interactive image message including sensitive information is obtained by using a sensitive information detection model; a first matching interactive image message including sensitive information is determined as a second non-matching interactive image message of the interactive image setting information. Masking marks are performed on the second non-matching interactive image messages to obtain second marked interactive image messages of the first conversation content information; according to the unmarked second matching interactive image messages in the first conversation content information other than the second marked interactive image messages, second conversation content information corresponding to the interactive image setting information is obtained. In the training of the human-computer interaction model, the first marked interactive image messages and the second marked interactive image messages can be set to a unified value, for example, -100.
[0121] Step 920, obtain the number of marks of the first marked interactive image messages and the second marked interactive image messages included in the first conversation content information.
[0122] Step 922, train the human-computer interaction model according to the second conversation content information corresponding to the first conversation content information with the number of marks less than the mark threshold.
[0123] Among them, if the number of masked interactive image messages in the dialogue data sample is too large, it will cause the number of interactive image messages in the derived dialogue data sub-sample participating in the training of the human-computer interaction model to be too small, resulting in fluctuations in losses and sometimes being difficult to converge.
[0124] In the method of this embodiment, first, dialogue data samples of the human-computer interaction system can be obtained; the dialogue data samples include first dialogue content information and one or more interaction image setting information; the first dialogue content information includes interaction image messages; further, for each interaction image setting information, the interaction image messages can be screened according to the matching degree between the interaction image messages included in the first dialogue content information and the interaction image setting information, and the second dialogue content information corresponding to the interaction image setting information can be obtained; finally, the human-computer interaction model can be trained according to the interaction image setting information and the corresponding second dialogue content information. In the method provided by the embodiment of the present application, the dialogue sample data can be divided according to the interaction image setting information, and the interaction image messages included in the dialogue content information can be screened in multiple dimensions to ensure the accuracy of the sample data used for the human-computer interaction model. Further, the accuracy of the human-computer interaction model training and the accuracy of the human-computer interaction model function can be improved. Due to the reduction of the sample data volume, the training efficiency of the human-computer interaction model can also be improved, and the cost of model training can be reduced.
[0125] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0126] Based on the same inventive concept, the embodiment of the present application also provides a human-computer interaction model training device for implementing the above-mentioned human-computer interaction model training method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the human-computer interaction model training device provided below can refer to the limitations on the human-computer interaction model training method in the above text, and will not be repeated here.
[0127] In one embodiment, as Figure 10 shown, a human-computer interaction model training device is provided, including: a sample acquisition module 1002, a screening module 1004, and a model training module 1006, where:
[0128] A sample acquisition module 1002, configured to acquire a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes interactive image messages.
[0129] A screening module 1004, configured to, for each of the interactive image setting information, screen the interactive image messages according to the matching degree between the interactive image messages included in the first dialogue content information and the interactive image setting information, so as to obtain second dialogue content information corresponding to the interactive image setting information.
[0130] A model training module 1006, configured to train a human-computer interaction model according to the interactive image setting information and the corresponding second dialogue content information.
[0131] In one embodiment, the screening module 1004 is further configured to: obtain the matching degree between the interactive image messages included in the first dialogue content information and the interactive image setting information; determine the interactive image messages with the matching degree less than the matching degree threshold as the first non-matching interactive image messages of the interactive image setting information; perform a masking mark on the first non-matching interactive image messages to obtain first marked interactive image messages of the first dialogue content information; and obtain the second dialogue content information corresponding to the interactive image setting information according to the unmarked first matching interactive image messages other than the first marked interactive image messages in the first dialogue content information.
[0132] In one embodiment, the screening module 1004 is further configured to: obtain a message quality evaluation value of the first matching interactive image message included in the first conversation content information through a message quality evaluation model; determine the first matching interactive image message with a message quality evaluation value lower than an evaluation value threshold as a second non-matching interactive image message of the interactive image setting information; and / or, for each of the first matching interactive image messages included in the first conversation content information, obtain a sum of similarities between the first matching interactive image message and the remaining first matching interactive image messages other than the first matching interactive image message; determine the first matching interactive image message with a sum of similarities greater than a preset similarity threshold as a second non-matching interactive image message of the interactive image setting information; and / or, use a sensitive information detection model to obtain the first matching interactive image message containing sensitive information; determine the first matching interactive image message containing sensitive information as a second non-matching interactive image message of the interactive image setting information; perform a mask marking on the second non-matching interactive image message to obtain a second marked interactive image message of the first conversation content information; and obtain second conversation content information corresponding to the interactive image setting information according to the unmarked second matching interactive image messages other than the second marked interactive image message in the first conversation content information.
[0133] In one embodiment, the screening module 1004 is further configured to: obtain the number of markings of the first marked interactive image message and the second marked interactive image message included in the first conversation content information.
[0134] Train the human-computer interaction model according to the second conversation content information corresponding to the first conversation content information with a number of markings less than a marking threshold.
[0135] In one embodiment, the screening module 1004 is further configured to: obtain a matching degree between the interactive image message included in the first conversation content information and the interactive image setting information according to the identification information corresponding to the interactive image setting information.
[0136] In one embodiment, the screening module 1004 is further configured to: extract parameter identification information of each of the multiple setting parameters included in the interactive image setting information.
[0137] Obtain a setting parameter sequence corresponding to the interactive image setting information according to the parameter identification information.
[0138] Obtain the identification information corresponding to the interactive image setting information according to the setting parameter sequence.
[0139] In one embodiment, the screening module 1004 is further configured to: arrange and process the multiple parameter identification information corresponding to the multiple set parameters according to the target parameter order to obtain a parameter identification sequence corresponding to the interactive image setting information; and replace each parameter identification information included in the parameter identification sequence with the parameter value of the corresponding set parameter to obtain the set parameter sequence corresponding to the interactive image setting information.
[0140] In one embodiment, the set parameter includes a variable parameter; the screening module 1004 is further configured to: obtain one or more parameter value intervals that satisfy the target parameter value quantity for the variable parameter according to the target parameter value quantity of the variable parameter; determine the variable parameter value of the variable parameter according to the one or more parameter value intervals; and replace the parameter identification information corresponding to the variable parameter with the variable parameter value.
[0141] Each module in the above human-computer interaction model training device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.
[0142] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 11 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to human-computer interaction model training. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a human-computer interaction model training method.
[0143] Those skilled in the art can understand that Figure 11 the structure shown in
[0144] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the foregoing method embodiments are implemented.
[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
[0146] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0148] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0149] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0150] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A human-computer interaction model training method, characterized in that: The method comprises: Acquire a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes an interactive image message; For each interactive image setting information, the interactive image message is screened according to the matching degree between the interactive image message contained in the first dialogue content information and the interactive image setting information, so as to obtain the second dialogue content information corresponding to the interactive image setting information; The human-computer interaction model is trained according to the interactive image setting information and the corresponding second dialogue content information.
2. The method according to claim 1, characterized in that The step of filtering the interactive image messages according to the matching degree between the interactive image messages contained in the first dialogue content information and the interactive image setting information for each interactive image setting information to obtain the second dialogue content information corresponding to the interactive image setting information includes: Acquire the matching degree between the interactive image message included in the first dialogue content information and the interactive image setting information; Determining the interactive image message whose matching degree is less than the matching degree threshold as a first non-matching interactive image message of the interactive image setting information; Masking and marking the first non-matching interactive image message to obtain a first marked interactive image message of the first conversation content information; The second dialogue content information corresponding to the interactive image setting information is obtained according to the unmarked first matching interactive image messages in the first dialogue content information except the first marked interactive image message.
3. The method according to claim 2, characterized in that The step of obtaining the second dialogue content information corresponding to the interactive image setting information according to the unmarked first matching interactive image message other than the first marked interactive image message in the first dialogue content information includes: Acquire a message quality evaluation value of the first matching interactive image message contained in the first conversation content information through a message quality evaluation model; Determine the first matching interactive image message whose message quality evaluation value is lower than the evaluation value threshold as a second non-matching interactive image message of the interactive image setting information; and / or, For each first matching interactive image message included in the first conversation content information, obtaining a sum of similarities between the first matching interactive image message and other first matching interactive image messages except the first matching interactive image message; Determine the first matching interactive image message whose sum of similarities is greater than a preset similarity threshold as a second non-matching interactive image message of the interactive image setting information; and / or, Using a sensitive information detection model to obtain the first matching interactive image message containing sensitive information; Determine the first matching interactive image message containing sensitive information as a second non-matching interactive image message of the interactive image setting information; Masking and marking the second non-matching interactive image message to obtain a second marked interactive image message of the first conversation content information; The second dialogue content information corresponding to the interactive image setting information is obtained according to the unmarked second matching interactive image messages in the first dialogue content information except the second marked interactive image message.
4. The method according to claim 3, characterized in that The method further comprises: Acquire the number of marks of the first mark interaction image message and the second mark interaction image message contained in the first conversation content information; The human-computer interaction model is trained according to the second dialogue content information corresponding to the first dialogue content information whose number of marks is less than a mark threshold.
5. The method according to claim 2, characterized in that: The obtaining the matching degree between the interactive image message included in the first dialogue content information and the interactive image setting information includes: The matching degree between the interactive image message included in the first dialogue content information and the interactive image setting information is obtained according to the identification information corresponding to the interactive image setting information.
6. The method according to claim 5, characterized in that Before acquiring the matching degree between the interactive image message contained in the first dialogue content information and the interactive image setting information according to the identification information corresponding to the interactive image setting information, the method further includes: Extracting parameter identification information of each of the setting parameters from among the plurality of setting parameters included in the interactive image setting information; According to the parameter identification information, obtaining a setting parameter sequence corresponding to the interactive image setting information; According to the setting parameter sequence, identification information corresponding to the interactive image setting information is obtained.
7. The method according to claim 6, characterized in that The step of obtaining a setting parameter sequence corresponding to the interactive image setting information according to the parameter identification information includes: Arrange and process the plurality of parameter identification information corresponding to the plurality of setting parameters in the order of target parameters to obtain a parameter identification sequence corresponding to the interactive image setting information; Each of the parameter identification information contained in the parameter identification sequence is replaced with the parameter value of the corresponding setting parameter to obtain the setting parameter sequence corresponding to the interactive image setting information.
8. The method according to claim 7, characterized in that The setting parameters include variable parameters; The replacing each of the parameter identification information included in the parameter identification sequence with the corresponding parameter value of the setting parameter includes: According to the target parameter value quantity of the variable parameter, obtaining one or more parameter value intervals for the variable parameter that meet the target parameter value quantity; Determining a variable parameter value of the variable parameter according to one or more of the parameter value intervals; The parameter identification information corresponding to the variable parameter is replaced with the variable parameter value.
9. A human-computer interaction model training device, characterized in that: The device comprises: A sample acquisition module, used to acquire a dialogue data sample of a human-computer interaction system; the dialogue data sample includes first dialogue content information and one or more interactive image setting information; the first dialogue content information includes an interactive image message; a screening module, for screening each interactive image setting information according to the matching degree between the interactive image message contained in the first dialogue content information and the interactive image setting information, to obtain the second dialogue content information corresponding to the interactive image setting information; The model training module is used to train the human-computer interaction model according to the interactive image setting information and the corresponding second dialogue content information.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.