Multi-dimensional text scoring method, device, computer equipment and storage medium

Through the multi-dimensional text scoring method, the text conversion network and LSTM scoring model are used to score articles in multiple dimensions, which solves the problem of time-consuming and indetailed scores in the existing technology, and achieves fast and detailed text scoring and improvement guidance.

CN113076736BActive Publication Date: 2025-04-04PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110481306.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2025-04-04
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

The prior art is difficult to quickly rate articles from multiple dimensions, resulting in a long time-consuming review and automatic scoring only provides overall scores, which makes it impossible to guide authors to improve their writing.

Method used

The multi-dimensional text scoring method is adopted to convert the text to be scored into text feature vectors through the preset text conversion network model, and the text feature vectors are scored using the LSTM scoring model of multiple scoring dimensions to obtain scores of each dimension and finally determine the target score.

Benefits of technology

Fast and multi-dimensional text ratings are achieved, providing detailed scoring results, helping authors understand the direction of improvement and reduce manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113076736B_ABST
    Figure CN113076736B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a multi-dimensional text scoring method, device, computer equipment and storage medium. The method comprises: obtaining a text to be scored; then converting the text to be scored into a text feature vector according to a preset text conversion network model; then scoring the text feature vector based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, respectively, to obtain the dimension score of the text to be scored under each scoring dimension; finally, determining the target score of the text to be scored according to the dimension score. In the embodiment of the present invention, the LSTM scoring model of multiple scoring dimensions is used to score the text in the corresponding dimensions respectively, and the scores of the text to be scored under multiple scoring dimensions are obtained, so this scheme can quickly score the text from multiple dimensions without consuming manpower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-dimensional text scoring method, device, computer equipment and storage medium. Background Art

[0002] With the advancement of technology, more and more work is done by machines. As people pay more and more attention to education, more and more students need to improve their writing skills by practicing writing.

[0003] When scoring articles, on the one hand, most of the article scoring is still based on manual review, which is very time-consuming to review many articles and score them in various dimensions, and the article review time is relatively long; on the other hand, most of the research work done in the field of automatic article scoring focuses on the overall score of the article, rather than studying the importance of article features in the overall score. Then the authors and teachers can only get an overall score, but they still don’t know where to improve the article, so it is difficult to help the author make progress in writing.

[0004] Currently, there is no method that can quickly score articles from multiple dimensions. Summary of the invention

[0005] The embodiments of the present invention provide a multi-dimensional text scoring method, apparatus, computer equipment and storage medium, which can quickly score text from multiple dimensions.

[0006] In a first aspect, an embodiment of the present invention provides a multi-dimensional text scoring method, which includes:

[0007] Get the text to be rated;

[0008] Converting the text to be scored into a text feature vector according to a preset text conversion network model;

[0009] Based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, the text feature vector is scored respectively to obtain the dimension score of the text to be scored under each scoring dimension;

[0010] The target score of the text to be scored is determined according to the dimension scores.

[0011] In a second aspect, an embodiment of the present invention further provides a multi-dimensional text scoring device, which includes a unit for executing the above method.

[0012] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and the program instructions can implement the above method when executed by a processor.

[0014] The embodiment of the present invention provides a multi-dimensional text scoring method, device, computer equipment and storage medium. The method includes: obtaining a text to be scored; then converting the text to be scored into a text feature vector according to a preset text conversion network model; then scoring the text feature vector based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, respectively, to obtain the dimension score of the text to be scored under each scoring dimension; finally, determining the target score of the text to be scored according to the dimension score. In the embodiment of the present invention, the LSTM scoring model of multiple scoring dimensions is used to score the text in the corresponding dimensions respectively, and the scores of the text to be scored under multiple scoring dimensions are obtained, so this solution can quickly score the text from multiple dimensions without consuming manpower. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 A schematic diagram of an application scenario of the multi-dimensional text scoring method provided by an embodiment of the present invention;

[0017] Figure 2 A schematic diagram of a flow chart of a multi-dimensional text scoring method provided by an embodiment of the present invention;

[0018] Figure 3 A schematic diagram of a sub-process of a multi-dimensional text scoring method provided by an embodiment of the present invention;

[0019] Figure 4 A schematic diagram of a framework of a text conversion model provided by an embodiment of the present invention;

[0020] Figure 5 Another sub-process diagram of the multi-dimensional text scoring method provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of the framework of the LSTM scoring model provided in an embodiment of the present invention;

[0022] Figure 7 Another sub-process diagram of the multi-dimensional text scoring method provided by an embodiment of the present invention;

[0023] Figure 8 A schematic flow chart of a multi-dimensional text scoring method provided by another embodiment of the present invention;

[0024] Fig. 9 A schematic block diagram of a multi-dimensional text scoring device provided by an embodiment of the present invention;

[0025] Fig.10 A schematic block diagram of a multi-dimensional text scoring device provided by another embodiment of the present invention;

[0026] Fig.11 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0029] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0031] Embodiments of the present invention provide a multi-dimensional text scoring method, apparatus, computer equipment, and storage medium.

[0032] The executor of the multidimensional text scoring method may be the multidimensional text scoring device provided in an embodiment of the present invention, or a computer device integrating the multidimensional text scoring device, wherein the multidimensional text scoring device may be implemented in hardware or software, and the computer device may include a server or a terminal, and the terminal may be a smart phone, a tablet computer, a PDA, or a laptop computer, etc.

[0033] For example, see Figure 1 , Figure 1 A schematic diagram of an application scenario of the multi-dimensional text scoring method provided by an embodiment of the present invention. The multi-dimensional text scoring method can be applied to Figure 1 In the computer device shown, when the user needs to perform multi-dimensional scoring on the text to be scored, the text to be scored can be provided to the computer device, and then the computer device converts the text to be scored into a text feature vector according to the text conversion network model, and then inputs the text feature vector into the long short-term memory network (Long Short-Term Memory, LSTM) scoring model corresponding to each scoring dimension in multiple scoring dimensions, for example, the text feature vector is respectively input into the first scoring point LSTM scoring model, the second scoring point LSTM scoring model... and the Nth scoring point LSTM scoring model, where N is an integer greater than 2, and then the first scoring point score, the second scoring point score... and the Nth scoring point score are output, and finally the target score of the text to be scored is obtained according to the first scoring point score, the second scoring point score... and the Nth scoring point score.

[0034] Figure 2 The figure is a flow chart of a multi-dimensional text scoring method provided by an embodiment of the present invention. As shown in the figure, the method includes the following steps S110-140.

[0035] S110, obtaining the text to be rated.

[0036] In this embodiment, the text to be scored can be in Chinese or in other languages ​​such as English, and the specific language type is not limited here. The text to be scored can be text such as papers, essays, and diaries, and the type of text is not limited here.

[0037] In some embodiments, when the author (eg, a student) completes writing the text to be graded, or the grader of the text (eg, a teacher) obtains the text to be graded, if the text to be graded is an electronic text, the text to be graded is directly input into a computer device.

[0038] In some embodiments, if a paper text needs to be scored, for example, the author writes the text on paper when writing the text, then the user is required to take a photo of the paper text. Figure 3 As shown, step S110 includes:

[0039] S111, obtaining an image containing the text to be rated.

[0040] For example, a user takes a photo of a text to be rated written on a piece of paper to obtain an image containing the text to be rated, and then inputs the image into a computer device.

[0041] For another example, a camera is provided on the computer device, and the user directly uses the camera on the computer device to capture an image containing the text to be rated.

[0042] S112: Perform optical character recognition processing on the image to obtain a text to be scored.

[0043] In this embodiment, after the image containing the text to be rated is obtained, optical character recognition (OCR) is performed on the image, and the recognized text is used as the text to be rated.

[0044] In some embodiments, the computer device in this embodiment also supports online text scoring, that is, the user can write text online, and the network identification can be a terminal such as a mobile phone or a computer.

[0045] For example, when a user finishes writing a paragraph or a sentence, the computer device automatically scores the paragraph or sentence as the text to be scored, or when the user wants to detect the text during the online writing process, the computer device is actively triggered to execute the multi-dimensional text scoring method of the present invention. At this time, the computer device uses the text written by the user as the text to be detected.

[0046] S120: Convert the text to be scored into a text feature vector according to a preset text conversion network model.

[0047] In some embodiments, the text conversion network model may be a vector space model (VSM).

[0048] Among them, Figure 4 As shown, the text conversion model in this embodiment includes a word embedding layer, a convolution layer, a pooling layer and a dense layer. In some embodiments, the text conversion model in this embodiment can correspond to multiple LSTM scoring models; in other embodiments, each LSTM scoring model corresponds to a text conversion model; in other embodiments, the word embedding layer in the text conversion model can correspond to multiple text conversion models. In this case, the corresponding text conversion model includes a convolution layer, a pooling layer and a dense layer, and each LSTM scoring model corresponds to a text conversion model.

[0049] In some embodiments, Figure 5 As shown, step S120 includes:

[0050] S121, split the text to be scored into multiple words.

[0051] In this embodiment, if the text to be scored is a Chinese text, the words at this time are Chinese words, such as "flowers", "sky" and "of", etc. At this time, it is necessary to identify the words in the text to be scored according to the vocabulary recognition network model, and then split the text according to the identified words, wherein the vocabulary recognition network model can be a convolutional neural network trained according to existing vocabulary.

[0052] If the text to be scored is an English text, each text to be scored is split into multiple words, for example, "Iam" is split into "I" and "am".

[0053] S122. Convert multiple words into multiple word feature vectors according to the word embedding layer in the text conversion network model.

[0054] Specifically, the word embedding layer in this embodiment is a method of converting words in a text into digital vectors. Since computers cannot understand text, in order to use standard machine learning algorithms to analyze them, these vectors converted into numbers need to be input in digital form.

[0055] In some embodiments, we use the most common 5000 words as the vocabulary, and all other words are mapped to vectors. For example, one-hot encoding is used in the word embedding layer to represent "I" and "am" as [1, 0, 0, 0, 0, 0, 0, 0] and [0, 1, 0, 0, 0, 0, 0, 0, 0], respectively, to facilitate computer recognition. For example, given a word "w1, w, ... w m ", and then map the word to x i , i=1,2,…m, as shown in the following formula:

[0056] x i =Ew i ;

[0057] Among them, w i is the encoding representation of the i-th word in the text, E is the embedding matrix, and xi is the embedding vector of the i-th word, that is, the word feature vector.

[0058] S123. Determine a sentence feature vector of the text to be scored based on the multiple word feature vectors.

[0059] In some embodiments, step S123 includes: in the convolutional layer of the text conversion network model, using a filter to obtain a scattered sentence feature vector of multiple word feature vectors; then, according to the pooling layer in the text conversion network model, the scattered sentence feature vectors are scaled uniformly (i.e., the output dimension is fixed by the pooling layer) to obtain a sentence feature vector.

[0060] Specifically, the word feature vector x i , i = 1, 2, ... m is transmitted to the convolution layer and pooling layer for aggregation. If there are 10 words in a text, each word is represented by a 100-dimensional vector. The above method will generate a 10×100 vector, which is the "image". The convolution layer uses a filter to slide over the entire matrix composed of word feature vectors to obtain a scattered sentence feature vector expression (each sentence feature vector is a feature map), and then the output dimension is fixed through the pooling layer to facilitate weighted distribution in the dense layer.

[0061] S124. Perform weighted distribution processing on the sentence feature vector according to the dense layer in the text conversion network model to obtain a text feature vector.

[0062] Among them, the text feature vector in this embodiment is composed of multiple sentence feature vectors, and the dense layer is the fully connected layer of the text conversion network model.

[0063] In this embodiment, the multiple sentence feature vectors obtained in step S123 are weighted and allocated through a dense layer to obtain weighted sentence feature vectors corresponding to the multiple sentence feature vectors, and the multiple weighted sentence feature vectors constitute the text feature vector in this embodiment.

[0064] S130. Based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, score the text feature vectors respectively to obtain the dimension score of the text to be scored in each scoring dimension.

[0065] In this embodiment, the framework of the LSTM scoring model is as follows Figure 6 As shown, it includes LSTM layer, pooling layer and dense layer.

[0066] In some embodiments, Figure 7 As shown, for the LSTM scoring model corresponding to each scoring dimension, step S130 includes:

[0067] S131. Determine the sentence score of each sentence feature vector in the text feature vector through the scoring logic of the LSTM layer in the LSTM scoring model.

[0068] In this embodiment, LSTM has memory and can associate contexts. For example, when predicting the last word of "the clouds are in the...", through training with existing data (context prediction), the next word is obviously sky. LSTM can predict the best matching words and sentences in longer sentences or even the entire article, which is beneficial to the scoring of each scoring dimension.

[0069] In this embodiment, the scoring logic (scoring criteria) determines under what circumstances a sentence needs to be deducted points. For each scoring point, the scoring logic of the trained LSTM scoring model is different. This embodiment uses the scoring dimensions including "sentence structure dimension", "grammar dimension" and "text and topic association dimension" as an example for distance explanation. Of course, the scoring dimensions can also include other scoring dimensions according to the settings, such as "high-level word dimension" and "layout dimension", etc. The specific types of scoring dimensions are not limited here.

[0070] For the LSTM scoring model corresponding to the "sentence structure dimension", we can train the LSTM scoring model according to the syntactic analysis tree, such as the subject-predicate-object structure, using the correct and incorrectly structured sentences in the corpus to classify words into adjectives, adverbs, etc., and determine whether the sentence structure is correct through fixed sentence collocations and score each sentence.

[0071] For the LSTM scoring model corresponding to the "Grammatical Dimension", the sentences can be divided into different parts of speech. For example, the corresponding part of speech annotations for "Linda will feel uncomfortable" are: ('Linda' 'NNP'), ('will' 'MD')('feel' 'VB')('uncomfortable' 'ADJ'). The LSTM memory function is used to predict the part of speech of the words that can be matched with the proper nouns (NNP), modal verbs (MD), verbs (VB), and adjectives (ADJ) and compare them with the sentences. If they are wrong, points will be deducted.

[0072] For the LSTM scoring model corresponding to the "dimensionality of association between text and topic", we can find words similar to the topic, sentences similar to the viewpoint, sentences that are meaningful to the argumentation process, etc. By using the classification and prediction functions of LSTM, we train the LSTM model with data (such as synonyms in the corpus and reasonable logical structures), and use classification calculations to find and score relevant sentences.

[0073] S132. Score the sentences by using the pooling layer in the LSTM scoring model to obtain processed sentence scores.

[0074] In this embodiment, the sentence scores are scaled uniformly, that is, the sentence scores corresponding to each sentence in the text to be scored are processed into fixed dimensions to facilitate weighted allocation in the subsequent dense layer.

[0075] S133. Perform weighted distribution processing on the processed sentence scores through the dense layer in the LSTM scoring model to obtain the dimension score of the text to be scored.

[0076] In this embodiment, each scoring dimension has a corresponding weight distribution rule. For example, the weights of the sentences located before and after the text to be tested are relatively high, and the weights of the sentences located in the middle of the text to be tested are relatively low.

[0077] For another example, the weight of the corresponding sentence score is determined according to the length of the sentence. The longer the sentence, the higher the weight of the corresponding sentence score. Conversely, the shorter the sentence, the lower the weight. At this time, step S133 includes: determining the sentence length corresponding to each processed sentence score; then determining the weight corresponding to the processed sentence score according to the sentence length through the dense layer; finally, performing weighted distribution processing on the processed sentence scores according to the weights through the dense layer to obtain the dimension score of the text to be scored.

[0078] That is, in this embodiment, each sentence in the text to be rated will be scored in each rating dimension, and then the sentence score corresponding to each sentence will be weighted and allocated according to the weight of the sentence to obtain the score of the text to be rated in each rating dimension.

[0079] S140. Determine the target score of the text to be scored based on the dimension score.

[0080] Specifically, the target score in this embodiment includes the comprehensive score of each dimension of the text to be scored and the dimension score of each scoring dimension.

[0081] Among them, when determining the comprehensive score of the text to be scored, it is necessary to determine the comprehensive score of the text to be scored according to the corresponding weights of each scoring dimension and the dimension scores. In this embodiment, each scoring dimension is preset with its corresponding weight. For example, the weight of the "sentence structure dimension" is 0.2, the weight of the "grammar dimension" is 0.3, and the weight of the "text and topic association dimension" is 0.5. At this time, the comprehensive score = sentence structure dimension score * 0.2 + grammar dimension score * 0.3 + text and topic association dimension score * 0.5.

[0082] In some embodiments, a dense layer is connected after each LSTM scoring model, and then the scores of each dimension are weighted and scored through the dense layer to obtain a comprehensive score.

[0083] Specifically, after the target score of the text to be scored is determined, the target score will be output to the user. If the computer device in this embodiment is a terminal, the target score can be directly output at this time. If the computer device in this embodiment is a server, the server needs to send the target score to the user terminal so that the user can obtain the target score of the text to be scored.

[0084] After the user obtains the target score of the text to be rated, since the target score includes not only the comprehensive score but also the dimension scores of each dimension, the user can know which aspects of the text to be rated need to be improved, which can better help the author improve his writing level.

[0085] In some embodiments, the computer device in this embodiment can also collect error points when scoring each scoring dimension, and then automatically evaluate the corresponding scoring dimension based on the collected error points. For example, in the "Grammar Dimension", if there are more than 5 grammatical errors, comments requiring attention to grammar will be automatically added.

[0086] In summary, the computer device in this embodiment obtains the text to be scored; then converts the text to be scored into a text feature vector according to a preset text conversion network model; then scores the text feature vectors based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, and obtains the dimension score of the text to be scored under each scoring dimension; finally, the target score of the text to be scored is determined according to the dimension score. In the embodiment of the present invention, the LSTM scoring model of multiple scoring dimensions is used to score the text in the corresponding dimensions respectively, and the scores of the text to be scored under multiple scoring dimensions are obtained, so this solution can quickly score the text from multiple dimensions without consuming manpower.

[0087] Figure 8 FIG. 1 is a flow chart of a multi-dimensional text method provided by another embodiment of the present invention. Figure 8 As shown, the multi-dimensional text method of this embodiment includes steps S210-S290. Steps S210-S240 are similar to steps S110-S140 in the above embodiment, and will not be repeated here. The following describes the added steps S250-S290 in this embodiment.

[0088] S250: Receive the modified text corresponding to the text to be rated.

[0089] In this embodiment, the modified text corresponding to the text to be scored is the text whose text sentences have been modified by the user according to the target score of the previous text to be scored. In order to verify the effect of the modification, the user can input the modified text into the computer device for verification again.

[0090] In some embodiments, the computer device can determine whether the modified text has been rated based on the text identifier of the modified text. If it is determined that it has been rated, the previous text corresponding to the modified text is found according to the rating record, where the text identifier can be a text title or a text number, etc. The specific type of the identifier is not limited here.

[0091] S260: Convert the modified text into a modified text feature vector according to the text conversion network model.

[0092] S270. Based on the LSTM scoring model, score the modified text feature vectors respectively to obtain the modified text dimension score of the modified text in each scoring dimension.

[0093] S280. Determine a modified text target score for the modified text according to the modified text dimension score.

[0094] It should be noted that, compared with steps S120 to S140, in steps S260 to S280, the text to be scored is replaced by the modified text, and the other steps are similar, which will not be described in detail here.

[0095] S290, comparing the target score with the modified text target score to obtain a score comparison result.

[0096] Specifically, this embodiment compares the target score with the corresponding dimension scores in the modified text target score, and compares the comprehensive score with the corresponding comprehensive score to obtain a score comparison result.

[0097] Among them, the score comparison results include the score changes of each scoring dimension and the comparison of the comprehensive score. For example, the sentence structure dimension increased by 5 points, the grammar dimension score increased by 4 points, the text and topic association dimension score increased by 6 points, and the comprehensive score increased by 5.2 points. This is convenient for users to make comparisons and know whether the modified text has been improved and which dimension has been improved.

[0098] Fig. 9 is a schematic block diagram of a multi-dimensional text scoring device provided by an embodiment of the present invention. Fig. 9 As shown, corresponding to the above multi-dimensional text scoring method, the present invention also provides a multi-dimensional text scoring device. The multi-dimensional text scoring device includes a unit for executing the above multi-dimensional text scoring method, and the device can be configured in a terminal or a server. Specifically, please refer to Fig. 9 The multi-dimensional text scoring device includes an acquisition unit 901, a conversion unit 902, a scoring unit 903 and a determination unit 904, wherein:

[0099] An acquisition unit 901 is used to acquire the text to be rated;

[0100] A conversion unit 902, configured to convert the to-be-scored text into a text feature vector according to a preset text conversion network model;

[0101] The scoring unit 903 is used to score the text feature vectors based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, so as to obtain the dimension score of the text to be scored under each scoring dimension;

[0102] The determination unit 904 is used to determine the target score of the text to be scored according to the dimension score.

[0103] In some embodiments, the scoring unit 903 is specifically used to:

[0104] For the LSTM scoring model corresponding to each scoring dimension, the sentence score of each sentence feature vector in the text feature vector is determined respectively by the scoring logic of the LSTM layer in the LSTM scoring model;

[0105] The sentence scores are scaled and processed by the pooling layer in the LSTM scoring model to obtain processed sentence scores;

[0106] The processed sentence scores are weightedly distributed through the dense layer in the LSTM scoring model to obtain the dimension scores of the text to be scored.

[0107] In some embodiments, the scoring unit 903 is further specifically configured to:

[0108] Determine the sentence length corresponding to each of the processed sentence scores;

[0109] Determining weights corresponding to the processed sentence scores respectively according to the sentence lengths through the dense layer;

[0110] The processed sentence scores are weightedly distributed according to the weights through the dense layer to obtain the dimension scores of the text to be scored.

[0111] In some embodiments, the conversion unit 902 is specifically used to:

[0112] Splitting the text to be scored into multiple words;

[0113] Converting the multiple words into multiple word feature vectors respectively according to the word embedding layer in the text conversion network model;

[0114] Determine a sentence feature vector of the text to be scored based on the multiple word feature vectors;

[0115] The sentence feature vector is weightedly distributed according to the dense layer in the text conversion network model to obtain the text feature vector.

[0116] In some embodiments, the conversion unit 902 is further specifically configured to:

[0117] In the convolutional layer of the text conversion network model, using filters to obtain dispersed sentence vectors of the plurality of word feature vectors;

[0118] The scattered sentence feature vectors are scaled uniformly according to the pooling layer in the text conversion network model to obtain the sentence feature vectors.

[0119] In some embodiments, the determining unit 904 is specifically configured to:

[0120] Determine the comprehensive score of the text to be rated according to the weight corresponding to each rating dimension and the dimension score;

[0121] The comprehensive score and the dimension scores are determined as the target scores.

[0122] In some embodiments:

[0123] The acquisition unit 901 is further configured to receive a modified text corresponding to the text to be rated;

[0124] The conversion unit 902 is further used to convert the modified text into a modified text feature vector according to the text conversion network model;

[0125] The scoring unit 903 is further used to score the modified text feature vectors respectively based on the LSTM scoring model to obtain the modified text dimension score of the modified text under each scoring dimension;

[0126] The determining unit 904 is further configured to determine a modified text target score of the modified text according to the modified text dimension score;

[0127] Fig.10 FIG. 1 is a schematic block diagram of a multi-dimensional text scoring device provided by another embodiment of the present invention. Fig.10 As shown, the multi-dimensional text scoring device of this embodiment is based on the above embodiment and adds a comparison unit 905.

[0128] The comparison unit 905 is used to compare the target score with the modified text target score to obtain a score comparison result.

[0129] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned multi-dimensional text scoring device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0130] The multi-dimensional text scoring device can be implemented in the form of a computer program. Fig.11 Runs on the computer device shown.

[0131] See also Fig.11 , Fig.11 1 is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 1100 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0132] See also Fig.11 The computer device 1100 includes a processor 1102 , a memory, and a network interface 1105 connected via a system bus 1101 , wherein the memory may include a non-volatile storage medium 1103 and an internal memory 1104 .

[0133] The non-volatile storage medium 1103 can store an operating system 11031 and a computer program 11032. The computer program 11032 includes program instructions, and when the program instructions are executed, the processor 1102 can execute a multi-dimensional text scoring method.

[0134] The processor 1102 is used to provide computing and control capabilities to support the operation of the entire computer device 1100 .

[0135] The internal memory 1104 provides an environment for the operation of the computer program 11032 in the non-volatile storage medium 1103. When the computer program 11032 is executed by the processor 1102, the processor 1102 can execute a multi-dimensional text scoring method.

[0136] The network interface 1105 is used to communicate with other devices over the network. Those skilled in the art will appreciate that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 1100 to which the solution of the present invention is applied. The specific computer device 1100 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0137] The processor 1102 is used to run the computer program 11032 stored in the memory to implement the following steps:

[0138] Get the text to be rated;

[0139] Converting the text to be scored into a text feature vector according to a preset text conversion network model;

[0140] Based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, the text feature vector is scored respectively to obtain the dimension score of the text to be scored under each scoring dimension;

[0141] The target score of the text to be scored is determined according to the dimension scores.

[0142] In some embodiments, when the processor 1102 implements the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, scores the text feature vectors respectively, and obtains the dimension score of the text to be scored under each scoring dimension, the following steps are specifically implemented:

[0143] For the LSTM scoring model corresponding to each scoring dimension, the sentence score of each sentence feature vector in the text feature vector is determined respectively by the scoring logic of the LSTM layer in the LSTM scoring model;

[0144] The sentence scores are scaled and processed by the pooling layer in the LSTM scoring model to obtain processed sentence scores;

[0145] The processed sentence scores are weightedly distributed through the dense layer in the LSTM scoring model to obtain the dimension scores of the text to be scored.

[0146] In some embodiments, when the processor 1102 implements the step of performing weighted distribution processing on the processed sentence scores through the dense layer in the LSTM scoring model to obtain the dimension score of the text to be scored, the processor 1102 specifically implements the following steps:

[0147] Determine the sentence length corresponding to each of the processed sentence scores;

[0148] Determining weights corresponding to the processed sentence scores respectively according to the sentence lengths through the dense layer;

[0149] The processed sentence scores are weightedly distributed according to the weights through the dense layer to obtain the dimension scores of the text to be scored.

[0150] In some embodiments, when the processor 1102 implements the step of converting the to-be-scored text into a text feature vector according to a preset text conversion network model, the processor 1102 specifically implements the following steps:

[0151] Splitting the text to be scored into multiple words;

[0152] Converting the multiple words into multiple word feature vectors respectively according to the word embedding layer in the text conversion network model;

[0153] Determine a sentence feature vector of the text to be scored based on the multiple word feature vectors;

[0154] The sentence feature vector is weightedly distributed according to the dense layer in the text conversion network model to obtain the text feature vector.

[0155] In some embodiments, when the processor 1102 implements the step of determining the sentence feature vector of the to-be-scored text according to the multiple word feature vectors, the processor 1102 specifically implements the following steps:

[0156] In the convolutional layer of the text conversion network model, using filters to obtain dispersed sentence vectors of the plurality of word feature vectors;

[0157] The scattered sentence feature vectors are scaled uniformly according to the pooling layer in the text conversion network model to obtain the sentence feature vectors.

[0158] In some embodiments, when the processor 1102 implements the step of determining the target score of the to-be-scored text according to the dimension score, the processor 1102 specifically implements the following steps:

[0159] Determine the comprehensive score of the text to be rated according to the weight corresponding to each rating dimension and the dimension score;

[0160] The comprehensive score and the dimension scores are determined as the target scores.

[0161] In some embodiments, after implementing the step of determining the target score of the to-be-scored text according to the dimension score, the processor 1102 further implements the following steps:

[0162] Receiving a modified text corresponding to the text to be rated;

[0163] Converting the modified text into a modified text feature vector according to the text conversion network model;

[0164] Based on the LSTM scoring model, the modified text feature vectors are scored respectively to obtain a modified text dimension score of the modified text under each scoring dimension;

[0165] Determining a modified text target score of the modified text according to the modified text dimension score;

[0166] The target score is compared with the modified text target score to obtain a score comparison result.

[0167] It should be understood that in the embodiment of the present invention, the processor 1102 may be a central processing unit (CPU), and the processor 1102 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0168] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0169] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:

[0170] Get the text to be rated;

[0171] Converting the text to be scored into a text feature vector according to a preset text conversion network model;

[0172] Based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, the text feature vector is scored respectively to obtain the dimension score of the text to be scored under each scoring dimension;

[0173] The target score of the text to be scored is determined according to the dimension scores.

[0174] In some embodiments, when the processor executes the program instructions to implement the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, scores the text feature vectors respectively, and obtains the dimension score of the text to be scored under each scoring dimension, the following steps are specifically implemented:

[0175] For the LSTM scoring model corresponding to each scoring dimension, the sentence score of each sentence feature vector in the text feature vector is determined respectively by the scoring logic of the LSTM layer in the LSTM scoring model;

[0176] The sentence scores are scaled and processed by the pooling layer in the LSTM scoring model to obtain processed sentence scores;

[0177] The processed sentence scores are weightedly distributed through the dense layer in the LSTM scoring model to obtain the dimension scores of the text to be scored.

[0178] In some embodiments, when the processor executes the program instructions to implement the step of performing weighted distribution processing on the processed sentence scores through the dense layer in the LSTM scoring model to obtain the dimension score of the text to be scored, the following steps are specifically implemented:

[0179] Determine the sentence length corresponding to each of the processed sentence scores;

[0180] Determining weights corresponding to the processed sentence scores respectively according to the sentence lengths through the dense layer;

[0181] The processed sentence scores are weightedly distributed according to the weights through the dense layer to obtain the dimension scores of the text to be scored.

[0182] In some embodiments, when the processor executes the program instructions to implement the step of converting the to-be-scored text into a text feature vector according to a preset text conversion network model, the processor specifically implements the following steps:

[0183] Splitting the text to be scored into multiple words;

[0184] Converting the multiple words into multiple word feature vectors respectively according to the word embedding layer in the text conversion network model;

[0185] Determine a sentence feature vector of the text to be scored based on the multiple word feature vectors;

[0186] The sentence feature vector is weightedly distributed according to the dense layer in the text conversion network model to obtain the text feature vector.

[0187] In some embodiments, when the processor executes the program instructions to implement the step of determining the sentence feature vector of the text to be scored according to the multiple word feature vectors, the processor specifically implements the following steps:

[0188] In the convolutional layer of the text conversion network model, using filters to obtain dispersed sentence vectors of the plurality of word feature vectors;

[0189] The scattered sentence feature vectors are scaled uniformly according to the pooling layer in the text conversion network model to obtain the sentence feature vectors.

[0190] In some embodiments, when the processor executes the program instructions to implement the step of determining the target score of the to-be-scored text according to the dimension score, the processor specifically implements the following steps:

[0191] Determine the comprehensive score of the text to be rated according to the weight corresponding to each rating dimension and the dimension score;

[0192] The comprehensive score and the dimension scores are determined as the target scores.

[0193] In some embodiments, after executing the program instructions to implement the step of determining the target score of the to-be-scored text according to the dimension score, the processor further implements the following steps:

[0194] Receiving a modified text corresponding to the text to be rated;

[0195] Converting the modified text into a modified text feature vector according to the text conversion network model;

[0196] Based on the LSTM scoring model, the modified text feature vectors are scored respectively to obtain a modified text dimension score of the modified text under each scoring dimension;

[0197] Determining a modified text target score of the modified text according to the modified text dimension score;

[0198] The target score is compared with the modified text target score to obtain a score comparison result.

[0199] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0200] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0201] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0202] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0203] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a terminal, or a computer device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0204] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A multi-dimensional text scoring method, characterized in that: include: Get the text to be rated; The text to be scored is converted into a text feature vector according to a preset text conversion network model, wherein the text conversion network model includes a word embedding layer, a convolution layer, a pooling layer and a dense layer; Based on the LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions, the text feature vector is scored respectively to obtain the dimension score of the text to be scored under each scoring dimension; Determining a target score for the text to be scored according to the dimension score; The LSTM scoring model corresponding to each scoring dimension in the preset multiple scoring dimensions is used to score the text feature vectors respectively to obtain the dimension score of the text to be scored in each scoring dimension, including: For the LSTM scoring model corresponding to each scoring dimension, the sentence score of each sentence feature vector in the text feature vector is determined respectively by the scoring logic of the LSTM layer in the LSTM scoring model; The sentence scores are scaled and processed by the pooling layer in the LSTM scoring model to obtain processed sentence scores; The processed sentence scores are weightedly distributed through the dense layer in the LSTM scoring model to obtain the dimension scores of the text to be scored.

2. The method according to claim 1, characterized in that The weighted distribution processing of the processed sentence scores by the dense layer in the LSTM scoring model to obtain the dimension score of the text to be scored includes: Determine the sentence length corresponding to each of the processed sentence scores; Determining weights corresponding to the processed sentence scores respectively according to the sentence lengths through the dense layer; The processed sentence scores are weightedly distributed according to the weights through the dense layer to obtain the dimension scores of the text to be scored.

3. The method according to claim 1, characterized in that The step of converting the to-be-scored text into a text feature vector according to a preset text conversion network model includes: Splitting the text to be scored into multiple words; Converting the multiple words into multiple word feature vectors respectively according to the word embedding layer in the text conversion network model; Determine a sentence feature vector of the text to be scored based on the multiple word feature vectors; The sentence feature vector is weightedly distributed according to the dense layer in the text conversion network model to obtain the text feature vector.

4. The method according to claim 3, characterized in that The step of determining the sentence feature vector of the text to be scored according to the multiple word feature vectors includes: In the convolutional layer of the text conversion network model, using filters to obtain dispersed sentence vectors of the plurality of word feature vectors; The scattered sentence feature vectors are scaled uniformly according to the pooling layer in the text conversion network model to obtain the sentence feature vectors.

5. The method according to any one of claims 1 to 4, characterized in that Determining the target score of the to-be-scored text according to the dimension score includes: Determine the comprehensive score of the text to be rated according to the weight corresponding to each rating dimension and the dimension score; The comprehensive score and the dimension scores are determined as the target scores.

6. The method according to any one of claims 1 to 4, characterized in that After determining the target score of the text to be scored according to the dimension score, the method further includes: Receiving a modified text corresponding to the text to be rated; Converting the modified text into a modified text feature vector according to the text conversion network model; Based on the LSTM scoring model, the modified text feature vectors are scored respectively to obtain a modified text dimension score of the modified text under each scoring dimension; Determining a modified text target score of the modified text according to the modified text dimension score; The target score is compared with the modified text target score to obtain a score comparison result.

7. A multi-dimensional text scoring device, characterized in that: include: An acquisition unit, used to acquire the text to be rated; A conversion unit, used for converting the to-be-scored text into a text feature vector according to a preset text conversion network model, wherein the text conversion network model includes a word embedding layer, a convolution layer, a pooling layer, and a dense layer; A scoring unit, configured to score the text feature vectors based on the LSTM scoring model corresponding to each of the preset multiple scoring dimensions, to obtain a dimension score of the text to be scored under each scoring dimension; A determination unit, configured to determine a target score for the text to be scored according to the dimension score; The scoring unit is specifically used for: For the LSTM scoring model corresponding to each scoring dimension, the sentence score of each sentence feature vector in the text feature vector is determined respectively by the scoring logic of the LSTM layer in the LSTM scoring model; The sentence scores are scaled and processed by the pooling layer in the LSTM scoring model to obtain processed sentence scores; The processed sentence scores are weightedly distributed through the dense layer in the LSTM scoring model to obtain the dimension scores of the text to be scored.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 6 can be implemented.

Citation Information

Patent Citations

  • Data processing method and data processing device

    CN111199151A

  • Composition reviewing method and system based on neural network

    CN112527968A