Text data processing method, device and storage medium

Through the combination of feature extraction model and classification model, the feature extraction model is pre-trained to extract article vectors containing semantic and source information, and the evaluation model is trained based on the evaluation information, which solves the accuracy and efficiency problems of text quality evaluation and achieves a more efficient Text data processing and evaluation.

CN114297378BActive Publication Date: 2025-01-17ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111481293.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-01-17
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The prior art has problems of high time costs and fluctuations in text quality evaluation, and the accuracy of automatic evaluation is difficult to guarantee.

Method used

The article vector of the training text is extracted through the feature extraction model, and the source information is used to train the classification model. The parameters of the feature extraction model are adjusted. After extracting the second article vector, the evaluation model is trained based on the evaluation information to improve the accuracy of the feature extraction and evaluation model.

Benefits of technology

Through pre-training of the feature extraction model, the feature extraction capability is improved, so that the extracted article vectors contain rich semantic information and source information, thereby improving the training effect and evaluation accuracy of the evaluation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297378B_ABST
    Figure CN114297378B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a text data processing method, device and storage medium, the method comprising: firstly extracting the first article vector of the training text by using a feature extraction model, and then training the classification model according to the first article vector and source information. Afterwards, according to the classification result output by the classification model, the model parameters of the feature extraction model are adjusted, thereby realizing the pre-training of the feature extraction model. Next, the second article vector of the training text is extracted according to the adjusted feature extraction model, and then the evaluation model is trained according to the second article vector and the evaluation information of the training text. By pre-training the feature extraction model, the feature extraction ability of the feature extraction model can be improved, so that it can extract the second article vector containing the semantic information and source information of the training text, and then the evaluation model is trained with the help of the second article vector rich in information, which can also improve the training effect of the evaluation model and ensure the accuracy of the evaluation model on the text data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a text data processing method, device and storage medium. Background Art

[0002] In different fields, it is often necessary to evaluate the quality of texts. Common scenarios for text quality evaluation in real life include: grading students' exam essays, evaluating the quality of texts on the Internet, and providing users with high-quality texts in response to user search operations, etc. However, the time cost of manual text evaluation is high, and the evaluation standards of different evaluators vary, which also leads to fluctuations in text evaluation results.

[0003] In order to overcome the above problems, neural network models are often used in the prior art to automatically evaluate text quality. Based on this, how to ensure the accuracy of text quality evaluation becomes an urgent problem to be solved. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a text data processing method, device and storage medium to ensure the accuracy of text evaluation.

[0005] In a first aspect, an embodiment of the present invention provides a text data processing method, comprising:

[0006] Extracting the first article vector of the training text according to the feature extraction model;

[0007] Training a classification model according to the first article vector and the source information of the training text to obtain a classification result reflecting the source of the training text;

[0008] According to the classification result, adjusting the model parameters of the feature extraction model;

[0009] Extracting a second article vector of the training text according to the adjusted feature extraction model;

[0010] The evaluation model is trained according to the second article vector and the evaluation information of the training text.

[0011] In a second aspect, an embodiment of the present invention provides a text data processing method, comprising:

[0012] According to the feature extraction model, extract the first article vector of the training composition text;

[0013] Training a classification model according to the first article vector and the source information of the training composition text to obtain a classification result reflecting the source of the composition text;

[0014] According to the classification result, adjusting the model parameters of the feature extraction model;

[0015] Extracting a second article vector of the training composition text according to the adjusted feature extraction model;

[0016] The scoring model is trained according to the second article vector and the scoring information of the training composition text.

[0017] In a third aspect, an embodiment of the present invention provides a text data processing method, comprising:

[0018] According to the feature extraction model, a first article vector of the training review text for the target object is obtained;

[0019] Training a classification model according to the first article vector and the level information corresponding to the training comment text to obtain a classification result reflecting the sentiment type of the training comment text, wherein the level information reflects the user's favorability toward the target object;

[0020] According to the classification result, adjusting the model parameters of the feature extraction model;

[0021] According to the adjusted feature extraction model, obtaining a second article vector of the training review text;

[0022] The scoring model is trained according to the sentiment type scores corresponding to the second article vector and the training comment text.

[0023] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein when the one or more computer instructions are executed by the processor, the text data processing method provided in any one of the first to third aspects is implemented. The electronic device may also include a communication interface for communicating with other devices or a communication network.

[0024] In a fifth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the text data processing method as described in any one of the first to third aspects.

[0025] The text data processing method provided by the embodiment of the present invention first uses a feature extraction model to extract the first article vector of the training text, then inputs the first article vector into the classification model, and uses the source information of the training text as the supervision information to train the classification model, so that the classification model outputs a classification result reflecting the source of the training text. Afterwards, according to the classification result, the model parameters of the feature extraction model are adjusted to achieve pre-training of the feature extraction model. Next, the second article vector of the training text is extracted according to the adjusted feature extraction model, and then the second article vector is input into the evaluation model, and the evaluation model is trained with the evaluation information of the training text as the supervision information. By pre-training the feature extraction model, the feature extraction ability of the feature extraction model can be improved, so that it can extract the second article vector containing the semantic information and source information of the training text, and then the evaluation model is trained with the help of this information-rich second article vector, which can also further improve the training effect of the evaluation model and ensure that the evaluation model can accurately evaluate the text data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 A flowchart of a text data processing method provided by an embodiment of the present invention;

[0028] Figure 2 A flowchart of another text data processing method provided by an embodiment of the present invention;

[0029] Figure 3 For Figure 2 A schematic diagram of a system structure corresponding to the text data processing method provided in the illustrated embodiment;

[0030] Figure 4 Another schematic diagram of a system structure corresponding to the text data processing method provided by an embodiment of the present invention;

[0031] Figure 5 A flowchart of another text data processing method provided by an embodiment of the present invention;

[0032] Figure 6 For Figure 5 A schematic diagram of the text data processing method provided by the illustrated embodiment being applied in a composition scoring scenario;

[0033] Figure 7 A flowchart of another text data processing method provided by an embodiment of the present invention;

[0034] Figure 8 A schematic diagram of the structure of an electronic device for text data processing provided by an embodiment of the present invention;

[0035] Fig. 9 A schematic diagram of the structure of another electronic device for text data processing provided by an embodiment of the present invention;

[0036] Fig.10 A schematic diagram of the structure of another electronic device for processing text data provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0038] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0039] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0040] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.

[0041] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0042] Before describing the text data processing method provided by the embodiment of the present invention, the practical significance of evaluating text data may be described as follows:

[0043] In practice, there may be a need to evaluate text quality in different fields and scenarios.

[0044] For example, in the education field mentioned in the background technology, there is a marking scenario: it is necessary to score the essays submitted by students online.

[0045] For example, in the field of online shopping, in a product launch scenario, sellers can submit product titles in text form online. Since product titles can directly affect product sales, the quality of titles needs to be evaluated. In a user experience survey scenario, sellers often need to understand users' experience of using products through comments entered by users. In this case, it is necessary to evaluate the sentiment bias of the comments entered by users in text form, such as whether the comments are positive, neutral, or negative.

[0046] For another example, the quality of text uploaded to the Internet needs to be evaluated so that high-quality text can be fed back to the user in response to the user's search operation on the text.

[0047] For the above scenarios, but not limited to the above scenarios, there is a need for evaluating texts. In practical applications, the network model can be used to automatically evaluate the quality of the text. At this time, the method provided by the present invention can be used to train the network model for evaluating the quality of the text, thereby ensuring that the trained network model can accurately evaluate the text.

[0048] Based on the above description, some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0049] Figure 1The flowchart of a text data processing method provided by an embodiment of the present invention. The text data processing method provided by an embodiment of the present invention can be executed by a processing device. It can be understood that the processing device can be implemented as software, or a combination of software and hardware. The processing device in this embodiment and the following embodiments can be specifically a server. The text data processing method provided by this embodiment is actually a model training method. Figure 1 As shown, the method comprises the following steps:

[0050] S101, extracting the first article vector of the training text according to the feature extraction model.

[0051] The pre-collected text data is obtained, and the source information of the text data is obtained at the same time. The collected text data is input into a feature extraction model as training text, so that the model directly extracts a first article vector, and the first article vector contains semantic information reflecting the semantics of the entire text.

[0052] Among them, in different scenarios, the training text has different contents and its source information is also different. For example, the training text can be a descriptive text for the target object, and the source information can be the credit rating and / or activity of the user who generated this description text. Specifically, the target object can be the to-be-launched product B corresponding to seller A, and the description text can be the product title given by seller A for product B. This trademark title is used to be displayed on the page of product B, and the source information can include the credit rating of seller A and / or the activity of seller A, and the activity of seller A can specifically be the seller's historical sales, historical number of visits, etc. For another example, the training text can be an essay submitted by a student online, and the source of information can include the student's grade information, school information, etc.

[0053] Among them, the training text and its source information can be obtained at the same time, and the source information does not need to be manually labeled. Specifically in combination with the above example, during the seller's business activities on the e-commerce platform, the e-commerce platform can automatically evaluate the seller's credit rating and / or activity based on the seller's business situation. Therefore, while obtaining the product title entered by the seller, the seller's credit rating and / or activity can also be automatically obtained. When students submit essays online, they must fill in information such as name, school name, grade, and class. Therefore, while obtaining the essay, the grade information corresponding to the essay can also be directly obtained.

[0054] S102: training a classification model according to the first article vector and the source information of the training text to obtain a classification result reflecting the source of the training text.

[0055] Next, the first article vector is used as input, and the source information is used as supervision information to train the classification model. The classification results output by the classification model can include the probability distribution of the training text having different sources. Continuing with the above example, when the training text is a product title, the classification results include the probability distribution of the sellers who input the product title having different credit ratings. When the training text is an elementary school student composition, the classification results include the probability distribution of the composition coming from grades one to six.

[0056] S103: Adjust model parameters of the feature extraction model according to the classification result.

[0057] Then, the loss value is calculated according to the classification result, and the model parameters of the feature extraction model are adjusted with the loss value, that is, the pre-training of the feature extraction model is completed, that is, the pre-training of the feature extraction model is realized with the help of the classification result. Optionally, the cross entropy between the classification result and the source information can be used as the loss value.

[0058] Pre-training the feature extraction model in the above manner enables the feature extraction model to learn the relationship between the semantics of the text and the source information, optimizes the feature extraction capability of the feature extraction model, and improves the expression capability of the article vector. In addition, the method of obtaining the supervised information used in the pre-training process is relatively easy and does not require manual annotation, so it can also improve the training efficiency of the feature extraction model pre-training.

[0059] S104, extracting a second article vector of the training text according to the adjusted feature extraction model.

[0060] S105: Train an evaluation model based on the second article vector and the evaluation information of the training text.

[0061] Afterwards, the adjusted feature extraction model is used to extract features of the training text again to obtain the second article vector. Compared with the first article vector, the second article vector contains richer information, namely, the semantic information of the entire text, the source information, and the relationship between the two.

[0062] Finally, the extracted second article vector is input into the evaluation model, and the evaluation information is used as supervision information to train the evaluation model. That is, the loss value is calculated based on the evaluation results and evaluation information output by the evaluation model, and the model parameters of the evaluation model are continuously adjusted.

[0063] The evaluation information required for training the evaluation model needs to be manually labeled. In the above-mentioned different scenarios, the evaluation information can be a manual rating of a product title or a manual score for an essay.

[0064] Among them, it is easy to understand that the quality of the second article vector will directly affect the training effect of the evaluation model, but by using the classification results and source information to pre-train the feature extraction model, the feature extraction ability of the feature extraction model can be optimized to a certain extent, and the quality of the extracted second article vector can be improved, even if the content contained in the vector is richer. Therefore, training the evaluation model based on the second article vector with rich content can ensure the training effect of the evaluation model.

[0065] It should be noted that the training text for extracting the second article vector and evaluating the model, that is, the training text used to perform step 104 and step 105, can be all or part of the training text obtained in step 101. However, since the training text used to perform step 104 and step 105 still needs to be manually annotated in order to obtain evaluation information, it is usually selected to use part of the training text in step 101 to perform step 104 and step 105. And in practice, the number of training texts used to train the evaluation model is usually much smaller than the number of training texts used to train the classification model. Therefore, the above-mentioned method of first using a large amount of unannotated training texts to pre-train the feature extraction model, and then using a small amount of manually annotated training texts to train the evaluation model can greatly reduce the number of annotations of training samples, improve the training efficiency of the evaluation model, and reduce the cost of model training.

[0066] In this embodiment, the first article vector of the training text is first extracted using the feature extraction model, and then the first article vector is input into the classification model, and the source information of the training text is used as the supervision information to train the classification model, so that the classification model outputs the classification result reflecting the source of the training text. Afterwards, according to the classification result, the model parameters of the feature extraction model are adjusted to achieve the pre-training of the feature extraction model. Next, the second article vector of the training text is further extracted according to the adjusted feature extraction model, and then the second article vector is input into the evaluation model, and the evaluation model is trained with the evaluation information of the training text as the supervision information. By pre-training the feature extraction model, the feature extraction ability of the feature extraction model can be improved, so that it can extract the second article vector containing the semantic information and source information of the training text, and then the evaluation model is trained with the help of this information-rich second article vector, which can also further improve the training effect of the evaluation model and ensure that the evaluation model can accurately evaluate the text data.

[0067] According to the description in the above embodiment, the quality of the article vector, that is, the feature extraction ability of the feature extraction model, will directly affect the training effect of the evaluation model. In order to further improve the feature extraction ability of the feature extraction model and also improve the evaluation accuracy of the evaluation model, Figure 2Flow chart of another text data processing method provided by an embodiment of the present invention. The text data processing method provided by this embodiment is actually also a model training method. The training process described in this embodiment can also be combined with Figure 3 The text data processing system shown is understood. Figure 2 As shown, the method may include the following steps:

[0068] S201, extracting the first article vector of the training text according to the feature extraction model.

[0069] As Figure 1 In the illustrated embodiment, the feature extraction model can directly extract the article vector of the training text. In addition, optionally, before the feature extraction model is used to extract the vector, the training text can also be segmented, that is, the training text can be first input into the segmentation model, so that the segmentation model outputs the segmentation result. Then, the segmentation result is input into the feature extraction model, so that the feature extraction model extracts the first article vector of the training text.

[0070] For example, the training text input into the word segmentation model is: "Ordinary sand contains precious wealth. An ordinary career stands behind a beautiful life." Then the word segmentation model can input the following word segmentation results: [[Ordinary, sand, contains, precious, wealth,. ], [An ordinary, career, stands behind a beautiful, life,. ]]

[0071] Based on the word segmentation results, optionally, a hierarchical feature extraction method can be used to extract the first article vector of the training text. Specifically, the word segmentation results are input into the first feature extraction sub-model to obtain a word vector; the word vector is then input into the second feature extraction sub-model to obtain a sentence vector; and the sentence vector is input into the third feature extraction sub-model to obtain the first article vector.

[0072] Among them, the Hash algorithm and the word to vector (word2vec) model can be used to extract word vectors; the Convolutional Neural Networks (CNN) model or the Long-Short Term Memory (LSTM) model can be used to extract sentence vectors; the CNN model or the bidirectional LSTM model can be used to extract article vectors.

[0073] In practice, for long text training texts, using the above-mentioned hierarchical feature extraction method can improve the situation where information is missing in the extracted feature vector, so that the extracted first article vector can more comprehensively reflect the semantics of the entire training text.

[0074] It should be noted that the extraction methods of feature vectors at different levels are not limited to the above-mentioned methods. The various algorithms or models mentioned above can realize the extraction of word vectors, sentence vectors or article vectors. In addition, other algorithms or models in the prior art that can process text data can also be used to extract word vectors, sentence vectors or article vectors.

[0075] In addition, the contents not described in detail in this step can also be found in Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0076] S202: training a classification model according to the first article vector and the source information of the training text to obtain a classification result reflecting the source of the training text.

[0077] S203: Adjust model parameters of the feature extraction model according to the classification result.

[0078] The execution process of the above steps 202 to 203 is similar to the corresponding steps of the above embodiment, and can be seen in FIG. Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0079] 204, adjusting the model parameters of the classification model according to the classification result.

[0080] While adjusting the feature extraction model according to the classification results, the parameters of the classification model can also be adjusted. It is easy to understand that after the last adjustment of the parameters of the classification model and feature extraction model, the article vector and classification results extracted next time will be more accurate, and accurate classification results will also have a positive impact on the feature extraction ability of the feature extraction model. After multiple parameter adjustments, the pre-training of the feature extraction model can be completed, the feature extraction ability of the feature extraction model can be optimized, and the article vector extracted by the feature extraction model contains rich semantic information and source information.

[0081] S205: Extract the second article vector of the training text according to the adjusted feature extraction model.

[0082] S206: Train an evaluation model based on the second article vector and the evaluation information of the training text.

[0083] The execution process of the above steps 205 to 206 is similar to the corresponding steps of the above embodiment, and can be seen in FIG. Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0084] S207, adjusting the model parameters of the adjusted feature extraction model according to the evaluation results output by the evaluation model.

[0085] Then, in order to further improve the feature extraction capability of the feature extraction model, the feature extraction model obtained after executing step 203 can be further adjusted according to the evaluation results output by the evaluation model. Optionally, the mean square error between the evaluation results and the evaluation information can be used as a loss value to adjust the model parameters. Adjusting the model parameters in the above manner enables the feature extraction model to learn the relationship between the semantics of the training text, the source information and the evaluation information, thereby optimizing the feature extraction capability of the feature extraction model. While adjusting the feature extraction model, optionally, the model parameters of the evaluation model are also adjusted according to the evaluation results and the evaluation information.

[0086] Among them, in different scenarios, the evaluation results are expressed in various forms. Continuing with the above example, the evaluation result can be a score for the quality of the product title or a score for the composition.

[0087] In this embodiment, on the one hand, through the hierarchical feature extraction method, it can be ensured that the extracted article vector has a high descriptive ability. On the other hand, according to the classification results and the evaluation results, the model parameters of the feature extraction model are adjusted twice, which can improve the model extraction ability of the model, so that the extracted article vector contains the semantic information, source information, and rating information of the training text, as well as the relationship between the three. It can be seen that this embodiment can actually improve the feature extraction ability of the feature extraction model from different aspects, and then train the evaluation model based on the accurate article vector, which can further improve the evaluation accuracy of the evaluation model.

[0088] In addition, the technical effects that can be achieved by this embodiment can also be seen in Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0089] After model training is performed according to the methods provided in the above embodiments, the feature extraction capability of the feature extraction model can be optimized, thereby obtaining a target feature extraction model; at the same time, the evaluation model can also be trained to obtain an evaluation model with accurate evaluation capability. At this time, the target feature extraction model and the evaluation model obtained after training can be used to complete the scoring of the text to be evaluated: first, the article vector of the text to be evaluated is extracted according to the target feature extraction model, and then the article vector is input into the evaluation model, so that the evaluation model outputs the evaluation result of the text to be evaluated.

[0090] Optionally, with Figure 2 Similar to the embodiment shown in the figure, the text to be evaluated can also be input into the word segmentation model first, and then the word segmentation result can be input into the target feature extraction model, and the article vector of the text to be evaluated can be extracted through a multi-level feature extraction method. Figure 4 The text data processing system shown is understood.

[0091] It can be seen that Figure 1 to Figure 3 Compared with the model training process shown in the figure, in the actual evaluation process of the text, it is not necessary to use Figure 3 The classification model in the system shown, the classification results output by the classification model are used to complete the pre-training of the feature extraction model to optimize the feature extraction capability of the feature extraction model.

[0092] According to the above description, the text data processing method provided in the above embodiments can be applied in the field of education, and can also be applied in online shopping scenarios, etc. For ease of understanding, the specific implementation process of the text data processing method provided above is exemplified in conjunction with an online shopping scenario.

[0093] Merchant A who has settled in the e-commerce platform can perform relevant operations for listing product B in the service interface provided by the e-commerce platform. Merchant A can enter the title of product B in the service interface. After that, the processing device maintained by the e-commerce platform can use the title after receiving the title entered by merchant A. Figure 4 The text data processing system shown in the figure scores the title. According to the score, the merchant can determine whether to change the title according to the scoring result to avoid affecting the sales of goods with inappropriate titles. It is easy to understand that the higher the credit rating or activity of the merchant, the better the sales of the goods, and the evaluation model often gives higher scores to the titles of such merchants.

[0094] Based on the above description, we can use Figure 3 The text data processing system shown is used to train the evaluation model. The specific process can be:

[0095] First, obtain the product titles corresponding to the products being sold by the merchants on the e-commerce platform and the credit ratings of the merchants. The product titles can be used as training texts, and the credit ratings of the merchants to which the products belong can be used as the source information of the products. Then, the product titles are input into the word segmentation model to obtain the word segmentation results, and the first article vector of the product title is obtained through multi-level feature extraction based on the word segmentation results. For example, if the product title 1 is: "Herringbone pattern double-faced woolen coat, medium-long style", then the corresponding word segmentation results are [herringbone, pattern, double-faced, woolen, coat, medium-long style].

[0096] Next, the first article vector is input into the classification model, and the credit rating of the merchant to which the product title belongs is used as supervision information to train the classification model, so that the classification model outputs the probability distribution that different product titles belong to heart-level sellers, diamond-level sellers, crown-level sellers, and gold-crown-level sellers. Continuing with the above example, for product title 1, the classification result output by the classification model can be expressed as: [0.5, 0.2, 0.7, 0.2,], and this probability distribution indicates that product title 1 is most likely to be taken by a crown-level seller.

[0097] Afterwards, the loss value can be calculated based on the classification result and the source information of the product title, and the model parameters of the feature extraction model can be adjusted based on this loss value, which means that the pre-training of the feature extraction model is completed, that is, the model extraction ability of the feature extraction model is optimized with the help of the classification result output by the classification model. Through the aforementioned pre-training process, the first article feature extracted by the feature extraction model can simultaneously contain the semantic information of the product title and the credit rating of the merchant to which it belongs. At the same time, the model parameters of the classification model can also be adjusted based on the above-mentioned loss value to improve the classification accuracy of the classification model.

[0098] Next, the product title is input into the pre-trained feature extraction model to extract the second article vector of the product title. Compared with the first article vector, the article vector extracted by the pre-trained feature extraction model has higher quality, that is, the second article vector contains richer information and stronger expression ability.

[0099] Finally, the second article vector is input into the evaluation model, and the evaluation information of the trademark title is used as the supervision information to train the evaluation model. The evaluation information may be the score given to the product title. In practice, the number of product titles used in training the classification model is usually greater than the number of product titles used in training the scoring model, thereby greatly reducing the workload of manual scoring, greatly reducing the degree of manual intervention in the process of training the scoring model, and reducing the time cost of model training.

[0100] Optionally, the model parameters of the scoring model can be adjusted according to the loss value between the evaluation result output by the evaluation model and the evaluation information of the product title, and the model parameters of the feature extraction model can be adjusted again, so as to optimize the feature extraction capability of the feature extraction model with the help of the score output by the evaluation model, so that the article vector extracted by the feature extraction model can include the semantic information of the product title, the credit rating information of the merchant to which it belongs, the rating information of the product title, and the relationship between the three. Since the quality of the article feature vector will directly evaluate the training effect of the model, the scoring accuracy of the scoring model can be further improved after multiple optimizations of the feature extraction model.

[0101] According to the above description, the text data processing method provided in the above embodiments can be applied in the field of education, and can also be applied in online shopping scenarios, etc. When the text data processing method is applied in the field of education, specifically for grading the essays uploaded by students online, Figure 5 Flow chart of another text data processing method provided by an embodiment of the present invention. Similar to the above embodiment, the text data processing method provided by this embodiment can still be considered as a model training method. The text data processing method provided by this embodiment can be executed by a processing device. The training process described in this embodiment can be combined with Figure 3 The system shown in the figure can be understood. Figure 5 As shown, the method may include the following steps:

[0102] S301, extracting the first article vector of the training composition text according to the feature extraction model.

[0103] S302: training a classification model according to the first article vector and the source information of the training composition text to obtain a classification result reflecting the source of the training composition text.

[0104] Students can Figure 6 The processing device (such as the server maintained by the online education platform) can use the compositions uploaded by students in the historical time period as training composition texts (i.e., training texts). At the same time, when uploading the composition, the student will also enter the name, school name, grade, class and other information on the page, among which the student's grade information or school information can be used as the source information of the training composition text. Therefore, the processing device can also obtain the source information of each training composition text at the same time as obtaining the training composition text.

[0105] Next, the first article vector of the training composition text can be extracted according to the feature extraction model. Optionally, the first article vector can be extracted according to Figure 1 The article vector can be directly extracted by the method of the embodiment shown in the figure. Figure 2 In the embodiment shown, a multi-level approach is used to extract the first article vector, which is then input into a classification model, and the source information of the training composition text is used as supervision information to train the classification model, so that the classification model outputs the probability distribution of the training composition text belonging to different grades.

[0106] S303: Adjust model parameters of the feature extraction model according to the classification result.

[0107] Then, the model parameters of the feature extraction model are adjusted according to the classification results, so that the feature extraction model can be pre-trained, thereby optimizing the feature extraction capability of the feature extraction model and improving the feature extraction capability of the feature extraction model. Optionally, the model parameters of the classification model can also be adjusted at the same time according to the classification results.

[0108] Since the source information used to train the classification model can be obtained together with the training composition information, and does not require manual annotation, it can also reduce the degree of manual intervention in the model training process, reduce labor costs, and improve the training efficiency of the classification model. On this basis, since the classification results output by the classification model are the basis for optimizing the feature extraction model, the simplicity of the source information acquisition method can also indirectly improve the optimization efficiency of the feature extraction model.

[0109] S304, extracting a second article vector of the training composition text according to the adjusted feature extraction model.

[0110] S305: training a scoring model based on the second article vector and the scoring information of the training composition text.

[0111] Finally, the training composition text is feature extracted according to the feature extraction model with adjusted parameters to obtain the second article vector. The second article vector is then input into the scoring model, and the scoring model is trained using the scoring information of the training composition text as supervision information. The scoring information of the training composition text is artificially given by the teacher of the online education platform.

[0112] Compared with the first article vector, the second article vector extracted by the adjusted extraction model after parameter adjustment contains richer information. Using the second article vector to train the scoring model can optimize the training effect of the scoring model.

[0113] In practice, the number of training composition texts used to train the scoring model is much smaller than that used to train the classification model. At this time, the teacher only needs to provide scoring information for a small amount of training composition texts, thereby reducing the degree of manual participation in the scoring model training process and reducing labor costs.

[0114] Optionally, after step 305, the model parameters of the feature extraction model and the scoring model can be adjusted again according to the loss value between the scoring result output by the scoring model and the scoring information of the training composition text, that is, the feature extraction capability of the feature extraction model is optimized to further improve the scoring accuracy of the scoring model.

[0115] In addition, the contents not described in detail in this embodiment can also be referred to in the above Figure 1 to Figure 3 The relevant description in the illustrated embodiment will not be repeated here.

[0116] In this embodiment, by pre-training the feature extraction model, the feature extraction capability of the feature extraction model can be improved, so that it can extract the second article vector containing the semantic information and source information of the training text, and then use this information-rich second article vector to train the evaluation model, which can further improve the training effect of the evaluation model and ensure that the evaluation model can accurately evaluate the text data.

[0117] For ease of understanding, the specific implementation process of the text data processing method provided above is exemplified with reference to the following specific examples.

[0118] Primary school student A on the education platform can Figure 6 Upload the composition in the interface shown, and enter your school name, name, class and grade information in the interface. After that, the processing device maintained by the education platform can use it after receiving the composition uploaded by student A. Figure 4 The text data processing system shown is used to score the essays. Since different students use the same scoring model to score, it can avoid the situation where the scores of essays fluctuate due to different scoring standards of different teachers during manual scoring, thereby ensuring the stability of the scores of essays. Figure 6 As shown, the score of the composition and the good words and sentences in the composition will be displayed in the interface. Among them, good words and sentences can be the use of rhetoric, parallel sentences, idioms, etc.

[0119] Based on the above description, we can Figure 3 The text data processing system shown trains a scoring model:

[0120] The server of the online education platform can obtain multiple compositions uploaded by primary school students within a historical period of time and the grade information of each composition, and use the compositions uploaded by the students within the historical period of time as training composition texts, and use the grade information of each composition as the source information of the composition.

[0121] Then, the training composition text is input into the word segmentation model to obtain the word segmentation result, and the first text vector of the training composition text is obtained through multi-level feature extraction based on the word segmentation result. Then the first text vector is input into the classification model, and the grade information of the training composition text is used as supervision information to train the classification model, so that the classification model outputs the probability distribution of each training composition text belonging to the first to sixth grade.

[0122] For example, for composition 1 in the training composition text: "My little ball has a round belly and wears an orange coat." Its segmentation results are: [[my, little, ball, has, a, round, belly,], [wearing, an, orange, coat,. ]]. The classification results output by the classification model can be expressed as: [0.5, 0.7, 0.4, 0.2, 0.4, 0.3]. This probability distribution indicates that composition 1 is most likely written by a second-grade student.

[0123] Afterwards, the loss value can be calculated based on the classification results and source information, and the model parameters of the feature extraction model can be adjusted based on this loss value, which means that the pre-training of the feature extraction model is completed, that is, the model extraction ability of the feature extraction model is optimized with the help of the classification results output by the classification model. Through the aforementioned pre-training process, the first article feature extracted by the feature extraction model can simultaneously contain the semantic information of the composition and the credit rating of the merchant to which it belongs. At the same time, the model parameters of the classification model can also be adjusted based on the above-mentioned loss value to improve the classification accuracy of the classification model.

[0124] Next, the training composition text is input into the pre-trained feature extraction model to extract the second article vector of the training composition text. Compared with the first article vector, the article vector extracted by the pre-trained feature extraction model has higher quality, that is, the second article vector contains richer information and stronger expression ability.

[0125] Finally, the second article vector is input into the scoring model to use the scoring information of the training composition text as supervision information to train the scoring model. The scoring information is obtained by manual scoring by teachers on the online education platform. In practice, the number of training composition texts used in training the classification model is usually greater than the number of training composition texts used in training the scoring model, thereby greatly reducing the workload of manual annotation, greatly reducing the degree of manual intervention in the process of training the scoring model, and reducing the time cost of model training.

[0126] Optionally, the model parameters of the scoring model can be adjusted according to the loss value between the scoring result output by the scoring model and the scoring information of the training composition text, and the model parameters of the feature extraction model can be adjusted again, so as to optimize the feature extraction capability of the feature extraction model with the composition score output by the scoring model, so that the article vector extracted by the feature extraction model can include the semantic information, grade information, scoring information and the relationship between the three. Since the quality of the article feature vector will directly affect the training effect of the scoring model, the scoring accuracy of the scoring model can be further improved after multiple optimizations of the feature extraction model.

[0127] When the text data processing method is applied in an online shopping scenario, the above has mentioned the use of the text data processing method to train a scoring model for scoring product titles. Similarly, the method provided in this embodiment can also be used to train a scoring model for evaluating the sentiment type of product reviews.

[0128] but Figure 7 Flow chart of another text data processing method provided by an embodiment of the present invention. Similar to the above embodiment, the text data processing method provided by this embodiment can still be considered as a model training method. The text data processing method provided by this embodiment can be executed by a processing device. The training process described in this embodiment can be combined with Figure 3 The system shown in the figure can be understood. Figure 7 As shown, the method may include the following steps:

[0129] S401, obtaining a first article vector of a training review text for a target object according to a feature extraction model.

[0130] S402, training a classification model according to the first article vector and the grade information corresponding to the training comment text to obtain a classification result reflecting the sentiment type of the training comment text, wherein the grade information reflects the user's favorability toward the target object.

[0131] S403: Adjust model parameters of the feature extraction model according to the classification result.

[0132] Merchants on the e-commerce platform can collect the comments given by users on the target object and the rating information of the comments. The target object can be the product purchased by the user, the comments are in text form, and the rating information can be a rating used to reflect the user's favorability towards the target object, i.e. the product. For example, a user can make the following text comment on the product: "The coat is very comfortable and feels good", and give the product a rating of three stars. The higher the rating, the higher the user's favorability towards the product.

[0133] Then, the collected textual comments are used as training comment texts, and the first article vector of the training comment texts is obtained by directly extracting the feature extraction model or by multi-level feature extraction. The first article vector of the training comment text is input into the classification model, and the grade information corresponding to the training comment text is used as the supervision information to train the classification model, so that the classification model outputs the classification result reflecting the emotional type of the training comment text. Among them, it can be seen from the above example that the grade information as the supervision information is also the grade score corresponding to each training comment text. The classification result output by the classification model can specifically include the probability distribution of the training comment text belonging to positive emotion, neutral emotion, and negative emotion.

[0134] Next, the model parameters of the feature extraction model can be adjusted according to the classification results output by the classification model, that is, the pre-training of the extraction model is completed, so that the feature extraction model is optimized. At the same time, the model parameters of the classification model can also be adjusted. Since the level information as supervisory information is obtained together with the training comment text, it does not need to be manually labeled. Therefore, using the level information for classification model training and feature extraction model pre-training can greatly reduce the degree of manual intervention and labor costs in the model training process, while improving the efficiency of model training.

[0135] The contents not described in detail in the above steps 401 to 403 can be found in the relevant descriptions of the above embodiments and will not be repeated here.

[0136] S404, obtaining a second article vector of the training comment text according to the adjusted feature extraction model.

[0137] S405: training a scoring model according to the sentiment type scores corresponding to the second article vector and the training comment text.

[0138] Finally, the second article vector of the training comment text is obtained using the pre-trained feature extraction model. Compared with the first article vector, the second article vector extracted by the pre-trained feature extraction model contains richer information. The evaluation model is then trained based on the sentiment type score corresponding to the second article vector and the training comment text.

[0139] Optionally, the model parameters of the evaluation model can be adjusted according to the evaluation results output by the evaluation model, and the model parameters of the feature extraction model can also be adjusted at the same time to further optimize the feature extraction capability of the feature extraction model. With the improvement of feature extraction capability, the training effect of the evaluation model can also be indirectly guaranteed.

[0140] For example, the evaluation result output by the evaluation model can be specifically expressed as any value between the numerical range [-x, ~x]. Among them, if the score output by the scoring model is -x, it means that the sentiment type of the comment is completely negative; if the score output by the scoring model is x, it means that the sentiment type of the comment is completely positive; if the score output by the scoring model is 0, it means that the sentiment type of the comment is neutral.

[0141] It should be noted that the number of training review texts used to train the classification model (i.e., executing steps 401 to 403) is greater than the number of training review texts used to train the evaluation model (i.e., executing steps 404 to 405). Therefore, the scoring model can be trained using a small amount of manually annotated training evaluation texts, which can also improve training efficiency.

[0142] The specific implementation method of each step in this embodiment and the technical effect that can be achieved by this embodiment can all be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0143] The electronic devices of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these electronic devices can be configured using commercially available hardware components through the steps taught in this solution.

[0144] In a possible design, the above text data processing method can be executed by an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 32 is used to store the electronic device to perform the above Figures 1 to 4 The program of the text data processing method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .

[0145] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 21:

[0146] Extracting the first article vector of the training text according to the feature extraction model;

[0147] Training a classification model according to the first article vector and the source information of the training text to obtain a classification result reflecting the source of the training text;

[0148] According to the classification result, adjusting the model parameters of the feature extraction model;

[0149] Extracting a second article vector of the training text according to the adjusted feature extraction model;

[0150] The evaluation model is trained according to the second article vector and the evaluation information of the training text.

[0151] Optionally, the processor 21 is further configured to execute the aforementioned Figures 1 to 4 All or part of the steps in the illustrated embodiments.

[0152] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.

[0153] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figures 1 to 4 The program involved in the text data processing method in the method embodiment shown.

[0154] In another possible design, the above text data processing method can be executed by an electronic device, such as Fig. 9 As shown, the electronic device may include: a processor 31 and a memory 32. The memory 32 is used to store the electronic device to perform the above Figures 5 and 6 The program of the text data processing method provided in the illustrated embodiment, the processor 31 is configured to execute the program stored in the memory 32 .

[0155] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 31:

[0156] According to the feature extraction model, extract the first article vector of the training composition text;

[0157] Training a classification model according to the first article vector and the source information of the training composition text to obtain a classification result reflecting the source of the composition text;

[0158] According to the classification result, adjusting the model parameters of the feature extraction model;

[0159] Extracting a second article vector of the training composition text according to the adjusted feature extraction model;

[0160] The scoring model is trained according to the second article vector and the scoring information of the training composition text.

[0161] Optionally, the processor 31 is further configured to execute the aforementioned Figures 5 and 6 All or part of the steps in the illustrated embodiments.

[0162] The structure of the electronic device may further include a communication interface 33 for the electronic device to communicate with other devices or a communication network.

[0163] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figures 5 and 6 The program involved in the text data processing method in the method embodiment shown.

[0164] In another possible design, the above text data processing method can be executed by an electronic device, such as Fig.10 As shown, the electronic device may include: a processor 41 and a memory 42. The memory 32 is used to store the electronic device to perform the above Figure 7 The program of the text data processing method provided in the illustrated embodiment, the processor 41 is configured to execute the program stored in the memory 42 .

[0165] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 41:

[0166] According to the feature extraction model, a first article vector of the training review text for the target object is obtained;

[0167] Training a classification model according to the first article vector and the level information corresponding to the training comment text to obtain a classification result reflecting the sentiment type of the training comment text, wherein the level information reflects the user's favorability toward the target object;

[0168] According to the classification result, adjusting the model parameters of the feature extraction model;

[0169] According to the adjusted feature extraction model, obtaining a second article vector of the training review text;

[0170] The scoring model is trained according to the sentiment type scores corresponding to the second article vector and the training comment text.

[0171] Optionally, the processor 41 is further configured to execute the aforementioned Figure 7 All or part of the steps in the illustrated embodiments.

[0172] The structure of the electronic device may further include a communication interface 43 for the electronic device to communicate with other devices or a communication network.

[0173] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 7 The program involved in the text data processing method in the method embodiment shown.

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

Claims

1. A text data processing method, characterized in that: include: Extracting the first article vector of the training text according to the feature extraction model; Training a classification model according to the first article vector and the source information of the training text to obtain a classification result reflecting the source of the training text, wherein the source information includes personal information of a user who generates the training text; According to the classification result, adjusting the model parameters of the feature extraction model; Extracting a second article vector of the training text according to the adjusted feature extraction model; An evaluation model is trained according to the second article vector and the evaluation information of the training text.

2. The method according to claim 1, characterized in that The step of extracting the first article vector of the training text according to the feature extraction model includes: Inputting the training text into a word segmentation model to obtain a word segmentation result of the training text; The word segmentation result is input into the feature extraction model to obtain the first article vector.

3. The method according to claim 2, characterized in that The step of inputting the word segmentation result into the feature extraction model to obtain the first article vector includes: Inputting the word segmentation result into the first feature extraction sub-model to obtain a word vector; Inputting the word vector into the second feature extraction sub-model to obtain a sentence vector; The sentence vector is input into a third feature extraction sub-model to obtain the first article vector.

4. The method according to claim 1, characterized in that: The method further comprises: According to the classification result, the model parameters of the classification model are adjusted.

5. The method according to claim 1, characterized in that The method further comprises: According to the evaluation result output by the evaluation model, the model parameters of the adjusted feature extraction model are adjusted.

6. The method according to claim 5, characterized in that The method further comprises: Extracting the article vector of the text to be evaluated according to the target feature extraction model, wherein the target feature extraction model is obtained by adjusting the model parameters according to the classification result and the evaluation result respectively; The article vector is input into the evaluation model to obtain the evaluation result of the text to be evaluated.

7. The method according to claim 1, characterized in that The training text includes a description text for a target object, and the source information includes at least one of a credit rating and activity level of a user who generates the description text.

8. A text data processing method, characterized in that: include: According to the feature extraction model, extract the first article vector of the training composition text; Training a classification model according to the first article vector and the source information of the training composition text to obtain a classification result reflecting the source of the training composition text, wherein the source information includes personal information of a user who generates the training composition text; According to the classification result, adjusting the model parameters of the feature extraction model; Extracting a second article vector of the training composition text according to the adjusted feature extraction model; A scoring model is trained according to the scoring information of the second article vector and the training composition text.

9. The method according to claim 8, characterized in that The source information includes grade information or school information of the user who generated the composition text.

10. A text data processing method, characterized in that: include: According to the feature extraction model, a first article vector of the training review text for the target object is obtained; According to the first article vector and the level information corresponding to the training comment text, a classification model is trained to obtain a classification result reflecting the sentiment type of the training comment text, wherein the level information reflects the favorability of the user who generated the training comment text to the target object; According to the classification result, adjusting the model parameters of the feature extraction model; According to the adjusted feature extraction model, obtaining a second article vector of the training review text; A scoring model is trained according to the sentiment type scores corresponding to the second article vector and the training comment text.

11. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the text data processing method as described in any one of claims 1 to 10.

12. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the text data processing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • User comment information display method and apparatus

    CN107291780A

  • Text evaluation method, device, apparatus, and readable storage medium

    CN109471915A