A data label classification method and system based on artificial intelligence

By constructing a label hierarchical graph and graph neural network, combined with knowledge distillation technology, the problems of high computing resources and insufficient label dependence processing in the existing label classification technology are solved, and efficient multi-level label classification is achieved in a low-resource environment.

CN119494058BActive Publication Date: 2025-08-12GUANGZHOU JEEKUP INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510072491.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-08-12
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

When existing tag classification technology faces insufficient processing of multi-level tag structure and tag dependencies, the computing resource demand is high, and traditional methods cannot effectively combine the feature extraction advantages of deep learning, resulting in a decrease in classification accuracy.

Method used

Using a data tag classification method based on artificial intelligence, combining knowledge distillation and tag relationship network, training is carried out by building a label hierarchical graph and graph neural network, and using graph convolution network to capture the hierarchical dependence between tags, and compressing complex models into lightweight models through knowledge distillation, and optimizing model weights with dynamic update mechanisms.

Benefits of technology

While maintaining high classification accuracy, it significantly reduces the demand for computing resources, and can be deployed in a low-resource environment, effectively capture the hierarchy and dependence between labels and improve classification performance. It is especially suitable for complex label structure scenarios such as product classification and disease diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494058B_ABST
    Figure CN119494058B_ABST
Patent Text Reader

Abstract

The present invention proposes a data label classification method and system based on artificial intelligence. The method includes: obtaining text data features and image data features, and fusing the two features to form multimodal features; using a graph neural network to model a label hierarchy graph, using the multimodal features as input to train the model to obtain a trained complex model; performing knowledge distillation on the complex model and compressing it into a lightweight model; correcting the label prediction probability distribution of the lightweight model according to the label hierarchy graph; obtaining new input data, inputting the new input data into the label hierarchy graph for dynamic updating, and designing consistency regularization to adaptively adjust the label prediction probability distribution during the update; and finally optimizing the weight of the lightweight model according to the updated label hierarchy graph. The present invention provides an efficient label classification system that can adapt to diverse application scenarios while maintaining classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data label classification, and in particular relates to a data label classification method and system based on artificial intelligence. Background Art

[0002] With the explosive growth of data volumes, data label classification has become a core issue in machine learning and artificial intelligence. Label classification is a crucial component of supervised learning. The system learns from training data to form a model capable of correctly classifying new data into a set of labels. Traditional label classification methods rely primarily on a combination of manual feature extraction and machine learning models. While these methods have achieved some success in some application scenarios, they have exposed a series of shortcomings as the scale and complexity of data increase. First, manual feature engineering requires the involvement of a large number of domain experts, which is not only costly and time-consuming, but also susceptible to subjective judgment, resulting in poor generalization of the model to new data. Second, while deep learning has made significant progress in automatic feature extraction and classification, it still faces the problem of insufficient label dependency. This is particularly true when dealing with complex data with multi-layered label structures or dependencies between labels. Existing classification methods often focus solely on the features of the input data while ignoring the underlying connections between labels, resulting in suboptimal classification performance.

[0003] At the same time, the high demand for computing resources is another important factor that limits the widespread application of deep learning in label classification tasks. Although existing deep neural network models (such as BERT and ResNet) perform well in processing complex data, the inference process of these models requires a large amount of computing resources, making them difficult to deploy efficiently on resource-constrained devices (such as mobile devices and edge devices). To address this issue, knowledge distillation technology has begun to be used in recent years to reduce the computational burden of complex models. By transferring the knowledge of large models to a smaller model, the computational cost is reduced while ensuring model performance. However, the application of knowledge distillation in label classification tasks is still in its early stages. In particular, when dealing with labels with complex hierarchical structures, traditional distillation methods cannot effectively transfer the complex dependencies between labels, resulting in the classification effect of student models being less than expected.

[0004] Furthermore, the existing technology also has obvious deficiencies in handling label classification problems with hierarchical structures. Common label classification models are usually trained on flat label sets, ignoring the possible hierarchical relationships between labels, resulting in insufficient data processing capabilities for complex label structures. For example, in the classification of e-commerce products, there is often a hierarchical structure between different product categories (such as "electronic equipment" has subcategories such as "mobile phones" and "computers"). Traditional label classification models can only assign a single label to the product and cannot capture this hierarchical dependency, resulting in a decrease in classification accuracy. In the existing technology, some studies have also attempted to introduce knowledge graphs or graph neural networks to solve the label dependency problem, but most of them cannot effectively combine the feature extraction advantages of deep learning, and the complexity of the model causes it to still face a high computational burden in the inference stage.

[0005] In summary, current label classification technologies exhibit significant limitations when faced with multi-layered label structures, insufficient label dependency processing, and high computational resource requirements. Therefore, an innovative technical solution is urgently needed that can maintain classification accuracy while also addressing multi-layered label dependency processing and reducing computational resource requirements. Summary of the Invention

[0006] The purpose of the present invention is to design a data label classification method and system based on artificial intelligence, which is a multi-level efficient label classification method and system that combines knowledge distillation and label relationship network, aiming to solve the problems of existing methods in label classification scenarios, such as large computing resource consumption, insufficient label dependency processing, and poor hierarchical label classification effect.

[0007] In order to achieve the above-mentioned object, a first aspect of the present invention provides a data label classification method based on artificial intelligence, the method comprising the following steps:

[0008] Acquire text data features and image data features, fuse the two features to form a multimodal feature, and construct a label hierarchy graph using the multimodal feature; the node set of the label hierarchy graph is a label set, the edge set is an edge set between labels, and the edge weight is a label weight; the label hierarchy graph is divided into subgraphs of different levels;

[0009] Use graph neural networks to model the label hierarchical graph, use multimodal features as input to train the model, and obtain a trained complex model;

[0010] Perform knowledge distillation on the complex model and compress it into a lightweight model; use the complex model as the teacher model, and use the predicted label probability output by the complex model as the label prediction probability distribution output by the teacher model; the lightweight model is the student model;

[0011] Modify the label prediction probability distribution of the lightweight model according to the label hierarchy graph;

[0012] Acquire new input data and input the new input data into the label hierarchy graph for dynamic update. At the same time, design a label hierarchy consistency regularization based on the revised label prediction probability distribution to adaptively adjust the label prediction probability distribution during the update. Finally, optimize the weight of the lightweight model according to the updated label hierarchy graph to minimize the prediction loss and make the label classification most accurate.

[0013] Furthermore, the method further comprises:

[0014] Based on the update of the label hierarchy graph and the lightweight model, a change threshold trigger mechanism is designed to determine when to perform adaptive optimization of the lightweight model and label graph. The judgment rules are as follows:

[0015] Defines a change threshold , if the weight change of the label relationship graph caused by the new data exceeds the threshold, the adaptive optimization is triggered, which is expressed as follows:

[0016] ,

[0017] in, represents the edge weights in the updated label hierarchy graph, Represents the edge weight in the original label hierarchy graph, L represents the label set; i represents the i-th label, j represents the j-th label;

[0018] like , then the label relationship graph is updated and the model is adaptively optimized, otherwise the existing model and label structure are maintained.

[0019] Furthermore, the text data features are generated using a weighted average method; the image data features are extracted using a convolutional neural network to obtain a feature map, and the feature map is flattened to obtain the image data features; and the two features are fused to form a multimodal feature using a weighted fusion strategy.

[0020] The method of constructing a label hierarchy graph using multimodal features specifically includes:

[0021] Constructing a co-occurrence matrix ,in Representation Label and Co-occurrence frequency in the same data sample;

[0022] Calculate semantic similarity matrix Reflect Tags and The semantic correlation between the speech vectors;

[0023] According to the co-occurrence matrix and semantic similarity matrix Constructing weights between labels , which is expressed as follows:

[0024] ,

[0025] in, and Represents the co-occurrence matrix and semantic similarity matrix The weight coefficient of The coefficient representing the hierarchical distance, Indicates the hierarchical distance between labels;

[0026] According to the calculated weight Build a tag relationship graph ,in is a collection of tags, is the set of edges between labels, and the weight of the edge is ; For each tag set , according to the weight Cluster the labels to form multiple levels of label subsets ,in Represents the highest level, Represents the lowest level.

[0027] Furthermore, the label hierarchy graph is modeled using a graph neural network, and the multimodal features are used as input to train the model to obtain a trained complex model, specifically including:

[0028] The fused features are input as samples into the fully connected network layer for feature conversion, and then mapped to the label space through the second fully connected layer to output the preliminary label probability distribution of the samples;

[0029] A graph convolutional network is introduced to aggregate the neighbor label information of each label node and update the embedding representation of each label;

[0030] A joint optimization loss function is designed to fuse the preliminary label probability distribution and the updated embedding representation of each label for training, and the joint optimization loss function is used as the loss function of the complex model for training.

[0031] Furthermore, the graph convolutional network is introduced to aggregate the neighbor label information of each label node and update the embedding representation of each label, specifically including:

[0032] Assume that the initial label embedding is represented as , the aggregation operation of the graph convolutional network updates each label The calculation formula is as follows:

[0033] ,

[0034] in, is the representation of each label after the update, represents the activation function, It's a label The set of neighbor nodes of It is a label relationship diagram Tags in and The edge weight reflects the co-occurrence frequency and semantic similarity between tags; are the trainable parameters of the graph convolutional network, Indicates the The label embedding representation of the layer;

[0035] The joint optimization loss function is expressed as follows:

[0036] For each sample , the target label is , true label distribution, loss function It is expressed as follows:

[0037] ,

[0038] in, It is a sample The true label distribution of is the label probability predicted by the model, It is a hyperparameter used to balance the effects of feature classification and label dependence. For label and The distance between them.

[0039] Furthermore, during the knowledge distillation process, the output of the teacher model is temperature-scaled to generate the probability distribution of the teacher model. , then input the multimodal features into a small number of fully connected layers, and optimize the weights of the student model through back propagation to generate the predicted label probability distribution of the student model ;

[0040] The compression is a lightweight model, specifically including:

[0041] For each sample , the label embedding generated by the teacher model is represented as , the student model learns its own label embedding representation while generating label probabilities , design regularization term , minimize the distance between the two, expressed as follows:

[0042] ,

[0043] Among them, the label embedding representation generated by the teacher model It is the label embedding captured by the complex model through the graph neural network or label relationship graph, and the label embedding representation generated by the student model is the label embedding learned by the student model;

[0044] Finally, the distillation loss function is designed, which is expressed as follows:

[0045] ,

[0046] in, is a hyperparameter that controls the weight of each part of the loss. is the cross entropy loss between the student model output and the true label, which is used to optimize the accuracy of label prediction and is expressed as follows:

[0047] ,

[0048] in, is the knowledge distillation loss, which guides the learning of the student model through the temperature-scaled teacher model output, and is expressed as follows:

[0049] ,

[0050] in, Indicates temperature.

[0051] Furthermore, the label prediction probability distribution of the lightweight model is corrected according to the label hierarchy diagram, specifically including:

[0052] For tags , through its neighbor labels The information is used to correct its predicted probability, which is expressed as follows:

[0053] ,

[0054] in, is the corrected predicted label probability distribution, is the initial predicted label probability distribution, Representation Label and The dependency weight between them reflects the co-occurrence and semantic similarity between tags; Representation Label The neighbor label set, according to the label relationship graph Sure; is a tuning parameter used to control the strength of belief propagation;

[0055] At the same time, hierarchical consistency constraints are designed to ensure that the prediction results conform to the hierarchical structure of the labels, as shown below:

[0056] ,

[0057] in, yes The sub-tags of It is a parameter that controls the dependency strength between parent and child tags, indicating that the activation of a high-level tag will drive the activation of its child tags.

[0058] Furthermore, the acquiring of the newly input data and inputting the newly input data into the label hierarchy diagram for dynamic updating specifically includes:

[0059] By new input data Calculate tag co-occurrence matrix , capturing the co-occurrence frequency between labels in new data, co-occurrence frequency The calculation formula is:

[0060] ,

[0061] in, is a new input data sample The tag collection, is the indicator function, indicating that when the label and Also appears in the sample China Times, Add 1;

[0062] By calculating the cosine similarity of the label embedding vector, a new label similarity matrix is obtained , which is expressed as follows:

[0063] ,

[0064] in, and Labels and Embedded representation of

[0065] A dynamic label graph update mechanism is designed, which combines the label co-occurrence matrix and similarity matrix to adjust the label relationship graph in real time. Indicates the updated label dependency, calculated as:

[0066] ,

[0067] in, is the tag co-occurrence frequency calculated from the new data; is the new semantic similarity between tags; is the edge weight in the original label relationship graph, reflecting the label dependency structure under historical data; a and b are adjustment parameters that control the impact of new data on the label relationship graph.

[0068] Furthermore, the label level consistency regularization based on the modified label prediction probability distribution Ensure that the model can adaptively adjust the prediction results to conform to the new label hierarchy dependency structure, as shown below:

[0069] ,

[0070] in, Is the model pair label The final predicted probability of It's a label The parent label probability of is the edge weight in the updated label relationship graph, reflecting the label and The dependencies between them.

[0071] In a second aspect of the present invention, a data label classification system based on artificial intelligence is provided, the system comprising:

[0072] A data feature extraction and label relationship graph construction unit is used to obtain text data features and image data features, fuse the two features to form multimodal features, and use the multimodal features to construct a label hierarchy graph; the node set of the label hierarchy graph is the label set, the edge set is the edge set between the labels, and the edge weight is the label weight; the label hierarchy graph is divided into subgraphs of different levels;

[0073] The complex model training unit is used to model the label hierarchical graph using a graph neural network, and train the model using multimodal features as input to obtain a trained complex model;

[0074] A knowledge distillation unit is used to perform knowledge distillation on a complex model and compress it into a lightweight model; the complex model is used as a teacher model, and the predicted label probability output by the complex model is used as the label prediction probability distribution output by the teacher model; the lightweight model is used as a student model;

[0075] The label correction unit is used to correct the label prediction probability distribution of the lightweight model according to the label hierarchy graph;

[0076] The dynamic update optimization unit is used to obtain new input data and input the new input data into the label hierarchy graph for dynamic update. At the same time, during the update, a label hierarchy consistency regularization based on the revised label prediction probability distribution is designed to adaptively adjust the label prediction probability distribution. Finally, the weight of the lightweight model is optimized according to the updated label hierarchy graph to minimize the prediction loss and make the label classification most accurate.

[0077] The beneficial technical effects of the present invention are at least as follows:

[0078] This invention utilizes knowledge distillation technology to transfer knowledge from a complex teacher model (TeacherModel) to a lightweight student model (StudentModel). The student model significantly reduces the computing resources required during the inference phase while maintaining high classification accuracy. This approach enables deployment in low-resource environments (such as mobile devices and edge computing nodes), addressing the issue of excessive model computing resource requirements in existing technologies. Specifically, this invention not only distills the final classification results in label classification tasks but also further improves the classification performance of the student model by distilling intermediate-level representations and label relationship information.

[0079] This invention effectively captures the hierarchy and dependencies between tags by constructing a label relationship graph (LRG) that captures the dependencies between tags. During the label classification process, the system not only extracts features and classifies the input data but also uses the label relationship graph to infer the hierarchical structure and potential connections between tags, ensuring that the classification results have a multi-layered structure. This design enables more accurate label assignment in scenarios with complex label hierarchies (such as product classification and disease diagnosis), thereby addressing the inadequate handling of complex label structures in existing technologies.

[0080] This invention breaks through the bottleneck of existing technologies by combining label relationship networks with knowledge distillation. Specifically, the system first learns the complex dependencies between labels in a large teacher model and transfers these dependencies to a lightweight student model through knowledge distillation. The student model not only performs efficient label classification but also captures complex hierarchical relationships through a label relationship graph, thereby balancing classification accuracy and computational efficiency. This innovation solves the problem of reduced classification accuracy in existing technologies due to the inability of the distillation process to effectively transfer label dependency information. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The present invention is further described with reference to the accompanying drawings. However, the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative effort.

[0082] Figure 1 This is a flow chart of a data label classification method based on artificial intelligence in an embodiment of the present invention.

[0083] Figure 2 This is a framework diagram of an artificial intelligence-based data label classification system in an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0085] In one or more embodiments, Figure 1 As shown, the present invention discloses a data label classification method based on artificial intelligence, which includes steps S1 to S5, including:

[0086] S1. Acquire text data features and image data features, fuse the two features to form multimodal features, and use the multimodal features to construct a label hierarchy graph; the node set of the label hierarchy graph is the label set, the edge set is the edge set between labels, and the edge weight is the label weight; the label hierarchy graph is divided into subgraphs of different levels.

[0087] Specifically, assume that the input data is , where each data sample Corresponding to a tag set The present invention needs to extract features from these data, and because the present invention processes multimodal data (such as text and images), it is necessary to combine different data characteristics to design a reproducible multimodal feature extraction scheme.

[0088] Furthermore, for text data, the present invention uses the following steps to perform feature extraction:

[0089] First, for each text sample Perform standard natural language preprocessing, including stop word removal, lemmatization, and other operations.

[0090] Next, we segment each text into words and generate word vectors based on word embedding methods. Assume that the vocabulary is , the word embedding matrix is ,in is the embedding dimension, each word The embedding vector of .

[0091] Text Each word in , and get its embedding vector , and then use weighted average to generate the global vector representation of the text :

[0092] ,

[0093] in, For text length, Every word The purpose of this step is to ensure that the text features Able to capture the semantic information of the entire text.

[0094] Furthermore, for image data , the present invention uses convolutional neural network (CNN) for feature extraction. The specific steps are as follows:

[0095] The input image passes through several convolutional layers and pooling layers to obtain a feature map , and then flatten it to get the eigenvector . Assume that after the convolutional network, the feature dimension of the image is , then the flattening operation will Map to :

[0096] ,

[0097] in, Is the flatten operation, which is used to flatten a multidimensional tensor into a vector.

[0098] Furthermore, if the data contains multimodal information (such as text and images), the present invention needs to and image features The present invention adopts the following weighted fusion strategy:

[0099] ,

[0100] in, It is a parameter that adjusts the importance of multimodal features, and its value range is The optimal value to ensure that the feature fusion Able to represent the global characteristics of the data.

[0101] Furthermore, in order to capture the label co-occurrence relationship in multi-label data, a co-occurrence matrix is constructed ,in Representation Label and Co-occurrence frequency in the same data sample:

[0102] ,

[0103] In this formula, Representation sample The tag collection, is the indicator function, that is, when the label and When they appear in the same data sample, Increase by 1. This co-occurrence matrix reflects the correlation between tags.

[0104] It is understandable that in practical applications, tags are not only related by co-occurrence, but also semantically related. In order to capture the semantic dependency of tags, the present invention generates a semantic vector for each tag using a pre-trained word embedding model (such as Word2Vec or BERT). Assuming the tag The semantic vector of , the present invention uses cosine similarity to calculate the two labels and The semantic similarity between:

[0105] ,

[0106] in, and It's a label and The semantic vector of It is a semantic similarity matrix, which is used to reflect the semantic relevance between labels.

[0107] Furthermore, in order to further reflect the hierarchical structure of the labels, the present invention introduces an innovative label hierarchy regularization term. Assume that the present invention has determined the hierarchical distance between labels through hierarchical structure analysis. , the present invention combines the co-occurrence matrix , semantic similarity matrix and label level distance To construct the weights between labels :

[0108] ,

[0109] The goal of this regularization term is to optimize the correlation between tags by combining the co-occurrence, semantic similarity and hierarchical structure of tags, so that tags in the near layer have higher association weights, while the weights of tags in the far layer are appropriately weakened.

[0110] Furthermore, the label weights obtained by calculation , the present invention constructs a label relationship graph ,in is a collection of tags, is the set of edges between labels, and the weight of the edge is Next, the present invention divides the tag set into subgraphs of different levels through spectral clustering or community detection algorithm:

[0111] For each tag set , according to the weight Cluster the labels to form multiple levels of label subsets ,in Represents the highest level, Represents the lowest level.

[0112] The final output is a label relationship graph generated based on weights and clustering, in which each label is divided into different levels according to its hierarchy. This hierarchical label relationship graph will serve as the basis for training the classification model in subsequent steps, helping the classification model understand and utilize the hierarchical dependencies between labels.

[0113] S2. Use graph neural networks to model the label hierarchical graph, use multimodal features as input to train the model, and obtain a trained complex model.

[0114] In traditional label classification problems, label classification models typically perform classification directly based on input features, ignoring the complex relationships and multi-level dependencies between labels. To address this challenge, and in conjunction with the scenario of this patent, we have designed an innovative framework that fuses multimodal features with label dependencies.

[0115] First, for the input feature matrix This paper uses a standard neural network architecture to capture the relationship between data features and outputs a preliminary label probability distribution for each sample. Secondly, to address the hierarchical structure between labels, this paper uses a graph convolutional network (GCN) to model the label relationship graph. This allows label classification to not only rely on data features but also integrate the dependency information between labels, solving the problem that traditional methods have difficulty capturing the multi-level structure of labels.

[0116] Specifically, first, input features Feature transformation is performed through a fully connected network layer (MLP). The parameters of the fully connected layer are ,in is the input feature dimension, is the dimension of the hidden layer. For each input sample , calculate the intermediate layer output :

[0117] ,

[0118] in, is the bias term, is the activation function. The purpose of this step is to reduce the dimensionality of high-dimensional features and extract effective representations.

[0119] Next, Mapped to the label space through another fully connected layer. Assume that the second layer weight of the model is ,in is the number of labels, and the output is the sample The initial label probability distribution of :

[0120] ,

[0121] in, is the Softmax function, which converts the output value into a probability distribution. Representation data In each tag The predicted probability of .

[0122] At this time, the present invention only uses the characteristics of the input data Perform label prediction without considering the dependencies between labels. In order to capture the and The complex hierarchical relationship between them, this paper introduces the graph convolutional network (GCN) to process the label relationship graph GCN updates the representation of each label by aggregating the neighbor label information of each label node. Assume that the initial label embedding is represented as , these label embeddings can be obtained through pre-trained models (such as BERT) or initialized embeddings. The aggregation operation of GCN updates each label The calculation formula is as follows:

[0123] ,

[0124] in, It's a label The set of neighbor nodes of It is a label relationship diagram Tags in and The edge weight reflects the co-occurrence frequency and semantic similarity between tags. is the trainable parameter of GCN, Indicates the The label embedding representation of the layer.

[0125] After several layers of GCN convolution operations, the updated label embedding representation is obtained ,This representation not only retains the original label information, but also reflects the hierarchical dependencies between labels through the propagation of neighbor labels.

[0126] Furthermore, in the context of the patent, the present invention aims to achieve efficient multi-level label classification. To this end, the present invention designs an innovative joint fusion mechanism that combines the input feature classification results with label dependencies, enabling the model to both predict labels based on data features and perform hierarchical correction using the label relationship graph.

[0127] Specifically, for each data sample , its preliminary label probability Obtained through the standard feature classification layer. The label relationship graph processed by the GCN model updates each label Embedded representation of Next, the present invention designs a joint optimization objective function to fuse these two parts of information.

[0128] Furthermore, the present invention introduces a loss function based on cross entropy, combining the dependency information of feature classification and label relationship graph. , the target label is (true label distribution), loss function Designed to:

[0129] ,

[0130] in, It is a sample The true label distribution of is the label probability predicted by the model, It is a hyperparameter used to balance the effects of feature classification and label dependence. For label and The distance between them can usually be cosine distance or Euclidean distance.

[0131] The first term in the loss function is a standard classification loss, which optimizes the label classification of the input features. The second term is a regularization term based on the label relationship graph, which enhances the hierarchical dependencies between labels by minimizing the distance between label embeddings. This joint optimization strategy allows the model to strike a balance between data feature classification and label structure learning.

[0132] Furthermore, through the above joint loss function , the present invention uses back propagation to optimize all parameters of the neural network, including the weights of the feature classification layer , and the weights of GCN After the optimization is completed, the final output model can not only accurately predict the label distribution of the data, but also fully utilize the hierarchical structure between labels for multi-level classification.

[0133] The final classification model can be used as the input of the teacher model in the subsequent knowledge distillation process, ensuring the efficient execution of subsequent steps.

[0134] S3. Perform knowledge distillation on the complex model and compress it into a lightweight model; use the complex model as the teacher model, and use the predicted label probability output by the complex model as the label prediction probability distribution output by the teacher model; the lightweight model is the student model.

[0135] Specifically, for each sample , the label prediction probability distribution generated by the teacher model Multimodal feature representation based on complex models. This paper performs temperature scaling on the output of the teacher model during the distillation process to generate a smoother probability distribution. , which enables the student model to capture more subtle information between categories during the learning process:

[0136] ,

[0137] in, is the original output of the teacher model, is the temperature parameter. The value helps to expand the probability distribution and retain richer category-related information.

[0138] Understandably, due to the multimodal characteristics It already contains rich information, so the student model can process these features through a simplified network structure to generate its predicted label probability distribution The present invention uses a small number of fully connected layers and optimizes the weights of the student model through back propagation:

[0139] ,

[0140] in, is the weight matrix of the student model, is the bias term, is the number of labels, The student model is designed to be lightweight, with the main purpose of reducing computational overhead and adapting to the resource-constrained reasoning requirements in patent scenarios (such as mobile terminals and embedded devices).

[0141] 2.3 Innovative Design: Hierarchical Dependency Preserving Regularization

[0142] In patent scenarios with multi-layered label structures, the hierarchical relationships between labels are crucial for classification accuracy. To ensure that the student model retains these label dependencies during the distillation process, this paper designs an innovative hierarchical dependency-preserving regularizer. This term minimizes the difference in label embedding representation between the teacher and student models, ensuring that the student model understands the hierarchical structure of labels.

[0143] Specifically, for each sample , the label embedding generated by the teacher model is represented as , the student model learns its own label embedding representation while generating label probabilities The present invention designs a regularization term , minimizing the distance between these two:

[0144] ,

[0145] here, It is the label embedding captured by the complex model through GCN or label relationship graph, is the label embedding learned by the student model. By minimizing this difference, the present invention ensures that the student model not only learns the label probabilities but also preserves the hierarchical dependencies of the labels.

[0146] Finally, the distillation loss function designed by this invention combines the traditional knowledge distillation cross entropy loss, the temperature-scaled smoothing loss, and the hierarchical dependency preservation regularization term. The total loss function is:

[0147]

[0148] in, is the cross entropy loss between the student model output and the true label, which is used to optimize the accuracy of label prediction:

[0149] ,

[0150] is the knowledge distillation loss that guides the learning of the student model through the temperature-scaled teacher model output:

[0151] ,

[0152] It is an innovative regularization term designed by the present invention, which is used to preserve the hierarchical dependency of labels. is a hyperparameter that controls the weight of each part of the loss.

[0153] The total loss function designed above , the present invention trains the student model and optimizes its weight and During the training process, the student model not only learns from the label probability distribution of the teacher model, but also preserves the hierarchical structure information between labels through the regularization term.

[0154] After training, the output lightweight student model achieves classification performance close to that of the teacher model while having a lower computational cost, making it well-suited for resource-constrained scenarios. This student model can efficiently process multimodal data and excel in multi-layered label structures, making it particularly well-suited for the complex label classification tasks described in the patent.

[0155] S4. Modify the label prediction probability distribution of the lightweight model according to the label hierarchy graph.

[0156] Specifically, first, a lightweight model is used to infer the input data and generate the label probability distribution of each sample. This probability distribution represents the probability distribution of the student model based on the input data For each label The reasoning process is performed by a lightweight network:

[0157] ,

[0158] in, is the weight matrix of the student model, is the multimodal feature of the input sample, is the bias term, is the Softmax function. Through this process, each sample is obtained In each tag The predicted probability on .

[0159] However, directly relying on the output of the lightweight model may not accurately reflect the hierarchical dependencies between labels. Therefore, it is necessary to further introduce a label relationship graph. , and correct the prediction results.

[0160] Furthermore, in order to ensure that the final classification result reflects the hierarchical dependency between labels, the present invention uses a label relationship diagram To correct the prediction of the lightweight model. First, define the weight matrix in the label relationship graph ,in Representation Label and The dependency weight between them has been calculated in step 1 using the co-occurrence matrix and semantic similarity.

[0161] Furthermore, in order to apply the dependency between labels to classification, the present invention adopts a hierarchical dependency propagation mechanism to propagate the prediction confidence of labels through the label relationship graph. Specifically, for labels , the present invention uses its neighbor label to correct its prediction confidence:

[0162] ,

[0163] in, Is a lightweight model for label The confidence level of the initial prediction; Representation Label The neighbor label set, according to the label relationship graph Sure; Representation Label and The dependency weight between them reflects the co-occurrence and semantic similarity between tags; Is a tuning parameter used to control the strength of confidence propagation. This formula modifies the prediction of the target label by the confidence of the neighboring labels, ensuring that the dependency structure between labels is reflected in the final classification result. The final prediction result Not only the output of the lightweight model is considered, but also the hierarchical information in the label relationship graph is incorporated.

[0164] In addition to correcting the classification confidence through label propagation, the present invention also designs a hierarchical consistency constraint to ensure that the prediction results conform to the hierarchical structure of the labels. For example, if the parent label Activated, sub-tab The confidence level of should be greater than a certain threshold. The present invention implements this constraint through the following formula:

[0165] ,

[0166] in, yes The sub-tags of is a parameter that controls the dependency strength between parent and child labels. This constraint ensures hierarchical consistency of predictions, i.e., the activation of a high-level label will drive the activation of its child labels.

[0167] Generate label probability distribution through preliminary inference of lightweight models Then, combined with the label relationship diagram The present invention modifies the classification results based on the confidence propagation mechanism and hierarchical consistency constraint. The final output after modification is This more accurately reflects the dependencies between labels and ensures hierarchical consistency in classification results. The entire inference process balances the efficiency of lightweight models with the complexity of label dependencies, making it particularly suitable for multi-layer label classification problems in patent scenarios.

[0168] S5. Obtain new input data and input the new input data into the label hierarchy graph for dynamic update. At the same time, design a label hierarchy consistency regularization based on the revised label prediction probability distribution to adaptively adjust the label prediction probability distribution during the update. Finally, optimize the weight of the lightweight model according to the updated label hierarchy graph to minimize the prediction loss and make the label classification most accurate.

[0169] In the patent scenario, the hierarchical dependencies between tags may change due to data updates. In particular, when new samples are input into the system, the co-occurrence frequency and similarity of tags will be dynamically adjusted. To this end, the system needs to dynamically update the tag relationship graph through a real-time data monitoring mechanism.

[0170] Furthermore, first, by new input data Calculate tag co-occurrence matrix , capturing the co-occurrence frequency between labels in new data. This co-occurrence matrix can reflect the co-occurrence of labels in new data and affect the label relationship graph. The calculation formula is:

[0171] ,

[0172] in, is a new input data sample A collection of tags, is the indicator function, indicating that when the label and Also appears in the sample China Times, Add 1. This co-occurrence matrix will be used for subsequent label relationship graph updates.

[0173] In addition to the label co-occurrence matrix, the semantic similarity between labels will also change with the addition of new data. By calculating the cosine similarity of the label embedding vectors, the present invention can obtain a new label similarity matrix: :

[0174] ,

[0175] in, and Labels and This matrix is used to dynamically reflect the semantic similarity between labels and adjust the label hierarchy based on the upper and lower relationships in new data.

[0176] Furthermore, in order to effectively deal with the changes in label relationships brought about by new data, the present invention designs a dynamic label graph update mechanism that combines the label co-occurrence matrix and the similarity matrix to adjust the label relationship graph in real time. Indicates the updated label dependency, calculated as:

[0177] ,

[0178] in, is the tag co-occurrence frequency calculated from the new data; is the new semantic similarity between tags; It is the edge weight in the original label relationship graph, reflecting the label dependency structure under historical data; and To adjust the parameters and control the impact of new data on the label relationship graph, the system updates the edge weights between labels based on the new data to ensure that the label relationship graph can dynamically adapt to the new label structure.

[0179] To ensure that the dynamic update of the label relationship graph is consistent with the classification model, this paper designs an adaptive optimization strategy that maintains hierarchical consistency between labels by introducing an innovative regularization term, the label dependency regularization term. The regularization term is based on the new label relationship graph and ensures that the model's predictions conform to the updated label dependency structure. To ensure that the model can adaptively adjust the prediction results to conform to the new label hierarchy dependency structure, this paper introduces the following regularization term:

[0180] ,

[0181] in, Is the model pair label The final predicted probability of It's a label The parent label probability of is the edge weight in the updated label relationship graph, reflecting the label and The regularization term ensures that when a high-level label When activated, its sub-tags The predicted probability of should satisfy a certain hierarchical consistency. By minimizing this regularization term, the model is able to adjust its prediction results to conform to the updated label hierarchy.

[0182] It is understandable that in order to avoid frequent updates of model weights and label relationship graphs, the system designs a change threshold trigger mechanism to determine when to perform adaptive optimization of the model and label graph. The present invention defines a change threshold If the weight change of the label relationship graph caused by the new data exceeds the threshold, adaptive optimization is triggered. The specific triggering formula is:

[0183] ,

[0184] if , the system updates the label relationship graph and adaptively optimizes the model, otherwise it maintains the existing model and label structure.

[0185] Furthermore, when the label relationship graph is updated, the present invention needs to re-optimize the weights of the lightweight model to adapt to the new label dependency structure. The optimization goal of the model is to minimize the combination of classification loss and label level regularization term. The optimization objective function is:

[0186] ,

[0187] in, is the cross entropy loss for standard classification; Knowledge distillation loss is used to maintain the consistency between lightweight models and complex models; is a label level consistency regularizer that ensures that the model's classification conforms to the new label dependency. 、 and Represents the weight of the corresponding loss function. Through back propagation, the system optimizes the model weight and bias , and adjust the edge weights in the label relationship graph, and finally output the adaptively optimized model.

[0188] This design allows the system to dynamically update the label relationship graph and classification model in the face of constantly changing data and label relationships, ensuring that classification results always conform to the latest label hierarchy. The adaptive optimization strategy, through the introduction of regularization terms and change threshold triggering mechanisms, ensures a reasonable update frequency and consistent model performance.

[0189] In one or more embodiments, Figure 2 As shown, the present invention discloses a data label classification system based on artificial intelligence, the system comprising:

[0190] The data feature extraction and label relationship graph construction unit 101 is used to obtain text data features and image data features, fuse the two features to form multimodal features, and use the multimodal features to construct a label hierarchy graph; the node set of the label hierarchy graph is the label set, the edge set is the edge set between the labels, and the edge weight is the label weight; the label hierarchy graph is divided into subgraphs of different levels;

[0191] The complex model training unit 102 is used to model the label hierarchical graph using a graph neural network, and train the model using multimodal features as input to obtain a trained complex model;

[0192] The knowledge distillation unit 103 is used to perform knowledge distillation on the complex model and compress it into a lightweight model; the complex model is used as the teacher model, and the predicted label probability output by the complex model is used as the label prediction probability distribution output by the teacher model; the lightweight model is used as the student model;

[0193] The label correction unit 104 is used to correct the label prediction probability distribution of the lightweight model according to the label hierarchy graph;

[0194] The dynamic update optimization unit 105 is used to obtain new input data and input the new input data into the label hierarchy diagram for dynamic update. At the same time, during the update, a label hierarchy consistency regularization based on the revised label prediction probability distribution is designed to adaptively adjust the label prediction probability distribution. Finally, the weight of the lightweight model is optimized according to the updated label hierarchy diagram to minimize the prediction loss and make the label classification most accurate.

[0195] In summary, the present invention effectively overcomes the problems of traditional label classification methods in dealing with multi-level label structures, label dependencies, and high computing resource requirements, and provides an efficient label classification system that can adapt to diverse application scenarios while maintaining classification accuracy.

[0196] These are merely some preferred embodiments of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. A person skilled in the art can understand that all or part of the processes of the above embodiments and equivalent changes made in accordance with the claims of the present invention still fall within the scope of the invention.

Claims

1. A data label classification method based on artificial intelligence, characterized in that: The method comprises the following steps: Acquire text data features and image data features, fuse the two features to form a multimodal feature, and construct a label hierarchy graph using the multimodal feature; the node set of the label hierarchy graph is a label set, the edge set is an edge set between labels, and the edge weight is a label weight; the label hierarchy graph is divided into subgraphs of different levels; Use graph neural networks to model the label hierarchical graph, use multimodal features as input to train the model, and obtain a trained complex model; Perform knowledge distillation on the complex model and compress it into a lightweight model; use the complex model as the teacher model, and use the predicted label probability output by the complex model as the label prediction probability distribution output by the teacher model; the lightweight model is the student model; Modify the label prediction probability distribution of the lightweight model according to the label hierarchy graph; Acquire new input data and input it into the label hierarchy graph for dynamic update. At the same time, design a label hierarchy consistency regularization based on the revised label prediction probability distribution to adaptively adjust the label prediction probability distribution during the update. Finally, optimize the weights of the lightweight model based on the updated label hierarchy graph to minimize the prediction loss and maximize the label classification accuracy. Among them, in the process of knowledge distillation, the output of the teacher model is temperature scaled to generate the probability distribution of the teacher model , then input the multimodal features into a small number of fully connected layers, and optimize the weights of the student model through back propagation to generate the predicted label probability distribution of the student model ; The compression is a lightweight model, specifically including: For each sample , the label embedding generated by the teacher model is represented as , the student model learns its own label embedding representation while generating label probabilities , design regularization term , minimize the distance between the two, expressed as follows: , Among them, the label embedding representation generated by the teacher model It is the label embedding captured by the complex model through the graph neural network or label hierarchy graph, and the label embedding representation generated by the student model is the label embedding learned by the student model; i represents the i-th label; By minimizing the difference in label embedding representation between the teacher model and the student model, the student model is ensured to understand the hierarchical structure of the labels.

2. The data label classification method based on artificial intelligence according to claim 1 is characterized in that: The method further comprises: Based on the update of the label hierarchy graph and the lightweight model, a threshold trigger mechanism is designed to determine when to perform adaptive optimization of the lightweight model and the label hierarchy graph. The judgment rules are as follows: Define a threshold , if the weight change of the label hierarchy caused by the new data exceeds the threshold, the adaptive optimization is triggered, which is expressed as follows: , in, represents the edge weights in the updated label hierarchy graph, Represents the edge weight in the original label hierarchy graph, L represents the label set; i represents the i-th label, j represents the j-th label; like , then the label hierarchy graph is updated and the model is adaptively optimized, otherwise the existing model and label structure are maintained.

3. The data label classification method based on artificial intelligence according to claim 1 is characterized in that: The text data features are generated using a weighted average method; the image data features are extracted using a convolutional neural network to obtain a feature map, and the feature map is flattened to obtain the image data features; the two features are fused to form a multimodal feature using a weighted fusion strategy; The method of constructing a label hierarchy graph using multimodal features specifically includes: Constructing a co-occurrence matrix ,in Representation Label and Co-occurrence frequency in the same data sample; Calculate semantic similarity matrix Reflect Tags and The semantic relevance between the semantic vectors of According to the co-occurrence matrix and semantic similarity matrix Constructing weights between labels , which is expressed as follows: , in, and Represents the co-occurrence matrix and semantic similarity matrix The weight coefficient of The coefficient representing the hierarchical distance, Indicates the hierarchical distance between labels; According to the calculated weight Constructing a label hierarchy ,in is a collection of tags, is the set of edges between labels, and the weight of the edge is ; For each tag set , according to the weight Cluster the labels to form multiple levels of label subsets ,in Represents the highest level, Represents the lowest level.

4. The data label classification method based on artificial intelligence according to claim 1 is characterized in that: The method uses a graph neural network to model the label hierarchy graph and uses multimodal features as input to train the model to obtain a trained complex model. Specifically, the method includes: The fused features are input as samples into the fully connected network layer for feature conversion, and then mapped to the label space through the second fully connected layer to output the preliminary label probability distribution of the samples; A graph convolutional network is introduced to aggregate the neighbor label information of each label node and update the embedding representation of each label; A joint optimization loss function is designed to fuse the preliminary label probability distribution and the updated embedding representation of each label for training, and the joint optimization loss function is used as the loss function of the complex model for training.

5. The data label classification method based on artificial intelligence according to claim 4 is characterized in that: The graph convolutional network is introduced to aggregate the neighbor label information of each label node and update the embedding representation of each label, specifically including: Assume that the initial label embedding is represented as , the aggregation operation of the graph convolutional network updates each label The calculation formula is as follows: , in, is the representation of each label after the update, represents the activation function, It's a label The set of neighbor nodes of It is a label hierarchy diagram Tags in and The edge weight reflects the co-occurrence frequency and semantic similarity between tags; are the trainable parameters of the graph convolutional network, Indicates the The label embedding representation of the layer; The joint optimization loss function is expressed as follows: For each sample , the target label is , true label distribution, loss function It is expressed as follows: , in, It is a sample The true label distribution of is the label probability predicted by the model, It is a hyperparameter used to balance the effects of feature classification and label dependence. For label and The distance between them.

6. The data label classification method based on artificial intelligence according to claim 1 is characterized in that: Design the distillation loss function, which is expressed as follows: , in, is a hyperparameter that controls the weight of each part of the loss. is the cross entropy loss between the student model output and the true label, which is used to optimize the accuracy of label prediction and is expressed as follows: , in, It is a sample The true label score, is the knowledge distillation loss, which guides the learning of the student model through the temperature-scaled teacher model output, and is expressed as follows: , in, Indicates temperature.

7. The data label classification method based on artificial intelligence according to claim 6 is characterized in that: The modification of the label prediction probability distribution of the lightweight model according to the label hierarchy graph specifically includes: For tags , through its neighbor labels The information is used to correct its predicted probability, which is expressed as follows: , in, is the corrected predicted label probability distribution, is the initial predicted label probability distribution, Representation Label and The dependency weight between them reflects the co-occurrence and semantic similarity between tags; Representation Label The neighbor label set of Sure; is a tuning parameter used to control the strength of belief propagation; At the same time, hierarchical consistency constraints are designed to ensure that the prediction results conform to the hierarchical structure of the labels, as shown below: , in, yes The sub-tags of It is a parameter that controls the dependency strength between parent and child tags, indicating that the activation of a high-level tag will drive the activation of its child tags.

8. The data label classification method based on artificial intelligence according to claim 1 is characterized in that: The acquiring of the newly input data and inputting the newly input data into the label hierarchy diagram for dynamic updating specifically includes: By new input data Calculate tag co-occurrence matrix , capturing the co-occurrence frequency between labels in new data, co-occurrence frequency The calculation formula is: , in, is a new input data sample The tag collection, is the indicator function, indicating that when the label and Also appears in the sample China Times, Add 1; By calculating the cosine similarity of the label embedding vector, a new label similarity matrix is obtained , which is expressed as follows: , in, and Labels and Embedded representation of A dynamic label hierarchy graph update mechanism is designed, which combines the label co-occurrence matrix and similarity matrix to adjust the label hierarchy graph in real time. Indicates the updated label dependency, calculated as: , in, is the tag co-occurrence frequency calculated from the new data; is the new semantic similarity between tags; is the edge weight in the original label hierarchy graph, reflecting the label dependency structure under historical data; a and b are adjustment parameters that control the impact of new data on the label hierarchy graph.

9. The data label classification method based on artificial intelligence according to claim 8 is characterized in that: The label level consistency regularization based on the modified label prediction probability distribution Ensure that the model can adaptively adjust the prediction results to conform to the new label hierarchy dependency structure, as shown below: , in, Is the model pair label The final predicted probability of It's a label The parent label probability of is the edge weight in the updated label hierarchy graph, reflecting the label and The dependencies between them.

10. A data label classification system based on artificial intelligence, characterized in that: The system comprises: A data feature extraction and label hierarchical graph construction unit is used to obtain text data features and image data features, fuse the two features to form multimodal features, and use the multimodal features to construct a label hierarchical graph; the node set of the label hierarchical graph is the label set, the edge set is the edge set between the labels, and the edge weight is the label weight; the label hierarchical graph is divided into subgraphs of different levels; The complex model training unit is used to model the label hierarchical graph using a graph neural network, and train the model using multimodal features as input to obtain a trained complex model; A knowledge distillation unit is used to perform knowledge distillation on a complex model and compress it into a lightweight model; the complex model is used as a teacher model, and the predicted label probability output by the complex model is used as the label prediction probability distribution output by the teacher model; the lightweight model is used as a student model; The label correction unit is used to correct the label prediction probability distribution of the lightweight model according to the label hierarchy graph; The dynamic update optimization unit is used to obtain new input data and input the new input data into the label hierarchy graph for dynamic update. At the same time, during the update, a label hierarchy consistency regularization based on the revised label prediction probability distribution is designed to adaptively adjust the label prediction probability distribution. Finally, the weight of the lightweight model is optimized according to the updated label hierarchy graph to minimize the prediction loss and maximize the label classification accuracy. Among them, in the process of knowledge distillation, the output of the teacher model is temperature scaled to generate the probability distribution of the teacher model , then input the multimodal features into a small number of fully connected layers, and optimize the weights of the student model through back propagation to generate the predicted label probability distribution of the student model ; The compression is a lightweight model, specifically including: For each sample , the label embedding generated by the teacher model is represented as , the student model learns its own label embedding representation while generating label probabilities , design regularization term , minimize the distance between the two, expressed as follows: , Among them, the label embedding representation generated by the teacher model It is the label embedding captured by the complex model through the graph neural network or label hierarchy graph, and the label embedding representation generated by the student model is the label embedding learned by the student model; i represents the i-th label; By minimizing the difference in label embedding representation between the teacher model and the student model, the student model is ensured to understand the hierarchical structure of the labels.

Citation Information

Patent Citations

  • Image multi-label classification method based on graph convolutional neural network and class activation mapping

    CN115457332A