Intelligent test paper question cutting method and device, computer equipment and readable storage medium
Through intelligent test paper processing methods, including preprocessing, first-line extraction of questions, hierarchical judgment and hierarchical marking, the problems of inefficient and poor accuracy of traditional test paper processing are solved, and efficient and accurate test paper-to-question and storage are achieved.
Patent Information
- Application Number
- CN202411501240.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Traditional test paper processing methods rely on manual operations, are inefficient and prone to errors, especially when dealing with questions containing complex hierarchical relationships, which are difficult to handle accurately.
By obtaining the original test paper image data, preprocessing is performed to obtain text data, extract the first line of the question and its sub-questions, conduct top-to-down hierarchical judgment, divide the first line of the question, and use the pre-trained in-store hierarchical marking model to structure the hierarchical marking and metadata of each test paper sub-questions.
It realizes intelligent operation of test papers, improves the efficiency and accuracy of test paper processing, and ensures the standardization and consistency of test paper structure.
Smart Images

Figure CN119600632A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart education, and in particular to an intelligent test paper cutting method, device, computer equipment and readable storage medium. Background Art
[0002] In the field of education, as the demand for digital teaching resource management continues to increase, the digital processing of test papers has become crucial. Traditional test paper processing methods often rely on manual operations, which are inefficient and prone to errors. For example, when building a test question bank, it is necessary to extract questions from a large number of paper test papers. Manual segmentation of questions is not only time-consuming, but also difficult to accurately process questions with complex hierarchical relationships (such as a large question containing multiple sub-questions and sub-questions with more detailed questions). Summary of the invention
[0003] The purpose of the present invention is to provide a method, device, computer equipment and readable storage medium for intelligently cutting questions in test papers.
[0004] In a first aspect, an embodiment of the present invention provides an intelligent test paper cutting method, comprising:
[0005] Acquire original test paper image data, and pre-process the original test paper image data to obtain test paper text data;
[0006] Extracting the first line of questions from the test paper text data to obtain a plurality of first lines of questions included in the test paper text data, wherein the first line of test paper questions corresponding to each first line of questions includes at least one test paper sub-question;
[0007] Performing a top-down hierarchical judgment on a plurality of test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics;
[0008] The plurality of first-row test paper questions are segmented according to the hierarchical identifiers to obtain a plurality of questions to be stored, and each of the questions to be stored is processed using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question;
[0009] Mark the target topic's storage level as a storage level 2 topic, mark the next level topic of the storage level 2 topic from top to bottom as a storage level 3 topic, and mark the previous level topic of the storage level 2 topic from top to bottom as a storage level 1 topic;
[0010] The storage level mark and metadata of each test paper sub-question are structured and stored to obtain the relevant result corresponding to the original test paper image data.
[0011] In a possible implementation manner, preprocessing the original test paper image data to obtain the test paper text data includes:
[0012] The original test paper image data is sequentially subjected to format conversion, text clarification, structure processing and metadata extraction to obtain the test paper text data.
[0013] In a possible implementation manner, the 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] A large topic-related model obtained through training based on a variety of sample topics is called, and the test paper text data is input into the large topic-related model to obtain the first rows of the plurality of topics.
[0015] In a possible implementation manner, performing top-down hierarchical judgment on a plurality of test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics includes:
[0016] The topic-related model is called to perform top-down hierarchical judgment on the multiple test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics, and the multiple hierarchical identifiers constitute a hierarchical tree structure relationship of the test paper text data.
[0017] In a possible implementation, the first row of test questions are segmented according to the hierarchical identifier to obtain a plurality of questions to be stored, and each of the questions to be stored is processed using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question, including:
[0018] Divide the plurality of first-row test paper questions according to the hierarchical identifier to obtain a plurality of questions to be stored;
[0019] Determine the test paper node corresponding to each of the to-be-stored questions according to the hierarchical tree structure relationship, wherein the test paper node includes the text content of the corresponding to-be-stored question;
[0020] The test paper nodes are traversed, and corresponding text contents are input into the pre-trained storage level labeling model according to the order relationship of the test paper nodes to perform question independence judgment, so as to obtain the target question as an independent question.
[0021] In a possible implementation, the step of structurally storing the storage level mark and metadata of each test paper sub-question to obtain the relevant result corresponding to the original test paper image data includes:
[0022] The storage level mark, metadata, basic information and related information of each test paper sub-question are structured and stored to obtain corresponding structured data;
[0023] The structured data is used as the relevant result corresponding to the original test paper image data.
[0024] In a possible implementation, the method further includes:
[0025] Obtaining an update instruction, wherein the update instruction includes update data for the test paper text data;
[0026] updating the structured data according to the update data comparison to obtain updated structured data;
[0027] The updated structured data is used as an updated topic result.
[0028] In a second aspect, an embodiment of the present invention provides an intelligent test paper cutting device, comprising:
[0029] The acquisition module is used to acquire original test paper image data, and pre-process 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 the first line of test paper questions corresponding to each of the first lines of questions includes at least one test paper sub-topic; perform top-down hierarchical judgment on multiple test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics; segment the multiple first lines of test paper questions according to the hierarchical identifier to obtain multiple questions to be stored, and use a pre-trained storage hierarchical labeling model to process each of the questions to be stored to obtain a target question as an independent question;
[0030] The topic-cutting module is used to mark the storage level of the target topic as a second-level topic, and mark the next-level topic of the second-level topic from top to bottom as a third-level topic, and mark the previous-level topic of the second-level topic from top to bottom as a first-level topic; the storage level mark and metadata of each test paper sub-topic are structured for storage to obtain the topic-cutting result corresponding to the original test paper image data.
[0031] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device executes the method described in the first aspect.
[0032] In the fourth aspect, an embodiment of the present invention provides a readable storage medium, the readable storage medium includes a computer program, and when the computer program is running, the computer device where the readable storage medium is located is controlled to execute the method described in the first aspect. Compared with the prior art, the beneficial effects provided by the present invention include: using an intelligent test paper cutting method, device, computer device and readable storage medium disclosed in the present invention, including: first obtaining the original test paper image data and preprocessing to obtain text data, then extracting the first line of questions and the sub-topics contained therein, and performing hierarchical judgment on the sub-topics to obtain hierarchical identification. According to the hierarchical identification, the first line of questions is cut to obtain the questions to be stored, and the target questions are obtained by processing the storage hierarchical marking model, and the target questions and the upper and lower hierarchical questions are marked. Finally, the hierarchical markings and metadata of each sub-topic are structured and stored to obtain the cutting result. With such a design, the intelligent operation of test paper cutting is realized, and the efficiency and accuracy of test paper processing are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0034] Figure 1 A schematic diagram of the steps of the intelligent test paper cutting method provided by an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the process framework of the intelligent test paper cutting method provided by an embodiment of the present invention;
[0036] Figure 3 A schematic block diagram of the structure of an intelligent test paper cutting device provided by an embodiment 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 DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0039] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0040] In order to solve the technical problems in the aforementioned background technology, Figure 1 This is a flow chart of the intelligent test paper cutting method provided in the embodiment of the present disclosure. The intelligent test paper cutting method is introduced in detail below.
[0041] Step S201, obtaining original test paper image data, and preprocessing the original test paper image data to obtain test paper text data;
[0042] Step S202, 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, wherein the first line of test paper questions corresponding to each first line of questions includes at least one test paper sub-question;
[0043] Step S203, performing a top-down hierarchy judgment on the multiple test paper sub-topics to obtain a hierarchy identifier corresponding to each of the test paper sub-topics;
[0044] Step S204, dividing the plurality of first-row test questions according to the hierarchical identifier to obtain a plurality of questions to be stored, and processing each of the questions to be stored using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question;
[0045] Step S205, marking the target topic's storage level as a storage level 2 topic, marking the next level topic of the storage level 2 topic from top to bottom as a storage level 3 topic, and marking the previous level topic of the storage level 2 topic from top to bottom as a storage level 1 topic;
[0046] Step S206, storing the storage level mark and metadata of each of the test paper sub-questions in a structured manner, and obtaining the question-related result corresponding to the original test paper image data.
[0047] In an embodiment of the present invention, illustratively, in a school's examination management system, after a large-scale examination is completed, the invigilator uses a scanner to scan the paper test paper into image files, and these image files are uploaded to the server. For example, in a final exam with 500 students, each student's test paper is 5 pages, and there are a total of 2,500 pages of test paper image data. The server receives these original test paper image data from a specific folder storing these image data or through a network receiving module. These image data may be in JPEG or PNG format, and the image contains various contents of the test paper, such as questions, answer areas, candidate information, etc.
[0048] The original test paper image data received by the server may be in multiple formats, such as JPEG format images. The server first converts these image data into a unified format that is convenient for subsequent processing, such as converting them into TIFF format. This is because the TIFF format may have better compatibility when processing operations such as text extraction from images. For example, the server uses an image format conversion library, such as the ImageMagick library, to perform format conversion operations on each test paper image.
[0049] Due to problems such as paper wrinkles, stains, or scanning device resolution during the scanning process, the text in the test paper image is not clear enough. The server will use image enhancement technology to improve the clarity of the text. For example, for a test paper image with blurred text after scanning, the server will apply a grayscale adjustment algorithm to adjust the grayscale value of the image to enhance the contrast between the text and the background. Filtering algorithms, such as median filtering, can also be used to remove noise in the image and make the text edges clearer. This is like repairing an old test paper with stains and blurred handwriting to make the text clear and legible.
[0050] The test paper image has a certain structure. For example, the questions are usually arranged according to certain layout rules. The server will perform structural processing on the image and identify different areas in the test paper, such as the title area, question area, answer area, etc. For example, the server determines the boundaries of different areas by analyzing features such as blank lines and separators in the image. For a math test paper, the server can identify the multiple-choice question area, fill-in-the-blank question area, answer question area, etc., and mark these areas to prepare for subsequent question extraction.
[0051] The test paper image also contains some metadata, such as the name of the test paper, the test subject, the test time and other information. The server extracts these metadata by identifying and analyzing specific areas in the image (such as the header or footer of the test paper). For example, the header of an English test paper will indicate "Senior Three English Final Exam" and the test time "June 2023". The server uses optical character recognition (OCR) technology to locate these areas and extract the text information in them, and then associates these metadata with the previously processed test paper image to finally obtain the test paper text data.
[0052] The server has already trained a topic-related model using a large number of sample questions (e.g., questions collected from various examination papers in previous years). This topic-related model can be a neural network model based on deep learning, such as a model with a Transformer architecture. After the server obtains the test paper text data, it inputs the text data into the topic-related model. For example, for a comprehensive test paper text data containing multiple question types (multiple-choice questions, short-answer questions, essay questions, etc.), the topic-related model identifies the first line of each question by analyzing the semantic information and format features (such as question sequence numbers, specific punctuation marks, etc.) in the text. For example, in a physics test paper, the first line of the topic in the multiple-choice part may start with "1. Which of the following statements about Newton's second law is correct?" The topic-related model can accurately locate such a sentence as the first line of the topic. The first line of the test paper title corresponding to each topic may contain multiple sub-topics. For example, in an essay question, the first line of the topic is "Discuss the application of physics in modern science and technology", and there may be several sub-questions below, such as "(1) Application in electronic communications; (2) Application in new energy development", etc.
[0053] The server calls the topic-related model again to make hierarchical judgments on the previously identified test subtopics. Take a computer science test paper as an example. There is a large programming project title "Write a Web-based online shopping system". There are several subtopics under this title, such as "(1) Database design; (2) User interface design; (3) Server-side logic implementation". The topic-related model will analyze the relationship between these subtopics and the parent topic (large programming project title), and mark "Write a Web-based online shopping system" as level 1 (root level), and "Database design", "User interface design", "Server-side logic implementation" and other subtopics as level 2. If there are more detailed subtopics under the "Database design" subtopic, such as "(a) Data table structure design; (b) Data storage process design", then these more detailed subtopics will be marked as level 3. In this way, all these hierarchical identifiers constitute the hierarchical tree structure relationship of the test paper text data, just like a family tree, clearly showing the position relationship of each question in the entire test paper structure.
[0054] The server divides the first row of test questions according to the previously obtained hierarchical identification. For example, in a chemistry test paper, there is a comprehensive experiment question, the first row of which is "Explore the reaction between copper and nitric acid", and there are several levels of sub-topics below. According to the hierarchical identification, the server divides this large comprehensive experiment question into multiple questions to be stored at different levels. For example, the part about the reaction principle is divided into one question to be stored, and the part about the construction of the experimental device is divided into another question to be stored, etc.
[0055] For each of the questions to be stored, the server determines the corresponding test paper node according to the hierarchical tree structure relationship. Take a history test paper as an example. There is a big question about "Ancient Civilizations of the World", and below it are questions to be stored after being divided into sub-topics such as "Ancient Egyptian Civilization", "Ancient Babylonian Civilization", and "Ancient Indian Civilization". Each question to be stored corresponds to a test paper node, and these nodes contain the text content of the corresponding question to be stored. For example, the test paper node of the question to be stored "Ancient Egyptian Civilization" contains all the descriptions of ancient Egyptian civilization, such as "the origin, political system, religious beliefs, etc. of ancient Egyptian civilization".
[0056] The server traverses these test paper nodes and inputs the text content of each node into the pre-trained storage hierarchical labeling model in order. This storage hierarchical labeling model is also trained with a large amount of question data, and it can determine whether a question is an independent question. For example, in a geography test paper, there is a big question about "distribution of climate types" and some sub-topics below. The server inputs the test paper node content corresponding to these sub-topics into the storage hierarchical labeling model in sequence. For some sub-topics that can exist independently and have complete question requirements and answer requirements, such as "distribution characteristics of tropical monsoon climate", the model will judge them as independent questions and use them as target questions. For some sub-topics that are just supplementary explanations or incomplete parts under the big questions, the model will not judge them as independent questions.
[0057] The server will mark the target topics obtained previously. For example, in a biology test paper, there is a big topic "Structure and function of cells", and the subtopic "Structure and function of organelles" is judged as the target topic. The server marks "Structure and function of organelles" as a second-level topic for storage. If there is a more detailed topic about "Structure and function of mitochondria" under the topic "Structure and function of organelles", then "Structure and function of mitochondria" will be marked as a third-level topic for storage, and "Structure and function of cells" is a first-level topic for the second-level topic "Structure and function of organelles". In this way, a clear hierarchical relationship of topics is established, which is convenient for subsequent test paper management, analysis and retrieval.
[0058] The server stores the storage level mark of each test paper sub-topic, previously extracted metadata (such as test subject, test paper name, etc.), basic information (such as question type, question word count, etc.), and related information (such as association with other questions, etc.) in a structured manner. For example, for a target question in a math test paper, "Solve the quadratic equation x2-5x+6=0", the server will store its storage level mark (assuming it is a second-level storage question), metadata (such as this is a junior high school math final exam paper), basic information (the question type is solving equations, the question word count is relatively small), related information (there may be knowledge point associations with other algebra questions), etc. according to a certain database structure (such as the table structure in a relational database, which may have a question table, a hierarchical relationship table, a metadata table, etc.).
[0059] After the above structured storage, the structured data stored in the database constitutes the relevant results corresponding to the original test paper image data. For example, when teachers or teaching administrators want to check the relevant situation of the test paper, they can query the database to obtain detailed information of each question, including hierarchical relationship, question content, related metadata, etc. This is of great significance for the analysis and statistics of the test paper (such as difficulty analysis of questions at different levels, question type distribution statistics, etc.) and the management of teaching resources (such as generating a test question bank based on the relevant results, etc.).
[0060] In the embodiment of the present invention, the preprocessing of the original test paper image data to obtain the test paper text data can be implemented through the following examples.
[0061] The original test paper image data is sequentially subjected to format conversion, text clarification, structure processing and metadata extraction to obtain the test paper text data.
[0062] In the embodiment of the present invention, the server obtains the original test paper image data from the image repository of the school's test management system. These image data may come from different scanning devices and have different formats. For example, some are in high-resolution JPEG format, because some scanners output in JPEG format by default to balance image quality and file size; others may be in PNG format, which may be a format generated by some mobile scanning applications to ensure lossless compression of images, especially for test paper images containing handwritten answers and complex charts.
[0063] The server determines to convert all the original test paper image data into TIFF format according to the needs of subsequent processing and the standard format set within the system. TIFF format supports multi-page images and has good compatibility in terms of image color mode, resolution, etc., which is very important for subsequent text extraction and processing.
[0064] The server uses a specialized image format conversion library, such as the ImageMagick library, to perform format conversion operations. For each test paper image, the server calls the ImageMagick conversion command. For example, for a test paper image in JPEG format, the server executes a command similar to "convert input.jpg-compress none output.tiff", where "input.jpg" is the original JPEG format test paper image, and "output.tiff" is the converted TIFF format image. For images in PNG format, execute the corresponding conversion command to convert it to TIFF format. This process is automated, and the server converts the format of each original test paper image in turn according to a predetermined procedure.
[0065] Before the server performs text clarity processing, it first performs a quality analysis on the converted test paper image. For example, the image contrast is determined by analyzing the grayscale histogram of the image. If the histogram shows that the grayscale value distribution is relatively concentrated, it means that the image contrast is low and the text may not be clear enough. At the same time, the server will also detect the noise in the image and determine whether there is noise by analyzing the discreteness of the pixel values in the image.
[0066] For test paper images with low contrast, the server uses a grayscale adjustment algorithm 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 a test paper image is [50,150], the server adjusts it to the range of [0,255] through calculation, making the text part darker and the background part whiter, thereby improving the contrast.
[0067] If noise is detected in the image, the server will use a filtering algorithm to remove the noise. Taking median filtering as an example, the server will take a fixed-size neighborhood (such as a 3x3 or 5x5 pixel area) centered on each pixel in the image, then sort the pixel values in the neighborhood and take the middle value as the new value of the center pixel. This can effectively remove isolated noise points and make the text edges smoother and clearer. For some blurred noise points caused by slight shaking of the scanning device, this method can greatly improve the image quality and make the text on the test paper easier to recognize.
[0068] The server begins to perform structural processing on the test paper image after the text is clarified. First, the server analyzes features such as blank lines and separators in the image. For example, in most test papers, there are blank lines between questions, and thicker separators between different question types. The server scans the pixel rows of the image, and when it finds that the pixel values of multiple consecutive pixel rows are close to white (indicating blank rows), it marks them as possible question separation locations. For separators, the server determines them by detecting continuous black pixel strips in the horizontal or vertical direction.
[0069] Based on the identified features such as blank lines and separators, the server determines the boundaries of different areas in the test paper. For example, on the first page of a test paper, there is usually a title area, which may be located in the upper part of the test paper image. The server determines the upper and lower boundaries of the title area based on the blank lines and separators. For the question area, the server divides different questions into different areas based on the blank lines and determines the range of each question area. Similarly, for the answer area, the server determines its boundaries based on the layout rules of the test paper (for example, the answer area is usually below the question and has a certain amount of blank space).
[0070] The server marks the different regions with different types. The title region is marked as "title"; the question region is marked according to the question type (e.g., the multiple-choice region is marked as "multiple-choice", the short-answer region is marked as "short-answer", etc.); the answer region is marked as "answer". In this way, the test paper image is divided into structured regions with different types of marks, which provides a basis for subsequent question extraction and analysis.
[0071] The server locates metadata by analyzing specific areas of the test paper image. Generally speaking, the header and footer of the test paper are areas where metadata is concentrated. The server determines the location of the header and footer by detecting the text features of the upper and lower edges of the image. For example, in the header, there will be information such as the name of the test paper and the test subject, while in the footer, there will be information such as the page number and the test 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 the text in the header, the server inputs the image data of the header area into the Tesseract OCR engine, and the engine recognizes the text in the image. For example, if there is a text like "High School Physics Final Exam Paper" in the header, the OCR engine will accurately convert it into an editable text string.
[0073] The server associates the extracted metadata with the previously processed test paper image. For example, metadata such as the test paper name "High School Physics Final Exam Paper", the test subject "Physics", and the test time "June 2023" are associated with the corresponding test paper image storage record to form a complete test paper information package, which contains all relevant information after the test paper image is processed, and finally obtains the test paper text data. These test paper text data not only contain the content of the test paper, but also the metadata information related to it, providing comprehensive basic data for subsequent question processing.
[0074] In the embodiment of the present invention, the extraction of 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] A large topic-related model obtained through training based on a variety of sample topics is called, and the test paper text data is input into the large topic-related model to obtain the first rows of the plurality of topics.
[0076] In the embodiment of the present invention, the large model of relevant questions deployed on the server is the result of careful construction and long-term training. Before building the model, the development team collected a large number of sample questions from different educational institutions, different subjects, different grades and different test types as training data. These sample questions cover various question types, such as calculation questions, proof questions, and multiple-choice questions in mathematics papers; reading comprehension, composition, and ancient poetry filling in the blanks in Chinese papers; listening comprehension, grammar filling in the blanks, and reading comprehension in English papers.
[0077] These sample questions come from a wide range of sources, including past middle school entrance examination and college entrance examination questions, mock examination papers from various regions, and internal test papers from some well-known educational institutions. For example, tens of thousands of questions were collected from the college entrance examination mathematics papers of many provinces in the past ten years, and a large number of questions were also selected from the exercises of different versions of textbooks.
[0078] Use deep learning technology to build a large model for topic-specific answers, such as a model based on the Transformer architecture, which has good processing capabilities for long sequences of text. During the training process, the collected sample question text data is preprocessed, including word segmentation and tokenization of the text, and the text in the question is converted into a digital vector representation that the model can understand.
[0079] During the training process, the model learns various patterns in the question text, such as the pattern of question numbers (such as "1.", "(1)", etc.), vocabulary patterns related to question types (such as "seek" and "prove" in mathematics, "appreciate" and "summarize" in Chinese, etc.), question structure patterns (such as the relationship between the question stem and the question), etc. By repeatedly training on a large number of sample questions, the model gradually optimizes its internal parameters to improve the accuracy of recognizing the first line of the question.
[0080] After the server completes the preprocessing of the original test paper image data and obtains the test paper text data, it passes the test paper text data to the large model of the relevant questions. 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, in which the questions of different subjects are arranged in the order of the test paper.
[0081] In this test paper text data, the original layout format and content information of each subject's questions are retained, such as the article content and question content in Chinese reading comprehension questions; formulas and numbers in math questions, etc. At the same time, due to the previous preprocessing steps, the text in the text has been clearly identified and associated with relevant metadata (such as the page number of the question, the subject, etc.).
[0082] Before inputting the test paper text data into the big model, the server needs to adapt the data format because the big model has specific format requirements for the input data during the training process, such as the input text length limit, encoding method, etc.
[0083] If the model requires that the input text length cannot 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. At the same time, according to the model's encoding requirements, the test paper text data will be converted to the corresponding encoding format, such as UTF-8 encoding.
[0084] After receiving the adapted test paper text data, the large model begins to conduct in-depth semantic analysis of the text. For each sentence in the test paper text, the model makes a judgment based on the semantic patterns learned during the training process.
[0085] Take a question in a Chinese language test paper as an example: "Read the following classical Chinese text and answer the following questions. (1) Explain the meaning of the following highlighted 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 through the semantic understanding 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 each question. For example, question numbers are an important format feature. The model can recognize common question number formats such as "1.", "(1)", "I.", etc.
[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 first lines of multiple 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 the 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 the 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 are any abnormal resource occupations 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 sub-topic data to meet the requirements of the large model for input data. For each test sub-topic, the server ensures that its text content is complete, accurate, and arranged in a certain order. For example, if the test sub-topics were extracted in the order of the test paper in the process of identifying the first line of the question, then at this stage, the server still keeps this order unchanged. At the same time, the server will also add some necessary marking information to each test sub-topic, such as the page number of the question, the subject to which it belongs, etc. This information can help the large model better understand the relationship between the questions. Although this information may not directly participate in the hierarchical judgment, it can provide more contextual information.
[0093] After receiving the test sub-question data from the server, the model starts to make top-down hierarchical judgments. First, the model analyzes the relationship between questions from the perspective of semantic relationships.
[0094] Take a computer science test paper as an example. There is a major topic called “Design an online shopping system”, and its subtopics include “(1) Database design, including the design of user information table and product information table”, “(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-related model understands the semantics of these subtopics and determines that “Design an online shopping system” is the top-level topic, with a level 1 label, because it is a holistic and general topic. Subtopics such as “(1) Database design, including the design of user information table and product information table” are specific tasks under the framework of this major topic and are marked as level 2 labels.
[0095] During this process, the model will analyze the keywords in the title. For example, the word "design" in the main title is an overall task description, while the "database design", "user interface design" and "server-side logic implementation" in the sub-titles are specific design aspects under this overall task. The hierarchy is determined through this semantic inclusion relationship.
[0096] In addition to semantic relationships, the relevance model also determines the hierarchy based on the structure of the question. In some test papers, questions may express hierarchical relationships through specific structures.
[0097] For example, in a chemistry test paper, there is a question called "Explore the chemical properties of metals", and the following sub-topics are presented in the following structure: "1. Explore the chemical properties of iron: (1) The reaction of iron and oxygen; (2) The reaction of iron and acid", "2. Explore the chemical properties of copper: (1) The reaction of copper and oxygen; (2) The reaction of copper and nitric acid". The topic-related model identifies the numerical sequence and indentation format in this topic structure (such as the nested relationship between "1." and "(1)") and determines that "Explore the chemical properties of metals" is a first-level hierarchical identifier, "1. Explore the chemical properties of iron" and "2. Explore the chemical properties of copper" are second-level hierarchical identifiers, and "(1) The reaction of iron and oxygen" is a third-level hierarchical identifier.
[0098] When making hierarchical judgments, the large-scale model of topic relevance often integrates multiple factors such as semantic relationships and question structure. For example, in a physics test paper, there is a question called "Analysis of the law of conservation of energy in mechanics", and one of the sub-topics is "(1) Energy conservation in simple pendulum motion, combined with the conversion of kinetic energy and potential energy". From a semantic point of view, "Analysis of the law of conservation of energy in mechanics" is an overall theoretical analysis question, which is a level 1 label; from a question structure point of view, "(1) Energy conservation in simple pendulum motion, combined with the conversion of kinetic energy and potential energy" is an analysis of the specific situation of simple pendulum motion under this overall theory, so it is determined to be a level 2 label.
[0099] In this way, the topic-related model determines the corresponding hierarchical identification for each sub-question of the test paper.
[0100] After receiving the hierarchical identifiers corresponding to each test sub-topic returned by the large model, the server begins to build a hierarchical tree structure relationship. 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] For example, for a test paper with both math and Chinese questions, the hierarchical identifiers related to math questions are placed together first, followed by the hierarchical identifiers related to Chinese questions. In math questions, if there are multiple sub-topics under a big question, the hierarchical identifiers of these sub-topics are arranged in order from high to low (from the top question to the bottom sub-topic).
[0102] Based on the organized hierarchical identifiers, the server constructs a hierarchical tree structure relationship. For a simple example, suppose there is a test question structure as follows:
[0103] -Topic A (Level 1)
[0104] -Topic A-1 (Level 2)
[0105] -Topic A-1-1 (Level 3)
[0106] -Topic A-2 (Level 2)
[0107] -Topic B (Level 1)
[0108] -Topic B-1 (Level 2)
[0109] The server will build a tree-like data structure, where Question A and Question B are the root nodes of the tree (level 1), Question A-1 and Question A-2 are the child nodes of Question A (level 2), Question A-1-1 is the child node of Question A-1 (level 3), and Question B-1 is the child node of Question B (level 2). This hierarchical tree structure clearly shows the hierarchical relationship between the questions in the test paper, and provides an important basis for subsequent operations such as question segmentation and storage.
[0110] In an embodiment of the present invention, the plurality of first-row test paper questions are segmented according to the hierarchical identification to obtain a plurality of questions to be stored, and each of the questions to be stored is processed using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question, which can be implemented through the following example.
[0111] Divide the plurality of first-row test paper questions according to the hierarchical identifier to obtain a plurality of questions to be stored;
[0112] Determine the test paper node corresponding to each of the to-be-stored questions according to the hierarchical tree structure relationship, wherein the test paper node includes the text content of the corresponding to-be-stored question;
[0113] The test paper nodes are traversed, and corresponding text contents are input into the pre-trained storage level labeling model according to the order relationship of the test paper nodes to perform question independence judgment, so as to obtain the target question as an independent question.
[0114] In an embodiment of the present invention, exemplarily, the server first reads information from a previously constructed data structure associated with a hierarchical identifier and the first row of test questions. For example, for a comprehensive test paper containing mathematics, Chinese and English questions, the server obtains each first row of test questions and the corresponding hierarchical identifier. In the mathematics section, there may be a first row of test questions that is "1. Solving quadratic equations: (1) Derivation of the root formula; (2) Using the matching method to solve the equation (x2-5x+6=0)", and its hierarchical identifier is level 1 (for the overall quadratic equation related questions), where "(1) Derivation of the root formula" is level 2, and "(2) Using the matching method to solve the equation (x2-5x+6=0)" is also level 2.
[0115] According to the hierarchical identification, the server starts to divide the first row of test questions. For the math question above, since "1. Solve a quadratic equation" is a question that contains multiple sub-contents, the server divides it into two questions to be stored according to the 2-level hierarchical identification, namely "Derivation of the root formula" and "Use the matching method to solve the equation (x2-5x+6=0)". In the Chinese test paper, 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 image of the characters in the article", according to the hierarchical identification, it will be divided into two questions to be stored: "Summarize the main idea of the article" and "Analyze the image of the characters in the article".
[0116] The server has constructed a hierarchical tree structure relationship of the test paper text data. For each question to be stored in the database obtained by segmentation, the server determines its corresponding test paper node through this hierarchical tree structure relationship. 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 stored in the database, the server determines its test paper node by searching in the hierarchical tree structure.
[0117] This test paper node contains the complete text content of the question "Mitochondrial Structure and Function" to be stored, and may also include some related auxiliary information, such as the specific location in the test paper (page number, paragraph, etc.). For example, in this biology test paper, the text content of the test paper node "Mitochondrial Structure and Function" may be "Mitochondria are important organelles in cells. They have a double membrane structure. Please describe the structural characteristics of their inner and outer membranes and the main biochemical reactions in mitochondria, etc." It will also be associated with its location information in the test paper, such as page 3, paragraph 2, etc.
[0118] The server starts to traverse all the test paper nodes in order. For example, in a large test paper containing multiple subjects and multiple question types, the server starts from the first test paper node of the first subject and processes each test paper node in turn. If the test paper node of the math test paper is processed first, the server will access the corresponding test paper nodes one by one according to the order of the math questions in the test paper.
[0119] For each test paper node, the server extracts the text content of the questions to be stored, and inputs these text contents into the pre-trained storage hierarchical labeling model according to the order of the test paper nodes. Take a question in a history test paper as an example. Assuming that there are two questions to be stored, namely "1. Briefly describe the starting point and end point of the ancient Silk Road" and "2. Analyze the impact of the ancient Silk Road on cultural exchanges between the East and the West", the server inputs the text content of the test paper nodes corresponding to these two questions into the storage hierarchical labeling model in sequence.
[0120] The input level labeling model is pre-trained with a large amount of different types of question data. This model determines whether a question is an independent question based on the input text content. For the questions in the above history test paper, the model will analyze the integrity and independence of each question. The question "1. Briefly describe the starting point and end point of the ancient Silk Road" has clear question content and can be answered independently. The model will determine that it is an independent question. For some questions that may have dependencies or incomplete expressions, the model will determine that they are not independent questions. For example, if there is a question "Continue the analysis based on the above Silk Road", because it depends on the previously mentioned Silk Road-related content and the expression is incomplete, the model will not determine it as an independent question.
[0121] After being judged by the warehousing hierarchical labeling model, the questions to be stored that are determined to be independent questions become target questions. The server collects these target questions, which will serve as the basis for subsequent warehousing operations and hierarchical labeling operations. For example, in a test paper containing many questions to be stored, 20 target questions are determined after model judgment. These target questions cover different subjects and different types of questions. They are structurally independent and can be stored, managed, and analyzed separately.
[0122] In the embodiment of the present invention, the storage level mark and metadata of each test paper sub-question are structured and stored to obtain the relevant result corresponding to the original test paper image data, including:
[0123] The storage level mark, metadata, basic information and related information of each test paper sub-question are structured and stored to obtain corresponding structured data;
[0124] The structured data is used as the relevant result corresponding to the original test paper image data.
[0125] In an embodiment of the present invention, illustratively, the server obtains the storage level mark of each test paper sub-topic from the previous processing steps. Taking a physics test paper as an example, for the topic "1. Application of Newton's Second Law: (1) Calculate the acceleration of the object; (2) Analyze the relationship between force and acceleration", "1. Application of Newton's Second Law" may be marked as a first-level storage topic, and "(1) Calculate the acceleration of the object" and "(2) Analyze the relationship between force and acceleration" are marked as second-level storage topics. The server sorts out this hierarchical marking information and clarifies the hierarchical position of each test paper sub-topic in the entire test paper structure.
[0126] The server collects metadata previously extracted when preprocessing the test paper image data. In the example of a physics test paper, the metadata may include information such as the test paper name "High School Physics Final Exam Paper", the test subject "Physics", the test time "June 2023", and the test paper version "People's Education Press". These metadata provide more extensive background information for the test paper sub-questions, which helps with subsequent query, analysis, and management of the test paper.
[0127] For each test sub-topic, the server determines its basic information. The basic information includes the question type, the number of words in the question, the estimated difficulty of the question, etc. For example, for the question "Calculate the acceleration of an object", the question type is a calculation question, and the number of words in the question is determined to be about 20 (including punctuation marks and numbers) by counting the number of characters in the question. Regarding the difficulty estimate of the question, the server can make a preliminary judgment based on some predefined rules, such as the number of knowledge points involved, the complexity of the calculation, etc. If this question only involves a simple application of Newton's second law and the calculation process is not complicated, it may be marked as medium difficulty.
[0128] The server searches for relevant information about each sub-topic of the test paper. Relevant information can include associations with other topics, knowledge point coverage, etc. In the physics test paper, the topic "Calculate the acceleration of an object" is associated with the topic "Analyze the relationship between force and acceleration" because they both revolve around Newton's second law. In terms of knowledge point coverage, this topic mainly covers the knowledge point of the application of Newton's second law, and the server collects relevant information such as these associations and knowledge point coverage.
[0129] The server selects a suitable storage structure to store this data. In modern data management, relational databases (such as MySQL) or non-relational databases (such as MongoDB) can be used to store this data. If a relational database is selected, the server will create multiple related tables, such as "exam information table", "question table", "hierarchical relationship table", "knowledge point association table", etc. If a non-relational database is selected, the relevant information of each test sub-question will be stored in the form of a document (such as a JSON formatted document).
[0130] In a relational database, create a field in the "Question Table" to store the entry level tag. For each test sub-question, store its corresponding entry level tag (such as level one, level two, etc.) in this field. For example, in the record of the question "Calculate the acceleration of an object", store the tag "Enter Level Two Question" in the corresponding field. In a non-relational database, if stored in a JSON document, a key-value pair of "Enter Level Tag" will be added to the document representing this question, such as {"Enter Level Tag":"Enter Level Two Question"}.
[0131] Metadata is stored in the "Exam Information Table" of the relational database. Metadata such as the exam name, exam subject, exam time, and exam version are stored in the corresponding fields. In a non-relational database, these metadata are stored in a document representing the overall information of the exam, such as {"Exam Name":"High School Physics Final Exam","Exam Subject":"Physics","Exam Time":"June 2023","Exam Version":"People's Education Edition"}.
[0132] In the "Question Table" of a relational database, create additional fields for each test sub-question to store basic information. For example, create a "Question Type" field to store "Calculation Question", a "Question Word Count" field to store "20", and a "Question Difficulty Estimation" field to store "Medium Difficulty", etc. In a non-relational database, add corresponding key-value pairs to the JSON document representing the question, such as {"Question Type":"Calculation Question","Question Word Count":"20","Question Difficulty Estimation":"Medium Difficulty"}.
[0133] In a relational database, if it is an association relationship, it can be stored in the "knowledge point association table" or other related tables through foreign keys and other methods. For example, for the association relationship between the two topics "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", respectively representing the association between the two topics and their common knowledge point "Application of Newton's Second Law". If it is the coverage of knowledge points, it can be stored in a special table. In a non-relational database, add key-value pairs or sub-documents representing the association relationship and knowledge point coverage to the document representing the topic, such as {"Associated topic": ["Analyze the relationship between force and acceleration"],"Knowledge point coverage": ["Application of Newton's Second Law"]}.
[0134] Through the above storage process, whether it is a combination of multiple table structures in a relational database or a document structure in a non-relational database, structured data for each test sub-topic is formed. These structured data completely include the storage level tag, metadata, basic information and related information of each test sub-topic.
[0135] The server uses these structured data as the relevant results corresponding to the original test paper image data. When the relevant situation of the test paper needs to be queried, for example, if the teacher wants to view the hierarchical relationship of each question in the test paper, the distribution of question types, etc., the required information can be obtained by querying this structured data. For the teaching management department, this relevant result can be used to analyze the overall structure of the test paper, the coverage of knowledge points, etc., so as to carry out teaching quality evaluation, teaching resource planning and other tasks.
[0136] In the embodiments of the present invention, the following implementation modes are also provided.
[0137] Obtaining an update instruction, wherein the update instruction includes update data for the test paper text data;
[0138] updating the structured data according to the update data comparison to obtain updated structured data;
[0139] The updated structured data is used as an updated topic result.
[0140] In an embodiment of the present invention, illustratively, the server is in a continuous listening state, waiting to receive an update instruction. This update instruction can come from multiple sources. For example, in a school's education management system, when a teacher reviews the test paper's results, he or she finds some problems or has new requirements, and sends an update instruction through the teacher's operation interface. Or when the teaching management department reviews the overall teaching resources, it is found that the results of some test papers need to be adjusted, and thus an update instruction is sent from the management end to the server.
[0141] When the server receives the update instruction, it first parses it and extracts the update data for the test paper text data. Assume that the teacher finds that there is an error in the previous answer to a math question. The update instruction sent contains the new text content of the question, the adjustment of the hierarchical relationship, and the update data of the related metadata correction. For example, the original question is "1. Calculate the area of a triangle: (1) Know the base and height, calculate the area; (2) Know the three sides, calculate the area (Heron's formula)", the update data can indicate that the text of this question should be corrected to "1. Calculate the area of a triangle: (1) Conventional method to calculate the area (known base and height); (2) Special method to calculate the area (known three sides, Heron's formula)", and the hierarchical relationship may be adjusted from the previous two second-level sub-topics under the first-level question to two parallel first-level questions, and the test knowledge point association in the metadata may be corrected from "Basic geometry calculation" to "Comprehensive application of triangle area calculation methods".
[0142] The server locates the record corresponding to the test sub-topic that needs to be updated in the stored structured data based on the key information in the updated data, such as the content of the question, the question number, or the related metadata identifier. In the above math question example, the server finds the corresponding record in the "question table" and related "hierarchical relationship table" and "knowledge point association table" of the relational database through the question number "1. Calculate the area of a triangle" or features related to the question (such as the knowledge point of calculating the area of a triangle). If a non-relational database is used for storage, the server will search for matching documents in the collection of documents storing the test sub-topics.
[0143] According to the hierarchical relationship adjustment in the updated data, the server updates the storage level mark 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 will update the value of the "Storage Level Mark" field of these two sub-topics from "Storage Secondary Problem" to "Storage First-level Problem" in the "Problem Table" of the relational database. In the non-relational database, the value of the "Storage Level Mark" key-value pair in the document representing these two problems is modified to "Storage First-level Problem".
[0144] For metadata updates, the server updates the relevant fields in the "Test Paper Information Table" of the 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 record). In the above example, the knowledge point association is updated from "Basic Geometry Calculation" to "Comprehensive Application of Triangle Area Calculation Method" 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 Method".
[0145] If the updated data involves basic information of the topic (such as topic type, word count of the topic, etc.) or related information (such as the relationship with other topics), the server will also make corresponding updates. For example, if the topic type is changed from a simple calculation type to a comprehensive application type after the topic is modified, the value of the "topic type" field is updated in the "topic table" of the relational database. If the relationship with other topics changes, such as in a relational database, the change is reflected by updating the records in the "knowledge point association table"; in a non-relational database, the "related topic" key-value pair in the document representing the topic is modified.
[0146] After updating each part, the server ensures that the updated structured data remains intact. Whether it is a multi-table association structure in a relational database or a document structure in a non-relational database, all relevant data matches each other and fully represents the various information of the updated test sub-topics. For example, in a relational database, after the update, the question records in the "question table" and the hierarchical relationships in the "hierarchical relationship table" and the knowledge point associations in the "knowledge point association table" are consistent and complete.
[0147] The server uses this updated structured data as the updated question-relevant result. This updated question-relevant result will replace the previous question-relevant result and become the latest question-relevant result corresponding to the current test paper image data. Subsequent queries, analyses, and uses, such as teachers checking the question-relevant status of the test paper again and the teaching management department conducting teaching resource analysis, will be based on this updated question-relevant result. For example, teachers can more accurately understand the structure of the test paper and the relationship between questions based on the updated question-relevant result in order to conduct teaching evaluation and adjust the teaching plan; the teaching management department can also conduct more accurate teaching resource management and teaching quality monitoring based on this result.
[0148] In order to more clearly describe the solution provided by the embodiment of the present invention, a more detailed implementation is provided below.
[0149] The present invention discloses a method for intelligent question cutting of test papers, which can perform intelligent question cutting processing on test papers, thereby significantly improving the efficiency and accuracy of test paper production. The core of the method is to use advanced natural language processing technology and machine learning algorithms to perform in-depth analysis on the content of the test paper, automatically identify and segment each independent question unit. The first step is to convert the electronic document (such as PDF or picture) of the original test paper into a format that can be processed by a computer after a preprocessing stage. The second step is the first line extraction stage of the question, in which the text is analyzed using a large model technology to extract the first line of the question in the text. The third step is the text matching stage, in which the first line of the extracted question is matched with the text of the original test paper, so as to segment each set of questions according to the first line of each question. The fourth step is the top-down hierarchical judgment stage, in which each set of questions in the test paper is judged from top to bottom according to the hierarchical output of the large model and each set of questions segmented out, and is marked from top to bottom. The fifth step is the stage of judging the storage level. Based on the top-down levels, the big model technology is used to determine whether each level is a storage level and mark the storage level. The sixth step is database storage. The database of test questions is communicated, and the segmented questions are stored in the database according to the storage level mark, which is convenient for subsequent test question search and test question assembly. Figure 2 As shown. In this way, not only can the tediousness and errors of manual operation be reduced, but also the standardization and consistency of the test paper structure can be ensured, providing a more scientific and objective basis for educational evaluation. In addition, this method is also highly flexible and scalable, and can adapt to the needs of test papers of different types and difficulty, providing strong technical support for the intelligent development of the education field.
[0150] 1. Preprocessing stage
[0151] In the preprocessing stage, the electronic documents of the original test papers (such as PDF or images) are first converted into a format that can be processed by computers. This step is crucial because only when the test paper content is presented in a computer-readable form can subsequent intelligent processing be carried out. The preprocessing stage usually includes the following sub-steps:
[0152] (1) Document format conversion: Convert the paper or electronic document (such as PDF or image) of the test paper into text format. This can be achieved through optical character recognition (OCR) technology. OCR technology can recognize the text on the test paper and convert it into text that can be edited and processed.
[0153] (2) Text cleaning: During the conversion process, some noise or errors will be introduced, such as extra spaces, line breaks, garbled characters, correcting typos, unifying fonts and formats, etc. Therefore, it is necessary to clean the text to remove these unnecessary elements and ensure the purity and readability of the text.
[0154] (3) Structural processing: Test papers usually have a certain structure, such as questions, options, answers, etc. In the preprocessing stage, these structures need to be initially identified and marked so that the subsequent steps can more accurately segment and classify the questions.
[0155] (4) Metadata extraction: In addition to the test paper content itself, some metadata needs to be extracted, such as the test paper title, author, time, subject, etc. These metadata are of great significance for subsequent test paper management and analysis.
[0156] Through the pre-processing stage, the test paper content is effectively converted and cleaned, laying a solid foundation for the subsequent intelligent question-cutting processing. Although the work at this stage seems simple, it is an indispensable part of the entire intelligent question-cutting method and directly affects the accuracy and efficiency of the subsequent steps.
[0157] 2. Extraction of the first line of the title
[0158] After the preprocessing stage, the text content of the test paper is obtained. The text is input into the large model of the topic, and the hierarchy and the first line of the question are obtained. The base model for training the large model of the topic is a large language model such as GLM4, GPT4, etc. In the stage of extracting the first line of the question, the core task is to accurately identify and extract the first line of each question from the preprocessed test paper text through advanced natural language processing technology and machine learning algorithms. The key to this step is to use large model technology, such as the large model of the topic based on the large language model, to conduct in-depth analysis of the text. As an advanced language model, the large language model has powerful text understanding and generation capabilities, and can effectively capture the semantic information and structural features in the test paper text.
[0159] The large model for topic-related questions will conduct a comprehensive semantic analysis of the input test paper text and identify the various semantic units in the text, especially those that may serve as the first line of the question. This process involves multi-dimensional analysis of the text at the lexical, syntactic, and semantic levels to ensure that the starting position of the question can be accurately located. For example, the first line of a question usually has specific formatting features, such as starting with a number, letter, or special symbol, and is usually located at the beginning of a paragraph. The large model technology can capture these subtle formatting and semantic features to accurately locate the first line of the question.
[0160] In the first line extraction stage of the question, fine-tuning the large model of the question is the key to ensure the accuracy of extraction. The fine-tuning process usually includes the following steps:
[0161] (1) Data labeling and preparation: First, a large amount of labeled data needs to be prepared. This data contains the test paper text of the first line 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 a variety of question formats. For example:
[0162] #enter
[0163] Test paper line 1 text
[0164] Test paper line 2 text ...
[0166] Test paper line n-1 text
[0167] Test paper line n text
[0168] #Output
[0169] First level:
[0170] 1. xxxxxxxxxxxxxxxx
[0171] 2. xxxxxxxxxxxxxxxxxx ...
[0173] Second level:
[0174] xxxxxxxxxxxxxxxxxxxxx
[0175] xxxxxxxxxxxxxxxxxxxxx ...
[0177] Level M:
[0178] (1) xxxxxxxxxxxxxxxxxxxxx
[0179] (2) xxxxxxxxxxxxxxxxxxxx
[0180] (2) Model training: After data preparation is completed, the labeled data is input into the large model for training. During the training process, the model will learn 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 minimize misjudgment and missed judgment.
[0181] (3) Model evaluation and optimization: After training, the model needs to be evaluated to determine its performance on unseen data. Evaluation metrics usually include accuracy, recall, and F1 score. If the model performance is not ideal, 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 first line of the extracted questions with the text of the original test paper, so as to achieve intelligent segmentation of the test paper content. The key to this step lies in multiple matching strategies to ensure that the first line of each question can accurately correspond to the corresponding position in the original test paper.
[0184] First, the system will make a preliminary match between the test paper text obtained in the preprocessing stage and the first line of the question obtained in the first line extraction stage. This process usually involves multi-dimensional analysis of the text at the lexical, syntactic and semantic levels to ensure that the starting position of the question can be accurately located. For example, the first line of the question usually has specific formatting features, such as starting with a number, letter or special symbol, and is usually located at the beginning of a paragraph. The system will use these subtle formatting and semantic features to accurately locate the position of the first line of the question.
[0185] During the text matching phase, the system will use a variety of matching strategies to ensure the accuracy and robustness of the match. These strategies include but are not limited to:
[0186] (1) Exact match: The system will first try to perform an exact match, that is, directly search for a text segment in the original test paper 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 adopt a fuzzy matching strategy. Fuzzy matching allows certain text differences and determines the matching result by calculating the similarity between texts. This matching method is suitable for test papers with irregular format of the first line of the question or certain changes in content.
[0188] 4. Top-down hierarchical judgment stage
[0189] In the top-down hierarchical judgment stage, the system will make a top-down hierarchical judgment on each set of questions in the test paper according to the hierarchical output of the large model and each set of questions segmented out, and perform top-down hierarchical marking. The key to this step is to ensure that the structure of the test paper is clear and the logic is rigorous, thereby providing a reliable foundation for subsequent warehousing hierarchical judgment and database storage.
[0190] Represent all questions in the form of a tree, for example:
[0191] First, the system will mark the questions under this level in the form of Lx_y according to the hierarchical information output by the large model, where x represents the xth level, and y represents the yth sub-topic under the xth level. If there are sub-topics under y, it will be represented by Lx_y#Lz_w, where z represents the zth level, and w represents the wth sub-topic under the zth level. For example, assuming that the test paper has two major levels, the first level is represented as "L1_1", and there are two sub-topics under the first level, then the first question of the first level is represented as L1_1#L2_1. If there is another sub-question under L1_1#L2_1, it will be represented as L1_1#L2_1#L3#1, and so on. Questions of each level can be represented.
[0192] Therefore, all the top-down hierarchies of the questions can be represented as processing, for example:
[0193] Since the above only marks the first line of the questions, according to the marked top-down questions, the content below the question is filled in with the marked top-down. In addition, the content corresponding to L1_1 is represented by "other", which generally contains some introduction to the test paper, precautions, etc.
[0194] 5. Inventory level determination stage
[0195] According to the above-mentioned top-down hierarchical marking, each question can be segmented, but each big question has sub-topics, and sub-topics have smaller-level questions. However, it is difficult to determine which level of questions are independent of each other. Mutual independence means that a question is taken out alone and it does not depend on other question information. Therefore, this kind of independent question is defined as a second-level question to be stored in the library, and its top-down sub-topic is defined as a third-level question to be stored in the library, and its top-down upper-level question is defined as a first-level question to be stored in the library. To extract the second-level questions to be stored in the library, it is necessary to use the large model technology to perform semantic analysis on each question to determine whether it is a second-level question to be stored in the library. And perform corresponding storage level marking.
[0196] In the stage of inventory level judgment, fine-tuning the inventory level prediction model is a key task. The fine-tuning process usually includes the following steps:
[0197] (1) Data labeling and preparation: First, a large amount of labeled data needs to be prepared. This data contains test questions of known storage 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 a variety of question formats. The input is a top-down first-level question, and the output is whether it is an independent sub-question, that is, whether it is a second-level question in the storage.
[0198] (2) Model training: After data preparation is completed, the labeled data is input into the inventory level prediction model for training. During the training process, the model will learn how to identify the characteristics of the inventory level from the question text. The goal of training is to enable the model to accurately predict the inventory level of each question and minimize misjudgment and missed judgment.
[0199] (3) Model evaluation and optimization: After training, the model needs to be evaluated to determine its performance on unseen data. Evaluation metrics usually include accuracy, recall, and F1 score. If the model performance is not ideal, 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 the model training and optimization are completed, the system will mark each question in the test paper for storage level. First, the tree structure of the top-down hierarchical results of the test paper is input. Each node contains n child nodes in order. The attributes of each node include line number, text, top-down hierarchical label, and child node. Then, each node is traversed in depth first, and the text content of all the descendant nodes of the node is spliced in order. The large model is input to determine whether it contains independent sub-questions; if it does not contain independent sub-questions, the node is determined to be storage level L2; if it contains independent sub-questions, its child nodes are continued to be traversed; finally, the system will classify the questions into storage level one, level two, and level three questions according to the prediction results of the model.
[0201] 6. Database storage stage
[0202] In the database storage stage, the system will store the hierarchically marked and verified question data in the test database for subsequent test search and test assembly. The key to this step is to ensure the integrity, consistency and accessibility of the data.
[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 usually includes basic information about the question (such as question content, type, difficulty, etc.), hierarchical information (such as storage level, top-down level, etc.), metadata information (such as test title, author, time, subject, etc.) and other relevant information (such as answers, analysis, etc.).
[0204] During the database storage phase, the system will use a variety of technical means to ensure data security and reliability. For example, the system will use data backup and recovery mechanisms to prevent data loss or damage; use data encryption technology to protect data privacy and security; use data indexing and query optimization technology to improve data retrieval efficiency and response speed.
[0205] In addition, the system will also establish a complete data management mechanism, including data update, data maintenance, data audit, etc., to ensure the timeliness and accuracy of the data. The data management mechanism usually includes the following aspects:
[0206] (1) Data update: The system will regularly update the data in the database to ensure the timeliness and accuracy of the data. Data updates usually include adding new test questions, modifying test questions, deleting test questions, etc.
[0207] (2) Data maintenance: The system will regularly maintain the database to ensure the stability and reliability of the database. Data maintenance usually includes database optimization, database repair, database backup and other operations.
[0208] (3) Data Audit: The system will regularly audit the data in the database to ensure data compliance and consistency. Data audit usually includes operations such as data integrity check, data consistency check, and data security check.
[0209] Through the database storage stage, the system can not only effectively manage and store test data, but also provide strong support for subsequent test search and test assembly. This not only helps to improve the efficiency and accuracy of test paper production, but also provides a more scientific and objective basis for educational evaluation.
[0210] In summary, the intelligent question-cutting method for test papers disclosed in the present invention realizes intelligent question-cutting processing of test paper content through the collaborative work of multiple stages such as preprocessing, extraction of the first line of questions, text matching, top-down hierarchical judgment, storage hierarchical judgment and database storage. This method can not only significantly improve the efficiency and accuracy of test paper production, but also ensure the standardization and consistency of the test paper structure, providing a more scientific and objective basis for educational evaluation. In addition, the method is also highly flexible and scalable, and can adapt to the needs of test papers of different types and difficulty, providing strong technical support for the intelligent development of the education field.
[0211] Please refer to 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 pre-process 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 the first line of test paper questions corresponding to each of the first lines of questions includes at least one test paper sub-topic; perform top-down hierarchical judgment on multiple test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics; segment the multiple first lines of test paper questions according to the hierarchical identifier to obtain multiple questions to be stored, and use a pre-trained storage hierarchical labeling model to process each of the questions to be stored to obtain a target question as an independent question;
[0213] The topic-connecting module 1102 is used to mark the storage level of the target topic as a second-level topic, and mark the next-level topic of the second-level topic from top to bottom as a third-level topic, and mark the previous-level topic of the second-level topic from top to bottom as a first-level topic; the storage level mark and metadata of each test paper sub-topic are structured for storage to obtain the topic-connecting result corresponding to the original test paper image data.
[0214] It should be noted that the implementation principle of the aforementioned test paper intelligent cutting device 110 can refer to the implementation principle of the aforementioned test paper intelligent cutting method, which will not be repeated here. It should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the test paper intelligent cutting device 110 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above test paper intelligent cutting device 110. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0215] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0216] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned intelligent test paper switching device 110. Figure 4 As shown, Figure 4 The computer device 100 provided in the embodiment of the present invention is a structural block diagram. The computer device 100 includes an intelligent test paper cutting device 110, a memory 111, a processor 112 and a communication unit 113.
[0217] In order to realize data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly. For example, the electrical connection between these components can be realized through one or more communication buses or signal lines. The test paper intelligent cutting device 110 includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 112 is used to execute the test paper intelligent cutting device 110 stored in the memory 111, such as the software function modules and computer programs included in the test paper intelligent cutting device 110.
[0218] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the aforementioned intelligent test paper switching device 110.
[0219] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.
Claims
1. An intelligent test paper cutting method, characterized in that: include: Acquire original test paper image data, and pre-process the original test paper image data to obtain test paper text data; Extracting the first line of questions from the test paper text data to obtain a plurality of first lines of questions included in the test paper text data, wherein the first line of test paper questions corresponding to each first line of questions includes at least one test paper sub-question; Performing a top-down hierarchical judgment on a plurality of test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics; The plurality of first-row test paper questions are segmented according to the hierarchical identifiers to obtain a plurality of questions to be stored, and each of the questions to be stored is processed using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question; Mark the target topic's storage level as a storage level 2 topic, mark the next level topic of the storage level 2 topic from top to bottom as a storage level 3 topic, and mark the previous level topic of the storage level 2 topic from top to bottom as a storage level 1 topic; The storage level mark and metadata of each test paper sub-question are structured and stored to obtain the relevant result corresponding to the original test paper image data.
2. The method according to claim 1, characterized in that The preprocessing of the original test paper image data to obtain the test paper text data includes: The original test paper image data is sequentially subjected to format conversion, text clarification, structure processing 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 to obtain a plurality of first lines of questions included in the test paper text data includes: A large topic-related model obtained through training based on a variety of sample topics is called, and the test paper text data is input into the large topic-related model to obtain the first rows of the plurality of topics.
4. The method according to claim 3, characterized in that: The step of performing top-down level determination on the multiple test paper sub-topics to obtain a level identifier corresponding to each of the test paper sub-topics includes: The topic-related model is called to perform top-down hierarchical judgment on the multiple test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics, and the multiple hierarchical identifiers constitute a hierarchical tree structure relationship of the test paper text data.
5. The method according to claim 4, characterized in that The method of segmenting the plurality of first-row test paper questions according to the hierarchical identifier to obtain a plurality of questions to be stored, and processing each of the questions to be stored using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question includes: Divide the plurality of first-row test paper questions according to the hierarchical identifier to obtain a plurality of questions to be stored; Determine the test paper node corresponding to each of the to-be-stored questions according to the hierarchical tree structure relationship, wherein the test paper node includes the text content of the corresponding to-be-stored question; The test paper nodes are traversed, and corresponding text contents are input into the pre-trained storage level labeling model according to the order relationship of the test paper nodes to perform question independence judgment, so as to obtain the target question as an independent question.
6. The method according to claim 1, characterized in that The step of structurally storing the storage level mark and metadata of each test paper sub-question to obtain the relevant result corresponding to the original test paper image data includes: The storage level mark, metadata, basic information, and related information of each test paper sub-question are structured and stored to obtain corresponding structured data; The structured data is used as the relevant result corresponding to the original test paper image data.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining an update instruction, wherein the update instruction includes update data for the test paper text data; updating the structured data according to the update data comparison to obtain updated structured data; The updated structured data is used as an updated topic result.
8. An intelligent test paper cutting device, characterized in that: include: An acquisition module, used for acquiring original test paper image data, and preprocessing the original test paper image data to obtain test paper text data; 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, wherein the first line of test paper questions corresponding to each of the first lines of questions includes at least one test paper sub-topic; performing top-down hierarchical judgment on the multiple test paper sub-topics to obtain a hierarchical identifier corresponding to each of the test paper sub-topics; The plurality of first-row test paper questions are segmented according to the hierarchical identifiers to obtain a plurality of questions to be stored, and each of the questions to be stored is processed using a pre-trained storage hierarchical labeling model to obtain a target question as an independent question; The topic-cutting module is used to mark the storage level of the target topic as a second-level topic, and mark the next-level topic of the second-level topic from top to bottom as a third-level topic, and mark the previous-level topic of the second-level topic from top to bottom as a first-level topic; the storage level mark and metadata of each test paper sub-topic are structured for storage to obtain the topic-cutting result corresponding to the original test paper image data.
9. A computer device, characterized in that: The computer device comprises a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Text processing method and system, medium and computing device
CN107766301A
Topic content identification method and device, readable storage medium and computer equipment
CN110956173A
Topic content extraction method and device, readable storage medium and computer equipment
CN111737949A
Test paper analysis method and device, storage medium and electronic equipment
CN113177435A
Automatic scoring and error correction recommendation method for subjective questions
CN113392187A