Label extraction method and related device

By combining multi-level label pools and mutual exclusion relationships, the problem of inaccurate label extraction in specific semantic analysis of natural language base models is solved, achieving more refined semantic capture and label extraction, and improving the robustness and adaptability of the model.

CN121683801APending Publication Date: 2026-03-17MIDEA GRP (SHANGHAI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511896465.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing natural language base models are prone to inaccurate label extraction due to semantic misunderstandings when analyzing specific mutually exclusive or co-occurrence semantics, and lack robustness.

Method used

By combining multi-level tag pools and mutual exclusion relationships, the system parses the statements to be processed through multi-level tag pools and uses semantic classification and mutual exclusion relationships of tags at different levels to filter out semantically incompatible tag combinations, thereby improving the accuracy and robustness of tag extraction.

Benefits of technology

It achieves more refined semantic capture, avoids information omission and semantic deviation, improves the accuracy and adaptability of tag extraction, and is suitable for a wider range of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121683801A_ABST
    Figure CN121683801A_ABST
Patent Text Reader

Abstract

The invention discloses a label extraction method and a related device. The method comprises the steps that a to-be-processed statement is analyzed by utilizing a target model in combination with a multi-level label pool, at least one multi-level candidate label corresponding to the to-be-processed statement is obtained, the multi-level label pool comprises at least two levels of label systems, and different levels of labels correspond to semantic classifications of different granularities; and screening the at least one multi-level candidate tag based on a mutual exclusion relationship among different tags in the multi-level tag pool to obtain at least one target multi-level feature tag corresponding to the to-be-processed statement, so that more refined semantic capture is realized through at least two levels of tag systems in the multi-level tag pool; the problem of information omission or semantic deviation possibly caused by a single-granularity label is avoided, semantically incompatible label combinations are excluded by utilizing a mutual exclusion relationship among different labels in the multi-level label pool, target model understanding deviation caused by user semantic fuzziness or errors is reduced, and the accuracy and robustness of label extraction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language understanding technology, and in particular to a label extraction method and related apparatus. Background Technology

[0002] In an era teeming with general and domain-specific base models for natural language processing, these models have achieved a broad understanding of general language through large-parameter neural networks and massive training corpora. Compared to traditional natural language understanding methods that require separate modeling (or summarizing parameters or patterns) based on corpora from specific domains or ranges, natural language base models can analyze most corpora themselves, possessing a certain "no need for remodeling" characteristic.

[0003] However, relying solely on large parameter base models to analyze corpora, while its generalization analysis capability can resolve the feature labels of most corpora, is prone to inaccurate label extraction due to semantic misunderstanding when analyzing specific mutually exclusive or co-occurrence semantics. Summary of the Invention

[0004] This application provides a tag extraction method and related apparatus. It achieves more refined semantic capture through a tag system of at least two levels in a multi-level tag pool, avoiding information omissions or semantic deviations that may be caused by single-granularity tags. Furthermore, it utilizes the mutual exclusion relationship between different tags in the multi-level tag pool to exclude semantically incompatible tag combinations, reducing the deviation in target model understanding caused by user semantic ambiguity or errors, thus improving the accuracy and robustness of tag extraction. The above technical solution is as follows: In a first aspect, embodiments of this application provide a tag extraction method, the method comprising: Using the target model and combining it with a multi-level tag pool, the statement to be processed is parsed to obtain at least one multi-level candidate tag corresponding to the statement to be processed; the multi-level tag pool includes a tag system of at least two levels, and different levels of tags correspond to semantic classifications of different granularities. Based on the mutual exclusion relationship between different tags in the multi-level tag pool, at least one multi-level candidate tag is filtered to obtain at least one target multi-level feature tag corresponding to the statement to be processed; the mutual exclusion relationship is used to exclude semantically incompatible tag combinations.

[0005] Secondly, embodiments of this application provide a label extraction device, which includes: The tag parsing module is used to parse the statement to be processed using the target model and a multi-level tag pool to obtain at least one multi-level candidate tag corresponding to the statement to be processed. The multi-level tag pool includes a tag system of at least two levels, with different levels of tags corresponding to different granularities of semantic classification. The tag filtering module is used to filter at least one multi-level candidate tag based on the mutual exclusion relationship between different tags in the multi-level tag pool, so as to obtain at least one target multi-level feature tag corresponding to the statement to be processed; the mutual exclusion relationship is used to exclude semantically incompatible tag combinations.

[0006] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory; The processor is connected to the memory. The aforementioned memory is used to store executable program code; The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to execute the method provided in the first aspect of the embodiments of this specification.

[0007] Fourthly, embodiments of this application provide a computer storage medium storing multiple instructions adapted for loading and executing the method steps provided in the first aspect of embodiments of this application by a processor.

[0008] Fifthly, embodiments of this specification provide a computer program product containing instructions that, when run on a computer or processor, cause the computer or processor to execute the method steps provided by the first aspect of the embodiments of this specification or any possible implementation thereof.

[0009] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: In one or more embodiments of this application, on the one hand, a target model is used in conjunction with a multi-level tag pool to parse the statement to be processed, thereby obtaining at least one multi-level candidate tag corresponding to the statement to be processed. The multi-level tag pool includes a tag system of at least two levels, with different levels of tags corresponding to semantic classifications of different granularities. Thus, by using the target model in conjunction with the multi-level tag pool to parse the statement to be processed, more refined semantic capture can be achieved through the tag system of at least two levels in the multi-level tag pool (corresponding to semantic classifications of different granularities). This avoids the problem of information omission or semantic deviation that may be caused by single-granularity tags. The obtained multi-level candidate tags can more comprehensively and meticulously reflect the semantics of the statement to be processed, which not only improves the accuracy and comprehensiveness of tag extraction, but also enhances the adaptability and flexibility of the target model. It can handle statements of different types and complexities and is suitable for a wider range of application scenarios. On the other hand, by using the mutual exclusion relationship between different labels in the multi-level label pool to filter at least one multi-level candidate label, semantically incompatible label combinations are eliminated, thereby reducing the bias in the understanding of the target model caused by user semantic ambiguity or error, further improving the accuracy and robustness of label extraction, and making the extracted target multi-level feature labels more reasonable and rigorous.

[0010] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A schematic diagram of the structure of a tag extraction system provided for an exemplary embodiment of this application; Figure 2 A schematic flowchart of a tag extraction method provided for an exemplary embodiment of this application; Figure 3 A schematic diagram illustrating the construction process of a multi-level tag pool provided for an exemplary embodiment of this application; Figure 4 A schematic diagram illustrating the construction process of a multi-level tag pool provided for an exemplary embodiment of this application; Figure 5 A schematic diagram illustrating a process for determining a mutual exclusion relationship, provided for an exemplary embodiment of this application; Figure 6 A schematic diagram of a tag extraction device provided for an exemplary embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation

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

[0014] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0015] Please refer to the following. Figure 1 This is a schematic diagram of the architecture of a label extraction system provided in an exemplary embodiment of this specification. Figure 1 As shown, the tag extraction system may include: a user terminal 110 and a server 120. Wherein: User terminal 110 can interact with server 120 via a network to receive messages from or send messages to server 120. User terminal 110 can be hardware or software. When the terminal is hardware, it can be various electronic devices, including but not limited to smartwatches, smartphones, smart displays, tablets, laptops, and desktop computers with relevant software installed. When the terminal is software, it can be installed in the electronic devices listed above, and it can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.

[0016] Specifically, the user terminal 110 may be used, but is not limited to, to provide users with voice or text interaction functions, such as home devices, mobile phones and other electronic devices with interactive functions.

[0017] Optionally, the user terminal 110 can also establish a data relationship with the network and establish a data connection relationship with the server 120 through the network. For example, it can send the user-input statement to be processed, the original context dialogue dataset, etc. to the server 120, and receive at least one target multi-level feature label corresponding to the statement to be processed returned by the server 120.

[0018] Server 120 can be a server providing various tag extraction functions, providing computing resources and storage space for the tag extraction software running on client 110. It should be noted that server 120 can be hardware or software. When server 120 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 120 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here. Server 120 can be, but is not limited to, a hardware server, a virtual server, a cloud server, etc.

[0019] Specifically, server 120 can obtain the tag extraction task to be executed through the network and perform the corresponding tag extraction through the tag extraction method provided in the embodiments of this application.

[0020] The network can be a medium that provides a communication link between the user terminal 110 and the server 120, or it can be the Internet, which includes network devices and transmission media, and is not limited to these. The transmission media can be a wired link, such as, but not limited to, coaxial cable, fiber optic cable, and digital subscriber line (DSL), or a wireless link, such as, but not limited to, wireless fidelity (WIFI), Hypertext Transfer Protocol (HTTP), Bluetooth, and mobile device networks.

[0021] Understandably, Figure 1 The number of client terminals 110 and servers 120 in the tag extraction system shown is only an example. In a specific implementation, the tag extraction system can contain any number of client terminals 110 and servers 120.

[0022] Next, combine Figure 1 This document describes the tag extraction method provided in the embodiments of this application. Please refer to [link / reference] for details. Figure 2 This is a flowchart illustrating a tag extraction method provided in an exemplary embodiment of this application. Figure 2 As shown, taking server-side tag extraction as an example, this tag extraction method includes the following steps: S201. Using the target model and a multi-level tag pool, the statement to be processed is parsed to obtain at least one multi-level candidate tag corresponding to the statement to be processed. The multi-level tag pool includes a tag system of at least two levels, and different levels of tags correspond to semantic classifications of different granularities.

[0023] Specifically, the target model can be, but is not limited to, a general large-parameter base model or a domain semantic understanding base model, used for deep semantic parsing of input statements. The multi-level tag pool contains a hierarchical tag structure from coarse-grained to fine-grained. For example, but not limited to, higher-level tags may represent broader semantic categories, while lower-level tags may represent more specific and detailed semantic categories.

[0024] Optionally, the aforementioned multi-level label pool is constructed by the target model based on the original contextual dialogue dataset through multi-level label extraction. This original contextual dialogue dataset and the statement to be processed belong to the same user's dialogue data, ensuring that the extraction of labels corresponding to the statement to be processed fully considers the user's personalized expression habits and contextual relevance. The target model dynamically captures key semantic units in the statement to be processed through an attention mechanism and matches the most relevant candidate label paths layer by layer in the multi-level label pool, ultimately outputting a set of multi-level candidate labels with hierarchical relationships and confidence scores, providing structured support for subsequent label decisions.

[0025] Optionally, when the target model is a large parameter fundamental model, the extraction of multi-level labels can be adapted through fine-tuning or prompting engineering. For example, but not limited to, supervised fine-tuning based on sample dialogue data with known multi-level labels, or unsupervised extraction of multi-level labels that conform to the hierarchical structure by guiding the target model according to the multi-level label extraction logic indicated in the pre-set target prompt words.

[0026] Optionally, during the parsing process, the target model can first identify the topic category corresponding to the statement to be processed, match high-level candidate tags, and then drill down layer by layer to lower-level tags, forming a multi-level tag path to refine semantic attribution. This hierarchical approach improves the accuracy and interpretability of tag matching. The selection of candidate tags at each level is based on a deep understanding of the contextual semantics, ensuring that lower-level tags maintain logical consistency within the higher-level semantic framework. The resulting multi-level candidate tags not only reflect the surface features of the statement but also embody its inherent semantic structure, providing a solid foundation for subsequent tag selection and application.

[0027] Optionally, the above-mentioned S201, which uses the target model and combines a multi-level tag pool to parse the statement to be processed and obtain at least one multi-level candidate tag corresponding to the statement to be processed, may include, but is not limited to: inputting the statement to be processed into the target model and extracting semantic information at least two levels; calculating the semantic similarity between the semantic information at least two levels and the corresponding level of tags in the multi-level tag pool, and determining at least one multi-level candidate tag corresponding to the statement to be processed based on the corresponding similarity calculation results.

[0028] The statement to be processed is input into the target model (such as a finely tuned large-parameter base model). The target model parses the statement and extracts semantic information at least two levels. For example, but not limited to, higher-level semantics may involve broad topic classifications (such as "disease classification"), while lower-level semantics captures more specific details (such as "disease corresponding symptoms"). Then, the similarity between the semantic representation vector of the statement to be processed at each level and the semantic vector corresponding to the candidate tags in the multi-level tag pool is calculated. Based on the corresponding similarity calculation results, candidate tags corresponding to at least two levels are determined. For example, but not limited to, candidate tags corresponding to each level are selected based on a preset similarity threshold or similarity ranking. Finally, the candidate tags at each level are associated and combined based on the hierarchical association rules between the tags at each level to obtain at least one multi-level candidate tag combination corresponding to the statement to be processed (such as "disease: cold - symptoms: fever"). The above hierarchical association rules are used to ensure the legality and consistency of the multi-level candidate tag combination in the semantic hierarchy structure and avoid cross-level conflicts or logical misalignments.

[0029] In this embodiment, on the one hand, the multi-level tagging system makes the tagging system more detailed and comprehensive, reflecting the semantic information of the statement to be processed from different levels and dimensions. For example, in the medical field, not only can the major disease category tag corresponding to the statement to be processed be accurately marked, but it can also be further refined to specific symptoms, treatment methods, and other detailed category tags, providing richer and more accurate basis for subsequent information retrieval and data analysis. On the other hand, determining the multi-level candidate tags corresponding to the statement to be processed based on semantic similarity calculation avoids the limitations of relying solely on keyword matching in traditional methods. Semantic similarity calculation can better capture the deeper meaning of the statement. Even if the expression in the statement to be processed is not completely consistent with the tag, it can be correctly matched as long as the semantics are similar, greatly improving the accuracy and flexibility of tag extraction.

[0030] Furthermore, multi-level tag pools can be flexibly adjusted and expanded according to different application scenarios and needs. For example, in the education field, tag levels such as course classification and teaching methods can be added; in the financial field, tag levels such as financial product types and risk levels can be added. Moreover, the target model can also adapt to new semantic understanding requirements through continuous training and optimization, enabling the tag extraction method to maintain high efficiency and accuracy.

[0031] S202, based on the mutual exclusion relationship between different labels in the multi-level label pool, at least one multi-level candidate label is filtered to obtain at least one target multi-level feature label corresponding to the statement to be processed.

[0032] Specifically, the aforementioned mutual exclusion relationships are used to exclude semantically incompatible tag combinations. These mutual exclusion relationships can exist in matrix form (e.g., but not limited to, a mutual exclusion matrix with the same tag dimensions as the corresponding tags in the multi-level tag pool), or in the form of a relationship list, or in the form of tag pairs with a specific structure (e.g., a structure similar to "tag A - tag B"). This application embodiment does not limit this. The mutual exclusion relationships between different tags in the aforementioned multi-level tag pool can include mutual exclusion relationships between different tags at different levels, or mutual exclusion relationships between different tags at the same level. This application embodiment does not limit this.

[0033] The above-mentioned process of filtering at least one multi-level candidate tag based on the mutual exclusion relationship between different tags in the multi-level tag pool may include, but is not limited to, the following: when multiple multi-level candidate tags corresponding to the statement to be processed are obtained, multiple candidate tags of the same level that have mutual exclusion relationships may be filtered and excluded according to the mutual exclusion relationship between different tags of the same level. For example, but not limited to, when the candidate tags of a certain level contain mutually exclusive tags such as "diabetes" and "non-diabetes", the one that matches the semantics of the statement to be processed better can be retained according to the mutual exclusion relationship, and the contradictory item can be eliminated.

[0034] and / or The above-mentioned process of filtering at least one multi-level candidate label based on the mutual exclusion relationship between different labels in the multi-level label pool can also include, but is not limited to, filtering and excluding multi-level candidate labels with mutual exclusion relationships directly based on the mutual exclusion relationship between different labels at different levels. For example, but not limited to, when the first-level candidate label in a multi-level candidate label is "cold", and the second-level candidate labels corresponding to the first-level candidate label include "foot pain" and "fever", since "foot pain" and "cold" have a weak correlation in medical common sense, they can be removed based on the cross-level mutual exclusion relationship, and only the second-level candidate label "fever" and its corresponding first-level candidate label "cold" are retained to form a semantically coherent and logically reasonable target multi-level feature label.

[0035] In some possible embodiments, the aforementioned target multi-level feature labels may, but are not limited to, carry the following target attribute information: label information at each level, target confidence, descriptive information associated with the labels, and the generation time corresponding to the target multi-level feature labels; the aforementioned target confidence may, but is not limited to, be determined by the target model based on the degree of semantic matching between the target multi-level feature labels and the statement to be processed; the aforementioned descriptive information associated with the labels is generated by the target model based on the statement to be processed and / or the original context dialogue dataset corresponding to the statement to be processed for the corresponding associated labels.

[0036] The label information at each level clearly displays the specific content of the target multi-level feature labels at different levels, which helps to classify and understand the labels in a more detailed manner. Target confidence, as a key indicator measuring the degree of matching between the target multi-level feature labels and the statement to be processed, relies on the precise analysis of the target model for its determination. The target model comprehensively considers various factors such as the semantics and syntactic structure of the statement to be processed, and calculates the semantic matching degree between the target multi-level feature labels and the statement to be processed through a semantic similarity algorithm, thereby determining the target confidence.

[0037] The descriptive information associated with the labels provides richer background and explanation for the target's multi-level feature labels. When generating this descriptive information, the target model makes full use of the content of the statement to be processed itself and the original contextual dialogue dataset corresponding to the statement. The original contextual dialogue dataset contains the specific context and related information of the statement to be processed, which helps the target model to more accurately understand the meaning of the statement to be processed, and thus generate detailed and accurate descriptive information for the corresponding associated labels.

[0038] The generation time of multi-level feature labels can reflect the order in which the labels were generated. When processing large amounts of data and labels, the generation time can be used to sort, filter, and update the labels, facilitating subsequent data analysis and processing. For example, when statistically analyzing labels over a period of time, the generation time can serve as an important dimension, helping users understand the generation status and trends of labels in different time periods.

[0039] In this embodiment, on the one hand, the target model is used in conjunction with a multi-level tag pool to parse the statement to be processed, obtaining at least one multi-level candidate tag corresponding to the statement. The multi-level tag pool includes at least two levels of tag system, with different levels of tags corresponding to different granularities of semantic classification. Thus, by using the target model in conjunction with the multi-level tag pool to parse the statement to be processed, more refined semantic capture can be achieved through the at least two levels of tag system (corresponding to different granularities of semantic classification) in the multi-level tag pool. This avoids the information omissions or semantic biases that may be caused by single-granularity tags. The obtained multi-level candidate tags can more comprehensively and meticulously reflect the semantics of the statement to be processed, improving both the accuracy and comprehensiveness of tag extraction and enhancing the adaptability and flexibility of the target model. It can handle statements of different types and complexities and is suitable for a wider range of application scenarios. On the other hand, the mutual exclusion relationship between different tags in the multi-level tag pool is used to filter the at least one multi-level candidate tag, eliminating semantically incompatible tag combinations. This reduces the target model's understanding bias caused by user semantic ambiguity or errors, further improving the accuracy and robustness of tag extraction, making the extracted target multi-level feature tags more reasonable and rigorous.

[0040] Please refer to the following. Figure 3 This is a schematic diagram illustrating the construction process of a multi-level tag pool provided in an exemplary embodiment of this application. Figure 3 As shown, the construction process of the multi-level tag pool in S201 above may include, but is not limited to, the following steps: S301, Obtain the original context dialogue dataset; the original context dialogue dataset and the dialogue data of the statement to be processed belong to the same user.

[0041] Specifically, the aforementioned original contextual dialogue dataset may include, but is not limited to, historical interaction records between the user and the device corresponding to the statement to be processed (i.e., historical contextual dialogue data). The aforementioned historical contextual dialogue data may include, but is not limited to, natural language expressions in various scenarios such as multi-person dialogue text, customer service conversation logs, and social platform comment data.

[0042] Optionally, after obtaining the original contextual dialogue dataset, the collected dataset can be filtered, rejected, and rewritten using a semantic normalization module, among other things. This normalizes the dataset into sentences containing normal casual conversation or commands, while removing sentences lacking normal semantics to ensure the purity and validity of the input data for the target model. The semantic normalization module can, but is not limited to, identify and remove meaningless characters, garbled text, advertising information, and obviously invalid dialogue using preset rules or lightweight models. It also standardizes and replaces homophones and abbreviations to improve subsequent processing efficiency. The processed original contextual dialogue dataset has clear semantics and a unified format, providing a high-quality data foundation for the construction of a multi-level label pool and further ensuring the accuracy and stability of label extraction in practical applications.

[0043] S302 utilizes the target model and combines target prompts to perform batch analysis on the original contextual dialogue dataset, and constructs a multi-level label pool based on the feature labels corresponding to at least two levels obtained from the analysis.

[0044] Specifically, the target model can be a model with strong semantic understanding and feature extraction capabilities. Target prompts can be designed, but are not limited to, based on specific business needs and tag extraction targets, to guide the target model to focus on specific semantic information and features when analyzing the original contextual dialogue dataset.

[0045] Optionally, during batch analysis, the target model processes each statement in the original contextual dialogue dataset one by one, deeply understanding the semantics of the statements, mining information related to the target prompt words, and extracting corresponding feature labels. These feature labels are divided into different levels according to their semantics and relevance. For example, in an e-commerce customer service dialogue scenario, the target prompt words may carry relevant descriptive information extracted from multiple levels of semantic information such as "product category," "product quality," and "after-sales service." When analyzing the original contextual dialogue dataset, the target model extracts feature labels corresponding to multiple levels from the original contextual dialogue dataset. In this way, the various feature labels obtained from the analysis are organized according to hierarchical relationships to construct a multi-level label pool. The construction of the multi-level label pool makes the label information more structured and systematic, facilitating subsequent management and use of labels. It can clearly show the relationship between different levels, as well as the specific feature labels under each level, providing strong support for further data analysis and business decision-making. At the same time, the multi-level label pool can also be dynamically adjusted and optimized as new data is continuously added and analysis results are updated to adapt to constantly changing business needs and data characteristics.

[0046] Optionally, the aforementioned multi-level tag pool can be, but is not limited to, a two-level tag pool. For example... Figure 4As shown, the above-mentioned S202, which utilizes the target model and combines target prompts to perform batch analysis on the original contextual dialogue dataset, and constructs the multi-level label pool based on the feature labels corresponding to at least two levels obtained from the analysis, may include, but is not limited to, the following: First, using the target model and combining target prompts to perform batch analysis on the original contextual dialogue dataset, extracting M first-level feature labels corresponding to the original contextual dialogue dataset (where M is a positive integer), which macroscopically summarize the core topic distribution of the original contextual dialogue dataset. Through batch analysis, the first-level feature labels provide the top-level semantic framework of the dataset, avoiding the information omission problem that may be caused by traditional single-granularity labels, and laying the foundation for subsequent fine-grained label extraction. At the same time, the guidance based on target prompts ensures that label extraction is highly aligned with business objectives, improving the efficiency and accuracy of subsequent processing. Then, using the target model and target prompts, unsupervised clustering (such as K-means or hierarchical clustering) is performed on the k keywords (representing the core fine-grained semantic units of the sentences) corresponding to each original dialogue statement in the original context dialogue dataset. This yields N secondary feature labels, where k and N are both positive integers. Therefore, unsupervised label extraction can be achieved through the target model without pre-labeling the original context dialogue dataset. The target prompts are used to constrain the clustering dimension, ensuring that the results remain related to the semantic level of the primary labels. This enables the extraction of specific features from a fine-grained perspective, such as further identifying specific problems like "short battery life" or "screen flickering" under the primary label "product quality". Unsupervised clustering reduces the dependence on labeled data, adapts to the diversity and dynamism of dialogue data, and enhances the coverage and detail richness of labels through keyword extraction and clustering. It avoids the subjectivity of manually defined labels, making the label system more reflective of the true data distribution and improving the completeness and practicality of subsequent multi-level label pools. Finally, based on the semantic hierarchy between the M primary feature labels and the N secondary feature labels (e.g., but not limited to semantic similarity calculation or rule matching), it is determined which secondary feature labels are semantically subordinate to specific primary feature labels, thus constructing a multi-level label pool with a two-tier structure. Each primary feature label in the multi-level label pool is associated with at least one semantically subordinate secondary feature label. The target prompt words can be dynamically generated, but not limited to, according to a preset multi-level semantic classification system, ensuring that the clustering process focuses on a specific semantic dimension. The dynamic generation of the target prompt words relies on the hierarchical division rules in the preset semantic classification system, ensuring that the extraction of feature labels at each level focuses on the corresponding semantic dimension.

[0047] In this embodiment, the constructed multi-level tag pool structures and systematizes tag information, supporting efficient data management, querying, and analysis. For example, during information retrieval, users can first quickly locate the broad category using first-level feature tags, and then refine the results using second-level tags, improving search accuracy and user experience. Semantic hierarchy ensures logical coherence between tags, reduces semantic bias, and provides high-quality feature input for machine learning and data analysis, enhancing the model's adaptability and decision support capabilities in vertical domains (such as e-commerce and healthcare).

[0048] Please refer to the following. Figure 5 This is a schematic diagram illustrating a process for determining a mutual exclusion relationship, provided in an exemplary embodiment of this application. Figure 5 As shown, the process for determining the mutual exclusion relationship in S202 above may include, but is not limited to, the following steps: S501, Obtain the original dialogue dataset.

[0049] Specifically, raw dialogue datasets can be obtained through various means. For example, but not limited to, they can be downloaded from publicly available dialogue data repositories corresponding to the scenarios in which the statements to be processed are located. These repositories often contain a large amount of dialogue data from different fields and scenarios, such as open-source customer service dialogue datasets and social media dialogue datasets. They possess a certain breadth and diversity, providing rich material for subsequent tag extraction. Alternatively, web scraping technology can be used, within legal and compliant limits, to crawl relevant dialogue data from websites such as forums and Q&A communities. However, when using web scraping, it is necessary to strictly abide by the website's usage rules and relevant laws and regulations to ensure the legality and standardization of data acquisition.

[0050] Optionally, after obtaining the original dialogue dataset, the data needs to be preliminarily cleaned and filtered to remove noisy data, duplicate data, etc., in order to improve the quality of the data and lay a good foundation for subsequent label extraction.

[0051] S502, Count the total number of times different tags in the same sentence of the original dialogue dataset are co-occurred in the multi-level tag pool.

[0052] Specifically, the original dialogue dataset can be analyzed sentence by sentence. For each sentence, check whether a tag from the multi-level tag pool appears in that sentence. To accurately count the total co-occurrence count, a suitable data structure needs to be designed to record the co-occurrence of tags. For example, but not limited to, a two-dimensional matrix can be used, where the rows and columns represent different tags in the multi-level tag pool, and the elements in the matrix represent the total co-occurrence count of two corresponding tags in the same sentence. During the traversal of the original dialogue dataset, when two different tags are found to appear simultaneously in a sentence, the value of the corresponding matrix element is incremented by 1. During the statistical process, care should be taken to avoid duplicate calculations. For each sentence, the co-occurrence count should be performed only once to ensure the accuracy of the statistical results. Furthermore, to improve statistical efficiency, multi-threading or distributed computing can be used to process large-scale original dialogue datasets.

[0053] After the statistics are completed, the total number of co-occurrences can intuitively reflect the degree of association between different labels. Label pairs with a high total co-occurrence frequency indicate that they frequently appear together in the original dialogue dataset and may have a strong semantic connection. These statistical results will provide important basis for subsequent label extraction and analysis, and help to uncover more valuable label information. S503, determine the mutual exclusion relationship between different tags in the multi-level tag pool based on the total number of co-occurrences of different tags in the multi-level tag pool.

[0054] Optionally, but not limited to, a threshold can be preset based on the total number of co-occurrences. If the total number of co-occurrences of two labels is equal to or lower than this threshold (e.g., but not limited to 0, 1, etc.), then the two labels are considered to have a mutually exclusive relationship. The setting of this threshold needs to take into account various factors such as the characteristics of the dataset and business requirements.

[0055] Alternatively, the mutual exclusion relationship can be further determined by calculating the co-occurrence probability between tags. The co-occurrence probability can be obtained by dividing the total number of co-occurrences by the total number of sentences. When the co-occurrence probability of two tags is less than or equal to a certain minimum value (e.g., but not limited to 0, 0.1, etc.), it can also be said that there is mutual exclusion between them.

[0056] Furthermore, to ensure the accuracy of mutual exclusion determination, semantic information of the tags can be used as an auxiliary factor. Some tags are clearly mutually exclusive semantically; even if they co-occur occasionally, they can still be identified as mutually exclusive tags based on semantics. Once the mutual exclusion relationships between different tags are determined, subsequent tag extraction and analysis can avoid extracting mutually exclusive tags simultaneously within a single statement, thus improving the accuracy and effectiveness of tag extraction. Optionally, the mutual exclusion relationships in this embodiment can also be predefined by domain experts or automatically learned from historical labeled data by machine learning models. Expert-defined mutual exclusion relationships have high reliability and are suitable for scenarios with strict accuracy requirements; while automatic model learning is more suitable for handling large-scale, dynamically changing datasets and can effectively reduce manual costs. The two methods can be used in combination to calibrate the model output through expert knowledge, further improving the robustness and adaptability of mutual exclusion relationship determination. This mechanism provides a reliable constraint basis for multi-label collaborative analysis. In practical applications, the mutual exclusion determination strategy can be flexibly adjusted according to specific task requirements. For example, in sentiment analysis scenarios, positive and negative sentiment labels are usually set as mutually exclusive, and even if they appear simultaneously in a few sentences, the possibility of co-occurrence is excluded based on semantic logic. For topic labels, such as "sports" and "technology," although the co-occurrence probability is extremely low, they should not be arbitrarily determined as mutually exclusive, but should be judged comprehensively in combination with the context. By integrating statistical regularity and semantic understanding, the constraint relationships between labels can be constructed more accurately, thereby improving the rationality and interpretability of the model output.

[0057] Please refer to the following. Figure 6 This is a schematic diagram of a tag extraction device provided in an exemplary embodiment of this application. Figure 6 As shown, the label extraction device 600 includes: The tag parsing module 610 is used to parse the statement to be processed using the target model and in combination with the multi-level tag pool to obtain at least one multi-level candidate tag corresponding to the statement to be processed; the multi-level tag pool includes a tag system of at least two levels, and different levels of tags correspond to semantic classifications of different granularities. The tag filtering module 620 is used to filter at least one multi-level candidate tag based on the mutual exclusion relationship between different tags in the multi-level tag pool, so as to obtain at least one target multi-level feature tag corresponding to the statement to be processed; the mutual exclusion relationship is used to exclude semantically incompatible tag combinations.

[0058] In one possible implementation, the tag parsing module 610 includes: The semantic information extraction unit is used to input the statement to be processed into the target model and extract semantic information at least two levels. The determining unit is used to perform semantic similarity calculations between the semantic information of the above at least two levels and the corresponding level of tags in the above multi-level tag pool, and to determine at least one multi-level candidate tag corresponding to the above statement to be processed based on the corresponding similarity calculation results.

[0059] In one possible implementation, the determining unit is specifically used to: determine the candidate tags corresponding to each of the above at least two levels based on the corresponding similarity calculation results; and associate and combine the candidate tags of each level based on the hierarchical association rules between the tags of each level to obtain at least one multi-level candidate tag combination corresponding to the above statement to be processed.

[0060] In one possible implementation, the label extraction device 600 further includes: The first acquisition module is used to acquire the original context dialogue dataset; the original context dialogue dataset and the above-mentioned statement to be processed belong to the dialogue data of the same user. The multi-level label pool construction module is used to perform batch analysis of the original contextual dialogue dataset using the target model and target prompt words, and to construct the multi-level label pool based on the feature labels corresponding to at least two levels obtained from the analysis.

[0061] In one possible implementation, the aforementioned multi-level tag pool building module includes: The first-level feature label extraction unit is used to perform batch analysis of the original contextual dialogue dataset using the target model and target prompt words, and extract M first-level feature labels corresponding to the original contextual dialogue dataset; M is a positive integer. The secondary feature label extraction unit is used to perform unsupervised clustering of the k keywords corresponding to each original dialogue statement in the original context dialogue dataset using the target model and the target prompt words to obtain N secondary feature labels; k and N are both positive integers. The multi-level label pool construction unit is used to construct a multi-level label pool with a two-level structure based on the semantic subordinate relationship between the above M first-level feature labels and the above N second-level feature labels; each first-level feature label in the multi-level label pool is associated with at least one semantically subordinate second-level feature label.

[0062] In one possible implementation, the label extraction device 600 further includes: The second acquisition module is used to acquire the original dialogue dataset; The statistics module is used to count the total number of times different tags in the above multi-level tag pool co-occur in the same sentence of the above original dialogue dataset; The mutual exclusion relationship determination module is used to determine the mutual exclusion relationship between different tags in the multi-level tag pool based on the total number of co-occurrences of different tags in the multi-level tag pool.

[0063] In one possible implementation, the aforementioned multi-level feature labels carry the following target attribute information: label information at each level, target confidence, descriptive information associated with the labels, and the generation time corresponding to the aforementioned multi-level feature labels; the aforementioned target confidence is determined by the aforementioned target model based on the semantic matching degree between the aforementioned multi-level feature labels and the aforementioned statement to be processed; the aforementioned descriptive information associated with the labels is generated by the aforementioned target model based on the aforementioned statement to be processed and / or the original context dialogue dataset corresponding to the aforementioned statement to be processed for the corresponding associated labels.

[0064] The division of modules in the above-described label extraction device is for illustrative purposes only. In other embodiments, the label extraction device can be divided into different modules as needed to complete all or part of the functions of the label extraction device. The implementation of each module in the label extraction device provided in the embodiments of this specification can be in the form of a computer program. This computer program can run on a terminal or server. The program modules constituted by this computer program can be stored in the memory of the terminal or server. When the computer program is executed by a processor, it implements all or part of the steps of the label extraction method described in the embodiments of this specification.

[0065] Please see below. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 700 may include at least one processor 710, at least one network interface 720, user interface 730, memory 740, and at least one communication bus 750.

[0066] The communication bus 750 is used to enable communication between these components.

[0067] The network interface 720 may include, but is not limited to, a Bluetooth Low Energy module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, etc.

[0068] The user interface 730 may include a display screen and a camera. Optionally, the user interface 730 may also include a standard wired interface and a wireless interface.

[0069] The processor 710 may include one or more processing cores. The processor 710 connects to various parts within the electronic device 700 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 740, and by calling data stored in the memory 740. Optionally, the processor 710 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 710 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 710.

[0070] The memory 740 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 740 may include a non-transitory computer-readable storage medium. The memory 740 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 740 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as multi-level tag pool construction, tag parsing, tag extraction, etc.), and instructions for implementing the various method embodiments described above. The data storage area may store data involved in the various method embodiments described above. Optionally, the memory 740 may also be at least one storage device located remotely from the aforementioned processor 710. Figure 7 As shown, the memory 740, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.

[0071] exist Figure 7In the illustrated electronic device 700, the user interface 730 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 710 can be used to call program instructions stored in the memory 740. The aforementioned electronic device 700 can, but is not limited to, [the following functions / functions]... Figure 6 The label extraction device 600 shown performs the following operations: using a target model and a multi-level label pool to parse the statement to be processed, at least one multi-level candidate label corresponding to the statement to be processed is obtained; the multi-level label pool includes a label system of at least two levels, with different levels of labels corresponding to semantic classifications of different granularities; the at least one multi-level candidate label is filtered based on the mutual exclusion relationship between different labels in the multi-level label pool, to obtain at least one target multi-level feature label corresponding to the statement to be processed; the mutual exclusion relationship is used to exclude semantically incompatible label combinations.

[0072] In some possible embodiments, when the processor 710 executes the above-mentioned parsing of the statement to be processed using the target model and in combination with the multi-level tag pool to obtain at least one multi-level candidate tag corresponding to the statement to be processed, it is specifically used to perform: inputting the statement to be processed into the target model and extracting semantic information at least two levels; calculating the semantic similarity between the semantic information at the at least two levels and the tags of the corresponding levels in the multi-level tag pool, and determining at least one multi-level candidate tag corresponding to the statement to be processed based on the corresponding similarity calculation results.

[0073] In some possible embodiments, when the processor 710 executes the above-mentioned determination of at least one multi-level candidate tag corresponding to the above-mentioned statement to be processed based on the corresponding similarity calculation result, it is specifically used to perform: Based on the corresponding similarity calculation results, candidate tags corresponding to at least two levels are determined; based on the hierarchical association rules between the tags at each level, the candidate tags at each level are associated and combined to obtain at least one multi-level candidate tag combination corresponding to the statement to be processed.

[0074] In some possible embodiments, before the processor 710 executes the above-mentioned parsing of the statement to be processed using the target model and combining the multi-level tag pool to obtain at least one multi-level candidate tag corresponding to the statement to be processed, it is further configured to perform: obtaining the original context dialogue dataset; the original context dialogue dataset and the statement to be processed belong to the same user's dialogue data; using the above-mentioned target model and combining the target prompt words to perform batch analysis on the original context dialogue dataset, and constructing the multi-level tag pool based on the feature tags corresponding to at least two levels obtained from the analysis.

[0075] In some possible embodiments, when the processor 710 performs the above-mentioned batch analysis of the original contextual dialogue dataset using the target model and target prompt words, and constructs the multi-level label pool based on the feature labels corresponding to at least two levels obtained from the analysis, it specifically performs the following: Using the aforementioned target model and target prompts, batch analysis is performed on the aforementioned original contextual dialogue dataset to extract M primary feature labels corresponding to the aforementioned original contextual dialogue dataset; M is a positive integer. Using the aforementioned target model and target prompts, unsupervised clustering is performed on k keywords corresponding to each original dialogue statement in the aforementioned original contextual dialogue dataset to obtain N secondary feature labels; k and N are both positive integers. Based on the semantic subordinate relationship between the aforementioned M primary feature labels and the aforementioned N secondary feature labels, a multi-level label pool with a two-level structure is constructed; each primary feature label in the aforementioned multi-level label pool is associated with at least one semantically subordinate secondary feature label.

[0076] In some possible embodiments, before the processor 710 performs the filtering of at least one multi-level candidate label based on the mutual exclusion relationship between different labels in the multi-level label pool to obtain at least one target multi-level feature label corresponding to the statement to be processed, it is also configured to perform: Obtain the original dialogue dataset; count the total number of times different tags in the above multi-level tag pool co-occur in the same sentence of the above original dialogue dataset; determine the mutual exclusion relationship between different tags in the above multi-level tag pool based on the total number of times different tags co-occur in the above multi-level tag pool.

[0077] In some possible embodiments, the aforementioned target multi-level feature labels carry the following target attribute information: label information at each level, target confidence, descriptive information associated with the labels, and the generation time corresponding to the aforementioned target multi-level feature labels; the aforementioned target confidence is determined by the aforementioned target model based on the semantic matching degree between the aforementioned target multi-level feature labels and the aforementioned statement to be processed; the aforementioned descriptive information associated with the labels is generated by the aforementioned target model based on the aforementioned statement to be processed and / or the original context dialogue dataset corresponding to the aforementioned statement to be processed for the corresponding associated labels.

[0078] This application also provides a computer storage medium storing instructions that, when run on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods. If the constituent modules of the above-described tag extraction device are implemented as software functional units and sold or used as independent products, they can be stored in the storage medium.

[0079] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0081] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims of this application.

Claims

1. A label extraction method characterized by, The method comprises: using a target model, in combination with a multi-level label pool, to analyze a to-be-processed sentence to obtain at least one multi-level candidate label corresponding to the to-be-processed sentence; the multi-level label pool comprises at least two levels of label systems, and different levels of labels correspond to different granularity semantic classifications; based on mutual exclusion relationships between different labels in the multi-level label pool, the at least one multi-level candidate label is screened to obtain at least one target multi-level feature label corresponding to the to-be-processed sentence; the mutual exclusion relationships are used to exclude semantically incompatible label combinations.

2. The method of claim 1, wherein, The method comprises: inputting the to-be-processed sentence into the target model to extract semantic information of at least two levels; performing semantic similarity calculation on the semantic information of the at least two levels and labels of corresponding levels in the multi-level label pool respectively, and determining at least one multi-level candidate label corresponding to the to-be-processed sentence based on corresponding similarity calculation results.

3. The method of claim 2, wherein, The method comprises: based on corresponding similarity calculation results, determining candidate labels corresponding to the at least two levels respectively; based on hierarchical association rules between labels of different levels, associating and combining candidate labels of different levels to obtain at least one multi-level candidate label combination corresponding to the to-be-processed sentence.

4. The method of claim 1, wherein, Before the method of using a target model, in combination with a multi-level label pool, to analyze a to-be-processed sentence to obtain at least one multi-level candidate label corresponding to the to-be-processed sentence, the method further comprises: obtaining an original contextual dialogue data set; the original contextual dialogue data set and the to-be-processed sentence belong to dialogue data of the same user; using the target model, in combination with a target prompt word, to perform batch analysis on the original contextual dialogue data set, and constructing the multi-level label pool based on at least two levels of feature labels corresponding to the original contextual dialogue data set.

5. The method of claim 4, wherein, The method comprises: using the target model, in combination with a target prompt word, to perform batch analysis on the original contextual dialogue data set, and constructing the multi-level label pool based on at least two levels of feature labels corresponding to the original contextual dialogue data set. The method comprises: using the target model, in combination with a target prompt word, to perform batch analysis on the original contextual dialogue data set, and constructing the multi-level label pool based on at least two levels of feature labels corresponding to the original contextual dialogue data set. The method comprises: using the target model, in combination with a target prompt word, to perform batch analysis on the original contextual dialogue data set, and constructing the multi-level label pool based on at least two levels of feature labels corresponding to the original contextual dialogue data set. The method comprises: using the target model, in combination with a target prompt word, to perform batch analysis on the original contextual dialogue data set, and constructing the multi-level label pool based on at least two levels of feature labels corresponding to the original contextual dialogue data set.

6. The method according to any one of claims 1 to 5, wherein, Before the filtering the at least one multi-level candidate label based on the mutual exclusion relationship between different labels in the multi-level label pool to obtain at least one target multi-level feature label corresponding to the to-be-processed sentence, the method further comprises: obtaining an original dialogue data set; counting a total co-occurrence times of different labels in the multi-level label pool in the same sentence in the original dialogue data set; determining a mutual exclusion relationship between different labels in the multi-level label pool based on the total co-occurrence times of different labels in the multi-level label pool.

7. The method according to any one of claims 1 to 5, wherein The target multi-level feature label carries the following target attribute information: hierarchical label information, a target confidence, description information associated with the label, and a generation time corresponding to the target multi-level feature label; the target confidence is determined by the target model based on a semantic matching degree between the target multi-level feature label and the to-be-processed sentence; and the description information associated with the label is generated by the target model based on the to-be-processed sentence and / or an original context dialogue data set corresponding to the to-be-processed sentence for the corresponding associated label.

8. A label extraction apparatus characterized by comprising: The device comprises: a label analysis module configured to analyze a to-be-processed sentence by using a target model in combination with a multi-level label pool to obtain at least one multi-level candidate label corresponding to the to-be-processed sentence; the multi-level label pool comprises a label system of at least two levels, and different levels of labels correspond to different granularity semantic classifications; a label filtering module configured to filter the at least one multi-level candidate label based on a mutual exclusion relationship between different labels in the multi-level label pool to obtain at least one target multi-level feature label corresponding to the to-be-processed sentence; the mutual exclusion relationship is used to exclude semantically incompatible label combinations.

9. An electronic device, comprising: comprise: a processor and a memory; the processor is connected with the memory; the memory is configured to store executable program codes; the processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory, so as to execute the method steps of any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, and the instructions are adapted to be loaded and executed by a processor to execute the method steps of any one of claims 1-7.

11. A computer program product comprising instructions which, when the computer program product is run on a computer or a processor, cause the computer or the processor to execute the method steps of any one of claims 1-7.