An intelligent test paper question cutting method and device, computer equipment and readable storage medium
By intelligently processing test paper image data, extracting and marking the hierarchical relationship of test paper sub-questions, the problem of low efficiency in traditional manual processing is solved, and efficient and accurate test paper question identification and management are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DMAI (GUANGZHOU) CO LTD
- Filing Date
- 2024-10-25
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional test paper processing methods rely on manual operation, which is inefficient and makes it difficult to accurately handle questions with complex hierarchical relationships, resulting in time-consuming test bank construction and a high error rate.
The system employs intelligent methods to acquire original test paper image data, extracts the first line of questions after preprocessing, and uses a pre-trained model to segment and structure the data through top-down hierarchical judgment and hierarchical identification, thereby realizing hierarchical marking and metadata management of test paper sub-questions.
It enables intelligent operation of test paper processing, improving efficiency and accuracy, and facilitating subsequent test paper management, analysis, and retrieval.
Smart Images

Figure CN119600632B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart education, and more specifically, to a method, apparatus, computer device, and readable storage medium for intelligent test paper question-solving. Background Technology
[0002] In the education sector, with the increasing demand for digital teaching resource management, the digital processing of exam papers has become crucial. Traditional exam paper processing methods often rely on manual operation, which is inefficient and prone to errors. For example, when building a question bank, questions need to be extracted from a large number of paper exam papers. Manually segmenting questions is not only time-consuming, but also difficult to accurately handle questions with complex hierarchical relationships (such as a large question containing multiple sub-questions, and further sub-questions containing even more detailed questions). Summary of the Invention
[0003] The purpose of this invention is to provide an intelligent test paper topic selection method, device, computer equipment, and readable storage medium.
[0004] In a first aspect, embodiments of the present invention provide an intelligent test paper topic segmentation method, including:
[0005] The original test paper image data is acquired, and the original test paper image data is preprocessed to obtain the test paper text data;
[0006] The first line of questions is extracted from the test paper text data to obtain multiple first lines of questions included in the test paper text data. Each first line of questions corresponds to at least one test paper sub-question.
[0007] Perform a top-down hierarchical judgment on multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question;
[0008] The multiple first-row test questions are segmented according to the hierarchical identifier to obtain multiple questions to be added to the database. Each question to be added to the database is then processed using a pre-trained database entry hierarchical labeling model to obtain a target question as an independent question.
[0009] The target question is marked as a Level 2 question in the database, and the next level question in the Level 2 question is marked as a Level 3 question in the database. The previous level question in the Level 2 question is marked as a Level 1 question in the database.
[0010] The entry level tags and metadata of each question in the test paper are stored in a structured manner to obtain the question-cutting results corresponding to the original test paper image data.
[0011] In one possible implementation, the preprocessing of the original exam paper image data to obtain exam paper text data includes:
[0012] The original test paper image data is sequentially processed through format conversion, text clearing, structuring, and metadata extraction to obtain the test paper text data.
[0013] In one possible implementation, the step of extracting the first line of questions from the test paper text data to obtain multiple first lines of questions included in the test paper text data includes:
[0014] The question-relevance model trained based on multiple sample questions is invoked, and the test paper text data is input into the question-relevance model to obtain the first line of the multiple questions.
[0015] In one possible implementation, the step of performing a top-down hierarchical judgment on multiple test paper sub-questions to obtain a hierarchical identifier corresponding to each test paper sub-question includes:
[0016] The topic-specific model is invoked to perform top-down hierarchical judgment on the multiple test paper sub-questions, obtaining the hierarchical identifier corresponding to each test paper question. The multiple hierarchical identifiers constitute the hierarchical tree structure relationship of the test paper text data.
[0017] In one possible implementation, the step of segmenting multiple first-row test questions according to the hierarchical identifier to obtain multiple questions to be added to the database, and processing each question to be added to the database using a pre-trained database hierarchical labeling model to obtain target questions as independent questions, including:
[0018] Based on the hierarchical identifier, the multiple first-row test questions are segmented to obtain multiple questions to be added to the database;
[0019] Based on the hierarchical tree structure, the test paper node corresponding to each question to be added to the database is determined, and the test paper node includes the text content of the corresponding question to be added to the database.
[0020] Traverse the test paper nodes and input the corresponding text content according to the order of the test paper nodes to the question independence judgment using the pre-trained database hierarchical labeling model to obtain the target question as an independent question.
[0021] In one possible implementation, the step of structurally storing the database hierarchical tags and metadata of each test paper sub-question to obtain the question segmentation result corresponding to the original test paper image data includes:
[0022] The entry level tag, metadata, basic information, and related information of each sub-question of the test paper are stored in a structured manner to obtain the corresponding structured data;
[0023] The structured data is used as the topic matching result corresponding to the original test paper image data.
[0024] In one possible implementation, the method further includes:
[0025] Obtain an update instruction, the update instruction including update data for the test paper text data;
[0026] The structured data is updated based on the updated data ratio to obtain the updated structured data;
[0027] The updated structured data is used as the updated topic-relevance result.
[0028] Secondly, embodiments of the present invention provide an intelligent test paper matching device, comprising:
[0029] The acquisition module is used to acquire original test paper image data and preprocess the original test paper image data to obtain test paper text data; extract the first line of questions from the test paper text data to obtain multiple first lines of questions included in the test paper text data, and each first line of questions corresponds to at least one sub-question of the test paper; perform top-down hierarchical judgment on multiple sub-questions of the test paper to obtain the hierarchical identifier corresponding to each sub-question of the test paper; segment the multiple first line of questions of the test paper according to the hierarchical identifier to obtain multiple questions to be entered into the database, and process each question to be entered into the database using a pre-trained database entry hierarchical labeling model to obtain target questions as independent questions;
[0030] The topic segmentation module is used to mark the target topic's entry level as a second-level entry topic, mark the next level of the second-level entry topic as a third-level entry topic, and mark the previous level of the second-level entry topic as a first-level entry topic. The module also stores the entry level markings and metadata of each test paper sub-topic in a structured manner to obtain the topic segmentation results corresponding to the original test paper image data.
[0031] Thirdly, embodiments of the present invention provide a computer device, the computer device including a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device performs the method described in the first aspect.
[0032] Fourthly, embodiments of the present invention provide a readable storage medium, the readable storage medium including a computer program, which, when executed, controls the computer device where the readable storage medium is located to execute the method described in the first aspect. Compared with the prior art, the beneficial effects provided by the present invention include: using the intelligent test paper cutting method, apparatus, computer device, and readable storage medium disclosed in the present invention, the method includes: firstly, acquiring original test paper image data and preprocessing it to obtain text data; then, extracting the first line of questions and its contained sub-questions, and performing hierarchical judgment on the sub-questions to obtain hierarchical identifiers; segmenting the first line of questions according to the hierarchical identifiers to obtain questions to be entered into the database; processing the data through the database hierarchical marking model to obtain target questions; and marking the target questions and their upper and lower hierarchical questions. Finally, the hierarchical markers and metadata of each sub-question are structured and stored to obtain the cutting result. This design realizes intelligent operation of test paper cutting, improving the efficiency and accuracy of test paper processing. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart illustrating the steps of the intelligent test paper topic selection method provided in an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the flowchart of the intelligent test paper question-reduction method provided in the embodiments of the present invention;
[0036] Figure 3 A schematic block diagram of the structure of the intelligent test paper cutting device provided in the embodiments of the present invention;
[0037] Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0039] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0040] In order to solve the technical problems mentioned in the background art Figure 1 This is a flowchart illustrating the intelligent test paper segmentation method provided in this embodiment. The method will now be described in detail.
[0041] Step S201: Obtain the original test paper image data and preprocess the original test paper image data to obtain the test paper text data;
[0042] Step S202: Extract the first line of questions from the test paper text data to obtain multiple first lines of questions included in the test paper text data. Each first line of questions corresponds to at least one test paper sub-question.
[0043] Step S203: Perform a top-down hierarchical judgment on multiple test paper questions to obtain the hierarchical identifier corresponding to each test paper question;
[0044] Step S204: According to the hierarchical identifier, the multiple first-row test questions are segmented to obtain multiple questions to be added to the database, and each question to be added to the database is processed using a pre-trained database entry hierarchical labeling model to obtain target questions as independent questions.
[0045] Step S205: Mark the target question's entry level as a Level 2 entry question, mark the next level question of the Level 2 entry question as a Level 3 entry question, and mark the previous level question of the Level 2 entry question as a Level 1 entry question.
[0046] Step S206: The entry level tag and metadata of each test paper sub-question are stored in a structured manner to obtain the question-cutting result corresponding to the original test paper image data.
[0047] In an embodiment of the invention, for example, in a school's examination management system, after a large-scale examination, invigilators scan the paper exam papers into image files using a scanner, and these image files are uploaded to a server. For instance, in a final exam with 500 students, each student's exam paper is 5 pages long, resulting in a total of 2500 pages of exam paper image data. The server receives this raw exam paper image data from a specific folder storing this image data or through a network receiving module. This image data may be in JPEG or PNG format, and the images contain various content from the exam paper, such as questions, answer areas, and student information.
[0048] The raw exam paper image data received by the server may be in various formats, such as JPEG. The server first converts this image data into a unified format that facilitates subsequent processing, such as converting it to TIFF format. This is because TIFF format may have better compatibility when performing operations such as text extraction from images. For example, the server uses image format conversion libraries, such as ImageMagick, to perform format conversion operations on each exam paper image.
[0049] Due to potential issues such as paper wrinkles, stains, or poor scanning equipment resolution during the scanning process, the text in exam paper images may be unclear. The server employs image enhancement techniques to improve text clarity. For example, for an exam paper image with somewhat blurry text after scanning, the server applies a grayscale adjustment algorithm to adjust the image's grayscale values, enhancing the contrast between the text and the background. Filtering algorithms, such as median filtering, can also be used to remove noise from the image, making the text edges clearer. This is akin to restoring an old exam paper with stains and blurred handwriting, making the text clearly legible.
[0050] Exam paper images have a certain structure; for example, questions are usually arranged according to certain layout rules. The server performs structured processing on the image, identifying different regions within the exam paper, such as the title region, question region, and answer region. For instance, the server determines the boundaries of different regions by analyzing features such as blank lines and separator lines in the image. For a math exam paper, the server can identify multiple-choice question regions, fill-in-the-blank question regions, and problem-solving question regions, and mark these regions in preparation for subsequent question extraction.
[0051] The exam paper image also contains metadata such as the exam name, subject, and exam date. The server extracts this metadata by identifying and analyzing specific areas of the image (such as the header or footer of the exam paper). For example, the header of an English exam paper might indicate "Senior High School English Final Exam" and the exam date "June 2023." The server uses Optical Character Recognition (OCR) technology to locate these areas and extract the text information. This metadata is then associated with the previously processed exam paper image to obtain the final exam paper text data.
[0052] The server has pre-trained a large-scale question-matching model using a large number of sample questions (e.g., questions collected from various exam papers over the years). This large-scale question-matching model can be a deep learning-based neural network model, such as a Transformer architecture model. When the server receives the exam paper text data, it inputs this text data into the large-scale question-matching model. For example, for a comprehensive exam paper text data containing multiple question types (multiple choice, short answer, essay, etc.), the large-scale question-matching model identifies the first line of each question by analyzing the semantic information and format features (such as question numbers, specific punctuation marks, etc.) in the text. For example, in a physics exam paper, the first line of the multiple choice questions may begin with "1. Which of the following statements about Newton's second law is correct?" The large-scale question-matching model can accurately locate such a sentence as the first line of the question. The first line of the exam paper question corresponding to each question may contain multiple sub-questions. For example, in an essay question, the first line of the question is "Discuss the application of physics in modern technology", and there may be several sub-questions below, such as "(1) Application in electronic communication; (2) Application in new energy development", etc.
[0053] The server calls the topic-specific model again to perform hierarchical judgment on the previously identified sub-topics of the exam paper. Taking a computer science exam paper as an example, there is a large programming project topic, "Write a Web-based online shopping system." This topic has several sub-topics, such as "(1) Database design; (2) User interface design; (3) Server-side logic implementation." The topic-specific model analyzes the relationship between these sub-topics and the parent topic (the large programming project topic), marking "Write a Web-based online shopping system" as level 1 (root level), and marking sub-topics such as "Database design," "User interface design," and "Server-side logic implementation" as level 2. If there are more detailed sub-topics under the "Database design" sub-topic, such as "(a) Data table structure design; (b) Data storage procedure design," then these more detailed sub-topics will be marked as level 3. In this way, all these hierarchical identifiers constitute the hierarchical tree structure relationship of the exam paper text data, just like a family tree, clearly showing the position of each topic in the entire exam paper structure.
[0054] The server segments the first line of exam questions based on previously obtained hierarchical identifiers. For example, in a chemistry exam, there might be a comprehensive experimental question whose first line reads "Investigate the reaction between copper and nitric acid," followed by several sub-questions at different levels. Based on these hierarchical identifiers, the server segments this large comprehensive experimental question into multiple questions awaiting inclusion in the database. For instance, the section on reaction principles might be segmented into one question, while the section on experimental setup might be segmented into another.
[0055] For each question to be added to the database, the server determines its corresponding test paper node based on the hierarchical tree structure. Taking a history test paper as an example, there is a main topic on "Ancient Civilizations of the World," which includes sub-topics such as "Ancient Egyptian Civilization," "Ancient Babylonian Civilization," and "Ancient Indian Civilization." Each question corresponds to a test paper node, which contains the text content of the corresponding question. For example, the test paper node for the question "Ancient Egyptian Civilization" contains all descriptive content about ancient Egyptian civilization, such as "the origins, political system, and religious beliefs of ancient Egyptian civilization."
[0056] The server iterates through these exam paper nodes, inputting the text content of each node into a pre-trained hierarchical labeling model according to their sequential relationship. This hierarchical labeling model is also trained using a large amount of question data and can determine whether a question is an independent question. For example, in a geography exam paper, there is a main question about "distribution of climate types," with several sub-questions. The server inputs the exam paper node content corresponding to these sub-questions into the hierarchical labeling model sequentially. For some sub-questions that can exist independently and have complete question and answer requirements, such as "distribution characteristics of tropical monsoon climate," the model will determine them as independent questions and designate them as target questions. However, for some sub-questions that are merely supplementary explanations or incomplete parts under the main question, the model will not determine them as independent questions.
[0057] The server hierarchically tags the target questions it receives. Taking a biology exam as an example, a main question might be "Structure and Function of Cells," with a sub-question "Structure and Function of Organelles" identified as a target question. The server marks "Structure and Function of Organelles" as a second-level question for inclusion in the database. If, under the sub-question "Structure and Function of Organelles," there are further sub-questions about "Structure and Function of Mitochondria," then "Structure and Function of Mitochondria" will be marked as a third-level question for inclusion in the database. "Structure and Function of Cells" itself becomes a first-level question within the second-level question "Structure and Function of Organelles." This establishes a clear hierarchical relationship for the questions, facilitating subsequent exam management, analysis, and retrieval.
[0058] The server stores the following in a structured manner for each exam paper's sub-question: its entry level tag, previously extracted metadata (such as exam subject, exam paper name, etc.), basic information (such as question type, number of words in the question, etc.), and related information (such as its association with other questions). For example, for a target question in a math exam paper, "Solve the quadratic equation x² - 5x + 6 = 0", the server will store its entry level tag (assuming it is a level 2 question), metadata (e.g., this is a middle school math final exam paper), basic information (question type is solving equations, the question has a short number of words), and related information (it may have knowledge point associations with other algebra questions), according to a certain database structure (such as the table structure in a relational database, which may include a question table, a hierarchical relationship table, a metadata table, etc.).
[0059] After the aforementioned structured storage, the structured data stored in the database constitutes the question segmentation results corresponding to the original test paper image data. For example, when teachers or educational administrators want to view the question segmentation of a test paper, they can query the database to obtain detailed information for each question, including hierarchical relationships, question content, and related metadata. This is of great significance for test paper analysis and statistics (such as difficulty analysis of questions at different levels, statistical analysis of question type distribution, etc.) and the management of teaching resources (such as generating a question bank based on the question segmentation results, etc.).
[0060] In this embodiment of the invention, the preprocessing of the original test paper image data to obtain test paper text data can be performed through the following example.
[0061] The original test paper image data is sequentially processed through format conversion, text clearing, structuring, and metadata extraction to obtain the test paper text data.
[0062] In this embodiment of the invention, for example, the server retrieves raw exam paper image data from the image repository of a school's exam management system. This image data may come from different scanning devices and be in various formats. For example, some may be in high-resolution JPEG format, as some scanners default to JPEG output to balance image quality and file size; others may be in PNG format, which may be generated by mobile scanning applications to ensure lossless image compression, especially for exam paper images containing handwritten answers and complex diagrams.
[0063] Based on subsequent processing requirements and the system's internal standard format, the server converts all original exam paper image data to TIFF format. TIFF format supports multi-page images and has excellent compatibility in terms of image color modes and resolution, which is crucial for subsequent text extraction and processing.
[0064] The server uses a specialized image format conversion library, such as ImageMagick, to perform format conversion operations. For each exam paper image, the server invokes the ImageMagick conversion command. For example, for a JPEG format exam paper image, the server executes a command like "convert input.jpg-compress none output.tiff", where "input.jpg" is the original JPEG format exam paper image and "output.tiff" is the converted TIFF format image. For PNG format images, the corresponding conversion command is executed to convert them to TIFF format. This process is automated; the server performs format conversion on each original exam paper image sequentially according to a predefined program.
[0065] Before performing text sharpening, the server first performs a quality analysis on the converted exam paper image. For example, it determines the image's contrast by analyzing the grayscale histogram. If the histogram shows a relatively concentrated distribution of grayscale values, it indicates low image contrast, and the text may not be clear enough. Simultaneously, the server also detects noise in the image by analyzing the dispersion of pixel values to determine the presence of noise.
[0066] For exam paper images with low contrast, the server uses grayscale adjustment algorithms to improve the contrast between text and background. For example, the server uses a linear transformation algorithm to adjust the grayscale value of each pixel according to the grayscale range of the image. Assuming that the grayscale value range of an exam paper image is [50, 150], the server calculates and adjusts it to the range of [0, 255], making the text darker and the background whiter, thereby improving the contrast.
[0067] If noise is detected in the image, the server uses a filtering algorithm to remove it. Taking median filtering as an example, the server takes a fixed-size neighborhood (such as a 3x3 or 5x5 pixel area) centered on each pixel in the image, sorts the pixel values within the neighborhood, and uses the median value as the new value for the center pixel. This effectively removes isolated noise, making text edges smoother and clearer. For blurry noise caused by slight shaking of the scanning equipment, this method can significantly improve image quality, making the text on the exam paper easier to recognize.
[0068] The server begins structuring the exam paper image after text-clarification. First, the server analyzes features such as blank lines and separator lines in the image. For example, in most exam papers, questions are separated by blank lines, and different question types are separated by thicker separator lines. The server scans the image's pixel rows, marking possible question separator locations when it finds multiple consecutive rows with pixel values close to white (indicating blank rows). For separator lines, the server determines them by detecting consecutive black pixel bars in the horizontal or vertical direction.
[0069] Based on identified features such as blank lines and separators, the server determines the boundaries of different areas within the exam paper. For example, on the first page of an exam paper, there is usually a title area, which may be located above the exam paper image. The server determines the upper and lower boundaries of the title area based on blank lines and separators. For the question area, the server divides different questions into different areas based on blank lines, determining the scope of each question area. Similarly, for the answer area, the server determines its boundaries based on the exam paper's layout rules (such as the answer area usually being below the questions with some white space).
[0070] The server labels different regions with different types of tags. Title regions are labeled "title"; question regions are labeled according to question type (e.g., multiple-choice questions are labeled "multiple-choice", short-answer questions are labeled "short-answer", etc.); and answer regions are labeled "answer". In this way, the exam paper image is divided into structured regions with different types of tags, providing a foundation for subsequent question extraction and analysis.
[0071] The server locates metadata by analyzing specific areas of the exam paper image. Generally, the header and footer of the exam paper are areas where metadata is concentrated. The server determines the location of the header and footer by detecting text features on the top and bottom edges of the image. For example, the header contains information such as the exam paper name and subject, while the footer contains information such as page numbers and exam time.
[0072] For the located metadata area, the server uses OCR technology to extract the text information. The server calls a pre-installed OCR engine, such as Tesseract OCR. For text in the header, the server inputs the image data of the header area into the Tesseract OCR engine, which recognizes the text in the image. For example, if the header contains text such as "High School Physics Final Exam Paper," the OCR engine will accurately convert it into an editable text string.
[0073] The server associates the extracted metadata with the previously processed exam paper image. For example, metadata such as the exam paper name "High School Physics Final Exam," the exam subject "Physics," and the exam date "June 2023" are associated with the corresponding exam paper image storage record to form a complete exam paper information package. This package contains all relevant information after the exam paper image has been processed, ultimately yielding the exam paper text data. This exam paper text data not only includes the questions in the exam paper but also related metadata information, providing comprehensive foundational data for subsequent question segmentation processing.
[0074] In this embodiment of the invention, the step of extracting the first line of questions from the test paper text data to obtain multiple first lines of questions included in the test paper text data can be implemented through the following example.
[0075] The question-relevance model trained based on multiple sample questions is invoked, and the test paper text data is input into the question-relevance model to obtain the first line of the multiple questions.
[0076] In this embodiment of the invention, the exemplary large-scale model deployed on the server is the result of meticulous construction and long-term training. Before building the model, the development team collected a large number of sample questions from different educational institutions, subjects, grades, and exam types as training data. These sample questions cover various question types, such as calculation problems, proof problems, and multiple-choice questions in mathematics exams; reading comprehension, composition, and classical poetry fill-in-the-blank in Chinese exams; and listening comprehension, grammar fill-in-the-blank, and reading comprehension in English exams.
[0077] These sample questions come from a wide range of sources, including past middle school and college entrance examination questions, mock exam papers from various regions, and internal test papers from some well-known educational institutions. For example, tens of thousands of questions were collected from college entrance examination mathematics papers from multiple provinces over the past ten years, and a large number of questions were also selected from the practice questions accompanying different versions of textbooks.
[0078] Deep learning techniques are employed to construct large-scale models tailored to the specific questions, such as models built on the Transformer architecture, which has excellent capabilities for handling long sequences of text. During training, the collected sample question text data is preprocessed, including text segmentation and tokenization, converting the text in the questions into numerical vector representations that the model can understand.
[0079] During training, the model learns various patterns in the question text, such as question number patterns (e.g., “1.”, “(1)”, etc.), question type-related vocabulary patterns (e.g., “find”, “prove” in mathematics, “appreciate”, “summarize”, etc. in Chinese), and question structure patterns (e.g., the relationship between the question stem and the question). Through repeated training on a large number of sample questions, the model gradually optimizes its internal parameters to improve the accuracy of identifying the first line of the question.
[0080] After preprocessing the original test paper image data to obtain the test paper text data, the server passes this test paper text data to the question-specific large model. For example, for a comprehensive test paper containing multiple subjects such as Chinese, mathematics, and English, the preprocessed test paper text data is a long text containing all the questions, with the questions from different subjects arranged in the order they appear on the test paper.
[0081] In this test paper text data, the original formatting and content information of the questions for each subject have been preserved. For example, the text and questions in the Chinese reading comprehension questions; and the formulas and numbers in the math questions. At the same time, due to the previous preprocessing steps, the text in the document has been clearly identified and associated with relevant metadata (such as the page number of the question and the subject).
[0082] Before inputting the test paper text data into the topic-specific large-scale model, the server needs to adapt the data format. This is because the topic-specific large-scale model has specific format requirements for the input data during training, such as text length limits and encoding methods.
[0083] If the model requires that the length of the input text not exceed a certain number of bytes, the server will segment the longer test paper text data to ensure that each segment meets the model's input requirements. Simultaneously, according to the model's encoding requirements, the test paper text data will be converted to the appropriate encoding format, such as UTF-8 encoding.
[0084] After receiving the formatted exam paper text data, the model begins in-depth semantic analysis. For each sentence in the exam paper text, the model makes judgments based on the semantic patterns learned during training.
[0085] Taking a question from a Chinese language exam paper as an example, “Read the following classical Chinese text and answer the following questions. (1) Explain the meaning of the underlined words. (2) Translate the underlined sentences in the text.” The model determines that “Read the following classical Chinese text and answer the following questions” is the first line of the question by understanding the semantics of words such as “read,” “answer,” “explain,” and “translate” in the text, as well as the logical relationship between sentences.
[0086] In addition to semantic analysis, the topic-relevant large model also identifies format features in the test paper text to determine the first line of a question. For example, question numbers are an important format feature. The model can recognize common question number formats such as "1.", "(1)", "I."
[0087] In a history test paper, "I. Briefly describe the development process of the ancient Chinese imperial examination system. (1) When did the imperial examination system originate? (2) What were the developments of the imperial examination system in the Tang Dynasty?" By recognizing the question number "I.", the model determines that "I. Briefly describe the development process of the ancient Chinese imperial examination system." is the first line of the question, and the sentences related to "(1)" and "(2)" later are regarded as sub-questions under this question.
[0088] After semantic analysis and format feature recognition, the topic-relevant large model outputs the identified multiple first lines of questions to the server. These first lines of questions accurately represent each question in the test paper, and each first line of the question corresponding to the first-line test paper question includes at least one test paper sub-question. For example, for a test paper containing 20 questions, the topic-relevant large model may output 20 first lines of questions, and each first line of the question may be followed by one or more sub-questions. These first lines of questions will serve as the basis for subsequent processing steps (such as hierarchical judgment, segmentation, etc.).
[0089] In an embodiment of the present invention, the top-down hierarchical judgment of multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question can be implemented through the following example.
[0090] Call the topic-relevant large model to perform top-down hierarchical judgment on the multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question. The multiple hierarchical identifiers constitute the hierarchical tree-like structure relationship of the test paper text data.
[0091] In an embodiment of the present invention, exemplarily, before the server is about to call the topic-relevant large model again for hierarchical judgment, it first checks the current state of the topic-relevant large model. This includes checking whether the model is in a normal running state and whether there are sufficient computing resources (such as memory, CPU or GPU resources, etc.) available. For example, the server checks whether there is any abnormal resource occupation in the process of the model running to ensure that the model can run stably and efficiently process the upcoming test paper sub-question data.
[0092] The server organizes and formats the previously obtained test paper question data to meet the input data requirements of the question-splitting model. For each test paper question, the server ensures that its text content is complete, accurate, and arranged in a certain order. For example, if the test paper questions were extracted sequentially in the order of the test paper during the initial identification of the first line, the server will maintain this order at this stage. Simultaneously, the server adds necessary labeling information to each test paper question, such as the page number and subject. This information helps the question-splitting model better understand the relationships between questions, although it may not directly participate in hierarchical judgment, it provides more contextual information.
[0093] After receiving the test paper question data from the server, the model begins a top-down hierarchical analysis. First, the model analyzes the relationships between the questions from a semantic perspective.
[0094] Taking a computer science exam paper as an example, there is a major topic: "Design an online shopping system." Its sub-topics include: "(1) Database design, including the design of user information tables and product information tables," "(2) User interface design, such as login interface and product display interface," and "(3) Server-side logic implementation, such as order processing and inventory management." The topic-specific model, through understanding the semantics of these sub-topics, determines that "Design an online shopping system" is the top-level topic, with a level 1 hierarchical designation, because it is a comprehensive and general topic. Sub-topics such as "(1) Database design, including the design of user information tables and product information tables," are specific tasks within this major topic framework and are marked as level 2 hierarchical designations.
[0095] In this process, the model analyzes the keywords in the question. For example, the word "design" is a general task description in the main question, while "database design", "user interface design" and "server-side logic implementation" in the sub-questions are specific design aspects under this general task. The hierarchy is determined by this semantic inclusion relationship.
[0096] In addition to semantic relationships, the topic-specific model also determines the hierarchy based on the question structure. In some test papers, questions may use specific structures to represent hierarchical relationships.
[0097] For example, in a chemistry exam, there is a question titled "Investigating the Chemical Properties of Metals," with sub-questions presented in the following structure: "1. Investigating the Chemical Properties of Iron: (1) The Reaction of Iron with Oxygen; (2) The Reaction of Iron with Acids," and "2. Investigating the Chemical Properties of Copper: (1) The Reaction of Copper with Oxygen; (2) The Reaction of Copper with Nitric Acid." The problem-solving model identifies the numerical sequence and indentation format (such as the nested relationship between "1." and "(1)") in this question structure, determining that "Investigating the Chemical Properties of Metals" is a Level 1 identifier, "1. Investigating the Chemical Properties of Iron" and "2. Investigating the Chemical Properties of Copper" are Level 2 identifiers, while "(1) The Reaction of Iron with Oxygen," etc., are Level 3 identifiers.
[0098] When determining the level of a topic, the comprehensive model often considers multiple factors, including semantic relationships and the structure of the question. For example, in a physics exam, there is a question titled "Analyzing the Law of Conservation of Energy in Mechanics," and one of the sub-questions is "(1) The energy conservation situation in the motion of a simple pendulum, combined with the conversion of kinetic energy and potential energy." Semantically, "Analyzing the Law of Conservation of Energy in Mechanics" is a general theoretical analysis question, which is a level 1 level. From the perspective of the question structure, "(1) The energy conservation situation in the motion of a simple pendulum, combined with the conversion of kinetic energy and potential energy" is an analysis of the specific situation of the motion of a simple pendulum under this general theory, so it is determined to be a level 2 level.
[0099] In this way, the problem-solving model assigns a corresponding hierarchical identifier to each question in the test paper.
[0100] After receiving the hierarchical identifiers corresponding to each question in the test paper from the large-scale question model, the server begins to construct a hierarchical tree structure. First, the server organizes all hierarchical identifiers according to the order of the questions. For example, for a comprehensive test paper containing questions from multiple subjects, the server will first separate the questions by subject, and then arrange the hierarchical identifiers within each subject according to the order of the questions in the test paper.
[0101] Taking a test paper containing both math and language arts questions as an example, first group the hierarchical labels related to the math questions together, and then group the hierarchical labels related to the language arts questions. In the math questions, if there is a major question with multiple sub-questions, then the hierarchical labels of these sub-questions are arranged in descending order (from the top-level question to the bottom-level sub-question).
[0102] Based on the organized hierarchical identifiers, the server constructs a hierarchical tree structure. To illustrate with a simple example, suppose a test paper has the following structure:
[0103] -Question A (Level 1)
[0104] - Question A-1 (Level 2)
[0105] -Question A-1-1 (Level 3)
[0106] - Question A-2 (Level 2)
[0107] - Question B (Level 1)
[0108] - Question B-1 (Level 2)
[0109] The server constructs a tree-like data structure, where question A and question B are the root nodes (level 1), question A-1 and question A-2 are child nodes of question A (level 2), question A-1-1 is a child node of question A-1 (level 3), and question B-1 is a child node of question B (level 2). This hierarchical tree structure clearly shows the hierarchical relationship between the questions in the exam paper, providing an important basis for subsequent operations such as question segmentation and data storage.
[0110] In this embodiment of the invention, the step of segmenting multiple first-row test questions according to the hierarchical identifier to obtain multiple questions to be entered into the database, and processing each question to be entered into the database using a pre-trained database entry hierarchical labeling model to obtain a target question as an independent question, can be implemented through the following example.
[0111] Based on the hierarchical identifier, the multiple first-row test questions are segmented to obtain multiple questions to be added to the database;
[0112] Based on the hierarchical tree structure, the test paper node corresponding to each question to be added to the database is determined, and the test paper node includes the text content of the corresponding question to be added to the database.
[0113] Traverse the test paper nodes and input the corresponding text content according to the order of the test paper nodes to the question independence judgment using the pre-trained database hierarchical labeling model to obtain the target question as an independent question.
[0114] In this embodiment of the invention, for example, the server first reads information from the previously constructed data structure related to the hierarchical identifiers and the first row of test questions. For example, for a comprehensive test paper containing math, Chinese, and English questions, the server obtains each first row of test questions and its corresponding hierarchical identifier. In the math section, there might be a first row of test questions that reads "1. Solve a quadratic equation: (1) Derivation of the quadratic formula; (2) Solve the equation (x²-5x+6=0) using the completing the square method," with a hierarchical identifier of level 1 (for all quadratic equation-related questions), where "(1) Derivation of the quadratic formula" has a hierarchical identifier of level 2, and "(2) Solve the equation (x²-5x+6=0) using the completing the square method" also has a hierarchical identifier of level 2.
[0115] Based on the hierarchical identifier, the server begins to segment the questions in the first row of the test paper. For the above math questions, since "1. Solve a quadratic equation" is a question containing multiple sub-contents, the server segments it into two questions to be entered into the database according to the level 2 hierarchical identifier, namely "Derivation of the quadratic formula" and "Solve the equation (x2-5x+6=0) using the completing the square method". In the Chinese test paper section, if there is a question in the first row of the test paper that is "1. Reading comprehension: (1) Summarize the main idea of the article; (2) Analyze the character in the article", according to the hierarchical identifier, it will be segmented into two questions to be entered into the database: "Summarize the main idea of the article" and "Analyze the character in the article".
[0116] The server has constructed a hierarchical tree structure for the test paper text data. For each question to be added to the database after segmentation, the server determines its corresponding test paper node through this hierarchical tree structure. Taking a biology test paper as an example, suppose there is a large question in the hierarchical tree structure: "1. Cell structure and function: (1) Structure and function of organelles: (a) Structure and function of mitochondria; (b) Structure and function of chloroplasts". If "structure and function of mitochondria" is a question to be added to the database, the server determines its test paper node by searching in the hierarchical tree structure.
[0117] This exam paper node contains the complete text of the question "Structure and Function of Mitochondria" to be added to the database, and may also include some related auxiliary information, such as its specific location in the exam paper (page number, paragraph, etc.). For example, in this biology exam paper, the text content of the "Structure and Function of Mitochondria" node might be: "Mitochondria are important organelles in cells. They have a double-membrane structure. Please describe the structural characteristics of their inner and outer membranes, as well as the main biochemical reactions that take place in mitochondria, etc." It would also include its location information in the exam paper, such as being located on page 3, paragraph 2.
[0118] The server begins by sequentially traversing all exam paper nodes. For example, in a large exam paper containing multiple subjects and various question types, the server starts with the first exam paper node for the first subject and processes each exam paper node in turn. If the server is processing the exam paper nodes for the math section first, it will access the corresponding exam paper nodes one by one according to the order of the math questions in the exam paper.
[0119] For each test paper node, the server extracts the text content of the questions to be added to the database and inputs this text content into a pre-trained hierarchical labeling model according to the order of the test paper nodes. Taking a historical test paper as an example, suppose there are two questions to be added to the database: "1. Briefly describe the starting point and ending point of the ancient Silk Road" and "2. Analyze the impact of the ancient Silk Road on cultural exchanges between East and West". The server will input the text content of the test paper nodes corresponding to these two questions into the hierarchical labeling model in sequence.
[0120] The hierarchical labeling model is pre-trained using a large amount of question data of different types. This model determines whether a question is independent based on the input text content. For the questions in the aforementioned historical exam papers, the model analyzes the completeness and independence of each question. The question "1. Briefly describe the starting point and ending point of the ancient Silk Road" has a clear question content and can be answered independently; the model will determine it as an independent question. However, for some questions that may have dependencies or are incomplete, the model will determine that they are not independent questions. For example, if a question is "Based on the above-mentioned Silk Road, continue to analyze," because it depends on the previously mentioned Silk Road-related content and is incomplete, the model will not determine it as an independent question.
[0121] After the hierarchical labeling model determines the questions to be added to the database, those deemed independent become target questions. The server collects these target questions, which will serve as the basis for subsequent database addition and hierarchical labeling operations. For example, in a test paper containing many questions to be added, the model identifies 20 target questions. These target questions cover different subjects and types of questions, are structurally independent, and can be stored, managed, and analyzed separately.
[0122] In this embodiment of the invention, the step of structurally storing the database entry level markers and metadata of each test paper sub-question to obtain the question segmentation result corresponding to the original test paper image data includes:
[0123] The entry level tag, metadata, basic information, and related information of each sub-question of the test paper are stored in a structured manner to obtain the corresponding structured data;
[0124] The structured data is used as the topic matching result corresponding to the original test paper image data.
[0125] In this embodiment of the invention, for example, the server obtains the entry level tag of each test paper sub-question from the previous processing steps. Taking a physics test paper as an example, for the question "1. Application of Newton's Second Law: (1) Calculate the acceleration of an object; (2) Analyze the relationship between force and acceleration", "1. Application of Newton's Second Law" may be marked as a first-level entry question, and "(1) Calculate the acceleration of an object" and "(2) Analyze the relationship between force and acceleration" may be marked as second-level entry questions. The server organizes these level tag information to clarify the level position of each test paper sub-question in the entire test paper structure.
[0126] The server collects metadata extracted during the preprocessing of exam paper image data. In the example of a physics exam paper, the metadata may include information such as the exam paper name "High School Physics Final Exam Paper," the exam subject "Physics," the exam date "June 2023," and the exam paper version "People's Education Press Edition." This metadata provides broader background information for the sub-questions of the exam paper, which is helpful for subsequent querying, analysis, and management of the exam paper.
[0127] For each question in the test paper, the server determines its basic information. This information includes the question type, the number of words in the question, and the estimated difficulty level. For example, for the question "Calculate the acceleration of an object," the question type is a calculation problem, and the number of words in the question (including punctuation and numbers) is estimated to be around 20. Regarding the estimated difficulty level, the server can make a preliminary judgment based on some predefined rules, such as the number of knowledge points involved and the complexity of the calculation. If the question only involves a simple application of Newton's second law and the calculation process is not complex, it may be marked as medium difficulty.
[0128] The server retrieves relevant information for each question in the exam paper. This information may include relationships with other questions and the scope of knowledge points covered. In the physics exam, the question "Calculate the acceleration of an object" is related to the question "Analyze the relationship between force and acceleration" because they both revolve around Newton's second law. Regarding the scope of knowledge points covered, this question primarily covers the application of Newton's second law. The server collects this information, including relationships and the scope of knowledge points covered.
[0129] The server chooses an appropriate storage structure to store this data. In modern data management, both relational databases (such as MySQL) and non-relational databases (such as MongoDB) can be used to store this data. If a relational database is chosen, the server will create multiple related tables, such as a "test paper information table," a "question table," a "hierarchical relationship table," and a "knowledge point association table." If a non-relational database is chosen, the relevant information for each test paper sub-question will be stored in the form of documents (such as JSON format documents).
[0130] In a relational database, a field is created in the "Question Table" to store the entry level tag. For each question in the exam paper, its corresponding entry level tag (such as Level 1, Level 2, etc.) is stored in this field. For example, in the record for the question "Calculate the acceleration of an object", the tag "Entry Level 2 Question" is stored in the corresponding field. In a non-relational database, if stored as a JSON document, a key-value pair of "Entry Level Tag" is added to the document representing this question, such as {"Entry Level Tag":"Entry Level 2 Question"}.
[0131] In a relational database, metadata is stored in the "Exam Paper Information Table." Metadata such as exam paper name, exam subject, exam time, and exam paper version are stored in their respective fields. In a non-relational database, this metadata is stored in a document representing the overall information of the exam paper, such as {"Exam Paper Name":"High School Physics Final Exam Paper","Exam Subject":"Physics","Exam Time":"June 2023","Exam Paper Version":"People's Education Press Edition"}.
[0132] In a relational database's "Question Table," additional fields are created for each question in the exam paper to store basic information. For example, a "Question Type" field stores "Calculation Question," a "Question Word Count" field stores "20," and a "Question Difficulty Estimation" field stores "Medium Difficulty." In a non-relational database, corresponding key-value pairs are added to the JSON document representing the questions, such as {"Question Type":"Calculation Question","Question Word Count":"20","Question Difficulty Estimation":"Medium Difficulty"}.
[0133] In relational databases, if there is a relationship, it can be stored in a "knowledge point association table" or other related tables using foreign keys. For example, for the relationship between the two questions "calculate the acceleration of an object" and "analyze the relationship between force and acceleration", two records can be created in the "knowledge point association table", representing the relationship between the two questions and their common knowledge point "application of Newton's second law", respectively. If it is a knowledge point coverage, it can be stored in a dedicated table. In non-relational databases, key-value pairs or sub-documents representing the relationship and knowledge point coverage are added to the document representing the questions, such as {"related questions":["analyze the relationship between force and acceleration"],"knowledge point coverage":["application of Newton's second law"]}.
[0134] Through the aforementioned stored procedures, whether it's a combination of multiple table structures in a relational database or a document structure in a non-relational database, structured data for each exam question is formed. This structured data completely includes the database entry hierarchy markers, metadata, basic information, and related information for each exam question.
[0135] The server uses this structured data as the segmentation results corresponding to the original exam paper image data. When it is necessary to query the segmentation of an exam paper, for example, if a teacher wants to view the hierarchical relationship of each question, the distribution of question types, etc., they can obtain the required information by querying this structured data. For teaching management departments, this segmentation result can be used to analyze the overall structure of the exam paper, the coverage of knowledge points, etc., in order to conduct teaching quality assessment, teaching resource planning, and other work.
[0136] In this embodiment of the invention, the following implementation methods are also provided.
[0137] Obtain an update instruction, the update instruction including update data for the test paper text data;
[0138] The structured data is updated based on the updated data ratio to obtain the updated structured data;
[0139] The updated structured data is used as the updated topic-relevance result.
[0140] In this embodiment of the invention, for example, the server is in a continuous listening state, waiting to receive update instructions. These update instructions can come from multiple sources. For instance, in a school's education management system, when teachers review the test paper's relevance, they may discover problems or have new requirements, and send update instructions through the teacher's interface. Alternatively, when the teaching management department reviews overall teaching resources, it may find that the relevance of certain test papers needs adjustment, and thus send update instructions from the management end to the server.
[0141] When the server receives an update instruction, it first parses it and extracts the update data for the test paper text data. Suppose that the teacher finds that there is an error in the previous description of a math problem, the update instruction sent includes the new text content of the problem, the adjustment of the hierarchical relationship, and the correction of related metadata. For example, the original problem is "1. Calculate the area of a triangle: (1) Given the base and height, find the area; (2) Given the three sides, find the area (Heron's formula)", the update data can indicate that the text of this problem should be corrected to "1. Calculation of the area of a triangle: (1) Calculate the area using the conventional method (given the base and height); (2) Calculate the area using the special method (given the three sides, Heron's formula)", at the same time the hierarchical relationship may be adjusted from two second-level sub-problems under the previous first-level problem to two parallel first-level problems, and the examination knowledge point association in the metadata may be corrected from "basic geometric calculation" to "comprehensive application of triangle area calculation methods".
[0142] Based on key information in the updated data, such as the question content, question number, or related metadata identifiers, the server locates the record corresponding to the question in the stored structured data. In the math question example above, the server uses the question number "1. Calculate the area of a triangle" or related features (such as the knowledge point of calculating the area of a triangle) to find the corresponding record in the relational database's "question table" and related "hierarchical relationship table" and "knowledge point association table." If a non-relational database is used, the server will search for a matching document in the collection storing the test paper question documents.
[0143] Based on the hierarchical relationship adjustments in the updated data, the server updates the entry hierarchy markers in the structured data. For the above math problem, if the original hierarchical relationship is to be adjusted to two parallel first-level problems, the server updates the value of the "Entry Hierarchy Marker" field for these two sub-problems in the "Problem Table" of the relational database from "Entry Second-Level Problem" to "Entry First-Level Problem". In the non-relational database, the value of the "Entry Hierarchy Marker" key-value pair in the document representing these two problems is modified to "Entry First-Level Problem".
[0144] For metadata updates, the server updates the relevant fields in the "Exam Paper Information Table" of a relational database (if the metadata is stored in this table) or in the table storing the questions (if the metadata is stored in association with the question records). In the example above, the knowledge point association is updated from "Basic Geometry Calculations" to "Comprehensive Application of Triangle Area Calculation Methods" according to the updated data. In a non-relational database, the value of the "Knowledge Point Coverage" key-value pair in the document representing the question is modified to "Comprehensive Application of Triangle Area Calculation Methods".
[0145] If the updated data involves basic question information (such as question type, word count, etc.) or related information (such as relationships with other questions), the server will also perform corresponding updates. For example, if a question's type changes from a simple calculation type to a comprehensive application type after modification, the value of the "Question Type" field in the "Question Table" of a relational database will be updated. If the relationships with other questions change, this change will be reflected by updating records in the "Knowledge Point Association Table" in a relational database; in a non-relational database, relevant information such as the "Associated Questions" key-value pairs in the document representing the question will be modified.
[0146] After updating each part, the server ensures that the updated structured data remains intact. Whether it's a multi-table join structure in a relational database or a document structure in a non-relational database, all related data matches each other and completely represents the various information of the updated exam questions. For example, in a relational database, after the update, the question records in the "Question Table" are consistent and complete with the hierarchical relationships in the "Hierarchical Relationship Table" and the knowledge point associations in the "Knowledge Point Association Table".
[0147] The server uses this updated structured data as the updated topic segmentation result. This updated topic segmentation result will replace the previous one and become the latest topic segmentation result for the current exam paper image data. Subsequent queries, analyses, and uses—such as teachers reviewing the exam paper's topic segmentation and teaching management departments analyzing teaching resources—will all be based on this updated topic segmentation result. For example, teachers can use the updated topic segmentation result to more accurately understand the exam paper's structure and question relationships, enabling them to conduct teaching evaluations and adjust teaching plans; teaching management departments can also use this result for more precise teaching resource management and teaching quality monitoring.
[0148] To more clearly describe the solutions provided in the embodiments of the present invention, a more detailed implementation method is provided below.
[0149] This invention discloses an intelligent question-segmentation method for exam papers. This method can intelligently segment exam papers, thereby significantly improving the efficiency and accuracy of exam paper production. The core of this method lies in utilizing advanced natural language processing technology and machine learning algorithms to deeply analyze the exam paper content and automatically identify and segment each independent question unit. The first step is a preprocessing stage, converting the original exam paper's electronic document (such as PDF or image) into a computer-processable format. The second step is the question first-line extraction stage, using large-scale model technology to analyze the text and extract the first line of each question. The third step is a text matching stage, matching the extracted question first lines with the original exam paper text, thereby segmenting each set of questions based on the first line of each question. The fourth step is a top-down hierarchical judgment stage, performing a top-down hierarchical judgment on each set of questions in the exam paper based on the hierarchical output of the large-scale model and each segmented set of questions, and then marking them accordingly. The fifth step is the database entry level determination stage. Based on the top-down hierarchy, large-scale modeling technology is used to determine whether each level is a database entry level and to mark it accordingly. The sixth step is database storage. This involves connecting to the question database and, according to the database entry level markings, storing the segmented questions into the database to facilitate subsequent question searching and assembly. The framework for the intelligent question segmentation process is as follows: Figure 2 As shown, this method not only reduces the tediousness and errors of manual operation but also ensures the standardization and consistency of test paper structure, providing a more scientific and objective basis for educational assessment. Furthermore, this method possesses high flexibility and scalability, adapting to the needs of test papers of different types and difficulties, providing strong technical support for the intelligent development of the education field.
[0150] 1. Preprocessing stage
[0151] In the preprocessing stage, the original exam paper's electronic document (such as a PDF or image) is first converted into a computer-readable format. This step is crucial because subsequent intelligent processing can only proceed when the exam content is presented in a computer-readable form. The preprocessing stage typically includes the following sub-steps:
[0152] (1) Document format conversion: Converting the paper or electronic document (such as PDF or image) of the exam paper into text format can be achieved through optical character recognition (OCR) technology. OCR technology can recognize the text on the exam paper and convert it into editable and processable text.
[0153] (2) Text cleaning: During the conversion process, some noise or errors may be introduced, such as extra spaces, line breaks, garbled characters, typos, and font and formatting issues. Therefore, it is necessary to clean the text to remove these unnecessary elements and ensure the purity and readability of the text.
[0154] (3) Structured processing: Test papers usually have a certain structure, such as questions, options, and answers. In the preprocessing stage, it is necessary to initially identify and mark these structures so that subsequent steps can more accurately segment and classify the questions.
[0155] (4) Metadata extraction: In addition to the test paper content itself, some metadata also needs to be extracted, such as the test paper title, author, time, subject, etc. This metadata is of great significance for subsequent test paper management and analysis.
[0156] Through the preprocessing stage, the test paper content is effectively transformed and cleaned, laying a solid foundation for subsequent intelligent question-splitting. Although this stage may seem simple, it is an indispensable part of the entire intelligent question-splitting method, directly affecting the accuracy and efficiency of subsequent steps.
[0157] 2. Extraction of the first line of the question
[0158] After preprocessing, the text content of the exam paper is obtained. This text is then input into a large-scale question-relevance model to obtain the question hierarchy and the first line of each question. The base model for training this large-scale question-relevance model uses large language models such as GLM4 and GPT4. In the question first line extraction stage, the core task is to accurately identify and extract the first line of each question from the preprocessed exam paper text using advanced natural language processing techniques and machine learning algorithms. The key to this step is utilizing large-scale model techniques, such as the large-scale question-relevance model based on a large language model, to perform in-depth analysis of the text. Large language models, as advanced language models, possess powerful text understanding and generation capabilities, effectively capturing semantic information and structural features in the exam paper text.
[0159] The large-scale model performs comprehensive semantic analysis on the input test text, identifying individual semantic units within the text, particularly those likely to be the first line of a question. This process involves multi-dimensional analysis of the text at the lexical, syntactic, and semantic levels to ensure accurate location of the question's starting position. For example, the first line of a question often has specific formatting features, such as beginning with a number, letter, or special symbol, and is usually located at the beginning of a paragraph. The large-scale model technology can capture these subtle formatting and semantic features, thereby accurately locating the first line of the question.
[0160] In the initial question extraction stage, fine-tuning the overall question-relevance model is crucial for ensuring extraction accuracy. The fine-tuning process typically includes the following steps:
[0161] (1) Data Labeling and Preparation: First, a large amount of labeled data needs to be prepared, which includes the first line of the test paper text of known questions. The quality of the labeled data directly affects the training effect of the model, so the accuracy and consistency of the labeling must be ensured. The labeled data should cover different types of test papers, including multiple-choice questions, fill-in-the-blank questions, short-answer questions, etc., to ensure that the model can adapt to diverse question formats. For example:
[0162] #enter
[0163] The first line of text on the exam paper
[0164] The second line of text on the exam paper ...
[0166] The text on line n-1 of the exam paper
[0167] The nth line of the exam paper
[0168] #Output
[0169] First level:
[0170] I. xxxxxxxxxxxxxxxxxx
[0171] II. xxxxxxxxxxxxxxxxx ...
[0173] Second level:
[0174] xxxxxxxxxxxxxxxxxxxx
[0175] xxxxxxxxxxxxxxxxxxxx ...
[0177] Level M:
[0178] (1)xxxxxxxxxxxxxxxxxxxx
[0179] (2)xxxxxxxxxxxxxxxxxxxx
[0180] (2) Model Training: After the data preparation is complete, the labeled data is input into the topic-specific large model for training. During the training process, the model learns how to identify the features of the first line of the question from the text. The goal of the training is to enable the model to accurately predict the position of the first line of each question and to minimize misjudgments and omissions.
[0181] (3) Model Evaluation and Optimization: After training, the model needs to be evaluated to determine its performance on unseen data. Evaluation metrics typically include accuracy, recall, and F1 score. If the model's performance is unsatisfactory, further optimization is required, such as adjusting the model's hyperparameters, increasing the diversity of training data, or improving the accuracy of labeled data.
[0182] 3. Text matching stage
[0183] In the text matching stage, the core task is to accurately match the extracted first line of each question with the text of the original exam paper, thereby achieving intelligent segmentation of the exam content. The key to this step lies in multiple matching strategies to ensure that the first line of each question accurately corresponds to the relevant position in the original exam paper.
[0184] First, the system performs an initial match between the test paper text obtained in the preprocessing stage and the first line of questions extracted in the question extraction stage. This process typically involves multi-dimensional analysis of the text at the lexical, syntactic, and semantic levels to ensure accurate location of the question's starting position. For example, the first line of a question usually has specific formatting characteristics, such as starting with a number, letter, or special symbol, and is usually located at the beginning of a paragraph. The system utilizes these subtle formatting and semantic features to accurately locate the first line of the question.
[0185] During the text matching phase, the system employs various matching strategies to ensure accuracy and robustness. These strategies include, but are not limited to:
[0186] (1) Exact Match: The system will first attempt to perform an exact match, that is, directly search for a text segment in the original test paper text that is exactly the same as the first line of the question. This matching method is suitable for test papers with a standard format and clear content in the first line of the question.
[0187] (2) Fuzzy Matching: When exact matching cannot meet the requirements, the system will use a fuzzy matching strategy. Fuzzy matching allows for certain text differences and determines the matching result by calculating the similarity between texts. This matching method is suitable for test papers with irregular formatting in the first line of the questions or with some changes in content.
[0188] 4. Top-down hierarchical judgment stage
[0189] In the top-down hierarchical judgment stage, the system will perform a top-down hierarchical judgment on each set of questions in the test paper based on the hierarchical output of the large model and each set of questions that is segmented, and mark the top-down hierarchical level. The key to this step is to ensure that the structure of the test paper is clear and the logic is rigorous, so as to provide a reliable foundation for subsequent hierarchical judgment and database storage.
[0190] Represent all problems in a tree structure, for example:
[0191] First, the system will label the questions under the level according to the hierarchical information output by the large model, in the form of Lx_y, where x represents the xth level and y represents the yth sub-question under the xth level. If there are sub-questions under y, they will be represented as Lx_y#Lz_w, where z represents the zth level and w represents the wth sub-question under the zth level. For example, assuming the test paper has two levels, the first level is represented as "L1_1". The first level has two sub-questions, so the first question of the first level is represented as L1_1#L2_1. If there is a sub-question under L1_1#L2_1, it is represented as L1_1#L2_1#L3#1, and so on. The questions of each level can be represented.
[0192] Therefore, all problems can be represented and processed in a top-down hierarchy, for example:
[0193] Since the above only marks the first line of the question, based on the marked top-down questions, the content below the question is filled in using the marked top-down format. In addition, the content above L1_1 is indicated by "other", which generally includes some introductions, precautions, etc. of the test paper.
[0194] 5. Warehouse entry level determination stage
[0195] Based on the top-down hierarchical labeling described above, each question can be segmented. However, each major question contains sub-questions, and each sub-question contains even smaller sub-questions. It's difficult to determine which level of questions is independent of each other. Independence means that a single question, when taken out alone, does not depend on information from other questions. Therefore, such independent questions are defined as Level 2 questions for inclusion in the database. Their top-down sub-questions are defined as Level 3 questions, and their top-down parent question is defined as Level 1 questions. To extract Level 2 questions, large-scale modeling techniques are needed to perform semantic analysis on each question to determine if it is a Level 2 question and to assign the appropriate hierarchical labeling for inclusion.
[0196] In the warehousing hierarchy determination phase, fine-tuning the warehousing hierarchy prediction model is a crucial task. The fine-tuning process typically includes the following steps:
[0197] (1) Data Labeling and Preparation: First, a large amount of labeled data needs to be prepared, which includes test questions from known database levels. The quality of the labeled data directly affects the training effect of the model, so the accuracy and consistency of the labeling must be ensured. The labeled data should cover different types of test papers, including multiple-choice questions, fill-in-the-blank questions, short-answer questions, etc., to ensure that the model can adapt to diverse question formats. The input is a top-down first-level question, and the output is whether it is an independent sub-question, i.e., whether it is a second-level question in the database.
[0198] (2) Model Training: After the data preparation is complete, the labeled data is input into the entry level prediction model for training. During the training process, the model learns how to identify the features of the entry level from the question text. The goal of the training is to enable the model to accurately predict the entry level of each question and minimize misjudgments and omissions.
[0199] (3) Model Evaluation and Optimization: After training, the model needs to be evaluated to determine its performance on unseen data. Evaluation metrics typically include accuracy, recall, and F1 score. If the model's performance is unsatisfactory, further optimization is required, such as adjusting the model's hyperparameters, increasing the diversity of training data, or improving the accuracy of labeled data.
[0200] After model training and optimization, the system will label each question in the exam paper with its storage level. First, the system inputs a tree structure of the exam paper's top-down hierarchical results. Each node contains n child nodes in sequence. Each node's attributes include line number, text, top-down hierarchical label, and child nodes. Next, the system performs a depth-first traversal of each node, sequentially concatenating the text content of all its descendant nodes. This data is then input into the large model to determine if it contains independent sub-questions. If it does not contain independent sub-questions, the node is classified as a Level 2 storage node. If it does contain independent sub-questions, the system continues traversing its child nodes. Finally, based on the model's prediction results, the system categorizes the questions into Level 1, Level 2, and Level 3 storage questions.
[0201] 6. Database storage stage
[0202] During the database storage phase, the system stores the hierarchically tagged and verified question data into the question database for subsequent question searching and assembly. The key to this step is ensuring data integrity, consistency, and accessibility.
[0203] First, the system will structure each question and its corresponding hierarchical tags, metadata, and other information, and store them according to a predetermined data model. The data model typically includes basic information about the question (such as question content, type, difficulty, etc.), hierarchical information (such as the entry level, top-down hierarchy, etc.), metadata information (such as the exam title, author, time, subject, etc.), and other relevant information (such as answers, explanations, etc.).
[0204] During the database storage phase, the system employs various technical means to ensure data security and reliability. For example, it uses data backup and recovery mechanisms to prevent data loss or corruption; data encryption technology to protect data privacy and security; and data indexing and query optimization techniques to improve data retrieval efficiency and response speed.
[0205] In addition, the system will establish a comprehensive data management mechanism, including data updates, data maintenance, and data auditing, to ensure the timeliness and accuracy of the data. The data management mechanism typically includes the following aspects:
[0206] (1) Data Updates: The system will periodically update the data in the database to ensure the timeliness and accuracy of the data. Data updates typically include operations such as adding, modifying, and deleting test questions.
[0207] (2) Data Maintenance: The system will perform regular database maintenance to ensure its stability and reliability. Data maintenance typically includes database optimization, database repair, and database backup.
[0208] (3) Data Auditing: The system will periodically audit the data in the database to ensure data compliance and consistency. Data auditing typically includes operations such as data integrity checks, data consistency checks, and data security checks.
[0209] Through the database storage phase, the system can not only effectively manage and store test question data, but also provide strong support for subsequent test question searching and assembly. This not only helps improve the efficiency and accuracy of test paper production, but also provides a more scientific and objective basis for educational assessment.
[0210] In summary, the intelligent question-splitting method for exam papers disclosed in this invention achieves intelligent question-splitting processing of exam paper content through the collaborative work of multiple stages, including preprocessing, extraction of the first line of questions, text matching, top-down hierarchical judgment, database entry hierarchical judgment, and database storage. This method not only significantly improves the efficiency and accuracy of exam paper production but also ensures the standardization and consistency of exam paper structure, providing a more scientific and objective basis for educational assessment. Furthermore, this method possesses high flexibility and scalability, adapting to the needs of exam papers of different types and difficulties, providing strong technical support for the intelligent development of the education field.
[0211] Please refer to the following: Figure 3 , Figure 3 An intelligent test paper cutting device 110 provided in an embodiment of the present invention includes:
[0212] The acquisition module 1101 is used to acquire original test paper image data and preprocess the original test paper image data to obtain test paper text data; extract the first line of questions from the test paper text data to obtain multiple first lines of questions included in the test paper text data, and each first line of questions corresponds to at least one test paper sub-question; perform top-down hierarchical judgment on multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question; segment the multiple first line of test paper questions according to the hierarchical identifier to obtain multiple questions to be entered into the database, and process each question to be entered into the database using a pre-trained database entry hierarchical labeling model to obtain target questions as independent questions;
[0213] The topic segmentation module 1102 is used to mark the entry level of the target topic as a second-level entry topic, mark the next level of the second-level entry topic as a third-level entry topic, and mark the previous level of the second-level entry topic as a first-level entry topic; and to store the entry level mark and metadata of each test paper sub-topic in a structured manner to obtain the topic segmentation result corresponding to the original test paper image data.
[0214] It should be noted that the implementation principle of the aforementioned intelligent test paper cutting device 110 can refer to the implementation principle of the aforementioned intelligent test paper cutting method, and will not be repeated here. It should be understood that the division of the various modules in the above device is merely a logical functional division; in actual implementation, they can be fully or partially integrated into a single physical entity, or physically separated. Furthermore, these modules can all be implemented in software through processing element calls; they can all be implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the intelligent test paper cutting device 110 can be a separately established processing element, or it can be integrated into a chip within the aforementioned device. Alternatively, it can be stored as program code in the memory of the aforementioned device, and its functions can be called and executed by a processing element within the aforementioned device. The implementation of other modules is similar. Furthermore, these modules can be fully or partially integrated together, or 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 of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0215] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together to implement a system-on-a-chip (SOC).
[0216] This 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 intelligent test paper cutting device 110. For example... Figure 4 As shown, Figure 4 This is a structural block diagram of a computer device 100 provided in an embodiment of the present invention. The computer device 100 includes an intelligent test paper cutting device 110, a memory 111, a processor 112, and a communication unit 113.
[0217] To enable data transmission or interaction, the memory 111, processor 112, and communication unit 113 are electrically connected to each other directly or indirectly. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The intelligent test paper cutting device 110 includes at least one software function module that can be stored in the memory 111 or embedded in the operating system (OS) of the computer device 100 in the form of software or firmware. The processor 112 is used to execute the intelligent test paper cutting device 110 stored in the memory 111, such as the software function modules and computer programs included in the intelligent test paper cutting device 110.
[0218] This invention provides a readable storage medium, which includes a computer program. When the computer program runs, it controls the computer device where the readable storage medium is located to execute the aforementioned intelligent test paper cutting device 110.
[0219] For illustrative purposes, the foregoing description has been made with reference to specific embodiments. However, the foregoing illustrative discussions are not intended to be exhaustive or to limit the present disclosure to the precise forms disclosed. Numerous modifications and variations are possible in accordance with the foregoing teachings. These embodiments were chosen and described in order to best illustrate the principles of the present disclosure and its practical application, thereby enabling those skilled in the art to best utilize the disclosure and to employ various embodiments with different modifications to suit a particular intended application.
Claims
1. A method for intelligently identifying test questions, characterized in that, include: The original test paper image data is acquired, and the original test paper image data is preprocessed to obtain the test paper text data; The first line of questions is extracted from the test paper text data to obtain multiple first lines of questions included in the test paper text data. Each first line of questions corresponds to at least one test paper sub-question. Perform a top-down hierarchical judgment on multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question; The multiple first-row test questions are segmented according to the hierarchical identifier to obtain multiple questions to be added to the database. Each question to be added to the database is then processed using a pre-trained database entry hierarchical labeling model to obtain a target question as an independent question. The target question is marked as a Level 2 question in the database, and the next level question in the Level 2 question is marked as a Level 3 question in the database. The previous level question in the Level 2 question is marked as a Level 1 question in the database. The entry level tag and metadata of each test paper sub-question are stored in a structured manner to obtain the question segmentation result corresponding to the original test paper image data; The process involves segmenting multiple first-row test questions based on the hierarchical identifier to obtain multiple questions to be added to the database, and then processing each question to be added to the database using a pre-trained hierarchical labeling model to obtain target questions as independent questions, including: Based on the hierarchical identifier, the multiple first-row test questions are segmented to obtain multiple questions to be added to the database; The test paper node corresponding to each question to be added to the database is determined according to the hierarchical tree structure relationship, and the test paper node includes the text content of the corresponding question to be added to the database; Traverse the test paper nodes and input the corresponding text content according to the order of the test paper nodes to the question independence judgment using the pre-trained database hierarchical labeling model to obtain the target question as an independent question.
2. The method according to claim 1, characterized in that, The preprocessing of the original test paper image data to obtain test paper text data includes: The original test paper image data is sequentially processed through format conversion, text clearing, structuring, and metadata extraction to obtain the test paper text data.
3. The method according to claim 1, characterized in that, The step of extracting the first line of questions from the test paper text data yields multiple first lines of questions included in the test paper text data, including: The question-relevance model trained based on multiple sample questions is invoked, and the test paper text data is input into the question-relevance model to obtain the first line of the multiple questions.
4. The method according to claim 3, characterized in that, The step of performing a top-down hierarchical judgment on multiple test paper sub-questions to obtain the hierarchical identifier corresponding to each test paper sub-question includes: The topic-specific model is invoked to perform top-down hierarchical judgment on the multiple test paper sub-questions, obtaining the hierarchical identifier corresponding to each test paper question. The multiple hierarchical identifiers constitute the hierarchical tree structure relationship of the test paper text data.
5. The method according to claim 1, characterized in that, The step of structuring and storing the hierarchical tags and metadata of each sub-question of the test paper to obtain the question segmentation results corresponding to the original test paper image data includes: The entry level tag, metadata, basic information, and related information of each sub-question of the test paper are stored in a structured manner to obtain the corresponding structured data; The structured data is used as the topic matching result corresponding to the original test paper image data.
6. The method according to claim 5, characterized in that, The method further includes: Obtain an update instruction, the update instruction including update data for the test paper text data; The structured data is updated based on the updated data ratio to obtain the updated structured data; The updated structured data is used as the updated topic-relevance result.
7. An intelligent test paper answering device, characterized in that, include: The acquisition module is used to acquire the original test paper image data and preprocess the original test paper image data to obtain the test paper text data; The first line of questions is extracted from the test paper text data to obtain multiple first lines of questions included in the test paper text data. Each first line of questions corresponds to at least one test paper sub-question. The multiple test paper sub-questions are judged from top to bottom to obtain the level identifier corresponding to each test paper sub-question. The multiple first-row test questions are segmented according to the hierarchical identifier to obtain multiple questions to be added to the database. Each question to be added to the database is then processed using a pre-trained database entry hierarchical labeling model to obtain a target question as an independent question. The topic segmentation module is used to mark the target topic's entry level as a second-level entry topic, mark the next level of the second-level entry topic as a third-level entry topic, and mark the previous level of the second-level entry topic as a first-level entry topic. The module also stores the entry level markings and metadata of each test paper sub-topic in a structured manner to obtain the topic segmentation results corresponding to the original test paper image data. The process involves segmenting multiple first-row test questions based on the hierarchical identifier to obtain multiple questions to be added to the database, and then processing each question to be added to the database using a pre-trained hierarchical labeling model to obtain target questions as independent questions, including: Based on the hierarchical identifier, the multiple first-row test questions are segmented to obtain multiple questions to be added to the database; The test paper node corresponding to each question to be added to the database is determined according to the hierarchical tree structure relationship, and the test paper node includes the text content of the corresponding question to be added to the database; Traverse the test paper nodes and input the corresponding text content according to the order of the test paper nodes to the question independence judgment using the pre-trained database hierarchical labeling model to obtain the target question as an independent question.
8. 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 performs the method according to any one of claims 1-6.
9. A readable storage medium, characterized in that, The readable storage medium includes a computer program, which, when executed, controls the computer device on which the readable storage medium is located to perform the method described in any one of claims 1-6.