Slot connection methods, equipment and storage media

By using a slot continuation model and a continuation transition score matrix, combined with user behavior habits and target continuation thresholds, the problem of dialogue incoherence caused by incorrect pronoun references in multi-turn human-computer dialogues is solved, achieving accuracy and personalized response in dialogue.

CN120449998BActive Publication Date: 2026-04-03HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In multi-turn dialogue scenarios between humans and machines, improper use or failure to recognize pronouns can lead to incorrect user intent, resulting in a lack of coherence and accuracy in the dialogue.

Method used

By using the first slot continuation model and the continuation transition score matrix, combined with user behavior habits and target continuation thresholds, a decision is made on whether to perform slot continuation, and the slot information for continuation is determined based on dialogue information to ensure the continuity and accuracy of the dialogue.

Benefits of technology

It enables automatic filling and updating of slot information based on user behavior habits in multi-turn dialogue scenarios, ensuring the continuity and accuracy of the dialogue, reducing the use of hard coding, and adapting to the personalized needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449998B_ABST
    Figure CN120449998B_ABST
Patent Text Reader

Abstract

This application provides a slot continuation method, device, and storage medium. In this method, when a first slot continuation model determines that slot continuation is unnecessary, a decision is made regarding whether slot continuation is required in the current interaction scenario based on a continuation transition score matrix determined according to user behavior habits and a target continuation threshold. If slot continuation is determined to be necessary, the continuation slot information is determined based on a target slot score evaluation matrix corresponding to the currently acquired dialogue information. This enables slot continuation in multi-turn dialogue scenarios, ensuring the continuity and accuracy of the dialogue and guaranteeing that the continuation dialogue is more suitable for the current user's behavior habits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a slot connection method, device and storage medium. Background Technology

[0002] With the rapid development of artificial intelligence technology, multi-turn human-computer dialogue has become a bridge connecting humans and smart devices. In multi-turn dialogue scenarios, the system recognizes pronouns during user interaction, understands the context and user intent, and then fills in and updates slot information based on the user intent to ensure the coherence and accuracy of the dialogue.

[0003] However, in actual human-computer multi-turn dialogue scenarios, there are often cases where pronouns are used improperly or even not recognized. This can lead to incorrect determination of user intent, resulting in incorrect slot information being filled and updated based on user intent, and ultimately causing the dialogue to lack coherence and accuracy. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide a slot connection method, device, and storage medium, aiming to achieve slot connection in multi-turn dialogue scenarios to ensure the continuity and accuracy of the dialogue.

[0005] In a first aspect, embodiments of this application provide a slot continuation method. This method is applied to an electronic device and includes: after receiving dialogue information input by a user, determining a first continuation result corresponding to the dialogue information based on a first slot continuation model, wherein the first slot continuation model is obtained by training on human-computer interaction data based on natural language understanding technology; if the first continuation result indicates that slot continuation is not required, determining a second continuation result corresponding to the dialogue information based on a continuation transition score matrix and a target continuation threshold, wherein the continuation transition score matrix is ​​determined based on human-computer interaction data in a multi-turn dialogue scenario, the target continuation threshold is obtained by adaptive adjustment based on user satisfaction and historical continuation thresholds, the historical continuation thresholds being the continuation thresholds before adaptive adjustment, and user satisfaction being determined based on user behavior habits; if the second continuation result indicates that slot continuation is required, determining the continuation slot information based on the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information.

[0006] The first slot continues the model understanding as a large natural language understanding model obtained by training on human-computer interaction data based on natural language understanding technology.

[0007] Among them, the historical continuity threshold can be understood as the continuity threshold used in the human-computer interaction scenario before the target continuity threshold is obtained.

[0008] The slot information can include the slot and the slot value.

[0009] The successive transition score matrix can also take other forms, such as a mapping table or an array.

[0010] The target slot score evaluation matrix can also be in other forms, such as a mapping table or an array.

[0011] Therefore, in scenarios where the first slot continuation model (such as a large natural language understanding model) determines that slot continuation is unnecessary, the system uses a continuation transition score matrix and a target continuation threshold determined based on user behavior habits to decide whether slot continuation is needed in the current interaction scenario. If slot continuation is determined to be necessary, the system uses a target slot score evaluation matrix corresponding to the currently acquired dialogue information to determine the continuation slot information. This enables slot continuation in multi-turn dialogue scenarios, ensuring the continuity and accuracy of the dialogue and guaranteeing that the continuation dialogue is more suitable for the current user's behavior habits.

[0012] According to the first aspect, the second continuation result corresponding to the dialogue information is determined based on the continuation transfer score matrix and the target continuation threshold, including: determining the continuation transfer score of the dialogue information based on the continuation transfer score matrix; and determining the second continuation result corresponding to the dialogue information based on the continuation transfer score and the target continuation threshold.

[0013] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 8 The descriptions of steps S201 and S202 in the illustrated embodiment will not be repeated here.

[0014] According to the first aspect, or any implementation of the first aspect above, the second continuation result corresponding to the dialogue information is determined based on the continuation transfer score and the target continuation threshold, including: generating a second continuation result indicating that slot continuation is required when the continuation transfer score is greater than or equal to the target continuation threshold; and generating a second continuation result indicating that slot continuation is not required when the continuation transfer score is less than the target continuation threshold.

[0015] In some implementations, a second continuation result indicating that slot continuation is required can be generated if the continuation transfer score is greater than the target continuation threshold. If the continuation transfer score is less than or equal to the target continuation threshold, a second continuation result indicating that slot continuation is not required can be generated.

[0016] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 8 The descriptions of steps S201 and S202 in the illustrated embodiment will not be repeated here.

[0017] According to the first aspect, or any implementation of the first aspect above, the continuation transition score matrix is ​​determined based on the human-computer interaction data in a multi-turn dialogue scenario, including: splitting the human-computer interaction data in the multi-turn dialogue scenario into a sequence to obtain the first sub-sequence corresponding to the human-computer interaction data in the multi-turn dialogue scenario; for each first sub-sequence, performing entity recognition to determine the slot part-of-speech of each first sub-sequence; for each first sub-sequence, assembling and generating a second sub-sequence based on the determined slot part-of-speech, the second sub-sequence includes the intent information and slot information included in the first sub-sequence, but does not include information other than intent information and slot information in the first sub-sequence; merging the second sub-sequences into sequence groups with different intents according to intent relationships; for each sequence group, calculating the implicit continuation concentration score and part-of-speech overlap score corresponding to the sequence group, and strengthening the continuation transition weights based on a reinforcement learning strategy; for each sequence group, determining the continuation transition score of the sequence group based on the implicit continuation concentration score, part-of-speech overlap score, and continuation transition weights; and constructing a continuation transition score matrix based on the continuation transition score of each sequence group.

[0018] Among them, the entity recognition example is a predefined entity recognition interface, which can be implemented based on Natural Language Understanding (NLU) technology.

[0019] Among them, slot part-of-speech refers to the part of speech of the words (slot values) used to fill the slots.

[0020] The implicit continuation concentration score can be understood as the user's potential interest in the continuation request during a single-intent, multi-round interactive slot filling process. The higher the implicit continuation concentration score, the higher the user's potential interest in the continuation request, i.e., the more they expect automatic continuation.

[0021] The part-of-speech overlap score can be understood as the probability that two intentions share the same part of speech during an intention state transition. The higher the part-of-speech overlap score, the higher the probability that the two intentions share the same part of speech, and the higher the probability that they need to be followed by another intention.

[0022] Among them, reinforcement learning strategies can be based on reward and punishment systems.

[0023] Among them, the successive transition score of the sequence group mentioned in this aspect is, for example, Figure 4 The historical succession transfer score in step S1016 of the illustrated embodiment.

[0024] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 4 The descriptions of steps S1011-3 to S1011-5 and steps S1012 to S1016 in the illustrated embodiment will not be repeated here.

[0025] Based on the first aspect, or any implementation of the first aspect above, the implicit continuation concentration score corresponding to the sequence group is calculated, including: determining the number of follow-up inquiries for the intent corresponding to the sequence group based on the number of occurrences of intent information in the sequence group; determining the number of slots included in the last subsequence based on the slot information of the last subsequence in the sequence group; determining the number of slots included in the first subsequence based on the slot information of the first subsequence in the sequence group; determining the slot supplement value corresponding to the sequence group based on the number of slots included in the last subsequence and the number of slots included in the first subsequence; and calculating the implicit continuation concentration score corresponding to the sequence group based on the number of follow-up inquiries for the intent corresponding to the sequence group and the slot supplement value.

[0026] For details on the specific implementation of this aspect, please refer to the description of formula (1) in the following embodiments, which will not be repeated here.

[0027] According to the first aspect, or any implementation of the first aspect above, calculate the part-of-speech overlap score corresponding to the sequence group, including: determining the number of parts of speech in the slot corresponding to the slot before the intent state transition, the number of parts of speech in the slot corresponding to the slot after the intent state transition, and the number of identical parts of speech in the slots in the two intents, based on the intent information and slot information included in the sequence group; and calculating the part-of-speech overlap score corresponding to the sequence group based on the number of parts of speech in the slot corresponding to the slot before the intent state transition, the number of parts of speech in the slot corresponding to the slot after the intent state transition, and the number of identical parts of speech in the slots in the two intents.

[0028] For details on the specific implementation of this aspect, please refer to the description of formula (2) in the following embodiments, which will not be repeated here.

[0029] According to the first aspect, or any of the above implementations of the first aspect, the continuation transfer weight is strengthened based on a reinforcement learning strategy, including: a reinforcement learning strategy based on a reward and punishment system, which increases the reward for successful continuation transfer weight in the same part-of-speech scenario by setting a threshold, and decreases the penalty for failed continuation transfer weight by setting a threshold.

[0030] The threshold is set to, for example, 1.

[0031] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 4 The description of step S1015 in the illustrated embodiment will not be repeated here.

[0032] Determining user satisfaction based on the first aspect, or any implementation of the first aspect above, includes: obtaining M second subsequences with added continuation tags from the sequence group, where the continuation tags are used to identify slot information in the second subsequences and are determined according to the slot score evaluation matrix corresponding to the sequence group, where M is an integer greater than 0; for each second subsequence with added continuation tags, obtaining the successor subsequence based on the index value corresponding to the second subsequence; for each second subsequence with added continuation tags, determining whether the intent information corresponding to the second subsequence is the same as the intent information corresponding to the successor subsequence; if the corresponding intent information is the same, determining whether the slot information corresponding to the second subsequence is the same as the slot information corresponding to the successor subsequence; counting the number of second subsequences with different intent information and the number of second subsequences with the same slot information among the M second subsequences; and determining the user satisfaction of M autonomous continuation behaviors based on the number of second subsequences with different intent information and the number of second subsequences with the same slot information.

[0033] The second subsequence with added continuation labels can be understood as the second subsequence that the natural language understanding model determines does not need to be continuated, but the continuation transition score matrix determines that continuation is needed, and the continuation range is determined by the slot score evaluation matrix.

[0034] The number of second subsequences with different intent information and the number of second subsequences with the same slot information can be either the number of satisfactory slot continuation or the number of unsatisfactory slot continuation.

[0035] When counting the number of satisfactory slot connections, the count can be increased by 1 for each satisfactory slot connection.

[0036] For the specific implementation details of this method, please refer to the description of formula (5) in the following embodiments, which will not be repeated here.

[0037] When counting the number of unsatisfactory slot connections, the count can be done by subtracting 1 from the number of unsatisfactory slot connections each time.

[0038] For the specific implementation details of this method, please refer to the description of formula (6) in the following embodiments, which will not be repeated here.

[0039] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 7 The description of steps S1021 to S1028 in the illustrated embodiment will not be repeated here.

[0040] According to the first aspect, or any implementation of the first aspect above, the subsequent slot information is determined based on the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information, including: determining the slot part-of-speech of the slots included in the dialogue information; searching for a target slot score evaluation matrix that matches the slot part-of-speech from the pre-determined slot score evaluation matrices corresponding to different slot part-of-speech; searching for the transfer score recorded in the target slot score evaluation matrix that meets the set requirements; and determining the slot information corresponding to the transfer score that meets the set requirements as the subsequent slot information.

[0041] Among them, the transfer score that meets the set requirements, such as the transfer score of the highest score.

[0042] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 8 The descriptions of steps S204 and S204 in the illustrated embodiment will not be repeated here.

[0043] Based on the first aspect, or any implementation of the first aspect above, determine the slot score evaluation matrix corresponding to different slot part-of-speech tags, including: performing sequence splitting on the human-computer interaction data in a multi-turn dialogue scenario to obtain a first sub-sequence corresponding to the human-computer interaction data in the multi-turn dialogue scenario; for each first sub-sequence, performing entity recognition to determine the slot part-of-speech tag of each first sub-sequence; for each first sub-sequence, assembling and generating a second sub-sequence based on the determined slot part-of-speech tag, the second sub-sequence including the intent information and slot information included in the first sub-sequence. Excluding intent information and slot information from the first subsequence; the second subsequence is merged into groups with the same part of speech corresponding to different slots according to the part of speech of the slot; for each second subsequence within a group with the same part of speech, the slot hit relationship of the second subsequence is determined, and the slot hit relationship records the slots of the first intent, the slots of the second intent, and the similarity between the slots of the first intent and the slots of the second intent; for each group with the same part of speech, the slot score evaluation matrix corresponding to the group with the same part of speech is determined based on the slot hit relationship of each second subsequence and the target continuation threshold.

[0044] For specific implementation details regarding this aspect, please refer to [link / reference]. Figure 9 The description of steps S301 to S303 in the illustrated embodiment will not be repeated here.

[0045] Secondly, embodiments of this application provide an electronic device. The electronic device includes: a memory and a processor, the memory and the processor being coupled; the memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the methods of the first aspect or any possible implementation thereof.

[0046] Thirdly, embodiments of this application provide a computer-readable medium for storing a computer program, the computer program including instructions for performing the method in the first aspect or any possible implementation of the first aspect.

[0047] Fourthly, embodiments of this application provide a computer program including instructions for performing the method in the first aspect or any possible implementation thereof.

[0048] Fifthly, embodiments of this application provide a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals. Attached Figure Description

[0049] Figure 1A and Figure 1B This is a schematic diagram of a user interface involved in a multi-turn dialogue scenario, as an example.

[0050] Figure 1C This is a schematic diagram of a user interface involved in another multi-turn dialogue scenario, as exemplarily shown.

[0051] Figure 2 This is an exemplary user interface diagram illustrating a multi-turn dialogue based on the slot connection method provided in an embodiment of this application.

[0052] Figure 3 This is an example of a flowchart illustrating the implementation process of a decision on whether to continue a particular stage.

[0053] Figure 4 This is an example of a flowchart illustrating the process of determining historical succession transfer scores.

[0054] Figure 5 This is an example of a schematic diagram illustrating the extraction of multi-round interaction data from interaction data;

[0055] Figure 6 This is an exemplary diagram illustrating how a long sequence can be split into subsequences.

[0056] Figure 7 This is a schematic diagram illustrating an example of a process for determining user satisfaction.

[0057] Figure 8 This is a schematic flowchart illustrating an embodiment of the slot connection method provided in this application;

[0058] Figure 9This is an exemplary flowchart illustrating a process for determining a slot score evaluation matrix used for decision succession range;

[0059] Figure 10 This is an exemplary diagram illustrating the splitting of subsequences based on slot part-of-speech.

[0060] Figure 11 This is a schematic flowchart illustrating another slot connection method provided in this application, as exemplarily shown.

[0061] Figure 12 This is a schematic diagram illustrating an example of a system for implementing slot connection provided in an embodiment of this application;

[0062] Figure 13 A schematic diagram of the hardware structure of an electronic device as an example;

[0063] Figure 14 This is a schematic diagram of the software structure of an electronic device as an example. Detailed Implementation

[0064] 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, 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.

[0065] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0066] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0067] In the description of the embodiments of this application, the words "exemplary," "for example," or "optionally" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "exemplary," "for example," or "optionally" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary," "for example," or "optionally" is intended to present the relevant concepts in a specific manner.

[0068] In the description of the embodiments of this application, the names of various controls, areas, options, and entry points are for illustrative purposes only and are not intended to limit the embodiments of this application. That is, in actual use, they may also be described with other names.

[0069] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0070] In the description of the embodiments of this application, unless otherwise stated, only one user interface can be displayed at a time. For example, if interface 101 is displayed, interface 102 will not be displayed on the current screen. Conversely, if interface 102 is displayed, interface 101 will not be displayed on the current screen. However, the elements included in different interfaces may be the same.

[0071] In the description of the embodiments of this application, unless otherwise stated, the dashed lines appearing in the drawings are for illustration only. That is, they are not shown in actual use.

[0072] With the rapid development of artificial intelligence technology, multi-turn human-machine dialogue (multiple dialogue interactions between humans and machines) has become a bridge connecting humans and intelligent devices. In multi-turn dialogue scenarios, the content of multiple dialogue interactions is often related. Therefore, slot succession has become an important part of multi-turn dialogue.

[0073] The so-called slot continuation in multi-turn dialogues refers to the process by which the system automatically fills in and updates slot information through interaction with the user during a multi-turn dialogue. Each slot can represent a key information point. By extracting the user's intent and the slot information related to that intent, the system can better understand the user's intent and provide corresponding responses or perform corresponding operations accordingly.

[0074] In other words, by using slot-based continuation, the system can ensure the consistency of context in multi-turn dialogues, thereby providing users with a more accurate and smooth interactive experience.

[0075] To achieve slot continuity, some implementations involve recognizing pronouns in user statements (voice input or text input), using these pronouns to understand the context and user intent, and then filling and updating slot information accordingly to ensure the coherence and accuracy of the dialogue.

[0076] Pronouns, or "pronouns," are grammatical terms that refer to words used to replace nouns or sentences. Examples include "this," "that," "here," "there," "I," and "he," among others. These will not be listed here, and this application does not impose any limitations on them.

[0077] To better understand how pronouns can be used to achieve slot continuation in multi-turn dialogue scenarios, the following examples will illustrate this.

[0078] See Figure 1A For example, when an electronic device (such as a mobile phone) receives a voice wake-up word (e.g., "Hello YOYO") to wake up a voice assistant application (hereinafter referred to as "voice assistant"), the user interface can change from the currently displayed interface 101 to interface 102. That is, the window corresponding to the voice assistant, such as window 1021, is displayed on top of interface 101.

[0079] For example, in some implementations, window 1021 may display the response information of the voice assistant to the user's voice input.

[0080] Regarding the content displayed in window 1021, you can refer to... Figure 1A As shown. But it should be understood that, Figure 1A The example shown is merely one example and is not intended to be the only limitation of this embodiment.

[0081] For example, in some other implementations, while the current user interface displays window 1021, the mobile phone can also automatically broadcast the reply information displayed in window 1021 to achieve the effect of having a dialogue with the user.

[0082] Furthermore, it should be noted that when the voice assistant is set to support voice wake-up words, once the phone is powered on, regardless of the phone's current state, the voice assistant can be activated upon receiving the voice wake-up word, and window 1021 will be displayed on the current screen. That is, screens 101 and 102 can be user interfaces displayed on the phone in any state, and are not limited to the desktop.

[0083] Furthermore, it should be noted that the voice assistant mentioned in this embodiment can also be called YOYO Assistant or a dialogue management system. That is, the system used to interact with the user in the above embodiment can be understood as a voice assistant.

[0084] For example, during the process of waking up the voice assistant and displaying window 1021, after receiving the user's voice input, the voice assistant can call the corresponding functions, models, etc. to extract and improve the user's intent, slot information, etc., and provide corresponding responses or perform corresponding operations based on the user's intent and slot information.

[0085] For example Figure 1BAs shown, during the display of window 1021, when a user's voice input is received, such as "food near destination A", in one implementation, the search results for food near destination A can be displayed in the window corresponding to the voice assistant. That is, the user interface changes from interface 102 to interface 103, and window 1021 changes to window 1031.

[0086] In other implementations, the user interface can also be directly transformed into an interface that displays the query results, such as the interface in a browser application that displays the query results.

[0087] In other implementations, a separate window for displaying query results can be shown on the current user interface, meaning the query results are not displayed in the window corresponding to the voice assistant.

[0088] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. For ease of explanation, this application embodiment uses the example of displaying the query results directly in the window corresponding to the voice assistant.

[0089] For example, during the display of interface 103 on the phone, when the user's voice input, such as "navigate to there," is received, the voice assistant automatically fills the address slot with "destination A" because it recognizes the pronoun "there." Thus, even if the user's current voice input "navigate to there" does not contain explicit address information, the voice assistant can determine that the current operation to be performed is navigation to destination A based on the content of the previous voice input. Therefore, the phone will launch the navigation application and automatically begin navigation to destination A. For example, the user interface will change from interface 103 to interface 104.

[0090] It should be noted that in some implementations, a transitional interface can be displayed during the transition from interface 103 to interface 104. For example, the default interface after the navigation application starts, and then the interface changes from the default interface to interface 104.

[0091] In some implementations, a screenshot of interface 103 can be taken before launching the navigation application, and then displayed on top of the user interface. After launching the navigation application and loading interface 104, the screenshot can be removed. In this way, visually, the user will perceive that the user interface changes directly from interface 103 to interface 104.

[0092] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0093] Therefore, by recognizing pronouns in voice input and understanding the context and user intent through these pronouns, the system can automatically fill in and update slot information based on the user's intent, thereby ensuring the coherence and accuracy of the dialogue and making the responses or operations performed by the voice assistant meet the user's expectations.

[0094] However, due to the large number of pronouns, accurately implementing slot concatenation based on pronouns requires continuously expanding the corpus (including speech and text inputs of various pronouns) needed to train large models (such as large natural language understanding models), which increases implementation costs. Balancing cost considerations might lead to insufficient training data, resulting in slot concatenation failures. Therefore, implementing slot concatenation based on pronouns cannot meet the needs of all business scenarios and users.

[0095] Furthermore, in real-world multi-turn human-computer dialogue scenarios, there are frequent instances of improper use of pronouns, or even failure to recognize pronouns. Taking the aforementioned multi-turn dialogue scenario as an example, such as... Figure 1C As shown, for example, after the voice assistant displays the search results for restaurants near destination A in the corresponding window based on the user's voice input "restaurants near destination A," if it receives another voice input from the user, such as "start navigation," it cannot determine whether the navigation intent is to navigate to destination A or simply to launch the navigation application (displaying the default interface of the navigation application would suffice) because the voice input "start navigation" does not contain a pronoun. That is, due to the complexity of user semantics, the determined user intent may be incorrect. This results in incorrect slot information being filled and updated based on the user intent, leading to a lack of coherence and accuracy in the final dialogue.

[0096] In this scenario, to clarify the user's intent, some implementations will guide the user to provide more crucial information. For example, the voice assistant might display its response to the user's voice input in a corresponding window, as shown in window 1051 in interface 105.

[0097] Regarding the content displayed in window 1051, you can refer to... Figure 1C As shown. But it should be understood that, Figure 1C The example shown is merely one example and is not intended to be the only limitation of this embodiment.

[0098] In other implementations, slot succession is achieved through hard-coding of business rules in multi-turn dialogue scenarios.

[0099] It's important to note that hard-coding is a coding method that embeds data directly into the program's source code. Because hard-coded data is stored directly within the program, it reduces the time required to look up external data at runtime. In other words, hard-coding can improve program execution efficiency. However, since hard-coded data is stored directly within the program, it cannot be modified during program execution, making the program difficult to maintain and upgrade. Furthermore, because the data cannot be modified during program execution, electronic devices using the same program may produce identical slot connection results for the same user intent.

[0100] For example, when the user intent to query a location is to use a ride-hailing service, if the hard-coded business rule specifies that the next slot information is ride-hailing, the electronic device will always respond or perform the action of launching the ride-hailing app and displaying information on available vehicles to the query location, regardless of the user, even if some users need to launch the navigation app to view the route to the query location.

[0101] In view of this, embodiments of this application provide a slot continuation method, which aims to decide whether to continue and the scope of continuation based on user behavior habits (or user behavior patterns). This reduces the hard coding of business logic for slot continuation and enables personalized slot continuation in multi-turn dialogue scenarios, achieving a direct and effective communication while ensuring the continuity and accuracy of the dialogue.

[0102] In this embodiment, the "direct response" effect can be understood as follows: after a user utters a sentence, the system can accurately respond to the user's desired outcome, regardless of whether a pronoun is recognized. For example, if a user wants to go to the vicinity of destination A, the navigation application is directly launched and navigation to destination A begins. Another example is that if a user wants to open the navigation application, only the navigation application is launched.

[0103] The slot connection method provided in this application embodiment will be described in detail below from two aspects: whether to continue the connection and the scope of the connection decision.

[0104] (1) The following is about whether the decision should continue:

[0105] In the embodiments of this application, the decision to continue can be made by determining whether the continuity transfer score corresponding to the user's current input content is greater than the continuity threshold.

[0106] The connection threshold can be adaptively adjusted based on user satisfaction. User satisfaction can be obtained by verifying feedback from historical connection transfer scores. Historical connection transfer scores can be determined based on interaction data from historical multi-turn dialogue scenarios.

[0107] Based on this, in order to make a more accurate decision on whether the current dialogue interaction needs to be continued, we can first perform three stages of processing: historical continuation transfer score calculation, historical continuation transfer score verification (the purpose of which is to obtain user satisfaction), and continuation threshold adjustment.

[0108] For example, in some implementations of this application, the relationship between the above three stages, and the processing items to be performed in each stage, can be as follows: Figure 3 As shown.

[0109] See Figure 3 For example, in the stage corresponding to step S101 (historical continuation transfer score calculation stage), the historical continuation transfer score can be determined based on the interaction data of historical multi-turn dialogue scenarios.

[0110] The interaction data from historical multi-turn dialogue scenarios can be obtained from the storage path corresponding to the voice assistant.

[0111] For example, in some implementations, the storage path may be a storage path on the electronic device's local storage medium. That is, in this implementation, the interactive data is obtained from the electronic device's local storage medium (such as internal memory).

[0112] For example, in some implementations, the storage path can be the storage path of the server corresponding to the voice assistant. That is, in this implementation, the interaction data is obtained from the server corresponding to the voice assistant.

[0113] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0114] The interactive data can be in any format. For example, JSON (JavaScript Object Notation; a lightweight data exchange format), TXT (a text format), XLS / XLSX (a table format), etc. For ease of explanation, this application uses JSON format as an example.

[0115] The interaction data obtained can be from a preset time period, such as the past week, the past month, or the past three months.

[0116] The preset time setting can be configured according to business needs. For example, in scenarios where ensuring the accuracy of slot continuation is a priority, the preset time can be set to a primary duration, such as 3 months. This way, based on rich interaction data, the historical continuation transfer scores corresponding to different user intentions can be determined. This ensures that the obtained user satisfaction better reflects the rationality of the automatically performed slot continuation, thus making the continuation threshold adjusted based on user satisfaction more suitable for users.

[0117] For example, in scenarios where prioritizing device power consumption and minimizing resource usage is crucial, the preset time can be set to a second duration (less than the first duration), such as one week. This reduces the amount of interactive data during the historical transfer score calculation phase, thereby improving calculation speed and reducing resource and power consumption.

[0118] For example, in scenarios where it's necessary to ensure accurate slot connection while minimizing device power consumption and resource usage, the preset time can be set to a third duration (longer than the second duration but shorter than the first), such as one month. By acquiring interaction data within this third duration, it's possible to determine as many historical connection transfer scores as possible based on user intent, ensuring that user satisfaction better reflects the rationality of the automatic slot connection process. This allows the connection threshold adjusted based on user satisfaction to be more suitable for users. Furthermore, it reduces the amount of interaction data, balancing computational speed and thus minimizing resource and power consumption.

[0119] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0120] In some implementations of this application, the specific implementation process of the historical succession transfer score calculation stage corresponding to step S101 can be as follows: Figure 4 As shown.

[0121] See Figure 4 For example, the historical succession transfer score calculation stage may include:

[0122] S1011: Obtain the interaction data of the voice assistant within a preset time period, and process the obtained interaction data.

[0123] Understandably, when users interact with electronic devices using voice assistants, they may engage in single-turn conversations (where the user interacts with the electronic device once after the voice assistant is activated, such as asking about today's weather and then ending the conversation) or multi-turn conversations (where the user interacts with the electronic device multiple times after the voice assistant is activated). The slot continuation provided in this application is designed for multi-turn conversation scenarios. Therefore, after acquiring the interaction data within a preset time period, such as the first time interval, it is necessary to process the acquired interaction data. This includes, for example, extracting multi-turn conversation scenario interaction data from the interaction data, and performing sequence splitting, entity recognition, and regenerating sequences that meet the requirements on the extracted interaction data.

[0124] The specific implementation process of step S1011 can be described as follows: Figure 4 The steps S1011-1 to S1011-5 shown in the figure are described below for specific implementation details.

[0125] S1011-1, Obtain the interaction data of the voice assistant within a preset time period.

[0126] For example, acquiring interaction data of users interacting with electronic devices through voice assistants within a first period (e.g., 3 months).

[0127] The interaction data may include interaction data from multi-turn dialogue scenarios (hereinafter referred to as: multi-turn interaction data) and / or interaction data from single-turn dialogue scenarios (hereinafter referred to as: single-turn interaction data).

[0128] S1011-2, Extract the interaction data of multi-turn dialogue scenarios from the interaction data.

[0129] That is, multiple rounds of interaction data are extracted from the acquired interaction data to ensure that subsequent operations are performed on the multiple rounds of interaction data.

[0130] Taking the obtained interaction data, which includes multi-round interaction data and single-round interaction data, and assuming the interaction data is in JSON format, the obtained interaction data can be as follows: Figure 5 As shown in JSON_1, the multi-round interaction data extracted from JSON_1 can be as follows: Figure 5 As shown in JSON_2.

[0131] Here, "arr" represents an array, and each array stores the interaction data when the user interacts with the electronic device through the voice assistant. Each array can include keys such as "inentCode", "time", and "slot", as well as the values ​​corresponding to these keys.

[0132] Here, "inentCode" is a key that identifies the user's intent, and its corresponding value is the user intent determined based on the user's input.

[0133] Here, "time" is the key that identifies the time, and its corresponding value can be the system time when the user input is received, or a timestamp obtained by processing the system time.

[0134] Here, "slot" is the key that identifies the slot, and it can have one or more values. The specific value is determined based on the key information (slot information) identified from the user input. For example, Figure 5 The information shown includes the "desLocation" key for identifying the location, the "appName" key for identifying the name of the application to be accessed, the "restaurant" key for identifying the restaurant, the "food" key for identifying the food, and the "quantity" key for identifying the quantity.

[0135] In the embodiments of this application, when the array includes one set of "inentCode", "time", and "slot", it indicates that a user intent has been recognized. This can be understood as the user engaging in a dialogue interaction with the electronic device. Therefore, the interaction data in this array can be understood as single-turn interaction data.

[0136] Accordingly, when the array includes multiple sets (at least two sets) of "inentCode", "time", and "slot", it indicates that multiple user intentions have been recognized. This can be understood as the user engaging in multiple dialogue interactions with the electronic device. Therefore, the interaction data in this array can be interpreted as multi-turn interaction data.

[0137] Based on this, the array enclosed in the dashed box in the obtained interaction data JSON_1 can be understood as single-round interaction data. Therefore, after extracting multi-round interaction data from the interaction data JSON_1, the resulting multi-round interaction data JSON_2 does not include the array enclosed in the dashed box from the interaction data JSON_1.

[0138] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In actual use, Figure 5 The values ​​corresponding to the "intentCode" key, such as User Intent_1, User Intent_2, User Intent_3, User Intent_4, User Intent_5, User Intent_6, and User Intent_7, represent specific user intent information. Figure 5 This is just for illustrative purposes.

[0139] Accordingly, the slot keys (hereinafter referred to as slots) included in the "slot" can be one or more, depending on the part of speech of the slot. In some implementations, the part of speech of the slot can be predefined as needed. In this way, after receiving user input, by processing the user input, the slots whose part of speech matches the predefined part of speech of the slot, as well as the value (slot value) corresponding to that slot, can be identified from the user input.

[0140] S1011-3 performs sequence splitting on the interaction data in multi-turn dialogue scenarios, dividing the long sequence into multiple sub-sequences.

[0141] In the embodiments of this application, each array of extracted multi-turn interaction data can be regarded as a long sequence. Since each array of multi-turn interaction data includes multiple sets of "inentCode", "time", and "slot", that is, multiple user intents (or simply intents). Since slot continuation occurs during intent state transition, in order to facilitate the analysis of the same part-of-speech slot associations between multi-turn intents, the long sequence can be split into multiple subsequences according to the principle that a subsequence includes a pair of intents (the user intents corresponding to the two "inentCodes").

[0142] For ease of explanation, the following is combined with Figure 6 An explanation is needed. It should be noted that... Figure 6 The data is represented directly by letters, such as “inentCode”, “time”, and “slot”. The specific user intent, time, and slot information (slot and slot value) are not shown.

[0143] See Figure 6 "origin_data" can be understood as the multi-round interaction data obtained in step S1011-2. For example... Figure 6 As shown, the multi-turn interaction data includes 10 long sequences: (A, B, C), (A, C, D), (A, B, D, E), (A, A, C, B), (A, D, A, F), (B, E, F, C), (C, A), (D, G), (D, C), and (G, A, B). For each long sequence, following the principle that a subsequence contains a pair of intents, these 10 long sequences can be divided into 21 subsequences corresponding to "after_data". For example, the long sequence (A, B, C) is divided into the subsequences (A, B) and (B, C). That is, adjacent pairs of intents are located in one subsequence.

[0144] S1011-4, Entity recognition is performed on each subsequence to determine the slot part-of-speech tagging of each subsequence.

[0145] In this embodiment, different slot part-of-speech tags and entity recognition interfaces (or functional modules, functions, etc.) for identifying these slot part-of-speech tags can be predefined. Thus, by calling the entity recognition interface, the slot part-of-speech tags of each sub-sequence can be determined. That is, by calling the entity recognition interface and performing recognition processing on each sub-sequence, the slot part-of-speech tags in the sub-sequence that are the same as (or match, meaning the similarity meets a set threshold) of the predefined slot part-of-speech tags can be determined.

[0146] In this embodiment, slot part-of-speech refers to the part of speech of the words (slot values) used to fill the slots. In a dialogue system, slots can be composed of different parts of speech, with common parts of speech including nouns, verbs, and adjectives. Based on this, slot part-of-speech can be predefined as noun slots, verb slots, and adjective slots.

[0147] In this context, noun slots are used to help the system understand the specific entities or concepts mentioned by the user. In some implementations, predefined noun slots may include locations (departure point, destination), times, etc.

[0148] Verb slots are used to help the system understand user behavior or actions. In some implementations, predefined verb slots may include things like "book" or "make a phone call".

[0149] In this context, adjective slots are used to help the system understand user attributes or characteristics. In some implementations, predefined adjective slots may include price, category, etc.

[0150] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0151] Furthermore, it should be noted that in the embodiments of this application, the predefined entity recognition interface can be implemented based on Natural Language Understanding (NLU) technology. In this way, by calling the NLU entity recognition interface, the content in the subsequence can be converted into semantics that the machine can understand, thereby accurately understanding the user's intent and identifying the part-of-speech tag of the slot corresponding to the user's intent.

[0152] S1011-5, For each subsequence, assemble and generate a new subsequence based on the determined slot part-of-speech.

[0153] In this embodiment, the regenerated subsequence based on the determined slot part-of-speech can be seen as the original subsequence after removing unnecessary information from the slot continuation. For example, removing time information and generating a subsequence based on user intent and corresponding slot information.

[0154] For example, in some other implementations of this application, the regenerated subsequence is based on the determined part-of-slot tag.

[0155] S1012, according to the intention relationship, merge the new subsequences to obtain a list of subsequences.

[0156] There are 6 sets of interactions on the sequence (A, B). In some implementations, the subsequences regenerated according to steps S1011-5 may include: subsequence (A1, B1), subsequence (A2, B2), subsequence (A3, B3), subsequence (A4, B4), subsequence (A5, B5), subsequence (A6, B6), etc.

[0157] Furthermore, it should be noted that, for ease of differentiation and subsequent backtracking to locate different subsequences, an index value can be assigned to each subsequence when regenerating it. The index values ​​can be in ascending order.

[0158] Since the intention relationships of the above 6 sets of subsequences all belong to the transformation from intention A to intention B, these 6 subsequences can be merged into a subsequence list (or sequence group). This sequence group is, for example: [{(A1, B1), (A2, B2), (A3, B3), (A4, B4), (A5, B5), (A6, B6)}].

[0159] S1013, calculate the hidden continuation concentration score corresponding to the subsequence list.

[0160] Implicit continuation concentration can be understood as the user's potential interest in continuing the connection request during a multi-turn interaction and slot-filling process with a single intent. The higher the implicit continuation concentration score, the higher the user's potential interest in continuing the connection request, i.e., the more they expect automatic connection.

[0161] In this context, single-intent multi-turn interaction can be understood as multiple turns of interaction corresponding to the same user intent.

[0162] In this embodiment of the application, the number of follow-up questions for the corresponding intent (the number of subsequences included in the subsequence list) and the slot supplement value (the difference between the number of slots included in the last interaction and the number of slots included in the first interaction) can be determined according to the subsequence list. Then, the number of follow-up questions for the corresponding intent and the slot supplement value can be determined according to the subsequence list, and the implicit continuation concentration score can be calculated.

[0163] For example, in some implementations, the number of follow-up questions for the corresponding intent and the slot supplement value can be determined based on the subsequence list, and the implicit continuation concentration score can be calculated according to formula (1).

[0164]

[0165] Where Pinterst represents the latent facultative concentration score; N x The number of follow-up questions for the intent corresponding to the subsequence list is indicated; Δx represents the slot replenishment difference; k is a smoothing factor (greater than 0, can be 1), used to ensure that Pinterst will not be infinite when Δx = 0.

[0166] S1014, calculate the part-of-speech overlap score corresponding to the subsequence list.

[0167] In this context, part-of-speech overlap can be understood as the probability that two intentions share the same part of speech during an intention state transition. A higher part-of-speech overlap score indicates a higher probability that the two intentions share the same part of speech, and a higher probability that they need to be followed by another intention.

[0168] In this embodiment of the application, the number of parts of speech in the slot corresponding to the slot before the intent state transition and the number of parts of speech in the slot corresponding to the slot after the intent state transition can be determined according to the sub-sequence list, as well as the number of parts of speech in the same slot in the two intents. Then, the part of speech overlap score is calculated based on these three values.

[0169] For example, in some implementations, the part-of-speech overlap score can be calculated based on these three values ​​according to formula (2).

[0170]

[0171] Wherein, Pcoincide represents the part-of-speech overlap score; Ncurslots represents the number of parts of speech in the slot corresponding to the intent state transition; Npreslots represents the number of parts of speech in the slot corresponding to the intent state transition; and Ncoincide represents the number of parts of speech in the slot that are the same in two intents.

[0172] Understandably, since the same slot part-of-speech exists in both intents, it is present in both Ncurslots and Npreslots. Therefore, it is necessary to multiply Ncoincide by 2, i.e., use 2Ncoincide as the numerator.

[0173] It should be noted that, in this embodiment, the execution order of steps S1013 and S104 is not limited. That is, step S1013 can be executed first, followed by step S1014. Alternatively, step S1014 can be executed first, followed by step S1013. Furthermore, if multitasking is supported, steps S1013 and S1014 can be executed simultaneously.

[0174] S1015, based on a reinforcement learning strategy, strengthens the successive transfer weights.

[0175] In the embodiments of this application, the reinforcement learning strategy can be based on a reward and punishment system.

[0176] Correspondingly, the reinforcement learning strategy based on the reward and punishment system can strengthen the continuation transition weight by increasing the reward threshold for successful continuation transition weight in the same part-of-speech scenario when the intention state changes, and decreasing the penalty threshold for failed continuation transition weight.

[0177] The threshold can be set to 1. That is, when the intent state changes, the weight of the successful continuation transition in the same part-of-speech scenario is increased by 1, while the weight of the failed continuation recognition is decreased by 1.

[0178] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In practical applications, the set threshold can be greater than or less than 1.

[0179] S1016. Calculate the historical succession score corresponding to the subsequence list based on the hidden succession concentration score, part-of-speech overlap score, and succession transition weight.

[0180] The continuity transfer score indicates whether slot continuity is required during intent state transitions. Generally, a higher continuity transfer score indicates a higher probability that slot continuity is needed.

[0181] In the embodiments of this application, the continuation transfer score can be calculated based on the implicit continuation concentration score, the part-of-speech overlap score, and the continuation transfer weight.

[0182] For example, in some implementations, the continuation transfer score can be calculated according to formula (3) based on the implicit continuation concentration score, the part-of-speech overlap score, and the continuation transfer weight.

[0183]

[0184] Wherein, Score(AB) represents the continuation transition score when transitioning from intent A to intent B; Pinterst represents the implicit continuation concentration score; Pcoincide represents the part-of-speech overlap score; NContinue*(±1) represents the continuation transition weight obtained by reinforcement learning based on the number of successful continuation slot pairs (NContinue); and n represents the number of slots of the same entity type when transitioning from intent A to intent B.

[0185] In this embodiment of the application, whether slot continuation is successful can be determined based on Jaccard (Jaccard index) by judging the relationship between the similarity of entities (e.g., slots) and the current continuation threshold.

[0186] For example, in some implementations, similarity can be obtained according to formula (4).

[0187]

[0188] Where SIM represents the defined similarity; A represents the number of slots corresponding to intent A; B represents the number of slots corresponding to intent B; A∩B represents the size of the intersection of A and B; and A∪B represents the size of the union of A and B.

[0189] For the determination of the connection threshold, please refer to the embodiment section of formula (7) and formula (8) below, which will not be elaborated here.

[0190] In this embodiment, when the SIM determined according to formula (3) is greater than the current connection threshold setting, such as 50%, the slot connection can be considered successful. Otherwise, it is unsuccessful. Based on this principle, the SIM is determined by formula (4), and then by comparing the SIM with the current connection threshold, it can be determined whether the slot connection is successful, thereby obtaining the number of successful slot pairs (NContinue). Finally, the connection transfer weight is obtained by performing reinforcement learning on NContinue.

[0191] Furthermore, it is understandable that the historical continuation transfer score (which can also be described as the first continuation transfer score) can be understood as the continuation transfer score determined based on the implicit continuation concentration score, part-of-speech overlap score, and the number of successfully connected slot pairs determined based on historical multi-turn interaction data. The current continuation transfer score (which can also be described as the second continuation transfer score) appearing in subsequent embodiments can be understood as the continuation transfer score determined based on the implicit continuation concentration score, part-of-speech overlap score, and the number of successfully connected slot pairs determined based on the user's current input. That is, the historical continuation transfer score is used to describe the continuation transfer score of previous multi-turn dialogue scenarios. The current continuation transfer score is used to describe the continuation transfer score of the current interaction.

[0192] Therefore, through Figure 4 The implementation details shown demonstrate the completion of the historical transfer score calculation stage, resulting in the acquisition of the historical transfer score.

[0193] Furthermore, in this embodiment, to facilitate subsequent slot continuation processing, the historical continuation transfer score corresponding to each subsequence can be saved. Moreover, to clarify the relationship between these historical continuation transfer scores and the subsequences, the corresponding subsequences can also be stored together when storing the historical continuation transfer scores.

[0194] For example, in some implementations, these historical successive transfer scores and corresponding subsequences can be stored using a map, an array, a matrix, or other forms. For ease of explanation, this application embodiment uses a matrix as an example (hereinafter referred to as: successive transfer score matrix).

[0195] See also Figure 3 For example, in the stage corresponding to step S102 (historical continuation transfer score verification stage), feedback verification can be performed on the historical continuation transfer score to obtain user satisfaction.

[0196] In this embodiment, user satisfaction can be understood as the user's satisfaction with the autonomous continuation behavior of electronic devices in multi-turn dialogue human-computer interaction scenarios. Currently, multi-turn dialogue scenarios default to using a large model with natural language understanding (hereinafter referred to as: Natural Language Understanding Large Model) for slot continuation. Therefore, after introducing the slot continuation method provided in this embodiment, the main focus is on whether to consider slot continuation in scenarios where the large model deems it unnecessary. Thus, by assessing the user's satisfaction with the continuation of slots after the large model determines that slot continuation is unnecessary, but the slot continuation is performed based on the method provided in this embodiment (which can be encapsulated as a slot continuation module), the system can determine whether to update slots with the same or similar intents subsequently, i.e., whether to perform slot continuation.

[0197] To achieve user satisfaction, in this embodiment of the application, slot continuation data generated using the slot continuation method provided in this embodiment can be tagged with continuation labels. By analyzing the similarity between the intent and slot information in the sub-sequences corresponding to these tagged interaction data, the number of slot continuations that the user is satisfied with (hereinafter referred to as: slot continuation satisfaction count) or the number of slot continuations that the user is dissatisfied with (hereinafter referred to as: slot continuation dissatisfaction count) can be determined. Finally, based on the determined number of slot continuation satisfaction counts or dissatisfaction counts, the user's satisfaction with these self-continuation behaviors can be determined.

[0198] Based on the above logic, in some implementations of this application, the specific implementation process of the historical succession transfer score verification stage corresponding to step S102 can be as follows: Figure 7 As shown.

[0199] See Figure 7 For example, the historical succession transfer score verification stage may include:

[0200] S1021, traverse all subsequence lists and determine whether the number of subsequences with added continuation tags is greater than or equal to M.

[0201] The traversed subsequence can be within a preset time period. In some implementations, this preset time period can be the same as the preset time period mentioned in step S1011. For example, if the preset time period in step S1011 is 3 months, the traversed subsequence in step S1021 should also be the subsequence corresponding to the multi-round interaction data within the most recent 3 months.

[0202] Among them, the subsequences with added continuation tags can be understood as subsequences that the natural language understanding model determined did not need to be continuated, but were continuated by the slot continuation module.

[0203] In other words, after the slot continuation module processes the subsequences that have undergone slot continuation, the slot continuation module will automatically add a continuation tag to the subsequence.

[0204] M can be the same as the preset time mentioned above. For example, if the preset time is 3 months, or 90 days, M can be set to 90. If the preset time is 30 days, M can be set to 30.

[0205] M can also be different from the preset time mentioned above. The specific value can be set according to business needs.

[0206] Generally, the larger the amount of data used for verification, i.e., M, the more accurately the verification results reflect user behavior habits. However, considering that the timeliness of follow-up will be adjusted based on user satisfaction in subsequent step S103, a compromise value can be set for M.

[0207] For ease of explanation, this application uses 30 as an example in its embodiments. See also... Figure 7 For example, after traversing all subsequences within a preset time period, if the number of subsequences with added continuation tags is greater than or equal to 30, step S1022 can be executed; otherwise, no processing is performed, and the process waits for the next statistical period, that is, after a preset time from the current time, step S1021 is executed again.

[0208] S1022, if the number of subsequences with added continuation tags is greater than or equal to a set threshold, obtain M subsequences with added continuation tags.

[0209] For example, in some implementations, the M subsequences with added continuation tags closest to the current time can be obtained in chronological order. That is, starting from the deadline, find the M consecutive subsequences with added continuation tags.

[0210] For example, in some other implementations, the M subsequences with added continuation tags that are furthest from the current time can also be obtained in chronological order. That is, starting from the start time, find the M consecutive subsequences with added continuation tags.

[0211] For example, in some other implementations, M subsequences with added continuation tags can also be obtained according to other rules.

[0212] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0213] S1023, based on the continuation labels, obtain the index values ​​corresponding to these M subsequences.

[0214] In this embodiment, when processing multi-round interactive data, such as performing steps S1011-3 and S1011-5, a corresponding index value is added to each subsequence. Therefore, in some implementations, when adding continuation tags, a direct relationship can be established between the continuation tags and the corresponding index values ​​of the subsequences. In this way, based on the relationship between the continuation tags and the index values, the index values ​​corresponding to the M subsequences for which continuation tags have been added can be obtained.

[0215] S1024, based on the index value corresponding to each subsequence, obtain the successor subsequence of that subsequence.

[0216] Here, the successor subsequence can be understood as the subsequence that follows the current subsequence. Or, it can be described as the subsequence whose index value is greater than that of the current subsequence.

[0217] Understandably, the index values ​​are unique. Therefore, based on the index values ​​corresponding to these M subsequences, it is possible to trace back to the successor subsequence of each subsequence with a continuation label.

[0218] S1025, for each subsequence, determine whether it has the same intent as the subsequent subsequence.

[0219] Understandably, subsequences may include intent information, time information, slot information, etc.

[0220] Furthermore, it is understandable that if the user intents of two adjacent subsequences are different or their similarity is less than a set threshold, it indicates that the subsequent human-computer interaction is a new dialogue interaction, and the user acknowledged the previous self-continuation behavior without further clarification. In this case, the user is more likely to be satisfied with the self-continuation behavior.

[0221] Therefore, in this embodiment, for each subsequence, by determining whether the intent of the subsequent subsequence is the same as the intent of the current subsequence, if they are different, it can be directly assumed that the user is satisfied with this self-continuation behavior, and the number of satisfied slot continuation attempts can be incremented by 1 or the number of dissatisfied slot continuation attempts can be decremented by 1, i.e., step S1027 is executed. Conversely, if the intents of two adjacent subsequences are the same, it is further determined whether the slot information of these two subsequences is the same, i.e., step S1026 is executed. Then, based on the determination result, it is decided whether to execute the operation of step S1027 or ignore this data, i.e., do not process it.

[0222] S1026, determine whether the slot information of two sub-sequences with the same intention is the same.

[0223] For example, in some implementations, if the similarity of slot information in two adjacent sub-sequences is greater than or equal to a set threshold, and if a set proportion of slots have the same part of speech, then it can be determined that the slot information of the two sub-sequences with the same intent is identical. In this case, the electronic device may automatically continue the conversation, and after responding / providing feedback, the user may provide further explanation based on the feedback, such as stating dialogue content that can extract more slot information. Therefore, this automatic continuation behavior can also be considered successful. Thus, if it is determined that the slot information of two sub-sequences with the same intent is identical, step S1027 can be executed. Otherwise, no processing is required.

[0224] S1027, Number of satisfactory slot connection attempts +1 / Number of unsatisfactory slot connection attempts -1.

[0225] In this embodiment of the application, the number of satisfactory slot connection counts in step S1027 can be set as needed, or the number of unsatisfactory slot connection counts can be set as needed.

[0226] For the implementation that counts the number of satisfied users for slot continuation, the initial value of the slot continuation satisfaction count can be set to 0. This way, for each subsequence with a continuation tag verified, the slot continuation satisfaction count can be incremented by 1, or no action can be taken. Finally, after verifying M subsequences with added continuation tags, the number of times the user was satisfied with the slot continuation for these M self-continuation actions can be counted.

[0227] Accordingly, for the implementation that counts the number of unsatisfactory slot continuation attempts, the initial value of the number of unsatisfactory slot continuation attempts can be set to M. This way, for each subsequence with an added continuation tag, the number of satisfactory slot continuation attempts can be decremented by 1, or no action can be taken. Finally, after validating M subsequences with added continuation tags, the number of times the user was dissatisfied with the slot continuation for these M self-continuation attempts can be counted.

[0228] S1028, determine the user satisfaction with M self-service connection actions based on the number of satisfied connection attempts / the number of dissatisfied connection attempts.

[0229] For example, when the number of slot connection satisfactions is counted in step S1027, formula (5) can be used to determine the user satisfaction with M autonomous connection behaviors based on the number of slot connection satisfactions in step S1028.

[0230] For example, when the number of unsatisfactory slot connection counts in step S1027, formula (6) can be used to determine the user satisfaction with M autonomous connection behaviors based on the number of unsatisfactory slot connection counts in step S1028.

[0231]

[0232] Where Psatisfy represents the user's satisfaction with M autonomous connection attempts; Nsatisfy represents the number of times the slot connection was satisfactory from these M autonomous connection attempts; and Ndiffer represents the number of times the slot connection was unsatisfactory from these M autonomous connection attempts.

[0233] Therefore, through Figure 7 The implementation details shown demonstrate the completion of the historical succession score verification phase, resulting in user satisfaction.

[0234] Understandably, in some implementations, when obtaining user satisfaction and performing the follow-up threshold adjustment phase, the obtained user satisfaction and related data involved in calculating user satisfaction can be stored for subsequent maintenance and use.

[0235] For example, user satisfaction, and related data involved in calculating user satisfaction, can be stored in the form of a data table. In this embodiment of the application, the data table storing the above data (hereinafter referred to as: user satisfaction data table) can store the value of the preset M corresponding to each calculation cycle, the start time and end time of the calculation cycle, the duration of the calculation cycle, the actual number of autonomous connection attempts in the calculation cycle, the statistical number of slot connection satisfaction attempts (Nsatisfy) and / or the statistical number of slot connection dissatisfaction attempts (Ndiffer), and the finally calculated user satisfaction (Psatisfy).

[0236] For example, in some implementations, such as when there are multiple records of user satisfaction data, each record can be labeled for easy differentiation.

[0237] For ease of understanding, the following explanation is based on Table 1.

[0238] Table 1 User Satisfaction Data

[0239] serial number Threshold M Start time Deadline cycle Number of times of autonomous continuation Nsatisfy Psatisfy 1 30 T_1 T_2 30 30 25 83.3% 2 30 T_3 T_4 30 50 25 83.3% 3 … … … … … … …

[0240] For example, since the M value for both user satisfaction data points numbered 1 and 2 in Table 1 is 30, even if the number of autonomous continuations for the two user satisfaction data points is different (one is 30 and the other is 50), the number of autonomous continuation subsequences obtained when calculating user satisfaction is still M. Therefore, when the Nsatisfy values ​​for the two user satisfaction data points are the same, the final calculated Psatisfy values ​​are the same.

[0241] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0242] See also Figure 3 For example, in the stage corresponding to step S103 (the stage of adjusting the continuity threshold), the continuity threshold can be adaptively adjusted according to user satisfaction.

[0243] In this embodiment of the application, the adaptive adjustment of the connection threshold based on user satisfaction can be to raise or lower the connection threshold, thereby increasing or suppressing the connection decision.

[0244] Furthermore, it is understandable that, based on user satisfaction, the initial adjustment to the connection threshold may be an adjustment to the pre-set initial value. Subsequent adjustments to the connection threshold will be made based on the connection threshold obtained after the previous adjustment.

[0245] In this embodiment of the application, the initial value of the continuation threshold can be determined based on the continuation transfer scores corresponding to all known sequence groups and the preset exposure probability.

[0246] For example, in some implementations, the succession transfer scores corresponding to all known sequence groups are, for example, the historical succession transfer scores corresponding to all sequence groups obtained in step S101.

[0247] For example, in some implementations, the initial value of the succession threshold can be calculated according to formula (7) based on the succession transfer scores corresponding to all known sequence groups and the preset exposure probability.

[0248]

[0249] Where, Vinit represents the initial value of the continuation threshold; Score represents the continuation transition score corresponding to a known sequence group; n represents the number of sequence groups with known continuation transition scores; represents the mean of the successive transition scores for all known sequence groups; m represents the preset exposure probability.

[0250] For example, in some implementations, m can be determined based on known data analysis, and can generally be defined as 20%.

[0251] For example, in some implementations, when adjusting the current connection threshold based on the user satisfaction obtained in step S102, given that the current connection threshold is known, the decision to raise or lower the connection threshold can be made by comparing the relationship between the user satisfaction and a preset user satisfaction benchmark value.

[0252] Specifically, if user satisfaction exceeds the user satisfaction benchmark, the connection threshold is lowered. Conversely, if user satisfaction is lower, the connection threshold is raised.

[0253] For example, in some implementations, the adjustment of the continuity threshold can be achieved according to formula (8) based on user satisfaction and a preset user satisfaction benchmark value.

[0254] Vafter=Vbefore*(1-Psatisfy+Pspec) formula (8)

[0255] Where Vafter represents the connection threshold adjusted based on user satisfaction; Vbefore represents the current connection threshold; Psatisfy represents the user satisfaction obtained in step S102; and Pspec represents the user satisfaction baseline value.

[0256] Pspec can be set as needed. For example, when it's desired to initiate automatic connection as quickly as possible, Pspec can be set to a lower value. This way, Psatisfy is likely to be greater than Pspec, and the connection threshold will be lowered. In other words, Vafter is smaller, which ensures that the subsequent connection transfer score determined based on user input is as greater as possible than Vafter, thereby triggering slot connection.

[0257] Conversely, if Pspec is set to a high value, Psatisfy will likely be less than Pspec. This will raise the continuation threshold. In other words, a larger Vafter will likely result in the subsequent continuation transfer score determined based on user input being less than Vafter, thus suppressing slot continuation.

[0258] It should be noted that after defining the initial value of the connection threshold, when adjusting the connection threshold for the first time, Vbefore can be understood as the initial value of the connection threshold set according to formula (7), which is Vinit. After adjusting Vinit according to user satisfaction, when adjusting the connection threshold again, Vbefore is the Vafter obtained from the previous adjustment according to formula (8).

[0259] Furthermore, it should be noted that to prevent the connection threshold from being set too high, some implementations can also set a safety net value for the connection threshold. This safety net value can be specified to not exceed the average value. b%. Where b∈(130, 150). That is, in the embodiments of this application, Vafter does not exceed the mean b%.

[0260] This completes the operation of the continuation threshold adjustment phase, achieving adaptive adjustment of the continuation threshold. That is, it can adaptively adjust the continuation threshold based on user satisfaction statistics collected in each period, thus ensuring that the continuation threshold used in subsequent slot continuation processing is more suitable for the current interaction scenario.

[0261] For example, after obtaining the continuation transfer score matrix in the stage corresponding to step S101 and the adjusted continuation threshold in the stage corresponding to step S103, upon receiving user input, it can be determined whether slot continuation is needed based on the user's current input content, according to the continuation transfer score matrix and the continuation threshold. That is, the decision on whether to continue is made based on the continuation transfer score matrix and the continuation threshold.

[0262] For example, in some implementations, the specific implementation process for deciding whether to continue based on the succession transfer score matrix and the succession threshold can be as follows: Figure 8 As shown.

[0263] See Figure 8 The diagram illustrates a process for slot connection, specifically including:

[0264] S201, Determine the continuity transfer score of the user's current input content based on the continuity transfer score matrix.

[0265] For example, in some implementations, after receiving the user's current input (such as voice or text), the voice assistant can invoke a large natural language understanding model to convert the current input into a semantic representation that the machine can understand. That is, it identifies intent information, slot information, etc., from the current input and processes it into a sequence group including intent and slot information according to the processing methods in steps S1011 and S1012.

[0266] Since the continuation transition score matrix records different subsequences containing different intent and slot information, along with their corresponding continuation transition scores, a traversal of the continuation transition score matrix based on the subsequences in the sequence group corresponding to the current input content can find the matching subsequence and its corresponding continuation transition score. Thus, the found continuation transition score can be determined as the continuation transition score of the current input content.

[0267] For example, in some other implementations, if the successive transition score of the current input content is not found in the successive transition score matrix, the successive transition score of the current input content can also be determined according to the processing method of steps S1013 to S1016.

[0268] S202, determine whether slot connection is required based on the transfer score and connection threshold.

[0269] In this embodiment of the application, it can be determined whether slot continuation is required by comparing the continuation transfer score corresponding to the current input content with the continuation threshold.

[0270] For example, in some implementations, a slot continuation can be determined when the continuation transfer score corresponding to the current input content is greater than or equal to a continuation threshold. Otherwise, slot continuation is determined not to be performed.

[0271] For example, in some other implementations, a slot continuation can be determined when the continuation score corresponding to the current input content is greater than a continuation threshold. Conversely, if the score is less than a threshold, slot continuation is not required.

[0272] For example, in some other implementations, a slot continuation can be determined if the continuation transfer score corresponding to the current input content is greater than a continuation threshold setting (or proportion). Conversely, if the score is less than a certain value, slot continuation is not required.

[0273] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0274] This allows for the decision of whether to continue.

[0275] For example, if it is determined that slot continuation is needed, the continuation range can be decided, such as by executing step S203. Conversely, if it is determined that slot continuation is not needed, the current input content can be stored directly.

[0276] S203, based on the slot entity type and slot score evaluation matrix corresponding to the current input content, determine the slot information that needs to be continued.

[0277] The construction of the slot score evaluation matrix can be found in the section on decision succession range below, and will not be elaborated here.

[0278] In this embodiment of the application, there can be multiple slot score evaluation matrices. The number of slot score matrices is related to the number of slot part-of-speech categories (slot entity types) determined based on multi-turn dialogue data from historical multi-turn dialogue scenarios.

[0279] For example, in some implementations, each slot entity type can correspond to a slot score evaluation matrix.

[0280] Understandably, for any slot entity type, the slot score evaluation matrix records the transfer score of the slots of the same entity type during the process of moving from one intention (e.g., intention A) to another intention (e.g., intention B).

[0281] Therefore, when deciding on the succession range, the slot score evaluation matrix to be searched is determined based on the slot entity type corresponding to the current input content. Then, the highest transfer score is found in the determined slot score evaluation matrix, and the slot information corresponding to the transfer score is used as the succession slot information.

[0282] Taking two slots corresponding to the location type of Intent A, such as slot1 and slot2, as an example, the existing slot score evaluation table for location types records the transfer score when slot1 of Intent A is automatically transferred to slot1 of Intent B (e.g., Score(Aslot1-Bslot1) = 0.4), the transfer score when slot1 of Intent A is automatically transferred to slot2 of Intent B (e.g., Score(Aslot1-Bslot2) = 0), and the transfer score when slot2 of Intent A is automatically transferred to slot2 of Intent B (e.g., Score(Aslot1-Bslot2) = 0). 2-Bslot2)=1), and the transition score from slot2 of intent A to slot1 of intent B (e.g., Score(Aslot2-Bslot1)=0.6). If it is known from the context and the current input content that this dialogue interaction is a transition from intent A to intent B, then in the case that the slots of the location type corresponding to intent A are the above slot1 and slot2, by querying the slot score evaluation matrix, the highest transition score is determined to be Score(Aslot2-Bslot2). Therefore, the final determined slot information is the slot and slot value of slot2, etc.

[0283] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0284] S204: Based on the subsequent slot information, respond or perform an operation, add a continuation tag to the current input content, and store it.

[0285] Understandably, when using the slot continuation method provided in this application embodiment, after self-continuation, in order to facilitate subsequent updates of user satisfaction based on the data and thereby adjust the continuation threshold, it is necessary to add continuation tags to the current input content before storing it.

[0286] Therefore, in scenarios where large-scale natural language understanding models do not require slot continuation, the slot continuation method provided in this application provides a way to achieve slot continuation, making human-computer dialogue more coherent and accurate, and improving the user experience.

[0287] (2) The following is about the scope of decision succession:

[0288] In this embodiment, the decision continuation range can be understood as resolving the mapping relationship between slots with different parts of speech between intents, and then constructing a slot score evaluation matrix corresponding to different parts of speech based on the obtained mapping relationship. In this way, when the decision requires continuation, the appropriate continuation range for the current scenario can be determined based on the slot score evaluation matrix, thereby making the dialogue more coherent and accurate after slot continuation.

[0289] The specific implementation process for determining the slot and slot mapping relationship between different slot parts of speech between intents, and then constructing the slot score evaluation matrix corresponding to different slot parts of speech based on the obtained mapping relationship, can be as follows: Figure 9 As shown.

[0290] S301, cluster the interaction data of historical multi-turn dialogue scenarios according to the part of speech of the slot, and process the interaction data of historical multi-turn dialogue scenarios into groups with the same part of speech.

[0291] Specifically, the source data processed in step 301 can be the new subsequences generated in steps S1011-5. Therefore, the interaction data of historical multi-turn dialogue scenarios are clustered according to slot part-of-speech tags. For example, to call the NLU entity recognition interface mentioned above, entity recognition is performed on each subsequence generated in steps S1011-5 to determine the slot part-of-speech tag of each subsequence. Then, according to the slot part-of-speech tags, the subsequences with the same slot part-of-speech tags in these subsequences are divided into a class or cluster (hereinafter referred to as: same part-of-speech group).

[0292] Understandably, after clustering the interaction data of historical multi-turn dialogue scenarios according to slot parts of speech, the resulting groups of the same part of speech correspond to different slot parts of speech. In other words, the slot parts of speech (slot entity type) of each group of the same part of speech is different.

[0293] Furthermore, understandably, in order to determine the mapping relationship between slots and slots of different parts of speech between intents, each subsequence in the same part of speech group includes intent information and slot information.

[0294] To better understand step S301, the following will be combined with... Figure 10 Please provide a detailed explanation.

[0295] See Figure 10 For example, after processing in step S1011 of the above embodiments, the multi-turn interaction data can be clustered according to the part-of-slot (POS) of the historical multi-turn dialogue scenarios. This allows the intents of different POS in different slots to be segmented into groups with the same POS in different slots. For instance, if slots 1 and 2 are time-related POS, the intents of slots 1 and 2 can be segmented into the same sequence group, such as intent A1 corresponding to slots 1 and 2, intent A2 corresponding to slots 1 and 2, and intent A3 corresponding to slot 1, etc. Thus, groups with the same POS corresponding to time-related POS are obtained.

[0296] See also Figure 10 For example, if the subsequence corresponding to the multi-round interaction data also includes slot parts of speech such as location and people (entity slot type), then the slots with location parts of speech and the corresponding intents can be further divided into groups of the same parts of speech corresponding to location parts of speech, and the slots with people parts of speech and the corresponding intents can be divided into groups of the same parts of speech corresponding to people parts of speech.

[0297] by Figure 10 Taking the example of the same part-of-speech group corresponding to the time-related part-of-speech, in some implementations, the same part-of-speech group corresponding to the time-related part-of-speech can be as follows: {"timeScope":[{"intentCode":"intentA1","slot":["slot1","slot2"]}, {"intentCode":"intentA2","slot":[slot1","slot2"]}, {"intentCode":"intentA3","slot":["slot1"]}]}.

[0298] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0299] S302, for each subsequence within the same part-of-speech group, determine the slot hit relationship within each subsequence.

[0300] For example, in some implementations, intent and slot can be separated according to slot part-of-speech, serving as state elements. That is, when processing slot match relationships, (slot part-of-speech, intent, slot) is used as the processing unit. For example Figure 10 As shown, the state elements corresponding to time-related parts of speech can include "Intent A1 + Slot 1", "Intent A1 + Slot 2", "Intent A2 + Slot 1", "Intent A2 + Slot 2", "Intent A3 + Slot 1", etc.

[0301] Furthermore, it should be noted that in the embodiments of this application, the slot hit relationship within each subsequence is the mapping relationship between slots. In some implementations, the slot hit relationship can record the succession relationship of different processing units (state elements) under the same slot part of speech. For example, the slot before the transfer, the slot to be transferred, and the similarity between the two slots (determined according to formula (4)).

[0302] To facilitate understanding, the following explanation is illustrated with examples.

[0303] For example, the subsequence (A, B) is split into slots according to the location-based part-of-speech, resulting in subsequences including (A1slot1, A2slot1), (A1slot1, A2slot2), (A1slot1, A2slot1), (A1slot1, A3none), (A1slot1, A2slot1), (A1slot2, A2slot2), (A1slot1, A2slot1). Furthermore, according to formula (4), the similarity between two slots in each subsequence is determined as follows: Taking 0.7, 0.6, 0.2, 0, 0.3, 1, 1 as an example, the slot hit relationship of these 7 sub-sequences can be determined as follows: [(A1slot1, A2slot1, 0.7), (A1slot1, A2slot2, 0.6), (A1slot1, A2slot1, 0.2), (A1slot1, A3none, 0), (A1slot1, A2slot1, 0.3), (A1slot2, A2slot2, 1), (A1slot1, A2slot1, 1)].

[0304] It should be noted that A3none indicates that no slots with the same part of speech were extracted, therefore the similarity between A1slot1 and A3none is 0.

[0305] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0306] S303, For each group of words with the same part of speech, determine the slot score evaluation matrix corresponding to the group of words with the same part of speech based on the current continuation threshold and the slot hit relationship in each subsequence within the group of words with the same part of speech.

[0307] Among them, for each slot score evaluation matrix corresponding to the same part of speech, the transfer score of slots between different intentions under the part of speech of that slot can be recorded.

[0308] For example, in some implementations, the above information (transfer scores between slots with different intents under the same slot part of speech) can also be stored using a map, an array, or other forms.

[0309] The transfer score between slots with different intentions can be calculated according to formula (8).

[0310]

[0311] Where SIM represents similarity; Threshold represents continuation threshold; Stransfer represents the calculated transfer score; and n represents the number of target objects in the slot hit relationship corresponding to the current slot part of speech to be determined.

[0312] It should be noted that, in the embodiments of this application, the target object can be understood as a subsequence that moves from one intention slot to another intention slot.

[0313] Taking the calculation of the transfer score from Aslot1 to Bslot1 for location-related parts of speech as an example, n represents the number of (Aslot1, Bslot1) records in the location-related part-of-speech slot hit relation.

[0314] Taking the location-based part-of-speech slot hit relation as an example, the content recorded includes [(Aslot1, Bslot1, 0.7), (Aslot1, Bslot2, 0.6), (Aslot1, Bslot1, 0.2), (Aslot1, Bnone, 0), (Aslot1, Bslot1, 0.3), (Aslot2, Bslot2, 1), (Aslot1, Bslot1, 1)], then n = 4. The four processing units used to calculate the transfer score from Aslot1 to Bslot1 are (Aslot1, Bslot1, 0.7), (Aslot1, Bslot1, 0.2), (Aslot1, Bslot1, 0.3), and (Aslot1, Bslot1, 1).

[0315] Taking a threshold of 0.5 as an example, based on formula (9), the transfer score (Score(Aslot1-Bslot1)) from Aslot1 to Bslot1 in the above example can be determined to be 0.4. The specific calculation process is as follows:

[0316]

[0317] As can be seen from the above calculation process, when determining the transfer score of the target object according to formula (9), weighting is performed for cases where the similarity is higher than the continuation threshold, and weighting is performed for cases where the similarity is lower than the continuation threshold.

[0318] Therefore, based on the above formula (9), the transfer score of all possible target objects in the same part of speech group corresponding to each slot can be determined, and the slot score evaluation matrix, or mapping table, or array corresponding to the same part of speech group can be obtained.

[0319] Taking the slot score evaluation matrix as an example, in some implementations, the slot score evaluation matrix corresponding to the same part-of-speech group can be formatted as follows:

[0320]

[0321] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0322] In this way, when a decision requires continuation, the corresponding slot score evaluation matrix of the same part of speech is found based on the slot part of speech of the current input content. Finally, the slot information with the highest continuation score is selected from the found slot score evaluation matrix as the final continuation range to achieve slot continuation.

[0323] Based on the above description of the embodiments regarding whether to continue the decision and the scope of decision continuation, it can be seen that when the slot continuation method provided in this application is applied to a multi-turn dialogue scenario, the overall implementation process can be as follows: Figure 11 As shown.

[0324] about Figure 11 For detailed implementation of steps S1011-1 to S1011-5, S1012 to S1016, S1021 to S1028, S103, S201 to S204, and S301 to S303 in step S1011, please refer to [link to relevant documentation]. Figure 3 , Figure 4 , Figure 7 , Figure 8 , Figure 9 The description of the illustrated embodiment will not be repeated here.

[0325] Furthermore, it should be noted that in some implementations, the slot connection method provided in this application embodiment can be implemented independently by the electronic device performing human-computer interaction. That is, the connection transfer score matrix and the slot score evaluation matrix, as well as the subsequent operations of using the connection transfer score matrix and the slot score evaluation matrix to determine whether to perform slot connection based on the current user input content, and the connection range, are all implemented independently by the electronic device.

[0326] In other implementations, the slot continuation method provided in the application embodiments can be jointly implemented by an electronic device for human-computer interaction and a server. Specifically, the continuation transfer score matrix and the slot score evaluation matrix can be implemented by the server, while the subsequent operation of using the continuation transfer score matrix and the slot score evaluation matrix to determine whether to perform slot continuation based on the current user input and the continuation range is implemented by the electronic device. For this implementation, the electronic device (e.g., Figure 12 The mobile phone 100 can proactively send historical multi-round interaction data within a set time period to the server 200, or it can send the data back to the server 200 after receiving a request from the server 200. Based on the historical multi-round interaction data, the server 200 can determine the succession transfer score matrix and the slot score evaluation matrix according to steps S101 to S103 and S301 to S303. Correspondingly, after receiving the succession transfer score matrix and slot score evaluation matrix determined by the server 200 based on the historical multi-round interaction data, the electronic device can, in subsequent multi-round dialogue scenarios, use the succession transfer score matrix and the slot score evaluation matrix according to the processing logic of steps S201 to S204 to determine whether to perform slot succession based on the current user input content, and the succession range.

[0327] Understandably, for methods requiring cooperation between electronic devices and servers, the server can use historical multi-turn interaction data from different electronic devices as sample data to construct a suitable initial transition score matrix and initial slot score evaluation matrix. In this way, when all electronic devices sold to users do not generate historical multi-turn interaction data, or when the generated historical multi-turn interaction data does not meet the conditions for generating the transition score matrix and slot score evaluation matrix, they can first use the initial transition score matrix and initial slot score evaluation matrix in a multi-turn dialogue scenario to determine whether to perform slot continuation based on the current user input, and the range of continuation. Once the electronic device generates historical multi-turn interaction data, or when the generated historical multi-turn interaction data meets the conditions for generating the transition score matrix and slot score evaluation matrix, the electronic device can individually update the initial transition score matrix and initial slot score evaluation matrix based on the historical multi-turn interaction data generated during use, thereby obtaining a transition score matrix and slot score evaluation matrix suitable for that electronic device, achieving device-specific and user-specific tailoring.

[0328] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0329] Furthermore, it should be noted that in some implementations, the electronic device used to implement the slot connection method provided in the embodiments of this application can be a mobile phone, tablet computer, wearable device, smart home appliance, or other device capable of human-computer interaction.

[0330] The hardware structure of the electronic device implementing the slot connection method provided in the embodiments of this application can be as follows: Figure 13 As shown.

[0331] See Figure 13 The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0332] The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, etc.

[0333] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc., which will not be listed here, and this application does not impose any restrictions on them.

[0334] The processor 110 may include one or more processing units, which may be independent devices or integrated into one or more processors.

[0335] For example, in some implementations, processor 110 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural network processing unit (NPU), etc., which will not be listed here, and this application does not limit them.

[0336] The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0337] The processor 110 may also include a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0338] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage.

[0339] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The program storage area can store the operating system and at least one application required for a function, such as the voice assistant application that provides human-computer dialogue function as described in this embodiment. The data storage area can store data created during the use of the electronic device, such as interaction data generated when using a voice assistant for human-computer interaction, and succession transfer score matrices and slot score evaluation matrices determined based on historical multi-round interaction data.

[0340] For example, in some implementations, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0341] The wireless communication function of the electronic device can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0342] Among them, the mobile communication module 150 can provide wireless communication solutions for electronic devices, including second-generation wireless telephone technology (2G), third-generation mobile communication technology (3G), fourth-generation mobile communication technology (4G), and fifth-generation mobile communication technology (5G).

[0343] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0344] In some implementations, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks and other devices via wireless communication technology. For example, the electronic device can access a mobile network through mobile communication module 150, and then, based on the mobile network and antenna 1, access the corresponding server to send historical multi-round interaction data to the server. Alternatively, it can access a wireless network through wireless communication module 160, and then, based on the wireless network and antenna 2, access the corresponding server to send historical multi-round interaction data to the server.

[0345] The camera 193 is used to capture still images or videos. In some implementations, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.

[0346] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.

[0347] Specifically, in the technical solution provided in this application embodiment, the display screen 194 can be used to display various user interfaces involved in the dialogue translation function provided by the translation application, as well as various user interfaces involved in the simultaneous interpretation function, etc.

[0348] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment and is not intended to specifically limit the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, or software, or a combination of software and hardware.

[0349] In addition, it should be noted that, in Figure 13The electronic devices shown also run operating systems on their components. Examples include Apple's iOS operating system, Google's Android open-source operating system, and Microsoft's Windows operating system. These operating systems can adopt layered architectures, event-driven architectures, microkernel architectures, microservice architectures, or cloud architectures.

[0350] For ease of explanation, this application uses the layered architecture of the Android system as an example to illustrate the software structure of an electronic device.

[0351] It should be noted that although the embodiments of this application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.

[0352] See Figure 14 The diagram illustrates, for example, the software architecture of an electronic device. Figure 14 As shown, the layered architecture of an electronic device divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments of this application, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0353] The application layer can include a series of application packages. For example... Figure 14 As shown, the application package may include applications such as voice assistant, settings, video, map, and music, which will not be listed here, and this application does not impose any restrictions on them.

[0354] In the embodiments provided in this application, users can interact with electronic devices through voice assistant applications.

[0355] It should be noted that in some implementations, the launch entry point for the voice assistant application can be set in the settings application, the control center, or a shortcut entry point can be added to the desktop.

[0356] In some implementations of this application, users can also enable the voice wake-up function through the aforementioned launch entry point. This allows users to wake up the voice assistant application using its wake word.

[0357] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended as the only limitation on this embodiment.

[0358] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications within the application layer. In some embodiments of this application, these programming interfaces and frameworks can be described as functions. Figure 14 As shown, the application framework layer may include functions such as a large natural language understanding model and slot continuation modules, which will not be listed here, and this application does not impose any restrictions on them.

[0359] Large-scale natural language understanding models are used to convert current user input into semantic representations that machines can understand. That is, they identify intent information, slot information, and other information from the current user input.

[0360] The slot continuation module is used to decide whether to continue slots in scenarios where the large natural language understanding model determines that they are unnecessary, and to determine the scope of continuation when it is determined that continuation is necessary.

[0361] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0362] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0363] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0364] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0365] The kernel layer is the layer between hardware and software. It includes at least display drivers, camera drivers, sensor drivers, and power management drivers.

[0366] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to limit the specific operating system of the electronic device. In other embodiments of this application, the operating system of the electronic device may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.

[0367] Furthermore, it is understood that, in order to achieve the aforementioned functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0368] Furthermore, it should be noted that in practical application scenarios, the element hierarchy position adjustment methods provided in the above embodiments, implemented by electronic devices, can also be executed by a chip system included in the electronic device. This chip system may include a processor. The chip system may be coupled to a memory, enabling it to call computer programs stored in the memory during runtime to implement the steps executed by the electronic device. The processor in the chip system can be an application processor or a non-application processor.

[0369] In addition, this application embodiment also provides a computer-readable storage medium storing computer instructions, which, when executed on an electronic device, cause the electronic device to perform the aforementioned related method steps to implement the methods in the above embodiments.

[0370] In addition, this application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the aforementioned related steps to implement the methods described in the above embodiments.

[0371] Additionally, embodiments of this application also provide an apparatus. This apparatus may be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory stores computer execution instructions, and when the apparatus is running, the processor executes the computer execution instructions stored in the memory to cause the chip to perform the methods described in the above-described method embodiments.

[0372] Furthermore, as can be seen from the above description, the electronic devices, computer-readable storage media, computer program products, or chips provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0373] Furthermore, through the description of the above embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0374] Furthermore, it is understood that the apparatuses and methods disclosed in the several embodiments provided in this application can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0375] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A slot connection method, characterized in that, Applied to electronic devices, the method includes: After receiving the dialogue information input by the user, the first continuation result corresponding to the dialogue information is determined according to the first slot continuation model. The first slot continuation model is obtained by training on human-computer interaction data based on natural language understanding technology. If the first continuation result indicates that slot continuation is not required, a second continuation result corresponding to the dialogue information is determined based on the continuation transfer score matrix and the target continuation threshold. The continuation transfer score matrix is ​​determined based on human-computer interaction data in a multi-turn dialogue scenario. The continuation transfer score matrix includes subsequences of different intent information and slot information, as well as the continuation transfer scores corresponding to the subsequences. The continuation transfer scores are used to identify whether slot continuation is performed when the intent state changes. The target continuation threshold is obtained by adaptive adjustment based on user satisfaction and historical continuation thresholds. The historical continuation threshold is the continuation threshold before adaptive adjustment. The user satisfaction is determined based on user behavior habits. When the second continuation result indicates that slot continuation is required, the continuation slot information is determined according to the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information. The target slot score evaluation matrix is ​​used to record the transfer score of slots between different intentions of the same part of speech corresponding to the dialogue information.

2. The method according to claim 1, characterized in that, The step of determining the second continuation result corresponding to the dialogue information based on the continuation transition score matrix and the target continuation threshold includes: The continuity transfer score of the dialogue information is determined based on the continuity transfer score matrix. Based on the connection transfer score and the target connection threshold, the second connection result corresponding to the dialogue information is determined.

3. The method according to claim 2, characterized in that, The step of determining the second connection result corresponding to the dialogue information based on the connection transfer score and the target connection threshold includes: If the continuity transfer score is greater than or equal to the target continuity threshold, a second continuity result indicating that slot continuity is required is generated; If the continuity transfer score is less than the target continuity threshold, a second continuity result indicating that slot continuity is not required is generated.

4. The method according to any one of claims 1 to 3, characterized in that, The successive transition score matrix is ​​determined based on human-computer interaction data in multi-turn dialogue scenarios, including: The human-computer interaction data in the multi-turn dialogue scenario is split into sequences to obtain the first sub-sequence corresponding to the human-computer interaction data in the multi-turn dialogue scenario; For each of the first subsequences, entity recognition is performed to determine the slot part-of-speech tagging of each of the first subsequences; For each of the first subsequences, a second subsequence is generated based on the determined slot part-of-speech tagging. The second subsequence includes the intent information and slot information included in the first subsequence, but does not include other information in the first subsequence besides the intent information and slot information. According to the intention relationship, the second subsequence is merged into a sequence group with different intentions; For each sequence group, the implicit continuation concentration score and part-of-speech overlap score corresponding to the sequence group are calculated, and the continuation transition weight is strengthened based on the reinforcement learning strategy; wherein, the implicit continuation concentration score is used to identify the user's potential interest in the continuation request during the single intention multi-round interaction slot filling process. For each sequence group, the continuation transfer score of the sequence group is determined based on the hidden continuation concentration score, the part-of-speech overlap score, and the continuation transfer weight. The succession transition score matrix is ​​constructed based on the succession transition score of each sequence group.

5. The method according to claim 4, characterized in that, The calculation of the hidden continuation concentration score corresponding to the sequence set includes: Based on the number of times the intent information appears in the sequence group, determine the number of follow-up questions for the intent corresponding to the sequence group; Based on the slot information of the last subsequence in the sequence group, determine the number of slots included in the last subsequence; Based on the slot information of the first subsequence in the sequence group, determine the number of slots included in the first subsequence; The slot supplement value corresponding to the sequence group is determined based on the number of slots included in the last subsequence and the number of slots included in the first subsequence; The implicit continuation concentration score corresponding to the sequence group is calculated based on the number of follow-up questions corresponding to the intent and the slot supplement value.

6. The method according to claim 4, characterized in that, The calculation of the part-of-speech overlap score corresponding to the sequence group includes: Based on the intent information and slot information included in the sequence group, determine the number of slot part-of-speech tags corresponding to the slot before the intent state transition, the number of slot part-of-speech tags corresponding to the slot after the intent state transition, and the number of slot part-of-speech tags that exist in the two intents. The part-of-speech overlap score of the sequence group is calculated based on the number of parts of speech in the slot corresponding to the slot before the intent state transition, the number of parts of speech in the slot corresponding to the slot after the intent state transition, and the number of identical parts of speech in the slots in the two intents.

7. The method according to claim 4, characterized in that, The reinforcement learning-based strategy for strengthening successive transfer weights includes: The reinforcement learning strategy based on a reward and punishment system increases the reward threshold for successful continuation of parts of speech in the same part-of-speech scenario, and decreases the penalty threshold for failed continuation of parts of speech.

8. The method according to claim 4, characterized in that, Determining user satisfaction includes: Obtain the sequence with added continuation tags from the sequence group. M A second subsequence, wherein the continuation label is used to identify the slot information in the second subsequence, which is determined according to the slot score evaluation matrix corresponding to the sequence group. M It is an integer greater than 0; For each second subsequence with the added continuation tag, obtain the successor subsequence of the second subsequence according to the index value corresponding to the second subsequence; For each second subsequence with the added continuation tag, determine whether the intent information corresponding to the second subsequence is the same as the intent information corresponding to the subsequent subsequence; If the corresponding intent information is the same, determine whether the slot information corresponding to the second sub-sequence and the slot information corresponding to the subsequent sub-sequence are the same; statistics M The number of second subsequences with different intent information and the number of second subsequences with the same slot information in each second subsequence; Determine the number of second sub-sequences with different intent information and the number of second sub-sequences with the same slot information based on the number of second sub-sequences with different slot information. M User satisfaction with the second autonomous connection behavior.

9. The method according to claim 1, characterized in that, The step of determining the subsequent slot information based on the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information includes: Determine the part-of-speech tag of the slots included in the dialogue information; From the pre-determined slot score evaluation matrices corresponding to different slot part-of-speech, find the target slot score evaluation matrix that matches the slot part-of-speech; Find the transfer score that meets the set requirements recorded in the target slot score evaluation matrix; The slot information corresponding to the transfer score that meets the set requirements is determined as the subsequent slot information.

10. The method according to claim 9, characterized in that, Determine the slot score evaluation matrix corresponding to different slot parts of speech, including: The human-computer interaction data in the multi-turn dialogue scenario is split into sequences to obtain the first sub-sequence corresponding to the human-computer interaction data in the multi-turn dialogue scenario; For each of the first subsequences, entity recognition is performed to determine the slot part-of-speech tagging of each of the first subsequences; For each of the first subsequences, a second subsequence is generated based on the determined slot part-of-speech tagging. The second subsequence includes the intent information and slot information included in the first subsequence, but does not include other information in the first subsequence besides the intent information and slot information. According to the part of speech of the slot, the second subsequence is merged into groups of the same part of speech corresponding to different slots; For each second subsequence within the same part-of-speech group, the slot hit relationship of the second subsequence is determined. The slot hit relationship records the slot of the first intent, the slot of the second intent, and the similarity between the slot information of the first intent and the slot information of the second intent. For each of the same part-of-speech groups, the slot score evaluation matrix corresponding to the same part-of-speech group is determined based on the slot hit relationship of each of the second sub-sequences and the target continuation threshold.

11. An electronic device, characterized in that, The electronic device includes: a memory and a processor, the memory and the processor being coupled; the memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the slot connection method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on an electronic device, causes the electronic device to perform the slot connection method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Man-machine conversation method, system and device, electronic equipment and storage medium

    CN116186217A

  • Systems and methods for implementing a virtual agent performing context and query transformations using unsupervised machine learning models

    US20230350928A1