A method for mapping a question to a frame coordinate, a storage medium and an apparatus
Through the method of OCR recognition and rectangular frame selection of test question blocks, the test question coordinates of teaching materials are automatically bound, which solves the problem of high cost and low efficiency of manual binding and realizes efficient and accurate question coordinate binding.
Patent Information
- Application Number
- CN202310360241.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-06
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-04-06
AI Technical Summary
In the prior art, the binding of question coordinates in supplementary teaching materials requires manual operation, resulting in high costs and low efficiency.
The OCR recognition technology is combined with a rectangular frame to select the test question block. By comparing the similarity with the test question text data pre-entered in the database, the coordinate data of the test question is automatically bound, supporting the refined binding of multi-level test questions.
It reduces manual operations and improves binding efficiency and accuracy, especially the coordinate binding of multi-level test questions is more refined, which improves overall work efficiency.
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent education technology, and in particular to a method, storage medium and device for mapping question and frame coordinates. Background Art
[0002] Smart education is constantly evolving. Currently, smart homework collection typically involves teachers grading paper teaching materials and then taking photos of students' homework information. The smart homework system then analyzes the students' responses. To better identify questions, it's necessary to pre-enter the teaching materials with question information, with question coordinates being crucial.
[0003] Currently, test information in supplementary teaching materials, such as the question stem, answers, and knowledge points, can be directly entered into the database. However, coordinate information must be imported into the original image and entered into the system. Binding the entered coordinates to the test questions is crucial. The current common method is manual binding through the system, but this method is labor-intensive and inefficient. Summary of the Invention
[0004] In view of the deficiencies of the prior art, the present invention aims to provide a method, storage medium and device for mapping title and frame title coordinates.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for mapping title and frame title coordinates, the specific process is as follows:
[0007] S1. Pre-enter the data information of each test question on each page of the supplementary teaching materials into the database, including the page number and test question text data; for a test question with multiple sub-questions, store the question stem text data and sub-question text data of the test question separately;
[0008] S2. Import the original page image of the teaching materials;
[0009] S3. Manually frame each question block on the original page image using a rectangular frame; for a question without multiple sub-questions, use one rectangular frame to frame it; for a question with multiple sub-questions, use different rectangular frames to frame the question stem and each sub-question respectively;
[0010] S4, obtaining coordinate data of each test question block;
[0011] S5, performing OCR recognition on each question block to obtain corresponding question block text data, and then comparing it with the question text data of each question in the database;
[0012] When the similarity between the text data of a certain test block and the text data of a test question in the database exceeds a set similarity threshold, the coordinate data of the test block is directly bound to the test question and entered into the database to form the coordinate data of the test question;
[0013] When the text data of multiple consecutive test question blocks exceed the set percentage and are included in the test text data of the same test question in the database, it is determined that the multiple consecutive test question blocks belong to the same test question, and the coordinate data of the multiple consecutive test question blocks are bound to the matched question stem text data or sub-question text data in sequence and recorded in the database to form the coordinate data of the question stem and the coordinate data of each sub-question.
[0014] Furthermore, the coordinate data includes the coordinates of the upper left corner and the lower right corner of the test question block.
[0015] Furthermore, in step S5, when the similarity between the text data of a certain question block and the text data of multiple questions in the database exceeds a set similarity threshold, its coordinate data is bound to the question with the highest similarity in the database.
[0016] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0017] The present invention also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the above method is implemented.
[0018] The beneficial effects of the present invention are that: the present invention uses OCR recognition technology to coordinately bind and map the selected test questions with the test question data already entered in the database, and can also perform multi-level refined coordinate binding for multi-level test questions, thereby reducing manual operations, effectively improving work efficiency, and also helping to improve binding accuracy. DETAILED DESCRIPTION
[0019] The present invention will be further described below. It should be noted that this embodiment is based on the technical solution and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to this embodiment.
[0020] This embodiment provides a method for mapping title and frame title coordinates. The specific process is as follows:
[0021] S1. Pre-enter the data information of each test question on each page of the teaching materials into the database, including page number, test question text data, answer, knowledge points, etc.; for a test question with multiple sub-questions, store the question stem text data and sub-question text data of the test question separately;
[0022] S2. Import the original page image of the teaching materials;
[0023] S3. Manually frame each question block on the original page image using a rectangular frame; for a question without multiple sub-questions, use one rectangular frame to frame it; for a question with multiple sub-questions, use different rectangular frames to frame the question stem and each sub-question respectively;
[0024] S4, obtaining coordinate data of each test question block;
[0025] S5, performing OCR recognition on each question block to obtain corresponding question block text data, and then comparing it with the question text data of each question in the database;
[0026] When the similarity between the text data of a certain test block and the text data of a test question in the database exceeds a set similarity threshold, the coordinate data of the test block is directly bound to the test question and entered into the database to form the coordinate data of the test question;
[0027] When the text data of multiple consecutive test question blocks exceed the set percentage and are included in the test text data of the same test question in the database, it is determined that the multiple consecutive test question blocks belong to the same test question, and the coordinate data of the multiple consecutive test question blocks are bound to the matched question stem text data or sub-question text data in sequence and recorded in the database to form the coordinate data of the question stem and the coordinate data of each sub-question.
[0028] It should be noted that, in order to establish the binding relationship between the stem and each small question in the big question and the corresponding coordinate data in a hierarchical manner, so as to achieve more accurate question recognition thereafter, the stem and small question of the test question with multiple small questions are respectively framed with rectangular frames in the method of this embodiment. Therefore, in the matching stage, if it is found that the text data of multiple consecutive test question blocks are all included in the same test question (taking into account the OCR recognition error and the comparison error, a percentage threshold is set, such as 90%. When the text data of a certain test question block exceeds this percentage and is included in the text data of a certain test question in the database, it is considered that the text of the test question block is included in the text data of the corresponding test question), it is determined that the multiple consecutive test question blocks belong to the same test question, and the coordinate data of the multiple test question blocks are sequentially bound to the stem text data or small question text data matched thereto, thereby forming the coordinate data of the stem in a big question and the coordinate data of each small question.
[0029] In this embodiment, the coordinate data includes the coordinates of the upper left corner and the lower right corner of the test question block.
[0030] In this embodiment, in step S5, when the similarity between the text data of a certain question block and the text data of multiple questions in the database exceeds a set similarity threshold, its coordinate data is bound to the question with the highest similarity in the database.
[0031] Those skilled in the art can make various corresponding changes and modifications based on the above technical solutions and concepts, and all of these changes and modifications should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for mapping title and frame title coordinates, characterized in that: The specific process is: S1. Pre-enter the data information of each test question on each page of the supplementary teaching materials into the database, including the page number and test question text data; for a test question with multiple sub-questions, store the question stem text data and sub-question text data of the test question separately; S2. Import the original page image of the teaching materials; S3. Manually frame each question block on the original page image using a rectangular frame; for a question without multiple sub-questions, use one rectangular frame to frame it; for a question with multiple sub-questions, use different rectangular frames to frame the question stem and each sub-question respectively; S4, obtaining coordinate data of each test question block; S5, performing OCR recognition on each question block to obtain corresponding question block text data, and then comparing it with the question text data of each question in the database; When the similarity between the text data of a certain test block and the text data of a test question in the database exceeds a set similarity threshold, the coordinate data of the test block is directly bound to the test question and entered into the database to form the coordinate data of the test question; When the text data of multiple consecutive test question blocks exceed the set percentage and are included in the test text data of the same test question in the database, it is determined that the multiple consecutive test question blocks belong to the same test question, and the coordinate data of the multiple consecutive test question blocks are bound to the matched question stem text data or sub-question text data in sequence and recorded in the database to form the coordinate data of the question stem and the coordinate data of each sub-question.
2. The method according to claim 1, characterized in that The coordinate data includes the coordinates of the upper left corner and the lower right corner of the test question block.
3. The method according to claim 1, characterized in that In step S5, when the similarity between the text data of a question block and the text data of multiple questions in the database exceeds a set similarity threshold, its coordinate data is bound to the question with the highest similarity in the database.
4. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
5. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Picture information extraction method and device, computer device, and storage medium
CN109635627A
Point-reading content positioning method, point-reading content positioning device, electronic equipment and storage medium
CN110766996A