Complaint text label classification method and device, electronic equipment and storage medium

By using a multi-label classification model that integrates label information and attention mechanisms in complaint text classification, it solves the problem of difficulty in effectively classifying and processing passenger complaint texts in the existing technology, and achieves higher classification accuracy and service quality improvement efficiency. .

CN119336914APending Publication Date: 2025-01-21CHINA ACAD OF CIVIL AVIATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411184987.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively classify and handle passenger complaint texts, especially in multi-label classification tasks, resulting in limited improvement in service quality.

Method used

A multi-label classification model for complaint text that integrates label information and attention mechanisms is adopted. This model combines semantic features and label features to extract local and global features through a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer. , and fuse through the multi-head collaborative attention mechanism, and finally build an integrated classifier for different labels.

Benefits of technology

It significantly improves the multi-label classification accuracy of complaint text, improves the classification performance of the model, can more accurately capture the relationship between text features and labels, and improves the processing efficiency of service quality feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336914A_ABST
    Figure CN119336914A_ABST
Patent Text Reader

Abstract

The invention provides a complaint text label classification method and device, and the method comprises the steps: obtaining a complaint text to be subjected to label classification, inputting the complaint text to be subjected to label classification into a label classification model, and obtaining a complaint label classification result; the label classification model at least comprises a text presentation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer. According to the complaint text multi-label classification model fusing the label information and the attention mechanism provided by the invention, semantic features and label features extracted based on association rules are combined to represent text vectors, then local features and global features of the text are extracted respectively, and fusion is performed by using a multi-head collaborative attention mechanism; the feature loss is reduced through information fusion of different granularities, and finally, an integrated classifier is constructed for each label, so that the classification performance of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a complaint text label classification method, device, electronic device and storage medium. Background Art

[0002] In the era of mobile Internet, passenger complaints are an important channel for passenger feedback. Passenger complaint information often exposes problems in the operation process of the enterprise. Discovering the potential needs of customers from it plays an important guiding role in adjusting the enterprise's operational decisions and improving services. Therefore, accurately and quickly classifying customer complaints and converting unstructured data into structured form is crucial for enterprises to quickly handle customer complaints and tap into potential customer needs. Passenger complaints from certain airlines are often directed at different service categories, such as ticketing services, abnormal flight services, baggage services, and air services. Each category is closely related to the quality of a certain airline service, and complaints under different categories reflect the service quality from different angles and to different degrees. In actual applications, the party being complained against needs to improve its own services from different aspects according to the topics involved in the complaint content. Therefore, the subject classification of the complaint text is crucial. Summary of the invention

[0003] In response to the problems in the prior art, an embodiment of the present invention provides a complaint text label classification method, device, electronic device and storage medium.

[0004] Specifically, the embodiment of the present invention provides the following technical solutions: In a first aspect, an embodiment of the present invention provides a method for classifying complaint text labels, including: Obtain complaint text to be labeled and classified, input the complaint text to be labeled and classified into a label classification model, and obtain complaint label classification results; the label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0005] Furthermore, the text representation layer is specifically used for: Obtain a text vectorization representation of the complaint text to be labeled and classified at the word vector granularity; The vector representation of semantic features and label features is obtained based on the attention weight of label features; Using label features to guide the learning of semantic feature representation.

[0006] Furthermore, the multi-channel feature extraction layer includes a local feature extraction part and a global feature extraction part. The local feature extraction part includes a text convolutional neural network composed of at least three convolution kernels of different sizes, which is used to extract local features between word vectors within the convolution kernel range, and local features of different levels obtained by three channels are spliced ​​as text local feature outputs; the global feature extraction part includes a bidirectional long short-term memory multi-channel feature extraction network, which is used to model text sequences in both forward and backward directions and capture bidirectional semantic dependencies. The feature outputs in both forward and backward directions are spliced ​​as text global feature outputs.

[0007] Furthermore, the feature interaction layer is used to input local features and global features into the multi-head collaborative attention mechanism, extract key information from another feature vector, realize interaction between features, and splice the relationship information between features with the original feature vector to realize feature fusion.

[0008] Furthermore, the multi-label classification layer is used to train separate binary classifier sets for different labels, and select the best classifier from the binary classifier set to determine the complaint label classification result of the complaint text to be labeled classified, wherein the binary classifier set is constructed using multiple classification algorithms.

[0009] Furthermore, the label classification model also includes: The attention adjustment layer is used to adjust the prediction results using corresponding attention weights for different labels to obtain the final multi-complaint label classification results.

[0010] Furthermore, the label classification model also includes: The output layer is used to set different thresholds for different labels as needed to control the prediction results of the labels, and finally output the classification results of multiple complaint labels predicted by the model.

[0011] In a second aspect, an embodiment of the present invention further provides a complaint text label classification device, comprising: The acquisition module is used to obtain the complaint text to be tagged and classified; A classification module is used to input the complaint text to be labeled and classified into a label classification model to obtain a complaint label classification result; the label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the complaint text label classification method as described in the first aspect is implemented.

[0013] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the complaint text label classification method as described in the first aspect.

[0014] In a fifth aspect, an embodiment of the present invention further provides a computer program, which, when executed by a processor, implements the complaint text label classification method as described in the first aspect.

[0015] It can be seen from the above technical solution that in order to better realize the multi-label text classification of complaint data, the embodiment of the present invention provides a complaint text label classification method and device, which adopts a complaint text multi-label classification model that integrates label information and attention mechanism. The model combines the extracted semantic features and the label features extracted based on association rules to represent the text vector, and then extracts the local features and global features of the text respectively and fuses them using a multi-head collaborative attention mechanism. The feature loss is reduced by fusing information of different granularities, and finally an integrated classifier is constructed for different labels to improve the classification performance of the model. Experiments show that compared with other comparative models, the model proposed in the embodiment of the present invention achieves better results on the complaint text dataset and effectively improves the classification model performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flowchart of a method for classifying complaint text labels provided by an embodiment of the present invention; Figure 2 A schematic diagram of a multi-label classification model for service quality complaint texts that integrates multiple features and an attention mechanism provided in an embodiment of the present invention; Figure 3 A Bert model flow chart provided for an embodiment of the present invention; Figure 4 A Text-CNN model provided by an embodiment of the present invention; Figure 5 A BiLSTM model provided by an embodiment of the present invention; Figure 6 A schematic diagram of feature fusion provided by an embodiment of the present invention; Figure 7 A schematic diagram of a multi-head collaborative attention mechanism provided by an embodiment of the present invention; Figure 8 A comparison chart of the number of texts in each tag and the trend of classification effect provided by an embodiment of the present invention; Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Passenger complaints from certain airlines are often directed at different service categories, such as ticketing services, abnormal flight services, baggage services, in-flight services, etc. Each category is closely related to the quality of a certain airline service, and complaints under different categories reflect the service quality from different angles and to different degrees. In actual applications, the party being complained against needs to improve its own services from different aspects according to the topics involved in the complaint content. Therefore, the subject classification of the complaint text is crucial.

[0020] However, in a complaint text, there may be multiple complaint topics, that is, a text may be associated with multiple labels, and multi-label classification is required. Unlike single-label classification, in multi-label classification, each instance corresponds to more than one label, and the number of labels is also uncertain. In addition, there is data imbalance under some labels. These problems have brought certain challenges to the multi-label classification task. Therefore, an embodiment of the present invention proposes a multi-label classification model for a certain aviation service quality complaint text that integrates multiple features and an attention mechanism, which can more fully extract the text features of the complaint content, effectively learn the relationship between features, and improve the performance of the multi-label classification model.

[0021] It is understandable that passenger complaint information plays an important guiding role in the adjustment of enterprise operation decisions and the improvement of services. However, in the multi-label classification task of passenger complaints, fully extracting text features has always been a difficult problem. Therefore, in order to solve the problems of insufficient text feature extraction and insufficient learning of the relationship between features, the embodiment of the present invention constructs a multi-label classification model (MAG) of a certain aviation service quality complaint text that integrates multiple features and attention mechanism to improve the accuracy of text multi-label classification. First, BERT and attention mechanism are used to represent the semantic and label features of the text; then Text-CNN and BiLSTM multi-channel feature extraction networks are constructed to extract local features and global features of the complaint text respectively, and then the relationship between local features and global features is learned by the collaborative attention mechanism; finally, the accurate classification of passenger complaint text is realized by integrating the base classifier. The experimental results show that the model constructed by the embodiment of the present invention improves the multi-label classification effect of passenger complaint data in a certain aviation field, and the performance is better than other algorithms. It is proved that the label feature representation based on association rules and the multi-channel feature extraction network can enrich text information and fully extract text features; the collaborative attention mechanism can effectively learn the relationship between text features, improve the model classification effect, and realize the classification of passenger complaint text more accurately. The complaint text label classification method provided by the present invention will be explained and illustrated in detail through specific embodiments. It should be noted that the complaint text label classification method can be used for label classification of passenger complaint texts, and can also be used for label classification of complaint texts in other scenarios, such as complaint texts about hotels, restaurants, scenic spots, etc.

[0022] Figure 1 FIG. 2 is a flowchart of a method for classifying complaint text labels provided by an embodiment of the present invention. Figure 1 As shown, the complaint text label classification method provided by the embodiment of the present invention includes the following steps: Step 101: Obtain complaint text to be tagged and classified.

[0023] Step 102: Input the complaint text to be tagged and classified into the tag classification model.

[0024] The label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output. The label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Step 103: The label classification model combines the extracted semantic features with the label features extracted based on the association rules to represent the text vector; This step can be performed by the text representation layer of the label classification model.

[0025] Step 104, the label classification model uses a multi-channel feature extraction network to extract local features and global features of the complaint text to be label classified; This step can be performed by the multi-channel feature extraction layer of the label classification model.

[0026] Step 105, the label classification model determines the relationship between the local feature and the global feature; This step can be performed by the feature interaction layer of the label classification model.

[0027] Step 106, the label classification model constructs integrated classifiers for different labels respectively, and determines the complaint label classification result of the complaint text to be label classified based on the text vector; This step can be performed by the multi-label classification layer of the label classification model.

[0028] Step 107: The label classification model outputs the complaint label classification result.

[0029] The multi-label classification model for service quality complaint text proposed in this embodiment mainly includes an input layer, a text representation layer, a multi-channel feature extraction layer, a feature interaction layer, a multi-label classification layer and an output layer. Its specific structure is as follows: Figure 2 shown.

[0030] Optionally, at the text representation layer, the model can use the BERT model to obtain the text vector representation at the word vector granularity, and then combine it with the attention weight based on the label information to obtain the vector representation result of the fusion word embedding and label embedding. Use label information to guide the learning of text feature representation.

[0031] Optionally, in the multi-channel feature representation layer, the text vectors can be input into the multi-channel feature extraction layer including local feature extraction and global feature extraction, wherein the local feature extraction part is a Text-CNN network composed of three convolution kernels of different sizes, which is used to extract local features between word vectors within the convolution kernel range. The local features of different levels obtained by the three channels are spliced ​​and output as local features of the text. The global feature extraction part is a BiLSTM network that can well capture dependencies over longer distances. The BiLSTM network is used to model the text sequence in both the forward and backward directions to better capture the bidirectional semantic dependencies; and the feature outputs in the two directions are spliced ​​as the global features of the text output.

[0032] Optionally, in the feature interaction layer, local features and global features can be input into a multi-head collaborative attention mechanism to extract key information from each other's feature vectors to achieve interaction between features, and finally spliced ​​with the original feature vector as the relationship information between features to achieve feature fusion.

[0033] Optionally, in the multi-label classification layer, the BR algorithm can be used to train a separate binary classifier for each label. The binary classifier is constructed using algorithms such as Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Naive Bayes method, and Decision Tree (DT). Then, the best classifier is used to predict the sample.

[0034] Optionally, in the attention adjustment layer, the corresponding attention weight can be used for each label to adjust the prediction result to obtain the final multi-complaint label classification result. The attention mechanism is introduced to assign different weights to each label, and the importance of labels in the text can be learned through the attention network.

[0035] Optionally, in the output layer, different thresholds can be set for each label as needed to control the prediction results of the label, and finally the category label predicted by the model is output.

[0036] It can be seen from the above technical solution that the complaint text label classification method provided by the embodiment of the present invention adopts a complaint text multi-label classification model that integrates label information and attention mechanism. The model combines the extracted semantic features and label features extracted based on association rules to represent the text vector, and then extracts the local features and global features of the text respectively and fuses them using a multi-head collaborative attention mechanism. The feature loss is reduced by fusing information of different granularities, and finally an integrated classifier is constructed for different labels, thereby improving the classification performance of the model. Experiments show that compared with other comparative models, the model proposed in the embodiment of the present invention achieves better results on the complaint text dataset and effectively improves the classification model performance.

[0037] Based on the content of the above embodiment, in this embodiment, the text representation layer is specifically used for: Obtain a text vectorization representation of the complaint text to be labeled and classified at the word vector granularity; The vector representation of semantic features and label features is obtained based on the attention weight of label features; Using label features to guide the learning of semantic feature representation.

[0038] In this embodiment, text representation is the process of converting text into a computer-readable digital matrix, which is the first step of the method of this embodiment. Traditional text vectorization representation models include Word2Vec, Doc2Vec, LDA, etc., but traditional models cannot solve the problem of polysemy well, nor can they take label information into account. The BERT model is a pre-trained language model released by Google, which can effectively solve the problem of polysemy. Label feature words are frequent features obtained based on association rule mining, and the correlation between text and labels can be considered. The model learns a text vector representation based on label features for each label, which improves the classification accuracy to a certain extent.

[0039] Text information is intuitive for people to understand, but it cannot be directly processed by computers, so the text needs to be converted into data that can be processed by computers. Traditional text representations include one-hot and matrix decomposition, but they will produce disadvantages such as dimensionality disaster and high cost during representation. With the development of neural networks, word embedding has emerged as a new way of word representation, using a continuous, low-dimensional, dense vector to represent words, referred to as word vectors. Word2Vec and Glove are a static word vector representation method. For any word, its vector is constant and does not change with the change of its context. However, static word vectors cannot solve the problem of polysemy. In order to better represent the word features of the text, this embodiment uses the pre-trained model BERT to calculate the contextual representation of each word. The same word has different representations according to different contexts. The BERT model consists of a multi-layer Transformer, accepts a sequence input of 512 words, and outputs a representation of the sequence. The process is as follows Figure 3 As shown. As input, a document consisting of words , the corresponding word vector is obtained through the BERT model .

[0040] In order to improve the classification performance, this section independently constructs a feature word set for each label, and assigns a higher weight to the feature words corresponding to the label when representing the text vector, so that it plays a greater role in the classification of each label.

[0041] (1) Construction of label feature word set First, the corpus corresponding to each label is segmented and POS tagged sentence by sentence. The noun components in the sentence are taken as basic transactions, and single-word nouns are filtered to create a basic transaction set. Then, the association rule Apriori algorithm is used to obtain the set of frequent 1-item sets. and use Find the set of frequent 2-item sets .

[0042] Since the frequent item set mining algorithm of association rules does not consider the position relationship of nouns in the comments, The two nouns may not form a phrase, so we filter them based on the dependency relationship. , only considering noun phrases with NP relation, and obtaining a new set of frequent 2-item sets Then from the candidate feature set The frequent 1-item set contained in the non-domain feature dictionary is filtered out, and on this basis, the field dictionaries such as "civil aviation" and "a certain aviation industry thesaurus" are introduced to supplement the mining of non-frequent domain feature words, so as to obtain more comprehensive and accurate domain features, thereby obtaining .

[0043] Then, redundant features are filtered out by the minimum independent support. The minimum independent support refers to the support of the frequent 1-item set containing the feature word minus the absolute support of the frequent 2-item set containing the word. If the minimum independent support of a feature word is less than the threshold T, the word is filtered out as a redundant feature, and finally a set of frequent 1-item sets that meet the independent support constraint is obtained. .

[0044] Finally, the dictionary is updated through manual feedback, and the frequent features mined are fed back to realize the semi-automatic update of the domain feature dictionary, saving a lot of manpower. After candidate feature mining, pruning filtering and supplementation of infrequent item sets, the domain feature set is finally obtained. .

[0045] (2) Feature word embedding ①Training Word2Vec model: First, choose the model type. There are two main types of Word2Vec models, Skip-gram and CBOW. Skip-gram usually performs better in small datasets, while CBOW is faster in large datasets. Next, set the hyperparameters. Set the hyperparameters of the model, such as vector dimension, window size, number of training iterations, etc. Then train the model. Train the Word2Vec model using the preprocessed text data. The model learns word vectors by predicting the context of a word (Skip-gram) or predicting a word from the context (CBOW).

[0046] ②Get the word vector of the topic feature word: For a feature word set consisting of t words Get the word vector of the label feature word from the trained Word2Vec model

[0047] In this embodiment, a text vector representation method based on label feature attention weighting is proposed.

[0048] First, calculate the TF-IDF value of each feature word to measure the importance of the feature word in the entire corpus: ; in, is the total number of review documents under this tag, It is a characteristic word The number of documents that occurred.

[0049] Secondly, TF-IDF is used to calculate the attention weight of each feature word and express it as the weight vector of the feature word. , its TF-IDF weight is: ; in, It is a characteristic word Frequency in the current document.

[0050] Then, the calculated attention weight is used as the weight coefficient of the feature word embedding matrix and multiplied by the corresponding word vector to construct the label feature word embedding weight matrix : ; Finally, the Bert word embedding matrix and label feature word embedding weight matrix Multiply them together to get the text vector representation weighted by label feature attention : ; In this embodiment, the model combines the semantic features extracted by Bert and the label features extracted based on association rules to represent the text vector. That is, this embodiment uses BERT and the attention mechanism to represent the semantic and label features of the text.

[0051] Based on the contents of the above embodiments, in this embodiment, the multi-channel feature extraction layer includes a local feature extraction part and a global feature extraction part. The local feature extraction part includes a text convolutional neural network composed of at least three convolution kernels of different sizes, which is used to extract local features between word vectors within the convolution kernel range, and local features of different levels obtained by three channels are spliced ​​as text local feature outputs; the global feature extraction part includes a bidirectional long short-term memory multi-channel feature extraction network, which is used to model text sequences in both forward and backward directions, capture bidirectional semantic dependencies, and splice the feature outputs in both forward and backward directions as text global feature outputs.

[0052] Although the text vector obtained from the text representation layer contains contextual relationships and label information, it still has the problems of high noise and high dimensionality. At the same time, the features of complaint text are sparse, and feature extraction and dimensionality reduction need to be performed through the feature extraction network. This embodiment uses the parallel structured Text-CNN and BiLSTM multi-channel feature extraction networks to extract local and global features of the text respectively.

[0053] Based on the local feature extraction of Text-CNN, Text-CNN is a network with strong text feature extraction capabilities. This embodiment uses three Text-CNN networks with convolution kernels of different sizes to extract feature information within the convolution kernel range, and then performs maximum pooling for dimensionality reduction. Its structure is as follows: Figure 4 shown.

[0054] First, the output X of the text representation layer is input into the Text-CNN network, and the convolution kernel sequentially performs convolution operations in the text matrix to extract local features. , as shown in the formula: ; in, is the nonlinear activation function ReLU, is a bias term, is a convolution kernel parameter matrix of size r × k. The height of the convolution kernel of the three channels is The values ​​are set to 3, 5, and 7. After the convolution operation on all samples, a feature map set is obtained, as shown in the formula: ; This embodiment uses maximum pooling to perform feature extraction and dimensionality reduction on the feature map set output by each channel. Maximum pooling extracts the maximum value in each feature map, as shown in the formula: ; This embodiment uses three different sizes of convolution kernels for feature extraction. After the output of each channel is pooled, a size of 1 × The feature vector of the three channels is then concatenated, as shown in the formula: ; in, , , They represent the features output after convolution with kernel heights of 3, 5, and 7 and maximum pooling operations, respectively. Output as the extracted local feature vector.

[0055] BiLSTM is a variant of LSTM, which can model text in both the forward and reverse directions, obtain the dependencies between the context, and complete the global feature extraction of text sequences. Figure 5 shown.

[0056] At time t, the current hidden layer state is recorded as , the state update of each door is shown in the formula: ; in, is the current input unit status, is the forget gate at time t, For storage units, and for The input gate and output gate at the moment, , , is the weight matrix, is the bias, is the activation function, for The output of the hidden layer at time t.

[0057] BiLSTM models text through LSTM in both the forward and reverse directions, and concatenates the outputs of the last moment of the forward and reverse networks as the final output. The definition is shown in the formula: ; in, , Represent the output of the last hidden state of forward and reverse modeling, Output as the extracted global feature vector.

[0058] Based on the contents of the above embodiments, in this embodiment, the feature interaction layer is used to input local features and global features into the multi-head collaborative attention mechanism, extract key information from another feature vector, realize interaction between features, and splice the relationship information between features with the original feature vector to realize feature fusion.

[0059] In this embodiment, the collaborative attention mechanism reflects the relationship between feature vectors by calculating the shared similarity matrix between feature vectors, and then applies the shared similarity matrix to the original feature vector to realize information interaction between features. Based on the collaborative attention mechanism and the multi-head attention mechanism, this embodiment constructs a multi-head collaborative attention mechanism for the interaction between local features and global features of complaint text. In the model of this embodiment, the input of the multi-head collaborative attention mechanism is the local feature matrix output by the multi-channel feature extraction network. and the global feature matrix , is the number of collaborative attentions.

[0060] First pass A linear layer reduces the dimension of the input features to obtain the representation of the same feature vector in multiple different vector spaces, as shown below: ; Through the function Features after dimensionality reduction , , and then input them into multiple collaborative attention mechanisms to learn the relationship between features. The structure of the coordinated attention mechanism is as follows Figure 6 shown.

[0061] The shared similarity matrix between feature vectors is first calculated within the collaborative attention mechanism. , which is calculated as shown in the formula: ;

[0062] The similarity matrix after normalization Contains the similarity information of local features and global features. In particular, the vector inner product is used to calculate the similarity matrix, so the width of the feature vectors must be equal. The similarity matrix is ​​used to do the outer product with the original feature vector matrix to extract the key information of the feature vector output by another channel, realize feature interaction, and the extracted features and The calculation is shown in the formula: ;

[0063] The input and output feature dimensions of the collaborative attention mechanism remain unchanged. The output of the collaborative attention mechanism is and Finally, the outputs of multiple collaborative attention layers are concatenated to obtain the feature output of the relationship between feature vectors and , calculated as follows: ;

[0064] Since the output matrix width after dimensionality reduction is set to , so the input features of the multi-head collaborative attention mechanism and the output feature dimensions after splicing remain the same, such as Figure 7 shown.

[0065] This embodiment draws on the residual connection in ResNet and the operation of adding the original features after the attention mechanism in Transformer to convert the interactive feature vector , The local feature A of the customer complaint text before interaction is concatenated with the overall feature B and then input into the fully connected layer, which can avoid the gradient vanishing and network degradation problems caused by the large number of model layers. Finally, a real feature vector F ∈Rd×10 containing the relationship information between feature vectors is obtained, which is defined as follows:

[0066] Based on the contents of the above embodiments, in this embodiment, the multi-label classification layer is used to train separate binary classifier sets for different labels, and select the best classifier from the binary classifier set to determine the complaint label classification results of the complaint text to be labeled, wherein the binary classifier set is constructed using multiple classification algorithms.

[0067] BR model: Binary Relevance (BR) is the most direct method in multi-label classification. Its main idea is to decompose the multi-label classification task into q single-label supervised classification tasks, that is, to train q separate classifiers to make predictions for q separate labels, and finally merge the predictions of q classifiers into the final label set of the sample. According to this basic idea, for the first Tags , by considering each training sample and label Correlation, establish a corresponding binary training set: ; in, .

[0068] Then we can use some binary learning algorithm To label Training, get a classifier ,Right now Therefore, any multi-label training sample Text in Will participate During the training process of a classifier. , For the classifier can be regarded as a positive sample; on the other hand, for irrelevant samples , It can be regarded as a negative example.

[0069] For unseen samples , the binary association is through A single classifier predicts its associated set of labels , and finally concatenate all predicted independent binary label results to get the final prediction result: ; Using the binary association method for classification, the original problem is transformed into several unrelated single-label classification problems. , if each classifier predicts it as a negative example, an empty set of predicted labels will be generated. To avoid this, the T-criterion rule can be used, that is, when each classifier predicts sample x as a negative example, select the label with the highest prediction probability among all classifiers and add it to the label set.

[0070] The GBDT algorithm is trained in an iterative manner. The next iteration uses negative gradient to measure the performance of the weak learner in the previous round, and corrects the previous errors by fitting the mean square error (MSE) loss function negative gradient. Finally, a fitting function needs to be found. Make it infinitely close to the true value. The basic principle is to first initialize the inaccurate , the residual value is calculated based on the difference between it and the true value y of the sample Therefore, to find a suitable fitting function To fit , the next round of new fitting function can be expressed as , calculate the new residual value . This continuous iterative correction makes the sample prediction value Continuously approaching the true value The GBDT algorithm has convergence and can guarantee local optimality or global optimality.

[0071] Specifically, first initialize the weak classifier: ; in, is the actual value of the sample; is a constant; is the loss function. Determine the constant Make the initial prediction loss minimum, then all The total loss of samples is: ; Where: and The samples are The actual value and its The purpose of iteration is to minimize the loss value and find the direction of the fastest gradient descent. The negative gradient function calculated in each iteration is: ; Then construct a fitting function Fitting negative gradient , is the residual coefficient. The residual parameter is obtained according to the following formula : ; Where: is the gradient; is the coefficient.

[0072] The next step is to calculate the optimal value: ; Where: is the weighting coefficient; For the The fitting function for iterations.

[0073] Finally, the calculation results are merged into the model and the prediction function is updated: ; Where: For the Iterate the negative gradient fitting function. When the number of iterations preset by the algorithm is reached, the iteration is terminated.

[0074] Based on the content of the above embodiment, in this embodiment, the label classification model further includes: The attention adjustment layer is used to adjust the prediction results using corresponding attention weights for different labels to obtain the final multi-complaint label classification results.

[0075] Based on the content of the above embodiment, in this embodiment, the label classification model further includes: The output layer is used to set different thresholds for different labels as needed to control the prediction results of the labels, and finally output the classification results of multiple complaint labels predicted by the model.

[0076] In this embodiment, different thresholds are set for each label to control the prediction results of the label as needed, and finally the category label predicted by the model is output.

[0077] During the experimental stage, on the one hand, it is verified whether the multi-label classification model constructed in this embodiment performs better than the existing algorithm in a certain aviation complaint text; on the other hand, it is verified whether the model integrating multiple features and attention mechanism proposed in this embodiment can achieve efficient text multi-label classification of a certain aviation complaint text.

[0078] This example uses an aviation complaint text dataset in an aviation service quality supervision platform to test the performance of the proposed model. The dataset includes complaint texts from January 1 to 11, 2022, and contains 13 categories with a total of 5,597 samples. The training set, test set, and validation set are divided into a ratio of 7:2:1. The statistical results are shown in Table 1:

[0079] Evaluation indicators: Algorithm performance evaluation uses classic multi-label classification performance indicators: precision, recall, F1 value, and Hamming loss. The performance statistics of multi-label classification prediction are as follows: T is the number of samples that predict positive samples as positive samples, F is the number of samples that predict negative samples as negative samples, and A is the number of samples that predict negative samples as positive samples or positive samples as negative samples: value: ; The value is the harmonic mean of precision and recall, which takes both into account and is more universal.

[0080] Recall: ; Recall is used to evaluate the average proportion of successfully predicted classes across all samples.

[0081] Hamming loss: ; Hamming loss is used to evaluate the proportion of misclassified samples. represents the XOR relationship between two sets. When each sample in the dataset is only associated with a single label in the label set, the Hamming loss degenerates into the traditional misclassification rate. .

[0082] Experimental results and analysis: In order to verify the effectiveness of combining the multi-feature collaborative attention mechanism and the integrated algorithm for classification, this example selects the following multi-label classification method as a comparative experiment: ①BR-GBDT. This is a multi-label classification method based on binary correlation BR and gradient boosting decision tree GBDT ensemble learning. It uses maximum pooling to extract features and organically combines BR and GBDT to achieve automatic and high-accuracy multi-label classification.

[0083] ②Multihead Coattention Classifier. This is a multi-label classification model based on a multi-head coordinated attention mechanism. First, the BERT pre-training model is used to realize text vectorization representation, and then the Text-CNN and BiLSTM multi-channel feature extraction networks are constructed to extract local features and global features of complaint texts respectively. Finally, a coordinated attention mechanism is proposed to learn the relationship between local features and global features to achieve accurate classification of customer complaint texts.

[0084] ③MAG (MultiFeat-Att-GBDT Classifier). In the text vectorization stage, multiple features including label features are considered. In the feature extraction stage, a multi-head collaborative attention mechanism is used to fuse the global and local features of a certain airline service quality complaint text. In multi-label classification, an integration method is used to obtain the best classification effect. This model can not only fully extract text features, but also achieve efficient integration, thereby improving the performance of the classifier.

[0085]

[0086] As shown in the table, the MAG model constructed in this embodiment is significantly better than the traditional BR-GBDT and Multihead Coattention Classifier models in terms of F1 value and recall rate. Compared with the other two models, the F1 value of the MAG model on the data set is increased by 3.08 and 0.60 percentage points respectively. At the same time, the Hamming loss of the MAG model is also significantly lower than the other two methods. This means that MAG can predict labels more accurately in multi-label classification tasks and reduce the risk of misclassification. Based on the above comparative analysis, the MAG model shows significant advantages in the multi-label classification task of a certain aviation service quality complaint text dataset. The comprehensive application of multi-feature fusion, multi-head collaborative attention mechanism and GBDT integration enables it to more accurately capture the relationship between text features and labels. Therefore, the MAG model has great potential in the multi-label classification problem of a certain aviation service quality complaint text, and can be used to improve the classification effect and enhance the feasibility of the application. The results of this study provide strong support for the application of multi-feature collaborative attention mechanism and integrated algorithm in the field of multi-label text classification.

[0087] Ablation experiment analysis: In order to verify the effectiveness of Aprior extraction of label feature words, global feature extraction, and local feature extraction in the model, this embodiment sets up five groups of comparative ablation experiments for observation, namely, the model proposed in this embodiment, the model without label information, the model without global features, the model without local features, and the model without using the multi-head attention mechanism to fuse features. The results are shown in Table 3. It can be seen that compared with the three ablation models, the original model has different degrees of improvement in various indicators, which also proves the effectiveness of considering label information, global features, and local features in the model.

[0088]

[0089] As shown in the table, compared with feature extraction methods that do not use label features, global features, local features, or multi-head attention fusion, the method of this embodiment achieves the best F1 value, recall rate, and Hamming loss indicators on a certain aviation service quality complaint dataset, proving that label features can enrich text information, and the fusion of multi-channel feature extraction networks is significantly better than that of single-channel feature extraction networks. The combination of global features and local features achieves feature complementarity, which can more comprehensively extract complaint text feature information and alleviate the problem of short complaint texts and sparse features. The ablation experiment results emphasize the importance of these elements in the original model, which play a key role in improving multi-label classification performance.

[0090] Analysis of label classification effect: In the data set used in this embodiment, the MAG model is used for multi-label classification to obtain the comparison between the recognition effect of each label and the trend of the number of texts. Figure 8 Shown According to the sample distribution, the number of texts about ticketing services and abnormal flight services accounts for 78% of all texts, indicating that airline passengers are most concerned about these two types of issues. The possible reasons for this are as follows: (1) High-frequency events: Complaints about ticketing services and abnormal flight services are usually closely related to passengers’ daily travel. These two types of problems are the most common and therefore have more chances of causing complaints.

[0091] (2) Direct impact on passenger experience: Ticketing services and flight services have a direct impact on passengers’ overall experience and travel plans. Any issues related to ticketing errors, itinerary changes, flight delays, cancellations, etc. may cause complaints from passengers, as these issues will significantly affect passengers’ travel.

[0092] (3) Measurability: Problems such as ticketing services and irregular flight services are usually easy to measure and record, and are therefore more likely to be recorded in complaint data. In contrast, other types of problems may not be so easy to capture and record.

[0093] (4) Cumulative effect: Ticketing or flight service issues that occur during a trip may lead to multiple complaints because they may affect multiple stages and aspects of the trip. This will lead to an increase in the proportion of complaints in these two categories.

[0094] In summary, the proportion of complaints about ticketing services and irregular flight services is relatively large because these problems are more common, directly affect the passenger experience, are easy to record and measure, and may generate multiple complaints in one trip. These problems are important areas that airlines and related agencies need to pay attention to and solve.

[0095] According to the classification results, the majority class samples appear more frequently in the training data, and the model is more likely to learn the features and patterns of the majority class, which makes the classification effect of the majority class samples usually more accurate. As shown in the table, ticketing service has the highest multi-label classification F1 value and the best classification effect; the classification effect of abnormal flight service is second. In addition, since other labels appear less frequently in the training data, the text features cannot be fully learned, so the recognition effect of minority sample labels is poor.

[0096] Based on this, this embodiment proposes a multi-channel feature extraction model based on semantic features and label features. On the basis of the BR-GBDT multi-classification integrated model, the BERT model is first used to obtain the contextual representation of the text, and the association rules are used to obtain the label features of the text. Then, TextCNN and Bi-LSTM are used to extract local features and global features respectively, and the attention mechanism is used to achieve synergy between features, which are then used in the classification model to improve the category prediction performance.

[0097] Based on the same inventive concept, another embodiment of the present invention further provides a complaint text label classification device, comprising: The acquisition module is used to obtain the complaint text to be tagged and classified; A classification module is used to input the complaint text to be labeled and classified into a label classification model to obtain a complaint label classification result; the label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0098] Since the complaint text label classification device provided in the embodiment of the present invention can be used to execute the complaint text label classification method described in the above embodiment, its working principle and beneficial effects are similar, so they will not be described in detail here. For specific contents, please refer to the introduction of the above embodiment.

[0099] In this embodiment, it should be noted that the various modules in the device of the embodiment of the present invention can be integrated into one or deployed separately. The above modules can be combined into one module or further divided into multiple sub-modules.

[0100] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, see Fig. 9 , the electronic device specifically includes the following contents: a processor 301, a memory 302, a communication interface 303 and a communication bus 304; The processor 301, the memory 302, and the communication interface 303 communicate with each other via the communication bus 304; The processor 301 is used to call the computer program in the memory 302. When the processor executes the computer program, all steps of the above-mentioned complaint text label classification method are implemented. For example, when the processor executes the computer program, the following process is implemented: Step 101: Obtain complaint text to be tagged and classified.

[0101] Step 102: Input the complaint text to be labeled and classified into the label classification model to obtain the complaint label classification result; the label classification model is pre-trained with the labeled label classification text as input and the labeled complaint label classification result as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0102] In addition, the processor may also implement the steps of the resource pushing method described in the above embodiment when executing the computer program, and / or the processor may implement the steps of the test paper assembly method described in the above embodiment when executing the program.

[0103] Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, all steps of the above-mentioned complaint text label classification method are implemented. For example, when the processor executes the computer program, the following process is implemented: Step 101: Obtain complaint text to be tagged and classified.

[0104] Step 102: Input the complaint text to be labeled and classified into the label classification model to obtain the complaint label classification result; the label classification model is pre-trained with the labeled label classification text as input and the labeled complaint label classification result as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0105] It can be understood that the detailed functions and extended functions that can be executed by the computer program can refer to the description of the above embodiments.

[0106] Based on the same inventive concept, another embodiment of the present invention provides a computer program, which implements the following process when executed by a processor: Step 101: Obtain complaint text to be tagged and classified.

[0107] Step 102: Input the complaint text to be labeled and classified into the label classification model to obtain the complaint label classification result; the label classification model is pre-trained with the labeled label classification text as input and the labeled complaint label classification result as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

[0108] It can be understood that the detailed functions and extended functions that can be executed by the computer program can refer to the description of the above embodiments.

[0109] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0110] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. Those of ordinary skill in the art may understand and implement them without creative effort.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the complaint text label classification method described in each embodiment or some part of the embodiment.

[0112] In addition, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0113] In addition, in the present invention, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A complaint text label classification method, characterized in that: include: Obtaining complaint text to be labeled and classified, inputting the complaint text to be labeled and classified into a label classification model to obtain a complaint label classification result; The label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output. The label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

2. The complaint text label classification method according to claim 1 is characterized in that: The text representation layer is specifically used for: Obtain a text vectorization representation of the complaint text to be labeled and classified at the word vector granularity; The vector representation of semantic features and label features is obtained based on the attention weight of label features; Using label features to guide the learning of semantic feature representation.

3. The complaint text label classification method according to claim 1 is characterized in that: The multi-channel feature extraction layer includes a local feature extraction part and a global feature extraction part. The local feature extraction part includes a text convolutional neural network composed of at least three convolution kernels of different sizes, which is used to extract local features between word vectors within the convolution kernel range. The local features of different levels obtained by the three channels are spliced ​​as text local feature outputs; the global feature extraction part includes a bidirectional long short-term memory multi-channel feature extraction network, which is used to model the text sequence in both forward and backward directions and capture bidirectional semantic dependencies. The feature outputs in both forward and backward directions are spliced ​​as text global feature outputs.

4. The complaint text label classification method according to claim 1 is characterized in that: The feature interaction layer is used to input local features and global features into the multi-head collaborative attention mechanism, extract key information from another feature vector, realize interaction between features, and splice the relationship information between features with the original feature vector to realize feature fusion; and / or, The multi-label classification layer is used to train separate binary classifier sets for different labels, and select the best classifier from the binary classifier set to determine the complaint label classification result of the complaint text to be labeled, wherein the binary classifier set is constructed using multiple classification algorithms.

5. The method for classifying complaint text labels according to claim 1, characterized in that: The label classification model also includes: The attention adjustment layer is used to adjust the prediction results using corresponding attention weights for different labels to obtain the final multi-complaint label classification results.

6. The method for classifying complaint text labels according to any one of claims 1 to 5, characterized in that: The label classification model also includes: The output layer is used to set different thresholds for different labels as needed to control the prediction results of the labels, and finally output the classification results of multiple complaint labels predicted by the model.

7. A complaint text label classification device for executing the complaint text label classification method according to any one of claims 1 to 6, characterized in that: include: The acquisition module is used to obtain the complaint text to be tagged and classified; A classification module is used to input the complaint text to be labeled and classified into a label classification model to obtain a complaint label classification result; the label classification model is pre-trained with labeled label classification text as input and labeled complaint label classification results as output, and the label classification model at least includes: a text representation layer, a multi-channel feature extraction layer, a feature interaction layer and a multi-label classification layer; Among them, the text representation layer is used to combine the extracted semantic features and the label features extracted based on association rules to represent the text vector; the multi-channel feature extraction layer is used to extract the local features and global features of the complaint text to be labeled and classified using a multi-channel feature extraction network; the feature interaction layer is used to determine the relationship between the local features and the global features; the multi-label classification layer is used to construct integrated classifiers for different labels respectively, and determine the complaint label classification results of the complaint text to be labeled and classified.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the complaint text label classification method as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the complaint text label classification method as described in any one of claims 1 to 6.

10. A computer program, characterized in that When the computer program is executed by a processor, the complaint text label classification method as described in any one of claims 1 to 6 is implemented.