Slot continuing method and device and storage medium

Through user behavior habits decision-making slot continuation, using the continuation transfer score matrix and target threshold, the dialogue inconsistency problem caused by referential pronoun errors is solved, and the accuracy and adaptive slot continuation of multiple rounds of dialogue are achieved.

CN120449998AActive Publication Date: 2025-08-08HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411809388.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-08-08
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

In the human-machine multi-wheel dialogue scenario, the improper use of the referential pronoun or the unrecognized resulted in the user's intent error, resulting in a lack of coherence and accuracy of the conversation.

Method used

Through the continuation transfer score matrix and target continuation threshold based on user behavior habits, it is decided whether to perform slot continuation, and determine slot information based on dialogue information when necessary, and use the slot continuation model trained by natural language understanding technology to perform slot continuation.

Benefits of technology

Ensure the consistency and accuracy of the conversation, adapt to the behavioral habits of different users, reduce hard coding, and achieve the effect of direct speech.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449998A_ABST
    Figure CN120449998A_ABST
Patent Text Reader

Abstract

The invention provides a slot continuing method and device and a storage medium. In the method, in a scene in which a first slot connection model determines that slot connection is not needed, whether slot connection needs to be carried out in a current interaction scene is decided through a connection transfer score matrix and a target connection threshold value determined based on user behavior habits, and under the condition that slot connection needs to be carried out, slot connection is carried out in the current interaction scene. And determining the continuous slot information according to the target slot score evaluation matrix corresponding to the currently acquired dialogue information, thereby realizing slot continuity in a multi-round dialogue scene, ensuring continuity and accuracy of the dialogue, and ensuring that the continuous dialogue is more suitable for the user behavior habit of the current user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of artificial intelligence (AI), multi-turn human-machine dialogue has become a bridge connecting humans and intelligent devices. In multi-turn dialogue scenarios, the system uses pronouns identified during user interaction to understand the context and user intent. It then fills and updates slot information based on user intent to ensure conversational coherence and accuracy.

[0003] However, in actual multi-round human-computer dialogue scenarios, pronouns are often used improperly or even not recognized at all. This can lead to errors in determining user intent, and in turn, errors in filling and updating slot information based on user intent, making the final dialogue lack coherence and accuracy. Summary of the Invention

[0004] In order to solve the above technical problems, the embodiments of the present application provide a slot continuation method, device and storage medium, which aim to realize slot continuation in multi-round dialogue scenarios to ensure the continuity and accuracy of the dialogue.

[0005] In a first aspect, embodiments of the present application provide a slot continuation method. The method is applied to an electronic device and includes: upon receiving dialogue information input by a user, determining a first continuation result corresponding to the dialogue information based on a first slot continuation model, the first slot continuation model being trained on human-computer interaction data based on natural language understanding technology; if the first continuation result indicates that slot continuation is not necessary, determining a second continuation result corresponding to the dialogue information based on a continuation transfer score matrix and a target continuation threshold, the continuation transfer score matrix being determined based on human-computer interaction data in multiple rounds of dialogue scenarios, the target continuation threshold being obtained by adaptively adjusting user satisfaction and a historical continuation threshold, the historical continuation threshold being the continuation threshold before adaptive adjustment, and user satisfaction being determined based on user behavior habits; and if the second continuation result indicates that slot continuation is necessary, determining the continuation slot information based on the dialogue information and a target slot score evaluation matrix corresponding to the dialogue information.

[0006] Among them, the first slot continues to be understood as a large natural language understanding model obtained by training human-computer interaction data based on natural language understanding technology.

[0007] The historical connection threshold can be understood as the connection threshold used in the human-computer interaction scenario before the target connection threshold is obtained.

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

[0009] The successive transfer score matrix may also be in other forms, such as a mapping table, an array, etc.

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

[0011] Therefore, in a scenario where the first slot continuation model (such as a large natural language understanding model) determines that slot continuation is not necessary, the continuation transfer score matrix and target continuation threshold determined based on user behavior habits are used to decide whether slot continuation is necessary in the current interaction scenario. If it is determined that slot continuation is necessary, the continuation slot information is determined based on the target slot score evaluation matrix corresponding to the currently acquired dialogue information, thereby realizing slot continuation in multi-round dialogue scenarios, ensuring the continuity and accuracy of the dialogue, and ensuring that the continued dialogue is more suitable for the user behavior habits of the current user.

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

[0013] For details on the implementation of this aspect, please refer to Figure 8 The description of step S201 and step S202 in the illustrated embodiment will not be repeated here.

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

[0015] In some implementations, it may be configured that when the connection transfer score is greater than a target connection threshold, a second connection result indicating that a slot connection is required is generated. When the connection transfer score is less than or equal to the target connection threshold, a second connection result indicating that a slot connection is not required is generated.

[0016] For details on the implementation of this aspect, please refer to Figure 8 The description of step S201 and step S202 in the illustrated embodiment will not be repeated here.

[0017] According to the first aspect, or any implementation of the first aspect above, a connection transition score matrix is determined based on human-computer interaction data in a multi-round dialogue scenario, including: performing sequence decomposition on the human-computer interaction data in the multi-round dialogue scenario to obtain first subsequences corresponding to the human-computer interaction data in the multi-round dialogue scenario; performing entity recognition on each first subsequence to determine the slot part-of-speech of each first subsequence; assembling each first subsequence to generate a second subsequence based on the determined slot part-of-speech, the second subsequence including the intent information and slot information included in the first subsequence, but not including information other than the intent information and slot information in the first subsequence; merging the second subsequences into sequence groups with different intents according to the intent relationship; for each sequence group, calculating the implicit connection concentration score and the part-of-speech overlap score corresponding to the sequence group, and strengthening the connection transition weight based on a reinforcement learning strategy; for each sequence group, determining the connection transition score of the sequence group based on the implicit connection concentration score, the part-of-speech overlap score, and the connection transition weight; and constructing a connection transition score matrix based on the connection transition score of each sequence group.

[0018] The entity recognition example is a predefined entity recognition interface, which can be implemented based on natural language understanding (NLU) technology.

[0019] The slot part of speech refers to the part of speech of the word (slot value) used to fill the slot.

[0020] The implicit continuation concentration score can be understood as the user's potential interest in the continuation request during the multi-round interaction process of single-intent. A higher implicit continuation concentration score indicates a higher potential interest in the continuation request, meaning a greater desire for automatic continuation.

[0021] The POS overlap score can be understood as the probability that two intents share the same POS when the intent state transitions. A higher POS overlap score indicates a higher probability that the two intents share the same POS and a higher probability that they need to be connected.

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

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

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

[0025] According to the first aspect, or any implementation of the first aspect above, calculating the implicit connection concentration score corresponding to the sequence group includes: determining the number of follow-up questions of the intent corresponding to the sequence group based on the number of occurrences of the 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 slot 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 connection concentration score corresponding to the sequence group based on the number of follow-up questions of the intent corresponding to the sequence group and the slot supplement slot value.

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

[0027] According to the first aspect, or any implementation method of the first aspect above, the part-of-speech overlap score corresponding to the sequence group is calculated, including: determining the number of slot parts of speech to which the corresponding slots belong before the intention state conversion, the number of slot parts of speech to which the corresponding slots belong after the intention state conversion, and the number of identical slot parts of speech existing in the two intentions based on the intention information and slot information included in the sequence group; calculating the part-of-speech overlap score corresponding to the sequence group based on the number of slot parts of speech to which the corresponding slots belong before the intention state conversion, the number of slot parts of speech to which the corresponding slots belong after the intention state conversion, and the number of identical slot parts of speech existing in the two intentions.

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

[0029] According to the first aspect, or any implementation method of the first aspect above, based on the reinforcement learning strategy, the continuation transfer weight is strengthened, including: based on the reinforcement learning strategy of the reward and punishment system, a threshold is set for increasing the reward for the continuation transfer weight for a successful continuation in the same part of speech scenario, and a threshold is set for reducing the penalty for the continuation transfer weight for a failed continuation.

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

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

[0032] According to the first aspect, or any implementation of the first aspect above, user satisfaction is determined, including: obtaining M second subsequences with added continuation labels from a sequence group, where the continuation labels are used to identify slot information in the second subsequence, determined according to a slot score evaluation matrix corresponding to the sequence group, where M is an integer greater than 0; for each second subsequence with added continuation labels, obtaining a subsequent subsequence of the second subsequence according to an index value corresponding to the second subsequence; for each second subsequence with added continuation labels, determining whether the intent information corresponding to the second subsequence and the intent information corresponding to the subsequent subsequence are the same; when the corresponding intent information is the same, determining whether the slot information corresponding to the second subsequence and the slot information corresponding to the subsequent subsequence are the same; counting the number of second subsequences with different intent information and the number of second subsequences with the same slot information in 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] Among them, the second subsequence with the continuation label can be understood as the second subsequence that the natural language understanding large model determines that continuation is not necessary, but the continuation transfer score matrix determines that continuation is required, and the slot score evaluation matrix determines the continuation range.

[0034] The counted number of second subsequences with different intent information and the counted number of second subsequences with the same slot information may be the number of satisfactory slot connection times or the number of unsatisfactory slot connection times.

[0035] When the number of times the slot connection is satisfied is counted, the number of times the slot connection is satisfied may be counted by adding 1 to the number of times the slot connection is satisfied each time.

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

[0037] When the number of times that the slot connection is not satisfactory is counted, the number of times that the slot connection is not satisfactory may be counted by subtracting 1 from the number of times each time.

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

[0039] For details on the implementation of this aspect, please refer to 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, determining the subsequent slot information based on the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information includes: determining the slot part of speech of the slot included in the dialogue information; searching for a target slot score evaluation matrix that matches the slot part of speech from the slot score evaluation matrices corresponding to predetermined different slot parts of speech; searching for the transfer score that meets the set requirements recorded in the target slot score evaluation matrix; and determining the slot information corresponding to the transfer score that meets the set requirements as the subsequent slot information.

[0041] The transfer score that meets the set requirements is, for example, the transfer score with the highest score.

[0042] For details on the implementation of this aspect, please refer to Figure 8 The description of step S204 and step S204 in the illustrated embodiment will not be repeated here.

[0043] According to the first aspect, or any implementation of the first aspect above, determining a slot score evaluation matrix corresponding to different slot parts of speech includes: performing sequence splitting on human-computer interaction data in a multi-round dialogue scenario to obtain a first subsequence corresponding to the human-computer interaction data in the multi-round dialogue scenario; performing entity recognition on each first subsequence to determine the slot part of speech of each first subsequence; for each first subsequence, assembling a second subsequence based on the determined slot part of speech, the second subsequence including the intent information and slot information included in the first subsequence, Information other than intent information and slot information in the first subsequence is not included; according to the slot part of speech, the second subsequence is merged into the same-part-of-speech groups corresponding to different slot parts of speech; for each second subsequence in the same-part-of-speech group, the slot hit relationship of the second subsequence is determined, and the slot hit relationship records the slot of the first intent, the slot of the second intent, and the similarity between the slot of the first intent and the slot of the second intent; for each same-part-of-speech group, the slot score evaluation matrix corresponding to the same-part-of-speech group is determined according to the slot hit relationship of each second subsequence and the target continuation threshold.

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

[0045] In a second aspect, embodiments of the present application provide an electronic device. The electronic device includes: a memory and a processor, the memory and the processor being coupled; the memory storing program instructions, which, when executed by the processor, cause the electronic device to execute instructions of the method of the first aspect or any possible implementation of the first aspect.

[0046] In a third aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0047] In a fourth aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0048] In a fifth aspect, embodiments of the present application provide a chip comprising a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path, and the processing circuit executes the method of the first aspect or any possible implementation of the first aspect to control the receive pin to receive a signal and to control the transmit pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1A and Figure 1B This is a schematic diagram of a user interface involved in an exemplary multi-round conversation scenario;

[0050] Figure 1C This is a schematic diagram of a user interface involved in another multi-round conversation scenario;

[0051] Figure 2 This is a schematic diagram of a user interface for conducting multiple rounds of conversations based on the slot connection method provided in an embodiment of the present application;

[0052] Figure 3 The figure is a schematic diagram showing an exemplary implementation flow of a process for determining whether to proceed;

[0053] Figure 4 1 is a flow chart showing an exemplary method of determining a historical transfer score;

[0054] Figure 5 is a schematic diagram illustrating an exemplary method of extracting multiple rounds of interaction data from interaction data;

[0055] Figure 6 Schematic diagram showing an exemplary method of splitting a long sequence into subsequences;

[0056] Figure 7 The figure is a flow chart showing an exemplary method for determining user satisfaction;

[0057] Figure 8 A schematic diagram illustrating a flow chart of a slot connection method provided in an embodiment of the present application;

[0058] Figure 91 is a flow chart showing an exemplary method of determining a slot score evaluation matrix for deciding a connection range;

[0059] Figure 10 Schematic diagram showing an exemplary method of splitting subsequences according to slot part of speech;

[0060] Figure 11 A schematic flow chart illustrating another slot connection method provided in an embodiment of the present application;

[0061] Figure 12 A schematic diagram of a system for exemplarily implementing slot connection provided in an embodiment of the present application;

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

[0063] Figure 14 FIG. 1 is a schematic diagram of the software structure of an electronic device shown as an example. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0065] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0066] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.

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

[0068] In the description of the embodiments of the present application, the names of various controls, areas, options, and entrances are for illustration only and are not intended to limit the embodiments of the present application. That is, in actual use, they may also be described as other names.

[0069] In the description of the embodiments of this application, unless otherwise specified, "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 specified, 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 can be the same.

[0071] In the description of the embodiments of the present application, unless otherwise specified, the dotted lines in the drawings are for illustration only, that is, they are not shown in actual use.

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

[0073] Slot succession in multi-turn conversations refers to the process by which the system automatically fills in and updates slot information through interaction with the user during a multi-turn conversation. Each slot represents a key piece of information. By extracting user intent and the slot information associated with that intent, the system can better understand the user's intent based on this slot information and provide appropriate responses or perform corresponding actions accordingly.

[0074] That is to say, through slot continuation, the system can ensure the consistency of context in multiple rounds of conversations, thereby providing users with a more accurate and smooth interaction experience.

[0075] In order to achieve slot continuation, in some implementations, the system will identify pronouns in user sentences (voice input or text input), use pronouns to understand the context and user intent, and then fill and update slot information based on user intent to ensure the coherence and accuracy of the conversation.

[0076] Pronouns are grammatical terms that are used to replace nouns or sentences. For example, "this", "that", "here", "there", "I", "he", etc., which are not listed here one by one and are not limited to this application.

[0077] For better understanding, based on the pronouns, the effects achieved by slot continuation in a multi-round dialogue scenario are described below with examples.

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

[0079] Exemplarily, in some implementation manners, the reply information made by the voice assistant in response to the user's voice input can be displayed in window 1021.

[0080] Regarding the content displayed in window 1021, it can be as Figure 1A shown. However, it should be understood that Figure 1A the shown is only an example and does not serve as the sole limitation to this embodiment.

[0081] Exemplarily, in some other implementation manners, during the process of displaying window 1021 in the current user interface, the mobile phone can also automatically announce the reply information displayed in window 1021 to achieve the effect of having a conversation with the user.

[0082] In addition, it should be noted that when the voice assistant is set to support wake-up by voice wake-up words, after the mobile phone is powered on, regardless of the state of the mobile phone, when receiving the voice wake-up word, the voice assistant can be started and window 1021 can be displayed in the current interface. That is, interface 101 and interface 102 can be the user interfaces displayed by the mobile phone in any state, not limited to the desktop.

[0083] In addition, it should also be noted that the voice assistant mentioned in this embodiment can also be referred to as the YOYO assistant, or the dialogue management system. That is, in the above embodiments, the system used to interact with the user can be understood as the voice assistant. <00002X0>Exemplarily, during the process of waking up the voice assistant and displaying window 1021, when receiving the user's voice input, the voice assistant can call corresponding functions, models, etc. to extract and complete the user's intention, slot information, etc., and provide corresponding responses or perform corresponding operations according to the user's intention and slot information.

[0085] For example Figure 1BAs shown, while window 1021 is being displayed, upon receiving a user voice input, such as "food near destination A," in one implementation, the query results for food near destination A can be displayed in a 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 may also directly become an interface for displaying the query results, for example, an interface for displaying the query results in a browser application.

[0087] In other implementations, a window specifically for displaying the query results may also be displayed on the current user interface, that is, the query results are not displayed in the window corresponding to the voice assistant.

[0088] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. For ease of explanation, the embodiment of this application takes the query results being directly displayed in the window corresponding to the voice assistant as an example.

[0089] For example, when the mobile phone displays interface 103, after receiving the user's voice input, such as "navigate there", the voice assistant can automatically fill the slot information of the address slot with "Destination A" because the pronoun "there" is recognized during the slot connection process. In this way, even if the user's current voice input "navigate there" does not have clear address information, the voice assistant can determine that the current operation to be performed is to navigate to destination A based on the content of the previous voice input. Therefore, the mobile phone will start the navigation application and automatically start 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 transition interface may be displayed during the process of the user interface changing from interface 103 to interface 104. For example, the default interface after the navigation application is started, and then the default interface of the navigation application changes to interface 104.

[0091] In other implementations, before starting the navigation application, a screenshot of interface 103 may be captured and then displayed at the top of the user interface. After the navigation application is started and interface 104 is loaded, the screenshot is removed. In this way, visually, the user may 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 listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0093] Therefore, by identifying pronouns in voice input and understanding the context and user intent with the help of pronouns, slot information can be automatically filled and updated according to user intent, thereby ensuring the continuity and accuracy of the conversation, so that the responses or operations performed by the voice assistant meet user expectations.

[0094] However, due to the large number of pronouns, accurately implementing slot continuation based on pronouns requires continuously expanding the corpus required to train large models (such as natural language understanding models) (including voice input and text input of various pronouns), which increases implementation costs. If cost is considered, the predictions required for training may not be comprehensive, resulting in failure to identify slot continuation. Therefore, implementing slot continuation based on pronouns cannot meet the full range of business scenarios and user demands.

[0095] In addition, in actual multi-round human-computer dialogue scenarios, there are often cases where pronouns are used improperly or even not recognized. Figure 1C As shown, for example, after the query results of the food near destination A are displayed in the window corresponding to the voice assistant according to the user's voice input "food near destination A", if the voice input provided by the user again is received, such as "start navigation". Since the voice input "start navigation" does not include a pronoun, it is impossible to determine whether the navigation intention is to navigate to destination A or simply start the navigation application (displaying the default interface of the navigation application). That is, due to the complexity of user semantics, the user intention may be determined incorrectly. In this way, the slot information filled and updated according to the user's intention will be incorrect, making the final conversation lack coherence and accuracy.

[0096] In this case, in order to clarify the user's intention, in some implementations, the voice assistant will guide the user to provide more key information. For example, the answer to the user's voice input provided by the user is displayed in the window corresponding to the voice assistant. As shown in window 1051 in interface 105.

[0097] The content displayed in window 1051 can be Figure 1C However, it should be understood that Figure 1C What is shown is only an example and is not intended to be the sole limitation of this embodiment.

[0098] In other implementations, in order to achieve slot continuation in multi-round dialogue scenarios, slot continuation is completed through hard-coding of business rules.

[0099] It's important to note that hardcoding involves embedding data directly into a program's source code. Because hardcoded data is stored directly within the program, it reduces the time required to search for external data at runtime. In other words, hardcoding can improve program execution efficiency. However, because hardcoded data is stored directly within the program, it cannot be modified while the program is running, making it difficult to maintain and upgrade. Furthermore, because data cannot be modified while the program is running, electronic devices using the same program, even with the same user intent, will experience identical slot connections.

[0100] For example, for the user intention of querying a location, when the corresponding business rules hard-codedly stipulate that the subsequent slot information is to take a taxi, regardless of the user, the response or operation performed by the electronic device is fixed to launching the taxi application and displaying the information of vehicles that can take a taxi to the query location, even if some users need to launch the navigation application to view the route to the query location.

[0101] In view of this, the embodiments of the present 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 can not only reduce the hard coding of business logic corresponding to the implementation of slot continuation, but also realize slot continuation that varies from person to person in multi-round dialogue scenarios, achieving a direct effect while ensuring the coherence and accuracy of the dialogue.

[0102] In the embodiments of the present application, the effect of direct access can be understood as that after the user speaks a sentence, the user's desired response can be accurately made, regardless of whether the referent is recognized. For example, when the user wants to go to the vicinity of destination A, the navigation application is directly launched and navigation to destination A begins. For another example, when the user wants to open the navigation application, only the navigation application is launched.

[0103] The following describes in detail the slot connection method provided in the embodiment of the present application from two aspects: deciding whether to connect and deciding the connection range.

[0104] (1) The following are the contents regarding the decision on whether to continue:

[0105] In an embodiment of the present application, a decision on whether to continue may be made by determining whether a transfer score corresponding to the current input content of the user is greater than a transfer threshold.

[0106] The transfer threshold can be adaptively adjusted based on user satisfaction. User satisfaction can be measured through feedback verification of historical transfer scores. Historical transfer scores are determined based on interaction data from multiple rounds of conversation.

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

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

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

[0110] Among them, the interaction data of historical multi-round 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 of a local storage medium of the electronic device. That is, in this implementation, the interaction data is obtained from a local storage medium (such as an internal memory) of the electronic device.

[0112] For example, in some other implementations, the storage path may be a storage path of a 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 listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

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

[0115] The interaction data obtained may be within a preset time period, for example, the last week, the last month, or the last three months.

[0116] The preset time can be set based on business needs. For example, in scenarios where slot reconnection accuracy is a priority, the preset time can be set to a minimum duration, such as three months. This allows for the determination of historical reconnection scores corresponding to different user intents based on rich interaction data. This ensures that user satisfaction scores better reflect the rationality of automated slot reconnections, allowing reconnection thresholds adjusted based on user satisfaction to be more effectively adapted to users.

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

[0118] For example, in scenarios where both slot connection accuracy and device power consumption need to be guaranteed and the demand for device resource occupancy needs to be reduced, the preset time can be set to a third duration (the third duration is greater than the second duration and less than the first duration), such as 1 month. In this way, by obtaining interaction data within the third duration, it can be ensured that the interaction data obtained can determine as many historical connection transfer scores of the user's first intention as possible, thereby ensuring that the obtained user satisfaction can better reflect whether the automatic slot connection is reasonable, so that the connection threshold adjusted according to user satisfaction can be better applied to the user. It can also reduce the amount of interaction data, taking into account the calculation speed, thereby reducing the occupation of device resources and power consumption.

[0119] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

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

[0121] See also Figure 4 Exemplarily, the historical transfer score calculation stage may include:

[0122] S1011, obtaining the interaction data of the voice assistant within a preset time, and performing data processing on the obtained interaction data.

[0123] Understandably, when a user uses a voice assistant to interact with an electronic device, it may be a single-round conversation (after the voice assistant is awakened, the user has a conversation interaction with the electronic device, such as asking about today's weather and then ending the conversation), or it may be a multi-round conversation (after the voice assistant is awakened, the user has multiple conversation interactions with the electronic device). The slot continuation provided in this application is for multi-round conversation scenarios. Therefore, after obtaining the interaction data within a preset time, such as the first time period, the obtained interaction data needs to be processed, such as extracting the interaction data of the multi-round conversation scenario from the interaction data, and performing sequence splitting, entity recognition, and regeneration of a sequence that meets the requirements on the extracted interaction data.

[0124] The specific implementation process of step S1011 can be as follows: Figure 4 As shown in steps S1011-1 to S1011-5, the specific implementation details are shown in the following description of steps S1011-1 to S1011-5.

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

[0126] For example, the interaction data of a user performing human-computer interaction with an electronic device through a voice assistant is obtained within a first period of time (such as 3 months).

[0127] The interaction data may include interaction data of a multi-round dialogue scenario (hereinafter referred to as multi-round interaction data) and / or interaction data of a single-round dialogue scenario (hereinafter referred to as single-round interaction data).

[0128] S1011-2, extracting interaction data of multiple rounds of dialogue scenarios from the interaction data.

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

[0130] Taking the obtained interaction data including multi-round interaction data and single-round interaction data, and the interaction data is in JSON format as an example, 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 Figure 5 As shown in JSON_2.

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

[0132] Among them, "inentCode" is a key that identifies the user intention, and its corresponding value is the user intention determined according to the user input.

[0133] Here, "time" is a key that identifies 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] Among them, "slot" is the key that identifies the slot, and its corresponding value can be one or more. It is determined based on the key information (slot information) identified from the user input. For example, Figure 5 The information shown in the figure includes the information corresponding to the "desLocation" key for identifying the location, the information corresponding to the "appName" key for identifying the name of the application that needs to be accessed, the information corresponding to the "restaurant" key for identifying the restaurant, the information corresponding to the "food" key for identifying the food, the information corresponding to the "quantity" key for identifying the quantity, etc.

[0135] In the embodiments of this application, when the array contains one set of "inentCode," "time," and "slot," it indicates that a user intent has been recognized. This situation can be understood as a conversational interaction between the user and the electronic device. Therefore, the interaction data in this array can be understood as a single round of interaction data.

[0136] Correspondingly, if the array includes multiple (at least two) sets of "inentCode," "time," and "slot," it indicates that multiple user intents were recognized. This situation can be understood as the user interacting with the electronic device multiple times. Therefore, the interaction data in this array can be understood as multiple rounds of interaction data.

[0137] Based on this, the array enclosed by the dotted 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 multi-round interaction data JSON_2 obtained does not include the array enclosed by the dotted box in the interaction data JSON_1.

[0138] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment and is not intended to be the sole limitation of this embodiment. Figure 5 The values corresponding to the "intentCode" key, such as userintent_1, userintent_2, userintent_3, userintent_4, userintent_5, userintent_6, and userintent_7, are specific user intent information. Figure 5 This is for illustration purposes only.

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

[0140] S1011-3, perform sequence splitting on the interaction data of multi-round dialogue scenarios, splitting the long sequence into multiple subsequences.

[0141] In the embodiment of the present application, the array of each multi-round interaction data extracted can be regarded as a long sequence. Since each array of multi-round interaction data includes multiple groups of "inentCode", "time" and "slot", it includes multiple user intentions (also referred to as: intentions). The slot continuation occurs when the intention state is converted. Therefore, in order to facilitate the analysis of the same part-of-speech slot association between multiple rounds of intentions, the long sequence can be split into multiple subsequences according to the principle that a subsequence includes a pair of intentions (user intentions corresponding to two "inentCodes").

[0142] For the sake of convenience, the following Figure 6 It should be noted that Figure 6 In the figure, letters are used to represent a set of "inentCode", "time" and "slot" data, and the specific user intention, time and slot information (slot and slot value) are not shown.

[0143] See also Figure 6 "origin_data" can be understood as the multi-round interaction data obtained in step S1011-2. Figure 6 As shown, the multi-round 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), (G, A, B). For each long sequence, following the principle that a subsequence includes a pair of intents, these 10 long sequences can be split into 21 subsequences corresponding to "after_data". For example, the long sequence (A, B, C) is split into subsequences (A, B) and subsequences (B, C). That is, a pair of adjacent intents are located in a subsequence.

[0144] S1011-4, perform entity recognition on each subsequence to determine the slot part of speech of each subsequence.

[0145] In the embodiment of the present application, different slot parts of speech and entity recognition interfaces (or functional modules, functions, etc.) that recognize these slot parts of speech can be predefined. In this way, by calling the entity recognition interface, the slot parts of speech of the slots included in each subsequence can be determined. That is, by calling the entity recognition interface and performing recognition processing on each subsequence, it is possible to determine the slot parts of speech in the subsequence that are the same as the predefined slot parts of speech (or in other words, match, which can be similarity that meets a set threshold).

[0146] In the embodiments of this application, slot part-of-speech refers to the part-of-speech of the word (slot value) used to fill the slot. 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 pre-defined as noun slots, verb slots, and adjective slots.

[0147] Among them, the noun slot is used to help the system understand the specific entity or concept mentioned by the user. In some implementations, the predefined noun slots may include location (departure point, destination), time, etc.

[0148] Among them, verb slots are used to help the system understand the user's behavior or action. In some implementations, the predefined verb slots may include reservation, call, etc.

[0149] Among them, the adjective slot is used to help the system understand the user's attributes or feature description. In some implementations, the predefined adjective slots may include price, category, etc.

[0150] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0151] In addition, it should be noted that in the embodiment of the present 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 and converting the content in the subsequence into semantics that can be understood by the machine, the user's intention can be accurately understood, and the slot part of speech of the slot corresponding to the user's intention can be identified.

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

[0153] In the embodiment of the present application, the subsequence regenerated based on the determined slot part of speech can be viewed as a subsequence of the original subsequence with information that is not necessary for the slot continuation removed. For example, the time information is removed and the subsequence is generated based on the user's intent and the corresponding slot information.

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

[0155] S1012: Merge the new subsequences according to the intention relationship to obtain a subsequence list.

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

[0157] In addition, it should be noted that, in order to facilitate differentiation and subsequent backtracking to locate different subsequences, an index value may be assigned to each subsequence when regenerating the subsequence, wherein the index values may be in ascending order.

[0158] Since the intention relationship of the above six subsequences all belongs to the conversion from intention A to intention B, these six subsequences can be combined into a subsequence list (or sequence group). For example, the sequence group is: [{(A1, B1), (A2, B2), (A3, B3), (A4, B4), (A5, B5), (A6, B6)}].

[0159] S1013, calculating the implicit connection concentration score corresponding to the subsequence list.

[0160] The implicit continuation concentration can be understood as the user's potential interest in the continuation request during the multi-round interaction process of single-intent. A higher implicit continuation concentration score indicates a higher potential interest in the continuation request, meaning a greater desire for automatic continuation.

[0161] Among them, single-intent multi-round interaction can be understood as the user intent corresponding to multiple rounds of interaction is the same user intent.

[0162] In an embodiment of the present application, the number of follow-up questions for the corresponding intention (the number of subsequences included in the subsequence list) and the slot replenishment 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 based on the subsequence list, and then the number of follow-up questions and the slot replenishment value for the corresponding intention are determined based on the subsequence list to calculate the implicit connection concentration score.

[0163] For example, in some implementations, the number of follow-up questions corresponding to the intention 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] Wherein, Pinterst represents the implicit connection concentration score; N x Indicates the number of follow-up questions corresponding to the subsequence list; Δx represents the slot filling difference; k is a smoothing factor (greater than 0, can be 1), which is used to ensure that Pinterst will not be infinite when Δx=0.

[0166] S1014: Calculate the part-of-speech overlap scores corresponding to the subsequence list.

[0167] The part-of-speech overlap can be understood as the probability that two intents share the same part of speech when the intent state transitions. A higher part-of-speech overlap score indicates a higher probability that the two intents share the same part of speech, and a higher probability that they need to be connected.

[0168] In an embodiment of the present application, the number of slot parts of speech corresponding to the slot before the intention state conversion and the number of slot parts of speech corresponding to the slot after the intention state conversion, as well as the number of identical slot parts of speech existing in the two intentions can be determined based on the subsequence list, and 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 according to formula (2) based on these three values.

[0170]

[0171] Among them, Pcoincide represents the part-of-speech overlap score; Ncurslots represents the number of slot parts-of-speech corresponding to the slot after the intention state conversion; Npreslots represents the number of slot parts-of-speech corresponding to the slot before the intention state conversion; Ncoincide represents the number of identical slot parts-of-speech in the two intentions.

[0172] Understandably, since the same slot part of speech exists in both intents, it exists in both Ncurslots and Npreslots. Therefore, the user needs to multiply Ncoincide by 2, that is, use 2Ncoincide as the numerator.

[0173] It should be noted that in the embodiment of the present application, there is no restriction on the order in which steps S1013 and S104 are executed. That is, step S1013 may be executed first, followed by step S1014. Step S1014 may also be executed first, followed by step S1013. Furthermore, if multitasking is supported, steps S1013 and S1014 may be executed simultaneously.

[0174] S1015, based on the reinforcement learning strategy, strengthen the subsequent transfer weight.

[0175] In an embodiment of the present application, the reinforcement learning strategy may be formulated based on a reward and punishment system.

[0176] Correspondingly, based on the reinforcement learning strategy of the reward and punishment system, the reinforcement transfer weight can set a threshold for increasing the reward for the successful continuation transfer weight in the same part-of-speech scenario when the intention state is converted, and set a threshold for reducing the penalty for the failed continuation transfer weight.

[0177] The threshold value may be set to 1. That is, when the intention state is switched, the weight of the successful connection transfer in the same part-of-speech scenario is rewarded with +1, and the weight of the successive recognition is penalized with -1.

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

[0179] S1016: Calculate the historical connection transfer score corresponding to the subsequence list based on the implicit connection concentration score, the part-of-speech overlap score, and the connection transfer weight.

[0180] The transfer score is used to determine whether a slot transfer is performed when the intention state changes. Generally, a higher transfer score indicates a higher probability of slot transfer being performed.

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

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

[0183]

[0184] Among them, Score(AB) represents the continuation transfer score when converting from intent A to intent B; Pinterst represents the implicit continuation concentration score; Pcoincide represents the part-of-speech coincidence score; NContinue*(±1) represents the continuation transfer weight obtained by reinforcement learning based on the number of slots with successful continuations (NContinue); n represents the number of slots of the same entity type when converting from intent A to intent B.

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

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

[0187]

[0188] Among them, SIM represents the determined similarity; A represents the number of slots corresponding to intention A; B represents the number of slots corresponding to intention B; A∩B represents the size of the intersection of A and B; A∪B represents the size of the union of A and B.

[0189] Regarding the determination of the connection threshold, please refer to the embodiment of the following formula (7) and formula (8), which will not be described here in detail.

[0190] In the embodiment of the present application, when the SIM determined according to formula (3) is greater than the current connection threshold setting value, such as 50%, it can be considered that the slot connection is 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 is possible to determine whether the slot connection is successful, and then obtain the number of slot pairs with successful connection (NContinue). Finally, by performing reinforcement learning on NContinue, the connection transfer weight is obtained.

[0191] In addition, it can be understood that the historical continuation transfer score (which can also be described as: the first continuation transfer score) can be understood as the implicit continuation concentration score, the part-of-speech overlap score and the number of slot pairs with successful continuation determined based on historical multi-round interaction data, and the continuation transfer score determined. The current continuation transfer score (which can also be described as: the second continuation transfer score) that appears in subsequent embodiments can be understood as the implicit continuation concentration score, the part-of-speech overlap score and the number of slot pairs with successful continuation determined based on the content currently input by the user, and the continuation transfer score determined. That is, the historical continuation transfer score is used to describe the continuation transfer score of the previous multi-round dialogue scenario. The current continuation transfer score is used to describe the continuation transfer score of this interaction.

[0192] Thus, through Figure 4 The implementation details shown complete the operations in the historical transfer score calculation phase and obtain the historical transfer score.

[0193] Furthermore, in the embodiment of the present application, to facilitate subsequent slot transfer processing, the historical transfer score corresponding to each subsequence can be saved. Furthermore, to clarify the relationship between these historical transfer scores and subsequences, the corresponding subsequences can also be stored together with the historical transfer scores.

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

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

[0196] In the embodiment of the present application, user satisfaction can be understood as the user's satisfaction with the autonomous connection behavior of the electronic device in the human-computer interaction scenario of multi-round dialogue. At this stage, the default use of a large model with natural language understanding (hereinafter referred to as: natural language understanding large model) for slot connection in multi-round dialogue scenarios. Therefore, after introducing the slot connection method provided in the embodiment of the present application, it is mainly aimed at whether to consider slot connection in the scenario where the large model determines that slot connection is not necessary. In this way, after the user determines that the large model does not need to carry out slot connection, but based on the slot connection method provided in the embodiment of the present application (which can be encapsulated as a slot connection module), after the slot connection is carried out, the user's satisfaction with the connection of such slot connection can determine whether the slots with the same or similar intentions will be updated subsequently, that is, whether the slot connection will be carried out.

[0197] In order to obtain user satisfaction, in an embodiment of the present application, for the slot continuation method provided by the embodiment of the present application, a continuation tag can be added to the data for slot continuation. In this way, by analyzing the similarity between the intention and slot information in the subsequence corresponding to these interaction data with the continuation tags added, the number of slot continuations that the user is satisfied with (hereinafter referred to as the number of satisfied slot continuations) or the number of slot continuations that the user is dissatisfied with (hereinafter referred to as the number of dissatisfied slot continuations) can be determined. Ultimately, based on the determined number of satisfied slot continuations or the number of dissatisfied slot continuations, the user's satisfaction with these self-continuation behaviors can be determined.

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

[0199] See also Figure 7 ,Exemplarily, the historical transfer score verification stage may include:

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

[0201] The traversed subsequences may be within a preset time period. In some implementations, the preset time period may be the same as the preset time period in step S1011. For example, if the preset time period in step S1011 is three months, the traversed subsequences in step S1021 should also be subsequences corresponding to multiple rounds of interaction data within the last three months.

[0202] Among them, the subsequence with the continuation label can be understood as a subsequence that the natural language understanding large model determines does not need to be continued, but is slot-continued after being processed by the slot continuation module.

[0203] That is, after being processed by the slot connection module, a slot connection subsequence is performed, and the slot connection module automatically adds a connection label to the subsequence.

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

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

[0206] Generally, the larger the amount of data used for verification, that is, M, the more the verification result fed back can reflect the user's behavior habits. However, considering the adjustment of the timeliness of the connection based on user satisfaction in the subsequent step S103, M can be set to a compromise value.

[0207] For the sake of convenience, this application embodiment takes 30 as an example. Figure 7 For example, after traversing all subsequences within the preset time, if it is determined that the number of subsequences to which continuation labels are added is greater than or equal to 30, step S1022 can be executed; otherwise, no processing is performed and the next statistical cycle is waited for, that is, after the preset time from the current time, step S1021 is executed again.

[0208] S1022: When the number of subsequences with added connection labels is greater than or equal to a set threshold, obtain M subsequences with added connection labels.

[0209] For example, in some implementations, the M subsequences with continuation labels closest to the current time may be obtained in chronological order, that is, M subsequences with continuation labels added continuously from the deadline are found.

[0210] For example, in other implementations, the M subsequences with continuation labels that are furthest from the current time may be obtained in chronological order, that is, M subsequences with continuation labels added continuously from the start time are found.

[0211] For example, in other implementations, M subsequences with added connection labels may be obtained according to other rules.

[0212] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0213] S1023: Obtain index values corresponding to the M subsequences according to the connection labels.

[0214] In embodiments of the present application, when processing multi-round interaction data, such as executing 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 between the continuation tags and the index values corresponding to the subsequences can be established. Thus, based on the relationship between the continuation tags and the index values, the index values corresponding to the M subsequences to which the continuation tags are added can be obtained.

[0215] S1024: Obtain the subsequent subsequence of each subsequence according to the index value corresponding to the subsequence.

[0216] The subsequent subsequence can be understood as a subsequence located after the current subsequence, or a subsequence with an index value greater than the index value of the current subsequence.

[0217] It is understandable that the index value is unique. Therefore, based on the index values corresponding to the M subsequences, the subsequent subsequences of each subsequence with a continuation tag can be traced back.

[0218] S1025: For each subsequence, determine whether it has the same intention as the subsequent subsequence.

[0219] It is understandable that the subsequence may include intent information, time information, slot information, etc.

[0220] Furthermore, it's understandable that if the user intents of two adjacent subsequences differ or their similarity is below a set threshold, this indicates that the subsequent human-computer interaction is a new conversational interaction, and the user approved the previous self-continuation without further clarification. In this case, the user is likely to be satisfied with the self-continuation.

[0221] Therefore, in this embodiment of the present application, for each subsequence, the intent of the subsequent subsequence is determined to be the same as the intent of the current subsequence. If they are not, the user is directly deemed satisfied with the self-connection behavior, and the number of satisfied slot connections is increased by 1 or the number of dissatisfied slot connections is decreased by 1, and step S1027 is executed. Conversely, if the intent of two adjacent subsequences is the same, the slot information of the two subsequences is further determined to be the same, that is, step S1026 is executed. Based on the judgment result, a decision is made as to whether to execute step S1027 or ignore the data.

[0222] S1026: Determine whether the slot information of two subsequences with the same intention is the same.

[0223] Exemplarily, in some implementations, if the similarity of the slot information in two adjacent subsequences is greater than or equal to a set threshold, if a set proportion of the slot parts of speech are the same, it can be determined that the slot information of the two subsequences with the same intention is the same. In this case, it may be that the electronic device automatically continues, and after responding / feedback, the user makes further explanations based on the feedback, such as speaking out the content of the conversation that can extract more slot information. Therefore, this self-continuation behavior can also be considered successful. Therefore, when it is determined that the slot information of the two subsequences with the same intention is the same, the operation of step S1027 can be performed. Otherwise, no processing is required.

[0224] S1027, number of satisfactory slot connections + 1 / number of unsatisfactory slot connections - 1.

[0225] In the embodiment of the present application, the number of satisfactory slot connections or the number of unsatisfactory slot connections counted in step S1027 can be set as needed.

[0226] For implementations that count the number of satisfied slot connections, the initial value of the satisfied slot connection count can be set to 0. This way, each time a subsequence with a connection label is verified, the satisfied slot connection count can be incremented by 1, or no action is taken. Ultimately, after verifying M subsequences with connection labels, the number of satisfied slot connections for these M self-connection behaviors can be calculated.

[0227] Accordingly, for implementations where the number of unsatisfactory slot connection counts is counted, the initial value of the unsatisfactory slot connection count can be set to M. Thus, each time a subsequence with a connection label is verified, the number of satisfactory slot connection counts can be decremented by 1, or no action is taken. Ultimately, after verifying M subsequences with connection labels, the number of unsatisfactory slot connection counts for these M self-connection behaviors can be counted.

[0228] S1028 , determining user satisfaction with the M autonomous connection behaviors based on the number of satisfied slot connection responses / the number of dissatisfied slot connection responses.

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

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

[0231]

[0232] Among them, Psatisfy represents the user satisfaction with M autonomous connection behaviors; Nsatisfy represents the number of times the user is satisfied with the slot connection counted from these M autonomous connection behaviors; Ndiffer represents the number of times the user is dissatisfied with the slot connection counted from these M autonomous connection behaviors.

[0233] Thus, through Figure 7 The implementation details shown complete the historical transfer score verification phase and achieve user satisfaction.

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

[0235] Exemplarily, user satisfaction, and the related data involved in calculating user satisfaction, can be saved in the form of a data table. In an embodiment of the present application, the data table storing the above data (hereinafter referred to as the 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 information of the calculation cycle, the actual number of autonomous connections in the calculation cycle, the statistical number of slot connection satisfactions (Nsatisfy) and / or the statistical number of slot connection dissatisfactions (Ndiffer), and the final calculated user satisfaction (Psatisfy).

[0236] For example, in some implementations, when there are multiple pieces of user satisfaction data stored, a label may be added to each piece of user satisfaction data for easy distinction.

[0237] For ease of understanding, the following description is given in conjunction with Table 1.

[0238] Table 1 User satisfaction data

[0239] serial number Threshold M Start time Deadline cycle Number of autonomous connections 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 M corresponding to the two pieces of user satisfaction data numbered 1 and 2 in Table 1 is both 30, even though the two pieces of user satisfaction data correspond to different numbers of autonomous connections (one is 30 and the other is 50), the number of autonomous connection subsequences obtained when calculating user satisfaction is the same. Therefore, if Nsatisfy corresponding to the two pieces of user satisfaction data are the same, the ultimately calculated Psatisfy is the same.

[0241] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0242] Continue to see Figure 3 For example, in the stage corresponding to step S103 (the stage of adjusting the connection threshold), the connection threshold may be adaptively adjusted according to user satisfaction.

[0243] In the embodiment of the present application, the adaptive adjustment of the continuation threshold according to user satisfaction may be to increase or decrease the continuation threshold, thereby increasing or suppressing the continuation decision.

[0244] Furthermore, it is understandable that, based on user satisfaction, when adjusting the connection threshold for the first time, the preset initial value of the connection threshold may be adjusted. Subsequently, when adjusting the connection threshold again, the connection threshold obtained after the previous adjustment is adjusted.

[0245] In the embodiment of the present application, the initial value of the connection threshold can be determined according to the connection transfer scores corresponding to all known sequence groups and a preset exposure probability.

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

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

[0248]

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

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

[0251] For example, in some implementations, when the current connection threshold is known, based on the user satisfaction obtained in step S102, when adjusting the current connection threshold, it is possible to decide whether to increase or decrease the connection threshold by comparing the relationship between the user satisfaction and a preset user satisfaction benchmark value.

[0252] Specifically, if the user satisfaction is greater than the user satisfaction benchmark, the connection threshold is lowered. Otherwise, the connection threshold is raised.

[0253] For example, in some implementations, the continuation threshold may be adjusted according to formula (8) based on user satisfaction and a preset user satisfaction benchmark value.

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

[0255] Wherein, Vafter represents the connection threshold adjusted according to user satisfaction; Vbefore represents the current connection threshold; Psatisfy represents the user satisfaction obtained in step S102; and Pspec represents the user satisfaction benchmark value.

[0256] Pspec can be set as needed. For example, if you want a quick automatic reconnection, set Pspec to a low value. This will increase the probability that Psatisfy will be greater than Pspec, lowering the reconnection threshold. In other words, Vafter will be small, ensuring that the subsequent reconnection transfer score determined by user input is as high as possible above Vafter, thus triggering slot reconnection.

[0257] Conversely, if Pspec is set to a higher value, Psatisfy is likely to be lower than Pspec. This raises the connection threshold. That is, Vafter is larger, making the subsequent connection transfer score determined based on user input more likely to be lower than Vafter, thus inhibiting slot connection.

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

[0259] In addition, it should be noted that in order to avoid the connection threshold being adjusted too high, in some implementations, a bottom value can be set for the connection threshold. Among them, it can be stipulated that the bottom value does not exceed the mean value. b% of the mean value, where b∈(130, 150). That is, in the embodiment of the present application, Vafter does not exceed b% of the mean value.

[0260] This completes the connection threshold adjustment phase, enabling adaptive adjustment of the connection threshold. Specifically, the connection threshold can be adaptively adjusted based on user satisfaction statistics collected during each period, making the connection threshold used in subsequent slot connection processing more suitable for the current interaction scenario.

[0261] For example, after obtaining the continuation transfer score matrix at the stage corresponding to step S101 and obtaining the adjusted continuation threshold at the stage corresponding to step S103, upon receiving user input, it is determined whether slot continuation is required based on the continuation transfer score matrix and the continuation threshold. In other words, the decision on whether to continue the slot is made based on the continuation transfer score matrix and the continuation threshold.

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

[0263] See also Figure 8 , exemplarily showing a flow chart of slot connection, specifically including:

[0264] S201: Determine the connection transfer score of the content currently input by the user according to the connection transfer score matrix.

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

[0266] Because the continuation transfer score matrix records different subsequences containing different intent information and slot information, as well as the continuation transfer scores corresponding to each subsequence, a matching subsequence and its corresponding continuation transfer score can be found by traversing the continuation transfer score matrix based on the subsequence in the sequence group corresponding to the current input content. This continuation transfer score can then be determined as the continuation transfer score for the current input content.

[0267] For example, in other implementations, if the connection transfer score of the current input content is not found in the connection transfer score matrix, the connection transfer score of the current input content may be determined according to the processing method of steps S1013 to S1016.

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

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

[0270] For example, in some implementations, it may be set that when the transfer score corresponding to the current input content is greater than or equal to a transfer threshold, it is determined that slot transfer is required. Otherwise, it is determined that slot transfer is not required.

[0271] For example, in some other implementations, it may be set that when the transfer score corresponding to the current input content is greater than the transfer threshold, it is determined that slot transfer is required. Otherwise, it is determined that slot transfer is not required.

[0272] For example, in other implementations, it may be set that when the transfer score corresponding to the current input content is greater than a set transfer threshold value (or ratio), slot transfer is determined to be necessary. Otherwise, slot transfer is determined not to be necessary.

[0273] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0274] In this way, the decision of whether to continue is made.

[0275] For example, if it is determined that slot continuation is currently required, the continuation range content can be determined, for example, the operation of step S203 is performed. Conversely, if it is determined that slot continuation is currently not required, the current input content can be directly stored.

[0276] S203: Determine the slot information to be continued based on the slot entity type and the slot score evaluation matrix corresponding to the current input content.

[0277] The construction of the slot score evaluation matrix can be found in the following section on the scope of decision-making succession, which will not be elaborated here.

[0278] In the embodiment of the present 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-round dialogue data of historical multi-round dialogue scenarios.

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

[0280] It can be understood that for any slot entity type, the slot score evaluation matrix corresponding to the slot of the same entity type records the transfer score corresponding to the slot of the same entity type in the process of transferring from one intent (such as intent A) to another intent (such as intent B).

[0281] Therefore, when deciding the connection range, the slot score evaluation matrix to be searched is determined based on the slot entity type corresponding to the current input content, and 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 connection slot information.

[0282] For example, if there are two slots of the location type corresponding to intention A, such as slot 1 and slot 2, the existing location type slot score evaluation table records the transfer score of automatically connecting from slot 1 of intention A to slot 1 of intention B (such as Score (Aslot1-Bslot1) = 0.4), the transfer score of automatically connecting from slot 1 of intention A to slot 2 of intention B (such as Score (Aslot1-Bslot2) = 0), and the transfer score of automatically connecting from slot 2 of intention A to slot 2 of intention B (such as Score (Aslot1-Bslot2) = 0). 2-Bslot2)=1), and the transfer score from slot2 of intention A to slot1 of intention B (such as Score(Aslot2-Bslot1)=0.6). If it is known from the context and current input content that this dialogue interaction is a transition from intention A to intention B, then when the slots of the location type corresponding to intention A are the above-mentioned slot1 and slot2, by querying the slot score evaluation matrix, the highest transfer score is determined to be Score(Aslot2-Bslot2), so the final slot information determined is the slot and slot value of slot2.

[0283] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0284] S204: respond or perform an operation according to the subsequent slot information, and add a subsequent tag to the current input content for storage.

[0285] It is understandable that for the slot continuation method provided in the embodiment of the present application, after self-continuation, in order to facilitate the subsequent update of user satisfaction based on the data and then adjust the continuation threshold, it is also necessary to add a continuation label to the current input content and then store it.

[0286] Therefore, in the scenario where the natural language understanding large model determines that slot continuation is not necessary, the slot continuation method provided in the embodiment of the present application is used to achieve slot continuation, making the human-computer dialogue more coherent and accurate, and improving the user experience.

[0287] (2) The following are the contents regarding the scope of decision-making succession:

[0288] In the embodiments of this application, the decision-making continuation scope can be understood as solving the mapping relationship between slots and different slot parts of speech between intents, and then constructing a slot score evaluation matrix corresponding to different slot parts of speech based on the obtained mapping relationship. In this way, when the decision requires continuation, the slot score evaluation matrix can be used to determine the continuation scope suitable for the current scenario, so that after the slot is continued, the conversation can be more coherent and accurate.

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

[0290] S301, clustering the interaction data of historical multi-round dialogue scenarios according to slot parts of speech, and processing the interaction data of historical multi-round dialogue scenarios into groups with the same part of speech.

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

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

[0293] In addition, it can be understood that in order to determine the mapping relationship between slots of different slot parts of speech between intents, each subsequence in the same part of speech group includes intent information and slot information.

[0294] In order to better understand step S301, the following Figure 10 Provide specific instructions.

[0295] See also Figure 10 For example, after the multi-round interaction data is processed by step S1011 in the above embodiment, the interaction data of the historical multi-round dialogue scenes can be clustered according to the slot part of speech, so that the intents of different slot parts of speech can be divided into the same part of speech groups of different slot parts of speech. For example, when slot 1 and slot 2 are time-related parts of speech, the intents including slot 1 and slot 2 can be divided into the same sequence group, such as intent A1 corresponding to slot 1 and slot 2, intent A2 corresponding to slot 1 and slot 2, and intent A3 corresponding to slot 1. In this way, the same part of speech group corresponding to the time-related part of speech is obtained.

[0296] Continue to see Figure 10 For example, if the subsequence corresponding to multiple rounds of interaction data also includes slot parts of speech (entity slot types) such as place parts of speech and person parts of speech, then the slots with place parts of speech and the corresponding intentions can be further divided into the same part-of-speech group corresponding to the place parts of speech, and the slots with person parts of speech and the corresponding intentions can be divided into the same part-of-speech group corresponding to the person parts of speech.

[0297] by Figure 10 Taking the same-part-of-speech group corresponding to the time-class part-of-speech as an example, in some implementations, the same-part-of-speech group corresponding to the time-class 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 listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0299] S302: For each subsequence in the same part-of-speech group, determine a slot hit relationship in each subsequence.

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

[0301] In addition, it should be noted that in the embodiments of the present application, the slot hit relationship within each subsequence is the mapping relationship between slots. In some implementations, the slot hit relationship can record the connection relationship between 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] For ease of understanding, the following description is given with reference to examples.

[0303] For example, the subsequence (A, B) is split into slots according to the location part of speech, and the obtained subsequences include (A1slot1, A2slot1), (A1slot1, A2slot2), (A1slot1, A2slot1), (A1slot1, A3none), (A1slot1, A2slot1), (A1slot2, A2slot2), (A1slot1, A2slot1), and according to formula (4), the similarity between the 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 the seven subsequences finally determined can be 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 slot with the same part of speech was extracted, so the similarity between A1slot1 and A3none is 0.

[0305] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

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

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

[0308] Exemplarily, in some implementations, the above information (the transfer score of slots between different intentions under the same slot part of speech) can also be stored in a mapping table (Map), or an array, or other forms.

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

[0310]

[0311] Among them, SIM represents similarity; Threshold represents the connection threshold; Stransfer represents the calculated transfer score; and n represents the number of target objects in the slot hit relationship corresponding to the slot part of speech to be determined currently.

[0312] It should be noted that, in the embodiment of the present application, the target object can be understood as a subsequence that is transferred from the slot of one intent to the slot of another intent.

[0313] Taking the calculation of the transfer score from Aslot1 to Bslot1 of the location part of speech as an example, n represents the number of (Aslot1, Bslot1) recorded in the location part of speech slot hit relationship.

[0314] Still taking the example of the location-class part-of-speech slot hit relationship containing [(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)], 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 Threshold as 0.5 as an example, based on formula (9), it can be determined that the transfer score (Score(Aslot1-Bslot1)) of the location part of speech in the above example can be 0.4. The specific calculation process can be as follows:

[0316]

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

[0318] Therefore, based on the above formula (9), the transfer scores of all possible target objects in the same part-of-speech group corresponding to each slot part-of-speech can be determined, and then the slot score evaluation matrix, or mapping table (Map), or array, etc. 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 format of the slot score evaluation matrix corresponding to the same part-of-speech group may be as follows:

[0320]

[0321] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0322] In this way, when the decision needs to be made to continue, the slot score evaluation matrix of the corresponding group with the same part of speech is searched according to the slot part of speech of the current input content, and finally the slot information with the highest continuation score is selected in the found slot score evaluation matrix as the final continuation range to achieve slot continuation.

[0323] According to the above description of the embodiment of the decision whether to continue and the decision range, when the slot connection method provided by the embodiment of the present application is applied to a multi-round dialogue scenario, the overall implementation process can be as follows: Figure 11 shown.

[0324] about Figure 11 For details on the 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 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 the embodiments of the present application can be implemented solely by an electronic device that performs human-computer interaction. Specifically, the connection transfer score matrix and slot score evaluation matrix, as well as the subsequent use of the connection transfer score matrix and slot score evaluation matrix to determine whether to connect the slot to the next slot based on the current user input content, and the connection range, are all implemented solely by the electronic device.

[0326] In other implementations, the slot connection method provided in the embodiment of the application can be implemented by an electronic device that performs human-computer dialogue and a server. Specifically, the connection transfer score matrix and the slot score evaluation matrix can be implemented by the server, and the subsequent use of the connection transfer score matrix and the slot score evaluation matrix to determine whether to connect the slot according to the current user input content, as well as the operation of the connection range, is implemented by the electronic device. For this implementation, the electronic device (such as Figure 12 The mobile phone 100 in the example may proactively send historical multi-round interaction data within a set time to the server 200, or may feed back to the server 200 after receiving a request from the server 200. In this way, the server 200 can determine the connection transfer score matrix and the slot score evaluation matrix based on the historical multi-round interaction data in accordance with steps S101 to S103, and steps S301 to S303. Accordingly, after the electronic device receives the connection transfer score matrix and the slot score evaluation matrix determined by the server 200 based on the historical multi-round interaction data, in subsequent multi-round dialogue scenarios, it can use 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, as well as the connection range, in accordance with the processing logic of steps S201 to S204.

[0327] Understandably, for methods that require the cooperation of electronic devices and servers, the server can use the historical multi-round interaction data provided by different electronic devices as sample data to construct an initial transfer score matrix and an initial slot score evaluation matrix. In this way, all electronic devices sold to users can use the initial transfer score matrix and the initial slot score evaluation matrix in a multi-round conversation scenario when they have not generated historical multi-round interaction data or the generated historical multi-round interaction data does not meet the conditions for generating a transfer score matrix and a slot score evaluation matrix. To determine whether to continue the slot based on the current user input content and the scope of the operation. When the electronic device generates historical multi-round interaction data or the generated historical multi-round interaction data meets the conditions for generating a transfer score matrix and a slot score evaluation matrix, the electronic device can independently update the initial transfer score matrix and the initial slot score evaluation matrix based on the historical multi-round interaction data generated during use, thereby obtaining a transfer score matrix and a slot score evaluation matrix suitable for the electronic device, achieving device-specific and user-specific results.

[0328] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

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

[0330] Regarding the hardware structure of the electronic device that implements the slot connection method provided in the embodiment of the present application, it can be as follows: Figure 13 shown.

[0331] See also 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, an earphone jack 170D, and the like.

[0333] Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and this application does not limit this.

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

[0335] Exemplarily, in some implementations, the processor 110 may include an application processor (AP), a modem processor (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 are not listed one by one here and are not limited in this application.

[0336] The controller can generate an operation control signal based on the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[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 is reusing. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the processor 110's waiting time, and thus improves system efficiency.

[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 via the external memory interface 120 to implement data storage.

[0339] Among them, the internal memory 121 can be used to store computer executable program code, and the executable program code 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. Among them, the program storage area can store an operating system, an application required for at least one function, such as the voice assistant application that provides a human-computer dialogue function as mentioned in the embodiment of the present application. The data storage area can store data created during the use of the electronic device, such as the interaction data generated when using a voice assistant for human-computer interaction, the connection transfer score matrix and the slot score evaluation matrix determined based on historical multiple rounds of interaction data, etc.

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

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

[0342] 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] Among them, the wireless communication module 160 can provide wireless communication solutions for application 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 technology (NFC), infrared technology (IR), etc.

[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 a network and other devices via wireless communication technologies. For example, the electronic device can access a mobile network via mobile communication module 150, and then, based on the mobile network and antenna 1, access a corresponding server and send historical multi-round interaction data to the server. Alternatively, the electronic device can access a wireless network via wireless communication module 160, and then, based on the wireless network and antenna 2, access a corresponding server and 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 1 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 one.

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

[0348] It should be understood that the above description is merely an example for a better understanding of the technical solution of this embodiment and does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0349] In addition, it should be noted that Figure 13The components of the electronic device shown above also run an operating system. Examples include the iOS operating system developed by Apple, the open-source Android operating system developed by Google, and the Windows operating system developed by Microsoft. These operating systems can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture.

[0350] For ease of explanation, the embodiments of the present application take the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.

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

[0352] See also Figure 14 , which exemplifies a software structure diagram of an electronic device. Figure 14 As shown, the layered architecture of electronic devices divides software into several layers, each with clear roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments of the present application, the Android system is divided into four layers: 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. Figure 14 As shown, the application package may include voice assistant, settings, video, map, music and other applications, which are not listed here one by one and are not limited in this application.

[0354] In the embodiments provided in this application, users can achieve human-computer interaction with electronic devices through voice assistant applications.

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

[0356] In some implementations of this application, the user can also enable the voice wake-up function through the above-mentioned startup portal. In this way, the user can wake up the voice assistant application by voice through the wake-up word of the voice assistant application.

[0357] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation on this embodiment.

[0358] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. In some embodiments of the present application, these programming interfaces and programming frameworks can be described as functions. Figure 14 As shown, the application framework layer may include functions such as a natural language understanding large model and a slot connection module, which are not listed here one by one and are not limited in this application.

[0359] The natural language understanding model is used to convert the current user input into a semantic representation that can be understood by the machine. In other words, it identifies the intent information, slot information, etc. from the current user input.

[0360] The slot continuation module is used to decide whether to continue the slot when the natural language understanding model determines that the slot continuation is not necessary, and to decide the continuation scope when it is determined that continuation is necessary.

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

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

[0363] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0364] The system library may include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).

[0365] The kernel layer is the layer between hardware and software, and 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 for a better understanding of the technical solution of this embodiment and does not constitute a specific limitation on the operating system of the electronic device. In other embodiments of the present application, the operating system of the electronic device may include more or fewer layers than shown, and each layer may include more or fewer components, and this application does not limit this.

[0367] In addition, it is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0368] In addition, it should be noted that in actual application scenarios, the method for adjusting the hierarchical position of elements provided in the above embodiments implemented by an electronic device can also be performed by a chip system included in the electronic device. The chip system may include a processor. The chip system can be coupled to a memory so that when the chip system is running, it calls a computer program stored in the memory to implement the steps performed by the above electronic device. The processor in the chip system can be an application processor or a processor other than an application processor.

[0369] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.

[0370] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the method in the above-mentioned embodiment.

[0371] In addition, embodiments of the present application further provide a device. This device may be a chip, component, or module. The device may include a processor and a memory connected to each other; the memory is configured to store computer-executable instructions. When the device is running, the processor may execute the computer-executable instructions stored in the memory, causing the chip to perform the methods described in the aforementioned method embodiments.

[0372] In addition, it can be seen from the above description that the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0373] Furthermore, those skilled in the art will appreciate that, based on the above description of the embodiments, for ease and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed. In other words, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0374] In addition, it is understandable that in the several embodiments provided in this application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0375] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A slot connection method, characterized in that: Applied to electronic equipment, the method includes: After receiving the dialogue information input by the user, determining a first connection result corresponding to the dialogue information according to a first slot connection model, where the first slot connection model is obtained by training human-computer interaction data based on natural language understanding technology; If the first connection result indicates that slot connection is not required, determining a second connection result corresponding to the dialogue information based on a connection transfer score matrix and a target connection threshold, wherein the connection transfer score matrix is determined based on human-computer interaction data in a multi-round dialogue scenario, the target connection threshold is obtained by adaptively adjusting the user satisfaction and a historical connection threshold, the historical connection threshold being the connection threshold before adaptive adjustment, and the user satisfaction being determined based on user behavior habits; In a case where the second connection result indicates that slot connection is required, the slot information for connection is determined according to the dialogue information and a target slot score evaluation matrix corresponding to the dialogue information.

2. The method according to claim 1, characterized in that The determining, according to the connection transfer score matrix and the target connection threshold, a second connection result corresponding to the dialog information includes: determining a connection transfer score of the conversation information according to the connection transfer score matrix; The second connection result corresponding to the dialog information is determined according to the connection transfer score and the target connection threshold.

3. The method according to claim 2, characterized in that The determining, according to the connection transfer score and the target connection threshold, the second connection result corresponding to the conversation information includes: If the connection transfer score is greater than or equal to the target connection threshold, generating a second connection result indicating that slot connection needs to be performed; When the connection transfer score is less than the target connection threshold, a second connection result indicating that slot connection is not required is generated.

4. The method according to any one of claims 1 to 3, characterized in that The transfer score matrix is determined based on human-computer interaction data in a multi-round dialogue scenario, including: Sequence-splitting the human-computer interaction data in the multi-round dialogue scenario to obtain a first subsequence corresponding to the human-computer interaction data in the multi-round dialogue scenario; For each of the first subsequences, perform entity recognition to determine the slot part of speech of each of the first subsequences; For each of the first subsequences, assembling a second subsequence based on the determined slot part of speech, where the second subsequence includes the intent information and slot information included in the first subsequence, but does not include any information other than the intent information and slot information in the first subsequence; According to the intention relationship, merging the second subsequences into sequence groups with different intentions; For each sequence group, the implicit connection concentration score and part-of-speech overlap score corresponding to the sequence group are calculated, and the connection transfer weight is strengthened based on the reinforcement learning strategy; For each sequence group, determining a connection transfer score of the sequence group according to the implicit connection concentration score, the part-of-speech overlap score, and the connection transfer weight; The connection transfer score matrix is constructed according to the connection transfer score of each sequence group.

5. The method according to claim 4, characterized in that Calculating the implicit connection concentration score corresponding to the sequence group includes: Determining the number of follow-up questions for the intent corresponding to the sequence group according to the number of occurrences of the intent information in the sequence group; Determining the number of slots included in the last subsequence according to the slot information of the last subsequence in the sequence group; determining the number of slots included in the first subsequence according to the slot information of the first subsequence in the sequence group; Determining the slot supplementary slot value corresponding to the sequence group according to the number of slots included in the last subsequence and the number of slots included in the first subsequence; The implicit connection concentration score corresponding to the sequence group is calculated according to the number of follow-up questions of the intention corresponding to the sequence group and the slot supplement slot value.

6. The method according to claim 4, characterized in that Calculating the part-of-speech coincidence score corresponding to the sequence group includes: Determine, based on the intent information and slot information included in the sequence group, the number of slot parts of speech corresponding to the slot before the intent state transition, the number of slot parts of speech corresponding to the slot after the intent state transition, and the number of identical slot parts of speech in the two intents; The part-of-speech overlap score corresponding to the sequence group is calculated based on the number of slot parts of speech corresponding to the slot before the intention state conversion, the number of slot parts of speech corresponding to the slot after the intention state conversion, and the number of identical slot parts of speech in the two intentions.

7. The method according to claim 4, characterized in that The reinforcement learning strategy is based on which the weight of the subsequent transfer is strengthened, including: A reinforcement learning strategy based on the reward and punishment system sets a threshold for increasing the reward for successful continuation transfer in the same part-of-speech scenario, and sets a threshold for reducing the penalty for failed continuation transfer.

8. The method according to claim 4, characterized in that Determine user satisfaction, including: Acquire M second subsequences with continuation labels added thereto from the sequence group, where the continuation labels are used to identify slot information in the second subsequences, and where M is an integer greater than 0; For each second subsequence to which the continuation tag is added, obtaining a subsequent subsequence of the second subsequence according to an index value corresponding to the second subsequence; For each second subsequence to which the continuation tag is added, determining whether the intent information corresponding to the second subsequence is the same as the intent information corresponding to the subsequent subsequence; When 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 subsequent 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; The user satisfaction of the M autonomous connection behaviors is determined according to the number of second subsequences with different intent information and the number of second subsequences with the same slot information.

9. The method according to claim 1, characterized in that The determining the subsequent slot information according to the dialogue information and the target slot score evaluation matrix corresponding to the dialogue information includes: Determining a slot part of speech of a slot included in the dialog information; Searching for the target slot score evaluation matrix that matches the slot part of speech from predetermined slot score evaluation matrices corresponding to different slot parts of speech; Searching for a transfer score that meets 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: Sequence-splitting the human-computer interaction data in the multi-round dialogue scenario to obtain a first subsequence corresponding to the human-computer interaction data in the multi-round dialogue scenario; For each of the first subsequences, perform entity recognition to determine the slot part of speech of each of the first subsequences; For each of the first subsequences, assembling a second subsequence based on the determined slot part of speech, where the second subsequence includes the intent information and slot information included in the first subsequence, but does not include any information other than the intent information and slot information in the first subsequence; According to the slot part of speech, merging the second subsequences into same-part-of-speech groups corresponding to different slot parts of speech; For each second subsequence within the same part-of-speech group, determine a slot hit relationship of the second subsequence, where the slot hit relationship records the slot of the first intent, the slot of the second intent, and the similarity between the slot of the first intent and the slot of the second intent; For each of the same part-of-speech groups, a 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 subsequences 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 are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the slot connection method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that The method comprises a computer program, which, when executed on an electronic device, enables the electronic device to execute the slot connection method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Information processing method and device and computer readable storage medium

    CN111723574A

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

    CN116186217A

  • Method, device and equipment for intermittent connection in multi-round dialogue intention

    CN118057400A

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

    US20230350928A1

  • Intent recognigion method and electronic device

    WO2021254411A1