Communication equipment fault classification method based on TextCNN

Through TF-IDF feature processing, Word2vec word vector training and SMOTE algorithm to complete the data, combined with the softmax classifier, the problem of category imbalance in communication equipment fault classification is solved, and a more efficient fault text classification is achieved, which is suitable for short and long texts. data.

CN118535732APending Publication Date: 2024-08-23SHANXI ELECTRIC POWER CO POWER COMM CENT
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410684970.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing communication equipment fault short text data classification method based on convolutional neural network cannot effectively solve the problem of imbalance of communication equipment fault text categories, and has a small scope of application.

Method used

Use TF-IDF for feature processing of fault text data, use Word2vec for word vector training, and use the SMOTE algorithm to automatically complete generalization data for categories with fewer text vectors, embed it into the input layer of CNN, and combine it with the softmax classifier to implement faults Automatic classification of text.

Benefits of technology

It improves the accuracy and generalization ability of communication equipment fault classification, alleviates the class imbalance problem, and is suitable for processing not only short text samples, but also long text data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535732A
    Figure CN118535732A
Patent Text Reader

Abstract

The invention provides a TextCNN-based communication equipment fault classification method, and relates to the technical field of Chinese natural language processing, and the method specifically comprises the following steps: 1, achieving the feature processing of fault text data according to TF-IDF, and employing Word2vec to train a text word segmentation vector; step 2, in order to solve the problem of communication equipment fault text category imbalance, adopting an SMOTE algorithm to automatically complement generalization data for categories with less text vectors, and embedding the generalization data into an input layer of a CNN (Convolutional Neural Network); and step 3, fault text automatic classification is realized through a CNN network with a training output layer as a softmax classifier, a TextCNN-based communication equipment fault classification method adopts TF-IDF to evaluate the importance degree of specific words to one file in a document library, word vector training is performed by adopting Word2vec, the training process is faster, the efficiency of processing a large-scale data set is higher, and the efficiency of processing the large-scale data set is higher. The SMOTE linear interpolation method is adopted to manually add samples to the categories with few samples, so that the problem of category imbalance is relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Chinese natural language processing, and in particular to a communication equipment fault classification method based on TextCNN. Background Art

[0002] The communication equipment fault classification method based on TextCNN is a method that uses deep learning technology to automatically identify and classify communication equipment faults. TextCNN is a convolutional neural network designed for text classification tasks. It can effectively capture local features in text and classify them. In practical applications, the performance and generalization ability of the model can be further improved by adjusting the hyperparameters of the TextCNN model and using data enhancement technology.

[0003] After searching, the patent number "CN111767398A" mentioned in the text that "the present invention discloses a method for classifying short text data of secondary equipment failure based on convolutional neural network. The method first collects text information data of secondary equipment failure, determines the data set, and obtains the training sample set; and pre-processes the short text data of secondary equipment failure, maps word data and word vectors one by one to obtain text vector data; then uses the training samples to train the convolutional neural network model to obtain the trained convolutional neural network model; then according to the validation set data, the test input data is input into the trained convolutional neural network model, and the model output value is the classification result of the short text information of the secondary equipment failure to be classified. The method for classifying short text data of secondary equipment failure based on convolutional neural network utilizes the good feature screening and analysis capabilities of the convolutional neural network model to improve the prediction accuracy and enhance the generalization ability of the model", but this method is only for the classification of short text information, and cannot solve the problem of imbalance in the text categories of communication equipment failures, and has a small scope of application.

[0004] Therefore, we provide a communication equipment fault classification method based on TextCNN to solve the above problems. Summary of the invention

[0005] The purpose of the present invention is to provide a communication equipment fault classification method based on TextCNN to solve the problems raised in the above background technology.

[0006] To achieve the above purpose, the present invention provides the following technical solution: a communication equipment fault classification method based on TextCNN, the specific steps are as follows: Step 1: Implement feature processing of fault text data based on TF-IDF and train text segmentation vectors; Step 2: To solve the problem of imbalanced text categories of communication equipment failures, the SMOTE algorithm is used to automatically supplement generalized data for categories with fewer text vectors and embed them into the input layer of the CNN. Step 3: Automatically classify the fault text by training the CNN network whose output layer is a softmax classifier.

[0007] Preferably, the step 1 is specifically: TF quantifies the frequency of occurrence of a specific word in a document. In the documentation Frequency of occurrence It is expressed as: in Representing words In the documentation The number of times it appears in For Documentation The sum of the number of times each word appears in ; IDF indicates the prevalence of a specific word in a document set, and its calculation formula is: In the formula Indicates the total number of documents; To contain the word The total number of documents, in order to avoid the denominator being zero, the denominator is Instead of ; Words In the documentation The calculation formula of TF-IDF in is as follows: .

[0008] Preferably, the step 1 is specifically: Word2vec is used for word vector training.

[0009] Preferably, the SMOTE algorithm in step 2 is as follows: (1) Randomly select a group of samples from the category with fewer samples; (2) For each sample in the selected cluster, determine the sample’s k a neighbor; (3) Calculate the difference between each sample and the selected neighbor; (4) Selection k For any of the nearest neighbors, calculate ,in It is a sample. is the selected neighbor; (5) Calculate the product of the difference between each sample and the selected neighbor and the random number; (6) Finally, add the obtained product to the current sample to get the new sample , the formula is as follows: .

[0010] Preferably, the step three is specifically: Assume that the left and right text representations of each position word in the input communication equipment fault text data are as follows: in and Respectively represent words The left and right text vectors, Represents the word vector of the previous word, represents the weight matrix, Represents a nonlinear function, which is used to maintain the nonlinearity of the model and represent the word vectors at different positions in the text; Combine the left and right texts at the current position after convolution of the text matrix to form a fused new text: Get word After the new expression, the word after the tanh activation function Send it to the maximum pooling layer, which converts text vectors of different lengths into vectors of fixed length , information can be captured through text, where represents the bias vector; Finally, the communication equipment fault text classification result is converted into a probability between 0 and 1 after being processed by the softmax function, and then converted into the corresponding probability problem. The specific expression is as follows: .

[0011] Compared with the prior art, the present invention has the following beneficial effects: The present invention adopts TF-IDF, which can be used to evaluate the importance of a specific word to one of the documents in the document library. Word2vec is used for word vector training, which has a faster training process and higher efficiency in processing large-scale data sets. The SMOTE linear interpolation method is used to artificially increase samples for categories with fewer samples to alleviate the category imbalance problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is a system diagram of the communication equipment fault classification method based on TextCNN of the present invention. DETAILED DESCRIPTION

[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0014] See also Figure 1 As shown, the present invention provides an implementation method: a communication equipment fault classification method based on TextCNN, the specific steps are as follows: Step 1: Implement feature processing of fault text data based on TF-IDF and train text segmentation vectors; Step 2: To solve the problem of imbalanced text categories of communication equipment failures, the SMOTE algorithm is used to automatically supplement generalized data for categories with fewer text vectors and embed them into the input layer of the CNN. Step 3: Automatically classify the fault text by training the CNN network whose output layer is a softmax classifier.

[0015] Furthermore, feature processing is considered to be the main preprocessing process required for document retrieval. TF-IDF (termfrequency-inverse document frequency) is a common weighting technique used in information retrieval and data mining to evaluate the importance of a specific word to one of the documents in the document library; TF (Term Frequency) quantifies the frequency of occurrence of a specific word in a document. In the documentation Frequency of occurrence It is expressed as: in Representing words In the documentation The number of times it appears in For Documentation The sum of the number of times each word appears in ; IDF indicates the prevalence of a specific word in a document set, and its calculation formula is: In the formula Indicates the total number of documents; To contain the word The total number of documents, in order to avoid the denominator being zero, the denominator is Instead of ; Words In the documentation The calculation formula of TF-IDF in is as follows: .

[0016] Furthermore, Word2vec is used for word vector training. Word vectorization is a method of representing text so that words with the same meaning and grammar have the same vector meaning. Word2vec is a shallow neural network model that represents words composed of alphanumeric characters as vectors. Word2vec is very suitable for use in situations with large amounts of data. Compared with other word representation methods, the Word2vec method has many advantages, such as faster training process and higher efficiency in processing large-scale data sets. Based on a large number of experimental analyses, the key factors affecting Word2vec performance are model selection, vector size, sampling rate, and training window.

[0017] Furthermore, the accuracy of the machine learning model is closely related to the data set of the input model. A balanced data set means that all categories of the model input have the same number of samples. That is, if the number of input samples of one category is higher than that of another category, the data set will be unbalanced. Therefore, there are concepts of oversampling and undersampling. Undersampling is the process of deleting samples from categories with a larger number of samples in order to balance the data set, while oversampling is the process of adding synthetic samples to categories with a smaller number of samples. The present invention adopts the SMOTE (Synthetic Minority Oversampling Technique) linear interpolation method to artificially add samples to categories with a smaller number of samples to alleviate the problem of category imbalance. The SMOTE algorithm is as follows: (1) Randomly select a group of samples from the category with fewer samples; (2) For each sample in the selected cluster, determine the sample’s k a neighbor; (3) Calculate the difference between each sample and the selected neighbor; (4) Selection k For any of the nearest neighbors, calculate ,in It is a sample. is the selected neighbor; (5) Calculate the product of the difference between each sample and the selected neighbor and the random number; (6) Finally, add the obtained product to the current sample to get the new sample , the formula is as follows: .

[0018] Furthermore, the text classification technology based on the CNN network can correct the disorder of information in text documents. In the era of "big data", how to quickly and accurately organize information, mine the value of text information and filter useless information is particularly important. The TextCNN used in the present invention uses a convolutional layer, a maximum pooling layer and an output layer; Assume that the left and right text representations of each position word in the input communication equipment fault text data are as follows: in and Respectively represent words The left and right text vectors, Represents the word vector of the previous word, represents the weight matrix, Represents a nonlinear function, which is used to maintain the nonlinearity of the model and represent the word vectors at different positions in the text; Combine the left and right texts at the current position after convolution of the text matrix to form a fused new text: Get word After the new expression, the word after the tanh activation function Send it to the maximum pooling layer, which converts text vectors of different lengths into vectors of fixed length , information can be captured through text, where represents the bias vector; Finally, the communication equipment fault text classification result is converted into a probability between 0 and 1 after being processed by the softmax function, and then converted into the corresponding probability problem. The specific expression is as follows: .

[0019] The method described in the present invention can, to a certain extent, quickly and accurately organize information, mine the value of text information and filter useless information. It is not only applicable to short text samples, but also to long texts. The SMOTE linear interpolation method is used to artificially add samples to categories with fewer samples to alleviate the category imbalance problem.

Claims

1. A communication equipment fault classification method based on TextCNN, characterized in that ,The communication equipment fault classification method comprises the following steps: Step 1: Implement feature processing of fault text data based on TF-IDF and train text segmentation vectors; Step 2: To solve the problem of imbalanced text categories of communication equipment failures, the SMOTE algorithm is used to automatically supplement generalized data for categories with fewer text vectors and embed them into the input layer of the CNN. Step 3: Automatically classify the fault text by training the CNN network whose output layer is a softmax classifier.

2. According to the TextCNN-based communication equipment fault classification method of claim 1, it is characterized in that: The step 1 is specifically as follows: TF quantifies the frequency of occurrence of a specific word in a document. In the documentation Frequency of occurrence It is expressed as: in Representing words In the documentation The number of times it appears in For Documentation The sum of the number of times each word appears in ; IDF indicates the prevalence of a specific word in a document set, and its calculation formula is: In the formula Indicates the total number of documents; To contain the word The total number of documents, in order to avoid the denominator being zero, the denominator is Instead of ; Words In the documentation The calculation formula of TF-IDF in is as follows: 。 3. According to the TextCNN-based communication equipment fault classification method of claim 1, it is characterized in that: The step 1 is specifically as follows: Word2vec is used for word vector training.

4. According to claim 1, a communication equipment fault classification method based on TextCNN is characterized in that: The SMOTE algorithm in step 2 is as follows: (1) Randomly select a group of samples from the category with fewer samples; (2) For each sample in the selected cluster, determine the sample’s k a neighbor; (3) Calculate the difference between each sample and the selected neighbor; (4) Selection k For any of the nearest neighbors, calculate ,in It is a sample. is the selected neighbor; (5) Calculate the product of the difference between each sample and the selected neighbor and the random number; (6) Finally, add the obtained product to the current sample to get the new sample , the formula is as follows: 。 5. According to a TextCNN-based communication equipment fault classification method according to claim 1, it is characterized in that: The step three is specifically as follows: Assume that the left and right text representations of each position word in the input communication equipment fault text data are as follows: in and Respectively express words The left and right text vectors, Represents the word vector of the previous word, represents the weight matrix, Represents a nonlinear function, which is used to maintain the nonlinearity of the model and represent the word vectors at different positions in the text; Combine the left and right texts at the current position after convolution of the text matrix to form a fused new text: Get word After the new expression, the word after the tanh activation function Send it to the maximum pooling layer, which converts text vectors of different lengths into vectors of fixed length , information can be captured through text, where represents the bias vector; Finally, the communication equipment fault text classification result is converted into a probability between 0 and 1 after being processed by the softmax function, and then converted into the corresponding probability problem. The specific expression is as follows: 。

Citation Information

Patent Citations

  • Chinese text category recognition system and method for unbalanced data sampling

    CN111581385A

  • Power system secondary equipment fault short text data classification method

    CN111767397A

  • Secondary equipment fault short text data classification method based on convolutional neural network

    CN111767398A

  • Data classification method and system based on machine learning

    CN115878798A