A dialogue state tracking method, device, equipment and storage medium

By utilizing slot prediction models and dependency relationships to update dialogue states in dialogue systems, the problem of full-scale judgment in cross-domain dialogue systems is solved, improving the efficiency and accuracy of dialogue state recognition.

CN117332055BActive Publication Date: 2026-04-24ZHEJIANG TONGHUASHUN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG TONGHUASHUN INTELLIGENT TECH CO LTD
Filing Date
2023-09-15
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies for cross-domain dialogue systems, the difficulty of fully judging the dialogue status increases with the growth of dialogue history and rounds, leading to a decrease in judgment accuracy and efficiency.

Method used

By acquiring dialogue history text and question intent, a pre-defined slot prediction model is used for slot filling. Short-term memory information is updated based on the dependencies between slots, and long-term memory information is inherited to achieve dialogue state tracking.

Benefits of technology

It improves the efficiency and accuracy of dialogue state recognition, reduces the difficulty of judgment, and enhances the responsiveness of the dialogue system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117332055B_ABST
    Figure CN117332055B_ABST
Patent Text Reader

Abstract

The application discloses a dialogue state tracking method and device, equipment and storage medium, relates to the technical field of man-machine dialogue, and includes: obtaining dialogue history text and text source, current user question and question intention, and judging whether a first slot exists in preset dialogue configuration information according to the text source and the question intention; if the first slot exists, performing slot filling processing on the first slot based on a preset slot prediction model and in combination with the dialogue history text, the question intention and the current user question to obtain a target slot value; updating preset short-term memory information by using the target slot value and a dependency relationship between slots to obtain updated short-term memory information; and performing inheritance operation on corresponding slot values in preset long-term memory information to obtain target short-term memory information, so as to complete the tracking process of the current dialogue state; in this way, the short-term memory information can be updated according to the dependency and inheritance between slots, and the accuracy and efficiency of dialogue state recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human-computer dialogue technology, and in particular to a dialogue state tracking method, apparatus, device, and storage medium. Background Technology

[0002] Dialogue state tracking (DST) is a crucial module in human-computer intelligent dialogue systems. A typical human-computer dialogue system comprises four sequential modules: Natural Language Understanding (NLU), Dialogue State Tracking, Dialogue Policy Learning (DPL), and Natural Language Generation (NLG). The user's expression passes through these four modules sequentially, ultimately resulting in the machine's response. The DST module's primary function in the dialogue system is to identify, update, and maintain the dialogue state. The dialogue state is a data structure that stores the latest and most important dialogue information, serving as a vital source of information for downstream DPL decision-making. For example, in a movie ticket booking scenario, it's necessary to maintain information such as showtimes, times, and number of attendees for specific slots. Therefore, in a cross-domain dialogue system, the dialogue state data structure in the DST typically needs to maintain fields including: Domain-Intent (also generally represented as Intent), Slot, and Slot Value. In other words, the dialogue state is composed of a series of triplets (Domain-Intent, Slot, Slot Value). Existing DST schemes focus on identifying dialogue states from historical dialogues. Each dialogue state requires inputting the dialogue history and current NLU information to re-evaluate the entire dialogue state triplet. As the dialogue history and number of rounds increase, the difficulty of making a full evaluation increases, which reduces overall accuracy.

[0003] Therefore, reducing the difficulty of judging the dialogue state and improving the accuracy and efficiency of the judgment is a problem to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a dialogue state tracking method, apparatus, device, and storage medium, which can improve the efficiency and accuracy of dialogue state recognition. The specific solution is as follows:

[0005] Firstly, this application provides a dialogue state tracking method, including:

[0006] Obtain the dialogue history text and its corresponding text source, the current user's question and its corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent;

[0007] If the first slot exists, the first slot is filled based on a preset slot prediction model, combined with the dialogue history text, the question intent, and the current user question, to obtain the target slot value corresponding to the first slot.

[0008] The preset short-term memory information is updated using the target slot value, and the corresponding slots and slot values ​​in the preset short-term memory information are updated according to the dependency relationship between slots to obtain the updated short-term memory information.

[0009] Based on the updated short-term memory information, the corresponding slot values ​​in the preset long-term memory information are inherited to obtain the target short-term memory information, thereby completing the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all historical dialogue state information.

[0010] Optionally, after determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and the question intent, the method further includes:

[0011] If the first slot does not exist, the slot in the preset short-term memory information is determined as the second slot, and the tracking process for the current dialogue state is performed based on the second slot.

[0012] Optionally, after determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and the question intent, the method further includes:

[0013] If the first slot exists, determine whether the first intent corresponding to the first slot is consistent with the second intent corresponding to the preset short-term memory information;

[0014] If not, the preset short-term memory information is saved to the preset long-term memory information, and the first intent and the first slot are updated to the preset short-term memory information to obtain new short-term memory information, so as to perform the current dialogue state tracking process based on the first slot and the new short-term memory information.

[0015] Optionally, updating the preset short-term memory information using the target slot value, and updating the corresponding slots and slot values ​​in the preset short-term memory information according to the dependencies between slots to obtain the updated short-term memory information, includes:

[0016] The target slot value is used to update the slot value of the corresponding slot in the preset short-term memory information to obtain the first short-term memory information;

[0017] Based on the slot values ​​corresponding to several slots that have dependencies in the first slot, the corresponding slots and slot values ​​in the first short-term memory information are updated to obtain the updated short-term memory information.

[0018] Optionally, the step of inheriting the corresponding slot values ​​in the preset long-term memory information based on the updated short-term memory information to obtain the target short-term memory information includes:

[0019] If there are empty slots in the updated short-term memory information, then determine whether the dependency relationship of the empty slot exists;

[0020] If the dependency relationship of the valueless slot exists, the first slot value corresponding to the dependency relationship is obtained from the preset long-term memory information according to the dependency relationship of the valueless slot, so as to inherit the first slot value using the valueless slot;

[0021] If the dependency relationship of the valueless slot does not exist, the second slot value corresponding to the slot with the same name as the valueless slot is obtained from the preset long-term memory information so as to utilize the valueless slot to inherit the second slot value.

[0022] After all the slots without values ​​inherit the corresponding slot values ​​from the preset long-term memory information, the target short-term memory information corresponding to the updated short-term memory information is obtained.

[0023] Optionally, the process of obtaining target short-term memory information to complete the tracking of the current dialogue state includes:

[0024] Based on the target short-term memory information, the target intent and target slot configuration information corresponding to the current user question are determined; the target slot configuration information includes the slot and the corresponding slot value;

[0025] The target intent and the target slot configuration information are determined as the current dialogue state, and the current dialogue state is output to complete the tracking process of the current dialogue state.

[0026] Optionally, the method further includes:

[0027] The preset short-term memory information is periodically saved to the preset long-term memory information according to the preset short-term memory information maintenance period, so as to carry out the tracking process for the current dialogue state based on the preset long-term memory information.

[0028] Secondly, this application provides a dialogue state tracking device, comprising:

[0029] The slot determination module is used to obtain the dialogue history text and the corresponding text source, the current user's question and the corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent;

[0030] The slot value prediction module is used to fill the first slot based on a preset slot prediction model when the first slot exists, and in combination with the dialogue history text, the question intent and the current user question, to obtain the target slot value corresponding to the first slot.

[0031] The short-term memory information update module is used to update the preset short-term memory information using the target slot value, and to update the corresponding slots and slot values ​​in the preset short-term memory information according to the dependency relationship between slots, so as to obtain the updated short-term memory information.

[0032] The information inheritance module is used to inherit the corresponding slot value in the preset long-term memory information based on the updated short-term memory information to obtain the target short-term memory information, so as to complete the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all the historical dialogue state information.

[0033] Thirdly, this application provides an electronic device, comprising:

[0034] Memory, used to store computer programs;

[0035] A processor for executing the computer program to implement the dialogue state tracking method as described above.

[0036] Fourthly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the dialogue state tracking method described above.

[0037] Therefore, this application can obtain the dialogue history text and its corresponding text source, the current user question and its corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent; if the first slot exists, then based on the preset slot prediction model, and combined with the dialogue history text, the question intent and the current user question, the first slot is filled to obtain the target slot value corresponding to the first slot; the target slot value is used to update the preset short-term memory information, and the corresponding slots and slot values ​​in the preset short-term memory information are updated according to the dependency relationship between slots to obtain the updated short-term memory information; based on the updated short-term memory information, the corresponding slot values ​​in the preset long-term memory information are inherited to obtain the target short-term memory information, so as to complete the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all the historical dialogue state information. In this way, this application can track the current dialogue state based on preset short-term memory information and preset long-term memory information, and update the preset short-term memory information based on the dependency relationship and inheritance operation between slots, which can improve the tracking efficiency of the dialogue state and obtain a more accurate current dialogue state. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0039] Figure 1 This is a flowchart of a dialogue state tracking method disclosed in this application;

[0040] Figure 2 This is a flowchart of a specific dialogue state tracking method disclosed in this application;

[0041] Figure 3 Here is a flowchart of another specific dialogue state tracking method disclosed in this application;

[0042] Figure 4 This is a schematic diagram illustrating a specific slot configuration information disclosed in this application;

[0043] Figure 5 This is a schematic diagram illustrating another specific slot configuration information disclosed in this application;

[0044] Figure 6 This is a schematic diagram of the structure of a dialogue status tracking device disclosed in this application;

[0045] Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

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

[0047] See Figure 1 As shown, this embodiment of the invention discloses a dialogue state tracking method, including:

[0048] Step S11: Obtain the dialogue history text and the corresponding text source, the current user's question and the corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent.

[0049] In this application, the current user question and its corresponding intent, processed by natural language understanding, are first obtained, along with the relevant dialogue history text and its corresponding text source. Then, based on the text source and question intent, it is determined whether a corresponding first slot exists in the preset dialogue configuration information. In a specific embodiment, after determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and question intent, the process may further include: if the first slot does not exist, the slot in the preset short-term memory information is designated as the second slot, and a tracking process for the current dialogue state is performed based on the second slot. Specifically, if the preset dialogue configuration information does not contain a first slot corresponding to the text source and question intent, the slot in the preset short-term memory information can be designated as the second slot, and then a tracking process for the current dialogue state can be performed based on the second slot.

[0050] In another specific embodiment, after determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and the question intent, the method may further include: if the first slot exists, determining whether the first intent corresponding to the first slot is consistent with the second intent corresponding to the preset short-term memory information; if not, saving the preset short-term memory information to the preset long-term memory information, and updating the first intent and the first slot to the preset short-term memory information to obtain new short-term memory information, so as to perform the current dialogue state tracking process based on the first slot and the new short-term memory information. Specifically, if the preset dialogue configuration information contains a first slot corresponding to the text source and question intent, it can be further determined whether the first intent corresponding to the first slot is consistent with the second intent corresponding to the preset short-term memory information. That is, whether the content of the current dialogue is similar to the previous dialogue corresponding to the preset short-term memory information. If the first intent and the second intent are inconsistent, it means that the user's current dialogue is a new question, different from the previous dialogue. In this case, the preset short-term memory information can be saved to the preset long-term memory information, and the first intent and the corresponding first slot can be updated to the preset short-term memory information to obtain new short-term memory information. Subsequently, the new short-term memory information and the first slot can be used to track the current dialogue status.

[0051] Step S12: If the first slot exists, then based on the preset slot prediction model, and in combination with the dialogue history text, the question intent and the current user question, the first slot is filled to obtain the target slot value corresponding to the first slot.

[0052] In this application, when a first slot corresponding to the text source and question intent exists in the preset dialogue configuration information, the first slot can be filled based on the preset slot prediction model, combined with the current user's question and question intent in the current dialogue, as well as the corresponding dialogue history text. This yields the slot value corresponding to the first slot. For example, if the user's question intent is to inquire about a certain rule, the corresponding slot (rule name) can be determined from the preset dialogue configuration information, and the slot value (specific rule content) corresponding to that slot can be further determined to track the current dialogue state.

[0053] Step S13: Update the preset short-term memory information using the target slot value, and update the corresponding slots and slot values ​​in the preset short-term memory information according to the dependency relationship between slots to obtain the updated short-term memory information.

[0054] In this application, after obtaining the target slot value corresponding to the first slot, the corresponding slots and slot values ​​in the preset short-term memory information can be updated using the target slot value and the dependencies between slots, thus obtaining the updated short-term memory information. In a specific embodiment, updating the preset short-term memory information using the target slot value and updating the corresponding slots and slot values ​​in the preset short-term memory information according to the dependencies between slots to obtain the updated short-term memory information may include: updating the slot values ​​of the corresponding slots in the preset short-term memory information using the target slot value to obtain the first short-term memory information; and updating the corresponding slots and slot values ​​in the first short-term memory information according to the slot values ​​corresponding to several slots with dependencies in the first slot to obtain the updated short-term memory information. Specifically, firstly, the target slot value can be used to update the slot value of the corresponding slot in the preset short-term memory information to obtain the first short-term memory information; then, according to the slot values ​​of several slots that have a dependency relationship in the first slot, the corresponding slots and slot values ​​in the first short-term memory information are updated, so that the updated short-term memory information can be obtained according to the dependency relationship between the slots.

[0055] Step S14: Based on the updated short-term memory information, perform an inheritance operation on the corresponding slot value in the preset long-term memory information to obtain the target short-term memory information, so as to complete the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all the historical dialogue state information.

[0056] In this application, after obtaining the updated short-term memory information, the corresponding slot values ​​in the preset long-term memory information can be inherited based on the updated short-term memory information. By inheriting the corresponding slot values ​​in the preset long-term memory information using the updated short-term memory information, the target short-term memory information can be obtained. It can be understood that the preset short-term memory information is the dialogue state information of the current user in the last dialogue, and correspondingly, the preset long-term memory information is all the historical dialogue state information corresponding to the current user. In a specific embodiment, it may further include: periodically saving the preset short-term memory information to the preset long-term memory information according to the preset short-term memory information maintenance period, so as to perform a tracking process for the current dialogue state based on the preset long-term memory information. Specifically, it can be understood that when a user stops engaging in dialogue after a certain period of time, the human-computer intelligent dialogue system can determine that the user will no longer have a need for dialogue in the short term. In this case, the system can save the user's corresponding preset short-term memory information to preset long-term memory information. That is, the preset short-term memory information is saved according to the preset short-term memory information maintenance cycle, which can alleviate the caching pressure of the preset short-term memory information in a timely manner. The dialogue state information in the preset long-term memory information is used to store the dialogue state information in the long term. In this way, even if the user engages in dialogue again later, the relevant dialogue state information in the preset long-term memory information can be used to track the current dialogue state.

[0057] Therefore, this application can update the preset short-term memory information based on the dependency relationship between slots, using the first slot corresponding to the current question intent and the corresponding slot value. Furthermore, it can inherit the corresponding slot value from the preset long-term memory information based on the dependency relationship or time sequence to obtain the target short-term memory information, thereby enabling tracking of the current dialogue state. Additionally, the preset short-term memory information is saved to the preset long-term memory information according to the preset short-term memory information maintenance cycle, allowing for timely adjustment of the correlation between dialogue states. In this way, this application can improve the efficiency and accuracy of current dialogue state recognition.

[0058] The following examples will detail the inheritance operation; see [link / reference]. Figure 2 As shown, this embodiment of the invention discloses a dialogue state tracking method, including:

[0059] Step S21: Obtain the dialogue history text and the corresponding text source, the current user's question and the corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent.

[0060] Step S22: If the first slot exists, then based on the preset slot prediction model, and combined with the dialogue history text, the question intent and the current user question, the first slot is filled to obtain the target slot value corresponding to the first slot.

[0061] Step S23: Update the preset short-term memory information using the target slot value, and update the corresponding slots and slot values ​​in the preset short-term memory information according to the dependency relationship between slots to obtain the updated short-term memory information.

[0062] Step S24: If there are empty slots in the updated short-term memory information, determine whether there is a dependency relationship for the empty slots.

[0063] In this embodiment, before performing the slot inheritance operation, it is first determined whether there are any slots with no value in the updated short-term memory information. If so, it is further determined whether there is a dependency relationship corresponding to the relevant slot with no value. It is understood that when different topics are interspersed during a user's conversation, there may be slots with no value in the updated short-term memory information. At this time, it can be determined whether the slot with no value has a dependency relationship with other slots, so as to process the slot with no value according to the dependency relationship.

[0064] Step S25: If the dependency relationship of the valueless slot exists, the first slot value corresponding to the dependency relationship is obtained from the preset long-term memory information according to the dependency relationship of the valueless slot, so as to inherit the first slot value using the valueless slot.

[0065] Specifically, if a dependency exists corresponding to the slot with no value, the first slot value corresponding to the relevant slot can be obtained from the preset long-term memory information based on the dependency, so that the first slot value can be inherited by the slot with no value. In this way, the first slot value with the same intent as the slot with no value can be found from the preset long-term memory information based on the dependency between slots.

[0066] Step S26: If the dependency relationship of the valueless slot does not exist, then obtain the second slot value corresponding to the slot with the same name as the valueless slot from the preset long-term memory information, so as to use the valueless slot to inherit the second slot value.

[0067] Correspondingly, if the slot with no value has no dependency on other slots, the second slot value corresponding to the slot with the same name as the slot with no value can be found from the preset long-term memory information. It should be noted that the second slot value is the slot value corresponding to the slot with the same name as the slot with no value that was last stored in the preset long-term memory information, so that the slot with no value can inherit the second slot value. In this way, the slot value with the same name corresponding to the slot with no value can be determined according to the time of the dialogue state information in the preset long-term memory information, and the slot with no value can inherit the value.

[0068] Step S27: After inheriting the corresponding slot value from the preset long-term memory information in all the slots without values, the target short-term memory information corresponding to the updated short-term memory information is obtained.

[0069] In this embodiment, after all slots without values ​​have undergone slot inheritance processing, the updated short-term memory information after inheriting the slots can be determined as the target short-term memory information. In a specific embodiment, obtaining the target short-term memory information to complete the tracking process of the current dialogue state may include: determining the target intent and target slot configuration information corresponding to the current user question based on the target short-term memory information; the target slot configuration information includes a slot and a corresponding slot value; determining the target intent and the target slot configuration information as the current dialogue state, and outputting the current dialogue state to complete the tracking process of the current dialogue state. Specifically, the target short-term memory information contains the target intent and corresponding target slot configuration information corresponding to the current user question, wherein the target slot configuration information includes a slot and a corresponding slot value; then, the target intent and the corresponding target slot configuration information are used as the information of the current dialogue state, and the current dialogue state information is output to complete the tracking process of the current dialogue state based on the dialogue state triplet (target intent, slot, slot value).

[0070] For more detailed processing procedures regarding steps S21, S22, and S23, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0071] Therefore, in this embodiment, during the process of inheriting slot values ​​from the preset long-term memory information using updated short-term memory information, it is first determined whether the slots without values ​​in the updated short-term memory information have a dependency relationship with other slots. If so, the corresponding slot value is inherited according to the dependency relationship; otherwise, the slot value with the latest occurrence time among slots with the same name is inherited. In this way, this application can improve the accuracy of identification by tracking and identifying the current dialogue state based on the dependency relationship between slots and the time when the slots are saved.

[0072] like Figure 3 As shown in the figure, this application discloses a dialogue state tracking method, including:

[0073] In this embodiment of the application, it is understood that the inputs include: the source of the current dialogue, the intent of the latest user question, the dialogue history text, and the latest user question. Correspondingly, the outputs include: the latest dialogue state (dialogue state triples (Domain-Intent, Slot, Slot Value)).

[0074] Specifically, based on the source and intent, the corresponding (first) slot configuration information (slots_config) is obtained from the preset dialogue configuration information. For example... Figure 4 Assuming the source is "Customer Service Test 2" and the intent is "Hotel Booking", what slot configuration information can be obtained? Furthermore, such as... Figure 5 It includes the name of the slot and the dependencies between slots.

[0075] Furthermore, if the slot configuration information (first slot) can be obtained through the source and intent, the corresponding slot configuration information is returned. If the preset dialogue configuration information does not have the corresponding intent configuration slot information, for example, if the intent is a general dialogue intent such as "yes (okay)", the corresponding slot information can be reused from the preset short-term memory information (short_mm), and the intent used subsequently will also be replaced with the intent used in the short-term memory.

[0076] Afterwards, the information in the short-term memory can be updated based on the obtained slot configuration information: if the latest intent matches the intent in the short-term memory, the dialogue state maintained in the short-term memory remains unchanged; otherwise, the short-term memory is transferred to the long-term memory (long_mm), and the latest slot configuration information is updated in the short-term memory (only the first two tuples are present, without slot values). It should be noted that the data structure storing the short-term dialogue state in the short-term memory is stored in a Redis database and contains three parts: intent, dialogue state, and latest update time. When the existence time exceeds the set maximum existence time of the short-term memory (the preset short-term memory information maintenance period), the short-term memory needs to be transferred to the long-term memory. Correspondingly, the long-term memory is a sequence of short-term memories, growing in time sequence.

[0077] Furthermore, after obtaining `slots_config`, the slots that need to be predicted can be identified. Then, the Domain-Intent, Slot, context, and question from the dialogue state triple (Domain-Intent, Slot, Slot Value) are used as input parameters and fed to the preset slot identification module (where Slot is also called the expected slot). This can be identified through rules or models. This yields the slot value corresponding to each slot, which can be directly updated in short-term memory. Then, according to the slot dependencies, the remaining unidentified slots are updated. Dependencies can be divided into two types: update dependencies and value dependencies. Specifically, if slot2 has an update dependency on slot1, then when slot1 is updated, slot2 needs to be cleared and filled with a new value (if any). Conversely, if slot2 has a value dependency on slot1, then if the value of slot1 belongs to a specific set `set1`, the value of slot2 must also belong to a specific set `set2`.

[0078] After obtaining the updated short-term memory information through the above steps, for empty (null) slots in the short-term memory, if the empty slot has a dependency relationship with other slots, the latest transferred slot value under the same intent can be obtained from the long-term memory (the dependency relationship at the time of value filling must also be satisfied during inheritance); if the empty slot does not depend on other slots, the latest transferred slot value with the same name is found in the long-term memory information and directly inherited. It should be noted that if the information in the short-term memory information is stored for a longer period than the set maintenance time (the preset short-term memory information maintenance time period), the short-term memory can be transferred to the long-term memory. After inheriting the relevant slot values ​​from the long-term memory information, the maintained intents and filled slots in the short-term memory can be organized as the latest dialogue state output.

[0079] Therefore, in this embodiment, the current dialogue state can be identified and tracked based on short-term memory information and long-term memory information; and the required slot values ​​can be inherited from long-term memory information by utilizing the dependency relationship between slots and slot inheritance operation, which can improve the efficiency and accuracy of dialogue recognition.

[0080] like Figure 6 As shown in the figure, this application discloses a dialogue state tracking device, including:

[0081] The slot determination module 11 is used to obtain the dialogue history text and the corresponding text source, the current user question and the corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent;

[0082] The slot value prediction module 12 is used to fill the first slot based on a preset slot prediction model when the first slot exists, and in combination with the dialogue history text, the question intent and the current user question, to obtain the target slot value corresponding to the first slot.

[0083] The short-term memory information update module 13 is used to update the preset short-term memory information using the target slot value, and update the corresponding slots and slot values ​​in the preset short-term memory information according to the dependency relationship between slots, so as to obtain the updated short-term memory information.

[0084] The information inheritance module 14 is used to inherit the corresponding slot value in the preset long-term memory information based on the updated short-term memory information to obtain the target short-term memory information, so as to complete the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all the historical dialogue state information.

[0085] Therefore, this application can track the current dialogue state based on preset short-term memory information and preset long-term memory information, and update the preset short-term memory information based on the dependency relationship and inheritance operation between slots, which can improve the tracking efficiency of the dialogue state and obtain a more accurate current dialogue state.

[0086] In one specific embodiment, the device may further include:

[0087] The slot determination unit is used to determine the slot in the preset short-term memory information as the second slot when the first slot does not exist, and to perform a tracking process for the current dialogue state based on the second slot.

[0088] In one specific embodiment, the device may further include:

[0089] The intent determination unit is used to determine whether the first intent corresponding to the first slot is consistent with the second intent corresponding to the preset short-term memory information when the first slot exists.

[0090] The first information storage unit is used to save the preset short-term memory information to the preset long-term memory information when the first intent corresponding to the first slot is inconsistent with the second intent corresponding to the preset short-term memory information, and to update the first intent and the first slot to the preset short-term memory information to obtain new short-term memory information, so as to perform the current dialogue state tracking process based on the first slot and the new short-term memory information.

[0091] In one specific embodiment, the short-term memory information update module 13 may include:

[0092] The first short-term information update unit is used to update the slot value of the corresponding slot in the preset short-term memory information using the target slot value to obtain the first short-term memory information.

[0093] The second short-term information update unit is used to update the corresponding slots and slot values ​​in the first short-term memory information according to the slot values ​​corresponding to several slots that have a dependency relationship in the first slot, so as to obtain the updated short-term memory information.

[0094] In one specific embodiment, the information inheritance module 14 may include:

[0095] A dependency determination unit is used to determine whether the dependency relationship of the unvalued slot exists when there is an unvalued slot in the updated short-term memory information.

[0096] The first inheritance unit is used to obtain the first slot value corresponding to the dependency relationship from the preset long-term memory information according to the dependency relationship of the valueless slot when the dependency relationship of the valueless slot exists, so as to inherit the first slot value using the valueless slot.

[0097] The second inheritance unit is used to obtain the second slot value corresponding to the slot with the same name as the valueless slot from the preset long-term memory information when the dependency relationship of the valueless slot does not exist, so as to inherit the second slot value using the valueless slot.

[0098] The target information determination unit is used to obtain target short-term memory information corresponding to the updated short-term memory information after inheriting the corresponding slot value in the preset long-term memory information in all the slots without values.

[0099] In another specific embodiment, the information inheritance module 14 may include:

[0100] The slot configuration information determination unit is used to determine the target intent and target slot configuration information corresponding to the current user question based on the target short-term memory information; the target slot configuration information includes slots and corresponding slot values;

[0101] The dialogue state determination unit is used to determine the target intent and the target slot configuration information as the current dialogue state, and output the current dialogue state to complete the tracking process of the current dialogue state.

[0102] In one specific embodiment, the device may further include:

[0103] The second information storage unit is used to periodically save the preset short-term memory information to the preset long-term memory information according to the preset short-term memory information maintenance time period, so as to perform a tracking process for the current dialogue state based on the preset long-term memory information.

[0104] Furthermore, embodiments of this application also disclose an electronic device, Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0105] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the dialogue state tracking method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0106] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0107] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0108] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the dialogue state tracking method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0109] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed dialogue state tracking method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0110] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

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

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

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

[0114] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A dialogue state tracking method, characterized in that, include: Obtain the dialogue history text and its corresponding text source, the current user's question and its corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent; If the first slot exists, the first slot is filled based on a preset slot prediction model, combined with the dialogue history text, the question intent, and the current user question, to obtain the target slot value corresponding to the first slot. The preset short-term memory information is updated using the target slot value, and the slot value of the corresponding slot in the preset short-term memory information is updated according to the dependency relationship between slots to obtain the updated short-term memory information. Based on the updated short-term memory information, the corresponding slot values ​​in the preset long-term memory information are inherited to obtain the target short-term memory information, thereby completing the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all historical dialogue state information. The target short-term memory information is the information obtained by updating the slot values ​​in the preset long-term memory information to the updated short-term memory information.

2. The dialogue state tracking method according to claim 1, characterized in that, After determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and the question intent, the method further includes: If the first slot does not exist, the slot in the preset short-term memory information is determined as the second slot, and the tracking process for the current dialogue state is performed based on the second slot.

3. The dialogue state tracking method according to claim 1, characterized in that, After determining whether a corresponding first slot exists in the preset dialogue configuration information based on the text source and the question intent, the method further includes: If the first slot exists, determine whether the first intent corresponding to the first slot is consistent with the second intent corresponding to the preset short-term memory information; If not, the preset short-term memory information is saved to the preset long-term memory information, and the first intent and the first slot are updated to the preset short-term memory information to obtain new short-term memory information, so as to perform the current dialogue state tracking process based on the first slot and the new short-term memory information.

4. The dialogue state tracking method according to claim 1, characterized in that, The step of updating the preset short-term memory information using the target slot value and updating the slot values ​​of the corresponding slots in the preset short-term memory information according to the dependencies between slots to obtain the updated short-term memory information includes: The target slot value is used to update the slot value of the corresponding slot in the preset short-term memory information to obtain the first short-term memory information; Based on the slot values ​​corresponding to several slots with dependencies in the first slot, the slot values ​​of the corresponding slots in the first short-term memory information are updated to obtain the updated short-term memory information.

5. The dialogue state tracking method according to claim 1, characterized in that, The step of inheriting the corresponding slot values ​​in the preset long-term memory information based on the updated short-term memory information to obtain the target short-term memory information includes: If there are empty slots in the updated short-term memory information, then determine whether the dependency relationship of the empty slot exists; If the dependency relationship of the valueless slot exists, the first slot value corresponding to the dependency relationship is obtained from the preset long-term memory information according to the dependency relationship of the valueless slot, so as to inherit the first slot value using the valueless slot; wherein, the inheritance of the first slot value using the valueless slot represents updating the first slot value to the valueless slot. If the dependency relationship of the valueless slot does not exist, then the second slot value corresponding to the slot with the same name as the valueless slot is obtained from the preset long-term memory information, so as to inherit the second slot value using the valueless slot; wherein, the inheritance of the second slot value using the valueless slot represents updating the second slot value to the valueless slot; After performing the inheritance operation on the corresponding slot value in the preset long-term memory information for all the slots without values, the target short-term memory information corresponding to the updated short-term memory information is obtained.

6. The dialogue state tracking method according to claim 5, characterized in that, The process of obtaining target short-term memory information to complete the tracking of the current dialogue state includes: Based on the target short-term memory information, the target intent and target slot configuration information corresponding to the current user question are determined; the target slot configuration information includes the slot and the corresponding slot value; The target intent and the target slot configuration information are determined as the current dialogue state, and the current dialogue state is output to complete the tracking process of the current dialogue state.

7. The dialogue state tracking method according to any one of claims 1 to 6, characterized in that, Also includes: The preset short-term memory information is periodically saved to the preset long-term memory information according to the preset short-term memory information maintenance period, so as to carry out the tracking process for the current dialogue state based on the preset long-term memory information.

8. A dialogue state tracking device, characterized in that, include: The slot determination module is used to obtain the dialogue history text and the corresponding text source, the current user's question and the corresponding question intent, and determine whether there is a corresponding first slot in the preset dialogue configuration information based on the text source and the question intent; The slot value prediction module is used to fill the first slot based on a preset slot prediction model when the first slot exists, and in combination with the dialogue history text, the question intent and the current user question, to obtain the target slot value corresponding to the first slot. The short-term memory information update module is used to update the preset short-term memory information using the target slot value, and update the slot value of the corresponding slot in the preset short-term memory information according to the dependency relationship between slots, so as to obtain the updated short-term memory information. The information inheritance module is used to inherit the corresponding slot values ​​in the preset long-term memory information based on the updated short-term memory information to obtain the target short-term memory information, so as to complete the tracking process of the current dialogue state; the preset short-term memory information is the previous dialogue state information, and the preset long-term memory information is all the historical dialogue state information. The target short-term memory information is the information obtained by updating the slot values ​​in the preset long-term memory information to the updated short-term memory information.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the dialogue state tracking method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the dialogue state tracking method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Natural language understanding processing method, device and equipment based on context inference

    CN112632961A

  • System and method for efficient tracking of multiple dialog states with incremental recombination

    US20110137654A1