A test method, device and readable storage medium based on chapter and paper analysis

By collecting and reorganizing dot matrix data for chapters, calculating the recall rate and precision rate, determining the font judgment threshold, identifying and marking font anomalies, the problem of insufficient font size evaluation in the existing technology is solved, and the accuracy and efficiency of analysis are improved. .

CN118278385BActive Publication Date: 2024-09-17DMAI (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410676125.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-17
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing chapter volume analysis technology has shortcomings in evaluating the standardization and consistency of font size. It focuses more on text recognition and grammar checking and fails to effectively evaluate the uniformity and neatness of font size.

Method used

By obtaining the dot matrix data of the chapter to be processed, single-word evaluation is performed, and chapters with different word counts are reorganized based on preset rules, the recall rate and precision rate are calculated, the target font judgment threshold is determined, and abnormal chapters with larger or smaller fonts are identified. and marked visually.

Benefits of technology

It improves the accuracy and efficiency of chapter volume analysis. It is especially suitable for automatic assessment of writing standards and volume neatness, and can effectively identify and correct font size problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118278385B
    Figure CN118278385B
Patent Text Reader

Abstract

The present invention discloses a test method, device and readable storage medium based on chapter and paper analysis, comprising: first, obtaining multiple chapters to be processed, including those with different font sizes. Next, by collecting dot matrix data, the font size of each word is evaluated to obtain a single word evaluation result. Then, based on preset rules, these single word evaluation results are scattered and reorganized to form multiple reorganized chapters with different numbers of words. By comparing the actual samples and predicted samples of each reorganized chapter, the recall rate and precision rate are calculated. Finally, the target font judgment threshold is determined according to the actual samples, the recall rate and the precision rate, and abnormal chapters are identified from the reorganized chapters, that is, chapters with larger or smaller fonts. This method can effectively improve the accuracy and efficiency of chapter and paper analysis, and is particularly suitable for automatic evaluation scenarios of writing standards and paper neatness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of word processing technology, and in particular to a testing method, device and readable storage medium based on passage analysis. Background Art

[0002] With the continuous development of information technology, automated text analysis and evaluation tools are increasingly used in education, publishing, and other text processing fields. In particular, the demand for such tools is growing in the automatic evaluation of writing standards and neatness of the paper. However, existing text analysis technologies focus more on text recognition and grammar checking, and relatively less on the standardization and consistency evaluation of font size. Summary of the invention

[0003] The purpose of the present invention is to provide a testing method, device and readable storage medium based on passage analysis.

[0004] In a first aspect, an embodiment of the present invention provides a testing method based on passage analysis, comprising:

[0005] Acquire a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed whose sizes are uniform, larger, or smaller than those of a preset standard copybook;

[0006] Collecting dot matrix data corresponding to the plurality of passages to be processed, and determining a single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, wherein the single word evaluation result includes single words of uniform size, single words that are too large, and single words that are too small;

[0007] Based on a preset rule, the plurality of single-word evaluation results are scattered and reorganized to obtain a plurality of reorganized chapters with different numbers of words, each of the reorganized chapters including words with uniform single-word sizes and / or words with larger single words and / or words with smaller single words;

[0008] Obtaining actual samples and predicted samples corresponding to each of the reorganized chapters;

[0009] According to the actual samples and the predicted samples corresponding to each of the reorganized chapters with different word counts, the recall rate and the precision rate corresponding to each of the reorganized chapters are calculated;

[0010] Determine a target font judgment threshold according to the actual sample, the recall rate and the precision rate corresponding to each of the reorganized chapters;

[0011] According to the target font judgment threshold, an abnormal chapter is determined from the plurality of reorganized chapters, wherein the abnormal chapter includes characters having labels that are too large and / or too small as determined based on the target font judgment threshold.

[0012] In the embodiment of the present invention, the step of obtaining the actual sample and the predicted sample corresponding to each of the reorganized chapters includes:

[0013] In response to the marking operation, the characters included in each of the reorganized chapters are marked to obtain actual samples including actual labels, wherein the actual labels include labels of uniform size, labels that are larger than the average size, and labels that are smaller than the average size;

[0014] Sending the plurality of reorganized passages to a passage algorithm evaluation service for evaluation, and obtaining evaluation results of the words included in each of the reorganized passages based on the passage algorithm evaluation service;

[0015] According to the evaluation results, the characters included in each of the reorganized chapters are annotated to obtain prediction samples including prediction labels, wherein the prediction labels include labels of uniform size, labels that are relatively large, and labels that are relatively small.

[0016] In an embodiment of the present invention, the step of collecting dot matrix data corresponding to the plurality of passages to be processed, and determining the single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, comprises:

[0017] Collecting dot matrix data corresponding to the plurality of to-be-processed passages, inputting the dot matrix data into a text evaluation service, and obtaining a preliminary text evaluation result;

[0018] The preliminary text evaluation results are cleaned, and data that fail the evaluation are eliminated to obtain single-word evaluation results for each word included in the multiple passages to be processed.

[0019] In the embodiment of the present invention, after determining the abnormal chapter from the plurality of reorganized chapters according to the target font judgment threshold, the method further includes:

[0020] Obtaining abnormal scores of all words included in the abnormal chapter relative to the abnormal chapter;

[0021] According to the target font judgment threshold and the abnormal scores of all the characters relative to the abnormal chapter, all the larger fonts and smaller fonts relative to the abnormal chapter are obtained;

[0022] The abnormal scores corresponding to the relatively large font and the relatively small font are visually marked.

[0023] In the embodiment of the present invention, after visually marking the abnormal scores corresponding to the relatively large font and the relatively small font, the method further includes:

[0024] In response to a proofreading operation on the visual mark, obtaining an accuracy of the anomaly score;

[0025] When the accuracy is lower than a preset accuracy threshold, the passage algorithm evaluation service is adjusted based on the proofreading operation.

[0026] In the embodiment of the present invention, after calculating the recall rate and precision rate corresponding to each reorganized chapter according to the actual samples and the predicted samples corresponding to each reorganized chapter with different word counts, the method further includes:

[0027] From the recall rate and precision rate corresponding to each of the reorganized chapters, determine the target reorganized chapter with the highest recall rate and precision rate.

[0028] In the embodiment of the present invention, the target font judgment threshold is determined according to the actual sample, the recall rate and the precision rate corresponding to each of the reorganized chapters, including:

[0029] Obtaining a target word count corresponding to the target reorganized chapter;

[0030] Determine the percentage of larger characters and smaller characters in the target reorganized chapter according to the actual sample;

[0031] The target font determination threshold is determined according to the target number of characters, the proportion of the larger characters, and the proportion of the smaller characters.

[0032] In a second aspect, an embodiment of the present invention provides a testing device based on passage analysis, comprising:

[0033] The acquisition module is used to acquire a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed whose sizes are uniform, larger or smaller than those of the preset standard copybook; collect dot matrix data corresponding to the plurality of chapters to be processed, and determine the single word evaluation results of each word included in the plurality of chapters to be processed according to the dot matrix data, wherein the single word evaluation results include single word sizes being uniform, single words being larger or single words being smaller;

[0034] The analysis module is used to break up and reorganize the multiple single-word evaluation results based on preset rules to obtain multiple reorganized chapters with different word counts, each of which includes words with uniform single-word sizes and / or words that are larger and / or words that are smaller; obtain actual samples and predicted samples corresponding to each of the reorganized chapters; calculate the recall rate and precision rate corresponding to each of the reorganized chapters based on the actual samples and predicted samples corresponding to each of the reorganized chapters with different word counts; determine a target font judgment threshold based on the actual samples, the recall rate and the precision rate corresponding to each of the reorganized chapters; and determine abnormal chapters from the multiple reorganized chapters based on the target font judgment threshold, wherein the abnormal chapters include words with larger labels and / or smaller labels determined based on the target font judgment threshold.

[0035] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device executes the test method based on passage analysis described in at least one possible implementation of the first aspect.

[0036] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the test method based on passage analysis described in at least one possible implementation of the first aspect.

[0037] Compared with the prior art, the beneficial effects provided by the present invention include: using a test method, device and readable storage medium based on chapter and paper analysis disclosed in the present invention, multiple chapters to be processed are obtained, including cases with different font sizes. Then, by collecting dot matrix data, the font size of each word is evaluated to obtain a single word evaluation result. Then, based on preset rules, these single word evaluation results are scattered and reorganized to form multiple reorganized chapters with different numbers of words. By comparing the actual samples and predicted samples of each reorganized chapter, the recall rate and precision rate are calculated. Finally, the target font judgment threshold is determined based on the actual samples, recall rate and precision rate, and abnormal chapters are identified from the reorganized chapters, that is, chapters with larger or smaller fonts. This method can effectively improve the accuracy and efficiency of chapter and paper analysis, and is particularly suitable for automatic evaluation scenarios of writing standards and paper neatness. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.

[0039] Figure 1 A schematic diagram of the steps of a test method based on passage analysis provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a preset standard copybook for tracing Chinese characters provided in an embodiment of the present invention;

[0041] Figure 3 A schematic block diagram of the structure of a test device based on chapter and paper analysis provided by an embodiment of the present invention;

[0042] Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0044] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0045] In order to solve the technical problems in the aforementioned background technology, Figure 1 The present invention provides a flow chart of a testing method based on passage and paper analysis according to an embodiment of the present invention. The following is a detailed introduction to the testing method based on passage and paper analysis.

[0046] Step S201, obtaining a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed that are uniform in size, larger in size, or smaller in size than a preset standard copybook;

[0047] Step S202, collecting dot matrix data corresponding to the plurality of passages to be processed, and determining a single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, wherein the single word evaluation result includes single words of uniform size, single words that are too large, and single words that are too small;

[0048] Step S203, breaking up and reorganizing the plurality of single-word evaluation results based on a preset rule to obtain a plurality of reorganized chapters with different numbers of words, each of the reorganized chapters including words with uniform size and / or words with larger size and / or words with smaller size;

[0049] Step S204, obtaining actual samples and predicted samples corresponding to each of the reorganized chapters;

[0050] Step S205, calculating the recall rate and precision rate corresponding to each reorganized chapter according to the actual samples and the predicted samples corresponding to each reorganized chapter with different word counts;

[0051] Step S206, determining a target font judgment threshold according to the actual sample, the recall rate and the precision rate corresponding to each of the reorganized chapters;

[0052] Step S207, determining abnormal chapters from the multiple reorganized chapters according to the target font judgment threshold, wherein the abnormal chapters include characters with labels that are too large and / or too small as determined based on the target font judgment threshold.

[0053] In an embodiment of the present invention, the server extracts dozens of handwritten essays from the database, and these essays are freely expressed by students according to the essay topics. In these essays, some characters are written larger than the standard copybook, some are smaller, and some are of moderate size. The server uses a high-definition scanner to convert these essays into dot matrix data, that is, each character is converted into an image composed of black dots and white dots. Then, the size of each character is analyzed by image recognition technology. For example, in a certain essay, the dot matrix data of the character "yang" is analyzed and is judged as "single word is too large". The server breaks up and recombines the identified single word evaluation results according to preset rules, such as random, by font size, etc., to generate multiple new essays. For example, a new reorganized essay may contain words such as "sunshine" and "bright" which are judged as "single word is moderate", "earth" is judged as "single word is too small", and "shining" is judged as "single word is too large". For each reorganized chapter, the server will generate an actual sample label for it based on existing data (such as teachers' manual corrections, previous evaluation results, etc.), such as "too large", "too small" or "moderate". At the same time, the trained machine learning model is used to predict these reorganized chapters to obtain predicted sample labels. Based on the actual samples and predicted samples obtained in the previous step, the server begins to calculate the recall and precision of each reorganized chapter. For example, for a chapter marked as "too large", if the model also predicts it as "too large", the precision of the model is improved; if the model predicts incorrectly, the precision remains unchanged or decreases. Based on a large number of actual samples and corresponding recall and precision data, the server determines an optimal font judgment threshold through statistical analysis. This threshold is used to automatically determine whether the font in the chapter is too large, too small or too moderate. Using the target font judgment threshold obtained in the previous step, the server begins to screen all reorganized chapters to find those chapters containing abnormally large (i.e., too large or too small) characters. These chapters will be marked as "abnormal chapters" and may require further manual review or automatic machine correction. In this way, the server completes the entire testing process based on chapter and page analysis and effectively identifies chapters with font size problems.

[0054] In the embodiment of the present invention, the aforementioned step S204 may be implemented through the following example execution.

[0055] In response to the marking operation, the characters included in each of the reorganized chapters are marked to obtain actual samples including actual labels, wherein the actual labels include labels of uniform size, labels that are larger than the average size, and labels that are smaller than the average size;

[0056] Sending the plurality of reorganized passages to a passage algorithm evaluation service for evaluation, and obtaining evaluation results of the words included in each of the reorganized passages based on the passage algorithm evaluation service;

[0057] According to the evaluation results, the characters included in each of the reorganized passages are labeled to obtain a prediction sample including prediction labels, where the prediction labels include uniformly sized labels, oversized labels, and undersized labels.

[0058] In an embodiment of the present invention, exemplarily, the server receives a marking operation instruction from a teaching and research staff member or a data annotator. These instructions are issued through a dedicated annotation tool for precisely annotating the characters in each reorganized passage. For example, after viewing a reorganized passage, the teaching and research staff member finds that the characters 'day' and'month' are significantly smaller than other characters, and thus uses the annotation tool to label these two characters with an 'undersized label'; for characters of moderate size, such as'ming' and 'tian', they are labeled with a 'uniformly sized label'. After the above annotation operation, the server obtains an actual sample set including actual labels. In this sample set, each character has a corresponding label, which clearly indicates the size situation of each character. For example, in a certain reorganized passage, 'day' and'month' are annotated as 'undersized', while'ming' and 'tian' are annotated as 'uniform'. The server sends these already annotated reorganized passages to a dedicated passage algorithm evaluation service for automatic evaluation. This evaluation service uses an advanced deep learning algorithm that can precisely evaluate the size of each character. After being processed by the evaluation service, the server receives the evaluation results of each character in each reorganized passage. These results are returned in the form of numerical values or labels, indicating the algorithm's judgment on the size of each character. For example, for the previously mentioned characters 'day' and'month', the algorithm may give an undersized evaluation result. Based on the evaluation results obtained in the previous step, the server automatically labels the characters in each reorganized passage with prediction labels. These prediction labels correspond to the previous actual labels and are also divided into three types: 'uniformly sized', 'oversized', and 'undersized'. For example, if the algorithm evaluation results show that the characters 'day' and'month' are undersized, then these two characters will be automatically labeled with an 'undersized label'. After the above automatic annotation process, the server obtains a prediction sample set including prediction labels. This sample set will be used for subsequent comparison and analysis with the actual samples to evaluate the performance and accuracy of the algorithm. For example, in this sample set, the characters such as 'day' and'month' predicted by the algorithm to be undersized will be compared and verified with the 'undersized label' in the actual annotation.

[0059] In an embodiment of the present invention, the foregoing step S202 can be implemented through the following example.

[0060] Collect the dot matrix data corresponding to the multiple passages to be processed, and input the dot matrix data into a text evaluation service to obtain preliminary text evaluation results;

[0061] The preliminary text evaluation results are cleaned, and data that fail the evaluation are eliminated to obtain single-word evaluation results for each word included in the multiple passages to be processed.

[0062] In an embodiment of the present invention, the server first uses a high-precision scanner to scan the passage to be processed and converts it into dot matrix data. These dot matrix data accurately capture the shape and details of each character in the passage. For example, for a student composition containing the sentence "Spring breeze and green south bank of the river", the server will scan it into dot matrix data, in which each character is accurately converted into an image composed of dots. The server sends the collected dot matrix data to a dedicated text evaluation service. This service uses advanced image processing and machine learning techniques to analyze the dot matrix data. Taking "Spring breeze and green south bank of the river" as an example, the dot matrix data of each character will be input into this service for subsequent analysis and evaluation. After the text evaluation service analyzes the dot matrix data, it will return a preliminary text evaluation result. This result may include detailed information such as the size, shape, and stroke thickness of each character. In our example, each character of "spring", "wind", "again", "green", "river", "south", and "bank" will have a preliminary evaluation result, such as the character "spring" is evaluated as medium size, and the character "river" is evaluated as slightly larger. After receiving the preliminary text evaluation results, the server will perform data cleaning. The purpose of this step is to eliminate data that failed the evaluation due to various reasons (such as poor scanning quality, character recognition errors, etc.). For example, if the evaluation result of the word "green" is inaccurate due to the shadow during scanning, this result will be cleaned. After data cleaning, the server will obtain a more accurate and reliable single-word evaluation result for each character. This result will provide an important basis for subsequent chapter analysis and processing. In our example, each character in the sentence "Spring breeze greens the south bank of the river" will have an accurate evaluation result, such as the size of "spring" is moderate, "wind" is slightly smaller, and "river" is larger. These results will be used in subsequent steps such as chapter reorganization, sample acquisition, and font size threshold determination.

[0063] In the embodiment of the present invention, after executing step S207, the method further includes the following implementation manner.

[0064] Obtaining abnormal scores of all words included in the abnormal chapter relative to the abnormal chapter;

[0065] According to the target font judgment threshold and the abnormal scores of all the characters relative to the abnormal chapter, all the larger fonts and smaller fonts relative to the abnormal chapter are obtained;

[0066] The abnormal scores corresponding to the relatively large font and the relatively small font are visually marked.

[0067] In an embodiment of the present invention, exemplarily, after the server determines the abnormal passages, it will further analyze the characteristics of each word in these passages. Taking an essay determined to be abnormal as an example, assume that this essay contains multiple words determined to have a relatively large font size. The server will calculate the abnormal scores of these words relative to the entire essay. The abnormal score is calculated based on the deviation between the font size and the standard font size. The greater the deviation, the higher the abnormal score. For example, the word "big" in the essay may have an abnormal score calculated as 0.8 due to its overly large font size (assuming the range of abnormal scores is from 0 to 1, where 1 represents completely abnormal), while the abnormal score of another slightly larger word "sky" may be 0.4. The server will determine which words are larger-sized fonts and which are smaller-sized fonts based on the previously determined target font judgment threshold and the abnormal score of each word. Continuing with the above-mentioned essay as an example, if the target font judgment threshold is set to 0.5, then words with abnormal scores higher than this threshold will be determined to be larger-sized fonts. In our example, the abnormal score of the word "big" is 0.8, which is higher than the threshold, so it is determined to be a larger-sized font; while the abnormal score of the word "sky" is 0.4, which is lower than the threshold, so it is not considered a larger-sized font. Finally, the server will use different colors or marking methods to visually mark the larger-sized fonts and smaller-sized fonts in the original text. In this way, the teaching and research staff or teachers can intuitively see which words have problems and the severity of these problems. In our example, the word "big" may be marked in red or with an icon indicating "larger-sized", and the obviousness of this mark may be proportional to its abnormal score, so that the teaching and research staff can quickly identify and correct the writing problems of students.

[0068] In an embodiment of the present invention, after performing the foregoing step of visually marking the abnormal scores corresponding to the larger-sized fonts and the smaller-sized fonts, the embodiment of the present invention further provides the following implementation manners.

[0069] In response to a proofreading operation for the visual marking, obtain the accuracy of the abnormal score;

[0070] In the case where the accuracy is lower than a preset accuracy threshold, adjust the passage algorithm evaluation service based on the proofreading operation.

[0071] In an embodiment of the present invention, exemplarily, after the server completes the visual marking of the larger font and the smaller font, it will present these marked chapters to the user (such as a teaching and research staff or a data annotator) for proofreading. The user can confirm or correct each marked font through a special proofreading tool. For example, if a "big" character is marked as a larger font, but the user thinks that the size of this character is appropriate, then the user can correct this mark through the proofreading tool. The server will record the user's proofreading operations and calculate the accuracy of the anomaly score based on these operations. Accuracy is an indicator of the consistency between the server's marking results and the user's proofreading results. The server will set a preset accuracy threshold, such as 90%. If the calculated anomaly score accuracy is lower than this threshold, it means that the server's algorithm evaluation service has a certain error in judging the font size. In our example, if many of the larger fonts marked by the server are proofread as normal fonts by users, the accuracy will decrease. Once the accuracy is lower than 90%, the server will adjust the chapter algorithm evaluation service according to the user's proofreading operation. Adjustments may include modifying certain parameters in the algorithm, adding new judgment rules, or retraining the algorithm model. For example, the server may adjust the threshold for judging font size, or add considerations for factors such as font stroke thickness and direction. Through continuous proofreading and adjustment, the server's paragraph algorithm evaluation service will gradually become more accurate and reliable, thereby better assisting teaching researchers or teachers in evaluating and guiding students' writing.

[0072] In the embodiment of the present invention, after executing step S205, the embodiment of the present invention further provides the following implementation manner.

[0073] From the recall rate and precision rate corresponding to each of the reorganized chapters, determine the target reorganized chapter with the highest recall rate and precision rate.

[0074] In the embodiment of the present invention, the server has calculated the recall and precision of multiple reorganized chapters. Now, it needs to find the best reorganized chapter from these data, that is, the chapter with the highest recall and precision. To illustrate with a specific example, suppose the server calculates the recall and precision of five reorganized chapters, and the data are as follows: Reorganized chapter A: recall 85%, precision 80%; Reorganized chapter B: recall 90%, precision 75%; Reorganized chapter C: recall 80%, precision 85%; Reorganized chapter D: recall 92%, precision 82%; Reorganized chapter E: recall 88%, precision 84%; The server will compare the recall and precision of these chapters to find the chapter with the best overall performance. In this example, the recall of reorganized chapter D is the highest (92%), and its precision is also relatively high (82%). Although it is not the highest precision, it is the best performing one considering the two indicators. Therefore, the server will determine that reorganized chapter D is the target reorganized chapter with the highest recall and precision. This chapter may represent the best performance of the algorithm when processing similar data, and is of great significance for subsequent algorithm optimization, chapter reorganization strategy adjustment, or as a reference for excellent samples.

[0075] In the embodiment of the present invention, the aforementioned step S206 can be implemented through the following example execution.

[0076] Obtaining a target word count corresponding to the target reorganized chapter;

[0077] Determine the percentage of larger characters and smaller characters in the target reorganized chapter according to the actual sample;

[0078] The target font determination threshold is determined according to the target number of characters, the proportion of the larger characters, and the proportion of the smaller characters.

[0079] In an embodiment of the present invention, illustratively, the server first determines the total number of words in the target reorganized chapter screened in the previous step. For example, if the target reorganized chapter is an article containing 500 words, then the target number of words is 500. Next, the server analyzes the proportion of words in the target reorganized chapter that are too large or too small. This is usually done by comparing the single word evaluation results of each word obtained by the text evaluation service mentioned above. For example, in a target reorganized chapter of 500 words, the server may find that 30 words are judged to be too large in font and 20 words are judged to be too small in font. Then, the proportion of too large words is 30 / 500=0.06 (i.e. 6%), and the proportion of too small words is 20 / 500=0.04 (i.e. 4%). Finally, the server determines a suitable font size judgment threshold based on the above data. This threshold will be used in subsequent chapter analysis to determine which fonts are too large or too small. For example, the server may adjust the initial font size threshold based on the proportion of too large and too small words. If the proportion of large characters is high, the server may lower the upper threshold of the font size so that more slightly large fonts can be recognized. Similarly, if the proportion of small characters is high, the server may increase the lower threshold of the font size. Specifically, assuming that the initial font size judgment threshold is set within the range of ±10% of the standard font, but because the proportion of large characters in the target reorganized chapter is high, the server may adjust this upper threshold to +8% of the standard font in order to more sensitively identify large fonts. In this way, in subsequent chapter analysis, any font that exceeds this new threshold will be judged as large. In this way, the server can dynamically adjust the font size judgment standard to adapt to the font size distribution of different chapters, thereby improving the accuracy and flexibility of font size judgment.

[0080] In order to more clearly describe the solution provided by the embodiment of the present application, a relatively complete scenario example is given below.

[0081] S1. Data sampling: Use the smart pen to write on the tracing copybook and collect dot matrix data, including several copies of the whole chapter with uniform size, larger size and smaller size, among which the standard tracing copybook (please refer to Figure 2 ) The writing is regarded as characters of uniform size. The writing larger than the standard copybook is regarded as large characters, and the writing smaller than the standard copybook is regarded as small characters. In order to restore the real writing of children, a certain proportion of characters or strokes are required to be missing or the characters are offset as a whole during data collection, but the font size should keep the established rules (i.e., the whole is too large or too small). After the writing is completed, the smart pen interface is called to read the data, and the dot matrix data (coordinate data) of each copy is taken out and sent to the text evaluation service to output the text evaluation results. Only by obtaining the evaluation data of single characters can the single characters be reorganized into chapters for chapter evaluation.

[0082] S2. Cleaning data: Remove the words that failed the single-word evaluation in the S1 results, because the words that failed the single-word evaluation will not have paragraph results, so remove the meaningless data;

[0083] S3, Scattering and reorganizing: Scattering and reorganizing the S2 sampling evaluation results into different chapters of 8, 16, 20, 50, and 100 words. Each chapter contains different numbers of words of uniform size, larger, and smaller. Assuming that the chapter has 8 words, it can generate all words of uniform size, or 1 larger, 1 smaller, 6 uniformly sized words, etc., that is, generating chapters of N lengths (specific json format 1 is shown);

[0084] S4. Actual samples: After the reorganization is completed, label each chapter in the word_label_cls field according to the actual writing size. Labels such as Undersize, Oversize, and Standard form the actual sample (as shown in Format 2).

[0085] S5, prediction sample: send the reorganized chapters in S3 (as shown in format 1) to the chapter algorithm evaluation service for evaluation, export the evaluation results (as shown in format 3), label the words with uniform, large, and small sizes returned by the algorithm, and modify the word_pred_cls field in format 2 to the labels output by the algorithm, namely, Undersize, Oversize, and Standard, to form the prediction sample;

[0086] S6. According to the confusion matrix, the recall rate and precision rate of chapters with different word counts are calculated through word_label_cls and word_pred_cls. It can be analyzed under what circumstances the recall rate and precision rate are the highest in terms of the number of chapters and the proportion of large and small numbers;

[0087] S7, different thresholds will output different characters of larger, smaller, and uniform size. The higher the recall rate and precision rate, the closer the threshold is to the truth. According to the results of S4, the best threshold can be obtained;

[0088] S8. Under the optimal threshold, output the abnormal chapters where the predicted word_pred_cls does not match the actual word_label_cls. In order to conduct manual proofreading more intuitively, scale the pictures of each word in the abnormal chapter (as shown in format 3), put them together, circle the larger and smaller words in each abnormal chapter with a rectangle, mark the score next to the abnormal word, and then conduct manual proofreading. Abnormal data can help determine whether the chapter algorithm service needs to be optimized.

[0089] json format description:

[0090] Format 1:

[0091] {

[0092] metadata:{

[0093] writer: string,

[0094] paper_id: string, ...

[0096] }

[0097] data: {

[0098] page:[

[0099] {

[0100] "word_label":string,

[0101] "word_id":string, ...

[0103] }, ...

[0105] {} ]

[0107] }

[0108] }

[0109] Field analysis:

[0110] writer: student ID, used for page display, corresponding to the student;

[0111] paper_id: copybook ID, used for page display, corresponding to the copybook;

[0112] page: summarizes all the words on the page;

[0113] word_id: word ID;

[0114] word_label: word name;

[0115] Format 2:

[0116] {

[0117] "word_id":string,

[0118] "word_label": string,

[0119] "word_label_cls": "Undersize",

[0120] "word_pred_cls": "Undersize", ...

[0122] }

[0123] Field analysis:

[0124] word_id: word ID;

[0125] word_label: word name;

[0126] word_label_cls: actual label;

[0127] word_pred_cls: predicted label;

[0128] Format 3:

[0129] {

[0130] "code": 0,

[0131] "data":

[0132] {

[0133] "result":

[0134] {

[0135] "page_size":

[0136] {

[0137] "num_words": Int,

[0138] "words_d_value": [],

[0139] "threshold": [],

[0140] "undersize_words":[],

[0141] "oversize_words":[]

[0142] }

[0143] }

[0144] }

[0145] }

[0146] Field analysis:

[0147] num_words: the total number of words in the chapter;

[0148] words_d_value: the score of all words in the passage in the dimension of the passage;

[0149] threshold: the threshold for judging problematic words in a passage;

[0150] undersize_words: a list of undersized data;

[0151] oversize_words: A list of large data.

[0152] Please refer to Figure 3 , Figure 3 A test device 110 based on chapter and paper analysis provided in an embodiment of the present invention includes:

[0153] The acquisition module 1101 is used to acquire a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed whose sizes are uniform, larger, or smaller than those of the preset standard copybook; collect dot matrix data corresponding to the plurality of chapters to be processed, and determine the single word evaluation results of each word included in the plurality of chapters to be processed according to the dot matrix data, wherein the single word evaluation results include single word sizes being uniform, single words being larger, and single words being smaller;

[0154] The analysis module 1102 is used to break up and reorganize the multiple single-word evaluation results based on preset rules to obtain multiple reorganized chapters with different word counts, each of which includes words with uniform single-word sizes and / or words that are larger and / or words that are smaller; obtain actual samples and predicted samples corresponding to each of the reorganized chapters; calculate the recall rate and precision rate corresponding to each of the reorganized chapters based on the actual samples and predicted samples corresponding to each of the reorganized chapters with different word counts; determine a target font judgment threshold based on the actual samples, the recall rate and the precision rate corresponding to each of the reorganized chapters; and determine abnormal chapters from the multiple reorganized chapters based on the target font judgment threshold, wherein the abnormal chapters include words with larger labels and / or smaller labels determined based on the target font judgment threshold.

[0155] It should be noted that the implementation principle of the test device 110 based on the analysis of the chapter and paper can refer to the implementation principle of the test method based on the analysis of the chapter and paper, and will not be repeated here. It should be understood that the division of the modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the test device 110 based on the analysis of the chapter and paper can be a separate processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in a processor element or an instruction in software form.

[0156] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0157] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned test device 110 based on chapter and paper analysis. Figure 4 As shown, Figure 4The computer device 100 provided in the embodiment of the present invention is a structural block diagram. The computer device 100 includes a test device 110 based on chapter and paper analysis, a memory 111, a processor 112 and a communication unit 113.

[0158] In order to realize data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the electrical connection between these components can be realized through one or more communication buses or signal lines. The test device 110 based on passage and paper analysis includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 112 is used to execute the test device 110 based on passage and paper analysis stored in the memory 111, such as the software function modules and computer programs included in the test device 110 based on passage and paper analysis.

[0159] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the aforementioned test method based on chapter and paper analysis.

[0160] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.

Claims

1. A testing method based on chapter and paper analysis, characterized in that: include: Acquire a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed whose sizes are uniform, larger, or smaller than those of a preset standard copybook; Collecting dot matrix data corresponding to the plurality of passages to be processed, and determining a single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, wherein the single word evaluation result includes single words of uniform size, single words that are too large, and single words that are too small; Based on a preset rule, the plurality of single-word evaluation results are scattered and reorganized to obtain a plurality of reorganized chapters with different numbers of words, each of the reorganized chapters including words with uniform single-word sizes and / or words with larger single words and / or words with smaller single words; Obtaining actual samples and predicted samples corresponding to each of the reorganized chapters; According to the actual samples and the predicted samples corresponding to each of the reorganized chapters with different word counts, the recall rate and the precision rate corresponding to each of the reorganized chapters are calculated; Determine a target font judgment threshold according to the actual sample, the recall rate and the precision rate corresponding to each of the reorganized chapters; According to the target font judgment threshold, an abnormal chapter is determined from the plurality of reorganized chapters, wherein the abnormal chapter includes characters having labels that are too large and / or too small as determined based on the target font judgment threshold.

2. The method according to claim 1, characterized in that The obtaining of actual samples and predicted samples corresponding to each of the reorganized chapters includes: In response to the marking operation, the characters included in each of the reorganized chapters are marked to obtain actual samples including actual labels, wherein the actual labels include labels of uniform size, labels that are larger than the average size, and labels that are smaller than the average size; Sending the plurality of reorganized passages to a passage algorithm evaluation service for evaluation, and obtaining evaluation results of the words included in each of the reorganized passages based on the passage algorithm evaluation service; According to the evaluation results, the characters included in each of the reorganized chapters are annotated to obtain prediction samples including prediction labels, wherein the prediction labels include labels of uniform size, labels that are relatively large, and labels that are relatively small.

3. The method according to claim 1, characterized in that The collecting of dot matrix data corresponding to the plurality of passages to be processed, and determining the single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, comprises: Collecting dot matrix data corresponding to the plurality of to-be-processed passages, inputting the dot matrix data into a text evaluation service, and obtaining a preliminary text evaluation result; The preliminary text evaluation results are cleaned, and data that fail the evaluation are eliminated to obtain single-word evaluation results for each word included in the multiple passages to be processed.

4. The method according to claim 2, characterized in that: After determining the abnormal chapters from the plurality of reorganized chapters according to the target font judgment threshold, the method further includes: Obtaining abnormal scores of all words included in the abnormal chapter relative to the abnormal chapter; According to the target font judgment threshold and the abnormal scores of all the characters relative to the abnormal chapter, all the larger fonts and smaller fonts relative to the abnormal chapter are obtained; The abnormal scores corresponding to the relatively large font and the relatively small font are visually marked.

5. The method according to claim 4, characterized in that After visually marking the abnormal scores corresponding to the relatively large font and the relatively small font, the method further includes: In response to a proofreading operation on the visual mark, obtaining an accuracy of the anomaly score; When the accuracy is lower than a preset accuracy threshold, the passage algorithm evaluation service is adjusted based on the proofreading operation.

6. The method according to claim 1, characterized in that After calculating the recall rate and precision rate corresponding to each reorganized chapter according to the actual samples and the predicted samples corresponding to each reorganized chapter with different word counts, the method further includes: From the recall rate and precision rate corresponding to each of the reorganized chapters, a target reorganized chapter with the highest recall rate and precision rate is determined.

7. The method according to claim 6, characterized in that The step of determining the target font judgment threshold according to the actual sample, the recall rate and the precision rate corresponding to each of the reorganized chapters includes: Obtaining a target word count corresponding to the target reorganized chapter; Determine the percentage of larger characters and smaller characters in the target reorganized chapter according to the actual sample; The target font determination threshold is determined according to the target number of characters, the proportion of the larger characters, and the proportion of the smaller characters.

8. A testing device based on chapter and paper analysis, characterized in that: include: An acquisition module is used to acquire a plurality of chapters to be processed, wherein the plurality of chapters to be processed include chapters to be processed that are uniform in size, larger in size, or smaller in size than a preset standard copybook; Collecting dot matrix data corresponding to the plurality of passages to be processed, and determining a single word evaluation result of each word included in the plurality of passages to be processed according to the dot matrix data, wherein the single word evaluation result includes single words of uniform size, single words that are too large, and single words that are too small; The analysis module is used to break up and reorganize the multiple single-word evaluation results based on preset rules to obtain multiple reorganized chapters with different word counts, each of which includes words with uniform single-word sizes and / or words that are larger and / or words that are smaller; obtain actual samples and predicted samples corresponding to each of the reorganized chapters; calculate the recall rate and precision rate corresponding to each of the reorganized chapters based on the actual samples and predicted samples corresponding to each of the reorganized chapters with different word counts; determine the target font judgment threshold based on the actual samples, the recall rate and the precision rate corresponding to each of the reorganized chapters; According to the target font judgment threshold, an abnormal chapter is determined from the plurality of reorganized chapters, wherein the abnormal chapter includes characters having labels that are too large and / or too small as determined based on the target font judgment threshold.

9. A computer device, characterized in that: The computer device includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the test method based on passage analysis as described in any one of claims 1-7.

10. A readable storage medium, characterized in that: The readable storage medium includes a computer program, which, when running, controls the computer device where the readable storage medium is located to execute the test method based on passage analysis as described in any one of claims 1 to 7.