Label processing method and device, electronic equipment, storage medium and program product

By clustering the tag set and filtering the intra-cluster variance, combined with a large language model to identify semantically identical tag pairs, the problem of duplicate tags in conversation text is solved, efficient and accurate tag deduplication is achieved, and the accuracy of business processing is improved.

CN120688445APending Publication Date: 2025-09-23MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510232766.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the prior art, there are repeated tags in conversation texts that have the same semantics but different expressions, which leads to inaccurate subsequent business processing. Efficient and accurate tag deduplication processing is required.

Method used

By clustering the tag set, the intra-cluster variance is used to filter out clusters that may contain duplicate tags, and a large language model is used to identify tag pairs with the same semantics to achieve tag deduplication.

Benefits of technology

It improves the efficiency and accuracy of label search, simplifies complex label sets, avoids the impact of the model's semantic understanding ability, and ensures the accuracy of business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688445A_ABST
    Figure CN120688445A_ABST
Patent Text Reader

Abstract

The invention discloses a label processing method and device, electronic equipment, a storage medium and a program product, which are used for efficiently and accurately carrying out duplicate removal processing on massive labels. The label processing method comprises the steps that a label set is clustered, clusters in the label set are obtained, and the label set comprises labels marked for session texts; determining an intra-cluster variance of the cluster based on the tag in the cluster; determining a first cluster from the label set based on the intra-cluster variance of the cluster; a first label pair is determined from the first cluster through a first model, and the first label pair comprises labels with the same semantics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing, and in particular to a label processing method, device, electronic device, storage medium and program product. Background Art

[0002] In some business scenarios, it's often necessary to label conversation text with corresponding tags. Because some tags have different wording, sentences using the same language in conversation text are often labeled with tags that have the same semantics but different wording. These tags are considered duplicates and can affect subsequent business processing.

[0003] How to efficiently and accurately deduplicate massive labels to improve label consistency has become a hot research topic. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a label processing method, device, electronic device, storage medium and program product for efficiently and accurately deduplicating massive labels.

[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions: In a first aspect, an embodiment of the present application provides a tag processing method, comprising: Clustering the tag set to obtain clusters in the tag set, where the tag set includes tags annotated for the conversation text; Determining the intra-cluster variance of the cluster based on the labels within the cluster; determining a first cluster from the set of labels based on the intra-cluster variance of the clusters; A first label pair is determined from the first cluster using a first model, where the first label pair includes labels with the same semantics.

[0006] In a second aspect, an embodiment of the present application provides a label processing device, comprising: a clustering module, configured to cluster a tag set to obtain clusters in the tag set, wherein the tag set includes tags annotated for the conversation text; A first determining module, configured to determine the intra-cluster variance of the cluster based on the labels within the cluster; a second determining module, configured to determine a first cluster from the label set based on the intra-cluster variance of the cluster; The third determining module is configured to determine a first label pair from the first cluster using a first model, where the first label pair includes labels with the same semantics.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the tag processing method provided in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the label processing method provided in the first aspect.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute some or all of the steps in the label processing method provided in the first aspect.

[0010] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: Taking into account that repeated labels with the same semantics but different expressions have similarities, by clustering the label set, we can efficiently identify the hidden patterns and structures in the labels, simplify the complex label set, and make similar labels be divided into the same cluster. In this way, the search range of repeated labels is greatly narrowed, which is conducive to improving the search efficiency and accuracy. It is also considered that the intra-cluster variance of the cluster reflects the degree of dispersion of the labels within the cluster. The smaller the intra-cluster variance of the cluster, the more similar the labels within it, and the greater the probability of repeated labels. Based on this, when screening repeated labels within the cluster, according to the intra-cluster variance of the cluster, the cluster that may contain repeated labels can be quickly found as the first cluster according to the intra-cluster variance of the cluster. Then, using the semantic understanding ability of the model, the first label pair consisting of repeated labels with the same semantics is determined from the first cluster, further narrowing the search range of repeated labels, improving the search efficiency, and avoiding the search range being too large to affect the semantic understanding ability of the model, thereby greatly improving the search accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of an implementation environment of a label processing method provided in one embodiment of the present application; Figure 2 A flowchart of a label processing method provided in one embodiment of the present application; Figure 3 A flowchart of a label processing method provided in another embodiment of the present application; Figure 4A schematic structural diagram of a label processing device provided in one embodiment of the present application; Figure 5 A schematic structural diagram of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0012] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0013] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0014] Key terms explained: Large Language Model (LLM): Generally refers to models with more than 100 million parameters. Currently popular architectures often use decoder-only modules (such as the Transformer decoder). Decoder-only modules are widely applicable to text generation tasks and are good for creative collaboration. The Transformer decoder is composed of multiple identical layers stacked together, each of which mainly contains the following submodules: Self-Attention Module: Similar to the self-attention mechanism in the encoder, this module focuses only on the output sequence currently generated by the decoder. This helps the model take into account the relationships within the sequence when generating it.

[0015] Feedforward Neural Network: Usually a simple fully connected network that processes each position independently to increase the representation capability of the model.

[0016] As mentioned above, in some business scenarios, it's often necessary to annotate conversation text with corresponding tags to indicate the language used in the conversation. Because some tags have literal inconsistencies, sentences using the same language in conversation text are often annotated with tags that have the same semantics but different wording. These tags are considered duplicates and can affect subsequent business processing.

[0017] For example, the sentence "Hello, is this Mr. Zhang?" in a conversation text is labeled "Customer Identity Confirmation," while the sentence "Hello, is this Mr. Wang?" is labeled "User Identity Confirmation." The sentence "Hello, I'm a product sales manager at a certain company. I have another affordable and useful financial product. Do you have any questions?" is labeled "Self-introduction, Product Introduction, Customer Needs Exploration" and "Identity Introduction, Product Introduction, Customer Needs Exploration" respectively in different locations or conversations. Clearly, the tags "Customer Identity Confirmation" and "User Identity Confirmation" convey the same meaning but are expressed differently, while the tags "Self-introduction" and "Identity Introduction" convey the same meaning but are expressed differently. These tags often affect subsequent business processing. For example, sentences corresponding to these tags may be processed as substantively different, resulting in inaccurate business processing results.

[0018] In view of this, the embodiment of the present application proposes a technical solution for label deduplication by combining clustering and semantic understanding technology of the model. Taking into account that repeated labels with the same semantics but different expressions have similarities, by clustering the label set, it is possible to efficiently identify the hidden patterns and structures in the labels, simplify the complex label set, and make similar labels be divided into the same cluster. In this way, the search range of repeated labels is greatly reduced, which is conducive to improving the search efficiency and accuracy. It is also considered that the intra-cluster variance of the cluster reflects the degree of dispersion of the labels in the cluster. The smaller the intra-cluster variance of the cluster, the more similar the labels inside it, and the greater the probability of repeated labels. Based on this, when screening the repeated labels in the cluster, according to the intra-cluster variance of the cluster, the cluster that may contain repeated labels can be quickly found as the first cluster, and then the semantic understanding ability of the model is used to determine the first label pair consisting of repeated labels with the same semantics from the first cluster, further narrowing the search range of repeated labels, improving the search efficiency, and avoiding the search range being too large to affect the semantic understanding ability of the model, thereby greatly improving the search accuracy.

[0019] It should be understood that the tag processing method proposed in the embodiments of the present application can be executed by an electronic device. As an example, it can be executed by software in the electronic device. The electronic devices herein may include terminal devices such as smartphones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, smart watches, vehicle-mounted terminals, aircraft, etc.; alternatively, the electronic device may also include a server, such as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0020] Before introducing the tag processing method provided by the embodiment of the present application in detail, a brief introduction to the implementation environment involved in the embodiment of the present application is given. Figure 1 , is a schematic diagram of an implementation environment of a tag processing method provided by an embodiment of the present application, wherein the implementation environment includes a terminal 10, or the implementation environment includes a terminal 10 and a text processing platform 20. The terminal 10 is connected to the text processing platform 20 via a wireless network or a wired network.

[0021] The terminal 10 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, a laptop computer, etc. The terminal 10 may have installed and run an application program supporting text processing, such as a system application or a communication application.

[0022] Exemplarily, the terminal 10 identifies repeated tags with the same semantics but different expressions from the tag set of the conversation text, and performs deduplication processing on such tags.

[0023] The text processing platform 20 comprises at least one of a single server, multiple servers, a cloud computing server, and a virtualization center. The text processing platform 20 provides backend services for applications that support text processing. Optionally, the text processing platform 20 performs primary processing, while the terminal 10 performs secondary processing. Alternatively, the text processing platform 20 performs secondary processing, while the terminal 10 performs primary processing. Alternatively, either the text processing platform 20 or the terminal 10 can independently perform processing tasks.

[0024] Exemplarily, the text processing platform 20 identifies repeated tags with the same semantics but different expressions from the tag set of the conversation text, deduplicates such tags to obtain a new tag set, and sends the new tag set to the terminal 10 for display.

[0025] Based on the implementation environment introduced above, the label processing method provided in the embodiment of the present application is described in detail with reference to the accompanying drawings.

[0026] Please refer to Figure 2, is a flow chart of a label processing method provided in one embodiment of the present application, the method comprising the following steps: S202: Cluster the tag set to obtain clusters in the tag set.

[0027] The tag set includes tags annotated for the conversation text. Tags are used to categorize, mark, and manage the content of the dialogue used in scenarios such as sales and communication. The tags of the conversation text are used to indicate the dialogue used in the conversation text. For example, the conversation text includes multiple agent statements, each of which has a corresponding tag, which indicates the dialogue used in the agent statement. As mentioned above, the tag of the agent statement "Hello, is this Mr. Zhang?" is "Customer Identity Confirmation."

[0028] In the above S202 , similar tags can be grouped into one category by clustering the tag set, thereby obtaining multiple clusters, each of which contains at least one tag.

[0029] In the embodiment of the present application, the tag set may be clustered in various appropriate ways to obtain clusters in the tag set.

[0030] In one embodiment, the above S202 includes the following steps: selecting multiple labels from the label set as centroids; dividing the label set into multiple clusters based on the distance between each label and each centroid in the label set, and each cluster corresponds to a centroid; repeating the first operation for each cluster until the stopping condition is met; wherein the first operation includes: updating the centroid of the cluster based on the labels in the cluster and the number of labels contained in the cluster; updating the cluster based on the clustering between each label in the label set and the updated centroid.

[0031] The stopping condition can be set according to actual needs, such as the centroid of the cluster no longer changes (or changes very little), or the number of times the first operation reaches a preset threshold, etc., which is not limited in this embodiment of the present application.

[0032] Specifically, in step 1, k labels are randomly selected as the initial centroids. This step is critical because different initial centroids may lead to different clustering results. In step 2, for each label in the label set, the distance between the label and each centroid is calculated, and the label is assigned to the centroid closest to it. Labels assigned to the same centroid have similarity and form a cluster, and each cluster represents a category. In step 3, for each cluster, the centroid of the cluster is recalculated. The centroid of a cluster is usually the average of all labels in the cluster. Repeat steps 2 and 3 until the stopping condition is met, and finally obtain k clusters and the centroid of each cluster.

[0033] Through the above clustering method, we can accurately find the partition that minimizes the sum of the distances between the labels within the cluster and the centroid of the cluster, ensuring that the labels within the cluster are similar, while the labels of different clusters are not similar, providing data support for the subsequent efficient and accurate deduplication of the label set.

[0034] In another embodiment, a clustering algorithm commonly used in the art, such as a k-mean+ clustering algorithm, a hierarchical clustering algorithm, a density-based spatial clustering of applications with noise (DBSCAN) algorithm, etc., may be used to cluster the tag set to obtain clusters in the tag set.

[0035] In practical applications, the embedding representation method or the Jieba word segmentation method can be used to convert each label into a corresponding feature vector, and then the label set is unsupervised clustered according to the feature vector of each label to obtain multiple clusters.

[0036] The above describes some implementation methods of the above S202. Of course, it should be understood that the above S202 can also be implemented in other ways, and the present embodiment of the application does not limit this.

[0037] S204: Determine the intra-cluster variance of the cluster based on the labels within the cluster.

[0038] Each cluster has a corresponding within-cluster variance (Within-Cluster Variance). The within-cluster variance is an important indicator for evaluating clustering effects in cluster analysis, which is used to evaluate the dispersion of data points within the cluster. In the embodiment of the present application, the within-cluster variance of a cluster is used to represent the dispersion of labels within the cluster. Intuitively speaking, if the within-cluster variance of a cluster is smaller, it means that the labels within the cluster are more similar and the quality of the cluster is higher; conversely, if the within-cluster variance of a cluster is larger, it means that the labels within the cluster are more dissimilar and the quality of the cluster is lower.

[0039] In the above S204 , the intra-cluster variance of the cluster can be determined by: determining the centroid of the cluster based on the labels in the cluster and the number of labels contained in the cluster; and determining the intra-cluster variance of the cluster based on the distance between the labels in the cluster and the centroid.

[0040] In terms of progress and regression, the intra-cluster variance of a cluster can be determined by the following formula (1).

[0041] (1) in, represents the i-th cluster The intra-cluster variance of represents the i-th cluster The label inside, represents the i-th cluster The center of mass, that is , represents the i-th cluster The number of tags included, Represents the distance between the label and the centroid.

[0042] S206 : Determine a first cluster from the label set based on the intra-cluster variance of the clusters.

[0043] The first cluster is a cluster that may contain labels with the same semantics.

[0044] Since the more similar the labels within a cluster are, the greater the probability that the cluster contains labels with the same semantics. As mentioned above, the smaller the intra-cluster variance of a label cluster, the more similar the labels within the cluster are. Therefore, if the intra-cluster variance of a cluster is small, the cluster may contain labels with the same semantics, and the cluster is determined to be the first cluster.

[0045] Specifically, in one embodiment, the above S206 includes the following steps: determining the mean intra-cluster variance corresponding to the label set based on the intra-cluster variance of the cluster; and selecting a cluster whose intra-cluster variance is smaller than the mean intra-cluster variance from the label set as the first cluster.

[0046] For example, suppose the label set includes 8 labels from label A to label H, recorded as [label A, label B, label C, label D, label E, label F, label G, label H]. By clustering the label set, the following 3 clusters are obtained: Cluster 1: [label A, label B, label D] Cluster 2: [label C, label G, label F] Cluster 3: [label E, label H] By using the above formula (1), the intra-cluster variance of each cluster and the mean intra-cluster variance of the label set are calculated as follows: Cluster 1: 0.1 Cluster 2: 0.2 Cluster 3: 0.5 Mean intra-cluster variance: 0.266 Since the intra-cluster variance of cluster 1 and the intra-cluster variance of cluster 2 are both smaller than the intra-cluster variance mean, cluster 1 and cluster 2 are determined to be the first cluster.

[0047] Since the mean intra-cluster variance is a comprehensive measure of the dispersion of labels within all clusters, it reflects the average level of intra-cluster variance across all clusters. If the intra-cluster variance of a cluster is less than the mean intra-cluster variance, it means that the clustering effect is better than the average level, that is, the labels within the cluster are more similar, and it is more likely to contain semantically identical labels, and thus the cluster is determined to be the first cluster. It can be seen that through the above implementation, clusters that are likely to contain semantically identical labels can be quickly and accurately screened, providing data support for the subsequent efficient and accurate deduplication of label sets.

[0048] In another embodiment, the total intra-cluster variance of the tag set is determined based on the weighted sum of the intra-cluster variances of the clusters in the tag set; and a cluster with an intra-cluster variance smaller than the total intra-cluster variance is selected from the tag set as the first cluster.

[0049] For example, the intra-cluster variance mean of the label set can be determined by the following formula (2).

[0050] (2) in, represents the total within-cluster variance mean of the label set, represents the intra-cluster variance of the ith cluster, represents the i-th cluster The label inside, represents the i-th cluster The center of mass, that is , represents the i-th cluster The number of tags included, represents the distance between the label and the centroid, Indicates weight, which can be a value less than 1 and can be set according to actual needs. Indicates the number of clusters.

[0051] Since the total intra-cluster variance of a label set is also a comprehensive measure of the dispersion of labels within all clusters, it reflects the overall clustering effect. If the intra-cluster variance of a cluster is less than the total intra-cluster variance, it means that the clustering effect of this cluster is better than the overall clustering effect. In other words, the labels within the cluster are more similar, and it is more likely to contain semantically identical labels, and thus this cluster is determined to be the first cluster. It can be seen that through the above implementation, clusters that may contain semantically identical labels can be quickly and accurately screened, providing data support for the subsequent efficient and accurate deduplication of label sets.

[0052] The above describes some implementation methods of the above S206. Of course, it should be understood that the above S206 can also be implemented in other ways, and the present embodiment of the application does not limit this.

[0053] S208 : Determine a first label pair from the first cluster using the first model.

[0054] The first tag pair contains tags with the same semantics.

[0055] Exemplarily, the first model can be any of the various large language models (LLMs) commonly used in this field. Alternatively, the first model can be obtained by pre-training and fine-tuning an existing large language model using domain-specific knowledge. This allows the first model to complete complex tasks in a specific domain, particularly tasks such as entity extraction and semantic determination. Domain-specific knowledge refers to knowledge in the domain to which the label set belongs. For example, if a label in the label set represents financial rhetoric, then the domain-specific knowledge refers to knowledge in the financial field. Financial rhetoric refers to a set of techniques and methods used in the financial industry for communicating with customers, promoting sales, and solving problems, and involves loan sales, insurance sales, and the like.

[0056] In one embodiment, S208 includes the following steps: inputting the tags in the first cluster and the first prompt word into the first model to obtain a first tag pair, wherein the first prompt word is used to indicate that tags with the same semantics in the first cluster are identified and combined into a tag pair.

[0057] In another embodiment, considering that the number of tags in the first cluster may be large, if all tags in the first cluster are input into the first model for semantic determination, the performance of the first model may be degraded due to the input character length limit of the first model, resulting in different semantics of the tags in the output first tag pairs. In view of this, the above S208 includes the following steps: combining the tags in the first cluster to obtain multiple tag pairs, each tag pair including two tags; using the first model, identifying whether the tags in each tag pair have the same semantics, thereby obtaining a recognition result for each tag pair; and determining a first tag pair from the multiple tag pairs based on the recognition result of each tag pair.

[0058] For example, suppose the first cluster includes the following two clusters: Cluster 1: [label A, label B, label D] Cluster 2: [label C, label G, label F] For cluster 1, the labels in cluster 1 are combined in pairs to obtain the following label pairs: (Label A, Label B) (Label A, Label D) (Label B, Label D) For each tag pair, the tag pair and the second prompt word are input into the first model, and the recognition result of each tag pair is obtained as follows. Among them, the second prompt word is used to indicate whether the semantics of the tags in the tag pair are the same.

[0059] (label A, label B) = YES (label A, label D) = NO (label B, label D) = NO For cluster 2, the labels in cluster 1=2 are combined in pairs to obtain the following label pairs: (Label C, Label G) (Label C, Label F) (Tag G, Tag F) For each tag pair, the tag pair and the second prompt word are input into the first model, and the recognition result of each tag pair is obtained as follows. Among them, the second prompt word is used to indicate whether the semantics of the tags in the tag pair are the same.

[0060] (label C, label G) = YES (label C, label F) = NO (label G, label F) = NO Among them, YES means that the semantics of the labels in the label pair are the same, and NO means that the semantics of the labels in the label pair are different.

[0061] In the above embodiment, by effectively combining the labels in the first cluster in small batches and then inputting them into the first model for semantic judgment, it can be ensured that the input character length meets the input length limit of the first model, thereby obtaining accurate semantic judgment results, and providing data support for subsequent accurate deduplication processing of the label set.

[0062] The above describes some implementation methods of the above S208. Of course, it should be understood that the above S208 can also be implemented in other ways, and the present embodiment of the application does not limit this.

[0063] In another embodiment of the present application, after the above S208, the label processing method provided in the embodiment of the present application may also include: S210, based on the first label pair, deduplicating the label set; repeatedly executing the above S202 to S210 on the deduplicated label set until the deduplicated label set does not meet the detection condition.

[0064] The detection condition can be set according to actual needs, and the embodiment of the present application does not limit this. As an example, the detection condition includes that the number of repeated operations is greater than a preset number threshold.

[0065] As another example, the detection condition includes: the mean intra-cluster variance of the deduplicated label set is less than the mean intra-cluster variance of the deduplicated label set. If the new label set does not meet this detection condition, it means that the clustering results are stable and the probability of each cluster containing semantically identical labels is low. Therefore, deduplication is stopped for the new label set to avoid consuming excessive computing resources.

[0066] For example, continuing with the two first clusters, Cluster 1 and Cluster 2 shown above, assume that the first label pair (label A, label B) is determined from Cluster 1, and the first label pair (label C, label G) is determined from Cluster 2. For the first label pair in Cluster 1, retain one of the labels and delete the other label. For example, retain label A, delete label B, and replace label B in the conversation text with label A. Similarly, for the first label pair in Cluster 2, retain label C, delete label G, and replace label G in the conversation text with label C. Thus, the deduplication process of the label set is completed, and a new label set is obtained: [Label A, Label C, Label D, Label E, Label F, Label H]. Further, the above steps S202 to S210 are repeated for the new label set until the new label set does not meet the detection condition.

[0067] By repeatedly clustering the label set, determining the first label pair within the cluster, and performing deduplication processing, the possibility of duplication between labels in the new label set is reduced, and the deduplication effect is effectively improved.

[0068] One or more embodiments of the present application provide a label processing method that takes into account the similarity of repeated labels with the same semantics but different expressions. By clustering the label set, it is possible to efficiently identify the hidden patterns and structures in the labels, simplify the complex label set, and divide similar labels into the same cluster. In this way, the search range of repeated labels is greatly narrowed, which is conducive to improving the search efficiency and accuracy. It is also considered that the intra-cluster variance of the cluster reflects the degree of dispersion of the labels within the cluster. The smaller the intra-cluster variance of the cluster, the more similar the labels within it, and the greater the probability of repeated labels. Based on this, when screening repeated labels within the cluster, according to the intra-cluster variance of the cluster, the cluster that may contain repeated labels can be quickly found as the first cluster, and then the semantic understanding ability of the model is used to determine the first label pair consisting of repeated labels with the same semantics from the first cluster, further narrowing the search range of repeated labels, improving the search efficiency, and avoiding the search range being too large to affect the semantic understanding ability of the model, thereby greatly improving the search accuracy.

[0069] To facilitate understanding of the label processing method provided in the embodiment of the present application, the following is combined with Figure 3 , the deduplication process of the tag set is explained in detail.

[0070] like Figure 3 As shown in the figure, first, a label set containing multiple labels is clustered to obtain N clusters, each cluster includes at least one label, and N is an integer greater than 1; then, for each cluster, based on the labels in the cluster, the intra-cluster variance of the cluster is determined, and based on the intra-cluster variance of each cluster, the intra-cluster variance mean of the label set is determined.

[0071] Furthermore, the cluster whose intra-cluster variance is smaller than the intra-cluster variance mean is selected as the first cluster, and the first cluster contains labels with the same semantics.

[0072] Furthermore, for each first cluster, the labels in the first cluster are combined in pairs to obtain multiple label pairs; for each label pair, the first model is used to identify whether the semantics of the labels in the label pair are the same. If they are the same, the label pair is used as the first label pair.

[0073] Furthermore, deduplication processing is performed on the tag set: for each first tag pair, one tag in the first tag pair is retained, and the other tags are deleted from the tag set to obtain a new tag set.

[0074] Repeat the above process until the new tag set does not meet the detection conditions. At this point, the new tag set does not contain tags with the same semantics.

[0075] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0076] Based on the same inventive concept, the present application also provides a label processing device. Figure 4 , is a structural diagram of a label processing device 400 provided in an embodiment of the present application, the device 400 includes: a clustering module 410, a first determination module 420, a second determination module 430 and a third determination module 440.

[0077] A clustering module 410 is configured to cluster a tag set to obtain clusters in the tag set, wherein the tag set includes tags annotated for the conversation text; A first determining module 420 is configured to determine the intra-cluster variance of the cluster based on the labels within the cluster; A second determining module 430 is configured to determine a first cluster from the label set based on the intra-cluster variance of the cluster; The third determining module 440 is configured to determine a first label pair from the first cluster using a first model, where the first label pair includes labels with the same semantics.

[0078] In another embodiment, the clustering module is configured to: Selecting multiple labels from the label set as centroids; Based on the distance between each label and each centroid in the label set, the label set is divided into a plurality of clusters, each cluster corresponding to a centroid; Repeating the first operation for each cluster until a stop condition is met, wherein the first operation includes: Updating the centroid of the cluster based on the labels within the cluster and the number of labels contained in the cluster; The cluster is updated based on the distance between each label in the label set and the updated centroid.

[0079] In another embodiment, the first determining module is configured to: Determining a centroid of the cluster based on the labels within the cluster and the number of labels contained in the cluster; The intra-cluster variance of the cluster is determined based on the distances between the labels within the cluster and the centroid.

[0080] In another embodiment, the second determining module is configured to: Determining a mean intra-cluster variance corresponding to the label set based on the intra-cluster variance of the cluster; A cluster whose intra-cluster variance is smaller than the intra-cluster variance mean is selected from the label set as the first cluster.

[0081] In another embodiment, the third determining module is configured to: Combining the labels in the first cluster to obtain a plurality of label pairs, each label pair including two labels; Using the first model, identifying whether the semantics of the labels in each label pair are the same, and obtaining a recognition result for each label pair; Based on the recognition result of each tag pair, the first tag pair is determined from the plurality of tag pairs.

[0082] In another embodiment, the label processing device 400 further includes: a deduplication module, configured to perform deduplication processing on the tag set based on the first tag pair; The detection module is used to repeatedly call the trigger module, the first determination module, the second determination module, the third determination module and the deduplication module on the deduplication processed tag set until the deduplication processed tag set does not meet the detection condition.

[0083] In another embodiment, the detection condition includes: the mean intra-cluster variance corresponding to the tag set after deduplication processing is smaller than the mean intra-cluster variance corresponding to the tag set before deduplication processing.

[0084] Obviously, the label processing device 400 provided in the embodiment of the present application can be used as the above Figure 2 The execution subject of the label processing method shown in the figure can realize the label processing device in Figure 2 Since the principle is the same, the functions realized will not be described in detail.

[0085] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 5 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.

[0086] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0087] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0088] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a tag processing device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Clustering the tag set to obtain clusters in the tag set, where the tag set includes tags annotated for the conversation text; Determining the intra-cluster variance of the cluster based on the labels within the cluster; determining a first cluster from the set of labels based on the intra-cluster variance of the clusters; A first label pair is determined from the first cluster using a first model, where the first label pair includes labels with the same semantics.

[0089] The above application Figure 2 The methods performed by the tag processing devices disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the aforementioned method can be performed by hardware integrated logic circuits within the processor or by software instructions. The aforementioned processors can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0090] The electronic device may also perform Figure 2 Method, and realize label processing device in Figure 2 、 Figure 3 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0091] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0092] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, can enable the electronic device to execute Figure 2 The method of the embodiment shown is specifically used to perform the following operations: Clustering the tag set to obtain clusters in the tag set, where the tag set includes tags annotated for the conversation text; Determining the intra-cluster variance of the cluster based on the labels within the cluster; determining a first cluster from the set of labels based on the intra-cluster variance of the clusters; A first label pair is determined from the first cluster using a first model, where the first label pair includes labels with the same semantics.

[0093] An embodiment of the present application also provides a computer program product, characterized in that the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute some or all of the steps in the label processing method provided in the embodiment of the present application.

[0094] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

[0095] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0096] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0097] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0098] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

Claims

1. A label processing method, characterized in that: include: Clustering the tag set to obtain clusters in the tag set, wherein the tag set includes tags annotated with the conversation text; Determining the intra-cluster variance of the cluster based on the labels within the cluster; determining a first cluster from the set of labels based on the intra-cluster variance of the clusters; A first label pair is determined from the first cluster using a first model, where the first label pair includes labels with the same semantics.

2. The method according to claim 1, characterized in that Clustering the tag set to obtain clusters in the tag set includes: Selecting multiple labels from the label set as centroids; Based on the distance between each label and each centroid in the label set, the label set is divided into a plurality of clusters, each cluster corresponding to a centroid; Repeating the first operation for each cluster until a stop condition is met; wherein the first operation includes: Updating the centroid of the cluster based on the labels within the cluster and the number of labels contained in the cluster; The cluster is updated based on the distance between each label in the label set and the updated centroid.

3. The method according to claim 1, characterized in that The determining the intra-cluster variance of the cluster based on the labels in the cluster includes: Determining a centroid of the cluster based on the labels within the cluster and the number of labels contained in the cluster; The intra-cluster variance of the cluster is determined based on the distances between the labels within the cluster and the centroid.

4. The method according to claim 1, wherein The determining a first cluster from the label set based on the intra-cluster variance of the clusters includes: Determining a mean intra-cluster variance corresponding to the label set based on the intra-cluster variance of the cluster; A cluster whose intra-cluster variance is smaller than the intra-cluster variance mean is selected from the label set as the first cluster.

5. The method according to claim 1, wherein Determining a first label pair from the first cluster using the first model includes: Combining the labels in the first cluster to obtain a plurality of label pairs, each label pair including two labels; Using the first model, identifying whether the semantics of the labels in each label pair are the same, and obtaining a recognition result for each label pair; Based on the recognition result of each tag pair, the first tag pair is determined from the plurality of tag pairs.

6. The method according to any one of claims 1 to 5, characterized in that After determining the first label pair from the first cluster using the first model, the method further includes: Based on the first label pair, performing deduplication processing on the label set; The steps of clustering the tag set to deduplicating the tag set are repeatedly performed on the tag set after deduplication processing, until the tag set after deduplication processing does not meet the detection condition.

7. The method according to claim 6, characterized in that The detection condition includes: the mean intra-cluster variance corresponding to the tag set after deduplication processing is smaller than the mean intra-cluster variance corresponding to the tag set before deduplication processing.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the label processing method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the label processing method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute part or all of the steps in the label processing method according to any one of claims 1 to 7.