A fast method for inputting teaching data into teaching system
By clustering students and building a personalized handwriting recognition model, the problem of low accuracy in student handwriting recognition is solved and the accuracy of students' scores is improved.
Patent Information
- Application Number
- CN202411110384.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the existing technology, the recognition accuracy of students' handwritten content is not high, which affects the accuracy of students' scores.
By obtaining the character images and true value labels of multiple students' fill-in-the-blank areas, we calculate handwriting consistency, cluster students, build personalized handwriting content recognition models, and use these models to identify the target students' fill-in-the-blank areas.
It improves the recognition accuracy of students' handwritten content and enhances the accuracy of students' scores.
Smart Images

Figure CN118629055B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a method for quickly entering teaching data for a teaching system. Background Art
[0002] With the continuous advancement of educational informatization, the collection, management and analysis of teaching data have become increasingly important. In the field of educational assessment, answer sheets, as a standardized examination tool, are widely used in various examinations. With the rapid development of artificial intelligence, the technology for rapid entry of answer sheet data is also constantly innovating and improving. How to efficiently and accurately enter answer sheet data has become a challenge to improve the level of examination management.
[0003] In some scenarios, the input of answer sheet data mainly relies on scanning recognition technology. After the examinee fills in the answer on the answer sheet, the invigilator scans the answer sheet into an electronic image through a high-speed scanner. Then the image information of the electronic image is converted into structured data information through image processing and optical character recognition (OCR) technology. Among them, the answer sheet usually consists of three parts: multiple-choice questions, fill-in-the-blank questions, and answer questions. Since the answers to multiple-choice questions and fill-in-the-blank questions are standard, they are usually automatically graded by the teaching system according to the preset answers. Since the answers to answer questions are not standard, teachers usually need to modify them manually. Among them, multiple-choice questions can be directly implemented through optical mark recognition (OMR) technology, which can read the filled-in area of the multiple-choice questions on the answer sheet and compare it with the correct answer. The answer question directly captures the image of the corresponding area of the answer sheet as the target area and is graded by the teacher. Since the fill-in-the-blank questions are completed by students' handwriting, the students' handwriting is first recognized and then compared with the standard answers. When recognizing students' handwriting, a handwriting recognition model is usually trained using a neural network, and then the handwriting of all students is recognized. However, since each student has his or her own handwriting style and habits, using a single handwriting model is difficult to capture each student's unique handwriting habits and style, resulting in low accuracy in handwriting recognition for some students, which in turn affects the accuracy of subsequent student scores. Summary of the invention
[0004] In order to solve the technical problem of low accuracy in recognizing students' handwritten content, the present invention aims to provide a method for quickly entering teaching data for a teaching system. The technical solution adopted is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for quickly entering teaching data into a teaching system, comprising: obtaining fill-in-the-blank question areas in a first target answer sheet of multiple students, wherein the fill-in-the-blank question areas include fill-in-the-blank question areas of multiple fill-in-the-blank questions; determining a character image of each character in each of the fill-in-the-blank areas and a true value label corresponding to each of the character images; determining a handwriting consistency between a current student and other students based on the strokes of the characters corresponding to the character images, wherein the handwriting consistency indicates the degree of consistency of the handwriting between the current student and other students, and the handwriting consistency is proportional to the degree of consistency of the handwriting between the current student and other students; clustering all students based on the handwriting consistency to obtain multiple clusters, wherein the handwriting consistency between students in each of the clusters is greater than a threshold; constructing a handwriting content recognition model for each cluster, wherein the handwriting content recognition model is trained based on the character image of each character in each of the fill-in-the-blank areas of the students in each of the clusters and the true value label corresponding to each of the character images; using each of the handwriting content recognition models to recognize the characters in the fill-in-the-blank areas in the second target answer sheet of the target student to obtain teaching data, and entering the teaching data into the teaching system.
[0006] Optionally, determining the handwriting consistency between the current student and other students based on the strokes of the character corresponding to the character image includes: determining the strokes corresponding to the current character image, the current character being the same character in the fill-in-blank area of the current student and the other students; determining the single-character handwriting consistency of the current character of the current student and the other students based on the strokes corresponding to the current character image of the current student and the strokes of the current character image of the other students; determining the handwriting consistency between the current student and other students based on the single-character handwriting consistency of the current character of the current student and the current characters of the other students.
[0007] Optionally, determining the strokes corresponding to the current character image includes: determining the handwriting direction value of each valid pixel in the current character image; dividing the character corresponding to the character image into strokes according to the handwriting direction values of each valid pixel to obtain multiple initial strokes; determining a merging probability value of adjacent initial strokes, the merging probability value indicating the continuity between the adjacent initial strokes, and the merging probability value is inversely proportional to the continuity between the adjacent initial strokes; merging adjacent initial strokes whose merging probability values are less than a threshold to obtain the strokes corresponding to the current character image.
[0008] Optionally, determining the handwriting direction value of each valid pixel point in the current character image includes: determining a first distance between the two farthest valid pixels in a continuous interval in the horizontal direction where the current valid pixel point of the current character image is located; determining a second distance between the two farthest valid pixels in a continuous interval in the vertical direction where the current valid pixel point of the current character image is located; and determining the handwriting direction value of the current valid pixel point based on the first distance and the second distance.
[0009] Optionally, dividing the character corresponding to the character image into strokes according to the handwriting direction value of each effective pixel point to obtain multiple initial strokes includes: traversing the handwriting direction values of the effective pixel points in each row of the current character image, and taking the handwriting direction value with the largest number of occurrences of all effective pixel points in each row as the marked handwriting direction value of each row; drawing a fluctuation curve according to the marked handwriting direction value of each row; determining the area where the marked handwriting direction value changes from the fluctuation curve, and one area indicates an initial stroke of the character; extracting the longest edge in the area through an edge detection algorithm, and taking the longest edge as the stroke outline of the initial stroke.
[0010] Optionally, determining the merging probability value of adjacent initial strokes includes: determining the curvature value of a first contour extension line and a curvature value of a second contour extension line of the stroke contour of the adjacent initial stroke; and determining the absolute value of the difference between the curvature value of the first contour extension line and the curvature value of the second contour extension line as the merging probability value of the adjacent initial strokes.
[0011] Optionally, determining the consistency of single-character handwriting of the current character of the current student and other students based on the strokes corresponding to the current character image of the current student and the strokes of the current character images of other students includes: determining the first stroke number of the character corresponding to the current character image of the current student, and the second stroke number of the character corresponding to the current character image of the other students; determining the first curvature value of each stroke of the character corresponding to the current character image of the current student, and the second curvature value of each stroke of the character corresponding to the current character image of the other students; determining the single-character handwriting consistency of the current character of the current student and the current character of the other students based on the first stroke number, the second stroke number, the first curvature value and the second curvature value.
[0012] Optionally, determining the handwriting consistency between the current student and other students based on the single-character handwriting consistency between the current student's current character and the current characters of other students includes: determining the number of current characters of the current student and other students; superimposing the single-character handwriting consistency of the current student and the current characters of other students to obtain the superimposed handwriting consistency; and determining the ratio of the superimposed handwriting consistency to the number as the handwriting consistency between the current student and other students.
[0013] Optionally, determining the character image of each character in each of the fill-in-the-blank areas and the true value label corresponding to each of the character images includes: skeletonizing the image of the fill-in-the-blank area to obtain a central axis skeleton of each of the characters; separating each character in the image of the fill-in-the-blank area based on the central axis skeleton to obtain a character image; identifying the true value of the character in the character image, and using the true value of the character as the true value label.
[0014] Optionally, obtaining fill-in-the-blank question areas in first target answer sheets of multiple students includes: obtaining an answer sheet template of the first target answer sheet; setting the pixel grayscale value of each answer area in the answer sheet template to a first value, and setting the pixel grayscale values of other areas outside the answer area to a second value, to obtain a mask image of the answer sheet template; and determining the fill-in-the-blank question areas in the first target answer sheet using the mask image.
[0015] In a second aspect, an embodiment of the present application provides a system for quickly entering teaching data into a teaching system, and the system for quickly entering teaching data into a teaching system comprises: a processor and a memory; wherein the memory is used to store computer programs that can be run on the processor; and the processor is used to execute the programs stored in the memory to implement the steps of the method for quickly entering teaching data into a teaching system as mentioned in the first aspect above.
[0016] The present invention has the following beneficial effects: by obtaining the fill-in-the-blank question areas in the first target answer sheets of multiple students, the fill-in-the-blank question areas include the fill-in-the-blank question areas of multiple fill-in-the-blank questions, and then determining the character image of each character in each fill-in-the-blank area and the true value label of each character image, determining the handwriting consistency between the current student and other students according to the character strokes corresponding to the character image, the handwriting consistency is the degree of consistency of the handwriting between the current student and other students, and the handwriting consistency is proportional to the degree of consistency of the handwriting between the current student and other students; then clustering all students according to the handwriting consistency to obtain multiple clusters, the handwriting consistency between each student in each cluster is greater than a threshold value, and after the clustering is completed, the handwriting consistency between each student in each cluster is greater than a threshold value. The handwritings of all students are similar; therefore, a personalized handwriting content recognition model is constructed for each cluster. The handwriting content recognition model is trained based on the character image of each character in each fill-in-the-blank area of each student in each cluster and the true value label corresponding to each character image. Finally, each handwriting content recognition model is used to recognize the characters in the fill-in-the-blank area of the second target answer sheet of the target student to obtain teaching data. That is, each handwriting content recognition model can be used to recognize the personalized handwriting content of each student, so as to more accurately capture each student's unique handwriting habits and style, improve the accuracy of handwriting content recognition for some students, and then improve the accuracy of subsequent student scores. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flowchart of a method for quickly entering teaching data for a teaching system provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of multiple answer areas in a first target answer sheet provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of characters extracted from three character images provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of another extracted character image provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of handwriting division intervals provided by an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of the structure of a teaching data rapid input system for a teaching system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method for quickly entering teaching data for a teaching system proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0025] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0026] A specific scheme of a method for quickly entering teaching data for a teaching system provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0027] Embodiment 1:
[0028] See also Figure 1 , which shows a flow chart of a method for quickly entering teaching data for a teaching system provided by an embodiment of the present invention, comprising:
[0029] Step S101, obtaining the fill-in-the-blank question area in the first target answer sheet of multiple students.
[0030] The fill-in-the-blank question area includes multiple fill-in-the-blank question areas.
[0031] Specifically, each student's paper answer sheet includes a multiple-choice question area, a fill-in-the-blank question area, and an answer question area. Each student has a corresponding answer sheet, and the multiple-choice question area, the fill-in-the-blank question area, and the answer question area of the paper answer sheet contain the answers filled in by the student for the test paper content. The first target answer sheet can be an electronic answer sheet obtained by scanning the paper answer sheet with a high-speed scanner. The first target answer sheet includes a multiple-choice question area, a fill-in-the-blank question area, and an answer question area, as well as characters filled in by students in corresponding areas. For the fill-in-the-blank question area, it includes multiple fill-in-the-blank question fill-in areas, and the fill-in-the-blank area includes characters filled in by students.
[0032] In one possible implementation, the fill-in-the-blank question areas in the first target answer sheets of multiple students may be obtained as follows: an answer sheet template of the first target answer sheet is obtained; the grayscale value of the pixels in each answer area in the answer sheet template is set to a first value, and the grayscale values of the pixels in other areas outside the answer area are set to a second value, to obtain a mask image of the answer sheet template; and the fill-in-the-blank question areas in the first target answer sheet are determined using the mask image.
[0033] Specifically, the answer sheet template refers to a blank answer sheet without answers filled in. The answer sheet template and the first target answer sheet are for the same test paper. Students can fill in the answers to the multiple-choice questions, fill-in-the-blank questions and solution questions of the test paper in the multiple-choice question area, fill-in-the-blank question area and solution question area corresponding to the answer sheet template to obtain each student's first target answer sheet. Mark each answer area in the answer sheet template, such as marking the multiple-choice question area, fill-in-the-blank question area and solution question area of the answer sheet, and then set the grayscale value of the pixel points of the marked answer area in the answer sheet template to 0, and set the grayscale value of the pixel points in other areas outside the answer area to 1, to obtain the mask image of the answer sheet template. Then use the mask image to divide the electronic version of the first target answer sheet into areas, so as to obtain multiple answer areas. Figure 2 As shown, the number "1" is marked as the multiple-choice question area, the number "2" is marked as the fill-in-the-blank question area, and the numbers "3" to "5" are marked as the answer question area. It is worth noting that the answer sheet template can also be of other types, and the embodiment of the present application is not limited here.
[0034] Among them, the answers to the multiple-choice questions area can be extracted using OMR technology, and the extracted answers can be directly entered into the teaching system. The images on the corresponding areas of each answer question in the solution question area can be directly uploaded to the teaching system. For the fill-in-the-blank question area, the processing method in the following embodiment can be adopted.
[0035] Step S103, determining the character image of each character in each blank-filling area and the true value label corresponding to each character image.
[0036] Specifically, for each fill-in-the-blank area corresponding to each fill-in-the-blank question, including the characters filled in by the students, there are as many character images as there are characters in the fill-in-the-blank area, and each character corresponds to a character image. Among them, the character image of each character in the fill-in-the-blank area can be extracted, and each character image corresponds to a true value label, which is the true value of the character in the character image. For example, Figure 3 As shown, the characters extracted from the three character images are 7, 9, and 2, respectively, and the true value labels corresponding to the three character images are 7, 9, and 2, respectively.
[0037] In one possible implementation, determining the character image of each character in each fill-in-the-blank area and the true value label corresponding to each character image includes: skeletonizing the image of the fill-in-the-blank area to obtain the medial skeleton of each character; separating each character in the image of the fill-in-the-blank area based on the medial skeleton to obtain a character image; and identifying the true value of the character in the character image, and using the true value of the character as the true value label.
[0038] Specifically, the image of the fill-in-the-blank area can be skeletonized using a skeleton extraction algorithm (Skeletonize algorithm) to obtain the medial skeleton of each character, and then the watershed algorithm can be used to separate each character in the image of the fill-in-the-blank area to obtain the character image of each character. In order to facilitate later processing, each character image can also be size normalized. Among them, the skeleton extraction algorithm (Skeletonize algorithm) and the watershed algorithm can be existing technologies, and the skeleton extraction algorithm (Skeletonize algorithm) and the watershed algorithm in the existing technology also belong to the protection scope of this application, and the embodiments of this application will not be repeated here. After obtaining the character image, the image recognition model can be used to identify the true value of the character in each character image, or the true value of the character in each character image can be identified in an artificial way, and the true value is recorded as the true value label of the character image.
[0039] Step S105, determining the handwriting consistency between the current student and other students according to the strokes of the character corresponding to the character image.
[0040] The handwriting consistency indicates the consistency degree of the handwriting between the current student and other students, and the handwriting consistency is proportional to the consistency degree of the handwriting between the current student and other students.
[0041] Specifically, the character image of each character in each student's answer sheet and its corresponding true value label are obtained through the above embodiment. Each character is composed of multiple strokes. Since each student has a unique handwriting habit and style, two strokes may be written as one stroke during the writing process, and the corresponding shape characteristics of the same character are different. Therefore, the character can be split into multiple strokes, and the handwriting consistency between students can be determined according to the strokes of the character.
[0042] In a possible implementation, determining the handwriting consistency between the current student and other students based on the strokes of the character corresponding to the character image includes: determining the strokes corresponding to the current character image, the current character being the same character in the fill-in-blank area of the current student and other students; determining the single-character handwriting consistency of the current character of the current student and other students based on the strokes corresponding to the current character image of the current student and the strokes of the current character images of other students; determining the handwriting consistency between the current student and other students based on the single-character handwriting consistency of the current character of the current student and the current characters of other students.
[0043] Specifically, for the same fill-in-the-blank question, multiple students may have the same answer, and the characters in each character image may be the same. Therefore, the strokes of the same character of different students can be determined, and the handwriting consistency of the single character between students can be determined according to the strokes of the same character of different students. When determining the strokes of the current character image, the skeleton features of each character image can be obtained, as follows Figure 4 As shown, taking the number 5 in the following image as an example, it is composed of one or more connected areas, and its regular writing strokes are 2 strokes, but its first stroke is a slanted vertical line plus a right semicircle. Since the geometric features of the slanted vertical line and the right semicircle in this stroke are quite different, if the stroke features of this stroke are directly calculated, the calculated stroke features will deviate greatly. Therefore, the number of strokes of the student's handwritten number cannot be directly determined based on the regular number of strokes, and this method will result in poor accuracy in the determined number of strokes.
[0044] Based on this, the embodiment of the present application adopts the method of analyzing the directional changes of pixel points to determine the strokes corresponding to the current character image: determining the strokes corresponding to the current character image includes: determining the handwriting direction value of each valid pixel point in the current character image; dividing the character corresponding to the character image into strokes according to the handwriting direction value of each valid pixel point to obtain multiple initial strokes; determining the merging probability value of adjacent initial strokes, the merging probability value indicates the continuity between adjacent initial strokes, and the merging probability value is inversely proportional to the continuity between adjacent initial strokes; merging adjacent initial strokes whose merging probability values are less than a threshold value to obtain the strokes corresponding to the current character image.
[0045] Specifically, for the i-th valid pixel in the character image, if the character image is a binary image, a pixel grayscale value of 1 represents a valid pixel, and the handwriting direction value can indicate whether the handwriting direction of the valid pixel is more likely to be in the horizontal direction or the vertical direction. The handwriting direction of each valid pixel in the character image can then be determined by the handwriting direction value.
[0046] When determining the handwriting direction value, the following method can be used: determine the first distance between the two farthest valid pixel points in the continuous interval in the horizontal direction where the current valid pixel point of the current character image is located; determine the second distance between the two farthest valid pixel points in the continuous interval in the vertical direction where the current valid pixel point of the current character image is located; determine the handwriting direction value of the current valid pixel point based on the first distance and the second distance.
[0047] Specifically, the handwriting direction value can be calculated by the following formula:
[0048]
[0049] In the above formula, Indicates the handwriting direction value of the i-th valid pixel point, Indicates the distance (first distance) between the two farthest valid pixels in the continuous interval in the horizontal direction where the i-th valid pixel is located. Indicates the distance (second distance) between the two farthest valid pixels in the continuous interval in the vertical direction where the i-th valid pixel is located. It means that the distribution length of the effective pixels in the horizontal direction where the i-th effective pixel is located is greater than the distribution length of the effective pixels in the vertical direction. The handwriting direction of the corresponding i-th effective pixel is more likely to be in the horizontal direction. Therefore, the handwriting direction value of the i-th effective pixel is 1, indicating that the handwriting direction is horizontal. When , it means that the handwriting direction value of the i-th valid pixel point is 2, which means that the handwriting direction is vertical.
[0050] After obtaining the handwriting direction value of each valid pixel point, each turning point of the character in the writing process is determined by the change of the handwriting direction, so that the character is divided into multiple small strokes, that is, the initial stroke of the character is obtained. When performing stroke division, when obtaining the initial stroke, the following method can be used: traverse the handwriting direction value of the valid pixel points of each row of the current character image, and use the handwriting direction value with the most occurrences of all valid pixel points in each row as the marked handwriting direction value of each row; draw a fluctuation curve according to the marked handwriting direction value of each row; determine the area where the marked handwriting direction value changes from the fluctuation curve, and one area indicates an initial stroke of the character; extract the longest edge in the area through the edge detection algorithm, and use the longest edge as the stroke outline of the initial stroke.
[0051] Specifically, we traverse the handwriting direction values of the valid pixels in each row starting from the first row of the character image, and record the value with the most occurrences of the handwriting direction value of all valid pixels in the row as the handwriting direction value of the row (marked handwriting direction value). Then we draw the fluctuation curve of the marked handwriting direction value of each row. Figure 5 As shown in , find the interval of the change of the direction value of the marking handwriting compared with the previous direction. Figure 5 As shown, the above method can eventually find multiple areas, and then divide the characters into strokes according to the multiple areas, where each area is regarded as an initial stroke, and the specific outline of the initial stroke is determined by extracting the longest edge of the area using the Canny edge detection method, assuming that the character has a total of D initial strokes. Since the initial strokes of the character obtained by the above analysis process may split a continuous stroke into multiple small strokes, such as splitting a continuous curve stroke into multiple small curves, which does not conform to the continuity in the writing process, the strokes of the character are corrected by analyzing the curvature change relationship between the D initial strokes, thereby improving the accuracy of the strokes after the character is split.
[0052] When correcting the initial strokes, the correction can be made by merging probability values, wherein determining the merging probability values of adjacent initial strokes includes: determining the curvature value of the first contour extension line and the curvature value of the second contour extension line of the stroke contour of the adjacent initial strokes; determining the absolute value of the difference between the curvature value of the first contour extension line and the curvature value of the second contour extension line as the merging probability value of the adjacent initial strokes.
[0053] Specifically, D initial strokes are sorted from top to bottom in the character image by row, and then the curvature similarity of adjacent initial strokes is calculated to determine whether two initial strokes are merged. Specifically, the d-th initial stroke and the d+1-th initial stroke are used as adjacent initial strokes to illustrate the embodiment of the present application. For the stroke contour of the d-th initial stroke, a polynomial fitting method is used to extend the stroke contour of the d-th initial stroke, where the polynomial fitting can refer to the existing method and will not be repeated here. Then, the curvature similarity of the contour extension line of the stroke contour of the d-th initial stroke and the contour extension line of the stroke contour of the d+1-th initial stroke is used to determine whether the two initial strokes can be merged. The curvature similarity can be determined using a merge probability value, as shown in the following formula:
[0054]
[0055] In the above formula, represents the combined probability value of the dth initial stroke and the d+1th initial stroke, Indicates the curvature value of the extended outline of the d-th initial stroke. The curvature value of the extended contour of the d+1th initial stroke is represented. The curvature value can be calculated according to a discrete curvature estimation method. For details, please refer to the prior art, and the embodiments of the present application will not be described in detail here. The smaller the value of , the greater the probability of merging the d-th initial stroke and the d+1-th initial stroke, and the higher the continuity between the d-th initial stroke and the d+1-th initial stroke.
[0056] Among them, when When the value is less than the threshold, it means that the higher the continuity between the d-th initial stroke and the d+1-th initial stroke, the greater the probability of merging the d-th initial stroke and the d+1-th initial stroke, which corresponds to the need to merge the two initial strokes. After the merger is completed according to the above method, the real strokes and number of each character image are obtained. Among them, the threshold can be set according to the actual situation, such as being set to 0.3, and the embodiment of the present application is not limited here.
[0057] After determining the strokes of the characters in each student's character image, the consistency of the single-character handwriting of different students for the same character is determined by calculating the relationship between the strokes of the characters in the character images of the same character of different students and the angle change corresponding to each stroke. The consistency of the single-character handwriting of the current character of the current student and that of the current character of other students can be determined in the following manner: determining the number of first strokes of the character corresponding to the current character image of the current student, and the number of second strokes of the character corresponding to the current character images of other students; determining the first curvature value of each stroke of the character corresponding to the current character image of the current student, and the second curvature value of each stroke of the character corresponding to the current character image of other students; determining the consistency of the single-character handwriting of the current character of the current student and that of the current character of other students based on the first number of strokes, the second number of strokes, the first curvature value, and the second curvature value.
[0058] Specifically, for each student, in the fill-in-the-blank area, the same character may obtain multiple character images, and a stroke number will be calculated for each character image of the same character. The value with the most strokes can be recorded as the number of strokes of the student on the character (that is, the number of first strokes of the character corresponding to the current character image of the current student, and the number of second strokes of the character corresponding to the current character image of other students), assuming that it appears E times in total. And the mean curvature of the same stroke in these E characters is recorded as the curvature value of each stroke (that is, the first curvature value and the second curvature value). In the embodiment of the present application, the p-th student represents the current student, and the q-th student represents other students to illustrate the embodiment of the present application.
[0059] Among them, the consistency of single-character handwriting can be expressed by the following formula:
[0060]
[0061] In the above formula, It represents the single-character handwriting consistency of the k-th identical character of the p-th student and the q-th student. Represents an exponential function. Indicates the number of strokes of the kth identical character of the pth student. Indicates the number of strokes of the kth identical character of the qth student. express and The maximum value in . represents the curvature value of the jth stroke of the kth identical character of the pth student, It represents the curvature value of the j-th stroke of the k-th identical character of the q-th student.
[0062] in, The smaller the value of is, the greater the consistency of the handwriting of the kth character of the pth student and the qth student is. The smaller the value of is, the greater the consistency of the handwriting of the kth character of the pth student and the qth student is. represents the initial handwriting consistency of the kth identical character of the pth student and the qth student, Represents the correction factor, Correction is performed to obtain the final single-character handwriting consistency of the k-th identical character of the p-th student and the q-th student. The larger the value of is, the higher the consistency of the handwriting of the kth character of the pth student and the qth student is.
[0063] Furthermore, the p-th student and the q-th student may have multiple identical character images. The handwriting consistency between the current student and other students may be determined by the fact that the p-th student and the q-th student may have multiple identical character images. Specifically, the method may be as follows: determining the number of current characters of the current student and other students; superimposing the single-character handwriting consistency of the current students and other students' current characters to obtain the superimposed handwriting consistency; determining the ratio of the superimposed handwriting consistency to the number as the handwriting consistency between the current student and other students.
[0064] Among them, the handwriting consistency between the current student and other students can be expressed by the following formula:
[0065]
[0066] In the above formula, represents the handwriting consistency between the pth student and the qth student. K represents the number of the same character images between the pth student and the qth student. represents the single-character handwriting consistency of the k-th identical character of the p-th student and the q-th student, It means that the single-character handwriting consistency of the current character of the p-th student and the q-th student is superimposed to obtain the superimposed handwriting consistency. It represents the ratio of the consistency and quantity of superimposed handwriting. The larger the value of , the greater the consistency of the handwriting between the p-th student and the q-th student.
[0067] Step S107, clustering all students according to the handwriting consistency to obtain multiple clusters.
[0068] Among them, the handwriting consistency between students in each cluster is greater than the threshold.
[0069] Specifically, according to the handwriting consistency between students calculated above, students with relatively high handwriting consistency are clustered into one category, such as using the K-means clustering algorithm (K-means) to cluster all students according to the handwriting consistency between students. Suppose there are R clusters after clustering, and the consistency of the handwriting of students in each cluster is relatively high, that is, the similarity of the handwriting is relatively high. Among them, the K-means clustering algorithm can refer to the prior art, and the embodiments of this application will not be repeated here. Among them, the threshold value can be determined according to the actual situation, and the embodiments of this application are not limited here.
[0070] Step S109: construct a handwriting content recognition model for each cluster.
[0071] The handwriting content recognition model is trained based on the character image of each character in each fill-in-the-blank area of the students in each cluster and the true value label corresponding to each character image.
[0072] Among them, in the above embodiment, it is assumed that there are R clusters after clustering is completed, so the corresponding number of handwriting content recognition models that need to be constructed is R. Then, 70% of all character images of all students in each cluster are selected as training sets to train the initial handwriting content recognition model to obtain the handwriting content recognition model, and the remaining 30% are used as verification sets to verify and evaluate the handwriting content recognition model. Among them, the handwriting content recognition model can be a convolutional neural network (Convolutional Neural Network, CNN). Among them, the activation function of CNN can use a rectified linear unit (Rectified Linear Unit, RELU). After the training is completed, each handwriting content recognition model is evaluated to obtain the corresponding R handwriting content recognition models.
[0073] Step S1011, using each handwriting content recognition model to recognize the characters in the fill-in-the-blank area of the second target answer sheet of the target student, obtain teaching data, and enter the teaching data into the teaching system.
[0074] Specifically, the second target answer sheet refers to the real-time electronic answer sheet that needs to be identified, and the target student refers to the student corresponding to the real-time electronic answer sheet. According to the above embodiment, R handwriting content recognition models are constructed. When the R handwriting content recognition models are applied, the character image of each character in the blank-filling area of the real-time electronic answer sheet is obtained according to the above method embodiment, and then all the character images are input into all R handwriting content recognition models. A set of character images (which can be half of the character images of all characters in the blank-filling area of the real-time electronic answer sheet) is run on all R handwriting content recognition models. Benchmark tests are performed to select the best-performing handwriting content recognition model for real-time recognition of the characters in the blank-filling area of the second target answer sheet of the target student. Through the technical solution in the above embodiment, the characters in the blank-filling area of each student's real-time electronic answer sheet can be identified and then entered into the fill-in-the-blank answer area corresponding to the student in the teaching system, and the multiple-choice questions and answer questions are entered in accordance with the corresponding embodiment above. At this point, the input of teaching data is completed.
[0075] Through the technical solution disclosed in the embodiment of the present application, by obtaining the fill-in-the-blank question area in the first target answer sheet of multiple students, the fill-in-the-blank question area includes multiple fill-in-the-blank question areas, and then determining the character image of each character in each fill-in-the-blank area and the true value label of each character image, the handwriting consistency between the current student and other students is determined according to the character strokes corresponding to the character image, the handwriting consistency is the degree of consistency between the current student and other students, and the handwriting consistency is proportional to the degree of consistency between the current student and other students; then all students are clustered according to the handwriting consistency to obtain multiple clusters, the handwriting consistency between each student in each cluster is greater than a threshold value, and each cluster is clustered after the clustering is completed The handwritings of students in a cluster are all similar; therefore, a personalized handwriting content recognition model is constructed for each cluster. The handwriting content recognition model is trained based on the character image of each character in each fill-in-the-blank area of the students in each cluster and the true value label corresponding to each character image. Finally, each handwriting content recognition model is used to recognize the characters in the fill-in-the-blank area of the second target answer sheet of the target student to obtain teaching data. That is, each handwriting content recognition model can be used to recognize the personalized handwriting content of each student, so as to more accurately capture each student's unique handwriting habits and style, improve the accuracy of handwriting content recognition for some students, and then improve the accuracy of subsequent student scores.
[0076] Embodiment 2:
[0077] Corresponding to the teaching data fast entry method for the teaching system provided in the above embodiment, based on the same technical concept, the embodiment of the present application also provides a teaching data fast entry system for the teaching system, and the teaching data fast entry system for the teaching system is used to execute the teaching data fast entry method for the teaching system. Figure 6 A structural diagram of a teaching data rapid input system for a teaching system in order to implement each embodiment of the present application is shown as follows: Figure 6 The teaching data quick entry system for the teaching system may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, the memory 602 is used to store computer programs that can be run on the processor, and the processor is used to execute the program stored in the memory to achieve the above Figure 1 The memory 602 may be a temporary storage or a permanent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions for quickly entering teaching data for the teaching system into the system.
[0078] Furthermore, the processor 601 can be configured to communicate with the memory 602, and execute a series of computer executable instructions in the memory 602 on the teaching data rapid entry system for the teaching system. The teaching data rapid entry system for the teaching system can also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.
[0079] Specifically in this embodiment, the teaching data rapid entry system for the teaching system includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to achieve the above Figure 1 The various steps in the method embodiment are similar to those in the method embodiment, and have the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present application will not be described again here.
[0080] It should be noted that the teaching data quick entry system for the teaching system provided in the embodiment of the present application and the teaching data quick entry method for the teaching system provided in the embodiment of the present application are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned teaching data quick entry method for the teaching system, and has the same or similar beneficial effects, and the repeated parts will not be repeated.
[0081] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for quickly entering teaching data for a teaching system, characterized in that: include: Obtaining fill-in-the-blank question areas in first target answer sheets of multiple students, wherein the fill-in-the-blank question areas include fill-in-the-blank areas of multiple fill-in-the-blank questions; Determine a character image of each character in each of the blank-filled areas and a true value label corresponding to each of the character images; Determining the handwriting consistency between the current student and other students according to the strokes of the character corresponding to the character image, wherein the handwriting consistency indicates the consistency degree of the handwriting between the current student and other students, and the handwriting consistency is proportional to the consistency degree of the handwriting between the current student and other students; Clustering all students according to the handwriting consistency to obtain multiple clusters, wherein the handwriting consistency between students in each cluster is greater than a threshold; Constructing a handwriting content recognition model for each cluster respectively, wherein the handwriting content recognition model is trained based on the character image of each character in each of the blank-filling areas of the students in each of the clusters and the true value label corresponding to each of the character images; The handwriting content recognition models are used to recognize the characters in the fill-in-the-blank area of the second target answer sheet of the target student to obtain teaching data, and the teaching data is entered into the teaching system.
2. The teaching data rapid input method for a teaching system according to claim 1, characterized in that: Determining the handwriting consistency between the current student and other students according to the strokes of the character corresponding to the character image includes: Determine the strokes corresponding to the current character image, wherein the current character is the same character in the fill-in-blank area of the current student and the other students; Determine the consistency of the single-character handwriting of the current character of the current student and that of the current character of other students according to the strokes corresponding to the current character image of the current student and the strokes of the current character images of other students; The handwriting consistency between the current student and other students is determined according to the single-character handwriting consistency between the current character of the current student and the current characters of other students.
3. The teaching data rapid input method for a teaching system according to claim 2, characterized in that: Determining the strokes corresponding to the current character image includes: Determine the handwriting direction value of each valid pixel in the current character image; Dividing the character corresponding to the character image into strokes according to the handwriting direction value of each effective pixel point to obtain a plurality of initial strokes; Determine a merging probability value of adjacent initial strokes, wherein the merging probability value indicates continuity between the adjacent initial strokes, and the merging probability value is inversely proportional to the continuity between the adjacent initial strokes; Adjacent initial strokes whose merging probability values are less than a threshold are merged to obtain strokes corresponding to the current character image.
4. The teaching data rapid input method for a teaching system according to claim 3 is characterized in that: Determining the handwriting direction value of each valid pixel in the current character image comprises: Determine a first distance between two farthest valid pixel points in a continuous interval in the horizontal direction where a current valid pixel point of the current character image is located; Determine a second distance between two farthest valid pixel points in a continuous interval in a vertical direction where a current valid pixel point of the current character image is located; The handwriting direction value of the current valid pixel point is determined according to the first distance and the second distance.
5. The teaching data rapid input method for a teaching system according to claim 3 is characterized in that: The character corresponding to the character image is divided into strokes according to the handwriting direction value of each effective pixel point to obtain a plurality of initial strokes, including: Traversing the handwriting direction values of the valid pixels of each row of the current character image, and taking the handwriting direction value of the valid pixels in each row with the largest number of occurrences as the marked handwriting direction value of each row; Draw a fluctuation curve according to the direction value of the marking handwriting of each line; Determine from the fluctuation curve an area where the direction value of the marked handwriting changes, one area indicating an initial stroke of the character; The longest edge in the region is extracted by an edge detection algorithm, and the longest edge is used as the stroke outline of the initial stroke.
6. The teaching data rapid input method for a teaching system according to claim 3, characterized in that: The step of determining the merging probability value of adjacent initial strokes includes: Determine a curvature value of a first contour extension line and a curvature value of a second contour extension line of the stroke contour of the adjacent initial stroke; An absolute value of a difference between a curvature value of the first extended contour line and a curvature value of the second extended contour line is determined as a merging probability value of the adjacent initial strokes.
7. The method for quickly inputting teaching data for a teaching system according to any one of claims 2 to 6, characterized in that: The step of determining the consistency of the single-character handwriting of the current character of the current student and other students based on the strokes corresponding to the current character image of the current student and the strokes of the current character images of other students comprises: Determine the number of first strokes of the character corresponding to the current character image of the current student, and the number of second strokes of the character corresponding to the current character image of the other students; Determine a first curvature value of each stroke of the character corresponding to the current character image of the current student, and a second curvature value of each stroke of the character corresponding to the current character image of the other students; The single-character handwriting consistency of the current character of the current student and the other students is determined according to the first number of strokes, the second number of strokes, the first curvature value, and the second curvature value.
8. The method for quickly inputting teaching data for a teaching system according to any one of claims 2 to 6, characterized in that: Determining the handwriting consistency between the current student and other students according to the single-character handwriting consistency between the current character of the current student and the current characters of other students comprises: Determine the number of current characters of the current student and the other students; Superimposing the single-character handwriting consistency of the current student and the current character of the other students to obtain superimposed handwriting consistency; The ratio of the superimposed handwriting consistency to the number is determined as the handwriting consistency between the current student and other students.
9. The teaching data rapid input method for a teaching system according to claim 1, characterized in that: The determining of the character image of each character in each of the blank-filled areas and the true value label corresponding to each of the character images comprises: Performing skeleton processing on the image of the fill-in-the-blank question area to obtain the median skeleton of each character; Separating each character in the image of the fill-in-the-blank question area based on the medial skeleton to obtain a character image; The true value of the character in the character image is identified, and the true value of the character is used as the true value label.
10. The teaching data rapid input method for a teaching system according to claim 1, characterized in that: The method of obtaining the fill-in-the-blank question area in the first target answer sheet of the plurality of students comprises: Obtaining the answer sheet template of the first target answer sheet; The grayscale value of the pixels in each answer area in the answer sheet template is set to a first value, and the grayscale values of the pixels in other areas outside the answer area are set to a second value, to obtain a mask image of the answer sheet template; The mask image is used to determine the fill-in-the-blank question area in the first target answer sheet.
