Semantic understanding method and device, electronic equipment and storage medium
By utilizing historical data of human-computer interaction to identify target sample texts from failed human-computer interactions for semantic annotation, the problem of low iteration efficiency in semantic understanding models is solved, achieving efficient semantic understanding and annotation, and improving the satisfaction and user experience of human-computer interaction systems.
Patent Information
- Application Number
- CN202111565283.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2041-12-20
AI Technical Summary
现有技术中语义理解模型的迭代效率低,依赖人工标注数据且成本高,导致冗余数据产生,无法针对人机交互失败的用户请求进行有效标注。
By utilizing historical interaction data generated from human-computer interaction, the target sample text that caused the human-computer interaction failure can be identified, and targeted semantic annotation can be performed. This automated annotation of the target sample text avoids the generation of redundant data and improves the iterative efficiency of the semantic understanding model.
It improves the iteration efficiency and semantic annotation efficiency of semantic understanding models, shortens the cycle of data annotation and semantic mapping relationship acquisition, and enhances the implementation efficiency of semantic understanding.
Smart Images

Figure CN114254656B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language understanding technology, and in particular to a semantic understanding method, apparatus, electronic device, and storage medium. Background Technology
[0002] Natural language understanding is a crucial component of human-computer interaction (HCI) systems. It parses user requests and generates corresponding semantic understanding results, which the HCI system then uses to perform downstream tasks—that is, to respond or act accordingly. Therefore, accurate semantic understanding is essential for achieving accurate HCI interaction.
[0003] Currently, to improve the semantic understanding accuracy of semantic understanding models, most methods rely on manually labeled data to iteratively optimize the models. However, manually labeled data is costly, heavily dependent on expert experience, and contains redundant data, ultimately leading to low model iteration efficiency. Summary of the Invention
[0004] This invention provides a semantic understanding method, apparatus, electronic device, and storage medium to address the shortcomings of low iteration efficiency in existing semantic understanding models.
[0005] This invention provides a semantic understanding method, comprising:
[0006] Identify the text to be understood;
[0007] Based on the labeled data, semantic understanding is performed on the text to be understood to obtain semantic understanding results;
[0008] The labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction. The target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data.
[0009] According to a semantic understanding method provided by the present invention, the target sample text is determined through the following steps:
[0010] Based on the user satisfaction status of each session data in the historical interaction data and / or the input repetition status of each session data, the target sample text is determined from the historical interaction data.
[0011] According to a semantic understanding method provided by the present invention, determining the target sample text from the historical interaction data based on user satisfaction and input repetition in each session data in the historical interaction data includes:
[0012] Based on the user satisfaction status of each session data in the historical interaction data, the session data of the target session corresponding to the human-computer interaction failure is determined from the historical interaction data;
[0013] Based on the input repetition of the session data of the target session, the target sample text is determined from the session data of the target session.
[0014] According to a semantic understanding method provided by the present invention, the user satisfaction status of the session data is determined based on the following steps:
[0015] Based on the user input text and system output text of each interaction round in the session data, evaluate the user satisfaction of each interaction round;
[0016] The user satisfaction level of the session data is determined based on the user satisfaction level of each interaction round in the session data.
[0017] According to a semantic understanding method provided by the present invention, the input repetition status of the session data is determined based on the following steps:
[0018] Based on the user input sequence consisting of all user input text in the session data, the session data is checked for duplicate input to obtain the input duplication status of the session data.
[0019] According to a semantic understanding method provided by the present invention, the step of determining the repetition status of the input based on the user input sequence composed of all user input text in the session data to obtain the input repetition status of the session data includes:
[0020] Based on the sample session sequence consisting of all user input text and system output text in the sample session data, and the sample input repetition status of the sample session sequence, the user input sequence is used to determine the repetition of input in the session data, thereby obtaining the input repetition status of the session data.
[0021] According to a semantic understanding method provided by the present invention, the labeled data is obtained based on the following steps:
[0022] Based on the historical interaction data, semantic discrimination is performed on the target sample text and its candidate semantic interpretations;
[0023] The candidate semantic interpretations that are correctly semantically identified are determined as the target semantic interpretations of the target sample text.
[0024] Based on the target semantic interpretation, the target sample text is semantically annotated.
[0025] According to a semantic understanding method provided by the present invention, the step of semantically annotating the target sample text based on the target semantic interpretation includes:
[0026] Based on the target semantic interpretation, semantic annotation is performed on the target sample text and other target sample texts that have input duplication with the target sample text.
[0027] The present invention also provides a semantic understanding device, characterized in that it comprises:
[0028] The text determination unit is used to determine the text to be understood.
[0029] The semantic understanding unit is used to perform semantic understanding on the text to be understood based on the labeled data, and obtain the semantic understanding result;
[0030] The labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction. The target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data.
[0031] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the semantic understanding methods described above.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the semantic understanding methods described above.
[0033] The semantic understanding method, apparatus, electronic device, and storage medium provided by this invention determine the target sample text corresponding to the human-computer interaction failure by using historical interaction data generated from human-computer interaction. This enables more targeted semantic annotation of the user input text corresponding to the human-computer interaction failure, thereby avoiding the generation of a large amount of redundant annotation data and improving the efficiency of obtaining semantic mapping relationships for semantic understanding, thus contributing to the improvement of the implementation efficiency of semantic understanding. At the same time, based on the historical interaction data, the target sample text is automatically semantically annotated, thereby improving the semantic annotation efficiency and shortening the entire cycle of data annotation and semantic mapping relationship acquisition, thereby further improving the implementation efficiency of semantic understanding. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0035] Figure 1 A flowchart illustrating the semantic understanding method provided by this invention;
[0036] Figure 2 This is a schematic diagram of session segmentation provided by the present invention;
[0037] Figure 3 A flowchart illustrating the target sample text determination method provided by the present invention;
[0038] Figure 4 A flowchart illustrating the user satisfaction determination method provided by the present invention;
[0039] Figure 5 A schematic diagram of the structure of the satisfaction assessment model provided by this invention;
[0040] Figure 6 A schematic diagram of the structure of the repeatability discrimination model provided by the present invention;
[0041] Figure 7 This is a flowchart illustrating the annotation method for annotation data provided by the present invention;
[0042] Figure 8 A schematic diagram of the structure of the semantic error correction model provided by this invention;
[0043] Figure 9 A schematic diagram of the semantic understanding device provided by the present invention;
[0044] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0046] Natural Language Understanding (NLU) is a crucial component of human-computer interaction (HCI) systems. It parses user requests and generates corresponding semantic understanding results, which the HCI system then uses to perform downstream tasks—that is, to respond or act accordingly. Therefore, without accurate semantic understanding of user requests, the HCI system cannot provide a satisfactory response or action. The semantic understanding model, being upstream in the HCI system, can propagate erroneous semantic understanding results to downstream tasks, affecting their execution and preventing the HCI system from providing accurate responses or actions. Thus, improving the accuracy of semantic understanding is essential for achieving accurate HCI.
[0047] Currently, to improve the semantic understanding accuracy of semantic understanding models, most methods rely on manually labeled data to iteratively optimize the models. However, manually labeled data is costly and heavily dependent on expert experience, resulting in low labeling efficiency, which in turn affects model iteration efficiency. Furthermore, user requests that cause human-computer interaction failures are often long-tail keywords, making it impossible to label these requests. This leads to redundant manually labeled data, ultimately resulting in low model iteration efficiency.
[0048] To address the above problems, this invention provides a semantic understanding method. Figure 1 A flowchart illustrating the semantic understanding method provided by this invention is shown below. Figure 1 As shown, the method includes:
[0049] Step 110: Determine the text to be understood;
[0050] Specifically, the text to be understood refers to the text that requires semantic understanding. This text can be obtained by the human-computer interaction system through speech recognition of the user's input, or it can be the text directly input by the user received by the human-computer interaction system. That is, the text requested by the user is taken as the text to be understood. More specifically, the user input text in each round of the human-computer interaction process is taken as each text to be understood.
[0051] Step 120: Based on the labeled data, perform semantic understanding on the text to be understood to obtain a semantic understanding result; wherein, the labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction, and the target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data.
[0052] Specifically, the historical interaction data is obtained based on the historical interaction records of the original human-computer interaction system. Here, the original human-computer interaction system can be the same system as the human-computer interaction system used in the embodiments of the present invention, or it can be another human-computer interaction system. Furthermore, the application field of the other human-computer interaction system is usually the same as the application field of the human-computer interaction system used in the embodiments of the present invention, so as to make the data annotation more targeted.
[0053] Here, historical interaction data includes, but is not limited to, one or more of the following: user input text, semantic understanding results corresponding to the user input text, system output text, system status, timestamps, etc. The user input text in this historical interaction data is the text to be understood by the original human-computer interaction system; the semantic understanding results in this historical interaction data are the results obtained by the semantic understanding model in the original human-computer interaction system through semantic understanding of the user input text; the system output text in this historical interaction data is the output text of the original human-computer interaction system, which can be the response text or action text of the original human-computer interaction system. The response text can be the text directly replied by the system, or the text corresponding to the reply voice; the action text can be the text corresponding to the operation performed by the system; the system status in this historical interaction data includes, but is not limited to, one or more of the following: network environment status, information source status, system stability, etc.; the timestamps in this historical interaction data are the timestamps of each interaction round.
[0054] This historical interaction data can be used to determine the target sample text. Specifically, based on the historical interaction data, the interaction details in the historical human-computer interaction process are determined, and based on these interaction details, it is determined whether the human-computer interaction was successful. If there were failed human-computer interaction instances in the historical human-computer interaction process, the target sample text corresponding to the failed human-computer interaction is determined based on these failed interactions. The evaluation indicators for these interaction details may include user satisfaction and / or input duplication, etc., as detailed in the following embodiments, which will not be elaborated here.
[0055] The historical interaction data can also be used to determine the target semantic interpretation for semantic annotation of the target sample text. Specifically, based on the interaction behavior data and interaction information implied in the interaction context in the historical interaction data, the user's true intention can be inferred, and then the target sample text can be semantically annotated based on the user's true intention. For example, the target semantic interpretation of the target sample text can be obtained by filtering from the candidate semantic interpretation set, which is a set of semantic interpretations that have been associated with the target sample text in advance.
[0056] In one specific embodiment, historical interaction data can exist within the original human-computer interaction system, and this historical interaction data is generated in the form of log data. In this case, the historical interaction data can be obtained by directly collecting the log data from the original human-computer interaction system. For example, log data from a certain period (the past month) in the original human-computer interaction system can be collected in advance as historical interaction data.
[0057] Specifically, the semantic understanding result is obtained through semantic understanding. Here, semantic understanding can be obtained by semantically mapping the text to be understood based on the mapping relationship between the target sample text in the labeled data and its semantic annotation target semantic interpretation, i.e., the semantic mapping relationship. Here, the semantic mapping relationship can be reflected in the semantic understanding model obtained through model training, or it can be reflected in the semantic understanding rules obtained through association mining. This embodiment of the invention does not limit this.
[0058] The process of obtaining semantic mapping relationships includes: adjusting the parameters of the semantic understanding model or the representation of the semantic understanding rules to make the semantic understanding result of the target sample text as similar as possible to the target semantic interpretation. Here, by continuously adjusting the parameters of the semantic understanding model or the representation of the semantic understanding rules through multiple labeled data, the resulting semantic mapping relationship can be made more accurate, and thus the semantic understanding result obtained after applying it to semantic understanding is more reliable.
[0059] For example, the semantic understanding model is trained based on the following steps: based on labeled data, the original semantic understanding model in the original human-computer interaction system is iteratively optimized to obtain the semantic understanding model; or, based on labeled data and original training data, the initial model corresponding to the semantic understanding model is iteratively trained to obtain the semantic understanding model, where the original training data can be the training data of the original semantic understanding model in the original human-computer interaction system.
[0060] When this invention is specifically applied to a model, historical interaction data generated by human-computer interaction is used to determine the target sample text corresponding to the human-computer interaction failure. This allows for more targeted semantic annotation of the user input text corresponding to the human-computer interaction failure, thereby avoiding the generation of a large amount of redundant training data and improving the iterative efficiency of the semantic understanding model. At the same time, based on this historical interaction data, semantic annotation of the target sample text is automatically performed, thereby improving the semantic annotation efficiency and shortening the entire iteration cycle of data annotation and model training, thus improving the iterative efficiency of the semantic understanding model.
[0061] Here, the embodiments of the present invention can be applied to human-computer interaction systems, such as navigation systems, music systems, weather query systems, vehicle control systems, etc., without specific limitations. Based on this, the semantic understanding method provided by the embodiments of the present invention has high scalability and can be applied to different fields.
[0062] It is understood that, through the above steps, embodiments of the present invention can improve the accuracy of semantic understanding by automatically mining the interactive behaviors generated in the original human-computer interaction system, thereby improving the satisfaction and user experience of the human-computer interaction system that performs speech understanding. That is, by using historical interaction data, it can proactively learn user feedback signals, and then improve the accuracy of semantic understanding based on these signals.
[0063] The method provided in this invention identifies the target sample text corresponding to the human-computer interaction failure by using historical interaction data generated from human-computer interaction. This allows for more targeted semantic annotation of the user input text corresponding to the human-computer interaction failure, thereby avoiding the generation of a large amount of redundant annotation data and improving the efficiency of obtaining semantic mapping relationships for semantic understanding, thus contributing to the improvement of the implementation efficiency of semantic understanding. At the same time, based on this historical interaction data, the target sample text is automatically semantically annotated, thereby improving the efficiency of semantic annotation and shortening the entire cycle of data annotation and semantic mapping relationship acquisition, thereby further improving the implementation efficiency of semantic understanding.
[0064] Based on the above embodiments, the target sample text in this method is determined through the following steps:
[0065] Based on the user satisfaction status of each session data in the historical interaction data and / or the input repetition status of each session data, the target sample text is determined from the historical interaction data.
[0066] Specifically, based on the timestamps in the historical interaction data, the historical interaction data is segmented into session data corresponding to multiple sessions. More specifically, based on the time interval between every two rounds of interaction, the historical interaction data is segmented into session data corresponding to multiple sessions. Each session includes several rounds of interaction, and each round of interaction has complete interaction process data. That is, the interaction data of each round of interaction includes, but is not limited to, one or more of the following: user input text, semantic understanding result corresponding to the user input text, system output text, system status, timestamps, etc.
[0067] For example, such as Figure 2As shown, if the time interval between adjacent turns exceeds 50 seconds, it will be divided into different sessions. A dialogue session includes three sessions: session1, session2, and session3. Session1 includes four turns: t1, t2, t3, and t4. Session2 includes two turns: t1 and t2. Session3 includes three turns: t1, t2, and t3.
[0068] Here, user satisfaction with the session data is used to characterize user satisfaction with the session corresponding to that session data. Based on the satisfaction status of each session data, problematic sessions that cause user dissatisfaction can be identified. In this case, the problematic session that causes user dissatisfaction can be identified as the session corresponding to the human-computer interaction failure. User satisfaction can be represented by satisfaction labels and dissatisfaction labels, or by satisfaction scores.
[0069] Here, the input duplication status of the session data is used to characterize whether duplicate user input text exists in the session data. If duplicate user input text exists, the input duplication status of the session data is further used to characterize which user input texts are duplicated. Based on the input duplication status of each session data, the problematic session causing user dissatisfaction can be identified. At this point, the problematic session causing user dissatisfaction can be identified as the session corresponding to the human-computer interaction failure. The duplicate user input text can be completely identical text or text that is semantically essentially the same.
[0070] Understandably, when users don't receive correct feedback from a human-computer interaction system, they often repeatedly express the same request, resulting in repetitive user input until they receive the correct feedback. Therefore, detecting input repetition in each session can help identify whether users are engaging in repetitive speaking or interaction behaviors, thus helping to discover the sessions corresponding to human-computer interaction failures from the user's perspective.
[0071] Here, the target sample text can be determined from the historical interaction data based solely on the user satisfaction of each session data in the historical interaction data; or it can be determined solely based on the input repetition of each session data in the historical interaction data; or it can be determined from the historical interaction data based on both the user satisfaction of each session data in the historical interaction data and the input repetition of each session data in the historical interaction data, so as to combine the above two methods to determine the target sample text. The embodiments of the present invention do not make specific limitations on this.
[0072] Furthermore, the user satisfaction data in the session data can be either the overall user satisfaction of the session or the user satisfaction of each interaction round within the overall session. If the user satisfaction data in the session data represents the user satisfaction of each interaction round within the overall session, then the target sample text can be determined from historical interaction data based on the user satisfaction of each interaction round. This allows for the determination of whether the user input text in each interaction round is the target sample text, based on the user's satisfaction with each interaction round.
[0073] The method provided in this invention fully considers user feedback by taking into account user satisfaction and / or input repetition in historical interaction data. It can proactively learn user feedback signals and accurately determine target sample text from historical interaction data based on these signals. This allows for more accurate and targeted semantic annotation of user input text corresponding to human-computer interaction failures, ultimately improving the efficiency of semantic understanding.
[0074] Based on any of the above embodiments, in this method, as Figure 3 As shown, determining the target sample text from the historical interaction data based on user satisfaction and input duplication in each session data segment of the historical interaction data includes:
[0075] Step 310: Based on the user satisfaction status of each session data in the historical interaction data, determine the session data of the target session corresponding to the human-computer interaction failure from the historical interaction data.
[0076] Step 320: Based on the input repetition of the session data of the target session, determine the target sample text from the session data of the target session.
[0077] Specifically, based on the user satisfaction status of each session data in the historical interaction data, the target session that caused user dissatisfaction is identified. Then, the session data of the target session corresponding to the human-computer interaction failure is identified from the historical interaction data. Then, based on the input duplication status of the session data of the target session, the duplicate user input text is identified from the session data of the target session, so as to identify the duplicate user input text as the target sample text.
[0078] Here, the target session corresponding to the human-computer interaction failure can be one or more, and the session data of each target session can include multiple target sample texts.
[0079] The method provided in this embodiment of the invention first determines the session data of the target session corresponding to the human-computer interaction failure based on the user satisfaction of each session data in the historical interaction data. Then, based on the input duplication of the session data of the target session, the target sample text is determined in the session data of the target session. The target sample text corresponding to the interaction failure data with higher confidence can be filtered from the historical interaction data.
[0080] Based on any of the above embodiments, in this method, as Figure 4 As shown, the user satisfaction level of the session data is determined based on the following steps:
[0081] Step 410: Based on the user input text and system output text of each interaction round in the session data, evaluate the user satisfaction of each interaction round.
[0082] Step 420: Determine the user satisfaction status of the session data based on the user satisfaction status of each interaction round in the session data.
[0083] Here, user satisfaction in each interaction round can be represented by a satisfaction score. User satisfaction in the session data can be represented by "satisfied" and "dissatisfied" tags, or by a satisfaction score; this embodiment of the invention does not specifically limit this.
[0084] Specifically, user satisfaction in each interaction round of the session data can be aggregated to obtain the overall user satisfaction of the session data; alternatively, a weighted aggregation of user satisfaction in each interaction round of the session data can be performed to obtain the overall user satisfaction of the session data, taking into account the influence weight of user satisfaction in different interaction rounds on the overall user satisfaction of the session data.
[0085] Here, based on a satisfaction assessment model, the user input text and system output text of each interaction round in the session data can be used to assess the satisfaction of the session data and obtain the user satisfaction status of the session data. Specifically, the feature vectors corresponding to the user input text and system output text of each interaction round in the session data are input into the interaction round satisfaction assessment layer of the satisfaction assessment model to assess the satisfaction of each interaction round, obtaining the user satisfaction status of each interaction round output by the interaction round satisfaction assessment layer. The feature vectors corresponding to the user satisfaction status of each interaction round are input into the session satisfaction assessment layer of the satisfaction assessment model to aggregate the user satisfaction status of each interaction round, obtaining the user satisfaction status of the session data output by the session satisfaction assessment layer.
[0086] In another embodiment, the aforementioned conversation satisfaction evaluation layer is constructed using an attention mechanism. Specifically, the conversation satisfaction evaluation layer includes a satisfaction attention layer and a satisfaction fully connected layer. The feature vector corresponding to the user satisfaction status of each interaction round is input to the satisfaction attention layer of the conversation satisfaction evaluation layer to obtain the satisfaction attention features output by the satisfaction attention layer. The satisfaction attention features are then input to the satisfaction fully connected layer of the conversation satisfaction evaluation layer to obtain the user satisfaction status of the conversation data output by the satisfaction fully connected layer.
[0087] This satisfaction attention layer performs attention interactions on the feature vector corresponding to user satisfaction in each interaction round and the contextual features between each interaction round, and outputs the satisfaction attention features obtained after the attention interactions. Furthermore, the satisfaction attention layer considers the influence weights of user satisfaction in different interaction rounds on the overall user satisfaction of the session data.
[0088] If the user satisfaction status of the session data can be categorized into satisfied and dissatisfied labels, then the fully connected layer for satisfaction status is used to classify the satisfaction attention features of the input and output either a satisfied or dissatisfied label.
[0089] In one specific embodiment, Figure 5 A schematic diagram of the satisfaction assessment model provided by this invention is shown below. Figure 5 As shown, the satisfaction evaluation model includes a Bilstm encoding layer, a sigmoid activation function layer for interaction round satisfaction evaluation, a fully-connected linear layer for interaction round satisfaction evaluation, a satisfaction attention layer, a sigmoid activation function layer for conversation satisfaction evaluation, and a fully-connected linear layer for satisfaction. Here, e_usr is the embedding vector corresponding to the user input text in each interaction round; e_sys is the embedding vector of the system output text; and turn-features are the round features for each interaction round. These turn-features can be other manually designed feature vectors, including but not limited to one or more of the following: Jacobian examples corresponding to two consecutive interaction rounds, cosini similarity, text vector representation, sentence length, and the time interval between two consecutive interaction rounds, etc. This embodiment of the invention does not specifically limit these features. R(t1), R(t2), R(t3), and R(tn) represent the user satisfaction status in each interaction round, while R(t1…tn) represents the user satisfaction status of the session data.
[0090] Specifically, such as Figure 5 As shown, the feature vector e_usr corresponding to the user input text and the feature vector e_sys corresponding to the system output text for each interaction round in the session data, as well as the turn-features for each interaction round, are input into the Bilstm encoding layer of the interaction round satisfaction evaluation layer of the satisfaction evaluation model for feature encoding. The encoded features are then input into the sigmoid activation function layer of the interaction round satisfaction evaluation layer for nonlinear processing, resulting in the first mapping feature output by the sigmoid activation function layer of the interaction round satisfaction evaluation layer. This first mapping feature is then input into the fully-connected linear layer of the interaction round satisfaction evaluation layer. The process involves evaluating user satisfaction for each interaction round, resulting in user satisfaction scores R(t1), R(t2), R(t3), and R(tn) for each interaction round, output by the fully connected layer of the interaction round satisfaction evaluation layer. The feature vector corresponding to the user satisfaction score for each interaction round is then input to the attention layer of the session satisfaction evaluation layer. Attention interaction is performed between the feature vector corresponding to the user satisfaction score for each interaction round and the contextual features between each interaction round, resulting in the satisfaction attention feature output by the satisfaction attention layer. This satisfaction attention feature is then input to the sigmoid activation function layer of the session satisfaction evaluation layer for non-linear processing, resulting in the second mapping feature output by the sigmoid activation function layer of the session satisfaction evaluation layer. This second mapping feature is then input to the fully-connected linear layer of the session satisfaction evaluation layer to evaluate the satisfaction of the session data, resulting in user satisfaction scores R(t1…tn) for the session data output by the fully-connected layer.
[0091] The method provided in this invention can accurately assess user satisfaction in each interaction round by using the user input text and system output text in the session data. This helps to evaluate the success of human-computer interaction in each interaction round from the user's perspective. Based on the user satisfaction in each interaction round in the session data, the user satisfaction of the session data can be determined, so as to obtain the user's overall satisfaction with the session, thereby providing support for the determination of the target sample text.
[0092] Based on any of the above embodiments, in this method, the input repetition status of the session data is determined based on the following steps:
[0093] Based on the user input sequence consisting of all user input text in the session data, the session data is checked for duplicate input to obtain the input duplication status of the session data.
[0094] Here, the user input sequence for any session includes the user input text corresponding to all interaction rounds in that session, in order to determine whether the user input sequence for any session contains duplicate user input text.
[0095] Specifically, the user input sequence encompasses all user input text in a session. By performing reading comprehension processing on the user input sequence, the semantics of each user input in that session can be obtained. Then, it can be determined whether there are any identical or similar cases among these semantics, thereby obtaining reading comprehension results that can reflect the start and end of repeated inputs. Based on the reading comprehension results, the input repetition status of the session data can be obtained.
[0096] In another embodiment, the conversation data can be judged for duplicate input based on the conversation sequence consisting of all user input text and all system output text in the conversation data, so as to obtain the input duplication status of the conversation data.
[0097] Here, a duplicate input detection model can be used to apply the user input sequence to the session data to determine the degree of duplicate input. Alternatively, a duplicate input detection model can be used to apply the session sequence to the session data to determine the degree of duplicate input.
[0098] In one specific embodiment, the repetition detection model can be constructed using pre-trained BERT. Specifically, the user input sequence or conversation sequence is input into the BERT encoding layer of the repetition detection model to obtain the feature vector output by the BERT encoding layer. This feature vector is then input into the first fully connected layer of the repetition detection model to determine whether the conversation data output by the first fully connected layer contains repeated user input text. Simultaneously, the feature vector output by the BERT encoding layer is input into the second fully connected layer of the repetition detection model to determine the start and end positions of the repeated user input text in the conversation data output by the second fully connected layer. In other words, a reading comprehension task is performed based on pre-trained BERT, thereby achieving the purpose of repetition detection.
[0099] Here, the duplication detection model can be trained based on a sample user input sequence consisting of all user input text in the sample session data, and the duplication status of sample inputs in the sample session sequence. Alternatively, the duplication detection model can be trained based on a sample session sequence consisting of all user input text and system output text in the sample session data, and the duplication status of sample inputs in the sample session sequence.
[0100] The method provided in this invention can accurately determine duplicate inputs in the session data by using the user input sequence composed of all user input text in the session data, thereby providing support for the determination of target sample text.
[0101] Based on any of the above embodiments, in this method, the step of determining duplicate input based on the user input sequence composed of all user input text in the session data to obtain the input duplication status of the session data includes:
[0102] Based on the sample session sequence consisting of all user input text and system output text in the sample session data, and the sample input repetition status of the sample session sequence, the user input sequence is used to determine the repetition of input in the session data, thereby obtaining the input repetition status of the session data.
[0103] Specifically, the input repetition status can be obtained by judging the repetition of inputs in the session data based on the mapping relationship between the sample session sequence and its sample input repetition status, i.e., the input repetition mapping relationship. The input repetition mapping relationship here can be reflected in the repetition discrimination model obtained by model training, or it can be reflected in the repetition discrimination rule obtained by association mining. This embodiment of the invention does not limit this.
[0104] The following uses the input duplication mapping relationship as a specific duplication discrimination model as an example to illustrate the method for determining the input duplication situation.
[0105] In one specific embodiment, Figure 6 This is a schematic diagram of the structure of the duplicate discrimination model provided by the present invention, as shown below. Figure 6As shown, the duplication detection model is constructed using pre-trained BERT. During the training process, the sample session sequence is input into the BERT encoding layer of the initial model to obtain the feature vector output by the BERT encoding layer. This feature vector is then input into the first fully connected layer of the initial model to determine whether the session data output by the first fully connected layer contains duplicate user input text. Simultaneously, the feature vector output by the BERT encoding layer is input into the second fully connected layer of the initial model to determine the start and end positions of duplicate user input text in the session data output by the second fully connected layer. Based on the predicted and sample input duplication results, the initial model is trained to obtain the duplication detection model. In this model, the user input text and system output text in the sample session data are labeled with special tokens USR and SYS, respectively. The token embedding is the vector representation of the corresponding text, the position embedding is the position vector of the corresponding text (E0 to E8), and the time-bin embedding is the time interval vector of the corresponding text (T(-1), T(0), T(+3)). The output includes whether there is a duplicate (i.e., whether the session data contains duplicate user input text) and the start / end position of the duplicate text (i.e., the start and end positions of the duplicate user input text in the session data).
[0106] When this invention is specifically applied to a model, the repetition discrimination model is trained not only on all user input text in the sample session data, but also on all system output text in the sample session data. This can improve the training effect of the repetition discrimination model, so that the repetition discrimination model can more accurately judge the repetition input in the session data.
[0107] The method provided in this invention not only determines the input repetition mapping relationship based on all user input text in the sample session data, but also determines the input repetition mapping relationship based on all system output text in the sample session data. This can improve the accuracy of determining the input repetition mapping relationship and help to more accurately judge the repetition of session data.
[0108] Based on any of the above embodiments, in this method, as Figure 7 As shown, the labeled data is obtained based on the following steps:
[0109] Step 710: Based on the historical interaction data, perform semantic discrimination on the target sample text and its candidate semantic interpretations.
[0110] Step 720: The candidate semantic interpretations corresponding to the correct semantic discrimination are determined as the target semantic interpretations of the target sample text.
[0111] Step 730: Based on the target semantic interpretation, perform semantic annotation on the target sample text.
[0112] Specifically, each candidate semantic interpretation is combined with the target sample text to obtain multiple sample pairs (t_i, p_j), where t_i represents the target sample text and p_j represents any candidate semantic interpretation among the candidate semantic interpretations. Here, each candidate semantic interpretation of the target sample text is a semantic interpretation that has been pre-associated with the target sample text. Each candidate semantic interpretation is determined based on the target sample text, and the specific determination can be made by a language expert, which will not be elaborated here. Then, based on the user input text in the historical interaction data and the semantic understanding results corresponding to the user input text (the semantic understanding results include domain (intent) and intent (domain, etc.), the user's true intent is inferred. Then, based on the user's true intent, semantic discrimination is performed on each sample pair (t_i, p_j), that is, the user's true intent is compared with the semantic understanding results such as domain (intent) and intent (domain, etc.) corresponding to each candidate semantic interpretation, so as to obtain the semantically correctly discriminated sample pairs. Then, based on the semantically correctly discriminated sample pairs, the candidate semantic interpretations corresponding to the semantic discrimination are obtained.
[0113] In another embodiment, since there are many reasons for human-computer interaction failure, in addition to semantic understanding errors, failure may also be due to system-specific issues within the human-computer interaction system itself. Therefore, it is also necessary to consider human-computer interaction failures caused by system status. Specifically, based on the user input text in historical interaction data, the semantic understanding result corresponding to that user input text, and the system status, semantic discrimination is performed on the target sample text and its candidate semantic interpretations. More specifically, based on historical interaction data, the reasons for human-computer interaction failure are determined. If the failure reason only includes system reasons, then based on the semantic understanding results corresponding to the target sample text in the historical interaction data, semantic discrimination is performed on each sample pair (t_i, p_j). That is, the semantic understanding results of the target sample text are compared with the semantic understanding results such as domain (intent) and intent (domain) corresponding to each candidate semantic interpretation, so as to obtain the semantically correctly discriminated sample pair. Then, based on the semantically correctly discriminated sample pair, the candidate semantic interpretation corresponding to the semantically correctly discriminated sample is obtained. If the failure reason includes semantic understanding errors, then based on the user's true intent, semantic discrimination is performed on each sample pair (t_i, p_j). That is, the user's true intent is compared with the semantic understanding results such as domain (intent) and intent (domain) corresponding to each candidate semantic interpretation, so as to obtain the semantically correctly discriminated sample pair. Then, based on the semantically correctly discriminated sample pair, the candidate semantic interpretation corresponding to the semantically correctly discriminated sample is obtained.
[0114] Here, based on the semantic error correction model, historical interaction data can be applied to perform semantic discrimination on the target sample text and its candidate semantic interpretations.
[0115] In one specific embodiment, Figure 8 A schematic diagram of the semantic error correction model provided by this invention is shown below. Figure 8 As shown, the input of the semantic error correction model includes user input text from historical interaction data, the semantic understanding result corresponding to the user input text, the system state, and each candidate semantic interpretation corresponding to the target sample text. Then, through each feature extraction layer, features are extracted from the user input text, the semantic understanding result, the system state, and each candidate semantic interpretation corresponding to the target sample text in the historical interaction data, to obtain each feature vector corresponding to the user input text, the semantic understanding result, the system state, and each candidate semantic interpretation corresponding to the target sample text in the historical interaction data. Then, through the feature fusion layer, the feature vectors are fused to obtain fused features. Finally, the fused features are input to the semantic discrimination classification layer to obtain the semantic discrimination result output by the semantic discrimination classification layer. For example, the semantic discrimination result can be (t_i, p_j, c), where t_i represents the target sample text, p_j represents the candidate semantic interpretation, and c is the label. The label c is used to indicate whether the candidate semantic interpretation p_j is the true semantic of the target sample text t_i. If the candidate semantic interpretation p_j is the true semantic of the target sample text t_i, then the semantic discrimination is correct.
[0116] The method provided in this invention determines the target semantic interpretation of the target sample text based on historical interaction data. It can automatically perform correct semantic annotation on the target sample text, thereby improving the accuracy of semantic understanding and increasing the efficiency of semantic annotation. This shortens the entire cycle of data annotation and semantic mapping relationship acquisition, and further improves the efficiency of semantic understanding.
[0117] Based on any of the above embodiments, in this method, step 730 includes:
[0118] Based on the target semantic interpretation, semantic annotation is performed on the target sample text and other target sample texts that have input duplication with the target sample text.
[0119] Here, if the target sample text is repeated user input text, there are other target sample texts that have input duplication with it. In this case, semantic annotation of the other target sample texts can be directly performed based on the target semantic interpretation of the target sample text. Whether the target sample text is repeated user input text can be determined through the steps for determining input duplication in the session data described above, which will not be repeated here.
[0120] Understandably, if two user input texts are identical within the same session, they can be considered semantically equivalent in terms of their true purpose for the human-computer interaction system. Therefore, if duplicate target sample texts (i.e., duplicate user input texts) exist within the same session, the semantic interpretation of one target sample text can be used to semantically annotate the other duplicate target sample texts.
[0121] The method provided in this invention, based on the target semantic interpretation of the target sample text, can not only perform semantic annotation on the target sample text, but also perform semantic annotation on other target sample texts that have input duplication with the target sample text, thereby improving the efficiency of semantic annotation, shortening the entire cycle of data annotation and semantic mapping relationship acquisition, and further improving the efficiency of semantic understanding.
[0122] Based on any of the above embodiments Figure 9 A schematic diagram of the semantic understanding device provided by the present invention is shown below. Figure 9 As shown, the device includes a text determination unit 910 and a semantic understanding unit 920.
[0123] Among them, the text determination unit 910 is used to determine the text to be understood;
[0124] The semantic understanding unit 920 is used to input the text to be understood into the semantic understanding model and obtain the semantic understanding result output by the semantic understanding model;
[0125] The semantic understanding model is trained based on labeled data. The labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction. The target sample text is the user input text corresponding to human-computer interaction failure in the historical interaction data.
[0126] The apparatus provided in this invention uses historical interaction data generated by human-computer interaction to determine the target sample text corresponding to the failure of human-computer interaction. It can more effectively perform semantic annotation on the user input text corresponding to the failure of human-computer interaction, thereby avoiding the generation of a large amount of redundant annotation data and improving the efficiency of obtaining semantic mapping relationships for semantic understanding, which helps to improve the implementation efficiency of semantic understanding. At the same time, based on the historical interaction data, the target sample text is automatically semantically annotated, thereby improving the semantic annotation efficiency and shortening the entire cycle of data annotation and semantic mapping relationship acquisition, which further improves the implementation efficiency of semantic understanding.
[0127] Based on any of the above embodiments, the device further includes a target sample text determination unit, used for:
[0128] Based on the user satisfaction status of each session data in the historical interaction data and / or the input repetition status of each session data, the target sample text is determined from the historical interaction data.
[0129] Based on any of the above embodiments, the target sample text determination unit is further configured to:
[0130] Based on the user satisfaction status of each session data in the historical interaction data, the session data of the target session corresponding to the human-computer interaction failure is determined from the historical interaction data;
[0131] Based on the input repetition of the session data of the target session, the target sample text is determined from the session data of the target session.
[0132] Based on any of the above embodiments, the device further includes a user satisfaction determination unit, used for:
[0133] Based on the user input text and system output text of each interaction round in the session data, evaluate the user satisfaction of each interaction round;
[0134] The user satisfaction level of the session data is determined based on the user satisfaction level of each interaction round in the session data.
[0135] Based on any of the above embodiments, the device further includes an input repetition determination unit, used for:
[0136] Based on the user input sequence consisting of all user input text in the session data, the session data is checked for duplicate input to obtain the input duplication status of the session data.
[0137] Based on any of the above embodiments, the input repetition determination unit is further configured to:
[0138] Based on the sample session sequence consisting of all user input text and system output text in the sample session data, and the sample input repetition status of the sample session sequence, the user input sequence is used to determine the repetition of input in the session data, thereby obtaining the input repetition status of the session data.
[0139] Based on any of the above embodiments, the device further includes a labeled data labeling unit, used for:
[0140] Based on the historical interaction data, semantic discrimination is performed on the target sample text and its candidate semantic interpretations;
[0141] The candidate semantic interpretations that are correctly semantically identified are determined as the target semantic interpretations of the target sample text.
[0142] Based on the target semantic interpretation, the target sample text is semantically annotated.
[0143] Based on any of the above embodiments, the annotation data annotation unit is further used for:
[0144] Based on the target semantic interpretation, semantic annotation is performed on the target sample text and other target sample texts that have input duplication with the target sample text.
[0145] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10 As shown, the electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040. The processor 1010, communications interface 1020, and memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute a semantic understanding method. This method includes: determining the text to be understood; performing semantic understanding on the text to be understood based on labeled data to obtain a semantic understanding result; wherein the labeled data is obtained by semantically labeling target sample text based on historical interaction data generated by human-computer interaction, and the target sample text is the user input text corresponding to failed human-computer interaction in the historical interaction data.
[0146] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the semantic understanding method provided by the above methods. The method includes: determining the text to be understood; performing semantic understanding on the text to be understood based on labeled data to obtain a semantic understanding result; wherein the labeled data is obtained by semantically labeling target sample text based on historical interaction data generated by human-computer interaction, and the target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data.
[0148] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the semantic understanding method provided by the above methods. The method includes: determining a text to be understood; performing semantic understanding on the text to be understood based on labeled data to obtain a semantic understanding result; wherein the labeled data is obtained by semantically labeling a target sample text based on historical interaction data generated by human-computer interaction, and the target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data.
[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A semantic understanding method, characterized in that, include: Identify the text to be understood; Based on the labeled data, semantic understanding is performed on the text to be understood to obtain semantic understanding results; The labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction. The target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data. The labeled data was obtained based on the following steps: Based on the historical interaction data, semantic discrimination is performed on the target sample text and its candidate semantic interpretations; The candidate semantic interpretations that are correctly semantically identified are determined as the target semantic interpretations of the target sample text. Based on the target semantic interpretation, the target sample text is semantically annotated.
2. The semantic understanding method according to claim 1, characterized in that, The target sample text is determined through the following steps: Based on the user satisfaction status of each session data in the historical interaction data and / or the input repetition status of each session data, the target sample text is determined from the historical interaction data.
3. The semantic understanding method according to claim 2, characterized in that, The step of determining the target sample text from the historical interaction data based on user satisfaction and input duplication in each session data segment of the historical interaction data includes: Based on the user satisfaction status of each session data in the historical interaction data, the session data of the target session corresponding to the human-computer interaction failure is determined from the historical interaction data; Based on the input repetition of the session data of the target session, the target sample text is determined from the session data of the target session.
4. The semantic understanding method according to claim 2, characterized in that, The user satisfaction level of the session data is determined based on the following steps: Based on the user input text and system output text of each interaction round in the session data, evaluate the user satisfaction of each interaction round; The user satisfaction level of the session data is determined based on the user satisfaction level of each interaction round in the session data.
5. The semantic understanding method according to claim 2, characterized in that, The determination of duplicate input of the session data is based on the following steps: Based on the user input sequence consisting of all user input text in the session data, the session data is checked for duplicate input to obtain the input duplication status of the session data.
6. The semantic understanding method according to claim 5, characterized in that, The step of determining duplicate input based on the user input sequence consisting of all user input text in the session data to obtain the input duplication status of the session data includes: Based on the sample session sequence consisting of all user input text and system output text in the sample session data, and the sample input repetition status of the sample session sequence, the user input sequence is used to determine the repetition of input in the session data, thereby obtaining the input repetition status of the session data.
7. The semantic understanding method according to claim 1, characterized in that, The semantic annotation of the target sample text based on the target semantic interpretation includes: Based on the target semantic interpretation, semantic annotation is performed on the target sample text and other target sample texts that have input duplication with the target sample text.
8. A semantic understanding device, characterized in that, include: The text determination unit is used to determine the text to be understood. The semantic understanding unit is used to perform semantic understanding on the text to be understood based on the labeled data, and obtain the semantic understanding result; The labeled data is obtained by semantically labeling the target sample text based on historical interaction data generated by human-computer interaction. The target sample text is the user input text corresponding to the human-computer interaction failure in the historical interaction data. The semantic understanding device further includes a data annotation unit, which is used for: Based on the historical interaction data, semantic discrimination is performed on the target sample text and its candidate semantic interpretations; The candidate semantic interpretations that are correctly semantically identified are determined as the target semantic interpretations of the target sample text. Based on the target semantic interpretation, the target sample text is semantically annotated.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the semantic understanding method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the semantic understanding method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Semantic understanding method, device and apparatus and readable storage medium
CN110377908A