A method and apparatus for essay grading based on a large model
By extracting and correcting handwritten stroke feature vectors and combining them with multi-dimensional large model evaluation, the problems of low handwritten text recognition accuracy and single evaluation dimension in intelligent essay grading systems have been solved, achieving efficient and accurate essay grading.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-03-13
Smart Images

Figure CN121121778B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and specifically relates to a method and apparatus for essay correction based on a large model. Background Technology
[0002] With the development of artificial intelligence technology, intelligent essay grading systems have gradually become an important tool in digital education, with core functions including handwritten text recognition and essay content evaluation. However, existing solutions still face the following key challenges in practical applications:
[0003] I. Limited Accuracy of Handwritten Text Recognition and Difficulty in Adapting to Personalized Writing Styles. Traditional handwritten text recognition (HTR) primarily relies on general-purpose deep learning models, classifying text based on whole-character image features or simple stroke features (such as direction histograms). However, handwritten text possesses highly personalized characteristics—different users exhibit significant differences in stroke strength, cursive habits, and font size. General-purpose models struggle to capture these details, resulting in typically low accuracy in recognizing complete sentences from handwritten texts, especially among younger students or in calligraphy practice scenarios. Furthermore, existing methods lack the ability to "self-learn" from user writing habits, failing to optimize model adaptation to specific users using historical data, leading to recurring recognition errors.
[0004] Second, the separation between text recognition and essay evaluation, coupled with a single and insufficiently deep evaluation dimension, results in a prevalent problem. Most existing intelligent essay grading systems employ a "recognize first, evaluate later" pipeline model: first, text content is obtained through OCR, then a general NLP model (such as BERT) is used for semantic analysis. This model has two major drawbacks: first, recognition errors propagate; a large number of errors in the text recognition stage directly affect the accuracy of subsequent evaluations; second, the evaluation dimensions are one-sided, as general NLP models focus on semantic understanding and struggle to cover the core elements of an essay—such as structural logic, language standardization, and depth of thought. Even when some systems introduce multi-model evaluation, it is often a simple patchwork, lacking professional and structured assessment of each dimension. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method and apparatus for essay grading based on a large model.
[0006] The first aspect of this application, a large-scale model-based essay correction method, mainly includes:
[0007] Step S1: Collect paper documents containing the user's handwritten essays using a scanning device and generate digital images of the essays;
[0008] Step S2: Extract the stroke feature vector of each character in the composition image;
[0009] Step S3: Input the stroke feature vector into the pre-trained character recognition model to obtain the recognition result and confidence level corresponding to each single character image;
[0010] Step S4: Select single characters with a confidence level greater than the first threshold as quasi-recognizable characters;
[0011] Step S5: When the proportion of the number of quasi-recognizable characters is less than the second threshold, determine the grammatical accuracy of the sentence containing each quasi-recognizable character.
[0012] Step S6: Construct the user's handwritten stroke library from the stroke feature vectors extracted from the quasi-recognized characters when the grammatical accuracy of the sentence exceeds the third threshold.
[0013] Step S7: Correct the stroke feature vector of each character based on the handwritten stroke library, return to step S3, and re-obtain the recognition result and confidence level corresponding to each character image until the proportion of accurately recognized characters is not lower than the second threshold.
[0014] Step S8: Determine the content of the essay based on the recognition results of all individual characters;
[0015] Step S9: Based on multiple pre-trained essay evaluation models, evaluate the essay content from different evaluation perspectives and provide scores and comments.
[0016] Preferably, step S2 further includes:
[0017] Step S21: Using an object detection model, locate the region of each handwritten character in the essay image and segment it to obtain independent single-character images;
[0018] Step S22: Refine the single-character image into a single-pixel-width skeleton;
[0019] Step S23: Perform key point detection on the single-pixel width skeleton. The key points include endpoints, intersections, and inflection points.
[0020] Step S24: Calculate the length, direction, and curvature of the line connecting each pair of key points belonging to the same stroke;
[0021] Step S25: The stroke feature vector of a single character is formed by splicing together the length, direction, curvature of each key point pair, as well as the total number of strokes, number of intersections, and number of closed loops of the single character.
[0022] Preferably, in step S7, the correction of the stroke feature vector of each character based on the handwritten stroke library includes:
[0023] Step S71: Based on the statistical mean of each feature parameter of each stroke in the handwritten stroke library, determine the value range of each feature parameter based on the floating value.
[0024] Step S72: After extracting the stroke feature vector of a single character, if all feature parameters belonging to the same stroke are within the corresponding feature parameter value range, correct all feature parameters of the stroke to the standard feature parameters.
[0025] Preferably, the floating value is set to any value from a to 2a, where a is the statistical standard deviation of the characteristic parameter.
[0026] Preferably, in step S9, the composition evaluation model includes a theme evaluation model, a structure evaluation model, a language evaluation model, a thinking evaluation model, and a normative evaluation model.
[0027] A second aspect of this application discloses a composition grading device based on a large model, which mainly includes:
[0028] The essay image acquisition module is used to collect paper documents containing users' handwritten essays through a scanning device and generate digital essay images.
[0029] The stroke feature vector extraction module is used to extract stroke feature vectors for each single character in the essay image.
[0030] The character recognition module is used to input the stroke feature vector into a pre-trained character recognition model to obtain the recognition result and confidence level corresponding to each single character image;
[0031] The quasi-recognizable character determination module is used to filter out single characters with a confidence level greater than the first threshold as quasi-recognizable characters;
[0032] The grammar accuracy determination module is used to determine the grammar accuracy of the sentence containing each quasi-recognized character when the proportion of the number of quasi-recognized characters is less than a second threshold.
[0033] The handwriting stroke library building module is used to build the user's handwriting stroke library from the stroke feature vectors extracted from the quasi-recognized characters when the grammatical accuracy of the sentence exceeds the third threshold.
[0034] The stroke feature vector correction module is used to correct the stroke feature vector of each character based on the handwritten stroke library, and re-acquire the recognition results and confidence of each character image until the proportion of accurately recognized characters is not less than the second threshold.
[0035] The essay content generation module is used to determine the essay content based on the recognition results of all individual characters;
[0036] The essay evaluation module is used to evaluate the essay content from different perspectives based on multiple pre-trained essay evaluation models, and to provide scores and comments.
[0037] Preferably, the stroke feature vector extraction module includes:
[0038] The single-character image acquisition unit is used to locate the region of each handwritten character in the essay image using a target detection model, and segment it to obtain independent single-character images.
[0039] The width skeleton extraction unit is used to refine the single-character image into a single-pixel width skeleton.
[0040] A key point detection unit is used to detect key points on the single-pixel width skeleton, wherein the key points include endpoints, intersections, and inflection points.
[0041] The parameter acquisition unit is used to calculate the length, direction, and curvature of the line connecting each pair of key points belonging to the same stroke.
[0042] The stroke feature vector determination unit is used to construct the stroke feature vector of a single character by splicing together the length, direction, curvature of each key point pair, as well as the total number of strokes, the number of intersections, and the number of closed loops of the single character.
[0043] Preferably, the stroke feature vector correction module includes:
[0044] The feature parameter value range determination unit is used to determine the value range of each feature parameter based on the statistical mean of each feature parameter of each stroke in the handwritten stroke library and the floating value.
[0045] The feature parameter correction unit is used to correct all feature parameters of a stroke to the standard feature parameters after extracting the stroke feature vector of a single character, when all feature parameters belonging to the same stroke are within the corresponding feature parameter value range.
[0046] Preferably, the floating value is set to any value from a to 2a, where a is the statistical standard deviation of the characteristic parameter.
[0047] Preferably, the composition evaluation model includes a theme evaluation model, a structure evaluation model, a language evaluation model, a thinking evaluation model, and a normative evaluation model.
[0048] This application improves the accuracy of text recognition by dynamically correcting and adapting to users' handwriting habits through stroke features, and enhances the efficiency, accuracy and consistency of essay grading through a multi-dimensional large model. Attached Figure Description
[0049] Figure 1 This is a flowchart of a preferred embodiment of the essay correction method based on a large model in this application.
[0050] Figure 2 This is a schematic diagram showing the scanned area. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are only some, not all, of the embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0052] According to the first aspect of this application, a large-scale model-based essay correction method, such as... Figure 1 As shown, it mainly includes:
[0053] Step S1: Collect paper documents containing the user's handwritten essays using a scanning device and generate digital images of the essays;
[0054] Step S2: Extract the stroke feature vector of each character in the composition image;
[0055] Step S3: Input the stroke feature vector into the pre-trained character recognition model to obtain the recognition result and confidence level corresponding to each single character image;
[0056] Step S4: Select single characters with a confidence level greater than the first threshold as quasi-recognizable characters;
[0057] Step S5: When the proportion of the number of quasi-recognizable characters is less than the second threshold, determine the grammatical accuracy of the sentence containing each quasi-recognizable character.
[0058] Step S6: Construct the user's handwritten stroke library from the stroke feature vectors extracted from the quasi-recognized characters when the grammatical accuracy of the sentence exceeds the third threshold.
[0059] Step S7: Correct the stroke feature vector of each character based on the handwritten stroke library, return to step S3, and re-obtain the recognition result and confidence level corresponding to each character image until the proportion of accurately recognized characters is not lower than the second threshold.
[0060] Step S8: Determine the content of the essay based on the recognition results of all individual characters;
[0061] Step S9: Based on multiple pre-trained essay evaluation models, evaluate the essay content from different evaluation perspectives and provide scores and comments.
[0062] This application achieves accurate essay correction through "stroke feature self-learning + multi-dimensional large model evaluation".
[0063] In step S1, the learning content is projected onto the desktop using the learning machine. The learning content includes a control area and an input / output area. The control area mainly contains operation buttons, while the input / output area is primarily used to scan files placed by the user and project the knowledge content to the user. Figure 2 As shown, the user places the essay section of the exam paper in the scanning area, then starts the scanning program, and the system can obtain a digitized image of the essay.
[0064] Step S1 further includes preprocessing the scanned essay image, including binarization and noise removal, to obtain a clear single-channel text image. For example, the Otsu adaptive thresholding algorithm is used to convert the grayscale image into a binary image to distinguish the text part from the background part; median filtering is used to eliminate salt and pepper noise.
[0065] Then, in step S2, the stroke feature vector is extracted.
[0066] In some alternative implementations, step S2 further includes:
[0067] Step S21: Using an object detection model, locate the region of each handwritten character in the essay image and segment it to obtain independent single-character images;
[0068] Step S22: Refine the single-character image into a single-pixel-width skeleton;
[0069] Step S23: Perform key point detection on the single-pixel width skeleton. The key points include endpoints, intersections, and inflection points.
[0070] Step S24: Calculate the length, direction, and curvature of the line connecting each pair of key points belonging to the same stroke;
[0071] Step S25: The stroke feature vector of a single character is formed by splicing together the length, direction, curvature of each key point pair, as well as the total number of strokes, number of intersections, and number of closed loops of the single character.
[0072] In this embodiment, step S21 is used for single-character segmentation. For example, the text region in the essay image is detected by the EAST model, the bounding box is output, and after cropping, the cursive characters are segmented by the projection method to obtain independent single-character images. Step S22 is used to extract the character skeleton. For example, the Zhang-Suen thinning algorithm is applied to iteratively delete the endpoint pixels that meet the preset conditions until there are no pixels to delete, so as to obtain the single-pixel width skeleton. Here, a single pixel means that the width direction of the character stroke occupies only one pixel. Step S23 is used to perform key point detection. Each pixel of the character skeleton is traversed, and the number of eight neighboring foreground pixels is counted. Among them, the point with only 1 neighboring pixel is the endpoint; the point with no less than 3 neighboring pixels is the intersection point; the point with the maximum local curvature (for example, the angle change between adjacent line segments is ≥30°) is the inflection point. Step S24 is used to perform parameter calculation, including the length, direction, and curvature of the key point pair. Finally, in step S25, the various parameters are concatenated to form a stroke feature vector.
[0073] For example, in step S24, the keypoint pair (p) formed by the m-th point and the n-th point... m ,p n Its direction parameter d uses eight-neighbor encoding, d∈{0,1,...,7} (corresponding to angles 0°, 45°,...,315°); length parameter ; where (x n ,y n (x) represents the x and y coordinates of the nth point. m ,y m () represents the x and y coordinates of the m-th point; curvature parameter: ,in, Let be the tangent angle at the nth point. Let be the tangent angle at the m-th point.
[0074] In step S25, the features of all key point pairs within a single stroke are... l,d,k The strokes are then spliced together, and the total number of strokes N1, the number of intersections N2, and the number of closed loops N3 are further counted. This results in a 3m+3 dimension stroke feature vector, where m is the number of key point pairs.
[0075] In steps S3-S4, character recognition and confidence filtering are performed. Stroke feature vectors are input into a pre-trained CRNN-LSTM character recognition model, which outputs single-character labels (e.g., Unicode encoding) and confidence scores p. "Quasi-recognizable characters" with p ≥ 0.9 (first threshold) are filtered. In step S5, grammatical accuracy is judged. If the proportion of quasi-recognizable characters is < 80% (second threshold), a pre-trained grammar checking model, such as a BERT-based model, is invoked to output the proportion of words conforming to grammatical rules. The grammatical accuracy of the sentence containing each quasi-recognizable character is calculated. For example, if the subject is missing, the accuracy of that sentence = number of correct words / total number of words. Step S6 is used to construct a stroke library, retaining only quasi-recognizable characters in sentences with a grammatical accuracy ≥ 70% (third threshold). Their stroke feature vectors v are extracted and stored in a database according to user ID and stroke name, forming a personalized handwritten stroke library.
[0076] Using the handwritten stroke library, step S7 is used to perform parameter correction on all the text of the same user. In this way, the stroke feature vector input into the pre-trained character recognition model in step S3 will be more standardized, and thus the corresponding text can be recognized more accurately.
[0077] In some optional implementations, step S7, correcting the stroke feature vectors of each character based on the handwritten stroke library, includes:
[0078] Step S71: Based on the statistical mean of each feature parameter of each stroke in the handwritten stroke library, determine the value range of each feature parameter based on the floating value.
[0079] Step S72: After extracting the stroke feature vector of a single character, if all feature parameters belonging to the same stroke are within the corresponding feature parameter value range, correct all feature parameters of the stroke to the standard feature parameters.
[0080] In this embodiment, it should be noted first that in step S6, since a large number of stroke features of the user are obtained, for example, the directions, lengths, and curvature parameters of multiple "horizontal" strokes, and the directions, lengths, and curvature parameters of multiple "left-falling" strokes are obtained. Based on this, the characteristic parameters of each stroke can be solidified by means of averaging to form a personalized characteristic parameter set of the user for this stroke. For example, for a certain user, the average length of the "horizontal" stroke he writes is 80%, the average curvature is 5°, and the average direction is 0. Thus, the personalized characteristic parameter set of the user for the "horizontal" stroke is {0.8, 5, 0}. For the average length parameter, it is usually solidified as the proportional value of the monomer structure of the written text. The so-called monomer structure refers to the unit after dividing the structure of the text into left-right or up-down parts. For example, the character "lin" is divided into two "mu", and only the ratio of the length of the "horizontal" stroke in the character "mu" to the width of the structure of the character "mu" needs to be calculated. By this method, the problem of inconsistent lengths of the "horizontal" stroke in different characters is avoided.
[0081] After that, in step S71, the value range of each characteristic parameter is determined based on the floating value. For example, the length floating value of the "horizontal" stroke is 2%, the curvature floating value is 0.1°, and the direction floating value is 0. Then for the "horizontal" stroke, the value range of its characteristic parameters is {0.78~0.82, 4.9~5.1, 0}. Finally, in step S72, if it is detected that the characteristic parameters of the user's "horizontal" stroke all meet the above value range, the characteristic parameters of the "horizontal" stroke are corrected and assigned according to the standard characteristic parameters. For example, the standard characteristic parameter set of the "horizontal" stroke is {0.83, 5.3, 0}.
[0082] In addition, it should be noted that in the embodiment described in steps S23 - S24 above, the calculated characteristic parameters refer to the length, direction, and curvature parameters of the connection line between key points, while in this embodiment, the length, direction, and curvature parameters of the stroke are calculated. Those skilled in the art can understand that there is a conversion logic between the two. When constructing the handwritten stroke library, the characteristic parameters of the stroke can be calculated based on the characteristic parameters of the connection line between key points, and when performing characteristic parameter correction, the characteristic parameters of the new connection lines between key points can also be calculated based on the corrected characteristic parameters of the stroke.
[0083] In some optional implementation manners, the floating value is set to any value in a - 2a, where a is the statistical standard deviation of the characteristic parameter.
[0084] In this embodiment, according to statistics, in the normal distribution, the probabilities of plus or minus one time, two times, and three times the standard deviation are 68%, 95%, and 99.7% respectively. Practice shows that the highest character recognition rate of this application is obtained by using one to two times the standard deviation as the floating value.
[0085] Finally, in steps S8-S9, all single-character recognition results are summarized to generate the essay text, and then the essay content is evaluated from different evaluation perspectives.
[0086] In some optional implementations, in step S9, the essay evaluation model includes a topic evaluation model, a structure evaluation model, a language evaluation model, a thinking evaluation model, and a normative evaluation model.
[0087] This embodiment demonstrates how to construct different evaluation criteria for essays by training different models. During model training, the essay content is manually evaluated, and the training samples are labeled from different evaluation perspectives. These labeling methods mainly include the degree to which the essay content fits the theme, the accuracy of the structure, the strength of language expression, the strength of innovative thinking, and whether it conforms to the standards. Specifically, the theme refers to the essay's central idea, examining the clarity of the theme, the depth of thought, and the quality of the materials; the structure refers to the essay's logical layout, examining the logical hierarchy, the allocation of details, and the design of the beginning and end; the language refers to the essay's expression, examining the accuracy, fluency, and expressiveness of the language; the thinking refers to the essay's creative highlights, examining the central idea, personality, culture, thinking, and innovation; and the standards examine grammatical errors, misspellings, incorrect words, punctuation, word count, and format.
[0088] After training, the system can quickly provide a score and comments for a given essay.
[0089] The second aspect of this application provides a large-model-based essay grading device corresponding to the above method, mainly comprising:
[0090] The essay image acquisition module is used to collect paper documents containing users' handwritten essays through a scanning device and generate digital essay images.
[0091] The stroke feature vector extraction module is used to extract stroke feature vectors for each single character in the essay image.
[0092] The character recognition module is used to input the stroke feature vector into a pre-trained character recognition model to obtain the recognition result and confidence level corresponding to each single character image;
[0093] The quasi-recognizable character determination module is used to filter out single characters with a confidence level greater than the first threshold as quasi-recognizable characters;
[0094] The grammar accuracy determination module is used to determine the grammar accuracy of the sentence containing each quasi-recognized character when the proportion of the number of quasi-recognized characters is less than a second threshold.
[0095] The handwriting stroke library building module is used to build the user's handwriting stroke library from the stroke feature vectors extracted from the quasi-recognized characters when the grammatical accuracy of the sentence exceeds the third threshold.
[0096] The stroke feature vector correction module is used to correct the stroke feature vector of each character based on the handwritten stroke library, and re-acquire the recognition results and confidence of each character image until the proportion of accurately recognized characters is not less than the second threshold.
[0097] The essay content generation module is used to determine the essay content based on the recognition results of all individual characters;
[0098] The essay evaluation module is used to evaluate the essay content from different perspectives based on multiple pre-trained essay evaluation models, and to provide scores and comments.
[0099] In some optional implementations, the stroke feature vector extraction module includes:
[0100] The single-character image acquisition unit is used to locate the region of each handwritten character in the essay image using a target detection model, and segment it to obtain independent single-character images.
[0101] The width skeleton extraction unit is used to refine the single-character image into a single-pixel width skeleton.
[0102] A key point detection unit is used to detect key points on the single-pixel width skeleton, wherein the key points include endpoints, intersections, and inflection points.
[0103] The parameter acquisition unit is used to calculate the length, direction, and curvature of the line connecting each pair of key points belonging to the same stroke.
[0104] The stroke feature vector determination unit is used to construct the stroke feature vector of a single character by splicing together the length, direction, curvature of each key point pair, as well as the total number of strokes, the number of intersections, and the number of closed loops of the single character.
[0105] In some optional implementations, the stroke feature vector correction module includes:
[0106] The feature parameter value range determination unit is used to determine the value range of each feature parameter based on the statistical mean of each feature parameter of each stroke in the handwritten stroke library and the floating value.
[0107] The feature parameter correction unit is used to correct all feature parameters of a stroke to the standard feature parameters after extracting the stroke feature vector of a single character, when all feature parameters belonging to the same stroke are within the corresponding feature parameter value range.
[0108] In some alternative implementations, the floating value is set to any value from a to 2a, where a is the statistical standard deviation of the characteristic parameter.
[0109] In some optional implementations, the composition evaluation model includes a topic evaluation model, a structure evaluation model, a language evaluation model, a thinking evaluation model, and a normative evaluation model.
[0110] According to a third aspect of this application, a computer system includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described large-model-based essay correction method.
[0111] According to a fourth aspect of this application, a readable storage medium stores a computer program that, when executed by a processor, is used to implement the above-described large-model-based essay correction method.
[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0113] The modules or units described in the embodiments of this application can be implemented in software or hardware. The described modules or units can also be located in a processor, and the names of these modules or units do not necessarily constitute a limitation on the module or unit itself.
[0114] The computer-readable storage medium provided in the fourth aspect of this application may be included in the apparatus described in the above embodiments; or it may exist independently and not assembled into the apparatus. The computer-readable storage medium carries one or more programs that, when executed by the apparatus, process data according to the method described above.
[0115] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for essay correction based on a large model, characterized in that, The method comprises the following steps: Step S1, acquiring a paper document containing a user's handwritten composition by a scanning device to generate a digitized composition picture; Step S2, extracting stroke feature vectors for each character in the composition picture; Step S3, inputting the stroke feature vectors into a pre-trained character recognition model to obtain the recognition result and confidence of each character image; Step S4, screening out characters with a confidence greater than a first threshold value as quasi-recognized characters; Step S5, when the proportion of the number of quasi-recognized characters is less than a second threshold value, determining the grammatical accuracy of the sentence in which each quasi-recognized character is located; Step S6, constructing a user's handwritten stroke library from the stroke feature vectors of the quasi-recognized characters in the sentence whose grammatical accuracy exceeds a third threshold value; Step S7, correcting the stroke feature vectors of each character based on the handwritten stroke library, returning to step S3 to re-obtain the recognition result and confidence of each character image until the proportion of the number of quasi-recognized characters is not less than the second threshold value; Step S8, determining the composition content according to all character recognition results; Step S9, evaluating the composition content from different evaluation angles based on a plurality of pre-trained composition evaluation large models to give scores and comments; In step S7, the correction of the stroke feature vectors of each character based on the handwritten stroke library comprises: Step S71, taking the statistical mean of each feature parameter of each stroke in the handwritten stroke library as a reference, determining the value range of each feature parameter based on a floating value; Step S72, after extracting the stroke feature vectors of the character, when all feature parameters belonging to the same stroke are located within the corresponding feature parameter value range, correcting all feature parameters of the stroke to standard feature parameters; The floating value is set to any value in a-2a, wherein a is the statistical standard deviation of the feature parameter; In step S2, the method further comprises: Step S21, using a target detection model to locate the region of each handwritten character in the composition picture to obtain independent character images by segmentation; Step S22, refining the character image into a single-pixel width skeleton; Step S23, performing key point detection on the single-pixel width skeleton, wherein the key points include end points, intersection points, and inflection points; Step S24, calculating the length, direction, and curvature of the line between each key point pair belonging to the same stroke; Step S25, concatenating the length, direction, and curvature of each key point pair, as well as the total number of strokes, the number of intersection points, and the number of closed loops of the character to form the stroke feature vector of the character.
2. The large model-based composition grading method of claim 1, wherein, In step S9, the composition evaluation large model comprises a theme evaluation large model, a structure evaluation large model, a language evaluation large model, a thinking evaluation large model, and a specification evaluation large model.
3. A composition correction device based on a large model, characterized by, The method comprises the following steps: A composition picture acquisition module is configured to acquire a paper document containing a user's handwritten composition by a scanning device to generate a digitized composition picture; A stroke feature vector extraction module is configured to extract stroke feature vectors for each character in the composition picture; A character recognition module is configured to input the stroke feature vectors into a pre-trained character recognition model to obtain the recognition result and confidence of each character image; The quasi-recognized character determination module is configured to filter out single characters with a confidence greater than a first threshold value as quasi-recognized characters; The grammar accuracy determination module is configured to determine the grammar accuracy of a sentence in which each quasi-recognized character is located when the proportion of the number of quasi-recognized characters is less than a second threshold value; The handwriting stroke library construction module is configured to construct a handwriting stroke library of a user from stroke feature vectors extracted from quasi-recognized characters whose sentence grammar accuracy exceeds a third threshold value; The stroke feature vector correction module is configured to correct the stroke feature vectors of each single character based on the handwriting stroke library, reacquire the recognition results and confidences corresponding to each single character image, and repeat the process until the proportion of the number of quasi-recognized characters is not less than the second threshold value; The composition content generation module is configured to determine the composition content according to all single character recognition results; The composition evaluation module is configured to evaluate the composition content from different evaluation angles based on a plurality of pre-trained composition evaluation large models, and give scores and comments; The stroke feature vector correction module includes: The feature parameter value range determination unit is configured to determine the value range of each feature parameter based on a floating value with the statistical mean of each feature parameter of each stroke in the handwriting stroke library as a reference; The feature parameter correction unit is configured to correct all feature parameters of a stroke to standard feature parameters when all feature parameters belonging to the same stroke are located within the corresponding feature parameter value range after the stroke feature vector extraction of a single character; The floating value is set to any value in a-2a, where a is the statistical standard deviation of the feature parameter; The stroke feature vector extraction module includes: The single character image acquisition unit is configured to use a target detection model to locate the area of each handwritten character in the composition picture and segment to obtain independent single character images; The width skeleton extraction unit is configured to thin the single character image to a single-pixel width skeleton; The key point detection unit is configured to perform key point detection on the single-pixel width skeleton, and the key points include end points, intersection points, and inflection points; The parameter acquisition unit is configured to calculate the length, direction, and curvature of the line between each key point pair belonging to the same stroke; The stroke feature vector determination unit is configured to splice the length, direction, and curvature of each key point pair, as well as the total number of strokes, the number of intersection points, and the number of closed loops of a single character to form the stroke feature vector of the single character.
4. The large model-based composition correcting apparatus according to claim 3, wherein The composition evaluation large model includes a theme evaluation large model, a structure evaluation large model, a language evaluation large model, a thinking evaluation large model, and a specification evaluation large model.
Citation Information
Patent Citations
Automatic correction method and device for handwritten composition
CN108595410A
Online handwritten character recognition method and device, electronic equipment and storage medium
CN111931710A
Mental language text image recognition wrong character correction method and system
CN120235736A