A Student Identification Method and System Combining OCR and AI Vision as a Backup

By employing a dual-engine architecture that combines OCR and AI vision as a safety net, along with ROI region analysis, multi-strategy roster matching, and hierarchical confidence assessment, the problem of low accuracy and high cost in student identification has been solved, achieving efficient and accurate automated student identification.

CN123072033APending Publication Date: 2026-11-10何中楷
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611278415.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies for student identification suffer from low accuracy, high cost, and low efficiency. In particular, OCR recognition is not robust enough in complex scenarios, the roster matching strategy is simplistic, and there is a lack of intelligent fallback mechanisms from AI visual models, resulting in insufficient automation and wasted resources.

Method used

It adopts a dual-engine architecture with OCR and AI vision as a backup. Through ROI region analysis, multi-strategy roster matching cascade, hierarchical confidence assessment and intelligent skip strategy, combined with AI vision model to perform secondary recognition when necessary, it realizes differentiated confidence assessment and matching of student ID and name, and is suitable for continuous scanning and batch uploading scenarios.

Benefits of technology

It significantly improved the recognition rate to nearly 100%, reduced the cost of calling the system, improved the efficiency of batch processing, and achieved efficient automated recognition and accurate matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072033A_ABST
    Figure CN123072033A_ABST
Patent Text Reader

Abstract

This invention discloses a student identity intelligent recognition method and system based on OCR and AI visual fallback, belonging to the fields of optical character recognition and online education technology. The invention employs a dual-engine architecture of OCR priority and AI conditional fallback. First, it performs double ROI slicing or intelligent top cropping on the assignment image. After preprocessing, it extracts the student ID and name fields and their corresponding confidence levels using OCR. Then, it completes identity matching through a cascading 10-level roster matching, constructing a three-level confidence system and setting automatic upload and AI trigger thresholds. AI fallback is triggered only when OCR has low confidence, no candidates, and no repeated recognition within 10 seconds. The results are then fused after multi-dimensional verification. It adapts to continuous scanning scenarios, automatically uploading high-confidence data and manually confirming low-confidence data. This invention significantly improves the recognition rate in complex handwriting scenarios, controls call costs through an intelligent skip strategy, and balances batch processing efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of optical character recognition (OCR), computer vision, and online education, and particularly to a method and system for intelligent student identity recognition that combines OCR text recognition with AI visual models as a backup in scenarios involving batch uploading and continuous scanning of assignment images. Background Technology

[0002] With the continuous advancement of smart campus construction and the popularization of online homework grading systems, the digital collection of paper-based homework has become a high-frequency core part of daily teaching in primary and secondary schools. Teachers need to collect dozens to hundreds of paper-based assignments daily, uploading them in batches to the online grading platform by taking photos. The efficiency of automatically associating student identities directly determines the processing time of the entire homework grading process and also directly impacts teachers' daily workload. Currently, most mainstream student identification solutions rely on single optical character recognition (OCR) technology, directly performing full-image OCR recognition on the entire homework image to extract name and student ID information, and then performing simple string matching with the class roster. This type of solution exposes many technical shortcomings in actual teaching scenarios: Pure OCR recognition lacks robustness and has low accuracy in complex scenarios. The recognition of handwritten names and student IDs is affected by multiple factors: students' handwriting varies greatly, and younger students' handwriting is not yet fully developed, often showing cursive writing, corrections, and uneven spacing; teachers' photography is affected by uneven classroom lighting, hand tremors, and tilted shooting angles, often resulting in blurry, distorted, and shadowed images; some assignments lack fixed filling areas, and the positions of names and student IDs are inconsistent, making it easy for full-image OCR to mix in noisy content such as question text and class annotations, further reducing recognition accuracy. According to statistics from actual teaching scenarios, the pure OCR solution has an accuracy rate of only 70%-80% in ordinary handwritten assignment scenarios. The remaining 20%-30% of images require teachers to manually search for and associate students from the roster. In scenarios involving the batch upload of 40-50 assignments from the entire class, manual correction can take 5-10 minutes, severely reducing teaching processing efficiency.

[0003] The existing solutions suffer from a crude confidence assessment system and a lack of a tiered decision-making mechanism. They typically only output an overall confidence score for the OCR recognition results, failing to differentiate the confidence levels of student ID numbers versus handwritten Chinese characters in names. In real-world scenarios, student IDs are standardized numerical sequences, and their OCR accuracy is generally higher than that of handwritten Chinese names. However, existing solutions do not assign differentiated confidence values ​​to these two types of fields, nor do they design tiered matching strategies based on field confidence levels. When student IDs are accurately recognized but names are ambiguous, they cannot prioritize matching based on high-confidence student IDs; similarly, when names are accurately recognized but student IDs are missing, they cannot perform downgraded matching based on names. This results in a large number of results that could be automatically matched being deemed recognition failures, leading to insufficient automation. Furthermore, existing solutions lack tiered decision-making logic, either relying entirely on automatic uploading, resulting in a high mismatch rate, or relying entirely on manual confirmation, leading to inefficiency. They fail to achieve a reasonable balance between accuracy and processing efficiency.

[0004] The existing roster matching strategy is simplistic, with insufficient error tolerance and feature utilization. Most roster matching methods rely on simple, precise string comparison, resulting in extremely poor error tolerance. Common OCR errors such as similar-looking characters, numeric character confusion, and missing class prefixes in student IDs cannot be accurately matched to identify students. Furthermore, current solutions fail to utilize the physical spatial features of the assignment page. Student ID and name fields typically exhibit a fixed left-right adjacency in the assignment header; this spatial association can effectively filter noisy recognition results, but current technologies do not incorporate it into the matching logic. Additionally, students in the same class usually share a consistent class prefix in their student IDs. This pattern can be used for short ID completion and abnormal ID filtering, but current matching algorithms do not exploit the structured features of such class rosters, limiting the improvement in matching accuracy.

[0005] The lack of a cost-controllable intelligent fallback mechanism and poor adaptability to continuous scanning are issues. Existing solutions attempt to introduce AI visual models to improve recognition rates, but they generally adopt a full-scale call model, where each assignment image simultaneously calls both OCR and AI models. This not only wastes significant computing resources but also keeps API call costs high, making large-scale deployment difficult in budget-constrained scenarios such as public schools. Furthermore, existing solutions lack a mechanism for fusing and verifying OCR and AI results. AI recognition results directly replace OCR output, lacking secondary verification steps such as student ID prefix verification and name validity checks, posing a risk of direct AI misidentification and output. In addition, for continuous scanning scenarios where teachers take and upload images one by one, existing solutions lack a mechanism to prevent duplicate calls. Multiple assignment photos of the same student will repeatedly trigger AI recognition, further exacerbating cost waste. Moreover, the lack of automatic front-end processing of recognition results results in a fragmented continuous shooting experience.

[0006] Based on existing technology searches, most publicly available technical solutions focus on optimizing single OCR recognition or improving simple string matching algorithms. No complete student identity recognition technical solution combining "dual ROI slice OCR + multi-level roster matching cascade + hierarchical confidence decision + AI visual conditional trigger fallback + intelligent skip cost control" has been found. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a student identity intelligent recognition method and system based on OCR and AI vision as a backup, solving the following technical problems: 1. In scenarios where OCR recognition fails or has low confidence, an AI visual model is invoked as a fallback in a conditionally triggered manner, improving the overall recognition rate to nearly 100%, while controlling API call costs through an intelligent skip strategy.

[0008] 2. Establish a three-tiered confidence system consisting of field layer, method layer, and decision layer to implement differentiated confidence assessment and matching strategies for student ID and name fields.

[0009] 3. Construct a multi-strategy cascade for roster matching, and improve the matching accuracy of OCR results by utilizing spatial relationships, class and student ID prefix patterns, and similar-looking and homophonous error correction mechanisms.

[0010] 4. Enable multi-dimensional verification and result fusion of AI results, while adapting to continuous scanning and batch uploading scenarios, balancing automation efficiency and recognition accuracy.

[0011] To achieve the above objectives, the present invention provides the following technical solution: A student identity intelligent recognition method based on OCR and AI vision as a backup includes the following steps: S1: Perform ROI region analysis on the assignment image. If a template exists, crop the double ROI slices of student ID and name according to the template definition. If no template exists, perform intelligent top cropping to obtain the recognition area. After preprocessing the ROI image, output it to the OCR engine. S2: The OCR engine is used to independently recognize the ROIs of student ID and name, outputting the text of student ID, the text of name field and the confidence score of the corresponding field, and performing character normalization processing; S3: Perform multi-strategy matching concatenation between the OCR recognition results and the class roster, and try multi-level strategies such as spatial location joint matching, student ID precise matching, student ID prefix expansion matching, and name fuzzy matching in order of priority, and generate a candidate list by weighted sorting according to confidence. S4: Construct a three-level hierarchical confidence system consisting of field layer, method layer, and decision layer. Assign method confidence based on matching strategy, determine whether manual confirmation is required by combining automatic upload threshold, and set AI fallback trigger confidence threshold. S5: When the three triggering conditions of substandard OCR recognition effect, no valid candidates, and no repeated recognition within the set time are met, and the rules of successful OCR skipping and candidate list skipping are not met, the AI ​​vision model is called to perform secondary recognition. After multi-dimensional verification of the AI ​​result, it is fused into the final recognition result. S6: Returns the final recognition result to the front end. High confidence results trigger automatic association and uploading, while low confidence or candidate results trigger manual confirmation, adapting to continuous scanning batch processing scenarios.

[0012] Furthermore, in step S1, the intelligent top cropping specifically involves cropping the area at 28% of the image height and 85% of the image width. The preprocessing includes CLAHE contrast enhancement and minimum height magnification to ensure that the ROI height is not less than 180 pixels.

[0013] Furthermore, the multi-strategy matching cascade in step S3, in descending order of priority, includes: spatial location priority matching, exact matching of student ID, extended matching of student ID and class prefixes, matching of student ID prefixes, matching of student ID inclusion, exact matching of name, fuzzy matching of name, matching of name inclusion, unique matching of last name, and weighted sorting of candidate list.

[0014] Furthermore, the student ID class prefix extension matching specifically involves inferring the common prefix of the class and the number of digits in the standard student ID based on the student roster, automatically supplementing the prefix of the short student ID output by OCR before performing the matching; the name fuzzy matching calculates the overall similarity of names based on the SequenceMatcher algorithm, which is suitable for handwritten similar-looking character recognition scenarios.

[0015] Furthermore, in the three-level hierarchical confidence system of step S4, the field layer outputs the OCR recognition confidence of student ID and name respectively, the method layer assigns corresponding confidence based on different matching strategies, the decision layer sets the automatic upload confidence threshold to 0.85, the AI ​​fallback trigger confidence threshold to 0.9, and forces manual confirmation when there is a conflict between student ID and name.

[0016] Furthermore, the three triggering conditions for AI vision fallback in step S5 are as follows: OCR matching fails or the final comprehensive confidence level is lower than the trigger threshold or there is a conflict between student ID and name, no valid candidate student matching results, and the student has not been successfully identified within ten seconds.

[0017] Furthermore, the conditions for skipping the AI ​​call in step S5 include: the OCR has successfully matched and the matching confidence is not lower than 0.85 and there is no conflict between student ID and name; the name confidence reaches the set threshold and a non-empty candidate list has been generated; and the same student has been successfully identified within the set time period.

[0018] Furthermore, the multi-dimensional verification of the AI ​​results in step S5 includes student ID normalization, class prefix filtering verification, and name overlap detection. When the recognition is successful, the corresponding recognition method is marked and the original OCR result is retained as a prompt. When the recognition is blurry, multiple candidates are returned. When the recognition fails, the original OCR result is returned in a non-blocking downgrade manner.

[0019] A student identity intelligent recognition system based on OCR and AI vision as a backup includes: The ROI parsing module is used to extract student information recognition regions and perform image preprocessing based on template configuration or intelligent cropping rules; The OCR extraction module is used to perform independent recognition of the student ID and name areas, and output the field text and corresponding confidence scores; The roster matching module is used to perform multi-strategy matching cascades and generate a weighted sorted list of candidate students; The stratified confidence assessment module is used to construct a three-level confidence system and complete the hierarchical judgment through automatic uploading and manual confirmation. The AI ​​vision fallback module is used to call the vision model based on trigger and skip rules, and to perform result verification and fusion. The results output module is used to return the recognition results to the front end, adapting to automatic uploading and manual confirmation interaction in continuous scanning scenarios.

[0020] Furthermore, the AI ​​vision fallback module reads the layered configuration specifically for student information recognition, calls the multimodal visual large language model, and supports hot model switching and parameter tuning.

[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. Significantly improved recognition rate: Adopting a dual-engine architecture of OCR priority + AI vision as a backup, it covers complex scenarios such as blurry handwriting and tilted shooting, with an overall recognition success rate of nearly 100%.

[0022] 2. Controllable call costs: AI intelligent scheduling is achieved through triple trigger conditions and multiple skip rules, and the fallback model is called only when OCR cannot effectively recognize the data, avoiding unnecessary API calls and significantly reducing operating costs.

[0023] 3. High matching accuracy: The 10-level student roster matching cascade combines multiple strategies such as spatial location, prefix expansion, and fuzzy similarity, along with joint verification of student ID and name, class prefix filtering, and name overlap detection mechanisms, which significantly reduces the probability of false matches.

[0024] 4. High batch processing efficiency: Adaptable to continuous scanning scenarios, high-confidence results are automatically uploaded, and low-confidence results are manually confirmed, balancing automation efficiency and recognition accuracy, and greatly improving the efficiency of teachers uploading batch assignments.

[0025] 5. Highly scalable architecture: The AI ​​model is managed uniformly through layered configuration, supports hot switching and parameter tuning, and can flexibly adapt to the recognition needs of different grades and different types of assignments. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating the overall student identification process of this invention. Figure 2 This is a flowchart illustrating the hierarchical confidence decision-making process of the present invention. Figure 3 This is the AI ​​vision fallback trigger and skip logic diagram for this invention; Figure 4 This is a flowchart of the dual ROI slicing and OCR extraction process of the present invention; Figure 5 This is a sequence diagram of the continuous scanning front-end interaction of the present invention; Figure 6 This invention relates to a multi-level roster matching cascaded decision tree. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0028] This invention proposes a student identity intelligent recognition method based on OCR and AI vision as a backup, comprising the following steps: S1: ROI Region Detection and Dual-Track Slicing Preprocessing The system prioritizes reading the preset student information area configuration in the assignment template. If a template exists, it crops the student ID area ROI and the name area ROI according to the defined rectangular coordinates, forming independent slices of the two ROIs. If no template exists, it performs intelligent top cropping, extracting the top 28% height and 85% width of the image as the recognition ROI. The cropped ROI image is then subjected to CLAHE contrast enhancement and minimum height magnification processing to ensure that the ROI height is not less than 180px, thereby improving the quality of subsequent OCR input. S2: PaddleOCR Dual-Field Independent Recognition The student ID ROI and name ROI are input into the PaddleOCR engine for independent recognition, outputting the student ID text, name field text, and the corresponding student_id_confidence and name_confidence confidence scores. During recognition, character normalization is performed, correcting easily confused characters, including replacing the character 'O' with '0' and the character 'l' with '1'. Student ID information is extracted using regular expressions, matching the tags "student ID:", "username:", and numeric student ID patterns. Name extraction prioritizes matching the "name:" tag; if no tag is found, 2-4 Chinese characters are extracted, and noisy text such as titles is filtered out. S3: Multi-strategy roster matching cascade The 10-level matching strategy is executed sequentially from highest to lowest priority to match the OCR recognition results with the class roster, and the candidate list is output after being weighted by confidence level. Spatial location priority matching: After identifying the student ID, based on the physical spatial location of the student ID area, the name information is extracted first from the area to its right for joint matching; Exact match for student ID: The OCR student ID matches the student ID in the roster exactly, with a match confidence score of 0.90. Student ID and class prefix extension matching: Based on the student roster, infer the common prefix of the class and the number of digits of the standard student ID, and automatically supplement the prefix of the short student ID in the OCR output before matching; Student ID prefix matching: OCR student IDs are matched with the prefix portion of the student IDs in the student roster as a fallback matching scheme; Student ID inclusion matching: The OCR student IDs and the student IDs in the roster have an inclusion relationship, which is used as a downgraded matching scheme; Exact Name Match: OCR shows that the names match the student names exactly as listed in the roster. Name fuzzy matching: Calculates the overall similarity of names based on the SequenceMatcher algorithm, with a confidence score of 0.75, suitable for handwritten similar-looking characters. Name inclusion matching: OCR names contain names that are included in the roster, which is used as a fallback matching scheme; Unique surname match: Candidates are generated only when the surname matches and is unique within the class; Candidate list generation: Summarize all matching results, sort them by priority and confidence, and output a maximum of 20 candidate students; S4: Hierarchical confidence assignment and automatic upload determination Construct a three-level confidence decision-making system: field layer - method layer - decision layer. Field layer: Outputs the OCR recognition confidence scores for student ID and name respectively; Method layer: Assign corresponding method confidence scores to the results according to the matching strategy, where the confidence score for original text space matching is 0.98, the confidence score for exact matching of student ID is 0.95, the confidence score for exact matching of name is 0.90, the confidence score for joint prefix matching is 0.85-0.88, and the confidence score for fuzzy matching is 0.70. Decision-making level: Set the automatic upload confidence threshold to 0.85. When the overall confidence level is ≥0.85 and there are no student ID / name conflicts, the tag does not require manual confirmation and supports automatic upload; when the overall confidence level is <0.85, or when there are student ID / name conflicts where the student ID matches but the name matching score is below 50, the tag requires manual confirmation; set the AI ​​fallback trigger confidence threshold to 0.9. When the overall confidence level is <0.9, it is eligible for AI triggering. S5: AI Vision Last-Choice Trigger and Verification AI vision fallback requires three triggering conditions to be met simultaneously, and the skip rule must not be triggered: Triggering condition 1: OCR matching fails, or the final overall confidence score is <0.9, or there is a conflict between student ID and name; Triggering condition 2: No valid candidate student matching results; Trigger condition 3: The student has not been successfully identified within 10 seconds to avoid duplicate calls. The AI ​​call will be skipped and cost control will be implemented if any of the following conditions are met: The OCR has been successfully matched with a confidence level of ≥0.85, and there are no conflicts between student IDs and names. Names with a confidence level ≥ 0.85 and a non-empty candidate list has been generated are submitted for manual confirmation; The same student has been successfully identified within 10 seconds.

[0029] AI fallback execution process: Read the layered AI configuration specifically for student information recognition, call the multimodal visual large language model, input the ROI image and OCR recognition prompts; after the model returns structured student ID and name results, perform student ID normalization, class prefix filtering verification, and name overlap detection sequentially; when recognition is successful, mark the recognition method as ai_vision_fallback, while retaining the original OCR result as a prompt; when recognition is blurry, return the Top 5 candidates, mark them as blurry fallback, and assign a confidence value of 0.6; when recognition fails or the model malfunctions, non-blocking degradation returns the original OCR result; S6: Front-end continuous scanning linkage The front-end continuous scanning component aligns with the back-end recognition rules. Recognition results with a confidence level ≥ 0.85 are automatically associated with student identities and uploaded without manual confirmation from teachers. In scenarios with low confidence results or candidate lists, a confirmation panel pops up, allowing teachers to select and correct. When both student ID and name fail to match, a list of all students in the class is returned for manual selection. During continuous scanning, each photo takes a picture and executes the complete recognition process independently. When OCR recognition is successful, AI calls are automatically skipped, enabling efficient batch processing.

[0030] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0031] System Architecture: The student identity intelligent recognition system of this invention adopts a modular and layered architecture, with each module having clear responsibilities, low coupling, and high cohesion, supporting independent iteration and expansion. Specifically, it includes the following functional modules: ROI parsing module: responsible for receiving the original assignment image, extracting the student information recognition area according to the template configuration or intelligent cropping rules, and simultaneously performing image preprocessing operations such as contrast enhancement and size normalization; OCR Extraction Module: Based on the PaddleOCR engine, it independently recognizes the student ID and name fields, outputs the text content of the fields and the corresponding field-level confidence scores, and has built-in character normalization and noise filtering logic; Multi-strategy matching cascade module: Executes 10 levels of roster matching strategies in sequence according to preset priority, and combines the basic algorithm capabilities of the matching tool library to complete the confidence-weighted sorting of candidate results; Hierarchical confidence assessment module: Integrated into the entire matching process, it is responsible for completing the three-level confidence calculation of the field layer, method layer, and decision layer, and outputting three types of decision results: automatic upload, manual confirmation, and AI trigger. AI Vision Backup Module: Responsible for determining conditions based on triggering and skipping rules, compliantly calling multimodal vision models, and performing multi-dimensional verification and result fusion of execution results; Matching Tool Library: Provides basic algorithm capabilities such as student ID normalization, class prefix expansion, string fuzzy similarity calculation, and candidate list generation, providing underlying support for the matching cascade module and the AI ​​fallback module; API Interface Module: Provides a standardized recognition service entry point, receives parameters such as homework images, class ID, and template ID uploaded from the front end, schedules the entire recognition process, and encapsulates the final result to return to the front end.

[0032] During system operation, after receiving a request from the front end, the API interface module first calls the ROI parsing module to complete image cropping and preprocessing, and then passes the ROI slices to the OCR extraction module to obtain the recognition results. The recognition results and the corresponding class roster are simultaneously passed to the multi-strategy matching cascade module to complete multi-level matching. During the matching process, the hierarchical confidence assessment module calculates the confidence level in real time and outputs the decision. If the AI ​​triggering conditions are met, the AI ​​vision fallback module is called to perform secondary recognition and verification. Finally, all results are uniformly encapsulated and returned by the API interface module, and the full-link recognition log is synchronously stored in the database for subsequent effect optimization and cost statistics.

[0033] Example 1: High-confidence automatic recognition of scenarios using OCR A teacher uses continuous scanning to photograph students' homework. After acquiring the images, the system detects a pre-defined answer sheet template. This template pre-defines the precise rectangular coordinates of the student ID and name regions. The ROI parsing module crops the student ID and name ROIs according to the template coordinates. After cropping, it automatically performs CLAHE contrast enhancement and minimum height magnification processing, uniformly enlarging the ROI height to over 180 pixels to ensure consistency in OCR input.

[0034] The two ROIs were input into the PaddleOCR engine for independent recognition, outputting student ID 20237380123 with a field confidence score of 0.96; and name Yang Caixuan with a field confidence score of 0.93. During the recognition process, character normalization was automatically performed, converting easily confused similar characters into standard numbers and Chinese characters.

[0035] When performing roster matching, the student ID precise matching strategy is triggered first. The OCR student ID is completely consistent with 20237380123 in the roster, and the method layer confidence is assigned a value of 0.95. At the same time, the similarity between the name recognition result and the corresponding student name is checked. There is no conflict between student ID and name, and the overall confidence is higher than the automatic upload threshold of 0.85.

[0036] The system determines that the OCR recognition was successful and the confidence level met the criteria, thus hitting the AI ​​skip rule and not calling the AI ​​vision model. Finally, it returns a successful recognition result to the front end, marking the recognition method as exact matching of student ID. No manual confirmation is required; the front end automatically associates the corresponding student identity and completes the assignment image upload.

[0037] Example 2: AI Vision Backup Correction Scenario The teacher takes a picture of a handwritten assignment with messy handwriting. The assignment has no preset template. The ROI analysis module first identifies the boundaries of the assignment paper through edge detection, removes redundant background areas, and then performs intelligent top cropping, cropping the top 28% of the image height and 85% of the width as the ROI for recognition, effectively eliminating interference from the question content below.

[0038] The OCR system outputs student ID 2023749 and name Yang Caixiu, with a field confidence level of only 0.62. After performing multi-level matching, no high-confidence matching results were found. The overall confidence level is lower than the AI ​​trigger threshold of 0.9, and there is no valid candidate list. The system query confirmed in the recognition log that the student had not been recognized within 10 seconds, thus meeting all three AI trigger conditions.

[0039] A multimodal visual language model is invoked for fallback recognition. During the invocation, the raw results of the OCR recognition are passed to the model as prompts, guiding it to focus on character correction in the corresponding regions. The model returns student ID 2023738 and name Yang Caixuan. The system then sequentially performs student ID normalization, class prefix filtering and verification, and calculates the common prefixes of all student IDs in the current class to confirm that the AI-returned student ID prefix matching degree meets the requirements. Next, name overlap detection is performed to confirm that the character matching degree meets the requirements and matches 2023738 / Yang Caixuan in the roster.

[0040] The identification method used is ai_vision_fallback, and the original OCR result is retained as the ocr_hint field. A comprehensive confidence score is used to determine if the criteria are met. Finally, a successful identification result is returned to the front-end, which automatically associates the student and completes the assignment upload.

[0041] Example 3: Manual Confirmation Scenario for Candidate List The OCR outputs the name Wang Daming with a field confidence score of 0.78, but no valid student ID information was detected. When performing roster matching, the system sequentially triggers fuzzy name matching and name inclusion matching strategies, calculates name similarity based on the SequenceMatcher algorithm, and generates a candidate list ["Wang Xiaoming", "Wang Tianming", "Li Daming"]. The candidate list is not empty and contains 3 students.

[0042] The system determined that the name confidence level did not reach the automatic upload threshold of 0.85, but there was a valid candidate list. This met the AI ​​skip rule, so the AI ​​visual model was not called to avoid unnecessary API calls.

[0043] Finally, the system returns a candidate list and a low-confidence flag to the front end, with the need_confirmation field set to true. The front end then pops up a candidate confirmation panel, displaying the names and student IDs of three candidate students for the teacher to select. After the teacher selects the corresponding student, the system completes the student identity association and assignment upload.

[0044] Example 4: Continuous Scanning Batch Processing Scenario A class has 45 students. The teacher starts a continuous scanning mode and takes photos of all the students' homework in turn. The front end submits a recognition request to the back end asynchronously after each photo is taken, without waiting for the previous photo to be processed.

[0045] During the processing, 38 assignment images achieved a confidence level of over 0.85 through OCR recognition and multi-level matching, automatically completing student association and uploading without any human intervention. Five assignments had low confidence in OCR recognition and no candidates due to illegible handwriting. After meeting the trigger conditions, AI vision was used as a fallback, and the assignments were eventually successfully recognized and uploaded automatically. Two assignments generated candidate lists due to highly similar names, awaiting manual confirmation by teachers.

[0046] Meanwhile, one student submitted a two-page assignment with only a six-second interval between the two photos. The first page failed to be recognized by OCR, triggering AI fallback and successfully recognizing the student. The system recorded the student's successful recognition timestamp. The second page also had low confidence in OCR, but the system detected that the student had been successfully recognized within 10 seconds, directly triggering the AI ​​skip rule and reusing the previous recognition result to complete the association, avoiding repeated calls to the AI ​​interface.

[0047] The entire batch of assignments takes about 2 minutes to process. Teachers only need to manually confirm 2 assignments. The overall automation rate is over 95%, which is more than 4 times more efficient than the traditional pure OCR solution. At the same time, the amount of AI calls accounts for only 11% of the total number of images, effectively controlling the operating cost.

[0048] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications or equivalent substitutions based on the technical solutions of the present invention without departing from the core ideas of the present invention shall fall within the protection scope of the present invention.

Claims

1. A student identity intelligent recognition method based on OCR and AI vision as a backup, characterized in that, Includes the following steps: S1: Perform ROI region analysis on the assignment image. If a template exists, crop the double ROI slices of student ID and name according to the template definition. If no template exists, perform intelligent top cropping to obtain the recognition area. After preprocessing the ROI image, output it to the OCR engine. S2: The OCR engine is used to independently recognize the ROIs of student ID and name, outputting the text of student ID, the text of name field and the confidence score of corresponding fields, and performing character normalization processing; S3: Perform multi-strategy matching concatenation between the OCR recognition results and the class roster, and try multi-level strategies such as spatial location joint matching, student ID precise matching, student ID prefix expansion matching, and name fuzzy matching in order of priority, and generate a candidate list by weighted sorting according to confidence. S4: Construct a three-level hierarchical confidence system consisting of field layer, method layer, and decision layer. Assign method confidence based on matching strategy, determine whether manual confirmation is required by combining automatic upload threshold, and set AI fallback trigger confidence threshold. S5: When the three triggering conditions of substandard OCR recognition effect, no valid candidates, and no repeated recognition within the set time are met, and the rules of successful OCR skipping and candidate list skipping are not met, the AI ​​vision model is called to perform secondary recognition. After multi-dimensional verification of the AI ​​result, it is fused into the final recognition result. S6: Returns the final recognition result to the front end. High confidence results trigger automatic association and uploading, while low confidence or candidate results trigger manual confirmation, adapting to continuous scanning batch processing scenarios.

2. The student identity intelligent recognition method based on OCR and AI vision as a fallback as described in claim 1, characterized in that, In step S1, intelligent top cropping specifically involves cropping the area at 28% of the image height and 85% of the image width. Preprocessing includes CLAHE contrast enhancement and minimum height magnification to ensure that the ROI height is not less than 180 pixels.

3. The student identity intelligent recognition method based on OCR and AI vision as a fallback as described in claim 1, characterized in that, The multi-strategy matching cascade in step S3, ranked from highest to lowest priority, includes: spatial location priority matching, exact matching of student ID, extended matching of student ID and class prefixes, matching of student ID prefixes, matching of student ID inclusion, exact matching of name, fuzzy matching of name, matching of name inclusion, unique matching of last name, and weighted sorting of candidate list.

4. The student identity intelligent recognition method based on OCR and AI vision as a fallback as described in claim 3, characterized in that, The student ID and class prefix extension matching specifically involves inferring the common prefix of the class and the number of digits in the standard student ID based on the student roster, automatically supplementing the prefix of the short student ID output by OCR before performing the matching; the name fuzzy matching calculates the overall similarity of names based on the SequenceMatcher algorithm, which is suitable for handwritten similar-looking character recognition scenarios.

5. The student identity intelligent recognition method based on OCR and AI vision as a backup, as described in claim 1, is characterized in that... In the three-level hierarchical confidence system of step S4, the field layer outputs the OCR recognition confidence of student ID and name respectively, the method layer assigns the corresponding confidence according to different matching strategies, the decision layer sets the automatic upload confidence threshold to 0.85, the AI ​​fallback trigger confidence threshold to 0.9, and when there is a conflict between student ID and name, it is forcibly marked as requiring manual confirmation.

6. The student identity intelligent recognition method based on OCR and AI vision as a fallback as described in claim 1, characterized in that, The three triggering conditions for AI vision fallback in step S5 are as follows: OCR matching fails or the final comprehensive confidence level is lower than the trigger threshold or there is a conflict between student ID and name, no valid candidate student matching results, and the student has not been successfully identified within ten seconds.

7. The student identity intelligent recognition method based on OCR and AI vision as a backup, as described in claim 1, is characterized in that... The conditions for skipping the AI ​​call in step S5 include: the OCR has successfully matched and the matching confidence is not lower than 0.85 and there is no conflict between student ID and name; the name confidence reaches the set threshold and a non-empty candidate list has been generated; and the same student has been successfully identified within the set time period.

8. The student identity intelligent recognition method based on OCR and AI vision as a fallback as described in claim 1, characterized in that, In step S5, the multi-dimensional verification of the AI ​​results includes student ID normalization, class prefix filtering verification, and name overlap detection. When the recognition is successful, the corresponding recognition method is marked and the original OCR result is retained as a prompt. When the recognition is blurry, multiple candidates are returned. When the recognition fails, the original OCR result is returned in a non-blocking downgrade manner.

9. A student identity intelligent recognition system based on OCR and AI vision as a backup, characterized in that, include: The ROI parsing module is used to extract student information recognition regions and perform image preprocessing based on template configuration or intelligent cropping rules; The OCR extraction module is used to perform independent recognition of the student ID and name areas, and output the field text and corresponding confidence scores; The roster matching module is used to perform multi-strategy matching cascades and generate a weighted sorted list of candidate students; The stratified confidence assessment module is used to construct a three-level confidence system and complete the hierarchical judgment through automatic uploading and manual confirmation. The AI ​​vision fallback module is used to call the vision model based on trigger and skip rules, and to perform result verification and fusion. The results output module is used to return the recognition results to the front end, adapting to automatic uploading and manual confirmation interaction in continuous scanning scenarios.

10. The student identity intelligent recognition system according to claim 9, characterized in that, The AI ​​vision fallback module reads the layered configuration specifically for student information recognition, calls the multimodal visual large language model, and supports hot model switching and parameter tuning.