WO2023284327A1 - 文本质量评估模型的训练方法和确定文本质量的方法 - Google Patents

文本质量评估模型的训练方法和确定文本质量的方法 Download PDF

Info

Publication number
WO2023284327A1
WO2023284327A1 PCT/CN2022/082273 CN2022082273W WO2023284327A1 WO 2023284327 A1 WO2023284327 A1 WO 2023284327A1 CN 2022082273 W CN2022082273 W CN 2022082273W WO 2023284327 A1 WO2023284327 A1 WO 2023284327A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
texts
index data
training
quality assessment
Prior art date
Application number
PCT/CN2022/082273
Other languages
English (en)
French (fr)
Inventor
王恒
田振雷
于天宝
Original Assignee
北京百度网讯科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Priority to JP2022560062A priority Critical patent/JP2023536773A/ja
Priority to EP22773587.5A priority patent/EP4148594A4/en
Publication of WO2023284327A1 publication Critical patent/WO2023284327A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/0895Weakly supervised learning, e.g. semi-supervised or self-supervised learning

Definitions

  • the present disclosure relates to the field of artificial intelligence technology, specifically to the fields of natural language processing, deep learning, and intelligent recommendation, and more specifically to a training method for a text quality evaluation model and a method, device, electronic device, and storage medium for determining text quality .
  • the classification model is usually trained by using manually labeled samples, and then the classification model is used to predict the quality of the text, so as to select high-quality text from the text library and recommend it to the user.
  • the present disclosure provides a method for training a text quality evaluation model, a method for determining text quality, a device, an electronic device, and a storage medium for reducing model training costs and improving model accuracy.
  • a method for training a text quality assessment model including: based on the index data for the text, determining the first text that satisfies the negative sample condition and the second text that satisfies the positive sample condition among multiple texts ; For any text in the first text and the second text, add a label to any text based on the condition that any text satisfies, and the label indicates the category of any text, which includes low-quality categories for negative samples and for The non-low-quality category of the positive sample; the first text with the label and the second text with the label are used to form a training set, and the text quality assessment model is trained.
  • a method for determining the quality of a text including: using the text to be processed as the input of the text quality evaluation model to obtain the output data of the text quality evaluation model; based on the output data, determining the text to be processed categories, wherein the text quality assessment model is trained by using the aforementioned text quality assessment model training method.
  • a training device for a text quality assessment model including: a text determination module, configured to determine, among multiple texts, the first text that satisfies the negative sample condition and the text that satisfies the The second text of the positive sample condition; the label adding module is used for any text in the first text and the second text, and adds a label to any text based on the condition that any text satisfies, and the label indicates any text.
  • category which category includes a low-quality category for negative samples and a non-low-quality category for positive samples; and a first model training module, which is used to form a training set by adding the first text with the label and the second text with the label , to train the text quality assessment model.
  • a device for determining text quality including: an output data obtaining module, configured to use the text to be processed as the input of the text quality assessment model to obtain the output data of the text quality assessment model; and the text The quality determination module is configured to determine the category of the text to be processed based on the output data, wherein the text quality assessment model is trained by using the aforementioned text quality assessment model training device.
  • an electronic device including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are Execution by at least one processor, so that at least one processor can execute the method for training a text quality assessment model and/or the method for determining text quality provided by the present disclosure.
  • a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make a computer execute the text quality assessment model training method provided in the present disclosure and/or determine the text quality approach.
  • a computer program product including a computer program, and when the computer program is executed by a processor, the method for training a text quality assessment model and/or the method for determining text quality provided by the present disclosure are implemented .
  • FIG. 1 is a schematic diagram of an application scenario of a method for training a text quality assessment model and/or a method for determining text quality according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a training method of a text quality assessment model according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of the principle of a training method of a text quality assessment model according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of the principle of determining a first text satisfying a negative sample condition and a second text satisfying a positive sample condition according to an embodiment of the present disclosure
  • Fig. 5 is a schematic diagram of the principle of determining the first text that satisfies the negative sample condition according to another embodiment of the embodiment of the present disclosure
  • Fig. 6 is a schematic flowchart of a method for determining text quality according to an embodiment of the present disclosure
  • FIG. 7 is a structural block diagram of a training device for a text quality assessment model according to an embodiment of the disclosure.
  • Fig. 8 is a structural block diagram of an apparatus for determining text quality according to an embodiment of the present disclosure.
  • FIG. 9 is a block diagram of an electronic device for implementing a method for training a text quality assessment model and/or a method for determining text quality according to an embodiment of the present disclosure.
  • the present disclosure provides a method for training a text quality assessment model, which includes a text determination stage, a tag addition stage and a model training stage.
  • a text determining stage based on the index data for the text, a first text satisfying a negative sample condition and a second text satisfying a positive sample condition among the plurality of texts are determined.
  • a label adding phase for any text in the first text and the second text, a label is added to any text based on the condition satisfied by the text, the label indicates the category of any text, and the category includes Low-quality classes for negative samples and non-low-quality classes for positive samples.
  • the first text with labels and the second text with labels constitute a training set to train the text quality assessment model.
  • Fig. 1 is a schematic diagram of an application scenario of a method for training a text quality assessment model and/or a method for determining text quality according to an embodiment of the present disclosure.
  • a scenario 100 of this embodiment includes a first server 110 and a first database 120 , and the first server 110 can access the first database 120 through a network, for example.
  • a network may include wired or wireless communication links.
  • the first database 120 may be, for example, a text library, in which a plurality of texts without quality evaluation are maintained.
  • the multiple texts may be, for example, answer texts provided by the user for questions, or any type of text uploaded by the user, which is not limited in the present disclosure.
  • the first server 110 may recall texts satisfying conditions from the first database 120 based on the recall rule, and obtain the recalled text 130 .
  • the recall conditions can be set according to index data such as the number of views, likes, and dislikes of the text. to recall positive samples and negative samples from the first database 120 .
  • the application scenario 100 may also include a second server 150, for example, the second server 150 may receive the tagged text generated by the first server 110, and use the text as a training sample , train the text quality assessment model 160 . In this way, the text that has not undergone quality evaluation can be evaluated based on the trained text quality evaluation model 160 .
  • the second server 150 may also access the first database 120 through the network, so as to obtain texts without quality evaluation from the first database 120 .
  • the second server 150 can also write the quality-assessed text into the second database 170 .
  • the application scenario 100 may also include a terminal device 180, which may be various electronic devices with human-computer interaction functions, including but not limited to smartphones, tablet computers, Laptops and desktop computers, etc.
  • the terminal device 180 can interact with the second server 150 via a network, for example.
  • the terminal device 180 may send the text 190 uploaded by the user via the terminal device 180 to the second server 150 so that the second server 150 uses the text quality evaluation model 160 to evaluate the quality of the uploaded text 190 .
  • the second server 150 may also write the uploaded text collaborative quality assessment result into the second database 170 after completing the quality assessment.
  • the application scenario may be a question and answer understanding technical scenario.
  • the question-and-answer understanding technology refers to matching the appropriate answer or judging whether the answer meets the requirements of the question through the semantic understanding of the question text.
  • the question-and-answer understanding technology refers to matching the appropriate answer or judging whether the answer meets the requirements of the question through the semantic understanding of the question text.
  • the text quality assessment model 160 can be used to perform quality assessment on the answer texts for each question. In this way, it is convenient for each search engine to recall high-quality answers to the user according to the question text provided by the user, thereby improving user experience.
  • the first server 110 and the second server 150 may be, for example, the same server.
  • the first database 120 and the second database 170 may be, for example, two storage partitions of the same database.
  • the first server 110 may also train the text quality assessment model according to the obtained text with labels.
  • the method for training a text quality assessment model and/or the method for determining text quality may generally be executed by the second server 150, or may be partly executed by the first server 110 and partly executed by the second server 110.
  • the second server 150 executes.
  • the text quality assessment model training device and/or the text quality determination device provided by the embodiments of the present disclosure may be set in the second server 150, or a part may be set in the first server 110, and another part may be set in the second server 110. In the second server 150 .
  • first server the second server
  • first database the second database
  • terminal devices there may be any data and types of the first server, the second server, the first database, the second database and the terminal equipment.
  • the method 200 for training a text quality assessment model in this embodiment may include operation S210 - operation S230 .
  • a first text satisfying a negative sample condition and a second text satisfying a positive sample condition among the plurality of texts are determined.
  • a plurality of index data related to a text may be obtained by making statistics on interactive behaviors generated around the text.
  • the index data for the text may represent, for example, the situation that the text is browsed or operated by users other than the publisher.
  • the index data may include the number of views, likes, and dislikes of the text, and the adoption of the text.
  • the index data for the text may, for example, represent the index data of the publisher of the text.
  • the publisher's indicator data may include, for example, the level of the publisher's associated account, whether the associated account is a member account, the number of texts published by the publisher, the quality of the texts published by the publisher, and the like.
  • the text-specific index data may include, for example, display attributes of the text, such as display positions relative to multiple texts, display integrity of the text, whether the text is displayed in a folded state, and the like.
  • display attributes of the text such as display positions relative to multiple texts, display integrity of the text, whether the text is displayed in a folded state, and the like.
  • the present disclosure does not limit the index data for the text, as long as the index data for the text can reflect the quality of the text to a certain extent.
  • the plurality of texts may be, for example, all texts maintained in a text library.
  • the negative sample condition and the positive sample condition are conditions set based on the index data for text.
  • the negative sample condition may be that the number of likes is greater than or equal to the threshold of likes
  • the positive sample condition may be that the number of likes is greater than or equal to the threshold of likes.
  • the limit of the positive sample condition may have a higher requirement on text quality than the limit of the negative sample condition.
  • the negative sample condition and the positive sample condition can be set according to actual needs, which is not limited in this disclosure.
  • a label is added to any one of the texts based on a condition satisfied by the any one of the texts.
  • the tag may indicate, for example, the category of any text. For example, if the any text is the first text satisfying the negative sample condition, a label indicating a low-quality category is added to the any text. If the any text is the second text satisfying the positive sample condition, a label indicating a non-low-quality category is added to the any text. For example, a label indicating a low-quality category may be represented by a 1, and a label indicating a non-low-quality category may be represented by a 0.
  • the labeled first text and the labeled second text form a training set to train the text quality assessment model.
  • any text in the training set can be used as the input of the text quality assessment model, and the assessment result of whether the text is a low-quality category can be obtained based on the output data of the text quality assessment model.
  • the evaluation result can be compared with the category indicated by the label of any text, and the text quality evaluation model can be trained by using a gradient descent algorithm or a backpropagation algorithm according to the comparison result.
  • the text quality evaluation model may be, for example, a classification model, which is used to determine whether the text quality category is a low-quality category.
  • the classification model may include, for example, a fastText model, a textCNN model, an RCNN model, a Bi-LSTM model, and the like.
  • the classification model includes a semantic feature extraction layer and a fully connected layer. The semantic feature extraction layer is used to extract semantic features, and the fully connected layer is used to map semantic features to the category dimension space and output classification prediction results.
  • the method of recalling the texts satisfying the conditions from the text database based on the index data and adding labels to the texts based on the conditions satisfied by the texts can realize the sample set Automatic generated.
  • the training set can be generated by recalling the text that meets the conditions, which can balance the proportion of sample data of each category, and thus facilitate the text quality assessment model to fully learn the text features during the training process.
  • the association relationship with each quality evaluation result is convenient for improving the accuracy and stability of the trained text quality evaluation model.
  • cold-start training of the model can be realized.
  • Fig. 3 is a schematic diagram of a training method of a text quality assessment model according to an embodiment of the present disclosure.
  • the text quality assessment model may include, for example, a semantic representation network, so that the extracted text features can express the semantics of the text more accurately.
  • the semantic representation network may use a pre-trained model, for example.
  • the pre-training model can include Embeddings form Language Models (ELMo) or a transformer-based bidirectional encoding representation model (Bidirectional Encoder Representation from Transformers, BERT), etc.
  • ELMo Embeddings form Language Models
  • BERT transformer-based bidirectional encoding representation model
  • the semantic representation network can be pre-trained, and the pre-trained semantic representation network can be used to build a text quality assessment model.
  • the method 300 for training a text quality assessment model in this embodiment can first train the semantic representation network 320 based on multiple texts in the text library 310 to obtain a pre-trained semantic representation network 330 . Then, based on the pre-trained semantic representation network 330, a text quality assessment model 350 is obtained by splicing network structures such as the fully connected layer 340 in the output direction of the pre-trained semantic representation network 330.
  • the semantic representation network 320 when training the semantic representation network 320, two pre-training tasks can be constructed, which are masked language model (Masked Language Model, MLM) tasks And the next sentence prediction (Next Sentence Prediction, NSP) task.
  • MLM Mask Language Model
  • NSP Next Sentence Prediction
  • the token in each training sequence can be randomly replaced with a mask token ([MASK]) with a predetermined probability (for example, 15%), and then the word at the position of [MASK] can be predicted.
  • the BERT model is trained on the difference between the predicted word and the actual word at position [MASK].
  • sentence text B is the next sentence of sentence text A (marked as IsNext), and in the remaining 50% of cases, sentence B is a random sentence text in the text library (marked as NotNext).
  • input the training sample into the BERT model to predict the two classifications, and train the BERT model according to the difference between the prediction result and the label.
  • the method described above can be used to recall the first text 360 and the second text 370 from the text library 310, and pass the first text 360 and the second text 370 After adding labels respectively, a training set 380 is obtained. The text quality assessment model 350 is then trained based on the training set 380 . It can be understood that the operation of recalling the first text 360 and the second text 370 from the text library 310 may be performed simultaneously with the aforementioned operation of training the semantic representation network, or the two operations may be performed in any order. , which is not limited in the present disclosure.
  • the semantic representation network is pre-trained based on the full amount of text, and the text quality evaluation model is constructed based on the pre-trained semantic representation network, which can improve the semantic expression ability of the obtained text quality evaluation model.
  • the semantic representation network is used to extract semantic features and is not affected by sparse samples. And therefore, the accuracy and stability of the trained text quality assessment model can be improved to a certain extent.
  • the aforementioned method of using the training set obtained by the recall method to train the text quality assessment model is essentially a weakly supervised learning method.
  • this embodiment can also use the training text with artificial labels to make the text quality assessment model perform strong supervised learning.
  • the target text with a manually labeled label indicating the actual category of the text can be used as a training sample to perform secondary training on the text quality assessment model trained using the training set.
  • the secondary training process is similar to the training process based on the training set described above. In this manner, the accuracy and stability of the trained text quality assessment model can be further improved.
  • the actual category of the text may include a low-quality category and a non-low-quality category.
  • Fig. 4 is a schematic diagram of the principle of determining a first text satisfying a negative sample condition and a second text satisfying a positive sample condition according to an embodiment of the present disclosure.
  • any text 420 in the text library 410 can be targeted, based on the Indicator data 430 for a text 420, determining the satisfaction level of any text. Then, based on the degree of satisfaction of the arbitrary text, it is determined whether the arbitrary text is the first text, the second text, or other texts except the first text and the second text. If the arbitrary text 420 is the first text or the second text, then the arbitrary text is read from the text library 410 .
  • the satisfaction degree of the text is less than the first threshold, and if it is less than the first threshold, then it is determined that any text is the first text, that is, the text satisfies the negative sample condition. If the degree of satisfaction of the text is greater than the first threshold and greater than or equal to the second threshold, it may be determined that any text is the second text, that is, the text satisfies the positive sample condition. If the satisfaction degree of the text is between the first threshold and the second threshold, it may be determined that any text is other text. Wherein, the second threshold is greater than the first threshold.
  • the index data for the text may include, for example, the aforementioned number of likes, number of views, etc., for example, the satisfaction degree of the text may be positively correlated with the number of likes and the number of views.
  • the indicator data may include the number of clicks, and the satisfaction of the text is negatively correlated with the number of clicks.
  • the index data for the text may include, for example, the index data of the text publisher, and if the text publisher's index data includes the grade of the publisher's associated account, the satisfaction degree of the text may be positively correlated with the grade, for example.
  • the publisher's index data may include the quality of the text published by the publisher, and the satisfaction level of the text may be positively correlated with the quality, for example.
  • the index data for the text may be multiple data, for example, and the multiple data may be considered comprehensively when determining the satisfaction degree of the text.
  • this embodiment may provide a predetermined degree of satisfaction function 440 .
  • This embodiment can determine the function value 450 of the predetermined satisfaction function 440 based on the index data 430 for any text 420, and use the function value 450 as the satisfaction degree.
  • the predetermined satisfaction function 440 may reflect the relationship between the satisfaction degree described above and each index data (ie, positive correlation or negative correlation), and the present disclosure does not make an expression of the predetermined satisfaction function. limited.
  • the predetermined satisfaction function can be expressed as:
  • S is the value of the predetermined satisfaction function
  • q likes , q dislikes , and q browses are the number of likes, dislikes and views of the text respectively
  • pado is used to indicate whether the text is adopted, and if it is adopted , then the value of p ado is 1, otherwise it is 0.
  • P vip is used to indicate whether the account associated with the publisher of the text is a member account, if it is a member account, the value of p vip is 1, otherwise it is 0.
  • p level is used to indicate the level number of the account associated with the publisher of the text.
  • a, b, c, and d are constants whose values are non-negative numbers, and the values of these constants can be set according to actual needs, which is not limited in this disclosure. It can be understood that the predetermined satisfaction function above is only an example to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto.
  • the function value 450 may also be mapped to a predetermined value range, and the mapped value may be used as the satisfaction degree 460 of any text 420 .
  • the aforementioned method can be used to obtain the satisfaction degree of each text. Therefore, based on the satisfaction degree, the condition (ie, the negative sample condition or the positive sample condition) satisfied by each text is determined, and the recall of the first text and the second text is realized.
  • this embodiment can only recall the first negative sample satisfying the negative sample condition from multiple texts according to the text publisher's index data. text. This is because the index data performance of the text publisher is poor, which can explain to a certain extent that the knowledge level of the text publisher is low, and the reference value of the text published by the text publisher is usually low. In this way, the problem of sparse samples of negative sample text can be solved, and targeted recall of sparse samples can be realized.
  • the index data of the text publisher is the data used to characterize the negative impact of the text publisher
  • the text whose index data of the text publisher is greater than the predetermined index threshold can be selected from multiple texts, and the selected text as the first text.
  • the data used to characterize the negative impact of the text publisher may include, for example, at least one of the following: the proportion of the published text belonging to the collected text or the repetition rate of the published text.
  • collecting text means that the published text is the text directly copied from the text published by others.
  • the repetition rate of published text refers to the proportion of the same text in all published texts. It can be understood that the index data of the text publisher is only used as an example to facilitate the understanding of the present disclosure, which is not limited in the present disclosure.
  • Fig. 5 is a schematic diagram of the principle of determining the first text satisfying the negative sample condition according to another embodiment of the present disclosure.
  • the text that is usually folded and displayed by the questioner is the text that the questioner thinks has no reference value. Then, in this embodiment, when recalling texts satisfying the negative sample condition from multiple texts, the folded and displayed texts may also be recalled based on the display properties of the texts.
  • the aforementioned index data for the text should include the display attribute of the text.
  • this embodiment 500 may, for any text 520 in the text library 510 , determine whether the display attribute 530 of any text 520 is a folded display or an unfolded display. If the display attribute of any text 520 is folded display, then it is determined that any text 520 is the first text.
  • the text whose presentation attribute is folded presentation may be used as the candidate text 540 .
  • the text with higher reference value is eliminated from the candidate text, and the remaining text is used as the first text 560 .
  • other index data may be the above-described text-specific behavior data and/or index data of text publishers.
  • texts whose number of likes is higher than the threshold of likes can be eliminated from the candidate texts.
  • the embodiments of the present disclosure obtain the first text by recalling the folded and displayed text based on the display attribute, which can further increase the proportion of recalled negative sample texts and solve the problem of sparse samples of negative sample texts. Thereby, it is convenient to improve the accuracy and stability of the trained text quality assessment model.
  • two or more of the various recall methods described above may be used to recall the first text and the second text from the Chinese text library, thereby increasing the number of recalled texts.
  • a deduplication operation may be performed on the recalled first text
  • a deduplication operation may be performed on the recalled second text.
  • the present disclosure also provides a method for determining the text quality. The method will be described in detail below with reference to FIG. 6 .
  • Fig. 6 is a schematic flowchart of a method for determining text quality according to an embodiment of the present disclosure.
  • the method 600 for determining text quality in this embodiment may include operation S610 to operation S620.
  • the text to be processed is used as an input of the text quality assessment model to obtain output data of the text quality assessment model.
  • the text quality assessment model may be obtained by training through the aforementioned text quality assessment model training method.
  • the output data of the text quality assessment model may be a classification result directly. If the classification result is a low-quality category, it is determined that the text to be processed is a low-quality text, otherwise it is determined that the text to be processed is a non-low-quality text.
  • the output data of the text quality assessment model may be the probability that the text to be processed is a low-quality text. If the probability is greater than or equal to the probability threshold, it is determined that the category of the text to be processed is a low-quality category, otherwise it is determined that the category of the text to be processed is not a low-quality category.
  • the text to be processed before the text to be processed is input into the text quality assessment model, for example, the text to be processed may be encoded first, and the encoded sentence vector is used as the input of the text quality assessment model.
  • the present disclosure also provides a training device for the text quality assessment model.
  • the device will be described in detail below with reference to FIG. 7 .
  • Fig. 7 is a structural block diagram of a training device for a text quality assessment model according to an embodiment of the present disclosure.
  • the training apparatus 700 of the text quality assessment model in this embodiment may include a text determination module 710 , a tag addition module 720 and a first model training module 730 .
  • the text determining module 710 is configured to determine a first text satisfying a positive sample condition and a second text satisfying a positive sample condition among multiple texts based on the index data for the text. In an embodiment, the text determining module 710 may be used to perform the operation S210 described above, which will not be repeated here.
  • the label adding module 720 is used for any text in the first text and the second text, based on the condition that any text satisfies, adds label to any text, and this label indicates the category of any text, and this category includes negative samples low-quality classes and non-low-quality classes for positive samples.
  • the label adding module 720 may be used to perform the operation S220 described above, which will not be repeated here.
  • the first model training module 730 is used to form a training set from the labeled first text and the labeled second text to train the text quality assessment model.
  • the first model training module 730 may be used to perform the operation S230 described above, which will not be repeated here.
  • the above-mentioned text quality assessment model includes a semantic representation network
  • the training apparatus 700 for the above-mentioned text quality assessment model may further include a network training module and a model obtaining module.
  • the network training module is used to train the semantic representation network based on multiple texts before the first model training module trains the text quality assessment model to obtain a pre-trained semantic representation network.
  • the model acquisition module is used to obtain a text quality assessment model based on the pre-trained semantic representation network.
  • the aforementioned text determination module 710 may include, for example, a satisfaction degree determination submodule, a first text acquisition submodule, and a second text acquisition submodule.
  • the satisfaction determination submodule is used for determining the satisfaction degree of each text in the plurality of texts based on the index data for the texts.
  • the first text obtaining sub-module is used to select texts whose satisfaction degree is less than the first threshold from the plurality of texts to obtain the first text.
  • the second text obtaining submodule is used to select a text whose satisfaction degree is greater than or equal to a second threshold from multiple texts to obtain the second text. Wherein, the first threshold is smaller than the second threshold.
  • the index data for each text includes at least two index data.
  • the satisfaction degree determination sub-module may include a function value determination unit and a satisfaction degree acquisition unit.
  • the function value determination unit is configured to determine the value of a predetermined satisfaction function based on the index data for each text.
  • the satisfaction degree obtaining unit is used for mapping the value of the predetermined satisfaction degree function to a predetermined value range to obtain the degree of satisfaction degree of each text.
  • the index data for a text includes index data of a text publisher.
  • the above-mentioned text determination module 710 may include a third text obtaining sub-module, configured to select a text whose index data of a text publisher is greater than a predetermined index threshold from multiple texts to obtain the first text.
  • the index data of the text publisher includes at least one of the following: the proportion of the text published by the text publisher belonging to the collected text, and the repetition rate of the text published by the text publisher.
  • the index data for the text includes the display attribute of the text.
  • the above-mentioned text determination module 710 may include a fourth text obtaining sub-module, which is used to select a text whose display attribute is folded display from multiple texts to obtain the first text.
  • the text-specific index data further includes text-specific behavior data and text publisher index data.
  • the fourth text obtaining submodule may include a candidate text obtaining unit and a text eliminating unit.
  • the candidate text obtaining unit is used for taking the text selected from the plurality of texts as the candidate text whose presentation attribute is folded presentation.
  • the text removing unit is used for removing the target text from the candidate texts to obtain the first text based on at least one of the text-specific behavior data and the index data of the text publishers.
  • the above-mentioned text quality assessment model training device 700 may further include a second model training module, which is used to use the target text as a training sample, and perform a secondary evaluation on the text quality assessment model trained by the first model training module train.
  • the target text has a human-annotated label indicating the actual category of the text.
  • the present disclosure also provides a device for determining text quality.
  • the device will be described in detail below with reference to FIG. 8 .
  • Fig. 8 is a structural block diagram of an apparatus for determining text quality according to an embodiment of the present disclosure.
  • the apparatus 800 for determining text quality in this embodiment may include an output data obtaining module 810 and a text quality determining module 820 .
  • the output data obtaining module 810 is used to use the text to be processed as the input of the text quality assessment model to obtain the output data of the text quality assessment model.
  • the output data obtaining module 810 may be configured to perform operation S610 described above, which will not be repeated here.
  • the text quality determination module 820 is used to determine the category of the text to be processed based on the output data. In an embodiment, the text quality determination module 820 may be used to perform the operation S620 described above, which will not be repeated here.
  • the user's authorization or consent is obtained.
  • the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
  • FIG. 9 shows a schematic block diagram of an example electronic device 900 that can be used to implement a method for training a text quality assessment model and/or a method for determining text quality according to an embodiment of the present disclosure.
  • Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the device 900 includes a computing unit 901 that can execute according to a computer program stored in a read-only memory (ROM) 902 or loaded from a storage unit 908 into a random-access memory (RAM) 903. Various appropriate actions and treatments. In the RAM 903, various programs and data necessary for the operation of the device 900 can also be stored.
  • the computing unit 901, ROM 902, and RAM 903 are connected to each other through a bus 904.
  • An input/output (I/O) interface 905 is also connected to the bus 904 .
  • the I/O interface 905 includes: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc. ; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, and the like.
  • the communication unit 909 allows the device 900 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
  • the computing unit 901 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 901 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the computing unit 901 executes various methods and processes described above, such as a method for training a text quality assessment model and/or a method for determining text quality.
  • a method of training a text quality assessment model and/or a method of determining text quality may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 908 .
  • part or all of the computer program may be loaded and/or installed on the device 900 via the ROM 902 and/or the communication unit 909.
  • the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method for training the text quality assessment model and/or the method for determining the quality of the text described above can be performed.
  • the calculation unit 901 may be configured in any other appropriate way (for example, by means of firmware) to execute a method for training a text quality assessment model and/or a method for determining text quality.
  • Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system of systems
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or combinations thereof.
  • programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
  • Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or a trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
  • the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
  • a computer system may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the problem of traditional physical host and VPS service ("Virtual Private Server", or "VPS" for short). ′′), there are defects such as high management difficulty and weak business scalability.
  • the server can also be a server of a distributed system, or a server combined with a blockchain.
  • steps may be reordered, added or deleted using the various forms of flow shown above.
  • each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种文本质量评估模型的训练方法和确定文本质量的方法、装置、设备和存储介质。文本质量评估模型的训练方法包括:基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本;针对第一文本和第二文本中的任一文本,基于任一文本满足的条件向任一文本添加标签,标签指示了任一文本的类别,类别包括针对负样本的低质量类别和针对正样本的非低质量类别;以及将添加了标签的第一文本和添加了标签的第二文本构成训练集,对文本质量评估模型进行训练。

Description

文本质量评估模型的训练方法和确定文本质量的方法
本申请要求于2021年07月12日递交的中国专利申请No.202110787492.3的优先权,其内容一并在此作为参考。
技术领域
本公开涉及人工智能技术领域,具体涉及自然语言处理领域、深度学习领域和智能推荐领域,更具体地涉及一种文本质量评估模型的训练方法和确定文本质量的方法、装置、电子设备和存储介质。
背景技术
随着计算机技术和网络技术的发展,文本作为信息的传播载体得到充分发展。为了向用户提供高效的文本搜索和文本推荐等服务,通常需要对文本的质量进行评估,以向用户提供高质量文本。
相关技术中,通常使用人工标注样本对分类模型进行训练,随后使用分类模型对文本质量进行预测,以从文本库中筛选出高质量文本推荐给用户。
发明内容
本公开提供了一种降低模型训练成本和提高模型精度的文本质量评估模型的训练方法和确定文本质量的方法、装置、电子设备和存储介质。
根据本公开的一个方面,提供了一种文本质量评估模型的训练方法,包括:基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本;针对第一文本和第二文本中的任一文本,基于任一文本满足的条件向任一文本添加标签,标签指示了任一文本的类别,该类别包括针对负样本的低质量类别和针对正样本的非低质量类别;将添加了标签的第一文本和添加了标签的第二文本构成训练集,对文本质量评估模型进行训练。
根据本公开的另一方面,提供了一种确定文本质量的方法,包括:以待处理文本作为文本质量评估模型的输入,得到文本质量评估模型的输出 数据;基于输出数据,确定待处理文本的类别,其中,文本质量评估模型是采用前述的文本质量评估模型的训练方法训练得到的。
根据本公开的另一方面,提供了一种文本质量评估模型的训练装置,包括:文本确定模块,用于基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本;标签添加模块,用于针对第一文本和第二文本中的任一文本,基于任一文本满足的条件向任一文本添加标签,该标签指示了任一文本的类别,该类别包括针对负样本的低质量类别和针对正样本的非低质量类别;以及第一模型训练模块,用于将添加了标签的第一文本和添加了标签的第二文本构成训练集,对所文本质量评估模型进行训练。
根据本公开的另一方面,提供了一种确定文本质量的装置,包括:输出数据获得模块,用于以待处理文本作为文本质量评估模型的输入,得到文本质量评估模型的输出数据;以及文本质量确定模块,用于基于输出数据,确定待处理文本的类别,其中,文本质量评估模型是采用前述的文本质量评估模型的训练装置训练得到的。
根据本公开的另一个方面,提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行本公开提供的文本质量评估模型的训练方法和/或确定文本质量的方法。
根据本公开的另一个方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行本公开提供的文本质量评估模型的训练方法和/或确定文本质量的方法。
根据本公开的另一个方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现本公开提供的文本质量评估模型的训练方法和/或确定文本质量的方法。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图说明
附图用于更好地理解本方案,不构成对本公开的限定。其中:
图1是根据本公开实施例的文本质量评估模型的训练方法和/或确定文本质量的方法的应用场景示意图;
图2是根据本公开实施例的文本质量评估模型的训练方法的流程示意图;
图3是根据本公开实施例的文本质量评估模型的训练方法的原理示意图;
图4是根据本公开实施例的确定满足负样本条件的第一文本和满足正样本条件的第二文本的原理示意图;
图5是根据本公开实施例的另一实施例的确定满足负样本条件的第一文本的原理示意图;
图6是根据本公开实施例的确定文本质量的方法的流程示意图;
图7是根据本公开实施例的文本质量评估模型的训练装置的结构框图;
图8是根据本公开实施例的确定文本质量的装置的结构框图;以及
图9是用来实施本公开实施例的文本质量评估模型的训练方法和/或确定文本质量的方法的电子设备的框图。
具体实施方式
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
本公开提供了一种文本那质量评估模型的训练方法,该方法包括文本确定阶段、标签添加阶段和模型训练阶段。在文本确定阶段中,基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本。在标签添加阶段中,针对第一文本和第二文本中的任一文本,基于该任一文本满足的条件向该任一文本添加标签,该标签指示了任一文本的类别,该类别包括针对负样本的低质量类别和针对正样本的 非低质量类别。在模型训练阶段中,将添加了标签的第一文本和添加了标签的第二文本构成训练集,对文本质量评估模型进行训练。
以下将结合图1对本公开提供的方法和装置的应用场景进行描述。
图1是根据本公开实施例的文本质量评估模型的训练方法和/或确定文本质量的方法的应用场景示意图。
如图1所示,该实施例的场景100包括第一服务器110和第一数据库120,第一服务器110例如可以通过网络访问第一数据库120。网络可以包括有线或无线通信链路。
该第一数据库120例如可以为文本库,该文本库中维护有多个未进行质量评估的文本。该多个文本例如可以为用户针对问题提供的答案文本、或者可以为用户上传的任意类型的文本,本公开对此不做限定。
在一实施例中,第一服务器110可以基于召回规则从第一数据库120中召回满足条件的文本,得到召回的文本130。例如可以根据文本的浏览量、点赞量、点踩量等指标数据来设定召回条件。以从第一数据库120中召回正样本和负样本。并基于与召回的文本130对应的召回条件向召回的文本130添加标签,得到具有标签的文本140。例如,为召回的负样本添加指示低质量类别的标签,为召回的正样本添加指示非低质量类别的标签。
在一实施例中,如图1所示,该应用场景100还可以包括第二服务器150,该第二服务器150例如可以接收第一服务器110生成的具有标签的文本,并将该文本作为训练样本,对文本质量评估模型160进行训练。如此,可以基于训练好的文本质量评估模型160来对未进行质量评估的文本进行质量评估。该第二服务器150例如也可以通过网络访问第一数据库120,以从第一数据库120中获取未进行质量评估的文本。该第二服务器150还可以将完成质量评估的文本写入第二数据库170。
在一实施例中,如图1所示,该应用场景100还可以包括终端设备180,该终端设备180可以为具有人机交互功能的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便捷计算机和台式计算机等。该终端设备180例如可以通过网络与第二服务器150交互。例如,终端设备180可以将用户经由该终端设备180上传的文本190发送给第二服务器150,以由第二服务器150采用文本质量评估模型160对该上传的文本190进行质量评估。 该第二服务器150还可以在完成质量评估后,将该上传的文本协同质量评估结果写入第二数据库170中。
在一实施例中,该应用场景可以为问答理解技术场景。其中,问答理解技术是指通过对问题文本的语意理解,匹配到合适的答案或者判断答案是否满足问题的要求。随着互联网的飞速发展,网络每天都会产生海量的信息。为了获取该海量的信息,越来越多的搜索引擎得到发展和使用。各搜索引擎通过该语义理解技术,从各自收录的信息库中,检索出与用户需求相关的信息反馈给用户。通过图1的应用场景,可以经由该文本质量评估模型160对针对各问题的答案文本进行质量评估。如此,便于各搜索引擎根据用户提供的问题文本,召回高质量的答案反馈给用户,以此提高用户体验。
在一实施例中,第一服务器110和第二服务器150例如可以为同一服务器。第一数据库120和第二数据库170例如可以为同一数据库的两个存储分区。例如,第一服务器110例如还可以根据得到的具有标签的文本对文本质量评估模型进行训练。
需要说明的是,本公开实施例所提供的文本质量评估模型的训练方法和/或确定文本质量的方法一般可以由第二服务器150执行,或者可以一部分由第一服务器110执行,另一部分由第二服务器150执行。相应地,本公开实施例所提供的文本质量评估模型的训练装置和/或确定文本质量的装置可以设置于第二服务器150中,或者可以一部分设置于第一服务器110中,另一部分设置于第二服务器150中。
应该理解,图1中的第一服务器、第二服务器、第一数据库、第二数据库和终端设备的数目和类型仅仅是示意性的。根据实现需要,可以具有任意数据和类型的第一服务器、第二服务器、第一数据库、第二数据库和终端设备。
以下将结合图1,通过以下图2~图5对本公开提供的文本质量评估模型的训练方法进行详细描述。
如图2所示,该实施例的文本质量评估模型的训练方法200可以包括操作S210~操作S230。
在操作S210,基于针对文本的指标数据,确定多个文本中满足负样 本条件的第一文本和满足正样本条件的第二文本。
其中,例如可以通过对围绕一个文本产生的交互行为进行统计,得到与该文本相关的多个指标数据。针对文本的指标数据例如可以表征文本被除发布者外的其他用户浏览或操作的情况,例如,指标数据可以包括文本的浏览量、点赞量、点踩量、文本被采纳的情况等。在一实施例中,该针对文本的指标数据例如可以表征文本的发布者的指标数据。该发布者的指标数据例如可以包括发布者关联账户的等级、关联账户是否为会员账户、发布者发布文本的数量、发布者发布文本的质量等。或者,该针对文本的指标数据例如可以包括文本的展示属性,例如相对于多个文本的展示位置、文本的展示完整性、文本是否被折叠展示等。本公开对该针对文本的指标数据不做限定,只要该针对文本的指标数据能够在一定程度上反映文本的质量即可。
根据本公开的实施例,多个文本例如可以为文本库中维护的全量文本。负样本条件和正样本条件为根据针对文本的指标数据所设定的条件。例如,负样本条件可以为点踩量大于等于点踩量阈值,正样本条件可以为点赞量大于等于点赞量阈值等。为了提高召回的满足正样本条件的第二文本的准确性,该正样本条件的界限对文本质量的要求可以高于负样本条件的界限对文本质量的要求。该负样本条件和正样本条件可以根据实际需求进行设定,本公开对此不做限定。
在操作S220,针对第一文本和第二文本中的任一文本,基于该任一文本满足的条件向该任一文本添加标签。
根据本公开的实施例,该标签例如可以指示任一文本的类别。例如,若该任一文本为满足负样本条件的第一文本,则为该任一文本添加指示低质量类别的标签。若该任一文本为满足正样本条件的第二文本,则为该任一文本添加指示非低质量类别的标签。例如,指示低质量类别的标签可以由1表示,指示非低质量类别的标签可以由0表示。
在操作S230,将添加了标签的第一文本和添加了标签的第二文本构成训练集,对文本质量评估模型进行训练。
根据本公开的实施例,可以将训练集中的任一文本作为文本质量评估模型的输入,基于该文本质量评估模型的输出数据得到文本是否为低质量 类别的评估结果。可以将该评估结果与任一文本的标签指示的类别进行比对,并根据比对结果采用梯度下降算法或反向传播算法来对文本质量评估模型进行训练。
其中,文本质量评估模型例如可以为分类模型,以用于确定文本质量的类别是否为低质量类别。该分类模型例如可以包括fastText模型、textCNN模型、RCNN模型、Bi-LSTM模型等。该分类模型中包括有语义特征提取层和全连接层,语义特征提取层用于提取语义特征,全连接层用于将语义特征映射至类别维度的空间,并输出分类预测结果。
综上分析,本公开实施例在对文本质量评估模型进行训练时,采用基于指标数据从文本库中召回满足条件的文本,并基于文本满足的条件向文本添加标签的方式,可以实现样本集的自动生成。在某一类别的样本数据稀疏的情况下,通过该召回满足条件的文本生成训练集,可以均衡各类别样本数据的比例,并因此便于使得文本质量评估模型在训练过程中可以充分学习到文本特征与各质量评估结果的关联关系,便于提高训练得到的文本质量评估模型的准确性和稳定性。再者,基于该实施例的训练方法,可以实现对模型的冷启动训练。
图3是根据本公开实施例的文本质量评估模型的训练方法的原理示意图。
根据本公开的实施例,文本质量评估模型例如可以包括语义表示网络,以使得提取的文本特征更为准确的表达文本的语义。在一实施例中,该语义表示网络例如可以采用预训练模型。该预训练模型可以包括嵌入形式语言模型(Embeddings form Language Models,ELMo)或者基于transformer的双向编码表示模型(Bidirectional Encoder Representation from Transformers,BERT)等。该实施例中,可以预先对该语义表示网络进行预训练,并采用预训练好的语义表示网络来构建文本质量评估模型。
如图3所示,该实施例的对文本质量评估模型进行训练的方法300可以先基于文本库310中的多个文本,对该语义表示网络320进行训练,得到预训练的语义表示网络330。随后基于该预训练的语义表示网络330,通过在该预训练的语义表示网络330的输出方向拼接全连接层340等网络结构,获得文本质量评估模型350。
根据本公开的实施例,以语义表示网络320为BERT模型为例,对该语义表示网络320进行训练时,可以构建两个预训练任务,分别是掩码语言模型(Masked Language Model,MLM)任务和下一语句预测(Next Sentence Prediction,NSP)任务。其中,在完成MLM任务时,可以以预定概率(例如15%)用mask token([MASK])随机地对每一个训练序列中的token进行替换,然后预测出[MASK]位置的单词。根据该预测的单词与[MASK]位置处的实际词之间的差异,对该BERT模型进行训练。在完成NSP任务时,例如可以从文本库中随机挑选出两个语句文本(语句文本A和语句文本B),组成一个训练样例。50%的情况下语句文本B是语句文本A的下一句(标注为IsNext),剩下50%的情况下句子B是文本库中的随机语句文本(标注为NotNext)。随后将该训练样例输入到BERT模型中,进行二分类的预测,并根据预测结果与标签之间的差异来对BERT模型进行训练。
如图3所示,在获得文本质量评估模型350后,可采用前文描述的方法从文本库310中召回第一文本360和第二文本370,并通过对该第一文本360和第二文本370分别添加标签后,得到训练集380。随后基于该训练集380对文本质量评估模型350进行训练。可以理解的是,该从文本库310中召回第一文本360和第二文本370的操作例如可以与前述对语义表示网络进行训练的操作同时执行,或者可以基于任意的顺序来执行该两部分操作,本公开对此不做限定。
该实施例通过基于全量文本对语义表示网络进行预训练,并基于预训练得到的语义表示网络来构建文本质量评估模型,可以提高得到的文本质量评估模型的语义表达能力。这是由于语义表示网络用于提取语义特征,不受稀疏样本的影响。并因此,可以在一定程度上提高训练得到的文本质量评估模型的准确性和稳定性。
根据本公开的实施例,前述采用召回方法获得的训练集来对文本质量评估模型进行训练的方法实质上为弱监督学习方法。在使用训练集完成对文本质量评估模型的训练之后,该实施例还可以采用具有人工标注标签的训练文本,来使得文本质量评估模型进行强监督学习。具体可以以具有指示文本实际类别的人工标注标签的目标文本作为训练样本,对采用训练集 训练得到的文本质量评估模型进行二次训练。该二次训练过程与前文描述的基于训练集训练的过程类似。通过该方式,可以进一步提高训练得到的文本质量评估模型的准确性和稳定性。其中,文本的实际类别可以包括低质量类别和非低质量类别。
图4是根据本公开实施例的确定满足负样本条件的第一文本和满足正样本条件的第二文本的原理示意图。
根据本公开的实施例,如图4所示,该实施例400在从文本库410中召回第一文本和第二文本时,例如可以针对该文本库410中的任一文本420,基于该任一文本420的指标数据430,确定该任一文本的满意度。随后基于该任一文本的满足度,确定该任一文本为第一文本、第二文本、还是除第一文本和第二文本外的其他文本。若该任一文本420为第一文本或第二文本,则从文本库410中读取该任一文本。
根据本公开的实施例,可以确定该文本的满意度是否小于第一阈值,若小于第一阈值,则确定该任一文本为第一文本,即该文本为满足负样本条件的文本。若该文本的满意度大于该第一阈值,且大于等于第二阈值,则可以确定该任一文本为第二文本,即该文本为满足正样本条件的文本。若该文本的满意度介于第一阈值和第二阈值之间,则可以确定该任一文本为其他文本。其中,第二阈值大于第一阈值。通过设定该第一阈值,及大于该第一阈值的第二阈值来确定文本是否为需要召回的文本,可以提高召回得到的第一文本和第二文本的准确性。
根据本公开的实施例,针对文本的指标数据例如可以包括前述的点赞数、浏览数等,该文本的满意度例如可以与该点赞数正相关,与该浏览数正相关。或者,该指标数据可以包括点踩数,文本的满意度与该点踩数负相关。或者,针对文本的指标数据例如可以包括文本发布者的指标数据,若该文本发布者的指标数据包括发布者关联账户的等级,则文本的满意度例如可以与等级正相关。或者,发布者的指标数据可以包括发布者发布文本的质量,文本的满意度例如可以与该质量正相关等。
在一实施例中,针对文本的指标数据例如可以为多个数据,在确定文本的满意度时,可以综合考虑该多个数据。为了便于确定该文本的满意度,如图4所示,该实施例可以提供有预定满意度函数440。该实施例可以基 于针对任一文本420的指标数据430,来确定该预定满意度函数440的函数取值450,并将该函数取值450作为满意度。可以理解的是,该预定满意度函数440可以体现出前文描述的满意度与各指标数据之间的关系(即正相关关系或负相关关系),本公开对该预定满意度函数的表达式不作限定。
例如,该预定满意度函数可以表示为:
Figure PCTCN2022082273-appb-000001
其中,S为预定满意度函数的取值,q 点赞、q 点踩、q 浏览分别为文本的点赞数、点踩数和浏览数,p ado用于表示文本是否被采纳,若被采纳,则p ado的取值为1,否则为0。P vip用于表示文本的发布者关联的账户是否为会员账户,若为会员账户,则p vip的取值为1,否则为0。p level用于表示文本的发布者关联的账户的等级数。a、b、c、d为取值为非负数的常量,该些常量的取值可以根据实际需求进行设定,本公开对此不做限定。可以理解的是,上述预定满意度函数仅作为示例以利于理解本公开,本公开对此不做限定。
根据本公开的实施例,为了便于统计,还可以将函数取值450映射至预定取值范围内,将映射得到的值作为任一文本420的满意度460。针对文本库410中的每个文本,均可以采用前述方法得到每个文本的满意度。从而基于该满意度确定该每个文本满足的条件(即负样本条件或正样本条件),实现对第一文本和第二文本的召回。
根据本公开的实施例,在针对文本的指标数据包括文本发布者的指标数据的情况下,该实施例可以仅根据该文本发布者的指标数据从多个文本中召回满足负样本条件的第一文本。这是由于文本发布者的指标数据表现差,则可以在一定程度上说明该文本发布者的知识水平较低,则该文本发布者发布的文本的参考价值通常较低。通过该方式,可以解决负样本文本的样本稀疏的问题,实现对稀疏样本的针对性召回。
例如,若该文本发布者的指标数据为用于表征文本发布者的负面影响的数据时,可以从多个文本中选择文本发布者的指标数据大于预定指标阈值的文本,将该选择得到的文本作为第一文本。其中,用于表征文本发布者的负面影响的数据例如可以包括以下至少之一:发布的文本属于采集文 本的比例或发布文本的重复率等。其中,采集文本是指发布的文本为从他人发布的文本中直接复制的文本。发布文本的重复率是指发布的文本中相同文本占所有文本的比例。可以理解的是,该文本发布者的指标数据仅作为示例以利于理解本公开,本公开对此不做限定。
图5是根据本公开实施例的另一实施例的确定满足负样本条件的第一文本的原理示意图。
根据本公开的实施例,考虑到在文本展示时,通常被提问者折叠展示的文本为提问者认为没有参考价值的文本。则该实施例在从多个文本中召回满足负样本条件的文本时,还可以基于文本的展示属性来召回折叠展示的文本。相应地,前述针对文本的指标数据应包括文本的展示属性。
例如,如图5所示,该实施例500可以针对文本库510中的任一文本520,确定该任一文本520的展示属性530为折叠展示还是非折叠展示。若该任一文本520的展示属性为折叠展示,则确定该任一文本520为第一文本。
在一实施例中,如图5所示,可以将展示属性为折叠展示的文本作为候选文本540。并基于针对该候选文本的指标数据中的其他指标数据550,从该候选文本中剔除参考价值较高的文本,将剩余的文本作为第一文本560。通过该方式,可以避免因提问者主观影响导致的对负样本文本的误中情况。其中,其他的指标数据可以为前文描述的针对文本的行为数据和/或文本发布者的指标数据。该实施例可以从候选文本中剔除点赞数高于点赞数阈值的文本。或者可以统计候选文本中某个文本的发布者发布的文本中,被折叠文本的比例。若该被折叠文本的比例小于折叠比例阈值,则从候选文本中剔除该某个文本。可以理解的是,前述剔除规则仅作为示例利于理解本公开,本公开对此不做限定。
本公开实施例通过基于展示属性来召回折叠展示的文本,从而获得第一文本,可以进一步提高召回的负样本文本的比例,解决负样本文本的样本稀疏的问题。从而便于提高训练得到的文本质量评估模型的准确性和稳定性。
根据本公开的实施例,可以采用前文描述的多种召回方法中的两种或多种方法来中文本库中召回第一文本和第二文本,以此提高召回文本的数 量。在采用至少两种方法召回第一文本和第二文本时,例如还可以对召回的第一文本进行去重操作,并对召回的第二文本进行去重操作。
基于前述的文本质量评估模型的训练方法,本公开还提供了一种确定文本质量的方法。以下将结合图6对该方法进行详细描述。
图6是根据本公开实施例的确定文本质量的方法的流程示意图。
如图6所示,该实施例的确定文本质量的方法600可以包括操作S610~操作S620。
在操作S610,以待处理文本作为文本质量评估模型的输入,得到文本质量评估模型的输出数据。
在操作S620,基于输出数据,确定待处理文本的类别。
其中,文本质量评估模型可以是通过前述文本质量评估模型的训练方法训练得到的。文本质量评估模型的输出数据可以直接为分类结果,若该分类结果为低质量类别,则确定待处理文本为低质量文本,否则确定待处理文本为非低质量文本。或者,该文本质量评估模型的输出数据可以为待处理文本为低质量文本的概率。若该概率大于等于概率阈值,则确定该待处理文本的类别为低质量类别,否则确定该待处理文本的类别为非低质量类别。
根据本公开的实施例,在将待处理文本输入文本质量评估模型之前,例如可以先对该待处理文本进行编码,将编码得到的句向量作为该文本质量评估模型的输入。
基于前述文本质量评估模型的训练方法,本公开还提供了一种文本质量评估模型的训练装置。以下将结合图7,对该装置进行详细描述。
图7是根据本公开实施例的文本质量评估模型的训练装置的结构框图。
如图7所示,该实施例的文本质量评估模型的训练装置700可以包括文本确定模块710、标签添加模块720和第一模型训练模块730。
文本确定模块710用于基于针对文本的指标数据,确定多个文本中满足正样本条件的第一文本和满足正样本条件的第二文本。在一实施例中,文本确定模块710可以用于执行前文描述的操作S210,在此不再赘述。
标签添加模块720用于针对第一文本和第二文本中的任一文本,基于任一文本满足的条件向任一文本添加标签,该标签指示了任一文本的类别, 该类别包括针对负样本的低质量类别和针对正样本的非低质量类别。在一实施例中,标签添加模块720可以用于执行前文描述的操作S220,在此不再赘述。
第一模型训练模块730用于将添加了标签的第一文本和添加了标签的第二文本构成训练集,对文本质量评估模型进行训练。在一实施例中,第一模型训练模块730可以用于执行前文描述的操作S230,在此不再赘述。
根据本公开的实施例,上述文本质量评估模型包括语义表示网络,上述文本质量评估模型的训练装置700还可以包括网络训练模块和模型获得模块。网络训练模块用于在第一模型训练模块对文本质量评估模型进行训练之前,基于多个文本对所述语义表示网络进行训练,得到预训练的语义表示网络。模型获得模块用于基于预训练的语义表示网络,获得文本质量评估模型。
根据本公开的实施例,上述文本确定模块710例如可以包括满意度确定子模块、第一文本获得子模块和第二文本获得子模块。满意度确定子模块用于基于针对文本的指标数据,确定多个文本中每个文本的满意度。第一文本获得子模块用于从多个文本中选择满意度小于第一阈值的文本,得到第一文本。第二文本获得子模块用于从多个文本中选择满意度大于等于第二阈值的文本,得到第二文本。其中,第一阈值小于第二阈值。
根据本公开的实施例,针对每个文本的指标数据包括至少两个指标数据。上述满意度确定子模块可以包括函数取值确定单元和满意度获得单元。函数取值确定单元用于基于针对每个文本的指标数据,确定预定满意度函数的取值。满意度获得单元用于将预定满意度函数的取值映射至预定取值范围内,得到每个文本的满意度。
根据本公开的实施例,针对文本的指标数据包括文本发布者的指标数据。上述文本确定模块710可以包括第三文本获得子模块,用于从多个文本中选择文本发布者的指标数据大于预定指标阈值的文本,得到第一文本。其中,文本发布者的指标数据包括以下至少之一:文本发布者发布的文本属于采集文本的比例、文本发布者发布文本的重复率。
根据本公开的实施例,针对文本的指标数据包括文本的展示属性。上述文本确定模块710可以包括第四文本获得子模块,用于从多个文本中选 择展示属性为折叠展示的文本,获得第一文本。
根据本公开的实施例,针对文本的指标数据还包括针对文本的行为数据和文本发布者的指标数据。第四文本获得子模块可以包括候选文本获得单元和文本剔除单元。候选文本获得单元用于将从多个文本中选择的展示属性为折叠展示的文本作为候选文本。文本剔除单元用于基于针对文本的行为数据和文本发布者的指标数据中的至少之一,从候选文本中剔除目标文本,得到第一文本。
根据本公开的实施例,上述文本质量评估模型的训练装置700还可以包括第二模型训练模块,用于以目标文本作为训练样本,对第一模型训练模块训练得到的文本质量评估模型进行二次训练。其中,目标文本具有指示文本实际类别的人工标注标签。
基于前文描述的确定文本质量的方法,本公开还提供了一种确定文本质量的装置。以下将结合图8对该装置进行详细描述。
图8是根据本公开实施例的确定文本质量的装置的结构框图。
如图8所示,该实施例的确定文本质量的装置800可以包括输出数据获得模块810和文本质量确定模块820。
输出数据获得模块810用于以待处理文本作为文本质量评估模型的输入,得到文本质量评估模型的输出数据。在一实施例中,输出数据获得模块810可以用于执行前文描述的操作S610,在此不再赘述。
文本质量确定模块820用于基于输出数据,确定待处理文本的类别。在一实施例中,文本质量确定模块820可以用于执行前文描述的操作S620,在此不再赘述。
需要说明的是,本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。
在本公开的技术方案中,在获取或采集用户个人信息之前,均获取了用户的授权或同意。
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。
图9示出了可以用来实施本公开实施例的文本质量评估模型的训练方 法和/或确定文本质量的方法的示例电子设备900的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图9所示,设备900包括计算单元901,其可以根据存储在只读存储器(ROM)902中的计算机程序或者从存储单元908加载到随机访问存储器(RAM)903中的计算机程序,来执行各种适当的动作和处理。在RAM 903中,还可存储设备900操作所需的各种程序和数据。计算单元901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
计算单元901可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元901的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元901执行上文所描述的各个方法和处理,例如文本质量评估模型的训练方法和/或确定文本质量的方法。例如,在一些实施例中,文本质量评估模型的训练方法和/或确定文本质量的方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由ROM 902和/或通信单元909而被载入和/或安装到设备900上。当计算机程序加载到RAM 903并由计算单元901执行时,可以执行上文描述的文本质量评估模型的训练方法和/或确定文本质量的方法的一个或多个步骤。 备选地,在其他实施例中,计算单元901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行文本质量评估模型的训练方法和/或确定文本质量的方法。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术, 该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。其中,服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务(″Virtual Private Server″,或简称″VPS″)中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。

Claims (21)

  1. 一种文本质量评估模型的训练方法,包括:
    基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本;
    针对所述第一文本和所述第二文本中的任一文本,基于所述任一文本满足的条件向所述任一文本添加标签,所述标签指示了所述任一文本的类别,所述类别包括针对负样本的低质量类别和针对正样本的非低质量类别;以及
    将添加了所述标签的第一文本和添加了所述标签的第二文本构成训练集,对所述文本质量评估模型进行训练。
  2. 根据权利要求1所述的方法,其中,所述文本质量评估模型包括语义表示网络;所述方法还包括在对所述文本质量评估模型进行训练之前:
    基于所述多个文本对所述语义表示网络进行训练,得到预训练的语义表示网络;以及
    基于所述预训练的语义表示网络,获得所述文本质量评估模型。
  3. 根据权利要求1所述的方法,其中,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本包括:
    基于所述针对文本的指标数据,确定所述多个文本中每个文本的满意度;
    从所述多个文本中选择满意度小于第一阈值的文本,得到所述第一文本;以及
    从所述多个文本中选择满意度大于等于第二阈值的文本,得到所述第二文本,
    其中,所述第一阈值小于所述第二阈值。
  4. 根据权利要求3所述的方法,其中,针对所述每个文本的指标数据包括至少两个指标数据;确定所述多个文本中每个文本的满意度包括:
    基于针对所述每个文本的指标数据,确定预定满意度函数的取值;以及
    将所述预定满意度函数的取值映射至预定取值范围内,得到所述每个 文本的满意度。
  5. 根据权利要求1~4中任一项所述的方法,其中,针对文本的指标数据包括文本发布者的指标数据;确定多个文本中满足负样本条件的第一文本包括:
    从所述多个文本中选择文本发布者的指标数据大于预定指标阈值的文本,得到所述第一文本,
    其中,所述文本发布者的指标数据包括以下至少之一:文本发布者发布的文本属于采集文本的比例、文本发布者发布文本的重复率。
  6. 根据权利要求1~4中任一项所述的方法,其中,所述针对文本的指标数据包括文本的展示属性;确定多个文本中满足预定负样本条件的第一文本包括:
    从所述多个文本中选择展示属性为折叠展示的文本,获得所述第一文本。
  7. 根据权利要求6所述的方法,其中,所述针对文本的指标数据还包括针对文本的行为数据和文本发布者的指标数据;所述从所述多个文本中选择展示属性为折叠展示的文本,获得所述第一文本包括:
    将从所述多个文本中选择的展示属性为折叠展示的文本作为候选文本;以及
    基于所述针对文本的行为数据和所述文本发布者的指标数据中的至少之一,从所述候选文本中剔除目标文本,得到所述第一文本。
  8. 根据权利要求1所述的方法,还包括在对所述文本质量评估模型进行训练之后:
    以目标文本作为训练样本,对训练得到的文本质量评估模型进行二次训练,
    其中,所述目标文本具有指示文本的实际类别的人工标注标签。
  9. 一种确定文本质量的方法,包括:
    以待处理文本作为文本质量评估模型的输入,得到所述文本质量评估模型的输出数据;以及
    基于所述输出数据,确定所述待处理文本的的类别,
    其中,所述文本质量评估模型是采用权利要求1~8中任一项所述的方 法训练得到的。
  10. 一种文本质量评估模型的训练装置,包括:
    文本确定模块,用于基于针对文本的指标数据,确定多个文本中满足负样本条件的第一文本和满足正样本条件的第二文本;
    标签添加模块,用于针对所述第一文本和所述第二文本中的任一文本,基于所述任一文本满足的条件向所述任一文本添加标签,所述标签指示了所述任一文本的类别,所述类别包括针对负样本的低质量类别和针对正样本的非低质量类别;以及
    第一模型训练模块,用于将添加了所述标签的第一文本和添加了所述标签的第二文本构成训练集,对所述文本质量评估模型进行训练。
  11. 根据权利要求10所述的装置,其中,所述文本质量评估模型包括语义表示网络;所述装置还包括:
    网络训练模块,用于在所述第一模型训练模块对所述文本质量评估模型进行训练之前,基于所述多个文本对所述语义表示网络进行训练,得到预训练的语义表示网络;以及
    模型获得模块,用于基于所述预训练的语义表示网络,获得所述文本质量评估模型。
  12. 根据权利要求10所述的装置,其中,所述文本确定模块包括:
    满意度确定子模块,用于基于所述针对文本的指标数据,确定所述多个文本中每个文本的满意度;
    第一文本获得子模块,用于从所述多个文本中选择满意度小于第一阈值的文本,得到所述第一文本;以及
    第二文本获得子模块,用于从所述多个文本中选择满意度大于等于第二阈值的文本,得到所述第二文本,
    其中,所述第一阈值小于所述第二阈值。
  13. 根据权利要求12所述的装置,其中,针对所述每个文本的指标数据包括至少两个指标数据;所述满意度确定子模块包括:
    函数取值确定单元,用于基于针对所述每个文本的指标数据,确定预定满意度函数的取值;以及
    满意度获得单元,用于将所述预定满意度函数的取值映射至预定取值 范围内,得到所述每个文本的满意度。
  14. 根据权利要求10~13中任一项所述的装置,其中,针对文本的指标数据包括文本发布者的指标数据;所述文本确定模块包括:
    第三文本获得子模块,用于从所述多个文本中选择文本发布者的指标数据大于预定指标阈值的文本,得到所述第一文本,
    其中,所述文本发布者的指标数据包括以下至少之一:文本发布者发布的文本属于采集文本的比例、文本发布者发布文本的重复率。
  15. 根据权利要求10~13中任一项所述的装置,其中,所述针对文本的指标数据包括文本的展示属性;所述文本确定模块包括:
    第四文本获得子模块,用于从所述多个文本中选择展示属性为折叠展示的文本,获得所述第一文本。
  16. 根据权利要求15所述的装置,其中,所述针对文本的指标数据还包括针对文本的行为数据和文本发布者的指标数据;所述第四文本获得子模块包括:
    候选文本获得单元,用于将从所述多个文本中选择的展示属性为折叠展示的文本作为候选文本;以及
    文本剔除单元,用于基于所述针对文本的行为数据和所述文本发布者的指标数据中的至少之一,从所述候选文本中剔除目标文本,得到所述第一文本。
  17. 根据权利要求10所述的装置,还包括:
    第二模型训练模块,用于以目标文本作为训练样本,对第一模型训练模块训练得到的文本质量评估模型进行二次训练,
    其中,所述目标文本具有指示文本的实际类别的人工标注标签。
  18. 一种确定文本质量的装置,包括:
    输出数据获得模块,用于以待处理文本作为文本质量评估模型的输入,得到所述文本质量评估模型的输出数据;以及
    文本质量确定模块,用于基于所述输出数据,确定所述待处理文本的类别,
    其中,所述文本质量评估模型是采用权利要求10~17中任一项所述的装置训练得到的。
  19. 一种电子设备,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1~9中任一项所述的方法。
  20. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1~9中任一项所述的方法。
  21. 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1~9中任一项所述的方法。
PCT/CN2022/082273 2021-07-12 2022-03-22 文本质量评估模型的训练方法和确定文本质量的方法 WO2023284327A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022560062A JP2023536773A (ja) 2021-07-12 2022-03-22 テキスト品質評価モデルのトレーニング方法及びテキスト品質の決定方法、装置、電子機器、記憶媒体およびコンピュータプログラム
EP22773587.5A EP4148594A4 (en) 2021-07-12 2022-03-22 METHOD FOR TRAINING A TEXT QUALITY ASSESSMENT MODEL AND METHOD FOR DETERMINING TEXT QUALITY

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110787492.3A CN113392218A (zh) 2021-07-12 2021-07-12 文本质量评估模型的训练方法和确定文本质量的方法
CN202110787492.3 2021-07-12

Publications (1)

Publication Number Publication Date
WO2023284327A1 true WO2023284327A1 (zh) 2023-01-19

Family

ID=77625888

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082273 WO2023284327A1 (zh) 2021-07-12 2022-03-22 文本质量评估模型的训练方法和确定文本质量的方法

Country Status (4)

Country Link
EP (1) EP4148594A4 (zh)
JP (1) JP2023536773A (zh)
CN (1) CN113392218A (zh)
WO (1) WO2023284327A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392218A (zh) * 2021-07-12 2021-09-14 北京百度网讯科技有限公司 文本质量评估模型的训练方法和确定文本质量的方法
CN114417159A (zh) * 2022-01-20 2022-04-29 上海喜马拉雅科技有限公司 内容质量评估方法、模型训练方法及相关装置
CN117609781B (zh) * 2023-11-20 2024-05-28 北京中关村科金技术有限公司 文本评估模型的训练方法、文本评估方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9600717B1 (en) * 2016-02-25 2017-03-21 Zepp Labs, Inc. Real-time single-view action recognition based on key pose analysis for sports videos
CN110162779A (zh) * 2019-04-04 2019-08-23 北京百度网讯科技有限公司 病历质量的评估方法、装置及设备
CN111737446A (zh) * 2020-06-22 2020-10-02 北京百度网讯科技有限公司 用于构建质量评估模型的方法、装置、设备及存储介质
CN111984793A (zh) * 2020-09-03 2020-11-24 平安国际智慧城市科技股份有限公司 文本情感分类模型训练方法、装置、计算机设备及介质
CN113392218A (zh) * 2021-07-12 2021-09-14 北京百度网讯科技有限公司 文本质量评估模型的训练方法和确定文本质量的方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102200969A (zh) * 2010-03-25 2011-09-28 日电(中国)有限公司 基于句子顺序的文本情感极性分类系统和方法
US20190130444A1 (en) * 2017-11-02 2019-05-02 Facebook, Inc. Modeling content item quality using weighted rankings
CN108334605B (zh) * 2018-02-01 2020-06-16 腾讯科技(深圳)有限公司 文本分类方法、装置、计算机设备及存储介质
CN110046340A (zh) * 2018-12-28 2019-07-23 阿里巴巴集团控股有限公司 文本分类模型的训练方法和装置
CN110427609B (zh) * 2019-06-25 2020-08-18 首都师范大学 一种写人作文篇章结构合理性自动评测方法
CN111832312B (zh) * 2020-05-15 2024-05-17 北京嘀嘀无限科技发展有限公司 文本处理方法、装置、设备和存储介质
CN111737476B (zh) * 2020-08-05 2020-11-20 腾讯科技(深圳)有限公司 文本处理方法、装置、计算机可读存储介质及电子设备
CN112507082A (zh) * 2020-12-16 2021-03-16 作业帮教育科技(北京)有限公司 一种智能识别不当文本交互的方法、装置和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9600717B1 (en) * 2016-02-25 2017-03-21 Zepp Labs, Inc. Real-time single-view action recognition based on key pose analysis for sports videos
CN110162779A (zh) * 2019-04-04 2019-08-23 北京百度网讯科技有限公司 病历质量的评估方法、装置及设备
CN111737446A (zh) * 2020-06-22 2020-10-02 北京百度网讯科技有限公司 用于构建质量评估模型的方法、装置、设备及存储介质
CN111984793A (zh) * 2020-09-03 2020-11-24 平安国际智慧城市科技股份有限公司 文本情感分类模型训练方法、装置、计算机设备及介质
CN113392218A (zh) * 2021-07-12 2021-09-14 北京百度网讯科技有限公司 文本质量评估模型的训练方法和确定文本质量的方法

Also Published As

Publication number Publication date
EP4148594A4 (en) 2023-10-11
EP4148594A1 (en) 2023-03-15
CN113392218A (zh) 2021-09-14
JP2023536773A (ja) 2023-08-30

Similar Documents

Publication Publication Date Title
WO2023284327A1 (zh) 文本质量评估模型的训练方法和确定文本质量的方法
CN109657054B (zh) 摘要生成方法、装置、服务器及存储介质
Snyder et al. Interactive learning for identifying relevant tweets to support real-time situational awareness
WO2021093755A1 (zh) 问题的匹配方法及装置、问题的回复方法及装置
WO2018086470A1 (zh) 关键词提取方法、装置和服务器
US20180285700A1 (en) Training Image-Recognition Systems Using a Joint Embedding Model on Online Social Networks
US10083379B2 (en) Training image-recognition systems based on search queries on online social networks
KR20200094627A (ko) 텍스트 관련도를 확정하기 위한 방법, 장치, 기기 및 매체
US20220318275A1 (en) Search method, electronic device and storage medium
CN112559800B (zh) 用于处理视频的方法、装置、电子设备、介质和产品
US9348901B2 (en) System and method for rule based classification of a text fragment
EP4155973A1 (en) Sorting model training method and apparatus, and electronic device
CN113407677B (zh) 评估咨询对话质量的方法、装置、设备和存储介质
WO2023040230A1 (zh) 数据评估方法、训练方法、装置、电子设备以及存储介质
CN111538903B (zh) 搜索推荐词确定方法、装置、电子设备及计算机可读介质
CN112560461A (zh) 新闻线索的生成方法、装置、电子设备及存储介质
CN115795030A (zh) 文本分类方法、装置、计算机设备和存储介质
US20220198358A1 (en) Method for generating user interest profile, electronic device and storage medium
CN110969005B (zh) 一种确定实体语料之间的相似性的方法及装置
CN113139043B (zh) 问答样本生成方法、装置、电子设备和存储介质
US20230070966A1 (en) Method for processing question, electronic device and storage medium
WO2023060954A1 (zh) 数据处理与数据质检方法、装置及可读存储介质
WO2023087667A1 (zh) 用于智能推荐的排序模型训练方法、智能推荐方法及装置
WO2023040220A1 (zh) 一种视频推送方法、装置、电子设备及存储介质
WO2023142417A1 (zh) 网页识别方法、装置、电子设备和介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022560062

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 17995283

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022773587

Country of ref document: EP

Effective date: 20220930

NENP Non-entry into the national phase

Ref country code: DE