Dialogue state tracking method and system based on slot awareness and task label guidance

By constructing a dialogue state tracking network model based on slot awareness and task label guidance, the problems of weak generalization ability and model illusion in existing technologies are solved, achieving more accurate dialogue state tracking and cross-domain adaptation, and improving the semantic discrimination accuracy of multi-turn dialogues.

CN122173606APending Publication Date: 2026-06-09FUZHOU LIANCHUANG ZHIYUN INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUZHOU LIANCHUANG ZHIYUN INFORMATION TECH CO LTD
Filing Date
2026-03-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing dialogue state tracking methods have weak generalization ability when facing unseen domains or open vocabulary scenarios, and are easily affected by model illusions, making it difficult to accurately distinguish between slot mentions and activations, especially with low prediction accuracy when long-tailed sparse semantic actions.

Method used

A dialogue state tracking network model based on slot awareness and task label guidance is constructed. Through slot activation prediction module, task label generation module and state generation module, a large language model combined with preset rules and domain prefix random masking mechanism is used to screen candidate slots and generate task labels, and execute specific state update logic to reduce the risk of overfitting and improve semantic discrimination accuracy.

Benefits of technology

It improves the accuracy of dialogue state tracking and the model's generalization ability in zero-shot cross-domain and complex multi-turn interaction scenarios, reduces the misjudgment rate during cross-domain transfer, and enhances the interpretability and robustness of the generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173606A_ABST
    Figure CN122173606A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of natural language processing, in particular to a dialogue state tracking method and system based on slot perception and task label guidance, and comprises the following steps: 1) a dialogue state tracking task label knowledge base is constructed, original data containing dialogue context and slot information is acquired, the semantic action of a user in dialogue data is parsed and labeled by using a large language model in combination with preset rules, task labels are generated, and a sample set containing dialogue context, slot information and corresponding task labels is constructed as a label knowledge base; the application not only improves the accuracy of dialogue state tracking, but also significantly improves the generalization ability of the model in the zero sample cross-domain and complex multi-round interaction scene, can better cope with the challenges of slot semantic confusion, long-tail sparse sample prediction difficulty and unstable state generated by a large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a dialogue state tracking method and system based on slot awareness and task tag guidance. Background Technology

[0002] Dialogue State Tracking (DST) aims to infer the target intent and slot value pairs at the current moment from the user's natural language expression based on multi-turn dialogue history, thereby maintaining a structured dialogue state. Its applications are wide-ranging, including intelligent customer service, in-vehicle voice assistants, personal assistants, and task-oriented dialogue systems in various vertical fields. However, due to the diversity of dialogue scenarios, the need for cross-domain transfer, the colloquial and ambiguous nature of user expression, and the information dependence in the context of long dialogues, dialogue state tracking has always been a challenging core task.

[0003] Existing dialogue state tracking methods typically rely on two main technical paths: one is based on discriminative or extractive methods, which predefine fixed slot ontologies and model the task as a classification or sequence labeling problem; the other is based on generative methods, especially in recent years, which directly generate dialogue states using Large Language Models (LLMs). However, the former often heavily relies on predefined complete vocabularies and large-scale labeled data, making it difficult to adapt to zero-shot or open-vocabulary scenarios, and its generalization ability is weak; while the latter, although utilizing the powerful semantic understanding and generation capabilities of LLMs, is easily affected by "model illusion" in practical applications, leading to the generation of non-existent slots or incorrect values, and it is difficult to accurately distinguish between "simple mentions" and "real activations" of slots. At the same time, when faced with sparse semantic actions (such as modification, deletion, and indifference) distributed in the long tail of the training data, the lack of effective guidance often results in low prediction accuracy. Summary of the Invention

[0004] The purpose of this invention is to provide a dialogue state tracking method and system based on slot awareness and task tag guidance, which can obtain more stable, robust and accurate dialogue state tracking results.

[0005] The technical solution of the present invention: The dialogue state tracking method based on slot awareness and task tag guidance includes the following steps: 1) Construct a dialogue state tracking task tag knowledge base, obtain raw data containing dialogue context and slot information, use a large language model combined with preset rules to parse and annotate the user's semantic actions in the dialogue data, generate task tags, and construct a tag knowledge base by constructing a sample set containing dialogue context, slot information and corresponding task tags; the slot information includes target slot and slot description.

[0006] 2) Construct a dialogue state tracking network model based on slot awareness and task tag guidance. The dialogue state tracking network model based on the large language model includes a collaborative slot activation prediction module, a retrieval-enhanced task tag generation module, and a state generation module. The slot activation prediction module uses a dual-tower encoder to calculate semantic similarity to filter candidate slots. It introduces a domain prefix random masking mechanism in the prompt construction to focus on the core semantics of the slots and maintains a slot-level rolling memory to record historical activation texts. It distinguishes between simple mentions and actual activations by comparing semantic offsets and outputs a set of activated slots. The task tag generation module based on retrieval enhancement utilizes similar samples in the current information retrieval knowledge base to execute a tag balance screening strategy to limit high-frequency tags and retain long-tail tags for recall. The screened examples are used as contextual demonstrations to guide the large language model to generate task tags that represent user semantic actions. The state generation module inputs the set of activation slots and task tags into the large language model, and executes specific state update logic, including new value extraction, old value overwriting, setting to empty, confirming recommendation or inheriting history, according to the semantic action type indicated by the tag, to generate the final dialogue state. 3) The constructed dialogue state tracking network model based on slot awareness and task label guidance is used for state tracking tasks in multi-turn dialogues.

[0007] Further, in step 1), raw data containing dialogue context and slot information is obtained from public datasets including MultiWOZ2.1 and SGD. The raw data includes multi-turn dialogue text, a predefined set of slots, natural language descriptions of the slots, and dialogue state labels for each turn. Based on the prompts, corresponding task labels are generated by a large language model and constructed using rules. And form a tag knowledge base.

[0008] Furthermore, in step 2), the implementation method of the dialogue state tracking network model is as follows: A) Construct a slot activation prediction module, which concatenates the current round of dialogue with the previous round of dialogue as the retrieval input, uses a sentence vector encoder to encode the retrieval input and the natural language description of all slots respectively, calculates and sorts the cosine similarity between the context semantic vector and the slot description vector, and obtains the Top-K candidate slot set for subsequent discrimination and construction of positive and negative samples. For each candidate slot, a prompt input is constructed. During this process, a domain prefix random masking mechanism is introduced to remove domain qualifiers from the slot name with a certain probability, while retaining the core semantics to improve cross-domain generalization ability. At the same time, a slot-level rolling memory is introduced to retrieve the historical dialogue text when the slot was last activated. If there is a semantic shift between the current dialogue and the memory content, it is considered activated; otherwise, it is considered mentioned. The masked slot description, rolling memory, and current dialogue are input into the large language model, and a binary label is output to determine whether the slot is activated in the current round. B) Construct a task tag generation module based on retrieval enhancement. For activated slots, concatenate the dialogue context and slot description into a query vector, and retrieve several historical samples with the most similar semantics from the tag knowledge base. Perform a tag balance screening strategy on the recalled sample set. While maintaining the similarity ranking priority, set a maximum number of tags to be retained for different categories to limit high-frequency tag examples and retain long-tail tag examples. Use the filtered example set as a context demonstration, assemble it with the current dialogue to form a retrieval enhancement prompt, and input it into a large language model to generate task tags that characterize the user's semantic actions. C) Construct a state generation module that inputs the generated task labels, the previous predicted state, slot descriptions, and dialogue context into the large language model. The large language model performs state updates based on the semantic action type indicated by the task label: when the label is Constraint, extract new constraint values ​​from the dialogue; when the label is Change, overwrite the old value with the new value; when the label is Dontcare, set the state to the "don't care" flag; when the label is Confirm, confirm the value from the system's recommendations; when the label is Refer, inherit the previous state value; when the label is Notask, keep the state unchanged; finally, output the updated dialogue state. D) During training, slot activation, task label classification, and state generation are uniformly modeled as a sequence generation task, and the generation loss is calculated using the negative log-likelihood loss function; the parameters of the large language model are optimized through backpropagation, where some pre-trained parameters of the language model can be frozen to reduce training costs.

[0009] Furthermore, in step A), the specific implementation method of the slot activation prediction module is as follows: The slot activation prediction module receives the first Wheel of system speech Speaking with users Previous round of system speeches User comments and all slot sets Natural Language Description As input, where This represents the total number of slots. The goal of the slot activation prediction module is to accurately determine the set of slots actually activated by the user in the current round during dynamic dialogue, based on dual-tower semantic matching and adversarial prompt learning. Furthermore, by employing domain masking and memory comparison mechanisms, the overfitting of the dialogue state tracking network model to domain vocabulary and the confusion between "mention" and "activation" are reduced, thus providing accurate trigger signals for subsequent state updates. First, the slot activation prediction module performs candidate slot retrieval based on dual-tower vector encoding; constructing the... Wheel of search input text It is composed of the current round of dialogue and the short context of the previous round, pieced together in sequence: ; in This indicates that the content will be combined. To balance retrieval efficiency and semantic alignment accuracy, the slot activation prediction module uses a sentence vector encoder with shared parameters. For each search input and natural language description of each slot Encode to obtain the context semantic vector With slot semantic vector ; and through cosine similarity Calculate the semantic relevance between them: ; in Indicates semantic similarity score, This indicates the calculation of the L2 norm of a vector. This represents the vector dot product operation; based on similarity, Senbert selects the Top-K most matching slots to form the candidate slot set for the current round. This filters out the vast majority of irrelevant slots. Secondly, for each of the selected candidate slots Constructing prompts that incorporate adversarial features ; This represents the cue with adversarial features constructed for slot s in the t-th round of dialogue; to improve cross-domain generalization ability, a domain prefix random occlusion mechanism is designed; let... For each round, the probability of triggering occlusion is given. Define a binary switch variable ;when When (probability is) ), execute the masking operator Removing the domain prefix from the slot name yields the masked slot representation. : ; This mechanism forces large language models to focus on the core semantics of slots (such as "name") rather than domain-specific qualifiers (such as "hotel-"), thereby improving the model's ability to transfer knowledge to unseen domains; that is, the similar candidate constructs generated by Senbert calculation are input into the large language model for judgment.

[0010] Meanwhile, to enhance the discriminability of referencing and cross-wheel inheritance, the slot activation prediction module maintains a slot-level rolling memory. It stores slots The original dialogue text from the most recent activation; if the slot has never been activated, then The final constructed input prompt The current dialogue, scroll memory, and processed slot description are merged and formally represented as follows: ; in For a fixed prompt template function; Input large language model The result of determining whether the slot is active is obtained. Based on this definition, the first The set of predicted activation slots is Finally, update the rolling memory based on the prediction results: for all slots determined to be active. Update its scrolling memory to the current round of dialogue text, that is , This indicates the memory text after this update; for inactive slots, the memory remains unchanged. .

[0011] Further, in step B), the specific implementation method of the task tag generation module based on retrieval enhancement is as follows: The task tag generation module based on search enhancement accepts the first System speech S of the wheel t User comments U t Previous round of system speech S t-1 User comments U t-1 Currently active target slot Slot Description And slot scroll memory As input, the goal of the retrieval-enhanced task tag generation module is to utilize a non-parametric external knowledge base and, through in-context learning, generate task tags that characterize the user's semantic actions for each activation slot. The label value space is ; First, the task tag generation module based on retrieval enhancement performs similar sample retrieval based on a pre-built tag knowledge base; defining the tag knowledge base. ,in The total number of samples, This is the sample dialogue text. This represents the slot name of the i-th sample in the knowledge base. Its corresponding slot description, The task tag generation module, based on retrieval enhancement, first constructs the retrieval query text for the current round, using a large language model combined with rule annotation to generate real task tags. , Let represent the retrieval query text constructed for slot s in wheel t. This query integrates the dialogue context, slot semantics, and historical memory, and is formally represented as: ; At the same time, define knowledge base samples Search key text For the concatenation of sample context and slot description Using a sentence vector encoder The query will be performed separately. With all sample keys Mapping to vector representation and And calculate the cosine similarity: ; Sort by similarity in descending order and select the top... The initial recall set consists of 10 samples. Secondly, to address the issue that uneven label distribution in the training data leads to high-frequency categories (such as Constraint) dominating retrieval results, thereby weakening the model's predictive ability for long-tail categories (such as Confirm and Refer), a label balancing filtering strategy is implemented on the initial recall set based on the retrieval enhancement task label generation module; a filtering function is defined. Its execution logic is as follows: for each category in the complete set of tags... ,exist The tags were filtered out. The samples were selected and the previous ones were retained based on similarity. Here's an example; if there aren't enough samples in a certain category, all samples are retained; the filtered samples from each category are merged to obtain enhanced search results. , This indicates the enhanced search results for slot s of wheel t: ; The tag balance filtering strategy, through the dual constraints of "similarity-diversity", forces the retention of contextual examples of long-tail tags, thereby improving the semantic discrimination accuracy of the dialogue state tracking network model in scenarios with few samples. Finally, construct search enhancement suggestions. And generate tags, This indicates the search enhancement suggestion constructed for slot t in round t; search enhancement suggestion The task instruction (constraining that the output must come from a set) ), current dialogue sample information and retrieved example set Composition; retrieval examples are inserted in the prompts in a uniform "input-output" format as a demonstration; Input a large language model and directly generate task tags for the current slot: ; The final label This will be used to guide the specific update logic of the subsequent state generation module.

[0012] Further, in step C), the specific implementation method of the state generation module is as follows: The state generation module accepts the first The dialogue context of the wheel Previous round of dialogue status Currently active slot set And the task label mapping generated in step C. As input, the goal of the state generation module is to perform fine-grained conditional updates on the dialogue state based on the semantic action type indicated by the task label, and generate the predicted state for the current round. ; First, the state generation module executes an incremental update strategy based on the activation set; the update strategy is as described in the formula: That is, for any set not included in the activation set Slot s in the middle, the state of this round This is equivalent to the state of the slot in the previous round. This ensures the stability of the state and reduces computational redundancy; Secondly, for each activated slot Construction state generation prompt In order for the dialogue state tracking network model to execute the specific update logic specified by the label, the prompt word template... Explicitly integrates task tag information; hints Based on dialogue history and current slot description The status value of this slot in the previous round and the currently predicted task labels Common components: ; This suggestion forces large language models to not only focus on contextual semantics, but also to follow... Defined action constraints (such as "extract from system response" or "set state to null") are used to generate the final slot value. ; Finally, the input will be prompted to the large language model, based on the task labels. The following specific state update logic is executed for the category to obtain the first... Wheel slot update .

[0013] like (New Constraint): Indicates that the user has proposed new constraints in the current round, and the model starts from the user's statement. Extract specific slot values ​​as Write status; like (Modify / Replace): Indicates that the user has modified the existing constraints, and the large language model generates new values ​​based on the current semantics. and overwrite the previous state. ; like (Don't care): This indicates that the user has explicitly removed the restriction on this slot. The large language model will explicitly update the state value to a predefined special marker (such as "dontcare"). like (Confirm Recommendation): Indicates that the user has accepted the entity attributes recommended by the system. The large language model speaks from the system. Or, during system actions, backtrack and extract the confirmed value as... ; like (Referential Inheritance): This indicates that the user used a referential expression (such as "the same as the one before"). The large language model parses referential relationships, prioritizing the previous state. Or extract the referred value from the dialogue history as ; like (No Update): This indicates that although the slot was mentioned, no substantial information change occurred, and the status remains unchanged. ; Finally, by combining the update results of all slots, the first slot is output. The complete dialogue state of the wheel .

[0014] Furthermore, in step D), the parameters of the large language model are optimized using a causal language modeling objective; slot activation discrimination, task label classification, and state value generation are all uniformly modeled as prompt-based sequence generation tasks and trained within a unified autoregressive framework; given the massive number of parameters in the large language model, low-rank adaptation (LoRA) technology is used for efficient parameter fine-tuning; during training, input prompts are used... With target output (Including real activation tags, task tags, and status values) concatenated into a complete sequence, only applicable to the target output. Calculate the negative log-likelihood loss for the token: ; in, This represents the total number of tokens in the output sequence, and j represents the lexical index of the current generation step, with a value ranging from 1 to L. This represents the target word sequence that has been generated up to step j. This represents a large language model given an input context X and prior history. Under the given conditions, predict the current position as the correct word. The conditional probability; By iteratively minimizing this loss function, the large language model is driven to accurately learn the joint generation logic of multiple tasks by combining contextual information and retrieval examples.

[0015] The dialogue state tracking system based on slot awareness and task tag guidance includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the method described above.

[0016] The beneficial effects of this invention are: This invention introduces a domain prefix random masking and slot-level rolling memory mechanism, forcing the model to focus on the core semantics of the slot and compare the semantic shifts in time sequence. This effectively reduces the risk of overfitting to specific domain words and the misjudgment rate of "mention-based activation" during cross-domain transfer. At the same time, combined with retrieval enhancement technology, a label balancing screening strategy is used to capture long-tail semantic action features, solving the problem of prediction bias for sparse labels (such as modification and deletion) caused by uneven distribution of training data. On this basis, a state generation module guided by task labels is used to realize controlled state updates based on explicit semantic actions (such as addition, overwriting, and inheritance), thereby enhancing the interpretability and robustness of the generation process and minimizing model illusion.

[0017] This invention not only improves the accuracy of dialogue state tracking, but also significantly enhances the model's generalization ability in zero-shot cross-domain and complex multi-turn interaction scenarios. It can better cope with the challenges of slot semantic confusion, difficulty in predicting long-tail sparse samples, and unstable state generation by large language models. Attached Figure Description

[0018] Figure 1 This is an architecture diagram of the dialogue state tracking network model based on slot awareness and task tag guidance in an embodiment of the present invention. Detailed Implementation

[0019] The invention will now be further described with reference to the accompanying drawings.

[0020] Please see Figure 1 This invention provides a dialogue state tracking method based on slot awareness and task tag guidance, comprising the following steps: 1) Construct a dialogue state tracking task tag knowledge base, obtain raw data containing dialogue context and slot information, use a large language model combined with preset rules to parse and annotate the user's semantic actions in the dialogue data, generate task tags, and construct a tag knowledge base by constructing a sample set containing dialogue context, slot information and corresponding task tags; the slot information includes target slot and slot description.

[0021] 2) Construct a dialogue state tracking network model based on slot awareness and task tag guidance. The dialogue state tracking network model based on the large language model includes a collaborative slot activation prediction module, a retrieval-enhanced task tag generation module, and a state generation module. The slot activation prediction module uses a dual-tower encoder to calculate semantic similarity to filter candidate slots. It introduces a domain prefix random masking mechanism in the prompt construction to focus on the core semantics of the slots and maintains a slot-level rolling memory to record historical activation texts. It distinguishes between simple mentions and actual activations by comparing semantic offsets and outputs a set of activated slots. The task tag generation module based on retrieval enhancement utilizes similar samples in the current information retrieval knowledge base to execute a tag balance screening strategy to limit high-frequency tags and retain long-tail tags for recall. The screened examples are used as contextual demonstrations to guide the large language model to generate task tags that represent user semantic actions. The state generation module inputs the set of activation slots and task tags into the large language model, and executes specific state update logic, including new value extraction, old value overwriting, setting to empty, confirming recommendation or inheriting history, according to the semantic action type indicated by the tag, to generate the final dialogue state. 3) The constructed dialogue state tracking network model based on slot awareness and task label guidance is used for state tracking tasks in multi-turn dialogues.

[0022] In step 1), raw data containing dialogue context and slot information is obtained from public datasets including MultiWOZ2.1 and SGD. The raw data includes multi-turn dialogue text, a predefined set of slots, natural language descriptions of the slots, and dialogue state labels for each turn. Based on the prompts, corresponding task labels are generated by a large language model and constructed using rules. And form a tag knowledge base.

[0023] In step 2), the implementation method of the dialogue state tracking network model is as follows: A) Construct a slot activation prediction module, which concatenates the current round of dialogue with the previous round of dialogue as the retrieval input, uses a sentence vector encoder to encode the retrieval input and the natural language description of all slots respectively, calculates and sorts the cosine similarity between the context semantic vector and the slot description vector, and obtains the Top-K candidate slot set for subsequent discrimination and construction of positive and negative samples. For each candidate slot, a prompt input is constructed. During this process, a domain prefix random masking mechanism is introduced to remove domain qualifiers from the slot name with a certain probability, while retaining the core semantics to improve cross-domain generalization ability. At the same time, a slot-level rolling memory is introduced to retrieve the historical dialogue text when the slot was last activated. If there is a semantic shift between the current dialogue and the memory content, it is considered activated; otherwise, it is considered mentioned. The masked slot description, rolling memory, and current dialogue are input into the large language model, and a binary label is output to determine whether the slot is activated in the current round. B) Construct a task tag generation module based on retrieval enhancement. For activated slots, concatenate the dialogue context and slot description into a query vector, and retrieve several historical samples with the most similar semantics from the tag knowledge base. Perform a tag balance screening strategy on the recalled sample set. While maintaining the similarity ranking priority, set a maximum number of tags to be retained for different categories to limit high-frequency tag examples and retain long-tail tag examples. Use the filtered example set as a context demonstration, assemble it with the current dialogue to form a retrieval enhancement prompt, and input it into a large language model to generate task tags that characterize the user's semantic actions. C) Construct a state generation module that inputs the generated task labels, the previous predicted state, slot descriptions, and dialogue context into the large language model. The large language model performs state updates based on the semantic action type indicated by the task label: when the label is Constraint, extract new constraint values ​​from the dialogue; when the label is Change, overwrite the old value with the new value; when the label is Dontcare, set the state to the "don't care" flag; when the label is Confirm, confirm the value from the system's recommendations; when the label is Refer, inherit the previous state value; when the label is Notask, keep the state unchanged; finally, output the updated dialogue state. D) During training, slot activation, task label classification, and state generation are uniformly modeled as a sequence generation task, and the generation loss is calculated using the negative log-likelihood loss function; the parameters of the large language model are optimized through backpropagation, where some pre-trained parameters of the language model can be frozen to reduce training costs.

[0024] In step A), the specific implementation method of the slot activation prediction module is as follows: The slot activation prediction module receives the first Wheel of system speech Speaking with users Previous round of system speeches User comments and all slot sets Natural Language Description As input, where This represents the total number of slots. The goal of the slot activation prediction module is to accurately determine the set of slots actually activated by the user in the current round during dynamic dialogue, based on dual-tower semantic matching and adversarial prompt learning. Furthermore, by employing domain masking and memory comparison mechanisms, the overfitting of the dialogue state tracking network model to domain vocabulary and the confusion between "mention" and "activation" are reduced, thus providing accurate trigger signals for subsequent state updates. First, the slot activation prediction module performs candidate slot retrieval based on dual-tower vector encoding; constructing the... Wheel of search input text It is composed of the current round of dialogue and the short context of the previous round, pieced together in sequence: ; in This indicates that the content will be spliced ​​together.

[0025] To balance retrieval efficiency and semantic alignment accuracy, the slot activation prediction module uses a sentence vector encoder with shared parameters. For each search input and natural language description of each slot Encode to obtain the context semantic vector With slot semantic vector ; and through cosine similarity Calculate the semantic relevance between them: ; in Indicates semantic similarity score, This indicates the calculation of the L2 norm of a vector. This represents the vector dot product operation; based on similarity, Senbert selects the Top-K most matching slots to form the candidate slot set for the current round. This filters out the vast majority of irrelevant slots. Secondly, for each of the selected candidate slots Constructing prompts that incorporate adversarial features ; This represents the cue with adversarial features constructed for slot s in the t-th round of dialogue; to improve cross-domain generalization ability, a domain prefix random occlusion mechanism is designed; let... For each round, the probability of triggering occlusion is given. Define a binary switch variable ;when When (probability is) ), execute the masking operator Removing the domain prefix from the slot name yields the masked slot representation: ; This mechanism forces large language models to focus on the core semantics of slots (such as "name") rather than domain-specific qualifiers (such as "hotel-"), thereby improving the model's ability to transfer knowledge to unseen domains; that is, the similar candidate constructs generated by Senbert calculation are input into the large language model for judgment.

[0026] Meanwhile, to enhance the discriminability of referencing and cross-wheel inheritance, the slot activation prediction module maintains a slot-level rolling memory. It stores slots The original dialogue text from the most recent activation; if the slot has never been activated, then The final constructed input prompt The current dialogue, scroll memory, and processed slot description are merged and formally represented as follows: ; in For a fixed prompt template function; Input large language model The result of determining whether the slot is active is obtained. Based on this definition, the first The set of predicted activation slots is Finally, update the rolling memory based on the prediction results: for all slots determined to be active. Update its scrolling memory to the current round of dialogue text, that is , This indicates the memory text after this update; for inactive slots, the memory remains unchanged. .

[0027] In step B), the specific implementation method of the task tag generation module based on retrieval enhancement is as follows: The task tag generation module based on search enhancement accepts the first Wheel of system speech Previous round of system speeches Currently active target slot Slot Description And slot scroll memory As input, the goal of the retrieval-enhanced task tag generation module is to utilize a non-parametric external knowledge base and, through in-context learning, generate task tags that characterize the user's semantic actions for each activation slot. The label value space is ; First, the task tag generation module based on retrieval enhancement performs similar sample retrieval based on a pre-built tag knowledge base; defining the tag knowledge base. ,in The total number of samples, This is the sample dialogue text. This represents the slot name of the i-th sample in the knowledge base. Its corresponding slot description, The task tag generation module, based on retrieval enhancement, first constructs the retrieval query text for the current round, using a large language model combined with rule annotation to generate real task tags. , Let represent the retrieval query text constructed for slot s in wheel t. This query integrates the dialogue context, slot semantics, and historical memory, and is formally represented as: ; At the same time, define knowledge base samples Search key text For the concatenation of sample context and slot description Using a sentence vector encoder The query will be performed separately. With all sample keys Mapping to vector representation and And calculate the cosine similarity: ; Sort by similarity in descending order and select the top... The initial recall set consists of 10 samples. Secondly, to address the issue that uneven label distribution in the training data leads to high-frequency categories (such as Constraint) dominating retrieval results, thereby weakening the model's predictive ability for long-tail categories (such as Confirm and Refer), a label balancing filtering strategy is implemented on the initial recall set based on the retrieval enhancement task label generation module; a filtering function is defined. Its execution logic is as follows: for each category in the complete set of tags... ,exist The tags were filtered out. The samples were selected and the previous ones were retained based on similarity. Here's an example; if there aren't enough samples in a certain category, all samples are retained; the filtered samples from each category are merged to obtain enhanced search results. , This indicates the enhanced search results for slot s of wheel t: ; The tag balance filtering strategy, through the dual constraints of "similarity-diversity", forces the retention of contextual examples of long-tail tags, thereby improving the semantic discrimination accuracy of the dialogue state tracking network model in scenarios with few samples. Finally, construct search enhancement suggestions. And generate tags, This indicates the search enhancement suggestion constructed for slot t in round t; search enhancement suggestion The task instruction (constraining that the output must come from a set) ), current dialogue sample information and retrieved example set Composition; retrieval examples are inserted in the prompts in a uniform "input-output" format as a demonstration; Input a large language model and directly generate task tags for the current slot: ; The final label This will be used to guide the specific update logic of the subsequent state generation module.

[0028] In step C), the specific implementation method of the state generation module is as follows: The state generation module accepts the first The dialogue context of the wheel Previous round of dialogue status Currently active slot set And the task label mapping generated in step C. As input, the goal of the state generation module is to perform fine-grained conditional updates on the dialogue state based on the semantic action type indicated by the task label, and generate the predicted state for the current round. ; First, the state generation module executes an incremental update strategy based on the activation set; the update strategy is as described in the formula: That is, for any set not included in the activation set Slot s in the middle, the state of this round This is equivalent to the state of the slot in the previous round. This ensures the stability of the state and reduces computational redundancy; Secondly, for each activated slot Construction state generation prompt In order for the dialogue state tracking network model to execute the specific update logic specified by the label, the prompt word template... Explicitly integrates task tag information; hints Based on dialogue history and current slot description The status value of this slot in the previous round and the currently predicted task labels Common components: ; This suggestion forces large language models to not only focus on contextual semantics, but also to follow... Defined action constraints (such as "extract from system response" or "set state to null") are used to generate the final slot value. ; Finally, the input will be prompted to the large language model, based on the task labels. The following specific state update logic is executed for the category to obtain the first... Wheel slot update value .

[0029] like (New Constraint): Indicates that the user has proposed new constraints in the current round, and the model starts from the user's statement. Extract specific slot values ​​as Write status; like (Modify / Replace): Indicates that the user has modified the existing constraints, and the large language model generates new values ​​based on the current semantics. and overwrite the previous state. ; like (Don't care): This indicates that the user has explicitly removed the restriction on this slot. The large language model will explicitly update the state value to a predefined special marker (such as "dontcare"). like (Confirm Recommendation): Indicates that the user has accepted the entity attributes recommended by the system. The large language model speaks from the system. Or, during system actions, backtrack and extract the confirmed value as... ; like (Referential Inheritance): This indicates that the user used a referential expression (such as "the same as the one before"). The large language model parses referential relationships, prioritizing the previous state. Or extract the referred value from the dialogue history as ; like (No Update): This indicates that although the slot was mentioned, no substantial information change occurred, and the status remains unchanged. ; Finally, by combining the update results of all slots, the first slot is output. The complete dialogue state of the wheel .

[0030] In step D), the parameters of the large language model are optimized using a causal language modeling objective. Slot activation discrimination, task label classification, and state value generation are all uniformly modeled as prompt-based sequence generation tasks and trained within a unified autoregressive framework. Given the massive number of parameters in the large language model, low-rank adaptation (LoRA) technology is used for efficient parameter fine-tuning. Input prompts are incorporated during training. With target output (Including real activation tags, task tags, and status values) concatenated into a complete sequence, only applicable to the target output. Calculate the negative log-likelihood loss for the token: ; in, This represents the total number of tokens in the output sequence, and j represents the lexical index of the current generation step, with a value ranging from 1 to L. This represents the target word sequence that has been generated up to step j. This represents a large language model given an input context X and prior history. Under the given conditions, predict the current position as the correct word. The conditional probability; By iteratively minimizing this loss function, the large language model is driven to accurately learn the joint generation logic of multiple tasks by combining contextual information and retrieval examples.

[0031] The dialogue state tracking system based on slot awareness and task tag guidance includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the method described above.

[0032] The present invention will be further described below with reference to a specific embodiment: A dialogue state tracking method based on slot awareness and task tag guidance includes the following steps: 1) Construct a dialogue state tracking task tag knowledge base. Obtain raw data containing dialogue context and slot information. Use a large language model combined with preset rules to parse and annotate the user's semantic actions in the dialogue data to generate task tags. Construct a tag knowledge base from a sample set containing dialogue context, slot information, and corresponding task tags. The slot information includes the target slot and slot description.

[0033] 2) Construct a dialogue state tracking network model based on slot awareness and task label guidance. This model includes modules for collaborative slot activation prediction, task label generation, and state generation. The slot activation prediction module uses a dual-tower encoder to calculate semantic similarity to filter candidate slots. It introduces a domain prefix random masking mechanism in the prompt construction to focus on the core semantics of the slots and maintains a slot-level rolling memory to record historical activation texts. It distinguishes between simple mentions and actual activations by comparing semantic offsets and outputs a set of activated slots. The task tag generation module based on retrieval enhancement utilizes similar samples in the current information retrieval knowledge base to execute a tag balance screening strategy to limit high-frequency tags and retain long-tail tags for recall. The screened examples are used as contextual demonstrations to guide the large language model to generate task tags that represent user semantic actions. The state generation module will activate the slot set and the tag input language model, and execute specific state update logic, including new value extraction, old value overwriting, setting to empty, confirmation of recommendation or inheritance of history, according to the semantic action type indicated by the tag, to generate the final dialogue state.

[0034] 3) The constructed dialogue state tracking network model based on slot awareness and task label guidance is used for state tracking tasks in multi-turn dialogues.

[0035] In this embodiment, raw data containing dialogue context and slot information is obtained from public datasets including MultiWOZ 2.1 and SGD. MultiWOZ 2.1 is currently the most representative large-scale multi-domain dataset in the field of dialogue state tracking, containing approximately 10,438 multi-turn dialogues covering seven related domains, including restaurants, hotels, tourist attractions, trains, and taxis. It is used to verify the model's state tracking ability in complex multi-turn interactions and domain switching scenarios. The SGD dataset is an even larger graph-guided dialogue dataset containing over 22,800 dialogues covering services in over 40 domains. Its test set includes domains not present in the training set, primarily used to verify the model's cross-domain generalization ability in zero-shot scenarios. The raw data includes multi-turn dialogue text, a predefined set of slots, natural language descriptions of the slots, and dialogue state labels for each turn. Based on prompts, corresponding task labels are generated by a large language model and constructed using rules. A tag knowledge base is formed, wherein the specific definitions of the task tags are as follows: Constrain: This indicates that the user has proposed a new specific value constraint for a slot in the current round. Change: This indicates that the user has modified or corrected the slot value that existed in the previous round; Dontcare: This indicates that the user has explicitly stated that they have no preference or restriction on the value of this slot; Confirm: This indicates that the user has accepted and confirmed the entity attributes recommended by the system in the previous round; Refer: Indicates that the user has used the reference to reuse historical information or information provided by the system; Notask: Indicates that there were no valid changes to the slot in this round.

[0036] Figure 1 This is an architecture diagram of the dialogue state tracking network model based on slot awareness and task tag guidance in this embodiment. Figure 1 As shown, the specific implementation method of the dialogue state tracking network model is as follows.

[0037] A) Construct a slot activation prediction module, which concatenates the current round of dialogue with the previous round of dialogue as the retrieval input, and uses a sentence vector encoder to encode the retrieval input and the natural language description of all slots respectively. Calculate and sort the cosine similarity between the context semantic vector and the slot description vector, and obtain the Top-K candidate slot set for subsequent discrimination and construction of positive and negative samples.

[0038] For each candidate slot, a prompt input is constructed. During this process, a domain prefix random masking mechanism is introduced to remove domain-specific words from the slot name with a certain probability, preserving the core semantics to improve cross-domain generalization ability. Simultaneously, a slot-level rolling memory is introduced, retrieving the historical dialogue text from the last time the slot was activated. If the current dialogue and the remembered content have a semantic shift, it is considered activated; otherwise, it is considered mentioned. The masked slot description, rolling memory, and current dialogue are input into a large language model, outputting a binary label indicating whether the slot is activated in the current round. The specific implementation method of the slot activation prediction module is as follows: The slot activation prediction module receives the first Wheel of system speech Speaking with users Previous round of system speeches User comments and all slot sets Natural Language Description As input, where This represents the total number of slots. The module aims to accurately determine the set of slots actually activated by the user in the current round during dynamic dialogues, based on dual-tower semantic matching and adversarial cue learning. Furthermore, by employing domain masking and memory comparison mechanisms, the overfitting of the dialogue state tracking network model to domain vocabulary and the confusion between "mention" and "activation" are reduced, thus providing accurate trigger signals for subsequent state updates.

[0039] First, the module performs candidate slot retrieval based on dual-tower vector encoding. We construct the... Wheel of search input text It is composed of the current round of dialogue and the short context of the previous round, in sequence. This indicates that the content will be concatenated. ; To balance retrieval efficiency and semantic alignment accuracy, this module uses a sentence vector encoder with shared parameters. For each search input and natural language description of each slot Encode to obtain the context semantic vector With slot semantic vector And through cosine similarity Calculate the semantic relevance between them: ; in Indicates semantic similarity score, This indicates the calculation of the L2 norm of a vector. This represents the vector dot product operation. Based on similarity ranking, Senbert selects the Top-K most matching slots to form the candidate slot set for the current round. This filters out the vast majority of irrelevant slots.

[0040] Secondly, for each of the selected candidate slots The module constructs prompts that incorporate adversarial features. , This represents the cue containing adversarial features constructed for slot s in the t-th round of dialogue. To improve cross-domain generalization ability, a domain prefix random occlusion mechanism is designed. Let... For each round, the probability of triggering occlusion is given. Define a binary switch variable .when When (probability is) ), execute the masking operator Removing the domain prefix from the slot name yields the masked slot representation. : ; This mechanism forces large language models to focus on the core semantics of slots (such as "name") rather than domain-specific qualifiers (such as "hotel-"), thereby improving the model's transferability to unseen domains. The similarity candidate constructs, generated by Senbert's computation, are then input into the large language model for judgment.

[0041] Meanwhile, to enhance the discriminability of referencing and cross-wheel inheritance, the module maintains a slot-level scroll memory. The original dialogue text from the most recent activation; if the slot has never been activated, then The final constructed input prompt The current dialogue, scroll memory, and processed slot description are merged and formally represented as follows: ; in This is a fixed prompt template function. Input large language model The result of determining whether the slot is active is obtained. According to this definition, the first The set of predicted activation slots is Finally, update the rolling memory based on the prediction results: for all slots determined to be active. Update its scrolling memory to the current round of dialogue text. , This indicates the memory text after this update; for inactive slots, the memory remains unchanged. .

[0042] B) Construct a task tag generation module based on retrieval enhancement. For activated slots, concatenate the dialogue context and slot description into a query vector, and retrieve the most semantically similar historical samples from the tag knowledge base. Perform a tag balancing filtering strategy on the recalled sample set, prioritizing similarity ranking while setting a maximum retention quantity for different categories of tags to limit high-frequency tag examples and retain long-tail tag examples. Use the filtered example set as a context demonstration, assemble it with the current dialogue to form retrieval enhancement prompts, and input it into a large language model to generate task tags that characterize the user's semantic actions. The specific implementation method of the task tag prediction module is as follows: The task tag generation module based on search enhancement accepts the first Wheel of system speech Previous round of system speeches Currently active target slot Slot Description And slot scroll memory As input, the module aims to leverage a non-parametric external knowledge base and, through in-context learning, generate task labels that characterize the user's semantic actions for each activation slot. The label value space is .

[0043] First, the module performs similar sample retrieval based on a pre-built tag knowledge base. (Define the tag knowledge base.) ,in The total number of samples, This is the sample dialogue text. This represents the slot name of the i-th sample in the knowledge base. For the description of its corresponding slot, This is the real-world task label generated by combining a large language model with rule annotations. The module first constructs the search query text for the current round. , Let represent the retrieval query text constructed for slot s in wheel t. This query integrates the dialogue context, slot semantics, and historical memory, and is formally represented as: ; At the same time, define knowledge base samples For the concatenation of sample context and slot description Using a sentence vector encoder The query will be performed separately. With all sample keys Mapping to vector representation and And calculate the cosine similarity: ; Sort by similarity in descending order and select the top... The initial recall set consists of 10 samples. Secondly, to address the issue of uneven label distribution in the training data leading to high-frequency categories (such as Constraint) dominating retrieval results and thus weakening the model's predictive ability for long-tail categories (such as Confirm and Refer), the module implements a label balancing filtering strategy on the initial recall set. The filtering function is defined. Its execution logic is as follows: for each category in the complete set of tags... The tags were filtered out. The samples were selected and the previous ones were retained based on similarity. Here's an example; if a category has insufficient samples, all samples are retained. The filtered samples from each category are then merged to obtain enhanced search results. , This indicates the enhanced search results for slot s of wheel t: ; This strategy, through the dual constraints of "similarity-diversity," forces the preservation of contextual examples of long-tail labels, thereby improving the semantic discrimination accuracy of the dialogue state tracking network model in scenarios with few samples.

[0044] Finally, construct search enhancement suggestions. , This represents the search enhancement hint constructed for slot t in round t, and generates a label. This hint is generated by a task instruction (constraining the output to come from a set). ), current dialogue sample information and retrieved example set Composition. Search examples are inserted into the prompt in a uniform "input-output" format as a demonstration. Input a large language model and directly generate task tags for the current slot: ; The final label This will be used to guide the specific update logic of the subsequent state generation module.

[0045] C) Construct a state generation module, inputting the generated task labels, the previous predicted state, slot descriptions, and dialogue context into the large language model; the model performs state updates based on the semantic action type indicated by the task label: when the label is Constraint, extract new constraint values ​​from the dialogue; when the label is Change, overwrite the old value with the new value; when the label is Dontcare, set the state to the "don't care" flag; when the label is Confirm, confirm the value from the system recommendations; when the label is Refer, inherit the previous state value; when the label is Notask, keep the state unchanged; finally, output the updated dialogue state. The specific implementation method of the state generation module is as follows: The state generation module accepts the first The dialogue context of the wheel Previous round of dialogue status Currently active slot set And the task label mapping generated in step C. As input, the module aims to perform fine-grained conditional updates to the dialogue state based on the semantic action type indicated by the task label, generating the predicted state for the current round. .

[0046] First, the module executes an incremental update strategy based on the activation set. The update strategy is as described in the formula: That is, for any set not included in the activation set Slot s in the middle, the state of this round This is equivalent to the state of the slot in the previous round. This ensures the stability of the state and reduces computational redundancy.

[0047] Secondly, for each activated slot Construction state generation prompt To enable the dialogue state tracking network model to execute the specific update logic specified by the label, cue word templates... Task tag information is explicitly integrated. (Hint) Based on dialogue history and current slot description The status value of this slot in the previous round and the currently predicted task labels Common components: ; This suggestion forces large language models to not only focus on contextual semantics, but also to follow... Defined action constraints (such as "extract from system response" or "set state to null") are used to generate the final slot value. .

[0048] Finally, the input will be prompted to the large language model, based on the task labels. The following specific state update logic is executed for the category to obtain the first... Wheel slot update value ; like (New Constraint): Indicates that the user has proposed new constraints in the current round, and the model starts from the user's statement. Extract specific slot values ​​as Write status; like (Modify / Replace): Indicates that the user has modified the existing constraints, and the large language model generates new values ​​based on the current semantics. and overwrite the previous state. ; like (Don't care): This indicates that the user has explicitly removed the restriction on this slot. The large language model will explicitly update the state value to a predefined special marker (such as "dontcare"). like (Confirm Recommendation): Indicates that the user has accepted the entity attributes recommended by the system. The large language model speaks from the system. Or, during system actions, backtrack and extract the confirmed value as... ; like (Referential Inheritance): This indicates that the user used a referential expression (such as "the same as the one before"). The large language model parses referential relationships, prioritizing the previous state. Or extract the referred value from the dialogue history as ; like (No Update): This indicates that although the slot was mentioned, no substantial information change occurred, and the status remains unchanged. .

[0049] Finally, by combining the update results of all slots, the first slot is output. The complete dialogue state of the wheel .

[0050] D) During training, slot activation, task label classification, and state generation are uniformly modeled as a sequence generation task, and the generation loss is calculated using the negative log-likelihood loss function; the parameters of the large language model are optimized through backpropagation, where some pre-trained parameters of the language model can be frozen to reduce training costs.

[0051] This invention optimizes the parameters of a large language model by employing a causal language modeling objective. It unifies slot activation discrimination, task label classification, and state value generation into a prompt-based sequence generation task and trains them within a unified autoregressive framework. Given the massive number of parameters in the large language model, Low-Rank Adaptation (LoRA) is used for efficient parameter fine-tuning. During training, input prompts are incorporated. With target output (Including real activation tags, task tags, and status values) concatenated into a complete sequence, only applicable to the target output. Calculate the negative log-likelihood loss for the token: ; in, This represents the total number of tokens in the output sequence, and j represents the lexical index of the current generation step, with a value ranging from 1 to L. This represents the target word sequence that has been generated up to step j. This represents a large language model given an input context X and prior history. Under the given conditions, predict the current position as the correct word. The conditional probability is calculated. By iteratively minimizing this loss function, the large language model is driven to accurately learn the joint generation logic of multiple tasks by combining contextual information and retrieval examples.

[0052] The present invention also provides a dialogue state tracking system based on slot awareness and task tag guidance, characterized in that it includes a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, it can implement the above-mentioned method steps.

[0053] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0054] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0056] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0057] The above description is only a preferred embodiment of the present invention and should not be construed as a limitation of this application. All equivalent changes and modifications made in accordance with the scope of the patent application of the present invention should be covered by the present invention.

Claims

1. A dialogue state tracking method based on slot awareness and task tag guidance, characterized in that, Includes the following steps: 1) Construct a dialogue state tracking task tag knowledge base, obtain raw data containing dialogue context and slot information, use a large language model combined with preset rules to parse and annotate the semantic actions of users in the dialogue data, generate task tags, and construct a tag knowledge base by constructing a sample set containing dialogue context, slot information and corresponding task tags. 2) Construct a dialogue state tracking network model based on slot awareness and task tag guidance. The dialogue state tracking network model includes a collaborative slot activation prediction module, a retrieval-enhanced task tag generation module, and a state generation module. The slot activation prediction module uses a dual-tower encoder to calculate semantic similarity to filter candidate slots. It introduces a domain prefix random masking mechanism in the prompt construction to focus on the core semantics of the slots and maintains a slot-level rolling memory to record historical activation texts. It distinguishes between simple mentions and actual activations by comparing semantic offsets and outputs a set of activated slots. The task tag generation module based on retrieval enhancement utilizes similar samples in the current information retrieval knowledge base to execute a tag balance screening strategy to limit high-frequency tags and retain long-tail tags for recall. The screened examples are used as contextual demonstrations to guide the large language model to generate task tags that represent user semantic actions. The state generation module inputs the set of activation slots and task tags into the large language model, and executes specific state update logic, including new value extraction, old value overwriting, setting to empty, confirming recommendation or inheriting history, according to the semantic action type indicated by the tag, to generate the final dialogue state. 3) The constructed dialogue state tracking network model based on slot awareness and task label guidance is used for state tracking tasks in multi-turn dialogues.

2. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 1, characterized in that, In step 1), raw data containing dialogue context and slot information is obtained from public datasets including MultiWOZ2.1 and SGD. The raw data includes multi-turn dialogue text, a predefined set of slots, natural language descriptions of the slots, and dialogue state labels for each turn. Based on the prompts, corresponding task labels are generated by a large language model and constructed using rules. And form a tag knowledge base.

3. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 1, characterized in that, In step 2), the implementation method of the dialogue state tracking network model is as follows: A) Construct a slot activation prediction module, which concatenates the current round of dialogue with the previous round of dialogue as the retrieval input, uses a sentence vector encoder to encode the retrieval input and the natural language description of all slots respectively, calculates and sorts the cosine similarity between the context semantic vector and the slot description vector, and obtains the Top-K candidate slot set for subsequent discrimination and construction of positive and negative samples. For each candidate slot, a prompt input is constructed. During this process, a domain prefix random masking mechanism is introduced to remove domain qualifiers from the slot name with a certain probability, while retaining the core semantics to improve cross-domain generalization ability. At the same time, a slot-level rolling memory is introduced to retrieve the historical dialogue text when the slot was last activated. If there is a semantic shift between the current dialogue and the memory content, it is considered activated; otherwise, it is considered mentioned. The masked slot description, rolling memory, and current dialogue are input into the large language model, and a binary label is output to determine whether the slot is activated in the current round. B) Construct a task tag generation module based on retrieval enhancement. For activated slots, concatenate the dialogue context and slot description into a query vector, and retrieve several historical samples with the most similar semantics from the tag knowledge base. Perform a tag balance screening strategy on the recalled sample set. While maintaining the similarity ranking priority, set a maximum number of tags to be retained for different categories to limit high-frequency tag examples and retain long-tail tag examples. Use the filtered example set as a context demonstration, assemble it with the current dialogue to form a retrieval enhancement prompt, and input it into a large language model to generate task tags that characterize the user's semantic actions. C) Construct a state generation module that inputs the generated task labels, the previous predicted state, slot descriptions, and dialogue context into the large language model. The large language model performs state updates based on the semantic action type indicated by the task label: when the label is Constraint, extract new constraint values ​​from the dialogue; when the label is Change, overwrite the old value with the new value; when the label is Dontcare, set the state to the "don't care" flag; when the label is Confirm, confirm the value from the system's recommendations; when the label is Refer, inherit the previous state value; when the label is Notask, keep the state unchanged; finally, output the updated dialogue state. D) During training, slot activation, task label classification, and state generation are uniformly modeled as a sequence generation task, and the generation loss is calculated using the negative log-likelihood loss function. Optimize the parameters of a large language model through backpropagation.

4. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 3, characterized in that, In step A), the specific implementation method of the slot activation prediction module is as follows: The slot activation prediction module receives the first Wheel of system speech Speaking with users Previous round of system speeches User comments and all slot sets Natural Language Description As input, where This represents the total number of slots. The goal of the slot activation prediction module is to accurately determine the set of slots actually activated by the user in the current round during dynamic dialogue, based on dual-tower semantic matching and adversarial prompt learning. Furthermore, by employing domain masking and memory comparison mechanisms, the overfitting of the dialogue state tracking network model to domain vocabulary and the confusion between "mention" and "activation" are reduced, thus providing accurate trigger signals for subsequent state updates. First, the slot activation prediction module performs candidate slot retrieval based on dual-tower vector encoding; constructing the... Wheel of search input text It is composed of the current round of dialogue and the short context of the previous round, pieced together in sequence: ; in This indicates that the content will be combined. To balance retrieval efficiency and semantic alignment accuracy, the slot activation prediction module uses a sentence vector encoder with shared parameters. For each search input and natural language description of each slot Encode to obtain the context semantic vector With slot semantic vector ; and through cosine similarity Calculate the semantic relevance between them: ; in Indicates semantic similarity score, This indicates the calculation of the L2 norm of a vector. This represents the vector dot product operation; based on similarity, Senbert selects the Top-K most matching slots to form the candidate slot set for the current round. This filters out the vast majority of irrelevant slots. Secondly, for each of the selected candidate slots Constructing prompts that incorporate adversarial features ; This represents the cue with adversarial features constructed for slot s in the t-th round of dialogue; to improve cross-domain generalization ability, a domain prefix random occlusion mechanism is designed; let... For each round, the probability of triggering occlusion is given. Define a binary switch variable ;when At that time, the masking operator is executed. Removing the domain prefix from the slot name yields the masked slot representation. : ; This mechanism forces large language models to focus on the core semantics of slots rather than domain-specific qualifiers, thereby improving the model's ability to transfer to unseen domains. Meanwhile, to enhance the discriminability of referencing and cross-wheel inheritance, the slot activation prediction module maintains a slot-level rolling memory. It stores slots The original dialogue text from the most recent activation; If the slot has never been activated, then The final constructed input prompt The current dialogue, scroll memory, and processed slot description are merged and formally represented as follows: ; in For a fixed prompt template function; Input large language model The result of determining whether the slot is active is obtained. Based on this definition, the first The set of predicted activation slots is Finally, update the rolling memory based on the prediction results: for all slots determined to be active. Update its scrolling memory to the current round of dialogue text, that is , This indicates the memory text after this update; for inactive slots, the memory remains unchanged. .

5. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 3, characterized in that, In step B), the specific implementation method of the task tag generation module based on retrieval enhancement is as follows: The task tag generation module based on search enhancement accepts the first Wheel of system speech Previous round of system speeches User comments U t-1 Currently active target slot Slot Description And slot scroll memory As input, the goal of the retrieval-enhanced task tag generation module is to utilize a non-parametric external knowledge base and, through contextual learning, generate task tags that characterize the user's semantic actions for each activation slot. The label value space is ; First, the task tag generation module based on retrieval enhancement performs similar sample retrieval based on a pre-built tag knowledge base; defining the tag knowledge base. ,in The total number of samples, This is the sample dialogue text. This represents the slot name of the i-th sample in the knowledge base. Describe its corresponding slot. These are real-world task labels generated by combining a large language model with rule annotations. The task tag generation module based on search enhancement first constructs the search query text for the current round. , Let represent the retrieval query text constructed for slot s in wheel t. This query integrates the dialogue context, slot semantics, and historical memory, and is formally represented as: ; At the same time, define the retrieval key text for the knowledge base samples. For the concatenation of sample context and slot description ; Using sentence vector encoder The query will be performed separately. With all sample keys Mapping to vector representation and And calculate the cosine similarity: ; Sort by similarity in descending order and select the top... The initial recall set consists of 10 samples. ; Secondly, to address the issue of uneven label distribution in the training data leading to high-frequency categories dominating retrieval results and thus weakening the model's ability to predict long-tail categories, a label balancing filtering strategy is implemented on the initial recall set based on the retrieval enhancement task label generation module; a filtering function is defined. Its execution logic is as follows: for each category in the complete set of tags... ,exist The tags were filtered out. The samples were selected and the previous ones were retained based on similarity. One example; If there are insufficient samples in a certain category, all samples are retained; the filtered samples from all categories are merged to obtain enhanced search results. , This indicates the enhanced search results for slot s of wheel t: ; The tag balance filtering strategy, through the dual constraints of "similarity-diversity", forces the retention of contextual examples of long-tail tags, thereby improving the semantic discrimination accuracy of the dialogue state tracking network model in scenarios with few samples. Finally, construct search enhancement suggestions. And generate tags, This indicates the search enhancement suggestion constructed for slot t in round t; search enhancement suggestion The task instructions, current dialogue sample information, and retrieved example set Composition; retrieval examples are inserted in the prompts in a uniform "input-output" format as a demonstration; Input a large language model and directly generate task tags for the current slot: ; The final label This will be used to guide the specific update logic of the subsequent state generation module.

6. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 3, characterized in that, In step C), the specific implementation method of the state generation module is as follows: The state generation module accepts the first The dialogue context of the wheel Previous round of dialogue status Currently active slot set And the task label mapping generated in step C As input, the goal of the state generation module is to perform fine-grained conditional updates on the dialogue state based on the semantic action type indicated by the task label, and generate the predicted state for the current round. ; First, the state generation module executes an incremental update strategy based on the activation set; The update strategy is as described in the formula: That is, for any set not included in the activation set Slot s in the middle, the state of this round This is equivalent to the state of the slot in the previous round. This ensures the stability of the state and reduces computational redundancy; Secondly, for each activated slot Construction state generation prompt In order for the dialogue state tracking network model to execute the specific update logic specified by the label, the prompt word template... Explicitly integrates task tag information; hints Based on dialogue history and current slot description The status value of this slot in the previous round and the currently predicted task labels Common components: ; This suggestion forces large language models to not only focus on contextual semantics, but also to follow... Define action constraints to generate the final slot value. ; Finally, the input will be prompted to the large language model, based on the task labels. The following specific state update logic is executed for the category to obtain the first... Wheel slot update value ; like This indicates that the user has proposed new constraints in the current round, and the model starts from the user's statement. Extract specific slot values ​​as Write status; like This indicates that the user has modified existing constraints, and the large language model generates new values ​​based on the current semantics. and overwrite the previous state. ; like This indicates that the user has explicitly removed the restriction on the slot, and the large language model will explicitly update the state value to a predefined special marker; like This indicates that the user has accepted the entity attributes recommended by the system, and the large language model speaks from the system. Or, during system actions, backtrack and extract the confirmed value as... ; like This indicates that the user used referential expression. The large language model parses the referential relationship, prioritizing the previous state. Or extract the referred value from the dialogue history as ; like This indicates that although the slot was mentioned, no substantial information change occurred, and the status remains unchanged. ; Finally, by combining the update results of all slots, the first slot is output. The complete dialogue state of the wheel .

7. The dialogue state tracking method based on slot awareness and task tag guidance according to claim 3, characterized in that, In step D), the parameters of the large language model are optimized using the causal language modeling objective; slot activation discrimination, task label classification, and state value generation are all uniformly modeled as prompt-based sequence generation tasks and trained under a unified autoregressive framework. Given the massive number of parameters in large language models, a low-rank adaptation technique is employed for efficient parameter fine-tuning. Input prompts will be provided during training. With target output Concatenate into a complete sequence, only for those belonging to the target output. Calculate the negative log-likelihood loss for the token: ; in, This represents the total number of tokens in the output sequence, and j represents the lexical index of the current generation step, with a value ranging from 1 to L. This represents the target word sequence that has been generated up to step j. This represents a large language model given an input context X and prior history. Under the given conditions, predict the current position as the correct word. The conditional probability; By iteratively minimizing this loss function, the large language model is driven to accurately learn the joint generation logic of multiple tasks by combining contextual information and retrieval examples.

8. A dialogue state tracking system based on slot awareness and task tag guidance, characterized in that, It includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor, which, when executed by the processor, enable the implementation of the method as described in any one of claims 1-7.