Text evaluation method, device, equipment and medium

Through character encoding processing and probabilistic prediction models, it is automatically determined and evaluated whether the text responds to the question, which solves the problems of low text evaluation efficiency and high labor cost in the existing technology, and achieves efficient text evaluation.

CN113392638BActive Publication Date: 2024-08-23BEIJING CENTURY TAL EDUCATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110652038.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-11
Publication Date
2024-08-23
Estimated Expiration
2041-06-11

AI Technical Summary

Technical Problem

In the existing technology, text evaluation is inefficient and labor cost is high. Especially in the field of education, teachers need to spend a lot of time to determine whether students' compositions respond to questions.

Method used

By obtaining the target question and target text, perform character encoding processing, use the pre-trained probability prediction model to obtain the probability value, characterize the probability of the response content corresponding to the question in the text, and automatically identify and evaluate whether the text responds to the question.

Benefits of technology

It can automatically determine whether the text responds to the question without manual analysis, saving labor costs, improving text evaluation efficiency, and marking the response content in the text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113392638B
    Figure CN113392638B
Patent Text Reader

Abstract

The disclosed embodiments relate to a text evaluation method, apparatus, device and medium, wherein the method comprises: obtaining a target question and a target text to be evaluated; performing character encoding processing based on the target question and the target text to obtain a character vector sequence; obtaining a probability value based on the character vector sequence using a pre-trained probability prediction model, wherein the probability value is used to characterize the probability that the target text includes a response content corresponding to the target question; and evaluating the target text based on the probability value. The above method can automatically determine whether the text responds to the target question without manual analysis, and evaluate the text based on this, which further improves the efficiency of text evaluation on the basis of saving labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing technology, and in particular to a text evaluation method, device, equipment and medium. Background Art

[0002] In some cases, it is usually necessary to evaluate the quality of a text. One of the key criteria for evaluation is to determine whether the text responds to a specified question, that is, whether the text contains an answer to the specified question. This judgment process mainly relies on manual analysis.

[0003] For example, key point essay topics usually contain one or more key questions, and students need to respond to these key questions in their essays. Teachers need to spend a lot of time analyzing student essays to determine whether the essays have answered the key questions, in order to evaluate the quality of the essays.

[0004] However, the above manual evaluation method is time-consuming, labor-intensive, inefficient, and requires high labor costs. Summary of the invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a text evaluation method, device, equipment and medium.

[0006] According to one aspect of an embodiment of the present disclosure, a text evaluation method is provided, the method comprising: obtaining a target question and a target text to be evaluated; performing character encoding processing based on the target question and the target text to obtain a character vector sequence; based on the character vector sequence, using a pre-trained probability prediction model to obtain a probability value, wherein the probability value is used to characterize the probability that the target text includes a response content corresponding to the target question; based on the probability value, evaluating the target text.

[0007] According to another aspect of an embodiment of the present disclosure, a text evaluation device is provided, including: an acquisition module, used to acquire a target question and a target text to be evaluated; an encoding module, used to perform character encoding processing based on the target question and the target text to obtain a question character vector sequence and a text character vector sequence; a probability prediction module, used to obtain a probability value based on the character vector sequence using a pre-trained probability prediction model, wherein the probability value is used to characterize the probability that the target text includes a response content corresponding to the target question; and an evaluation module, used to evaluate the target text based on the probability value.

[0008] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement a text evaluation method as provided in an embodiment of the present disclosure.

[0009] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the text evaluation method provided by the embodiment of the present disclosure.

[0010] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the text evaluation method provided by the embodiment of the present disclosure is implemented.

[0011] The above technical solution provided by the embodiment of the present disclosure can obtain the target question and the target text to be evaluated, and perform character encoding processing based on the target question and the target text to obtain a character vector sequence, and then based on the character vector sequence, use the pre-trained probability prediction model to obtain a probability value for characterizing the target text including the answer content corresponding to the target question, and then the target text can be evaluated based on the probability value. The above method can automatically determine whether the text responds to the target question without manual analysis, and evaluate the text based on this, which further improves the efficiency of text evaluation on the basis of saving labor costs.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 A flowchart of a text evaluation method provided by an embodiment of the present disclosure;

[0016] Figure 2 A schematic diagram of the structure of a response detection model provided in an embodiment of the present disclosure;

[0017] Figure 3 A schematic diagram of the structure of another response detection model provided in an embodiment of the present disclosure;

[0018] Figure 4 A schematic diagram of the structure of a text evaluation device provided by an embodiment of the present disclosure;

[0019] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0022] Considering that most of the related technologies require manual judgment on whether the text responds to the question, the labor cost is high and the efficiency is low. Especially in the field of education, teachers often need to score various forms of questions and answers such as short-answer questions and key points essays. By finding whether the student's answer record contains the answer content corresponding to the question, it is determined whether the student's answer record responds to the question, and then the student's answer record is scored. This method is a great waste of teacher time and energy, and is inefficient, and the time for students to wait for evaluation feedback is also long. In order to improve this problem, the embodiments of the present disclosure provide a text evaluation method, device, equipment and medium, which can automatically evaluate whether the text responds to the question. On this basis, the answer content in the text can be further marked, and the embodiments of the present disclosure do not limit the text language. For example, the text can be a text in various languages ​​such as Chinese text, English text, German text, etc. For ease of understanding, the embodiments of the present disclosure are described in detail as follows.

[0023] First, the present disclosure provides a text evaluation method. Figure 1 The flowchart of a text evaluation method provided by an embodiment of the present disclosure is shown in FIG. 1 , which can be performed by a text evaluation device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method mainly includes the following steps S102 to S108:

[0024] Step S102, obtaining a target question and a target text to be evaluated.

[0025] The target question and the target text to be evaluated can be uploaded by the user to the electronic device executing the text evaluation method through a specified interface, or can be downloaded by the electronic device executing the text evaluation method according to a specified path, and the acquisition method is not limited here. In addition, the target question is in the same language as the target text, and can be in various language forms such as Chinese and English, which are not limited here. For example, the target text can be an English composition, and the target question is an English title containing key points. Key points can be such as "explain why the TV station chooses your school", "explain when this program is broadcast on TV", "explain why you need to adjust the time", "suggest a new time to meet on Tuesday", etc.

[0026] Step S104, performing character encoding processing based on the target question and the target text to obtain a character vector sequence.

[0027] Exemplarily, the target question and the target text can be encoded in the form of characters (tokens) to obtain a sequence of character vectors. It should be noted that in the embodiments of the present disclosure, "characters" are uniformly used for description as the smallest division unit of a sentence. In practical applications, "words", "character codes", "words" and the like can also be used for equivalent descriptions, which are not limited here.

[0028] In some embodiments, the above-mentioned character vector sequence may include a text character vector sequence corresponding to the target text and a question character vector sequence corresponding to the target question. Exemplarily, it can be implemented in the following three ways: (1) when performing character encoding processing, the target question and the target text can be respectively subjected to character encoding processing to obtain an independent question character vector sequence and a text character vector sequence, and the independent question character vector sequence and the text character vector sequence are both used as the character vector sequence finally obtained in step S104; (2) the target question and the target text are first concatenated, and the concatenated character string is subjected to character encoding processing to obtain a whole character vector sequence including the question character vector sequence and the text character vector sequence, and the whole character vector sequence including the question character vector sequence and the text character vector sequence is used as the character vector sequence finally obtained in step S104; (3) the target question and the target text are first subjected to character encoding processing to obtain an independent question character vector sequence and a text character vector sequence, and then the question character vector sequence and the text character vector sequence are concatenated in a preset manner, and the concatenated character vector sequence is used as the character vector sequence finally obtained in step S104. In practical applications, any of the above three methods can be selected according to the needs. Of course, the above three methods are only exemplary, and other methods can also be used to express character feature vectors, which are not limited here. In addition, before character encoding processing, the target question and target text can be preprocessed, such as redundant word deletion processing, character splitting processing, etc., in order to reduce the processing difficulty of the probability prediction model.

[0029] Step S106, based on the character vector sequence, using the pre-trained probability prediction model, obtains a probability value, wherein the probability value is used to characterize the probability that the target text includes the answer content corresponding to the target question. That is, the character vector sequence is input into the pre-trained probability prediction model, and the probability value that the target text includes the answer content corresponding to the target question is obtained through the probability prediction model.

[0030] The probability prediction model is obtained by training a neural network model with a training set, such as, the training set contains text samples and question samples associated with the text samples, and the text samples carry a conclusion label of whether they answer the question samples, and / or, the text samples carry the starting character label and the ending character label of the content of the answer to the question samples, that is, the text samples are marked with the specific location of the answer content. The trained probability prediction model can output the expected discrimination result. Specifically, it can analyze the above-mentioned character vector sequence at the character feature level to obtain the probability that the target text includes the answer content corresponding to the target question. In one embodiment, the probability prediction model can preferentially identify the text character vector sequence in the character vector sequence, and analyze the text character vector sequence to determine whether the text character vector sequence contains the probability value of the content matching the question character vector sequence, and use the probability value as the probability that the target text includes the answer content corresponding to the target question. In other embodiments, the probability prediction model can directly analyze the entire character vector sequence, determine whether the character vector sequence contains the initial probability value of the content corresponding to the target question, and further extract the predicted content corresponding to the target question from the character vector sequence. If the content belongs to the target text (that is, the content belongs to the text character vector sequence), the initial probability value is used as the probability value that the target text includes the answer content corresponding to the target question.

[0031] Step S108: evaluating the target text based on the probability value.

[0032] In some implementations, whether the target text answers the target question may be evaluated based solely on the probability value.

[0033] In other implementations, it is possible to first determine whether the target text includes a response content corresponding to the target question based on the probability value, and then further perform a quality assessment on the target text based on the determination result.

[0034] Exemplarily, the probability value can be compared with a preset threshold. If the probability value is greater than the preset threshold, it is determined that the target text responds to the target question. If the probability value is not greater than the preset threshold, it is determined that the target text does not respond to the target question. The target text is then quality assessed based on the judgment result. Exemplarily, the quality assessment method can be to score the target text. For example, if it is determined that the target text responds to the target question, a corresponding score can be assigned.

[0035] The above-mentioned method provided by the embodiment of the present disclosure can automatically determine whether the text responds to the target question without manual analysis, and evaluate the text based on this, which further improves the efficiency of text evaluation on the basis of saving labor costs.

[0036] In order to simplify the structure of the probability prediction model and reduce the prediction difficulty of the probability prediction model, in some implementations, character encoding processing is performed based on the target question and the target text to obtain a character vector sequence, which can be implemented by referring to the following (1) to (2):

[0037] (1) Preprocessing the target question; wherein the preprocessing includes: personal pronoun conversion processing and / or redundant word removal processing. For example, convert the personal pronoun "you" to "I", remove question words (or question guide words) such as "when", "how", "where", and other types of redundant words other than question words, such as removing the verb before the question word, such as the question "Explain when you go to school", and "explain" as a verb before "when" is considered a redundant word, so it can be removed. Finally, the question is converted to "I go to school". The main purpose of this method of preprocessing the question is to make the respondent's (such as a student) answer perspective consistent with the question perspective, thereby effectively reducing the difficulty of the probability prediction model in finding content corresponding to the target question from the target text in the subsequent period, and simplifying the implementation method of the probability prediction model.

[0038] (2) Performing character encoding processing on the preprocessed target question and target text through an encoder to obtain a character vector sequence. The encoder can encode the preprocessed target question and target text in the form of characters, wherein the encoder can be implemented using an encoder such as BERT (Bidirectional Encoder Representations from Transformers) or an ELECTRA (Efficiently Learning an Encoder that Classifies Token Replacements Accurately) model, and the implementation method of the encoder is not limited here.

[0039] In some embodiments, the preprocessed target question and target text may be concatenated in the form of characters (tokens). During the concatenation, special words such as [sep] may be used as concatenating words so that the encoder can distinguish which characters belong to the target question and which characters belong to the target text based on the concatenating words. In addition, assuming that the characters of the target question are arranged before the characters of the target text during the concatenation, special words such as [cls] may be added before the starting characters of the target question as starting identifiers, and then the encoder may be used to directly encode the concatenated characters to obtain the entire character vector sequence including the question character vector sequence and the text character vector sequence.

[0040] Through the above method, it is convenient for the probability prediction model to compare the target question and the target text at the character level, and analyze whether the target text contains content corresponding to the target question.

[0041] In some embodiments, the probability prediction model includes a first probability prediction model and / or a second probability prediction model; each of which is described below:

[0042] 1.1 Probabilistic prediction model

[0043] In the case where the probability prediction model includes a first probability prediction model, the aforementioned step S104 (obtaining a probability value based on a character vector sequence using a probability prediction model) can be implemented as follows: obtaining a first probability value based on a character vector sequence using a first probability prediction model, wherein the first probability value is used to characterize the measured probability that the target text includes answer content corresponding to the target question.

[0044] That is, the first probability prediction model is mainly used to obtain the detailed probability that the target text includes the answer content corresponding to the target question. The detailed probability is the probability value obtained by the first probability prediction model for the character vector sequence. In specific implementation, the first probability prediction model can be used to analyze and predict each character vector in the character vector sequence. For example, the possibility of the character vector being the starting character of the answer content and the possibility of being the ending character of the answer content are analyzed. For ease of understanding, the following is an implementation method for obtaining the first probability value using the first probability prediction model:

[0045] In some embodiments, for each character vector in the character vector sequence, a first probability prediction model can be used to obtain a starting probability value and an ending probability value of the character vector, wherein the starting probability value is used to characterize the probability of the character vector being the starting character of the response content, and the ending probability value is used to characterize the probability of the character vector being the ending character of the response content; finally, based on the starting probability value and the ending probability value, a first probability value is obtained.

[0046] In some embodiments, the first probability prediction model may include two fully connected networks FFN1 and FFN2, FFN1 is used to calculate the starting probability value of each character vector, and FFN2 is used to calculate the ending probability value of each character vector. Further, FFN1 and FFN2 may be connected to the softmax function layer respectively, and the starting probability value of each character vector is calculated by FFN1 and the softmax function layer, and the ending probability value of each character vector is calculated by FFN2 and the softmax function layer.

[0047] After the starting probability value and the ending probability value of each character vector are known, in order to facilitate the overall analysis of whether the character vector sequence contains content corresponding to the target question, the character vectors in the character vector sequence can be made into multiple character vector string groups, each character vector string group includes at least two character vectors arranged consecutively.

[0048] To facilitate understanding, a simple example is given below: Assume that the character vector sequence includes 20 characters, namely character 1, character 2, character 3, character 4...character 20; then starting from character 1, character 1 and character 2 can constitute a character vector string group, character 1, character 2 and character 3 can constitute a character vector string group, character 1, character 2, character 3 and character 4 can constitute a character vector string group, and so on, characters 1, character 2 to character 20 can all constitute a character vector string group; in addition, character 2 and character 3 can constitute a character vector string group, character 2, character 3 and character 4 can constitute a character vector string group, and so on; character 3 and character 4 can constitute a character vector string group, character 3, character 4 and character 5 can constitute a character vector string group, and so on; multiple character vector string groups can be obtained according to the above permutations and combinations.

[0049] On the basis that the character vectors in the character vector sequence constitute a plurality of character vector string groups, each character vector string group includes at least two character vectors arranged continuously, when executing the step of obtaining the first probability value based on the starting probability value and the ending probability value, it can be implemented by referring to the following steps 1 to 3:

[0050] Step 1: For each character vector string group, obtain the starting probability value of the first character vector and the ending probability value of the last character vector of at least two character vectors included in the character vector string group.

[0051] Step 2, taking the sum of the starting probability value of the first character vector and the ending probability value of the last character vector as the answer probability value of the character vector string group. It can be understood that the answer probability value of the character vector string group is directly related to the starting probability value of the first character vector and the ending probability value of the last character vector; the higher the starting probability value of the first character vector of the character vector string group, the higher the possibility that the first character vector is the starting character of the answer content, the higher the ending probability value of the last character vector of the character vector string group, the higher the possibility that the last character vector is the ending character of the answer content, and accordingly, the higher the sum of the starting probability value and the ending probability value (i.e., the answer probability value), the higher the possibility that the character vector string group is the answer content.

[0052] Step 3: Determine a first probability value based on the response probability value of each character vector string group. In one implementation, the maximum response probability value may be selected from the response probability values ​​of all character vector string groups, and the maximum response probability value may be used as the first probability value.

[0053] On the basis of knowing the answer probability value of each character vector string group, the text evaluation method provided by the embodiment of the present disclosure may further include the following steps 3.1 to 3.2:

[0054] Step 3.1, based on the answer probability value of each character vector string group, determining the target character vector string group with the maximum answer probability value;

[0055] Step 3.2: Use the content corresponding to the target character vector string group as the response content corresponding to the target question.

[0056] The target character vector string group with the largest answer probability value is the content most likely to correspond to the target question (i.e., the content that matches the target question, or the content that responds to the target question), but the degree of matching may depend on the first probability value. That is, the larger the first probability value, the more likely the content corresponding to the target character vector string group is the answer content corresponding to the target question.

[0057] In other words, the above steps 1 and 3 can also be performed according to the following formula to obtain the first probability value:

[0058] The character vector string can be represented as (token_k, token_l), where k and l represent the position of the token (character vector) in the input sequence, and there are k <l, is the total number of characters input into the first probability prediction model, represents the starting probability of the kth character vector as the starting character of the response content, represents the end probability of the lth character vector being the end character of the response content, is the response probability value of the character vector string group, and then the character vector string group with the largest response probability value is selected as the target character vector string group, and the largest response probability value is used as the first probability value output by the first probability prediction model.

[0059] Among them, the first probability prediction model is trained according to the following steps:

[0060] Acquire a first training sample set, the first training sample set including a first text sample and a first question sample associated with the first text sample; wherein the first text sample carries a start character label and an end character label of an answer content of the first question sample;

[0061] The first training sample set is used to train the preset first neural network model to obtain the first probability prediction model. That is, by marking the real starting point and the real end point of the answer content in the training sample, the neural network model is trained so that the trained first probability prediction model can more accurately identify the starting point and the end point of the answer content. Specifically, the first probability prediction model also predicts the starting probability value and the ending probability value of each character vector, and comprehensively judges the first probability value that the target text includes the answer content corresponding to the target question based on the starting probability value and the ending probability value of each character vector.

[0062] (II) Second probability prediction model

[0063] In the case where the probability prediction model includes a second probability prediction model, the aforementioned step S104 (obtaining a probability value based on a character vector sequence using a probability prediction model) can be implemented as follows: obtaining a second probability value based on a character vector sequence using a second probability prediction model, wherein the second probability value is used to characterize a rough probability that the target text includes a response content corresponding to the target question. The second probability prediction model can be implemented using a fully connected network such as a Feed Forward Neural Network (FFN).

[0064] That is, the second probability prediction model is mainly used to obtain the rough probability that the target text includes the answer content corresponding to the target question. The rough probability is the probability value obtained by the second probability prediction model for the character vector sequence. The second probability prediction model is trained according to the following steps:

[0065] Obtaining a second training sample set, the second training sample set comprising a second text sample and a second question sample associated with the second text sample; wherein the second text sample carries a conclusion label indicating whether it answers the second question sample;

[0066] The second training sample set is used to train the preset second neural network model to obtain a second probability prediction model. In fact, the training method of the second neural network model is similar to the binary classification training. In the binary classification, the value output by the neural network model is usually represented in the form of probability, so the output probability can be used as the second probability value mentioned above. When the training is completed, the obtained second probability prediction model can more accurately output the expected probability value.

[0067] Based on the above discussion on the first probability prediction model and the second probability prediction model, in practical applications, the probability prediction model can be implemented in the following three ways:

[0068] In the first implementation mode, the probability prediction model only includes the first probability prediction model. At this time, the probability value output by the probability prediction model is the first probability value. When judging whether the target text answers the target question based on the probability value, it can be judged whether the first probability value is greater than the first preset threshold value. If so, it is determined that the target text answers the target question.

[0069] In the second implementation mode, the probability prediction model only includes the second probability prediction model. In this case, the probability value output by the probability prediction model is the second probability value. When judging whether the target text answers the target question based on the probability value, it can be judged whether the second probability value is greater than the second preset threshold value. If so, it is determined that the target text answers the target question.

[0070] In the third implementation mode, the probability prediction model includes both the first probability prediction model and the second probability prediction model. At this time, the probability value output by the probability prediction model is related to the first probability value and the second probability value. In one implementation mode, the probability value output by the probability prediction model is the weighted value of the first probability value and the second probability value. When judging whether the target text answers the target question based on the probability value, it can be judged whether the weighted value of the first probability value and the second probability value is greater than the third preset threshold value. If so, it is determined that the target text answers the target question. For example, the weight coefficients of the first probability value and the second probability value are set in advance, and then the weighted values ​​of the first probability value and the second probability value are obtained by weighting.

[0071] In practical applications, the first preset threshold, the second preset threshold and the third preset threshold can be set by oneself, and can be the same or different from each other, which is not limited here.

[0072] That is, the probability value obtained by using the pre-trained probability prediction model can be one of the following: a first probability value, a second probability value, a weighted value of the first probability value and the second probability value; at this time, the aforementioned step S108 (evaluating the target text based on the probability value) can be performed with reference to the following steps: in response to determining that the probability value is greater than the preset probability threshold, determining that the target text answers the target question. It can be understood that if the above probability value is the first probability value, the preset probability threshold corresponds to the above first preset threshold, if the above probability value is the second probability value, the preset probability threshold corresponds to the above second preset threshold, and if the above probability value is the weighted value of the first probability value and the second probability value, the preset probability threshold corresponds to the above third preset threshold. In practical applications, the preset probability threshold can be set by oneself, and is not limited here.

[0073] Further, in order to more clearly display the content of the target question in the text to be evaluated for the user, the above method also includes: in response to determining that the target text answers the target question, the answer content corresponding to the target question is identified in the target text. Exemplarily, if it is determined that the target text answers the target question, the content corresponding to the target character vector string group is identified in the target text, and the identified content is used as the answer content for the target question contained in the target text. For example, the answer content for the target question contained in the target text is identified in a highlighted manner. In addition, in the case of processing such as personal pronoun conversion of the target question, when the first probability prediction model is used to process each character vector in the entire character vector sequence, in order to further ensure the accuracy of the text evaluation, the target character vector string group can also be verified to determine whether the target character vector string group finally obtained belongs to the content of the text character vector sequence (it can also be understood as whether it belongs to the target text content). If so, it is determined that the content corresponding to the target character vector string group is the answer content corresponding to the target question included in the target text. The purpose of verification is to exclude the special case where the first probability prediction model uses the content of the question character vector sequence itself as the answer content corresponding to the target question.

[0074] It should be noted that if there are multiple target questions, it is necessary to determine whether the target text responds to each target question one by one, that is, only one target question and all the target texts are input into the above probability prediction model at one time.

[0075] Based on the core concept of the above text evaluation method provided by the embodiment of the present disclosure, the embodiment of the present disclosure further provides the following specific implementation examples for the text evaluation method, which are specifically described as follows:

[0076] Implementation example 1:

[0077] In this implementation example, a simple response detection model is provided. Figure 2 A structural schematic diagram of a response detection model is shown, which includes an encoding module, a prediction module and a discrimination module connected in sequence.

[0078] Among them, the encoding module mainly includes an encoder. First, the target text and the target question need to be input into the encoder. The target question input into the encoder can be pre-processed by deleting redundant words, and then the encoder encodes the target question and the target text respectively, and outputs a character vector sequence; the prediction module includes a first probability prediction model and a second probability prediction model. The first probability value output by the first probability prediction model and the second probability value output by the second probability prediction model are input into the discrimination module together. The discrimination module mainly includes a weighted calculation layer and a threshold comparison layer, wherein the weighted calculation layer is used to calculate the weighted value of the first probability value and the second probability value, and the threshold comparison layer is used to compare the weighted value with the preset threshold, and finally the discrimination result of whether the target text contains the answer content of the target question is obtained based on the comparison result. For example, if the comparison result indicates that the weighted value is greater than or equal to the preset threshold, the discrimination result that the target text contains the answer content of the target question is obtained; if the comparison result indicates that the weighted value is less than the preset threshold, the discrimination result that the target text does not contain the answer content of the target question is obtained.

[0079] Implementation Example 2:

[0080] In this implementation example, a more specific application scenario and model structure are given. Suppose that the student composition is detected to see if there is a response to the key questions in the composition topic. First, the question is preprocessed, and specific words in the question (such as redundant words, question guide words) are deleted, and personal pronouns are converted to obtain the processed question. Then the processed question is concatenated with the student composition to obtain the concatenated string, that is, the question and the student composition are combined. As shown in the figure, [cls] is used as the starting identifier, and [sep] is used as the concatenation identifier between the question string and the composition string, where to is the question string, to is the composition string. Through the start identifier and the splicing identifier, the model can clearly know which part belongs to the question and which part belongs to the composition. In some embodiments, if there are multiple key point questions, it is necessary to splice the key point questions with the student composition separately (the student composition is only spliced ​​with one key point question at a time), and then input it into the response detection model to detect whether the student composition responds to the spliced ​​key point questions. After the detection is completed, the student composition can be spliced ​​with another key point question and input into the response detection model for detection again, and this operation is performed until the response detection model detects whether the student composition responds to all key point questions.

[0081] This implementation example 2 provides another response detection model, see Figure 3A structural diagram of another response detection model is shown, which mainly includes an encoder, an answer range prediction module and a response verification module.

[0082] The input of the encoder is the concatenated tokens of the key questions and the student essays (also called concatenated strings). By converting the concatenated strings into vectors, the output is a whole character vector sequence H containing the character vector sequence of the question and the character vector sequence of the essay (i.e. the aforementioned text character vector sequence). L .like Figure 3 As shown, the encoder can be implemented using the ELECTRA model.

[0083] The input of the answer range prediction module is a character vector sequence H L , the output is the starting probability and ending probability of each character vector responding to the key question; wherein, the answer range prediction module includes two FFNs, the FFN1 network layer (startposition FFN) is connected with a softmax function layer to predict the starting probability of each character vector responding to the key question; the FFN2 network layer (start position FFN) is connected with a softmax to predict the ending probability of each character vector responding to the question.

[0084] The input of the response verification module is the output of the encoder and the answer range prediction module. Two scores are calculated internally, score 1 (score1) and score 2 (score2). Based on score 1 and score 2, it determines whether the character vector sequence contains the response content of the question and outputs the judgment result. Among them, the response verification module includes the FFN3 network layer, the search algorithm and the FFN4 network layer. The input of the FFN3 network layer is the character vector sequence H L , the output is score 2 (i.e. the aforementioned second probability value), the input of the search algorithm is the starting probability (response starting probability) and ending probability (response ending probability) of each character vector in response to the question output by the answer range prediction module, and the output is score 1 (i.e. the aforementioned first probability value) and the most likely starting position and ending position of the response content. The input of the FFN4 network layer is score 1 and score 2, and the final score (final_score) is obtained by weighted calculation, and the final score (i.e. the weighted value of the aforementioned first probability value and the second probability value) is compared with the preset score threshold (i.e. the aforementioned preset probability threshold). If the final score > the preset score threshold, the judgment result output by the response verification module is that the character vector sequence contains the response content of the question, otherwise it does not.

[0085] The search algorithm mainly determines the probability of each possible character vector string group token pair (token_k, token_l), and then selects the target character vector string group with the largest probability as the most likely response content.

[0086]

[0087] Furthermore, since the input of the response detection model is the concatenated string of the question and the composition, considering that in some embodiments, the answer range prediction module in the model may process all character vectors in the concatenated string (including the question character vector) together, such as calculating the start probability and end probability for all character vectors, it is possible that the content of the question character vector is used as the answer content. In this case, if the conclusion output by the response verification module is that the student composition responds to the key question, it is further determined whether the response content is located in the composition area (that is, whether the target string group with the highest probability belongs to the composition character vector sequence) to exclude the situation where the response detection model uses the content in the key question as the response content.

[0088] It should be noted that the model structure of the response detection model in the above-mentioned Implementation Example 1 and Implementation Example 2 provided in the embodiments of the present disclosure is only a schematic illustration, and the multiple modules contained in the model can be flexibly divided. For example, in the response detection model in Implementation Example 1, the first probability prediction model and the second probability prediction model are both divided into prediction modules, while in the response detection model in Implementation Example 2, the second probability prediction model (FFN3 network layer) is divided into an answer range prediction module, and the first probability prediction model (FFN1 network layer and FFN2 network layer) is divided into a response verification module.

[0089] To sum up, the text evaluation method provided by the embodiments of the present disclosure can automatically evaluate whether the text responds to the question without manual analysis. On this basis, the response content in the text can be further marked and the text can be evaluated based on this, which not only saves labor costs but also further improves the efficiency of text evaluation.

[0090] Corresponding to the aforementioned text evaluation method, the present disclosure provides a text evaluation device, Figure 4 Schematic diagram of a text evaluation device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated in an electronic device, such as Figure 4 As shown, the text evaluation device 400 includes the following modules:

[0091] An acquisition module 402 is used to acquire a target question and a target text to be evaluated;

[0092] An encoding module 404 is used to perform character encoding processing based on the target question and the target text to obtain a character vector sequence;

[0093] The probability prediction module 406 is used to obtain a probability value based on the character vector sequence using a pre-trained probability prediction model, wherein the probability value is used to represent the probability that the target text includes the answer content corresponding to the target question;

[0094] The evaluation module 408 is used to evaluate the target text based on the probability value.

[0095] The above-mentioned device provided by the embodiment of the present disclosure can automatically determine whether the text responds to the target question without manual analysis, and evaluate the text based on this, which further improves the efficiency of text evaluation on the basis of saving labor costs.

[0096] In some embodiments, the probability prediction model includes a first probability prediction model, and the above-mentioned probability prediction module 406 is specifically used to: based on the character vector sequence, use the first probability prediction model to obtain a first probability value, wherein the first probability value is used to characterize the measured probability that the target text includes the answer content corresponding to the target question.

[0097] In some embodiments, the probability prediction model includes a second probability prediction model, and the above-mentioned probability prediction module 406 is specifically used to: based on the character vector sequence, use the second probability prediction model to obtain a second probability value, wherein the second probability value is used to characterize the rough probability that the target text includes the answer content corresponding to the target question.

[0098] In some embodiments, the above-mentioned probability prediction module 406 is specifically used to: for each character vector in the character vector sequence, using the first probability prediction model, obtain the starting probability value and the ending probability value of the character vector, wherein the starting probability value is used to characterize the probability of the character vector being the starting character of the response content, and the ending probability value is used to characterize the probability of the character vector being the ending character of the response content; based on the starting probability value and the ending probability value, obtain the first probability value.

[0099] In some embodiments, the character vectors in the character vector sequence constitute a plurality of character vector string groups, each character vector string group includes at least two character vectors arranged consecutively, and the above-mentioned probability prediction module 406 is specifically used to: for each character vector string group, obtain the starting probability value of the first character vector and the ending probability value of the last character vector of the at least two character vectors included in the character vector string group; take the sum of the starting probability value of the first character vector and the ending probability value of the last character vector as the response probability value of the character vector string group; and determine the first probability value based on the response probability value of each character vector string group.

[0100] In some embodiments, the above-mentioned device also includes: a response content determination module, which is used to: determine the target character vector string group with the maximum response probability value based on the response probability value of each of the character vector string groups; and use the content corresponding to the target character vector string group as the response content corresponding to the target question.

[0101] In some embodiments, the probability value is one of the following: the first probability value, the second probability value, or a weighted value of the first probability value and the second probability value; the evaluation module 408 is specifically used to: in response to determining that the probability value is greater than a preset probability threshold, determine that the target text answers the target question.

[0102] In some embodiments, the apparatus further comprises: a content identification module configured to identify, in response to determining that the target text answers the target question, answer content corresponding to the target question in the target text.

[0103] In some embodiments, the above-mentioned device also includes a first probability prediction model training module, which is used to: obtain a first training sample set, the first training sample set including a first text sample and a first question sample associated with the first text sample; wherein the first text sample carries a starting character label and an ending character label of the answer content of the first question sample; and use the first training sample set to train a preset first neural network model to obtain a first probability prediction model.

[0104] In some embodiments, the above-mentioned device also includes a second probability prediction model training module, which is used to: obtain a second training sample set, the second training sample set includes a second text sample and a second question sample associated with the second text sample; wherein the second text sample carries a conclusion label of whether it answers the second question sample; and use the second training sample set to train a preset second neural network model to obtain a second probability prediction model.

[0105] In some embodiments, the encoding module 404 is used to: preprocess the target question; wherein the preprocessing includes: personal pronoun conversion processing and / or redundant word removal processing; and perform character encoding processing on the preprocessed target question and the target text through an encoder to obtain a character vector sequence.

[0106] The text evaluation device provided in the embodiments of the present disclosure can execute the text evaluation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.

[0108] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the instructions to implement any of the above-mentioned text evaluation methods.

[0109] Figure 5 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the electronic device 500 includes one or more processors 501 and a memory 502 .

[0110] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.

[0111] The memory 502 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may run the program instructions to implement the text evaluation method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0112] In one example, the electronic device 500 may further include: an input device 503 and an output device 505 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0113] In addition, the input device 503 may also include, for example, a keyboard, a mouse, and the like.

[0114] The output device 504 can output various information to the outside, including the determined distance information, direction information, etc. The output device 504 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0115] Of course, to simplify, Figure 5 Only some of the components related to the present disclosure in the electronic device 500 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 500 may also include any other appropriate components.

[0116] In addition to the above method and device, the embodiment of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the text evaluation method provided by the embodiment of the present disclosure.

[0117] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0118] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the text evaluation method provided by the embodiment of the present disclosure.

[0119] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0120] The embodiment of the present disclosure also provides a computer program product, including a computer program / instruction, which implements the text evaluation method in the embodiment of the present disclosure when the computer program / instruction is executed by a processor.

[0121] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0122] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text evaluation method, comprising: Obtain the target question and the target text to be evaluated; Performing character encoding processing based on the target question and the target text to obtain a character vector sequence; wherein, performing character encoding processing based on the target question and the target text to obtain a character vector sequence includes: preprocessing the target question, splicing the preprocessed target question and the target text in the form of characters, encoding the spliced ​​characters through an encoder to obtain a character vector sequence; the preprocessing includes personal pronoun conversion processing; the personal pronoun conversion processing is used to make the respondent's answer perspective consistent with the question perspective; Based on the character vector sequence, a probability value is obtained using a pre-trained probability prediction model, wherein the probability value is used to characterize the probability that the target text includes the answer content corresponding to the target question; the probability value is obtained based on a first probability value, the character vectors in the character vector sequence constitute a plurality of character vector string groups, each character vector string group includes at least two character vectors arranged continuously, and wherein the probability value is obtained includes: for each character vector string group, obtaining the starting probability value of the first character vector and the ending probability value of the last character vector in the at least two character vectors included in the character vector string group; taking the sum of the starting probability value of the first character vector and the ending probability value of the last character vector as the answer probability value of the character vector string group; determining the first probability value based on the answer probability value of each character vector string group; the probability prediction model includes a first probability prediction model, and the probability value is obtained based on the character vector sequence using the pre-trained probability prediction model, including: based on the character vector sequence, using the first probability prediction model, obtaining a first probability value, the first probability value is used to characterize the detailed probability that the target text includes the answer content corresponding to the target question; Based on the probability value, evaluating the target text; Based on the answer probability value of each of the character vector string groups, determining a target character vector string group having a maximum answer probability value; When processing each character vector in the character vector sequence using the first probability prediction model, determining whether the target character vector string group belongs to the content of the target text; if so, using the content corresponding to the target character vector string group as the answer content corresponding to the target question; The probability prediction model includes a second probability prediction model, and wherein the obtaining a probability value based on the character vector sequence using the pre-trained probability prediction model includes: obtaining a second probability value based on the character vector sequence using the second probability prediction model, wherein the second probability value is used to represent a rough probability that the target text includes a response content corresponding to the target question; The probability value is a weighted value of the first probability value and the second probability value.

2. The method according to claim 1, wherein: The obtaining a first probability value based on the character vector sequence and using the first probability prediction model includes: For each character vector in the character vector sequence, using the first probability prediction model, obtaining a starting probability value and an ending probability value of the character vector, wherein the starting probability value is used to represent the probability that the character vector is the starting character of the response content, and the ending probability value is used to represent the probability that the character vector is the ending character of the response content; Based on the starting probability value and the ending probability value, the first probability value is acquired.

3. The method according to claim 1, wherein: And among them, The step of evaluating the target text based on the probability value comprises: In response to determining that the probability value is greater than a preset probability threshold, it is determined that the target text answers the target question.

4. The method according to claim 3, further comprising: In response to determining that the target text answers the target question, answer content corresponding to the target question is identified in the target text.

5. The method according to claim 1, characterized in that The first probability prediction model is trained according to the following steps: Acquire a first training sample set, the first training sample set comprising a first text sample and a first question sample associated with the first text sample, wherein the first text sample carries a start character label and an end character label of an answer content of the first question sample; and The first training sample set is used to train a preset first neural network model to obtain a first probability prediction model.

6. The method according to claim 1, characterized in that The second probability prediction model is trained according to the following steps: Acquire a second training sample set, where the second training sample set includes a second text sample and a second question sample associated with the second text sample, wherein the second text sample carries a conclusion label indicating whether the second text sample is answered with respect to the second question sample; The second training sample set is used to train a preset second neural network model to obtain a second probability prediction model.

7. The method according to claim 1, wherein: The preprocessing also includes removing redundant words.

8. A text evaluation device, characterized in that: include: An acquisition module is used to obtain the target question and the target text to be evaluated; An encoding module is used to perform character encoding processing based on the target question and the target text to obtain a question character vector sequence and a text character vector sequence; wherein the encoding module is specifically used to: pre-process the target question, splice the pre-processed target question and the target text in the form of characters, and encode the spliced ​​characters through an encoder to obtain a character vector sequence; the pre-processing includes personal pronoun conversion processing; the personal pronoun conversion processing is used to make the respondent's answer perspective consistent with the question perspective; A probability prediction module is used to obtain a probability value based on the character vector sequence using a pre-trained probability prediction model, wherein the probability value is used to characterize the probability that the target text includes the answer content corresponding to the target question; the probability value is obtained based on a first probability value, the character vectors in the character vector sequence constitute a plurality of character vector string groups, each character vector string group includes at least two character vectors arranged continuously, and wherein the probability prediction module is specifically used to: for each character vector string group, obtain the starting probability value of the first character vector and the ending probability value of the last character vector in the at least two character vectors included in the character vector string group; use the sum of the starting probability value of the first character vector and the ending probability value of the last character vector as the answer probability value of the character vector string group; determine the first probability value based on the answer probability value of each character vector string group; the probability prediction model includes a first probability prediction model, and the probability prediction module is specifically used to: based on the character vector sequence, use the first probability prediction model to obtain a first probability value, the first probability value is used to characterize the measured probability that the target text includes the answer content corresponding to the target question; An evaluation module, used for evaluating the target text based on the probability value; A response content determination module is used to determine whether the target character vector string group belongs to the content of the target text when processing each character vector in the character vector sequence using the first probability prediction model; if so, determine the target character vector string group with the maximum response probability value based on the response probability value of each character vector string group; and use the content corresponding to the target character vector string group as the response content corresponding to the target question; The probability prediction model includes a second probability prediction model, and the probability prediction module is further specifically used to: based on the character vector sequence, use the second probability prediction model to obtain a second probability value, wherein the second probability value is used to characterize the rough probability that the target text includes the answer content corresponding to the target question; the probability value is a weighted value of the first probability value and the second probability value.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the text evaluation method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the text evaluation method described in any one of claims 1 to 7.