Text classification method and device, computer device and storage medium
By using machine learning methods to automatically process subjective questions in survey questionnaires, and combining word vectors with scores from non-subjective questions, convolution kernels and pooling operations are used to achieve efficient and accurate classification of subjective questions, thus solving the problem of low efficiency in manual classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI PUDONG DEVELOPMENT BANK
- Filing Date
- 2022-10-20
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, financial institutions mainly rely on manual methods to classify the answers to subjective questions in survey questionnaires, which leads to low efficiency and cannot meet the increasing demand for questionnaires year by year.
Machine learning methods are used to determine the classification labels of subjective question answers by obtaining word vectors of subjective question answers and scores of non-subjective question answers, combined with the weights of classification labels, and using convolution kernels and pooling operations. A classification model is then used for automatic classification.
It improves the efficiency of classifying subjective question answers, enhances the accuracy of classification results, and avoids the time-consuming and labor-intensive problem of manual classification.
Smart Images

Figure CN116049389B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of text classification, and particularly to a text classification method, device, computer device, storage medium, and computer program product. Background Art
[0002] Financial institutions sending research questionnaires to their customers is a main means of perceiving customer experience. By analyzing the answers to subjective questions in the research questionnaires, the pain points of customers in the process of handling business can be better perceived. Before analyzing the answers to subjective questions in the research questionnaires, the answers to subjective questions are usually classified to determine which business process under the business to which the research questionnaire belongs the answers to subjective questions belong, so that the subsequent business departments can conduct targeted analysis on the answers to subjective questions in each business process, and improve the efficiency of the business departments in analyzing the answers to subjective questions.
[0003] In the related art, the answers to subjective questions are usually classified manually, but the manual classification method is time-consuming and laborious, and with the increasing number of research questionnaires year by year, manual classification can no longer meet the current situation. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a text classification method, device, computer device, computer-readable storage medium, and computer program product that can improve the classification efficiency of the answers to subjective questions.
[0005] In a first aspect, this application provides a text classification method. The method includes:
[0006] Obtain the answers to subjective questions and the answers to non-subjective questions in the target questionnaire;
[0007] Obtain the word vectors corresponding to the answers to subjective questions;
[0008] Assign classification labels to each business process under the business to which the target questionnaire belongs to obtain a classification label set, and determine the weights corresponding to each classification label in the classification label set;
[0009] Obtain the answers to non-subjective questions under each classification label in the classification label set, and determine the scores of each classification label based on the answers to non-subjective questions under each classification label;
[0010] Input the word vectors corresponding to the answers to subjective questions and the target weight corresponding to the classification label with the smallest score into the classification model to determine the classification label of the answers to subjective questions.
[0011] In one embodiment, determining the weights corresponding to each classification label in the classification label set includes:
[0012] Obtain the number of classification labels in the classification label set;
[0013] Randomly sort the category labels in the category label set to obtain the sequence number of each category label in the category label set;
[0014] The weight of each category label in the category label set is determined based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
[0015] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; based on the non-subjective question answers under each category label, the score for each category label is determined, including:
[0016] Obtain the score for each non-subjective question answer under each category tag;
[0017] The scores of the answers to each non-subjective question under each category label are integrated to obtain the score for each category label.
[0018] In one embodiment, the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels for the subjective question answers, including:
[0019] The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes.
[0020] The first convolution results are concatenated to obtain the first target matrix, and the first target matrix is multiplied by the target weights to obtain the second target matrix;
[0021] The second target matrix is convolved with multiple convolution kernels to obtain multiple second convolution results. Max pooling is then performed on each of the multiple second convolution results to obtain the maximum value in each second convolution result.
[0022] The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified.
[0023] Input the vector to be classified into the classification function to obtain the probability that the answer to the subjective question belongs to each category label, and take the category label with the highest probability as the category label of the answer to the subjective question.
[0024] In one embodiment, the plurality of convolution kernels includes two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0025] In one embodiment, the training process of the classification model includes:
[0026] Obtain word vector samples corresponding to subjective question answer samples in the questionnaire sample, and the first weight corresponding to the category label with the smallest score in the questionnaire sample;
[0027] Input the word vector samples and the first weight into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples;
[0028] The model loss value is determined based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0029] Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the model until the obtained model loss value meets the preset conditions.
[0030] Secondly, this application also provides a text classification device. The device includes:
[0031] The answer retrieval module is used to retrieve the answers to both subjective and non-subjective questions in the target questionnaire.
[0032] The word vector acquisition module is used to obtain the word vectors corresponding to the answers to subjective questions;
[0033] The weight determination module is used to assign classification labels to each business link under the business to which the target questionnaire belongs, obtain a set of classification labels, and determine the weight corresponding to each classification label in the set of classification labels;
[0034] The score acquisition module is used to obtain the answers to non-subjective questions under each category tag in the category tag set, and determine the score for each category tag based on the answers to the non-subjective questions under each category tag;
[0035] The classification label determination module is used to input the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores into the classification model to determine the classification labels of the subjective question answers.
[0036] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0037] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0038] Obtain the word vectors corresponding to the answers to subjective questions;
[0039] Assign category labels to each business process under the target questionnaire to obtain a set of category labels, and determine the weight of each category label in the set of category labels;
[0040] Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label;
[0041] The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
[0042] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0043] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0044] Obtain the word vectors corresponding to the answers to subjective questions;
[0045] Assign category labels to each business process under the target questionnaire to obtain a set of category labels, and determine the weight of each category label in the set of category labels;
[0046] Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label;
[0047] The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
[0048] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0049] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0050] Obtain the word vectors corresponding to the answers to subjective questions;
[0051] Assign category labels to each business process under the target questionnaire to obtain a set of category labels, and determine the weight of each category label in the set of category labels;
[0052] Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label;
[0053] The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
[0054] The aforementioned text classification method, apparatus, computer equipment, storage medium, and computer program product acquire subjective and non-subjective answers from a target questionnaire; acquire word vectors corresponding to the subjective answers; assign classification labels to each business link under the target questionnaire's business, obtaining a set of classification labels and determining the weights corresponding to each classification label in the set; acquire the non-subjective answers under each classification label in the set of classification labels, and determine the score of each classification label based on the non-subjective answers under each classification label; input the word vectors corresponding to the subjective answers and the target weight corresponding to the classification label with the smallest score into the classification model to determine the classification label of the subjective answers. On the one hand, by using machine learning to determine the classification labels of subjective answers, the classification efficiency of subjective answers is improved, avoiding the time-consuming and labor-intensive problems of manual classification. On the other hand, by combining the subjective and non-subjective answers from the target questionnaire as constraints on the classification model, the scores of each classification label determined based on the non-subjective answers under each classification label can influence and constrain the classification results of subjective answers, resulting in higher accuracy compared to determining the classification labels of subjective answers solely based on subjective answers. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating a text classification method in one embodiment;
[0056] Figure 2 This is a flowchart illustrating a text classification method in another embodiment;
[0057] Figure 3 This is a network structure diagram of the classification model in a text classification method in one embodiment;
[0058] Figure 4 This is a flowchart illustrating the text classification method in yet another embodiment;
[0059] Figure 5 This is a structural block diagram of a text classification device in one embodiment;
[0060] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0062] It can be understood that the terms "first", "second", etc. used in this application can be used in this article to describe various professional terms. However, unless otherwise specified, these professional terms are not restricted by these terms. These terms are only used to distinguish one professional term from another. For example, without departing from the scope of this application, the first convolution result and the second convolution result can be the same or different.
[0063] Financial institutions sending research questionnaires to their customers is the main means of perceiving customer experience. By analyzing the answers to subjective questions in the research questionnaires, the pain points of customers in the process of handling business can be better perceived. Before analyzing the answers to subjective questions in the research questionnaires, the answers to subjective questions are usually classified to determine which business process the answers to subjective questions belong to under the business to which the research questionnaire belongs, so that the subsequent business departments can conduct targeted analysis on the answers to subjective questions in each business process, improving the efficiency of the business departments in analyzing the answers to subjective questions.
[0064] In the related art, the answers to subjective questions are usually classified manually. However, manual classification is time-consuming and laborious, and with the increasing number of research questionnaires year by year, manual classification can no longer meet the current situation.
[0065] In view of the problems existing in the above related art, an embodiment of the present invention provides a text classification method. This method can be applied to a server, can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the server can be implemented by an independent server or a server cluster composed of multiple servers. The terminal can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. It should be noted that the quantity referred to by "multiple" and the like mentioned in each embodiment of this application all refer to the quantity of "at least two". For example, "multiple" means "at least two".
[0066] In one embodiment, as Figure 1 shown, a text classification method is provided. This embodiment takes the application of this method to a server as an example for illustration. This method includes the following steps:
[0067] 102. Obtain the answers to subjective questions and the answers to non-subjective questions in the target questionnaire.
[0068] Among them, the target questionnaire refers to a questionnaire, and the target questionnaire can be a research questionnaire sent by a financial institution to its customers. In addition, the subjective questions in the target questionnaire can be fill-in-the-blank questions, and the non-subjective questions in the target questionnaire can include multiple-choice questions and scoring questions. This application does not make any limitations in this regard.
[0069] 104. Obtain the word vectors corresponding to the subjective question answers.
[0070] Step 104 may include: preprocessing the subjective question answers to obtain the word segmentation corresponding to the subjective question answers; and obtaining the word vectors corresponding to the subjective question answers according to the word segmentation corresponding to the subjective question answers. The preprocessing may include word segmentation, stop word removal, and词性标注.
[0071] Specifically, the subjective question answers can be subjected to word segmentation, stop word removal, and词性标注processing to obtain the word segmentation corresponding to the subjective question answers; and the word segmentation corresponding to the subjective question answers is converted into vector features to obtain the word vectors corresponding to the subjective question answers. Among them, the jieba word segmentation tool can be used to perform word segmentation, stop word removal, and词性标注processing on the subjective question answers, and a pre-trained language representation model can be used to convert the word segmentation corresponding to the subjective question answers into vector features. For the sake of easy understanding, words such as "的", "了", "不但", and "万一" are stop words.
[0072] For example, the subjective question answer is: The handling fee for the salary payment service product is too high. Preprocessing this subjective question answer, the word segmentation corresponding to the subjective question answer can be: salary payment / salary / business / product / handling fee / too high. It should be noted that "salary payment" is a word segmentation, "salary" is a word segmentation, and the same applies to the words "business / product / handling fee / too high", which will not be elaborated here.
[0073] For the sake of easy understanding, for example, if the word segmentation corresponding to the subjective question answer is (w1, w2,..., wn), the word vector corresponding to the subjective question answer can be v1 + v2 + … vn. It should be noted that "+" represents the concatenation operator, v1 represents the word vector corresponding to wi, n represents the word vector corresponding to wn, and n represents the number of words.
[0074] 106. Assign classification labels to each business process under the business to which the target questionnaire belongs, obtain a classification label set, and determine the weights corresponding to each classification label in the classification label set.
[0075] Among them, the target questionnaire is usually designed for a business. For example, the target questionnaire is designed for the salary payment business. The salary payment business includes five business processes: material preparation, agreement signing, salary card activation, file upload, and information query. Correspondingly, the classification labels assigned to the five business processes of material preparation, agreement signing, salary card activation, file upload, and information query can be material preparation, agreement signing, salary card activation, file upload, and information query respectively, and the obtained classification label set includes 5 classification labels: material preparation, agreement signing, salary card activation, file upload, and information query.
[0076] The weights corresponding to each category tag can be different. For example, if the category tag set includes five categories: material preparation, agreement signing, salary card activation, document upload, and information query, the weights for material preparation, agreement signing, salary card activation, document upload, and information query can be 20, 40, 60, 80, and 100, respectively.
[0077] Understandably, the reason for setting different weights for each category label in the category label set is to distinguish each category label in the category label set through weights, making it easier for the classification model to identify each category label in the category label set, thereby improving the classification accuracy of the classification model.
[0078] 108. Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label.
[0079] The category labels for the non-subjective questions are known. This is because the non-subjective questions in the target questionnaire can be designed based on the category labels, and the total score for non-subjective questions designed for each category label can be the same.
[0080] To facilitate understanding, let's take a target questionnaire designed for payroll processing as an example to explain the non-subjective questions. For instance, the target questionnaire might contain 10 non-subjective questions: 2 based on document preparation, 2 on agreement signing, 2 on payroll card activation, 2 on file upload, and 2 on information retrieval. If the total score for the 2 non-subjective questions based on document preparation is 10, then the total score for the 2 non-subjective questions based on agreement signing is also 10. The same applies to the scores for the non-subjective questions based on payroll card activation, file upload, and information retrieval; these details will not be elaborated upon here.
[0081] For ease of understanding, non-subjective questions can be rated. For example, a non-subjective question based on material preparation could be: Are you satisfied with your experience with the [Material Preparation] aspect of the payroll service? The non-subjective answer would be: 3 points. It should be noted that the lower the score, the less satisfied the customer is with the service aspect corresponding to that category tag. Based on the above example, it can be understood that since non-subjective questions are designed for category tags, the category tag of the non-subjective question answer is also the category tag contained in the corresponding non-subjective question.
[0082] 110. Input the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores into the classification model to determine the classification labels of the subjective question answers.
[0083] For ease of understanding, the subjective question in the target questionnaire could be: "What are your specific suggestions for improving the [Payroll Disbursement] service?" A corresponding subjective answer could be: "I feel the payroll information query speed is too slow, and the page is difficult to use. I hope this can be corrected promptly." It's important to understand that the subjective questions are not designed based on category tags; the category tags for the subjective question answers are unknown.
[0084] Since the scores of category labels represent the degree of customer dissatisfaction with the corresponding business process, the lower the score, the stronger the customer's opinion on that business process. Based on this, subjective question answers tend to reflect the most unsatisfactory business process. This application uses the target weight corresponding to the category label with the lowest score as an influencing factor. The purpose is to input the target weight corresponding to the category label with the lowest score into the classification model as the weight of the supervised layer. Because combining subjective and non-subjective question answers in the target questionnaire serves as a constraint on the classification model, the scores of each category label determined based on the non-subjective question answers under each category label can influence and constrain the classification results of the subjective question answers. Compared to determining the category label of subjective question answers solely based on the subjective question answers, the classification results are more accurate.
[0085] To facilitate understanding, the target weight corresponding to the category label with the lowest score is explained. For example, the category label set includes five categories: material preparation, agreement signing, salary card activation, document upload, and information query. The weights for material preparation, agreement signing, salary card activation, document upload, and information query can be 20, 40, 60, 80, and 100, respectively, and the scores for material preparation, agreement signing, salary card activation, document upload, and information query are 60, 46, 89, 99, and 100, respectively. Therefore, the category label with the lowest score is agreement signing, and correspondingly, its target weight is 40.
[0086] In the aforementioned text classification method, the following steps are taken: First, subjective and non-subjective answers from the target questionnaire are obtained. Then, word vectors corresponding to the subjective answers are acquired. Next, classification labels are assigned to each business segment under the target questionnaire's business scope, resulting in a set of classification labels. Finally, the weights corresponding to each classification label are determined. Then, non-subjective answers under each classification label are obtained, and the scores for each classification label are determined based on these non-subjective answers. Finally, the word vectors corresponding to the subjective answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels for the subjective answers. On one hand, using machine learning to determine the classification labels for subjective answers improves the efficiency of subjective answer classification, avoiding the time-consuming and labor-intensive problems associated with manual classification. On the other hand, combining subjective and non-subjective answers from the target questionnaire as constraints on the classification model means that the scores of each classification label determined based on the non-subjective answers under each classification label can influence and constrain the classification results of the subjective answers. Compared to determining the classification labels for subjective answers solely based on the subjective answers, the resulting classification results are more accurate.
[0087] In one embodiment, determining the weight corresponding to each category label in the category label set includes:
[0088] Get the number of category tags in the category tag set.
[0089] For example, the category tag set includes five categories: material preparation, agreement signing, salary card activation, document upload, and information query. Accordingly, the number mentioned here is 5.
[0090] Randomly sort the category labels in the category label set to obtain the corresponding serial number of each category label in the category label set.
[0091] Based on the above examples, the sequence numbers for material preparation, agreement signing, salary card activation, document uploading, and information inquiry can be 1, 2, 3, 4, and 5, respectively.
[0092] The weight of each category label in the category label set is determined based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
[0093] Specifically, for any category label, the ratio between the sequence number and the quantity corresponding to that category label is obtained; the product of the ratio and a preset threshold is obtained, and the product is used as the weight of any category label.
[0094] The preset threshold can be 100. For example, the sequence numbers of material preparation, agreement signing, salary card activation, file upload, and information query can be 1, 2, 3, 4, and 5, respectively. Correspondingly, the weights of material preparation, agreement signing, salary card activation, file upload, and information query can be (1 / 5)*100, (2 / 5)*100, (3 / 5)*100, (4 / 5)*100, and (5 / 5)*100, respectively.
[0095] It should be noted that since the weights of each category label in the category label set are different, the category labels in the category label set are distinguished by the weights, making it easier for the classification model to identify each category label in the category label set, thereby improving the classification accuracy of the classification model.
[0096] In this embodiment, the number of category labels in the category label set is obtained; the category labels in the category label set are randomly sorted to obtain the corresponding sequence number of each category label in the category label set; based on the number of category labels in the category label set, a preset threshold, and the corresponding sequence number of each category label in the category label set, the weight of each category label in the category label set is determined. Since the weights of each category label in the category label set are different, the category labels in the category label set are distinguished by the weights, making it easier for the classification model to identify each category label in the category label set, thereby improving the classification accuracy of the classification model.
[0097] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; based on the non-subjective question answers under each category label, the score for each category label is determined, including:
[0098] Obtain the score for each non-subjective question answer under each category tag.
[0099] It should be noted that when designing the target questionnaire, each option in the non-subjective questions was assigned a corresponding score, for example, from 0 to 5 points for dissatisfaction to satisfaction. It's understood that non-subjective questions can be multiple-choice, where each option has a corresponding score. For example, a non-subjective question might be: "What are your reasons for dissatisfaction with payroll processing [material preparation]?" The non-subjective answer choices might be: Option 1: Poor service attitude; Option 2: Unprofessional account manager; Option 3: Time-consuming; Option 4: Overly complex materials; Option 5: Repetitive materials. In designing the target questionnaire, the scores assigned to Options 1, 2, 3, 4, and 5 could be 1, 2, 3, 4, and 5 respectively.
[0100] The scores of the answers to each non-subjective question under each category label are integrated to obtain the score for each category label.
[0101] In one embodiment, such as Figure 2 As shown, step 110 may include:
[0102] 202. Perform convolution operations on the word vectors corresponding to the answers to the subjective questions with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes.
[0103] It is understandable that using at least two sizes of convolutional kernels is to obtain the relationship between words in different ranges, that is, to extract the feature information brought by words in different ranges in a sentence, and obtain the vertical difference information, which is similar to n-gram.
[0104] The multiple convolutional kernels may include two 5×5 kernels, two 4×5 kernels, and two 3×5 kernels. Specifically, in practical applications, the number and size of the convolutional kernels can be repeatedly adjusted based on the training results during each experiment, and this embodiment does not limit this.
[0105] 204. Concatenate multiple first convolution results to obtain the first target matrix, and multiply the first target matrix with the target weights to obtain the second target matrix.
[0106] 206. Perform convolution operations on the second target matrix with multiple convolution kernels to obtain multiple second convolution results, and perform max pooling calculation on each of the multiple second convolution results to obtain the maximum value in each second convolution result.
[0107] The second target matrix is convolved with multiple convolution kernels, enabling the classification model to recognize the features of the data after the target weights have been added.
[0108] 208. The maximum values in each second convolution result are concatenated to obtain the vector to be classified.
[0109] 210. Input the vector to be classified into the classification function to obtain the probability that the subjective question answer belongs to each category label, and take the category label with the highest probability as the category label of the subjective question answer.
[0110] Specifically, the vector to be classified can be input into a normalized exponential function to obtain the probability that the subjective question answer belongs to each category label, and the category label with the highest probability is taken as the category label of the subjective question answer. It should be noted that other classification functions can also be used to classify the vector to be classified, and this application embodiment does not limit this.
[0111] In one embodiment, the plurality of convolutional kernels includes two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0112] For ease of understanding, the network structure diagram of the classification model can be shown as follows: Figure 3 As shown. Figure 3 Taking the classification model's handling of the subjective question answer—"Payroll service fees are too high"—as an example, this paper explains the network structure diagram of the classification model. Figure 3 As shown, the number of convolutional kernels is 6. The convolutional kernels include two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels. The word vectors corresponding to the subjective question answers are convolved with the convolutional kernels with a stride of 1.
[0113] It is understandable that by setting multiple convolutional kernels, including two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels, the information extracted becomes more complex and abstract as the layers deepen due to the stacked convolutional layers. By deepening the layers, information can be transmitted in layers.
[0114] In this embodiment, due to the stacking of multiple convolutional layers, the extracted information becomes more complex and abstract as the layers deepen. By deepening the layers, information can be transmitted in layers, thereby improving the accuracy of the classification model.
[0115] In one embodiment, such as Figure 4 As shown, the training process of the classification model includes:
[0116] 402. Obtain the word vector samples corresponding to the subjective question answer samples in the questionnaire sample, and the first weight corresponding to the category label with the smallest score in the questionnaire sample.
[0117] It is understandable that a questionnaire sample can be one of the questionnaire samples in the training samples of the classification model, and the processing procedure for each questionnaire sample in the training samples is the same as the processing procedure for a single questionnaire sample. Specifically, the process of obtaining the word vector samples corresponding to the subjective question answer samples in the questionnaire samples can refer to the process of obtaining the word vectors corresponding to the subjective question answers mentioned above, and the process of obtaining the first weight can refer to the process of obtaining the target weight, which will not be repeated here.
[0118] Specifically, the process of obtaining the first weight corresponding to the category label with the smallest score in the questionnaire sample may include: assigning category labels to each business link under the business to which the questionnaire sample belongs, obtaining a first category label set, and obtaining the number of category labels in the first category label set; randomly sorting the category labels in the first category label set, obtaining the corresponding serial number of each category label in the first category label set; determining the weight corresponding to each category label in the first category label set based on the number of category labels in the first category label set, a preset threshold, and the corresponding serial number of each category label in the first category label set; obtaining the score of each non-subjective question answer under each category label in the first category label set; integrating the scores of each non-subjective question answer under each category label in the first category label set, obtaining the score of each category label in the first category label set, thereby determining the first weight corresponding to the category label with the smallest score in the questionnaire sample.
[0119] For the explanation of the terms and steps involved in obtaining the first weight corresponding to the category label with the lowest score in the questionnaire sample, please refer to the explanation of terms and steps in the process of obtaining the target weight above.
[0120] It should be noted that since the weights of each category label in the first category label set are different, the weights are used to distinguish the category labels in the first category label set, making it easier for the training model to identify each category label in the first category label set, thereby improving the classification accuracy of the classification model.
[0121] 404. Input the word vector samples and the first weight into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples.
[0122] Specifically, word vector samples can be convolved with multiple convolution kernels to obtain multiple third convolution results, with the kernels corresponding to at least two sizes. These third convolution results are then concatenated to obtain a third target matrix, which is multiplied by the first weight to obtain a fourth target matrix. The fourth target matrix is then convolved with multiple convolution kernels to obtain multiple fourth convolution results, and max pooling is performed on each fourth convolution result to obtain the maximum value in each result. The maximum values from each fourth convolution result are then concatenated to obtain the vector sample to be classified. This vector sample is then input into a classification function to obtain the probability that the subjective question answer sample belongs to each category label in the first category label set. The category label with the highest probability is then used as the category label for the subjective question answer sample.
[0123] For an explanation of the terms and steps involved in step 404, please refer to the explanation of the terms and steps involved in the process of determining the classification labels of subjective question answers mentioned above.
[0124] It should be noted that by multiplying the third objective matrix with the first weight, the features between different questionnaire samples can be amplified, making it easier for the subsequent classification model to identify each classification label in the classification label set, thereby improving the classification accuracy of the classification model.
[0125] 406. Determine the model loss value based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0126] 408. Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the training model until the obtained model loss value meets the preset conditions.
[0127] Here, the model loss value can refer to the loss function.
[0128] In this embodiment, by inputting the first weight into the training model, the features between different questionnaire samples can be amplified based on the first weight, making it easier for the subsequent classification model to identify each category label in the category label set, thereby improving the classification accuracy of the classification model. Specifically, multiplying the third objective matrix with the first weight amplifies the features between different questionnaire samples, making it easier for the subsequent classification model to identify each category label in the category label set, thereby improving the classification accuracy of the classification model.
[0129] An embodiment of a text classification method is provided. This embodiment includes:
[0130] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0131] Obtain the word vectors corresponding to the answers to the subjective questions; assign category tags to each business link under the business to which the target questionnaire belongs, thereby obtaining a category tag set, and obtain the number of category tags in the category tag set; randomly sort the category tags in the category tag set to obtain the sequence number corresponding to each category tag in the category tag set; determine the weight corresponding to each category tag in the category tag set based on the number of category tags in the category tag set, a preset threshold, and the sequence number corresponding to each category tag in the category tag set;
[0132] Obtain the answers to non-subjective questions under each category tag in the category tag set, and obtain the score of each non-subjective question answer under each category tag; integrate the scores of each non-subjective question answer under each category tag to obtain the score of each category tag;
[0133] The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results, wherein the multiple convolution kernels correspond to at least two sizes;
[0134] The multiple first convolution results are concatenated to obtain a first target matrix, and the first target matrix is multiplied by the target weights to obtain a second target matrix;
[0135] The second target matrix is convolved with the plurality of convolution kernels to obtain a plurality of second convolution results, and max pooling is performed on each of the plurality of second convolution results to obtain the maximum value in each second convolution result;
[0136] The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified.
[0137] The vector to be classified is input into a classification function to obtain the probability that the answer to the subjective question belongs to each category label. The category label with the highest probability is taken as the category label of the answer to the subjective question.
[0138] The explanations of the terms and steps involved in this embodiment can be found in the above embodiments, and will not be repeated here.
[0139] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0140] Based on the same inventive concept, this application also provides a text classification apparatus for implementing the text classification method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more text classification apparatus embodiments provided below can be found in the limitations of the text classification method described above, and will not be repeated here.
[0141] In one embodiment, such as Figure 5As shown, a text classification device is provided, including: an answer acquisition module 502, a word vector acquisition module 504, a weight determination module 506, a score acquisition module 508, and a classification label determination module 510, wherein:
[0142] Answer retrieval module 502 is used to retrieve the answers to subjective and non-subjective questions in the target questionnaire;
[0143] The word vector acquisition module 504 is used to acquire the word vectors corresponding to the answers to subjective questions.
[0144] The weight determination module 506 is used to assign classification labels to each business link under the business to which the target questionnaire belongs, obtain a set of classification labels, and determine the weight corresponding to each classification label in the set of classification labels;
[0145] The score acquisition module 508 is used to acquire the answers to non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label.
[0146] The classification label determination module 510 is used to input the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores into the classification model to determine the classification labels of the subjective question answers.
[0147] In one embodiment, the weight determination module 506 includes:
[0148] The quantity acquisition unit is used to obtain the quantity of category labels in the category label set;
[0149] The serial number determination unit is used to randomly sort the category labels in the category label set to obtain the serial number corresponding to each category label in the category label set;
[0150] The weight determination unit is used to determine the weight of each category label in the category label set based on the number of category labels in the category label set, a preset threshold, and the corresponding serial number of each category label in the category label set.
[0151] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; the score acquisition module 508 includes:
[0152] The score acquisition unit is used to acquire the score of each non-subjective question answer under each category label;
[0153] The integration unit is used to integrate the scores of each non-subjective question answer under each category label to obtain the score for each category label.
[0154] In one embodiment, the classification label determination module 510 includes:
[0155] The first convolution operation unit is used to perform convolution operations on the word vectors corresponding to the answers of subjective questions with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes.
[0156] The multiplication unit is used to concatenate multiple first convolution results to obtain a first target matrix, and then multiply the first target matrix with the target weights to obtain a second target matrix;
[0157] The second convolution operation unit is used to perform convolution operations on the second target matrix with multiple convolution kernels to obtain multiple second convolution results, and to perform max pooling calculation on each of the multiple second convolution results to obtain the maximum value in each second convolution result;
[0158] The concatenation unit is used to concatenate the maximum values in the results of each second convolution to obtain the vector to be classified.
[0159] The classification label determination unit is used to input the vector to be classified into the classification function to obtain the probability that the subjective question answer belongs to each classification label, and to take the classification label with the highest probability as the classification label of the subjective question answer.
[0160] In one embodiment, the plurality of convolutional kernels includes two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0161] In one embodiment, the device further includes:
[0162] The word vector sample acquisition module is used to acquire word vector samples corresponding to subjective question answer samples in the questionnaire sample, as well as the first weight corresponding to the classification label with the smallest score in the questionnaire sample;
[0163] The prediction classification label determination module is used to input word vector samples and the first weight into the training model to obtain the predicted classification label corresponding to the subjective question answer sample;
[0164] The model loss value determination module is used to determine the model loss value based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0165] The judgment module is used to determine whether the model loss value meets the preset conditions. If it does, the current training model is used as the classification model. If it does not meet the conditions, the training model continues to be trained until the obtained model loss value meets the preset conditions.
[0166] Each module in the aforementioned text classification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0167] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data such as the target questionnaire, word vectors, weights corresponding to each category label in the category label set, scores for each category label, and category labels for subjective question answers. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a text classification method.
[0168] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0170] Obtain the subjective and non-subjective answers from the target questionnaire; obtain the word vectors corresponding to the subjective answers; assign category labels to each business process under the target questionnaire, obtain a category label set, and determine the weight of each category label in the category label set; obtain the non-subjective answers under each category label in the category label set, and determine the score of each category label based on the non-subjective answers under each category label; input the word vectors corresponding to the subjective answers and the target weight corresponding to the category label with the smallest score into the classification model to determine the category label of the subjective answers.
[0171] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0172] Obtain the number of category labels in the category label set; randomly sort the category labels in the category label set to obtain the corresponding serial number of each category label in the category label set; determine the weight of each category label in the category label set based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
[0173] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; the processor also performs the following steps when executing the computer program:
[0174] Obtain the score for each non-subjective question answer under each category tag; integrate the scores for each non-subjective question answer under each category tag to obtain the score for each category tag.
[0175] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0176] The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes. The multiple first convolution results are concatenated to obtain a first target matrix. The first target matrix is then multiplied with the target weights to obtain a second target matrix. The second target matrix is then convolved with multiple convolution kernels to obtain multiple second convolution results. Max pooling is then performed on each of the multiple second convolution results to obtain the maximum value in each second convolution result.
[0177] The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified.
[0178] Input the vector to be classified into the classification function to obtain the probability that the answer to the subjective question belongs to each category label, and take the category label with the highest probability as the category label of the answer to the subjective question.
[0179] In one embodiment, when the processor executes a computer program, the multiple convolution kernels include two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0180] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0181] Obtain word vector samples corresponding to subjective question answer samples in the questionnaire sample, and the first weight corresponding to the category label with the smallest score in the questionnaire sample;
[0182] Input the word vector samples and the first weight into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples;
[0183] The model loss value is determined based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0184] Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the model until the obtained model loss value meets the preset conditions.
[0185] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0186] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0187] Obtain the word vectors corresponding to the answers to subjective questions;
[0188] Assign category labels to each business process under the target questionnaire to obtain a set of category labels, and determine the weight of each category label in the set of category labels;
[0189] Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label;
[0190] The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
[0191] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0192] Get the number of category tags in the category tag set;
[0193] Randomly sort the category labels in the category label set to obtain the sequence number of each category label in the category label set;
[0194] The weight of each category label in the category label set is determined based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
[0195] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; when the computer program is executed by a processor, it also performs the following steps:
[0196] Obtain the score for each non-subjective question answer under each category tag;
[0197] The scores of the answers to each non-subjective question under each category label are integrated to obtain the score for each category label.
[0198] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0199] The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes.
[0200] The first convolution results are concatenated to obtain the first target matrix, and the first target matrix is multiplied by the target weights to obtain the second target matrix;
[0201] The second target matrix is convolved with multiple convolution kernels to obtain multiple second convolution results. Max pooling is then performed on each of the multiple second convolution results to obtain the maximum value in each second convolution result.
[0202] The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified.
[0203] Input the vector to be classified into the classification function to obtain the probability that the answer to the subjective question belongs to each category label, and take the category label with the highest probability as the category label of the answer to the subjective question.
[0204] In one embodiment, when the computer program is executed by a processor, the plurality of convolution kernels include two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0205] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0206] Obtain word vector samples corresponding to subjective question answer samples in the questionnaire sample, and the first weight corresponding to the category label with the smallest score in the questionnaire sample;
[0207] Input the word vector samples and the first weight into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples;
[0208] The model loss value is determined based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0209] Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the model until the obtained model loss value meets the preset conditions.
[0210] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0211] Obtain the answers to both subjective and non-subjective questions in the target questionnaire;
[0212] Obtain the word vectors corresponding to the answers to subjective questions;
[0213] Assign category labels to each business process under the target questionnaire to obtain a set of category labels, and determine the weight of each category label in the set of category labels;
[0214] Obtain the answers to the non-subjective questions under each category label in the category label set, and determine the score for each category label based on the answers to the non-subjective questions under each category label;
[0215] The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
[0216] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0217] Get the number of category tags in the category tag set;
[0218] Randomly sort the category labels in the category label set to obtain the sequence number of each category label in the category label set;
[0219] The weight of each category label in the category label set is determined based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
[0220] In one embodiment, each category label in the target questionnaire contains multiple non-subjective question answers; when the computer program is executed by a processor, it also performs the following steps:
[0221] Obtain the score for each non-subjective question answer under each category tag;
[0222] The scores of the answers to each non-subjective question under each category label are integrated to obtain the score for each category label.
[0223] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0224] The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results. The multiple convolution kernels correspond to at least two sizes.
[0225] The first convolution results are concatenated to obtain the first target matrix, and the first target matrix is multiplied by the target weights to obtain the second target matrix;
[0226] The second target matrix is convolved with multiple convolution kernels to obtain multiple second convolution results. Max pooling is then performed on each of the multiple second convolution results to obtain the maximum value in each second convolution result.
[0227] The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified.
[0228] Input the vector to be classified into the classification function to obtain the probability that the answer to the subjective question belongs to each category label, and take the category label with the highest probability as the category label of the answer to the subjective question.
[0229] In one embodiment, when the computer program is executed by a processor, the plurality of convolution kernels include two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
[0230] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0231] Obtain word vector samples corresponding to subjective question answer samples in the questionnaire sample, and the first weight corresponding to the category label with the smallest score in the questionnaire sample;
[0232] Input the word vector samples and the first weight into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples;
[0233] The model loss value is determined based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples.
[0234] Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the model until the obtained model loss value meets the preset conditions.
[0235] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0236] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0237] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A text classification method, characterized in that, The method includes: Obtain the answers to both subjective and non-subjective questions from the target questionnaire; the target questionnaire refers to a single questionnaire. Obtain the word vectors corresponding to the answers to the subjective questions; Assign category labels to each business process under the business to which the target questionnaire belongs, obtain a set of category labels, and determine the weight corresponding to each category label in the set of category labels; Obtain the non-subjective questions answers under each category tag in the category tag set corresponding to the target questionnaire, and determine the score of each category tag based on the non-subjective questions answers under each category tag; The word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores are input into the classification model to determine the classification labels of the subjective question answers.
2. The method according to claim 1, characterized in that, Determining the weight corresponding to each category label in the category label set includes: Obtain the number of category tags in the category tag set; Randomly sort the category labels in the category label set to obtain the sequence number corresponding to each category label in the category label set. The weight of each category label in the category label set is determined based on the number of category labels in the category label set, the preset threshold, and the corresponding serial number of each category label in the category label set.
3. The method according to claim 1, characterized in that, The target questionnaire contains multiple non-subjective question answers under each category label; the determination of the score for each category label based on the non-subjective question answers under each category label includes: Obtain the score for each non-subjective question answer under each category tag; The scores of the answers to each non-subjective question under each category label are integrated to obtain the score for each category label.
4. The method according to claim 1, characterized in that, The step of inputting the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores into the classification model to determine the classification labels of the subjective question answers includes: The word vectors corresponding to the answers to the subjective questions are convolved with multiple convolution kernels to obtain multiple first convolution results, wherein the multiple convolution kernels correspond to at least two sizes; The multiple first convolution results are concatenated to obtain a first target matrix, and the first target matrix is multiplied by the target weights to obtain a second target matrix; The second target matrix is convolved with the plurality of convolution kernels to obtain a plurality of second convolution results, and max pooling is performed on each of the plurality of second convolution results to obtain the maximum value in each second convolution result; The maximum values in each of the second convolution results are concatenated to obtain the vector to be classified. The vector to be classified is input into a classification function to obtain the probability that the answer to the subjective question belongs to each category label. The category label with the highest probability is taken as the category label of the answer to the subjective question.
5. The method according to claim 4, characterized in that, The plurality of convolutional kernels includes two 4×5 kernels, two 3×5 kernels, and two 2×5 kernels.
6. The method according to claim 1, characterized in that, The training process of the classification model includes: Obtain word vector samples corresponding to subjective question answer samples in the questionnaire sample, and the first weight corresponding to the classification label with the smallest score in the questionnaire sample; The word vector samples and the first weights are input into the training model to obtain the predicted classification labels corresponding to the subjective question answer samples; The model loss value is determined based on the predicted classification labels corresponding to the subjective question answer samples and the true classification labels corresponding to the subjective question answer samples. Determine whether the model loss value meets the preset conditions. If it does, use the current training model as the classification model. If it does not, continue training the training model until the obtained model loss value meets the preset conditions.
7. A text classification device, characterized in that, The device includes: The answer retrieval module is used to retrieve the answers to subjective and non-subjective questions in the target questionnaire; the target questionnaire refers to a single questionnaire. The word vector acquisition module is used to acquire the word vectors corresponding to the answers to the subjective questions. The weight determination module is used to assign classification labels to each business link under the business to which the target questionnaire belongs, obtain a set of classification labels, and determine the weight corresponding to each classification label in the set of classification labels; The score acquisition module is used to acquire the non-subjective question answers under each category tag in the category tag set corresponding to the target questionnaire, and determine the score of each category tag based on the non-subjective question answers under each category tag; The classification label determination module is used to input the word vectors corresponding to the subjective question answers and the target weights corresponding to the classification labels with the lowest scores into the classification model to determine the classification labels of the subjective question answers.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A 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 steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Non-subjective question marking method and device based on text similarity and storage medium
CN110196893A
Classification model training and object classification method and device
CN111178458A