CN113610068B - Test question disassembling method, system, storage medium and equipment based on test paper image - Google Patents

Test question disassembling method, system, storage medium and equipment based on test paper image Download PDF

Info

Publication number
CN113610068B
CN113610068B CN202111178939.3A CN202111178939A CN113610068B CN 113610068 B CN113610068 B CN 113610068B CN 202111178939 A CN202111178939 A CN 202111178939A CN 113610068 B CN113610068 B CN 113610068B
Authority
CN
China
Prior art keywords
elements
character
test paper
test
chart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111178939.3A
Other languages
Chinese (zh)
Other versions
CN113610068A (en
Inventor
李巧艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Wind Vane Intelligent Technology Co ltd
Original Assignee
Jiangxi Vaneducation Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Vaneducation Technology Inc filed Critical Jiangxi Vaneducation Technology Inc
Priority to CN202111178939.3A priority Critical patent/CN113610068B/en
Publication of CN113610068A publication Critical patent/CN113610068A/en
Application granted granted Critical
Publication of CN113610068B publication Critical patent/CN113610068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Abstract

The invention discloses a method, a system, a storage medium and equipment for disassembling test questions based on test paper images, wherein the method for disassembling test questions based on the test paper images comprises the steps of receiving input test paper images; performing element analysis on the test paper image to identify text elements and non-text elements and positioning information of the text elements and the non-text elements, wherein the non-text elements comprise sidebar elements and chart elements; cutting off the non-character elements, and identifying the character elements to split the character elements into character element sets corresponding to each test question in the test paper images; and fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question. The invention solves the problems of complicated operation and low efficiency when electronically archiving the test questions in the picture test paper in the prior art.

Description

Test question disassembling method, system, storage medium and equipment based on test paper image
Technical Field
The invention relates to the technical field of combination of image processing and text structuring processing, in particular to a test question disassembling method, a test question disassembling system, a storage medium and test question disassembling equipment based on a test paper image.
Background
With the development of deep learning technology, the performance of natural language processing and image processing combined with deep learning on each classical project is improved in a breakthrough manner. The pre-training technology enables small sample data to have excellent performance; the model structures such as the transformer and the like enable the feature extraction to be more sufficient; the idea of model landing under specific scene by combining deep learning with prior knowledge in the field is more and more accepted in various industries.
With the development of education informatization, various informatization technologies similar to the above are widely applied in the education industry, so that the education mode is changed greatly, for example, the mode of answering questions through a paper test paper is changed into the mode of answering questions through a line by using a computer device to establish a question bank, and generally, when the question bank is established, the questions are mainly put into the question bank in a manual input mode.
In the prior art, picture test papers are common in real scenes, people mostly adopt a manual typing mode in the process of electronically archiving test questions in the picture test papers, the efficiency is low, particularly for science test papers, a large number of formulas and charts exist, and the low-efficiency simultaneous entry is very troublesome.
Disclosure of Invention
In view of the above, the present invention provides a method, a system, a storage medium and a device for disassembling test questions based on a test paper image, and aims to solve the problems of complicated operation and low efficiency when electronically archiving the test questions in the picture test paper in the prior art.
The embodiment of the invention is realized as follows: a test question disassembling method based on a test paper image comprises the following steps:
receiving an input test paper image;
performing element analysis on the test paper image to identify text elements and non-text elements and positioning information of the text elements and the non-text elements, wherein the non-text elements comprise sidebar elements and chart elements;
cutting off the non-text elements, and identifying the text elements to split the text elements into text element sets corresponding to each test question in the test paper images;
and fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
Further, the method for disassembling test questions based on the test paper images, wherein the step of receiving the input test paper images further comprises:
acquiring a test paper file, and identifying the file format of the test paper file;
judging whether the file format is a picture format or not;
if not, converting the file format of the test paper file into a picture format.
Further, in the method for disassembling test questions based on the test paper image, the step of performing element analysis on the test paper image to identify text elements and non-text elements and the positioning information of the text elements and the non-text elements includes the steps of:
performing expansion processing on the test paper image, and detecting a straight line in the expanded test paper image and an angle corresponding to the straight line;
and counting and calculating the average angle of the straight line to obtain the inclination angle of the test paper image, and placing the test paper image in a horizontal state according to the inclination angle.
Further, in the method for disassembling test questions based on the test paper image, the step of performing element analysis on the test paper image to identify text elements and non-text elements and the positioning information of the text elements and the non-text elements includes:
detecting the test paper image by using a pre-trained layout analysis model to identify a credible character area and a credible chart area in the test paper image;
judging whether the credibility of the credibility chart area meets a credibility threshold;
if yes, carrying out element analysis on the credible character area and the credible chart area to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements;
if not, performing connected domain detection on the credible chart area until the credibility of the credible chart area meets the credibility threshold, and performing element analysis on the credible character area and the credible chart area when the credibility of the credible chart area meets the credibility threshold so as to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements.
Further, the method for disassembling test questions based on the test paper image, wherein the step of detecting the test paper image by using the pre-trained layout analysis model to identify the credible text area and the credible chart area in the test paper image further comprises the following steps:
respectively carrying out region coordinate clustering on the credible character regions according to preset category numbers to obtain Euclidean distances of clustering centers to obtain optimal category numbers;
and calculating left and right boundary area values of the area coordinate cluster corresponding to the optimal classification number to obtain a partition line, and cutting the test paper image through the partition line.
Further, in the method for disassembling test questions based on the test paper image, the step of identifying the text elements to disassemble the text elements into a text element set corresponding to each test question in the test paper image includes:
vectorizing the character elements by using a Chinese pre-training model, and extracting features of the vectorized character elements so as to perform label classification on the character elements through sequence labeling;
and splitting the text elements into text element sets corresponding to each test question in the test paper images according to the classification labels.
The classification label at least comprises a question mark line, a question stem starting line, a question stem ending line, an answer line and an analysis line.
Further, the method for disassembling test questions based on test paper images, wherein the steps of vectorizing the text elements by using a Chinese pre-training model, performing feature extraction on the vectorized text elements, and performing label classification on the text elements through sequence labeling further include:
and comparing the arrangement sequence of the classification labels corresponding to each topic with a preset classification label arrangement sequence, and if the arrangement sequence of the classification labels does not accord with the preset classification label arrangement sequence, rearranging the classification labels according to the preset classification label arrangement sequence.
Another object of the present invention is to provide a system of a test question disassembling method based on a test paper image, the system comprising:
the image receiving module is used for receiving the input test paper image;
the element analysis module is used for carrying out element analysis on the test paper image so as to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise sidebar elements and chart elements;
the splitting module is used for cutting off the non-character elements and recognizing the character elements so as to split the character elements into character element sets corresponding to each test question in the test paper images;
and the fusion module is used for fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
It is a further object of the invention to provide a storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method described above.
It is a further object of the invention to provide an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the program.
The method identifies the elements of the received test paper image to identify the character elements, the non-character elements and the positioning information of the character elements and the non-character elements, splits the character elements into the character element set corresponding to each test in the test paper image, and fuses the chart into the corresponding character element set to form each complete test.
Drawings
FIG. 1 is a flowchart of a test question disassembling method based on test paper images according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a test question disassembling method based on test paper images according to a second embodiment of the present invention;
FIG. 3 is a block diagram of a test question disassembling system based on test paper images according to a third embodiment of the present invention;
the following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
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. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The following describes how to solve the problems of complicated operation and low efficiency when electronically archiving the test questions in the photo type test paper in the prior art in detail with reference to the specific embodiments and the accompanying drawings.
Example one
Referring to fig. 1, a method for solving test questions based on test paper images according to a first embodiment of the present invention is shown, and the method includes steps S10-S13.
In step S10, the input test paper image is received.
The test paper image is obtained from the input test paper picture, and the test paper image is obtained by obtaining the test paper picture, wherein the test paper picture includes but is not limited to formats such as png, jpg, jpeg and the like.
In addition, the method extracts the test paper text content of the test paper type of which the text content can not be directly extracted, wherein the test paper type of which the text content can not be directly extracted mainly comprises a test paper picture, a pdf and a Word containing the picture, while the test paper image in the invention is mainly obtained from the test paper picture, and in order to increase the test paper type of the test paper which can be processed by the method, the test paper type needs to be uniformly converted.
In view of this, in some alternative embodiments of the present invention, a test paper file is obtained, and a file format of the test paper file is identified; judging whether the file format is a picture format or not, converting the file format of the test paper file into the picture format when the file format is not the picture format, and effectively increasing the test paper type of the test paper which can be processed by the method by converting the file type of the test paper into the picture format which can be processed, for example, when the test paper file is pdf, the pdf can be directly converted into the picture, when the test paper file is Word, the Word can also be processed so that the test paper is converted into the file type which can be processed, namely the picture, concretely, in practice, the test questions are all inserted into the Word in the picture format, namely, all pictures in the Word or one part of the test questions are inserted into the Word in the picture format, and the other part of the test questions are presented in the Word in the text format, and in the concrete implementation, when the test questions are all inserted into the Word in the picture format, the test question picture can be extracted in an extraction mode, and when one part of the test questions are inserted into the Word in a picture mode and the other part of the test questions are presented in the Word in a text mode, the Word can be converted into the picture to obtain the test question picture.
And step S11, performing element analysis on the test paper image to identify the positioning information of the text elements, the non-text elements and the chart elements, wherein the non-text elements comprise the sidebar elements and the chart elements.
The character elements comprise Chinese characters and formulas forming each question, the positioning information comprises coordinate information and question number information, the general questions generally comprise question stem information, question score information, answer information and analysis information, the character elements comprise the question stem information, the question score information, the answer information and the characters and formulas forming each test question, the non-character elements comprise chart elements and sidebar elements, and the sidebar elements and the chart elements can be cut or extracted after the sidebar elements and the chart elements are detected through element analysis.
And step S12, cutting off the non-character elements, and identifying the character elements to split the character elements into character element sets corresponding to each test question in the test paper images.
The text elements include all the characters and formulas required in the test paper questions, in order to realize the entry of each test question, the text elements need to be split into a text element set corresponding to each test question in the test paper image, and specifically, the text element set should include complete question stem information, question score information, answer information and analysis information in each question.
Furthermore, the types of the test paper are generally divided into two types, one is that an answer and an analysis are immediately behind a test question, the answer is customarily called a "teacher paper", the other is that the answer and the analysis are separated from the test question, the answer is customarily called a "student paper", after the character elements of the "teacher paper" are separated, the character elements containing the answer and the analysis information can directly determine the corresponding character elements representing the question stem information through coordinate information and form a character element set together with the character elements representing the question stem information, and after the character elements of the "student paper" are separated, the character elements containing the answer and the analysis information can determine the corresponding character elements representing the question stem information through question numbers and form a character element set together with the character elements representing the question stem information.
Furthermore, the answer forms in the "student scroll" are various, and in order to improve the answer extraction rate, in some optional embodiments of the invention, the answer detection and identification of the chart type options are added; single line multiple answer type identification and answer segmentation.
Specifically, in the implementation of this embodiment, the text elements in the test paper image are recognized by an OCR (Optical Character Recognition), it should be noted that due to the Recognition characteristics of the OCR, in order to increase the accuracy of the OCR Recognition, in the Recognition of the text elements, the sidebar elements and the chart elements in the test paper image are cut out, so as to ensure that other elements interfere with the Recognition effect when performing element Recognition.
In some optional embodiments of the present invention, before performing OCR recognition, preprocessing such as contrast enhancement, salt and pepper dot erasure is performed on the test paper image, so as to further increase the recognition effect of the text elements.
Further, in some optional embodiments of the present invention, when answer detection and recognition are performed on the "student roll", if the first question number of the recognized answer is greater than 1 and the initial area of the answer is below the specified line of the image, it is determined that the first page of top-ranked answers are missed, an answer missed area may be cut out, local OCR recognition is performed, and answer extraction is performed again with respect to the recognized element information.
And step S13, fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
In order to ensure the integrity of each test question, the test questions with the matching drawings need to be fused with the diagrams, and specifically, the corresponding text element sets and the diagrams can be found out through the positioning information, so that the text element sets and the diagrams are fused.
In addition, in some optional embodiments of the present invention, the chart and the test questions may be fused differently by different relationships between the matching chart and the test questions, wherein the chart and the test questions are fused differently mainly by calculating the related areas of the question area and the matching chart.
When the chart is completely in the subject area, chart fusion is not performed, the chart is directly cut in the original image, and the typesetting of the original document is kept; when the chart is completely in the title area but not completely in the stem area, the area of the chart is erased on the original chart, i.e. the pixel is set to be 255. Respectively fusing the pictures with the text type question stem and the picture type question stem; when the chart and the question area are partially overlapped, judging whether the area overlapping of the question area and the chart is larger than a set threshold value of the chart area, such as 80%, if so, erasing a part of picture areas in the original chart, and then fusing the picture and the question; if not, fusion is not needed, an error prompt is given, and a user is prompted to check whether the question lacks a chart.
In summary, in the method for disassembling test questions based on the test paper images in the embodiments of the present invention, the received test paper images are subjected to element identification to identify the text elements and the non-text elements and the positioning information of the text elements and the non-text elements, the text elements are disassembled into the text element sets corresponding to each test question in the test paper images, and the chart is fused into the corresponding text element sets, so as to form each complete question.
Example two
Referring to fig. 2, a second embodiment of the method for solving test questions based on test paper images according to the present invention is shown, wherein the method includes steps S20-S30.
In step S20, the input test paper image is received.
Step S21, performing expansion processing on the test paper image, and detecting a straight line in the expanded test paper image and an angle corresponding to the straight line;
according to the prior rule of the test paper document, texts in the test paper are all arranged horizontally and horizontally, in order to ensure the accuracy of identification, the texts in the test paper are generally required to be kept in a horizontal state during identification, it can be understood that line spacing intervals exist between lines in the texts, a width detection kernel can be set by utilizing an expansion principle, the texts in the test paper are expanded into line rectangles, and then straight lines of the documents and angles corresponding to the straight lines are detected by utilizing a Hough straight line detection and affine method.
And step S22, counting and calculating the average angle of the straight line to obtain the inclination angle of the test paper image, and placing the test paper image in a horizontal state according to the inclination angle.
The inclination angle of the test paper image can be obtained by statistically calculating the average angle of the straight line. After the test paper image is rotated by an angle corresponding to the inclination angle according to the inclination angle of the test paper image, the test paper image is in a horizontal state, wherein when the inclination angle is 0, the test paper image is in the horizontal state, and at the moment, only the state of the current test paper image needs to be maintained, and when the inclination angle is not 0, the test paper image is in an inclined state, and at the moment, the test paper image needs to be rotated to ensure that the test paper image is in the horizontal state. .
When the test paper image is required to be described, in real life, the input test paper image for test question disassembly may have a problem of inclination, in order to improve the accuracy of test question disassembly, the inclination angle of the test paper image can be acquired, and the test paper image is correspondingly processed according to the specific numerical value of the inclination angle, so that the test paper image is ensured to be in a horizontal state.
Step S23, detecting the test paper image by using a pre-trained layout analysis model to identify a credible character area and a credible chart area in the test paper image;
specifically, in the pre-trained layout analysis model, a DocBank + PubLayNet data set is used for pre-training. Then, a predetermined number of test paper documents are labeled to make a model fixing, for example, about 500 +.
Step S24, judging whether the credibility of the credibility chart area meets a credibility threshold; if so, go to step S25, otherwise, go to step S26.
Generally, the detection performance of the layout analysis model in the character area is better, and the reliability of the detected credible character area is higher, however, the performance of the layout analysis model in the detection of the credible chart area may have an error, so that the reliability of the detected credible chart area needs to be judged, when the reliability of the credible chart area meets the reliability threshold, the reliability of the currently detected credible chart area is higher, and the credible chart area can be subsequently cut or identified.
And step S25, performing element analysis on the credible text area and the credible chart area to identify text elements and non-text elements and positioning information of the text elements and the non-text elements, wherein the non-text elements comprise sidebar elements and chart elements.
Specifically, the box size detected by the connected domain conforms to the common sense setting of the chart and the sidebar, and the box can be a reliable chart area with high reliability.
Step S26, performing connected domain detection on the credible chart area until the credibility of the credible chart area meets the credibility threshold, and performing element analysis on the credible character area and the credible chart area when the credibility of the credible chart area meets the credibility threshold to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements.
It can be understood that the test paper content is formed by the blocked, split and independent module elements; the sidebar and the chart both have connectivity, so that the sidebar and the chart in the test paper image can be detected by means of connected domain detection, wherein in the specific implementation, the sidebar uses a vertical detection core (1 x 10), and the chart uses a conventional detection core (3x 3).
In addition, due to certain specific reasons, the graph and the sidebar are not communicated in certain areas, and the unconnected areas can affect the detection effect of the connected domain when the connected domain is detected, so that the areas needing to be detected can be expanded before the connected domain is detected, and the accuracy of the detected areas is improved.
Furthermore, when character elements are recognized in a test paper image, due to the characteristic of OCR recognition, character elements in the same row are recognized, and after the character elements in the same row are recognized, the recognition is changed to recognize character elements in the next row, but in real life, the layout of a test paper has a plurality of columns, for example, two columns, three columns or more, taking two columns as an example, that is, two question areas are divided on one test paper image, and when character elements are recognized, the character elements of a plurality of test questions are easily mixed together to affect the recognition result.
In view of this, in some alternative embodiments of the present invention, the test paper may be divided into columns, and the test paper image is divided into single columns, so as to ensure that each recognized text element on each line only contains information of one test question.
Specifically, performing area coordinate clustering on the credible character areas by using a preset category number respectively, and acquiring the Euclidean distance of a clustering center to obtain an optimal category number;
and calculating left and right boundary area values of the area coordinate cluster corresponding to the optimal classification number to obtain a partition line, and cutting the test paper image through the partition line.
The test paper image is cut to ensure that each line of the cut test paper image only contains the character elements of one test question, so that the problem that the recognized question information is disordered due to the fact that the character elements of multiple test questions are recognized simultaneously when OCR recognition is carried out is avoided.
Step S27, vectorizing the character elements by using a Chinese pre-training model, and performing feature extraction on the vectorized character elements to classify the character elements through sequence labeling;
specifically, character elements are vectorized by using a Chinese pre-training model of bert, an encoder part of a transformer is used for feature extraction, and then a crf layer is connected for sequence labeling.
Step S28, comparing the arrangement sequence of the classification labels corresponding to each topic with a preset classification label arrangement sequence, and if the arrangement sequence of the classification labels does not accord with the preset classification label arrangement sequence, rearranging the classification labels according to the preset classification label arrangement sequence.
Taking the choice question as an example, the text elements can be classified, and the classification is N: title line, a (bcd): option line, S head end line, a ans: answer line, P: parse: parse line, others: o (others). And confirming and reasoning and correcting the classification labels, correcting the classification labels by using a strong characteristic rule, and performing reasoning and revising on the corrected classification labels according to context logic, wherein for example, AOCD is revised to ABCD, SOBC is revised to SABC and the like.
In addition, in some optional embodiments of the present invention, the question type information may be further modified, the question type of each test question is identified through the classification label, and the question types of each test question are arranged according to the question number, for example, when the identified question types are a choice question, a blank filling question, and a choice question in sequence, and the test questions with the same question type should be arranged together according to the arrangement rule of the test paper, at this time, the question type information may be modified into a choice question, and a choice question.
Step S29, splitting the character elements into character element sets corresponding to each test question in the test paper images according to the classification labels;
the classification label at least comprises a question mark line, a question stem starting line, a question stem ending line, an answer line and an analysis line.
The text elements are divided into text element sets corresponding to each test question by performing label classification on the text elements, wherein the text elements are classified into question stems, options, answers and analysis parts according to classification labels by taking the division of a selection question as an example, and then are divided into text element sets according to the question stems, the options, the answers and the analysis corresponding to each question.
It should be noted that, in some alternative embodiments of the present invention, the options in the choice question may also be obtained by a direct cutting method, that is, the options are cut out. And combining the positioning information, cutting line by line, and fusing the cutting line to a corresponding position, wherein if the identified option area is one line, judging that the current options are distributed in the same line, setting a plurality of kernel by using a connected domain method, and circularly detecting the box until the boxes with the preset option number are detected, for example, generally, the choice questions comprise four options, and at the moment, setting a plurality of kernel and circularly detecting the box until 4 boxes are detected.
And step S30, fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
To sum up, in the embodiment of the present invention, the received test paper image is subjected to element identification to identify the text elements and the non-text elements and the positioning information of the text elements and the non-text elements, the text elements are split into the text element sets corresponding to each test question in the test paper image, and the chart is fused into the corresponding text element sets, so as to form each complete question.
EXAMPLE III
Referring to fig. 3, a system for disassembling test questions based on test paper images according to a third embodiment of the present invention is shown, the system includes:
an image receiving module 100, configured to receive an input test paper image;
the element analysis module 200 is configured to perform element analysis on the test paper image to identify text elements and non-text elements and location information of the text elements and the non-text elements, where the non-text elements include sidebar elements and chart elements;
the splitting module 300 is configured to cut off the non-text elements and recognize the text elements to split the text elements into a text element set corresponding to each test question in the test paper image;
and the fusion module 400 is configured to fuse the text element set corresponding to the positioning information and the chart element to obtain the topic information of each test question.
Further, in some alternative embodiments of the present invention, the system further comprises:
the acquisition module is used for acquiring the test paper file and identifying the file format of the test paper file;
the judging module is used for judging whether the file format is a picture format or not;
and the conversion module is used for converting the file format of the test paper file into the picture format when the file format is judged not to be the picture format.
Further, in some alternative embodiments of the present invention, the system further comprises:
the detection module is used for performing expansion processing on the test paper image and detecting a straight line in the expanded test paper image and an angle corresponding to the straight line;
and the counting module is used for counting and calculating the average angle of the straight line to obtain the inclination angle of the test paper image, and placing the test paper image in a horizontal state according to the inclination angle.
Further, in some optional embodiments of the invention, the element analysis module further comprises:
the identification unit is used for detecting the test paper image by utilizing a pre-trained layout analysis model so as to identify a credible character area and a credible chart area in the test paper image;
the reliability judging unit is used for judging whether the reliability of the reliability chart area meets a reliability threshold value or not;
the first element analysis unit is used for carrying out element analysis on the credible character area and the credible chart area when the credibility of the credible chart area is judged to meet a credibility threshold value so as to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side bar elements and chart elements;
and the second element analysis unit is used for detecting a connected domain of the credible chart region when the credibility of the credible chart region is judged to not meet a credibility threshold, carrying out element analysis on the credible character region and the credible chart region until the credibility of the credible chart region meets the credibility threshold, so as to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements.
Further, the above-mentioned examination question disassembling system based on the examination paper image, wherein, the element analysis module further includes:
the cutting unit is used for respectively carrying out region coordinate clustering on the credible character regions according to the preset category number, and acquiring the Euclidean distance of a clustering center to obtain the optimal category number;
and calculating left and right boundary area values of the area coordinate cluster corresponding to the optimal classification number to obtain a partition line, and cutting the test paper image through the partition line.
Further, in some alternative embodiments of the present invention, the splitting module comprises:
the label classification unit is used for vectorizing the character elements by utilizing a Chinese pre-training model, extracting the characteristics of the character elements after the vectorization and performing label classification on the character elements through sequence marking;
the splitting unit is used for splitting the character elements into character element sets corresponding to each test question in the test paper images according to the classification labels;
the classification label at least comprises a question mark line, a question stem starting line, a question stem ending line, an answer line and an analysis line.
Further, the test question disassembling system based on the test paper image comprises:
and the arrangement unit is used for comparing the arrangement sequence of the classification labels corresponding to each topic with a preset classification label arrangement sequence, and if the arrangement sequence of the classification labels does not accord with the preset classification label arrangement sequence, rearranging the classification labels according to the preset classification label arrangement sequence.
The functions or operation steps of the above modules when executed are substantially the same as those of the above method embodiments, and are not described herein again.
Example four
In another aspect, the present invention further provides a storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method according to any one of the first to second embodiments.
EXAMPLE five
In another aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of the method according to any one of the first to second embodiments.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. A test question disassembling method based on a test paper image is characterized by comprising the following steps:
receiving an input test paper image;
performing element analysis on the test paper image to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the character elements comprise Chinese characters and formulas forming each test question, and the non-character elements comprise side column elements and chart elements;
the step of carrying out element analysis on the test paper image to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the character elements comprise Chinese characters and formulas forming each test question, and the non-character elements comprise sidebar elements and chart elements comprises the following steps:
detecting the test paper image by using a pre-trained layout analysis model to identify a credible character area and a credible chart area in the test paper image;
judging whether the credibility of the credibility chart area meets a credibility threshold;
if yes, carrying out element analysis on the credible character area and the credible chart area to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements;
if not, performing connected domain detection on the credible chart area until the credibility of the credible chart area meets the credibility threshold, and performing element analysis on the credible character area and the credible chart area when the credibility of the credible chart area meets the credibility threshold to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements;
cutting off the non-character elements, and identifying the character elements to split the character elements into character element sets corresponding to the test questions in the test paper images;
the step of cutting off the non-text elements and identifying the text elements to split the text elements into text element sets corresponding to the test questions in the test paper images comprises:
vectorizing the character elements by using a Chinese pre-training model, and extracting features of the vectorized character elements so as to perform label classification on the character elements through sequence labeling;
splitting the text elements into text element sets corresponding to each test question in the test paper images according to the classification labels;
the classification label at least comprises a question number line, a question stem starting line, a question stem ending line, an answer line and an analysis line;
and fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
2. The method of claim 1, wherein the step of receiving the input test paper image further comprises:
acquiring a test paper file, and identifying the file format of the test paper file;
judging whether the file format is a picture format or not;
if not, converting the file format of the test paper file into a picture format.
3. The method for disassembling test questions based on test paper images as claimed in claim 1, wherein said step of performing element analysis on said test paper images to identify text elements and non-text elements and positioning information of the text elements and the non-text elements, said non-text elements including sidebar elements and chart elements comprises before said step of:
performing expansion processing on the test paper image, and detecting a straight line in the expanded test paper image and an angle corresponding to the straight line;
and counting and calculating the average angle of the straight line to obtain the inclination angle of the test paper image, and placing the test paper image in a horizontal state according to the inclination angle.
4. The method as claimed in claim 1, wherein the step of detecting the test paper image by using the pre-trained layout analysis model to identify the credible text region and credible chart region in the test paper image further comprises:
respectively carrying out area coordinate clustering on the credible character areas according to preset category numbers to obtain Euclidean distances of clustering centers and obtain the optimal category numbers;
and calculating left and right boundary area values of the area coordinate cluster corresponding to the optimal classification number to obtain a partition line, and cutting the test paper image through the partition line.
5. The method as claimed in claim 1, wherein the step of vectorizing the text elements by using a chinese pre-training model, and performing feature extraction on the vectorized text elements to classify the text elements by sequential labeling further comprises:
and comparing the arrangement sequence of the classification labels corresponding to each topic with a preset classification label arrangement sequence, and if the arrangement sequence of the classification labels does not accord with the preset classification label arrangement sequence, rearranging the classification labels according to the preset classification label arrangement sequence.
6. A system of a test question disassembling method based on a test paper image is characterized in that the system comprises:
the image receiving module is used for receiving the input test paper image;
the element analysis module is used for carrying out element analysis on the test paper image so as to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the character elements comprise Chinese characters and formulas forming each test question, and the non-character elements comprise side column elements and chart elements;
the element analysis module is specifically configured to:
detecting the test paper image by using a pre-trained layout analysis model to identify a credible character area and a credible chart area in the test paper image;
judging whether the credibility of the credibility chart area meets a credibility threshold;
if yes, carrying out element analysis on the credible character area and the credible chart area to identify character elements, non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements;
if not, performing connected domain detection on the credible chart area until the credibility of the credible chart area meets the credibility threshold, and performing element analysis on the credible character area and the credible chart area when the credibility of the credible chart area meets the credibility threshold to identify character elements and non-character elements and positioning information of the character elements and the non-character elements, wherein the non-character elements comprise side column elements and chart elements;
the splitting module is used for cutting off the non-character elements and recognizing the character elements so as to split the character elements into character element sets corresponding to each test question in the test paper images;
the splitting module comprises:
the label classification unit is used for vectorizing the character elements by utilizing a Chinese pre-training model, extracting the characteristics of the character elements after the vectorization and performing label classification on the character elements through sequence marking;
the splitting unit is used for splitting the character elements into character element sets corresponding to each test question in the test paper images according to the classification labels;
the classification label at least comprises a question number line, a question stem starting line, a question stem ending line, an answer line and an analysis line;
and the fusion module is used for fusing the character element set corresponding to the positioning information and the chart element to obtain the question information of each test question.
7. A storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 5 when executing the program.
CN202111178939.3A 2021-10-11 2021-10-11 Test question disassembling method, system, storage medium and equipment based on test paper image Active CN113610068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111178939.3A CN113610068B (en) 2021-10-11 2021-10-11 Test question disassembling method, system, storage medium and equipment based on test paper image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111178939.3A CN113610068B (en) 2021-10-11 2021-10-11 Test question disassembling method, system, storage medium and equipment based on test paper image

Publications (2)

Publication Number Publication Date
CN113610068A CN113610068A (en) 2021-11-05
CN113610068B true CN113610068B (en) 2022-07-08

Family

ID=78343496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111178939.3A Active CN113610068B (en) 2021-10-11 2021-10-11 Test question disassembling method, system, storage medium and equipment based on test paper image

Country Status (1)

Country Link
CN (1) CN113610068B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115186780B (en) * 2022-09-14 2022-12-06 江西风向标智能科技有限公司 Discipline knowledge point classification model training method, system, storage medium and equipment
CN115565190A (en) * 2022-11-17 2023-01-03 江西风向标智能科技有限公司 Test paper layout analysis method, system, computer and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447477A (en) * 2015-12-25 2016-03-30 北京汉王数字科技有限公司 Formula recognition method and device based on formula library
CN110210409A (en) * 2019-06-04 2019-09-06 南昌市微轲联信息技术有限公司 Form frame-line detection method and system in table document
CN110647885A (en) * 2019-09-17 2020-01-03 广州光大教育软件科技股份有限公司 Test paper splitting method, device, equipment and medium based on picture identification
CN110765907A (en) * 2019-10-12 2020-02-07 安徽七天教育科技有限公司 System and method for extracting paper document information of test paper in video based on deep learning
CN111652157A (en) * 2020-06-04 2020-09-11 广东外语外贸大学 Dictionary entry extraction and identification method for low-resource languages and general languages
CN111814798A (en) * 2020-07-14 2020-10-23 深圳中兴网信科技有限公司 Method for digitizing titles and readable storage medium
CN113177435A (en) * 2021-03-31 2021-07-27 新东方教育科技集团有限公司 Test paper analysis method and device, storage medium and electronic equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102163284B (en) * 2011-04-11 2013-02-27 西安电子科技大学 Chinese environment-oriented complex scene text positioning method
AU2015201663A1 (en) * 2015-03-31 2016-10-20 Canon Kabushiki Kaisha Dewarping from multiple text columns
CN106503732B (en) * 2016-10-13 2019-07-19 北京云江科技有限公司 The classification method and categorizing system of text image and non-textual image
CN109117713B (en) * 2018-06-27 2021-11-12 淮阴工学院 Drawing layout analysis and character recognition method of full convolution neural network
CN109685065B (en) * 2018-12-11 2021-06-25 中国科学院自动化研究所 Layout analysis method and system for automatically classifying test paper contents
CN110516673B (en) * 2019-08-30 2023-02-03 西南大学 Yi-nationality ancient book character detection method based on connected component and regression type character segmentation
CN110705398A (en) * 2019-09-19 2020-01-17 安徽七天教育科技有限公司 Mobile-end-oriented test paper layout image-text real-time detection method
AU2019101151A4 (en) * 2019-09-30 2020-01-23 Chen, Ke MISS Classify Mental States from EEG Signal Using Xgboost Algorithm
CN113033269B (en) * 2019-12-25 2023-08-25 华为技术服务有限公司 Data processing method and device
CN111680669A (en) * 2020-08-12 2020-09-18 江西风向标教育科技有限公司 Test question segmentation method and system and readable storage medium
CN112348028A (en) * 2020-11-30 2021-02-09 广东国粒教育技术有限公司 Scene text detection method, correction method, device, electronic equipment and medium
CN112597878A (en) * 2020-12-21 2021-04-02 安徽七天教育科技有限公司 Sample making and identifying method for scanning test paper layout analysis
CN113221743B (en) * 2021-05-12 2024-01-12 北京百度网讯科技有限公司 Table analysis method, apparatus, electronic device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447477A (en) * 2015-12-25 2016-03-30 北京汉王数字科技有限公司 Formula recognition method and device based on formula library
CN110210409A (en) * 2019-06-04 2019-09-06 南昌市微轲联信息技术有限公司 Form frame-line detection method and system in table document
CN110647885A (en) * 2019-09-17 2020-01-03 广州光大教育软件科技股份有限公司 Test paper splitting method, device, equipment and medium based on picture identification
CN110765907A (en) * 2019-10-12 2020-02-07 安徽七天教育科技有限公司 System and method for extracting paper document information of test paper in video based on deep learning
CN111652157A (en) * 2020-06-04 2020-09-11 广东外语外贸大学 Dictionary entry extraction and identification method for low-resource languages and general languages
CN111814798A (en) * 2020-07-14 2020-10-23 深圳中兴网信科技有限公司 Method for digitizing titles and readable storage medium
CN113177435A (en) * 2021-03-31 2021-07-27 新东方教育科技集团有限公司 Test paper analysis method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113610068A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN111046784B (en) Document layout analysis and identification method and device, electronic equipment and storage medium
JP3640972B2 (en) A device that decodes or interprets documents
CN111274239B (en) Test paper structuring processing method, device and equipment
US8208737B1 (en) Methods and systems for identifying captions in media material
US8467614B2 (en) Method for processing optical character recognition (OCR) data, wherein the output comprises visually impaired character images
CN113610068B (en) Test question disassembling method, system, storage medium and equipment based on test paper image
KR101769918B1 (en) Recognition device based deep learning for extracting text from images
CN112800848A (en) Structured extraction method, device and equipment of information after bill identification
US11386897B2 (en) Method and system for extraction of key-terms and synonyms for the key-terms
JP2004046315A (en) Device and method for recognizing character, program and storage medium
CN112434496B (en) Method and terminal for identifying form data of bulletin document
JPH04195692A (en) Document reader
US9658989B2 (en) Apparatus and method for extracting and manipulating the reading order of text to prepare a display document for analysis
CN113177435A (en) Test paper analysis method and device, storage medium and electronic equipment
US20230084845A1 (en) Entry detection and recognition for custom forms
CN114419636A (en) Text recognition method, device, equipment and storage medium
US20120281919A1 (en) Method and system for text segmentation
KR20180126352A (en) Recognition device based deep learning for extracting text from images
CN116822634A (en) Document visual language reasoning method based on layout perception prompt
CN110825874A (en) Chinese text classification method and device and computer readable storage medium
CN115544200A (en) Document image classification method and device
CN115759039A (en) Document processing method and device, electronic equipment and storage medium
CN115147846A (en) Multi-language bill identification method, device, equipment and storage medium
CN112100978B (en) Typesetting processing method based on electronic book, electronic equipment and storage medium
CN114579796A (en) Machine reading understanding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 330000 Building 1, maiyuan Road, Nanchang Economic and Technological Development Zone, Jiangxi Province

Patentee after: Jiangxi wind vane Intelligent Technology Co.,Ltd.

Address before: 330000 Building 1, maiyuan Road, Nanchang Economic and Technological Development Zone, Jiangxi Province

Patentee before: JIANGXI VANEDUCATION TECHNOLOGY Inc.