Text data classification method, device and storage medium

Through the text classification model, the problem of low classification accuracy and recall in the prior art evaluation text data is solved, and more efficient classification of product quality problems is achieved, and maintenance difficulty and logical rule configuration are reduced.

CN113761184BActive Publication Date: 2024-12-31BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011045862.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2024-12-31
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

In the prior art, the evaluation text data quality problems are classified by keyword hitting, with high maintenance costs, low recall rates, low accuracy rates, and cumbersome logical rules, making it difficult to effectively classify product quality problems.

Method used

Using the text classification model, by obtaining the word vector matrix of the evaluation text data, different filter units are used to extract the first feature vector and the second feature vector, and fuse it into a fusion feature vector, which is used to determine the classification results of the evaluation text data. Reduce maintenance difficulty and avoid cumbersome logical rules.

Benefits of technology

It improves the accuracy and recall rate of evaluation text data classification, reduces maintenance difficulty, simplifies the implementation process, and avoids keyword database maintenance and logical rule configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761184B_ABST
    Figure CN113761184B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a classification method, device and storage medium for text data, which obtains evaluation text data of a target item to be classified and inputs a preset classification model; obtains a word vector matrix of a text word sequence corresponding to the evaluation text data through the classification model, processes the word vector matrix with different filter units to obtain a first feature vector and a second feature vector, and fuses them to obtain a fused feature vector, and determines the classification result of the evaluation text data according to the fused feature vector; labels the target item according to the classification result and / or sends the classification result to a target terminal device. The embodiment of the present invention implements the classification of the evaluation text data through the classification model, and in the classification process, by extracting the fused feature vector of the evaluation text data, more feature information of the evaluation text data is considered, thereby improving the accuracy and recall rate of the evaluation text data classification, reducing the maintenance difficulty, and facilitating the implementation without the need to configure cumbersome logical rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a text data classification method, device and storage medium. Background Art

[0002] With the development of e-commerce platforms, online shopping has gradually become a popular element, and the after-sales service of goods has also shifted from offline to online. Consumers can use e-commerce online platforms to return, exchange, and repair goods, and feedback the quality problems of goods to merchants in the form of text, such as evaluation text. Since the return, exchange, and repair operations are also diverse, the quality problems of goods are even more varied. E-commerce platforms classify these quality problems and present them to merchants. For goods with many and serious quality problems, the activity submission will be cancelled and the search rights will be reduced, thereby driving merchants to improve the quality of goods and provide consumers with high-quality goods.

[0003] In the prior art, for the evaluation text data of the target item, the evaluation text data quality problems are usually classified by keyword hitting, mainly judging whether the evaluation text data hits certain keywords, so as to find the problem type corresponding to the keyword, and then classify the product quality problems of the evaluation text data.

[0004] The existing technology evaluates the classification of text data quality issues by keyword hits, which has high maintenance costs, low recall rate, low accuracy, and requires cumbersome logical rules to implement, making it inconvenient to implement. Summary of the invention

[0005] The embodiments of the present invention provide a text data classification method, device and storage medium, which are used to improve the accuracy and recall rate of the classification of evaluation text data, reduce the difficulty of maintenance, and facilitate implementation.

[0006] In a first aspect, an embodiment of the present invention provides a method for classifying text data, comprising:

[0007] Obtaining evaluation text data of the target item to be classified, and inputting the evaluation text data into a preset classification model;

[0008] Obtain a word vector matrix of a text word sequence corresponding to the evaluation text data through the classification model, process the word vector matrix with different filter units to obtain a first feature vector and a second feature vector, fuse the first feature vector and the second feature vector to obtain a fused feature vector, and determine a classification result of the evaluation text data according to the fused feature vector;

[0009] The target object is marked according to the classification result and / or the classification result is sent to a target terminal device.

[0010] In a second aspect, an embodiment of the present invention provides a classification device for evaluating text data, including:

[0011] An acquisition module, used to acquire evaluation text data of a target item to be classified, and input the evaluation text data into a preset classification model;

[0012] A classification module, used to obtain a word vector matrix of a text word sequence corresponding to the evaluation text data through the classification model, process the word vector matrix with different filter units to obtain a first feature vector and a second feature vector, fuse the first feature vector and the second feature vector to obtain a fused feature vector, and determine a classification result of the evaluation text data according to the fused feature vector;

[0013] An output module is used to mark the target object according to the classification result and / or send the classification result to a target terminal device.

[0014] In a third aspect, an embodiment of the present invention provides a computer device, including:

[0015] Memory for storing computer-executable instructions;

[0016] A processor is used to run the computer-executable instructions stored in the memory to implement the method as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0018] The text data classification method, device and storage medium provided by the embodiment of the present invention obtain the evaluation text data of the target item to be classified, and input the evaluation text data into a preset classification model; through the classification model, obtain the word vector matrix of the text word sequence corresponding to the evaluation text data, process the word vector matrix with different filter units to obtain the first feature vector and the second feature vector, and fuse the first feature vector and the second feature vector to obtain a fused feature vector, determine the classification result of the evaluation text data according to the fused feature vector; mark the target item according to the classification result and / or send the classification result to the target terminal device. The embodiment of the present invention realizes the classification of the evaluation text data through the classification model, and in the classification process, by extracting the fused feature vector of the evaluation text data, more feature information of the evaluation text data is considered, thereby improving the accuracy and recall rate of the evaluation text data classification, and compared with the classification of the evaluation text data quality problems by keyword hit, it does not need to maintain the keyword library, reducing the maintenance difficulty, and does not need to configure cumbersome logical rules, which is easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] Figure 1 An application scenario diagram of the text data classification method provided by an embodiment of the present invention;

[0021] Figure 2 A flowchart of a method for classifying text data provided by an embodiment of the present invention;

[0022] Figure 3 A flowchart of a method for classifying text data provided by another embodiment of the present invention;

[0023] Figure 4 An architectural diagram of a classification model provided by an embodiment of the present invention;

[0024] Figure 5 A structural diagram of a text data classification device provided by an embodiment of the present invention;

[0025] Figure 6 A structural diagram of a computer device for executing a text data classification method provided in one embodiment of the present invention.

[0026] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0028] In the prior art, for evaluation text data, the main method is to determine whether the evaluation text data hits certain keywords, so as to find the problem type corresponding to the keywords and classify the product quality problems of the evaluation text data. There are some problems in classifying the quality problems of evaluation text data by keyword hits:

[0029] First, the keyword database has high maintenance costs and low recall rates. E-commerce platforms have a large amount of data flowing in every day, and the scenarios of product quality issues are constantly changing. It takes a lot of human resources to extract keywords describing product quality issues from historical texts. And because keywords cannot be exhaustive, they can only cover some scenarios, resulting in a low recall rate. Secondly, this method has low accuracy. For scenarios involving contextual semantics, simply using keyword matching may lead to incorrect classification of quality problem types, such as classifying product packaging problems as product functional problems, or even misclassifying products with no quality problems as products with quality problems, such as returns, exchanges, and repairs caused by consumers themselves rather than product quality problems. In addition, from a development perspective, it is necessary to write cumbersome logical rules to implement this method, which may eventually lead to rule explosion, which is also not conducive to method iteration.

[0030] In recent years, artificial intelligence technology has made breakthrough progress and has begun to penetrate into various fields, such as intelligent customer service, face payment, etc. Its core is mainly realized through neural network models. Using neural network models to realize text classification, sentiment analysis, image recognition, etc. is a hot topic in current research. Therefore, in response to the above technical problems, this embodiment considers the classification of evaluation text data through a text classification model. It only needs to pre-train the classification model, and there is no need to maintain a keyword library, which can reduce the difficulty of maintenance. There is no need to configure cumbersome logical rules, which is easy to implement.

[0031] Among them, considering that the FastText model is a commonly used text classification model, it can speed up the training and testing speeds while maintaining high accuracy. Its usual process mainly includes three steps: the first step is to embed the words of the input text to obtain word vectors; the second step is to average the word vectors obtained by embedding as feature vectors; the third step is to convert the obtained feature vectors into the probability distribution of the category after passing through the fully connected layer. However, the processing process of the second step is too simple, which will lose some important feature information, thereby reducing the accuracy and recall rate of the model classification.

[0032] In the embodiment of the present invention, when the evaluation text data is classified by the text classification model, the FastText model is considered to classify the evaluation text data of the target item. However, since the second step of FastText only uses a single feature vector, some important information of the evaluation text data will be lost, reducing the accuracy of the classification model. Therefore, the FastText model is improved in the embodiment of the present invention, and a fused feature vector is obtained for the evaluation text data in the second step, wherein the fused feature vector is formed by fusion of at least two or more feature vectors through a specific fusion method. For example, different filtering units are used to extract different feature vectors from the word vector matrix of the text word sequence corresponding to the evaluation text data and fuse them to obtain a fused feature vector, which can extract more feature information of the evaluation text data, and then the classification model can determine the classification result of the evaluation text data based on the fused feature vector corresponding to the evaluation text data, thereby making the obtained classification result more accurate and improving the accuracy and recall of the classification model.

[0033] The specific application scenarios of the embodiments of the present invention are as follows Figure 1As shown, the application scenario may include a consumer's terminal device 101, an e-commerce platform server 102, and a merchant and / or e-commerce platform administrator's terminal device 103. The consumer's terminal device 101 may feed back the evaluation text data of the target item to the server 102 during the return, exchange, or repair process of the target item or in any other case; after obtaining the evaluation text data of the target item to be classified, the server 102 inputs the evaluation text data into a preset classification model; through the classification model, a fusion feature vector corresponding to the evaluation text data is obtained, and a classification result of the evaluation text data is determined according to the fusion feature vector; further, the classification result of the evaluation text data may be output, for example, the target item is marked according to the classification result, so that the merchant or the e-commerce platform can understand the quality of the target item, and / or the classification result of the evaluation text data may be output to the merchant and / or the e-commerce platform administrator's terminal device 103, for example, sent to the merchant's terminal device, so that the merchant can perform corresponding processing, for example, canceling the activity and reporting the search demotion for products with more or more serious quality problems, or it may also be sent to the terminal device of the manager of the e-commerce platform, so that the manager can perform corresponding processing on the merchant or the corresponding product.

[0034] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0035] Figure 2 Flow chart of the text data classification method provided by an embodiment of the present invention. This embodiment provides a text data classification method, the execution subject of which can be a computer device such as a server of an e-commerce platform. The specific steps of the text data classification method are as follows:

[0036] S201, obtaining evaluation text data of a target item to be classified, and inputting the evaluation text data into a preset classification model;

[0037] S202, obtaining a word vector matrix of a text word sequence corresponding to the evaluation text data through the classification model, processing the word vector matrix with different filter units to obtain a first feature vector and a second feature vector, and fusing the first feature vector and the second feature vector to obtain a fused feature vector, and determining a classification result of the evaluation text data according to the fused feature vector;

[0038] S203: Mark the target object according to the classification result and / or send the classification result to a target terminal device.

[0039] In this embodiment, the evaluation text data to be classified can be the evaluation text data generated by the e-commerce platform server when the user returns, exchanges, or repairs the target item on the e-commerce platform, or the evaluation text data of the target item published by the user during the return, exchange, or repair operation or at any other time. Of course, it can also be the evaluation text data obtained through other channels, and then the evaluation text data is input into a preset classification model.

[0040] In this embodiment, the classification model is a text classification model, and the classification result of the evaluation text data can be output by inputting the evaluation text data. In the application process of the classification model, feature vectors are extracted from the evaluation text data. In order to avoid the single feature vector being too simple and losing some important information of the evaluation text data, and reducing the accuracy of the classification model, in this embodiment, the classification model is used to obtain a fused feature vector for the evaluation text data, wherein the fused feature vector is formed by fusion of at least two or more feature vectors through a specific fusion method. Optionally, in this embodiment, the word vector matrix of the text word sequence corresponding to the evaluation text data can be first obtained, and then different filtering units are used to extract different feature vectors from the word vector matrix respectively and fuse them to obtain a fused feature vector, so that more feature information of the evaluation text data can be extracted, and then the classification model can determine the classification result of the evaluation text data based on the fused feature vector corresponding to the evaluation text data, so that the obtained classification result can be made more accurate, and the accuracy and recall rate of the classification model can be improved. Compared with the classification of the quality problems of the evaluation text data by keyword hits, it is not necessary to maintain a keyword library, which reduces the maintenance difficulty, and it is not necessary to configure cumbersome logical rules, which is easy to implement.

[0041] The text data classification method provided in this embodiment obtains the evaluation text data of the target item to be classified, and inputs the evaluation text data into a preset classification model; through the classification model, obtains the word vector matrix of the text word sequence corresponding to the evaluation text data, processes the word vector matrix with different filter units to obtain the first feature vector and the second feature vector, and fuses the first feature vector and the second feature vector to obtain a fused feature vector, determines the classification result of the evaluation text data according to the fused feature vector; marks the target item according to the classification result and / or sends the classification result to the target terminal device. This embodiment realizes the classification of the evaluation text data through the classification model, and in the classification process, by extracting the fused feature vector of the evaluation text data, more feature information of the evaluation text data is considered, thereby improving the accuracy and recall rate of the evaluation text data classification, and compared with the classification of the evaluation text data quality problems by keyword hit, it does not need to maintain the keyword library, reduces the maintenance difficulty, and does not need to configure cumbersome logical rules, which is easy to implement.

[0042] On the basis of any of the above embodiments, when obtaining the word vector matrix of the text word sequence corresponding to the evaluation text data in S202, the words expressed in natural language in the evaluation text data can first be converted into dense vectors that can be understood by the computer device, that is, word vectors. Since the evaluation text data generally includes multiple words, the text word sequence corresponding to the evaluation text data can be obtained first, and then each word in the text word sequence is converted into a word vector, and a word vector matrix is ​​constructed according to the word vector of each word, which serves as a basis for obtaining the fusion feature vector corresponding to the evaluation text data.

[0043] Optionally, in this embodiment, when obtaining the word vector matrix of the text word sequence corresponding to the evaluation text data, the evaluation text data can be first segmented through the word segmentation tool of the classification model to obtain the text word sequence; and then the word vector matrix of the text word sequence is obtained through the embedding layer of the classification model.

[0044] In this embodiment, a word segmentation tool, such as a Jieba word segmentation tool, can be configured in the classification model. The evaluation text data is segmented by the word segmentation tool to obtain a text word sequence, including words obtained by segmenting the evaluation text data. Of course, other word segmentation tools, such as HanLP, LTP word segmentation tools, etc., can also be used in this embodiment, which are not limited here. Before word segmentation, the evaluation text data can be optionally cleaned to delete non-text symbols such as punctuation marks and special symbols in the evaluation text data. Of course, some stop words can also be deleted to reduce the redundancy of words.

[0045] Furthermore, the classification model can also be configured with an embedding layer. Through the embedding layer, the word vector corresponding to each word in the text word sequence can be obtained, and then a word vector matrix can be constructed. For example, the dimension of each word vector is 300, which has rich semantics, and the text word sequence includes S words, so a S*300 word vector matrix can be constructed.

[0046] Optionally, when obtaining the word vector matrix of the text word sequence through the embedding layer of the classification model, the preset word vector corresponding to each word in the text word sequence can be obtained from the preset word vector set according to the index information of the preset word vector set; and the word vector matrix of the text word sequence is obtained according to the preset word vector corresponding to each word in the text word sequence.

[0047] In this embodiment, a preset word vector set can be obtained in advance, wherein the word vector set includes the correspondence between words and preset word vectors, and index information is established, that is, when the word vector of a certain word needs to be obtained, the preset word vector set can be queried through the index information, so that the preset word vector corresponding to the word can be quickly obtained. In this embodiment, the text word sequence corresponding to the evaluation text data is input into the embedding layer, and the embedding layer obtains the preset word vector corresponding to each word in the text word sequence through the index information, and then the word vectors are spliced ​​to obtain the word vector matrix of the text word sequence.

[0048] It should be noted that the preset word vector set in this embodiment can also be learned in advance, or some general word vector sets or word vector dictionaries can be used, or word vector sets obtained through other means can be used.

[0049] Among them, obtaining a preset word vector set through pre-learning may specifically include: obtaining a corpus and performing word segmentation on the corpus text in the corpus; and obtaining a corresponding word vector for each word in the corpus text through a semi-supervised learning model; constructing the preset word vector set according to the word vector corresponding to each word, and obtaining the index information between the word and the corresponding word vector. In this embodiment, considering that the amount of evaluation text data in the return, exchange and repair scenario of the e-commerce platform is limited, the semantics represented by the trained word vector is relatively simple. In this embodiment, an open source pre-trained word vector trained with Baidu Encyclopedia corpus is used, which contains more than 5.42 million words. The dimension of each word vector is 300 and has rich semantics. Of course, this embodiment is not limited to the above-mentioned learning method to obtain the preset word vector, which will not be repeated here.

[0050] In the above embodiment, in one case, since there may be a word in the text word sequence whose corresponding preset word vector cannot be obtained from the preset word vector set, a preset specific word vector can be used as the word vector of the word. In the actual implementation process, the word can be replaced with a specific character in the text word sequence, and the specific character corresponds to the above-mentioned specific word vector. When the word vector matrix of the text word sequence is obtained according to the preset word vector corresponding to each word in the text word sequence, the specific word vector can be added to the position corresponding to the specific character in the word vector matrix. In another case, since the input word vector matrix usually needs to meet a specific length in the subsequent feature vector acquisition process, that is, the number of words in the text word sequence needs to meet the preset number, when the number of words in the text word sequence is less than the preset number, it can be supplemented by the preset empty word vector until the word vector matrix reaches the required length.

[0051] On the basis of any of the above embodiments, after obtaining the word vector matrix of the text word sequence corresponding to the evaluation text data, the feature vector can be extracted. In this embodiment, a filter layer (Filter) can be configured in the classification model, and the feature vector is extracted based on the word vector matrix of the text word sequence through the Filter layer. Optionally, in order to obtain the fused feature vector, at least two feature vectors are obtained through the Filter layer in this embodiment.

[0052] Specifically, the Filter layer may include a first filtering unit and a second filtering unit; further, in S302, the word vector matrix is ​​processed by different filtering units to obtain the first feature vector and the second feature vector, which may specifically include:

[0053] The word vector matrix is ​​respectively subjected to information extraction by the first filtering unit and the second filtering unit of the classification model to obtain the first feature vector and the second feature vector respectively; wherein the first feature vector is a vector obtained by averaging each dimension of the word vector matrix, and the second feature vector is a vector obtained by taking the maximum value of each dimension of the word vector matrix.

[0054] In this embodiment, it is assumed that the size of the word vector matrix E is S*300, that is, it is composed of S words, each of which has a word vector with 300 dimensions. The first filtering unit is the Mean Filter, which is used to take the average value of each dimension of the word vector matrix, that is, to take an average value for each column in E, and finally obtain the first eigenvector F1, whose size is 1*300; and the second filtering unit is the Max Filter, which is used to take the maximum value of each dimension of the word vector matrix, that is, to take the maximum value for each column in E, and finally obtain the second eigenvector F2, whose size is 1*300.

[0055] It should be noted that, in this embodiment, the filter layer may not be limited to the first filter unit and the second filter unit mentioned above, but may be other filter units, and the corresponding eigenvectors may not be limited to the above eigenvectors, which will not be described one by one here.

[0056] On the basis of any of the above embodiments, in S202, the first feature vector and the second feature vector are fused to obtain a fused feature vector. The specific fusion process may include:

[0057] concatenating the first feature vector and the second feature vector, and using the concatenated vector as the fused feature vector; or

[0058] A weighted average process is performed on the corresponding dimensions of the first feature vector and the second feature vector, and the weighted average result is used as the fused feature vector.

[0059] In this embodiment, in the first fusion method, the first feature vector and the second feature vector are directly spliced. For example, in the above example, the size of the first feature vector F1 is 1*300, and the size of the second feature vector F2 is 1*300. The first feature vector F1 and the second feature vector F2 are directly spliced ​​to obtain a fused feature vector F with a size of 1*600.

[0060] In the second fusion method, the corresponding dimensions of the first eigenvector and the second eigenvector can also be weighted averaged. A special method is to perform arithmetic averaging on the corresponding dimensions of the first eigenvector and the second eigenvector, that is, the first eigenvector and the second eigenvector can be passed through MeanFilter again to obtain a fused feature vector. For example, in the above example, the size of the first eigenvector F1 is 1*300, and the size of the second eigenvector F2 is 1*300. The first eigenvector F1 and the second eigenvector F2 can be passed through MeanFilter again to perform arithmetic averaging of the corresponding dimensions to obtain a fused feature vector F with a size of 1*300.

[0061] Based on any of the above embodiments, Figure 3 As shown, determining the classification result of the evaluation text data according to the fused feature vector in S202 may specifically include:

[0062] S301, performing binary classification on the evaluation text data according to the fused feature vector through the first fully connected layer of the classification model to determine whether the category of the evaluation text data is a category with quality problems;

[0063] S302: If it is a category with quality problems, multi-classify the evaluation text data according to the fused feature vector through the second fully connected layer of the classification model to determine the quality problem category to which the evaluation text data belongs.

[0064] In this embodiment, binary classification is first performed through the first fully connected layer to determine whether the category of the evaluation text data is a category with quality problems. If the category of the evaluation text data is not a category with quality problems, the classification method process is terminated without the need for subsequent multi-classification through the second fully connected layer, thereby avoiding occupying computing resources. If the category of the evaluation text data is a category with quality problems, subsequent multi-classification is performed through the second fully connected layer to determine which category of quality problems the evaluation text data specifically belongs to. In the multi-classification process, concentrated and targeted quality problem classification is performed to improve the accuracy of quality problem classification.

[0065] More specifically, in this embodiment, the first fully connected layer is a fully connected layer for quality hits. The above-mentioned fused feature vector F is input to the first fully connected layer for binary classification, and the output result can be converted into a probability distribution of quality hits. By setting a threshold of the probability value as a baseline for whether the item contains quality problems, it is determined whether the category of the evaluation text data is a category with quality problems. The calculation formula of the first fully connected layer is as follows:

[0066]

[0067] in, is the probability of quality problem hit, the output function f adopts sigmoid function, W is the fully connected layer matrix, and b is the fully connected layer bias vector. Among them, sigmoid function is a commonly used function to convert the output value of the fully connected layer into a probability distribution, and its specific form is not repeated here.

[0068] The second fully connected layer in this embodiment is a fully connected layer for quality classification. For the situation that the first fully connected layer determines that there is a quality problem, the fused feature vector F is input to the second fully connected layer for multi-classification. The output result is converted into a probability distribution of quality problem categories. The evaluation text data is classified into this quality problem category according to which quality problem category has the largest probability value, indicating that the item corresponding to the evaluation text data has this quality problem. This embodiment is equivalent to model concatenation. The fused feature vector F is input into the next model (second fully connected layer) only when the previous model (first fully connected layer) judges that the evaluation text data has quality problems. For evaluation text data without quality problems, the next model (second fully connected layer) is not input. Only the evaluation text data with quality problems is subjected to quality classification, which makes the classification more targeted and more concentrated, and improves the accuracy of quality classification. The calculation formula of the second fully connected layer is as follows:

[0069] P=f(W2F T +b2)

[0070] The output function f uses the softmaxt function, W2 is the fully connected layer matrix, the size is k*300, k is the number of categories, b2 is the fully connected layer bias vector, and P is the probability distribution of the quality classification. Softmax is a commonly used function that converts the output value of the fully connected layer into a probability distribution, and its specific form is not repeated here.

[0071] Based on any of the above embodiments, the method may further include a training process of the classification model, and the training process may specifically include:

[0072] Acquire training data, where the training data is labeled evaluation text data;

[0073] Training the classification model according to the training data and obtaining a loss function value;

[0074] Back propagation is performed according to the loss function value, and the preset word vectors in the preset word vector set are adjusted during the back propagation process.

[0075] In this embodiment, some evaluation text data can be first obtained, and whether the evaluation text data is a category with quality problems and the specific quality problem category can be marked by manual annotation or other annotation methods as training data, and model training is performed based on the training data. During the training process, the classification model is optimized by obtaining the loss function value for back propagation, wherein, optionally, the loss function value can be a cross entropy loss function value, and the classification model is optimized by the stochastic gradient descent method to obtain the parameters of the classification model. In addition, in the process of updating the model parameters, the preset word vectors in the preset word vector set can be adjusted. By adjusting the preset word vectors, the classification model can achieve better results than the fixed word vectors. In addition, in this embodiment, the word vector matrix can also be used as a parameter of the classification model for fine-tuning.

[0076] Optionally, the cross entropy loss function formula of the first fully connected layer in this embodiment is as follows:

[0077]

[0078] Among them, loss1 is the cross entropy loss function of the first fully connected layer, y is the label of the sample, and N is the number of samples.

[0079] Optionally, the cross entropy loss function formula of the second fully connected layer is as follows:

[0080]

[0081] Among them, loss2 is the cross entropy loss function of the second fully connected layer, Y i Is the label of whether the sample is the i-th category, P i The probability of predicting the i-th category, N is the number of samples.

[0082] Figure 4The architecture diagram of the classification model provided for one embodiment of the present invention, the evaluation text data of the target item is input into the classification model, and is first segmented by a word segmentation tool to obtain a text word sequence, and then based on the embedding layer, a word vector matrix of the text word sequence is obtained according to a preset word vector set, and the first filtering unit and the second filtering unit of the filtering layer are used to extract information from the word vector matrix to obtain a first feature vector and a second feature vector respectively, and the two features are fused to obtain a fused feature vector, and the fused feature vector passes through the first fully connected layer, and a binary classification is performed according to the fused feature vector to determine whether the category of the evaluation text data is a category with quality problems; if it is a category with quality problems, multiple classifications are performed according to the fused feature vector through the second fully connected layer to determine the quality problem category to which the evaluation text data belongs, and the quality problem category is output.

[0083] Figure 5 The structural diagram of the evaluation text data classification device provided by the embodiment of the present invention. The evaluation text data classification device provided by this embodiment can execute the processing flow provided by the method embodiment, such as Figure 5 As shown, the evaluation text data classification device 500 includes an acquisition module 501 , a classification module 502 and an output module 503 .

[0084] An acquisition module 501 is used to acquire evaluation text data of a target item to be classified, and input the evaluation text data into a preset classification model;

[0085] A classification module 502 is used to obtain a word vector matrix of a text word sequence corresponding to the evaluation text data through the classification model, process the word vector matrix with different filter units to obtain a first feature vector and a second feature vector, fuse the first feature vector and the second feature vector to obtain a fused feature vector, and determine a classification result of the evaluation text data according to the fused feature vector;

[0086] The output module 503 is used to mark the target object according to the classification result and / or send the classification result to a target terminal device.

[0087] On the basis of any of the above embodiments, when the classification module 502 processes the word vector matrix with different filter units to obtain the first feature vector and the second feature vector, it is used to:

[0088] By using a first filtering unit and a second filtering unit of the classification model, respectively, information is extracted from the word vector matrix to obtain the first feature vector and the second feature vector respectively;

[0089] The first eigenvector is a vector obtained by averaging each dimension of the word vector matrix, and the second eigenvector is a vector obtained by taking the maximum value of each dimension of the word vector matrix.

[0090] Based on any of the above embodiments, when the classification module 502 fuses the first feature vector and the second feature vector to obtain a fused feature vector, it is configured to:

[0091] concatenating the first feature vector and the second feature vector, and using the concatenated vector as the fused feature vector; or

[0092] A weighted average process is performed on the corresponding dimensions of the first feature vector and the second feature vector, and the weighted average result is used as the fused feature vector.

[0093] On the basis of any of the above embodiments, when determining the classification result of the evaluation text data according to the fused feature vector, the classification module 502 is used to:

[0094] The first fully connected layer of the classification model is used to perform binary classification on the evaluation text data according to the fused feature vector to determine whether the category of the evaluation text data is a category with quality problems;

[0095] If it is a category with quality problems, the evaluation text data is multi-classified according to the fused feature vector through the second fully connected layer of the classification model to determine the quality problem category to which the evaluation text data belongs.

[0096] On the basis of any of the above embodiments, when the classification module 502 obtains the word vector matrix of the text word sequence corresponding to the evaluation text data through the classification model, it is used to:

[0097] Segmenting the evaluation text data using the segmentation tool of the classification model to obtain a text word sequence;

[0098] The word vector matrix of the text word sequence is obtained through the embedding layer of the classification model.

[0099] Based on any of the above embodiments, when the classification module 502 obtains the word vector matrix of the text word sequence through the embedding layer of the classification model, it is used to:

[0100] According to the index information of the preset word vector set, obtaining the preset word vector corresponding to each word in the text word sequence from the preset word vector set;

[0101] According to the preset word vector corresponding to each word in the text word sequence, a word vector matrix of the text word sequence is obtained.

[0102] On the basis of any of the above embodiments, when the classification module 502 obtains the preset word vector corresponding to each word in the text word sequence from the preset word vector set, it is further used to:

[0103] If any word in the text word sequence cannot obtain a corresponding preset word vector from the preset word vector set, a preset specific word vector is used as the word vector corresponding to the word; and / or

[0104] If the number of words in the text word sequence is less than a preset number, the words are completed with a preset empty word vector.

[0105] Based on any of the above embodiments, the device further includes a preset word vector set acquisition module 501, which is used to:

[0106] Acquire a corpus and perform word segmentation on the corpus text in the corpus;

[0107] And through the semi-supervised learning model, the corresponding word vector is obtained for each word in the corpus text;

[0108] According to the word vector corresponding to each word, the preset word vector set is constructed, and the index information between the word and the corresponding word vector is obtained.

[0109] Based on any of the above embodiments, the device further includes a training module, which is used to:

[0110] Acquire training data, where the training data is labeled evaluation text data;

[0111] Training the classification model according to the training data and obtaining a loss function value;

[0112] Back propagation is performed according to the loss function value, and the preset word vectors in the preset word vector set are adjusted during the back propagation process.

[0113] The evaluation text data classification device provided in the embodiment of the present invention can be specifically used to perform the above Figure 2-3 The specific functions of the provided method embodiment will not be repeated here.

[0114] The classification device for evaluation text data provided by the embodiment of the present invention obtains the evaluation text data of the target item to be classified, and inputs the evaluation text data into a preset classification model; through the classification model, obtains the word vector matrix of the text word sequence corresponding to the evaluation text data, processes the word vector matrix with different filter units to obtain the first feature vector and the second feature vector, and fuses the first feature vector and the second feature vector to obtain a fused feature vector, determines the classification result of the evaluation text data according to the fused feature vector; labels the target item according to the classification result and / or sends the classification result to the target terminal device. This embodiment realizes the classification of evaluation text data through the classification model, and in the classification process, by extracting the fused feature vector of the evaluation text data, more feature information of the evaluation text data is considered, thereby improving the accuracy and recall rate of the classification of the evaluation text data, and compared with the classification of the quality problems of the evaluation text data by keyword hit, it does not need to maintain the keyword library, reduces the maintenance difficulty, and does not need to configure cumbersome logical rules, which is easy to implement.

[0115] Figure 6 The computer device provided by the embodiment of the present invention can execute the processing flow provided by the text data classification method embodiment, such as Figure 6 As shown, the computer device 60 includes a memory 61, a processor 62, and a computer program; wherein the computer program is stored in the memory 61 and is configured so that the processor 62 executes the item recommendation method described in the above embodiment. In addition, the computer device 60 may also have a communication interface 63 for receiving control instructions.

[0116] Figure 6 The computer device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned text data classification method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.

[0117] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the text data classification method described in the above embodiment.

[0118] In addition, an embodiment of the present invention also provides an artificial intelligence chip, which can implement the text data classification method described in the above embodiment.

[0119] In addition, an embodiment of the present invention further provides a board card, which includes: a storage device, an interface device and a control device, and the artificial intelligence chip as described above; wherein the artificial intelligence chip is connected to the storage device, the control device and the interface device respectively; the storage device is used to store data; the interface device is used to realize data transmission between the artificial intelligence chip and an external device; and the control device is used to monitor the status of the artificial intelligence chip.

[0120] In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0123] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some 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), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0124] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have 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 replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A text data classification method, characterized in that: include: Obtaining evaluation text data of the target item to be classified, and inputting the evaluation text data into a preset classification model; Through the classification model, based on the index information of the preset word vector set, the preset word vector corresponding to each word in the text word sequence corresponding to the evaluation text data is obtained from the preset word vector set; according to the preset word vector corresponding to each word in the text word sequence, the word vector matrix of the text word sequence corresponding to the evaluation text data is obtained, the word vector matrix is ​​processed by different filtering units to obtain a first feature vector and a second feature vector, and the first feature vector and the second feature vector are fused to obtain a fused feature vector, and the classification result of the evaluation text data is determined according to the fused feature vector, wherein the first feature vector is a vector obtained by averaging each dimension of the word vector matrix, and the second feature vector is a vector obtained by taking the maximum value of each dimension of the word vector matrix; Marking the target object according to the classification result and / or sending the classification result to a target terminal device; Determining the classification result of the evaluation text data according to the fused feature vector includes: Through the first fully connected layer of the classification model, the evaluation text data is classified into two categories according to the fused feature vector to determine whether the category of the evaluation text data is a category with quality problems; If it is a category with quality problems, the evaluation text data is multi-classified according to the fused feature vector through the second fully connected layer of the classification model to determine the quality problem category to which the evaluation text data belongs.

2. The method according to claim 1, characterized in that The step of processing the word vector matrix with different filter units to obtain the first feature vector and the second feature vector comprises: Information is extracted from the word vector matrix through the first filtering unit and the second filtering unit of the classification model to obtain the first feature vector and the second feature vector respectively.

3. The method according to claim 1, characterized in that The fusing the first feature vector and the second feature vector to obtain a fused feature vector includes: concatenating the first feature vector and the second feature vector, and using the concatenated vector as the fused feature vector; or A weighted average process is performed on the corresponding dimensions of the first feature vector and the second feature vector, and the weighted average result is used as the fused feature vector.

4. The method according to any one of claims 1 to 3, characterized in that: The index information based on the preset word vector set is used to obtain the preset word vector corresponding to each word in the text word sequence corresponding to the evaluation text data from the preset word vector set; According to the preset word vector corresponding to each word in the text word sequence, obtaining the word vector matrix of the text word sequence includes: Segmenting the evaluation text data using the segmentation tool of the classification model to obtain a text word sequence; Through the embedding layer of the classification model, based on the index information of the preset word vector set, the preset word vector corresponding to each word in the text word sequence corresponding to the evaluation text data is obtained from the preset word vector set; according to the preset word vector corresponding to each word in the text word sequence, the word vector matrix of the text word sequence is obtained.

5. The method according to claim 1, characterized in that When obtaining the preset word vector corresponding to each word in the text word sequence from the preset word vector set, it also includes: If any word in the text word sequence cannot obtain a corresponding preset word vector from the preset word vector set, a preset specific word vector is used as the word vector corresponding to the word; and / or If the number of words in the text word sequence is less than a preset number, the words are completed with a preset empty word vector.

6. The method according to claim 1, characterized in that Also includes: Acquire a corpus and perform word segmentation on the corpus text in the corpus; And through the semi-supervised learning model, the corresponding word vector is obtained for each word in the corpus text; According to the word vector corresponding to each word, the preset word vector set is constructed, and the index information between the word and the corresponding word vector is obtained.

7. The method according to claim 1, characterized in that Also included is a training process of the classification model, including: Acquire training data, where the training data is labeled evaluation text data; Training the classification model according to the training data and obtaining a loss function value; Back propagation is performed according to the loss function value, and the preset word vectors in the preset word vector set are adjusted during the back propagation process.

8. A text data classification device, characterized in that: include: An acquisition module, used to acquire evaluation text data of a target item to be classified, and input the evaluation text data into a preset classification model; A classification module, used to obtain, from the preset word vector set, a preset word vector corresponding to each word in the text word sequence corresponding to the evaluation text data based on the index information of the preset word vector set through the classification model; obtain a word vector matrix of the text word sequence corresponding to the evaluation text data according to the preset word vector corresponding to each word in the text word sequence, process the word vector matrix with different filtering units to obtain a first feature vector and a second feature vector, fuse the first feature vector and the second feature vector to obtain a fused feature vector, and determine a classification result of the evaluation text data according to the fused feature vector, wherein the first feature vector is a vector obtained by averaging each dimension of the word vector matrix, and the second feature vector is a vector obtained by taking the maximum value of each dimension of the word vector matrix; An output module, used to mark the target object according to the classification result and / or send the classification result to a target terminal device; When determining the classification result of the evaluation text data according to the fused feature vector, the classification module is used to: perform binary classification on the evaluation text data according to the fused feature vector through the first fully connected layer of the classification model to determine whether the category of the evaluation text data is a category with quality problems; If it is a category with quality problems, the evaluation text data is multi-classified according to the fused feature vector through the second fully connected layer of the classification model to determine the quality problem category to which the evaluation text data belongs.

9. A computer device, characterized in that: include: Memory for storing computer-executable instructions; A processor, configured to execute the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.