Session processing method, apparatus, device, and storage medium

CN116955552BActive Publication Date: 2026-09-25IFLYTEK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310713497.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-03-24
Filing Date
2023-06-14
Publication Date
2026-09-25
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

[0003]人机对话是人机交互的重要形式,在现有的人机对话过程中,机器通常难以准确把握用户语句的语义,从而可能会输出不符合用户对话需求的响应语句

Benefits of technology

[0018]本申请提出的会话处理方法,在获取到用户对第一语句进行澄清的第二语句后,利用包含第一语句和第二语句的会话上下文,来确定与第一语句对应的语义信息。该处理方式在确定第一语句的语义信息时,同时参考了第一语句和对第一语句进行澄清的第二语句,从而丰富了确定第一语句的语义信息的参考数据量,有利于更加准确地确定第一语句的语义。进一步的,按照通过上述方式确定的第一语句的语义,生成对应第一语句的回复语句,能够提高回复语句对第一语句的响应有效性。通过执行上述方案,能够提高人机对话过程中对用户对话内容的理解准确度,从而能够提高对用户语句的回复准确度,提升了人机交互体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955552B_ABST
    Figure CN116955552B_ABST
Patent Text Reader

Abstract

The application provides a conversation processing method, device and equipment and a storage medium. The method comprises the following steps: obtaining a second statement corresponding to a first statement of a user; wherein the second statement is a statement for clarifying the semantics of the first statement of the user; determining semantic information corresponding to the first statement based on a conversation context containing the first statement and the second statement; and generating a reply statement corresponding to the semantic information. The above scheme can improve the accuracy of understanding the conversation content of the user in the human-computer dialogue process, thereby improving the accuracy of the reply to the user's statement and improving the human-computer interaction experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202310307946.1, filed on March 24, 2023, entitled "Conversation Processing Method, Apparatus, Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of human-machine intelligence technology, and in particular to a conversation processing method, apparatus, device and storage medium. Background Technology

[0003] Human-computer dialogue is an important form of human-computer interaction. In existing dialogue processes, machines often struggle to accurately grasp the semantics of user statements, potentially resulting in responses that do not meet the user's needs. Even when users clarify their requirements based on erroneous responses, the machines still fail to understand, severely impacting the user experience. Therefore, how to output responses that accurately reflect the user's needs after clarification is a pressing issue that requires resolution. Summary of the Invention

[0004] Based on the aforementioned technological status, this application proposes a conversation processing method, apparatus, device, and storage medium, which can improve the accuracy of understanding user dialogue content during human-computer dialogue, thereby improving the accuracy of responses to user statements and enhancing the human-computer interaction experience.

[0005] To achieve the above-mentioned technical objectives, this application proposes the following technical solution: A session processing method, comprising: Obtain the second statement corresponding to the first statement of the user; wherein, the second statement is the statement in which the user clarifies the semantics of the first statement; Based on the session context containing the first statement and the second statement, determine the semantic information corresponding to the first statement; Generate a response statement corresponding to the semantic information.

[0006] Optionally, based on the session context containing the first statement and the second statement, semantic information corresponding to the first statement is determined, including: Based on the session context containing the first statement and the second statement, and the preset meta-learning information, determine the semantic information corresponding to the first statement; The meta-learning information is determined based on historical semantic understanding information, which includes historical user statements, user clarification statements corresponding to the historical user statements, and semantic information corresponding to the historical user statements determined after user clarification.

[0007] Optionally, based on the session context containing the first statement and the second statement, and preset meta-learning information, semantic information corresponding to the first statement is determined, including: The conversation context containing the first statement and the second statement, along with preset meta-learning information, is input into a pre-trained semantic correction model to obtain a semantic correction result. The semantic correction result includes the first statement and the semantic information corresponding to the first statement. Based on the semantic correction result, the semantic information corresponding to the first statement is determined.

[0008] Optionally, the meta-learning information is obtained through the following optimization process: The sample data and first-order learning information are input into the semantic correction model to obtain the semantic correction result output by the semantic correction model; wherein, the sample data includes sample context and sample labels, the sample context includes sample statements and correction statements that clarify the semantics of the sample statements, and the sample labels include the sample statements and the semantic information of the sample statements. Based on the semantic correction results and the sample labels, determine the semantic correction loss; Based on the semantic correction loss, the first meta-learning information is corrected to obtain the second meta-learning information.

[0009] Optionally, the sample data includes multiple sets; Based on the semantic correction results and the sample labels, the semantic correction loss is determined, including: Based on the semantic correction results corresponding to each group of sample data and the sample labels in each group of sample data, determine the semantic correction loss corresponding to each group of sample data respectively. Based on the semantic correction loss, the first-ary learned information is corrected to obtain the second-ary learned information, including: Based on the semantic correction loss corresponding to each group of sample data, the first-ary learning information is corrected to obtain the second-ary learning information.

[0010] Optionally, the first-gram learning information is corrected based on the semantic correction loss corresponding to each group of sample data to obtain the second-gram learning information, including: Calculate the average loss of semantic correction loss for each group of sample data; Based on the gradient of the average loss, the first-ary learning information is corrected to obtain the second-ary learning information.

[0011] Optionally, the method further includes: Determine whether the obtained user statement is a semantic clarification statement corresponding to the first statement of the user, wherein the user statement is obtained after the first statement is obtained; If the obtained user statement is a semantic clarification statement corresponding to the first user statement, then the obtained user statement is determined as the second statement corresponding to the first user statement.

[0012] Optionally, determine whether the obtained user statement is a semantic clarification statement of the corresponding user's first statement, including: The acquired user statement is input into a pre-trained clarification statement recognition model to determine whether the user statement is a semantic clarification statement corresponding to the user's first statement; The clarification statement recognition model is obtained by identifying whether a sample statement is a semantic clarification statement.

[0013] Optionally, the method further includes: If the semantic information obtained from the user's first statement is inaccurate, obtain the user's statement. The inaccuracy in obtaining the semantic information of the user's first statement includes: The system either generates an incorrect response statement based on the semantic information of the user's first statement, or fails to obtain the semantic information of the user's first statement.

[0014] Optionally, if obtaining the semantic information of the user's first statement fails, the method further includes: Based on the alternative semantic information corresponding to the first statement, a first request statement is generated, which is used to request the user to clarify the semantics of the first statement.

[0015] A session processing apparatus, comprising: The statement acquisition unit is used to acquire the second statement corresponding to the first statement of the user; wherein the second statement is a statement in which the user clarifies the semantics of the first statement; The semantic correction unit is used to determine the semantic information corresponding to the first statement based on the session context containing the first statement and the second statement; The response generation unit is used to generate a response statement corresponding to the semantic information.

[0016] An electronic device, comprising: Memory and processor; The memory stores computer programs; The processor is connected to the memory and is used to implement the above-described session processing method by running the program in the memory.

[0017] A storage medium storing a computer program, which, when executed by a processor, implements the above-described session processing method.

[0018] The session processing method proposed in this application, after obtaining a second statement from the user clarifying the first statement, utilizes the session context containing both the first and second statements to determine the semantic information corresponding to the first statement. This processing method, in determining the semantic information of the first statement, simultaneously references both the first statement and the second statement clarifying it, thereby enriching the amount of reference data for determining the semantic information of the first statement and facilitating a more accurate determination of its semantics. Furthermore, generating a corresponding response statement based on the semantics of the first statement determined in the above manner improves the effectiveness of the response statement in addressing the first statement. By implementing the above scheme, the accuracy of understanding user dialogue content during human-computer interaction can be improved, thereby increasing the accuracy of responses to user statements and enhancing the human-computer interaction experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating a session processing method provided in an embodiment of this application.

[0021] Figure 2 A schematic diagram illustrating the semantic correction process provided in the embodiments of this application.

[0022] Figure 3 Another schematic diagram of the semantic correction process provided in the embodiments of this application.

[0023] Figure 4 This is a schematic diagram illustrating the training process of the clarification statement recognition model provided in an embodiment of this application.

[0024] Figure 5 This is a schematic diagram illustrating the processing procedure of another session processing method provided in an embodiment of this application.

[0025] Figure 6 This is a schematic diagram of the structure of a session processing device provided in an embodiment of this application.

[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] The technical solution of this application embodiment is applicable to human-computer dialogue application scenarios. By adopting the technical solution of this application embodiment, it is possible to more accurately grasp the user's needs after the user clarifies the dialogue statement, thereby outputting a response statement that matches the user's dialogue needs, which is conducive to improving the human-computer dialogue interaction experience.

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] This application first proposes a session processing method, which can be applied to intelligent devices with human-computer dialogue interaction functions, such as intelligent robots, intelligent terminals, intelligent wearable devices, and intelligent mobile carriers. See also Figure 1 As shown, the method includes: S101, Get the second statement of the first statement of the corresponding user.

[0030] The first statement mentioned above refers to a statement spoken by the user to the machine during the human-computer dialogue process. The second statement mentioned above refers to a statement spoken by the user again to clarify the semantics of the first statement when the machine fails to understand the user's first statement or when the machine's response to the first statement does not meet the user's dialogue needs.

[0031] For example, suppose Q represents the user and A represents the machine. In the dialogue between Q and A, "Q: Help me switch to tank mode. A: Sorry, I don't understand. Can you explain your needs more clearly? Q: Tank mode means starting the engine at level 4, setting the seat to vibration mode, and playing rock music," "Help me switch to tank mode" can be considered the first statement, while "Tank mode means starting the engine at level 4, setting the seat to vibration mode, and playing rock music" clarifies the meaning of the first statement and can therefore be considered the second statement.

[0032] The first and second statements mentioned above can be statements of any language, any content, and any length. They can be in text form or in audio form, and the embodiments of this application are not limited to either.

[0033] For example, from the context of a human-computer dialogue, semantic recognition or keyword recognition can identify the first and second statements that have a semantic clarification relationship. For instance, if the second statement in a certain dialogue context is clearly a repetition of the first statement in the preceding text or has the meaning of semantically interpreting the first statement, then it can be determined that the first and second statements have a corresponding relationship.

[0034] Alternatively, during real-time dialogue in human-computer interaction, each time a user statement is obtained, it can be determined whether the statement is a statement that clarifies the semantics of the preceding user statement. If so, the user statement and the preceding user statement can be identified as the first statement and the second statement, respectively.

[0035] In the above process, clarifying the semantics of the first statement means explaining the meaning of the first statement in a more specific, clearer, and more colloquial way than the first statement itself.

[0036] Whether a user's statement is a statement that semantically clarifies the preceding statement can be determined through semantic recognition.

[0037] S102. Based on the session context containing the first statement and the second statement, determine the semantic information corresponding to the first statement.

[0038] The aforementioned conversation context containing the first statement and the second statement refers to the conversation context in human-computer interaction that includes at least the part from the beginning of the first statement to the end of the second statement.

[0039] For example, the conversation above, "Q: Help me switch to tank mode A: Sorry, I don't understand. Can you explain your needs more clearly? Q: Tank mode means starting the car in gear 4, setting the seat to vibration mode, and playing rock music," is a conversation context that includes the first statement "Help me switch to tank mode" and the second statement "Tank mode means starting the car in gear 4, setting the seat to vibration mode, and playing rock music."

[0040] Furthermore, the above-mentioned conversation context may include more dialogue statements, such as human-computer dialogue statements before the user utters the first statement, or human-computer dialogue statements after the second statement, or more dialogue statements between the first and second statements.

[0041] For example, after determining the first statement and the second statement through the above step S101, the first statement and the second statement are located from the upper and lower contexts of the human-computer dialogue, and then the conversation context containing at least the first statement and the second statement can be extracted from the human-computer dialogue context.

[0042] After obtaining the session context containing the first and second statements, joint semantic parsing is performed on each statement in the session context. The semantic information obtained from the parsing is then used to determine the semantics of the first statement in the session context. For example, semantic parsing is performed on the second statement in the session context, and then the semantic parsing result is used to perform semantic parsing on the first statement. Since the second statement clarifies the semantics of the first statement, more specific and richer semantic information corresponding to the first statement can be parsed from the second statement. Then, by combining this semantic information with the original text of the first statement, the semantics of the first statement can be determined more accurately.

[0043] This embodiment combines the first and second statements described above to determine the semantic information corresponding to the first statement, that is, to determine the semantics of the first statement. In determining the semantics of the first statement, both the semantic information of the first statement and the semantic information of the second statement, which clarifies and interprets the semantics of the first statement, are considered. Compared to determining the semantic information of the first statement solely based on the second statement, or solely relying on the first statement itself, this embodiment considers more information to determine the semantic information of the first statement, thus making the determined semantic information of the first statement more accurate.

[0044] S103. Generate a response statement corresponding to the semantic information.

[0045] After determining the semantic information of the user's first statement, a response statement corresponding to that semantic information is generated, thus achieving an effective response to the user's first statement.

[0046] Since the semantic information of the first statement can be determined more accurately through the processing in step S102, generating a response statement based on this semantic information can make the response statement match the semantics of the first statement, that is, it can make the response statement accurately respond to the user needs expressed by the first statement.

[0047] As described above, the conversation processing method proposed in this application, after obtaining a second statement from the user clarifying the first statement, utilizes the conversation context containing both the first and second statements to determine the semantic information corresponding to the first statement. This processing method, in determining the semantic information of the first statement, simultaneously references both the first statement and the second statement clarifying it, thereby enriching the amount of reference data for determining the semantic information of the first statement and facilitating a more accurate determination of its semantics. Furthermore, generating a corresponding response statement based on the semantics of the first statement determined in the above manner improves the effectiveness of the response statement in addressing the first statement. By implementing the above scheme, the accuracy of understanding user dialogue content during human-computer interaction can be improved, thereby increasing the accuracy of responses to user statements and enhancing the human-computer interaction experience.

[0048] As an exemplary implementation, this application embodiment uses a pre-trained semantic correction model to determine the semantic information corresponding to the first statement based on a session context containing the first statement and the second statement.

[0049] The aforementioned semantic correction model refers to a model that can determine the semantics of a specific statement by combining information other than the specific statement itself. This other information can be other statements besides the specific statement, such as statements that clarify the semantics of the specific statement, or it can be other reference information related to the specific statement, such as knowledge information (knowledge graphs), dictionary information, historical record information, etc.

[0050] The aforementioned semantic correction model can be obtained by training a neural network model through semantic analysis. This semantic analysis training can be based on a specific statement and other information besides the specific statement to analyze the semantics of that specific statement.

[0051] For example, the semantic correction model can use a pre-trained large language model, such as chatGPT, which has the function of correcting the semantics of sentences.

[0052] Based on the semantic correction model described above, see [link to relevant documentation]. Figure 2 As shown, by inputting the session context, task description, and model-generated guiding prefix into the semantic correction model described above, the semantic correction result output by the model can be obtained.

[0053] The aforementioned task description refers to descriptive information used to instruct the model on the tasks it needs to perform. In this embodiment, the task description refers to a task description that determines the semantics of the first statement in the conversation context based on the conversation context. For example, it could be a task description in the form of "determine the semantics of the first statement in the conversation context based on the input conversation context" or "correct and rewrite the following dialogue." Since the aforementioned pre-trained large-scale language model, such as chatGPT, is a comprehensive language model that can perform tasks in any domain, it is necessary to make the model explicitly aware of the tasks it needs to perform when applying this model. That is, it is necessary to input a task description into the model. Based on the task description, the model can perform tasks that meet the requirements, that is, the model can perform global parsing of the input conversation context to determine the semantics of the first statement in the conversation context.

[0054] The aforementioned model generation guide prefixes are used to specify the format of the model-generated results and / or to identify the model-generated results, such as... Figure 2 The “The corrected and rewritten content is:” shown is the model generation guide prefix. This information can be presented at the beginning of the model generation result and can serve as an identifier for the model generation result.

[0055] See Figure 2 As shown, the semantic correction results output by the model include the first statement and the semantic information corresponding to the first statement.

[0056] For example, in the semantic correction result output by the model, “Turn on tank mode means turn the seat vibration to the highest level”, “Turn on tank mode” is the user’s first statement, and “turn the seat vibration to the highest level” is the semantic information corresponding to the first statement.

[0057] By using the above model processing, we can determine more accurate semantic information of the first statement based on the session context containing the first statement, thereby achieving the goal of correcting the semantics of the first statement.

[0058] As a more preferred implementation, in determining the semantic information corresponding to the first statement, this application embodiment not only relies on the session context containing the first and second statements, but also uses meta-learning information to determine the semantic information of the first statement.

[0059] Among them, the aforementioned meta-learning information is information that is continuously optimized and adjusted based on historical semantic understanding information. This information can help to determine the semantic information of the first sentence more quickly and accurately.

[0060] The aforementioned historical semantic understanding information includes historical user statements, user clarification statements corresponding to the historical user statements, and semantic information corresponding to the historical user statements determined after user clarification.

[0061] That is, in the historical human-computer dialogue process, specifically in the process of determining the semantics of user statements based on user clarification statements, the semantics of user statements and their corresponding clarification statements, as well as the semantics of user statements determined after user clarification, are summarized and sorted to form data samples. These data samples are used to optimize and update the aforementioned meta-learning information, thereby obtaining meta-learning information that can be beneficial to determining the semantics of the first statement.

[0062] This meta-learning information is obtained by learning from the process of semantic rewriting of statements. It can be understood that this meta-learning information contains computational experience data on rewriting the semantics of statements to obtain more accurate semantics. As this meta-learning information is continuously enriched and optimized, the semantic rewriting experience data it contains becomes increasingly rich and comprehensive. This enables this meta-learning information to be used to guide the semantic rewriting of any statement.

[0063] Based on the aforementioned meta-learning information, semantic information corresponding to the first statement is determined based on the session context containing the first statement and the second statement. Specifically, semantic information corresponding to the first statement is determined based on the session context containing the first statement and the second statement, as well as preset meta-learning information.

[0064] Since the acquisition of the aforementioned meta-learning information references historical empirical data on determining the semantics of user statements based on user clarification statements, it can be said that this meta-learning information is summarized from a large number of work scenarios based on determining the semantics of user statements using user clarification statements. The application of this meta-learning information can help to more accurately determine the semantics of the target statement of user clarification based on user clarification statements.

[0065] Specifically, the conversation context containing the first statement and the second statement, as well as preset meta-learning information, are input into a pre-trained semantic correction model to obtain a semantic correction result. The semantic correction result includes the first statement and the semantic information corresponding to the first statement. Then, based on the semantic correction results output by the semantic correction model, the semantic information corresponding to the first statement is determined.

[0066] Specifically, when the semantic modification model performs semantic parsing on the first statement in the conversation context based on the conversation context, it uses the meta-learning information of the input model as an aid. In this way, by using historical experience data of semantic rewriting to determine the semantic information of the first statement, the determination of the semantic information of the first statement can be more accurate.

[0067] For example, the aforementioned meta-learning information can be incorporated during the training of the semantic correction model, and the meta-learning information can be optimized during the application of the semantic correction model. This allows the speech correction model to fully utilize the meta-learning information when performing semantic parsing of the input sentence, and makes the optimization of the meta-learning information compatible with the processing of the semantic correction model.

[0068] Once the semantic correction model determines the semantics of the first statement in the conversation context based on the aforementioned meta-learning information, the semantic information corresponding to the first statement can be directly extracted from the semantic correction results output by the model.

[0069] For example, suppose the semantic correction model outputs the semantic correction result as "Turn on tank mode means turn the seat vibration to the highest level". Then, "Turn on tank mode" is the user's first statement, and "turn the seat vibration to the highest level" is the semantic information corresponding to the first statement.

[0070] Below, in conjunction with Figure 3 As shown, the optimization process of the above-mentioned meta-learning information is introduced: In the application of the above semantic correction model, the sample data and first-gram learning information are input into the semantic correction model to obtain the semantic correction result output by the semantic correction model.

[0071] The sample data mentioned above includes sample context and sample tags. The sample context includes sample statements and corrective statements that clarify the semantics of the sample statements. The sample tags include the sample statements and their semantic information.

[0072] The format of the sample labels mentioned above is consistent with the output format of the semantic correction model mentioned above, that is, it includes the user's original statement and the semantic information of the user's original statement after user correction.

[0073] The sample data mentioned above includes not only the sample context but also task descriptions and model generation guidance prefixes—information that the model is required by default. This sample data can be from any domain, contain any content, and be of any number. Theoretically, the more sample data there is and the wider the range of domains covered, the more thorough and beneficial the optimization of meta-learning information will be.

[0074] For example Figure 3As shown, Examples 1, 2, and 3 represent three different sets of sample data. Taking Example 1 as an example, this sample data includes a task description, context, model-generated guiding prefix, and generated result. The task description is "Rewrite and correct the following dialogue:", which specifies the task to the semantic correction model; the context is "Help me turn on tank mode; Sorry, I don't understand, please describe your needs clearly; I mean, turn the seat vibration to the highest level, tank mode is all about vibrating to your heart's content", where "Help me turn on tank mode" is the sample statement, and "I mean, turn the seat vibration to the highest level, tank mode is all about vibrating to your heart's content" is the corrected statement clarifying the semantics of this sample statement; the model-generated guiding prefix is ​​"The corrected and rewritten content is:", which identifies the model-generated result; the generated result is the sample label, "Turning on tank mode means turning the seat vibration to the highest level", which includes the sample statement "Turning on tank mode" and the corrected semantics of the sample statement "turning the seat vibration to the highest level".

[0075] The feature vectors of the sample data and the feature vectors of the first-order learning information are concatenated and then input into the semantic correction model.

[0076] The semantic correction model uses the first-order learning information as a reference, combines the input context to correct the semantics of the sample statements in the context, and outputs the corrected semantic correction result.

[0077] After the model outputs the semantic correction result, the meta-forward autonomous learning module compares the semantic correction result output by the model with the sample label, calculates the loss function of both, and obtains the semantic correction loss.

[0078] Then, by using this semantic correction loss, the first-gram learning information is optimized and corrected to obtain the optimized meta-learning information, namely the second-gram learning information.

[0079] Specifically, the meta-forward autonomous learning module calculates the gradient of the semantic correction loss mentioned above, and then uses this gradient to optimize the first-meta-learning information. That is, with the gradient descent of the semantic correction loss of the semantic correction model as the objective, the first-meta-learning information is optimized to obtain the optimized meta-learning information, which is denoted as the second-meta-learning information.

[0080] In the application of the semantic correction model described above, the meta-forward autonomous learning module continuously executes the above process, which can achieve continuous iterative optimization of the meta-learning information.

[0081] See Figure 3 As shown, the above sample data includes multiple sets, for example... Figure 3 Examples 1, 2, and 3 are provided.

[0082] In the above processing, each set of sample data is concatenated with the first-order learning information and then input into the semantic correction model to obtain the semantic correction results corresponding to each set of sample data.

[0083] Based on the semantic correction results corresponding to each group of sample data and the sample labels of each group of sample data, the semantic correction loss corresponding to each group of sample data is calculated and determined. That is, for Example 1, the corresponding semantic correction loss is calculated and determined; for Example 2, the corresponding semantic correction loss is calculated and determined; for Example 3, the corresponding semantic correction loss is calculated and determined.

[0084] Then, based on the semantic correction loss corresponding to each group of sample data, the first-gram learning information is corrected. For example, the gradient of the semantic correction loss corresponding to each group of sample data is calculated, and the first-gram learning information is optimized with the goal of reducing the gradient of the semantic correction loss corresponding to each group of sample data to obtain the second-gram learning information.

[0085] As an optional implementation, this application embodiment calculates the average value of the semantic correction loss corresponding to each group of sample data to obtain the average loss.

[0086] Finally, the gradient of the average loss is used to optimize and correct the first-ary learning information to obtain the second-ary learning information.

[0087] That is, the average value of the semantic correction loss corresponding to each group of sample data is calculated to obtain the average loss. Then, the gradient of the average loss is calculated. With the goal of reducing the gradient of the average loss, the first-ary learning information is optimized to obtain the second-ary learning information.

[0088] In the process described above, the optimization and updating of meta-learning information references more sample data, thus enabling the optimized meta-learning information to be applicable to the semantic correction of user statements in more fields and more scenarios.

[0089] After the above optimization and correction process, the meta-learning information can learn more and more semantic correction experience data in scenarios or domains. When there is text to be corrected and understood, the text to be corrected and understood, along with the above-mentioned meta-learning information, are input into the semantic correction model to obtain the semantic correction result of the text to be corrected and understood by the model.

[0090] In the above processing, in order to ensure the compatibility between meta-learning information and conversation text, the feature vector dimensions of meta-learning information, conversation context, and sample data should all be the same.

[0091] After the above optimization process, for any text input to be corrected, its text structure is first rewritten as shown in Examples 1, 2 and 3 above. Then, the text is concatenated with meta-learning information and input into the semantic correction model constructed by the ultra-large language model to obtain the corrected semantics of the text to be corrected.

[0092] For example, the session processing method proposed in this application further determines whether the user statement obtained after obtaining the first statement is a semantic clarification statement of the first statement of the corresponding user before obtaining the second statement of the first statement.

[0093] That is, during human-computer dialogue, when the user says the first statement, whether or not a response statement is received from the machine in response to the first statement, the user says the statement again. In this embodiment of the application, when the user statement is obtained again, it is first determined whether the user statement is a semantic clarification statement corresponding to the user's first statement.

[0094] In some cases, if a user does not receive a response or receives an unsatisfactory response after uttering their first statement, they may switch topics and utter other statements that are semantically unrelated to the first statement. In such cases, it is not suitable to further modify the semantics of the first statement using the technical solution of this application's embodiments. Instead, the focus should be on understanding the semantics of the statement uttered by the user again, and then responding to the user's re-uttered statement. Only when it is determined that the statement uttered by the user after outputting the first statement is a semantic clarification of the first statement can the technical solution of this application's embodiments be used to modify the semantics of the first statement using the user's re-uttered statement.

[0095] Therefore, in order to ensure the rationality of the semantic correction of the first statement, in this embodiment of the application, after obtaining the first statement, when obtaining the user statement again, it first determines whether the user statement obtained again is a semantic clarification statement corresponding to the first statement of the user.

[0096] If it is a statement clarification statement, then the user statement is treated as the second statement corresponding to the first statement, and the subsequent steps of the session processing method proposed in this application are executed.

[0097] If it is not a statement clarification statement, the subsequent steps of the session processing method proposed in this application will not be executed. In this case, other dialogue processing mechanisms can be initiated, such as semantic understanding and response to user statements. If the user statement cannot be accurately understood, it can be regarded as the first statement and the above processing process can be re-executed.

[0098] For example, in this application embodiment, a clarification statement recognition model is pre-trained to identify whether a user statement is a semantically clarification statement.

[0099] This clarification statement recognition model is obtained by identifying whether a sample statement is a semantic clarification statement. In other words, it is trained through the classification of semantic clarification statements. The training process can be found in [link to training documentation]. Figure 4 As shown, a large number of sample sentences are collected and then input into a semantic clarification sentence recognition model. This model determines whether the input sample sentences are semantically clarification sentences. The semantic clarification sentence recognition model classifies the input sample sentences to determine whether they are semantically clarification sentences. Then, based on the recognition results output by the semantic clarification sentence recognition model and the sentence category label (whether it is a semantically clarification sentence or not) corresponding to the sample sentences, a loss function is calculated, and this loss function is then used to adjust the parameters of the semantic clarification sentence recognition model.

[0100] After training the above-mentioned clarification statement recognition model, inputting the acquired user statement into the clarification statement recognition model will determine whether the user response statement is a semantic clarification statement.

[0101] Figure 5 The complete processing flow of the session processing method proposed in this application is shown in [reference]. Figure 5 As shown, the session processing method proposed in this application includes the following processing steps: First, obtain the semantic information of the user's first statement.

[0102] For example, during interaction with a user, the semantics of the first statement obtained from the user are analyzed to determine the semantic information of that first statement.

[0103] If the semantic information is successfully obtained, a first response statement to the first statement is generated based on the semantic information; If the acquisition of the semantic information fails, the process proceeds to generate a clarification question, that is, based on the backup semantic information (i.e., fallback semantics) corresponding to the first statement, a first request statement is generated. The first request statement is used to request the user to clarify the semantics of the first statement, such as "Excuse me, I don't understand, please describe your needs clearly".

[0104] When generating the first request statement, user profiles can be used to generate a request statement that matches the user profile. In this process, it can also be determined whether the correction and clarification function is enabled. If the correction and clarification function is enabled, the first request statement is generated; otherwise, an incomprehensible statement is generated, such as "Sorry, I cannot understand your needs."

[0105] After generating the first response statement, user feedback is used to determine whether the first response statement is correct. For example, if the user provides a negative response after receiving the first response statement, such as "What you said is completely wrong," then it can be determined that the first response statement does not meet the user's needs and is therefore an incorrect response statement.

[0106] If the first response statement is correct, the interaction with the user can continue based on the first response statement, and the session processing method proposed in this application embodiment can be executed again to obtain the semantics of the user's response statement after receiving the first response statement.

[0107] In the event that the first response statement is incorrect and / or the first request statement is generated, determine whether the user's second statement has been received; If no second message is received from the user, it means the user will not continue the communication. The current session will be marked as an unsatisfactory interaction for future optimization of the human-computer interaction model.

[0108] Upon receiving the user's second statement, determine whether the correction and clarification function is enabled.

[0109] If the correction and clarification function is not enabled, further semantic correction cannot be performed. In this case, the current session will also be marked as an interaction that the user is dissatisfied with, so that the human-computer interaction model can be optimized based on this in the future.

[0110] Semantic correction of user statements will only be performed when the correction and clarification function is enabled.

[0111] If the clarification function is enabled, it is determined whether the second statement obtained from the user is a semantically clarification statement. For example, the clarification statement recognition model described in the above embodiments can be used to determine whether the received second statement from the user is a semantically clarification statement.

[0112] If the second statement is not a semantic clarification statement, the current session will also be marked as an unsatisfactory interaction by the user, so that the human-computer interaction model can be optimized later based on this.

[0113] In the case that the second statement is a semantic clarification statement, the clarification understanding memory processing is performed, that is, based on the conversation context containing the first statement and the second statement, and the preset meta-learning information, the corrected semantic information corresponding to the first statement is determined; the meta-learning information is determined based on historical semantic understanding information, which includes historical user statements, user clarification statements corresponding to the historical user statements, and semantic information corresponding to the historical user statements determined after user clarification.

[0114] After determining the corrected semantics of the first statement, a response statement corresponding to the corrected semantics is generated based on the obtained corrected semantic information, that is, a response to the user to understand the corrected semantics.

[0115] After this, subsequent corrective and interactive processes can be performed.

[0116] Among them, in the above Figure 5 For details on the specific processing procedures and implementation methods of each step in the session processing method shown, please refer to the corresponding descriptions in the session processing method above.

[0117] The aforementioned conversation processing procedure can initiate a correction and clarification function when it cannot understand the user's original dialogue or cannot correctly respond to the user's original dialogue. This involves guiding the user to clarify the semantics, and based on the user's corrected statement, synthesizing the original statement to redetermine its semantics. Finally, a response statement is generated based on the corrected semantics. This process makes the human-computer dialogue more intelligent, better able to handle situations where the user's statements cannot be accurately understood, and can quickly and accurately understand the user's semantics even when the user clarifies them. This reduces the number of times the user needs to clarify, more quickly compensates for dialogue blockages caused by misunderstanding of user statements, and significantly improves the user's human-computer dialogue experience.

[0118] Corresponding to the above-described session processing method, this application also provides a session processing apparatus, see below. Figure 6 As shown, the device includes: The statement acquisition unit 100 is used to acquire a second statement corresponding to a first statement of a user; wherein the second statement is a statement by the user clarifying the semantics of the first statement; The semantic correction unit 110 is used to determine semantic information corresponding to the first statement based on the session context containing the first statement and the second statement; The response generation unit 120 is used to generate a response statement corresponding to the semantic information.

[0119] Optionally, based on the session context containing the first statement and the second statement, semantic information corresponding to the first statement is determined, including: Based on the session context containing the first statement and the second statement, and the preset meta-learning information, determine the semantic information corresponding to the first statement; The meta-learning information is determined based on historical semantic understanding information, which includes historical user statements, user clarification statements corresponding to the historical user statements, and semantic information corresponding to the historical user statements determined after user clarification.

[0120] Optionally, based on the session context containing the first statement and the second statement, and preset meta-learning information, semantic information corresponding to the first statement is determined, including: The conversation context containing the first statement and the second statement, along with preset meta-learning information, is input into a pre-trained semantic correction model to obtain a semantic correction result. The semantic correction result includes the first statement and the semantic information corresponding to the first statement. Based on the semantic correction result, the semantic information corresponding to the first statement is determined.

[0121] Optionally, the meta-learning information is obtained through the following optimization process: The sample data and first-order learning information are input into the semantic correction model to obtain the semantic correction result output by the semantic correction model; wherein, the sample data includes sample context and sample labels, the sample context includes sample statements and correction statements that clarify the semantics of the sample statements, and the sample labels include the sample statements and the semantic information of the sample statements. Based on the semantic correction results and the sample labels, determine the semantic correction loss; Based on the semantic correction loss, the first meta-learning information is corrected to obtain the second meta-learning information.

[0122] Optionally, the sample data includes multiple sets; Based on the semantic correction results and the sample labels, the semantic correction loss is determined, including: Based on the semantic correction results corresponding to each group of sample data and the sample labels in each group of sample data, determine the semantic correction loss corresponding to each group of sample data respectively. Based on the semantic correction loss, the first-ary learned information is corrected to obtain the second-ary learned information, including: Based on the semantic correction loss corresponding to each group of sample data, the first-ary learning information is corrected to obtain the second-ary learning information.

[0123] Optionally, the first-gram learning information is corrected based on the semantic correction loss corresponding to each group of sample data to obtain the second-gram learning information, including: Calculate the average loss of the semantic correction loss for each group of sample data; Based on the gradient of the average loss, the first-ary learning information is corrected to obtain the second-ary learning information.

[0124] Optionally, the feature vector dimension of the meta-learning information is the same as the feature vector dimension of the session context and the feature vector dimension of the sample data.

[0125] Optionally, the statement acquisition unit is further configured to: Determine whether the obtained user statement is a semantic clarification statement corresponding to the first statement of the user, wherein the user statement is obtained after the first statement is obtained; If the obtained user statement is a semantic clarification statement corresponding to the first user statement, then the obtained user statement is determined as the second statement corresponding to the first user statement.

[0126] Optionally, determine whether the obtained user response statement is a semantic clarification statement of the corresponding user's first statement, including: The acquired user statement is input into a pre-trained clarification statement recognition model to determine whether the user statement is a semantic clarification statement corresponding to the user's first statement; The clarification statement recognition model is obtained by identifying whether a sample statement is a semantic clarification statement.

[0127] Optionally, the statement acquisition unit is further configured to: If the semantic information obtained from the user's first statement is inaccurate, obtain the user's statement. The inaccuracy in obtaining the semantic information of the user's first statement includes: The system either generates an incorrect response statement based on the semantic information of the user's first statement, or fails to obtain the semantic information of the user's first statement.

[0128] Optionally, if obtaining the semantic information of the user's first statement fails, the method further includes: Based on the alternative semantic information corresponding to the first statement, a first request statement is generated, which is used to request the user to clarify the semantics of the first statement.

[0129] The session processing apparatus provided in this embodiment belongs to the same concept as the session processing method provided in the above embodiments of this application. It can execute the session processing method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the specific processing content of the session processing method provided in the above embodiments of this application, and will not be repeated here.

[0130] The functions implemented by the statement acquisition unit, semantic correction unit, and response generation unit can be implemented by the same or different processors, and this application embodiment does not limit this.

[0131] It should be understood that the units in the above device can be implemented by a processor calling software. For example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit in the device. The processor can be a general-purpose processor, such as a CPU or microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented as hardware circuits. By designing the hardware circuits, some or all of the unit functions can be implemented. The hardware circuits can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented by designing the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a PLD, such as an FPGA, which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files to implement the functions of some or all of the above units. All units in the above device can be implemented entirely by a processor calling software, entirely by hardware circuits, or partially by a processor calling software with the remaining parts implemented by hardware circuits.

[0132] In this application embodiment, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, GPU, or DSP. In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships are fixed or reconfigurable. For example, the processor may be a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, or DPU.

[0133] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0134] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a System-on-Chip (SoC). The SoC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.

[0135] This application also proposes a control device, which includes a processor and an interface circuit. The processor in the control device is connected to a dialog input component through the interface circuit of the control device.

[0136] The dialogue input component specifically refers to the hardware component that enables users to input dialogue statements, such as a microphone, keyboard, handwriting tablet, touch screen, etc.

[0137] The aforementioned interface circuit can be any interface circuit capable of implementing data communication functions, such as a USB interface circuit, a Type-C interface circuit, a serial port circuit, a PCIe circuit, etc.

[0138] The processor in this control device is also a circuit with signal processing capabilities, which executes any of the session processing methods described in the above embodiments. For specific implementations of the processor, please refer to the processor implementations described above; this application does not impose strict limitations on these implementations.

[0139] When the control device is applied to a device with human-computer interaction function, the dialogue input component of the control device can be the information input component on the device, such as a microphone, keyboard, handwriting tablet, touch screen, etc. At the same time, the processor of the control device can be the device's built-in CPU or GPU, etc., and the interface circuit of the control device can be the interface circuit between the device's information input component and the CPU or GPU processor.

[0140] Another embodiment of this application also provides an electronic device, see [link to relevant documentation] Figure 7 As shown, the device includes: Memory 200 and processor 210; The memory 200 is connected to the processor 210 and is used to store programs; The processor 210 is configured to implement the session processing method disclosed in any of the above embodiments by running the program stored in the memory 200.

[0141] Specifically, the aforementioned electronic device may also include: a bus, a communication interface 220, an input device 230, and an output device 240.

[0142] The processor 210, memory 200, communication interface 220, input device 230, and output device 240 are interconnected via a bus. Among them: A bus can include a pathway for transmitting information between various components of a computer system.

[0143] Processor 210 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0144] Processor 210 may include a main processor, as well as a baseband chip, modem, etc.

[0145] The memory 200 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 200 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.

[0146] Input device 230 may include a device for receiving user input data and information, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.

[0147] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0148] The communication interface 220 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0149] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement various steps of any of the session processing methods provided in the above embodiments of this application.

[0150] This application also proposes a chip including a processor and a data interface. The processor reads and runs a program stored in a memory through the data interface to execute the session processing method described in any of the above embodiments. For details of the processing and its beneficial effects, please refer to the embodiments of the above session processing method.

[0151] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the session processing methods described in any of the above embodiments.

[0152] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0153] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor of the steps in the session processing method described in any of the above embodiments.

[0154] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0155] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0156] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.

[0157] The modules and sub-modules in the various embodiments of the present application's devices and terminals can be merged, divided, and deleted according to actual needs.

[0158] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0159] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.

[0160] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.

[0161] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0162] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0163] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0164] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A session processing method, characterized in that, include: Obtain the second statement corresponding to the first statement of the user; wherein, the second statement is the statement in which the user clarifies the semantics of the first statement; The conversation context containing the first and second statements, along with pre-obtained meta-learning information, is input into a pre-trained semantic correction model to obtain a semantic correction result. The semantic correction model is constructed based on a neural network model or a large language model. The semantic correction result includes the first statement and its corresponding semantic information. The meta-learning information is obtained through the following optimization process: Sample data and first meta-learning information are input into the semantic correction model to obtain the semantic correction result output by the model. The sample data includes sample context and sample labels. The sample context includes sample statements and corrected statements that clarify the semantics of the sample statements. The sample labels include the sample statements and their semantic information. A semantic correction loss is determined based on the semantic correction result and the sample labels. The first meta-learning information is corrected based on the semantic correction loss to obtain second meta-learning information. Correcting the first meta-learning information includes optimizing the first meta-learning information using the gradient of the semantic correction loss, with the goal of decreasing the gradient of the semantic correction loss of the semantic correction model. Based on the semantic correction result, determine the semantic information corresponding to the first statement; Generate a response statement corresponding to the semantic information.

2. The method according to claim 1, characterized in that, The sample data includes multiple sets; Based on the semantic correction results and the sample labels, the semantic correction loss is determined, including: Based on the semantic correction results corresponding to each group of sample data and the sample labels in each group of sample data, determine the semantic correction loss corresponding to each group of sample data respectively. Based on the semantic correction loss, the first-ary learned information is corrected to obtain the second-ary learned information, including: Based on the semantic correction loss corresponding to each group of sample data, the first-ary learning information is corrected to obtain the second-ary learning information.

3. The method according to claim 2, characterized in that, Based on the semantic correction loss corresponding to each group of sample data, the first-ary learning information is corrected to obtain the second-ary learning information, including: Calculate the average loss of semantic correction loss for each group of sample data; Based on the gradient of the average loss, the first-ary learning information is corrected to obtain the second-ary learning information.

4. The method according to claim 1, characterized in that, The method further includes: Determine whether the obtained user statement is a semantic clarification statement corresponding to the first statement of the user, wherein the user statement is obtained after the first statement is obtained; If the obtained user statement is a semantic clarification statement corresponding to the user's first statement, then the obtained user statement is determined as the second statement corresponding to the user's first statement.

5. The method according to claim 4, characterized in that, Determine whether the retrieved user statement is a semantic clarification statement of the corresponding user's first statement, including: The acquired user statement is input into a pre-trained clarification statement recognition model to determine whether the user statement is a semantic clarification statement corresponding to the user's first statement; The clarification statement recognition model is obtained by identifying whether a sample statement is a semantic clarification statement.

6. The method according to claim 4, characterized in that, The method further includes: If an incorrect response statement is generated based on the semantic information of the user's first statement, and / or if obtaining the semantic information of the user's first statement fails, then obtain the user's statement.

7. The method according to claim 6, characterized in that, If obtaining the semantic information of the user's first statement fails, the method further includes: Based on the alternative semantic information corresponding to the first statement, a first request statement is generated, which is used to request the user to clarify the semantics of the first statement.

8. A session processing apparatus, characterized in that, include: The statement acquisition unit is used to acquire the second statement corresponding to the first statement of the user; wherein the second statement is a statement in which the user clarifies the semantics of the first statement; Semantic correction unit, used for The conversation context containing the first and second statements, along with pre-obtained meta-learning information, is input into a pre-trained semantic correction model to obtain a semantic correction result. The semantic correction model is constructed based on a neural network model or a large language model. The semantic correction result includes the first statement and its corresponding semantic information. The meta-learning information is obtained through the following optimization process: Sample data and first meta-learning information are input into the semantic correction model to obtain the semantic correction result output by the model. The sample data includes sample context and sample labels. The sample context includes sample statements and corrected statements that clarify the semantics of the sample statements. The sample labels include the sample statements and their semantic information. A semantic correction loss is determined based on the semantic correction result and the sample labels. The first meta-learning information is corrected based on the semantic correction loss to obtain second meta-learning information. Correcting the first meta-learning information includes: optimizing the first meta-learning information using the gradient of the semantic correction loss, aiming to decrease the gradient of the semantic correction loss of the semantic correction model. The semantic information corresponding to the first statement is determined based on the semantic correction result. The response generation unit is used to generate a response statement corresponding to the semantic information.

9. An electronic device, characterized in that, include: Memory and processor; The memory contains computer programs; The processor is connected to the memory and is used to implement the session processing method as described in any one of claims 1 to 7 by running a program in the memory.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the session processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dialogue method and device, server and storage medium

    CN113132214A

  • Dialogue intention recognition method and device, storage medium and intelligent equipment

    CN114970560A