Method and device for synchronously printing examinee information of test paper and packaging bag

By generating simultaneous printing tasks for exam papers and packaging bags and comparing image features, the problem of not being able to identify errors in the actual printed content in existing technologies has been solved, achieving highly accurate matching between exam papers and packaging bags and ensuring the fairness of the examination.

CN122023385APending Publication Date: 2026-05-12CHONGQING FARSIGHT PRINTING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610335940.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies that rely solely on barcode matching cannot identify errors in the actual printed content of the exam paper and its packaging, thus affecting the fairness and impartiality of the exam.

Method used

By generating a first printing task and a second printing task, which are used for printing test papers and packaging bags respectively, the measured image feature vectors are obtained and compared with a standard feature set to realize the comprehensive image matching degree calculation of test papers and packaging bags, ensuring the identification and interception of content-level errors.

Benefits of technology

This significantly improves the accuracy of matching test papers with packaging bags, avoids content-level errors caused by data transmission mistakes, and ensures the fairness and impartiality of the examination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023385A_ABST
    Figure CN122023385A_ABST
Patent Text Reader

Abstract

The invention discloses a synchronous examinee information printing method and device for test paper and packaging bags, and relates to the technical field of production and printing. Obtaining identity information of the examinee to determine examination question information, and generating a first printing task and a second printing task according to the identity information and the examination question information; controlling the first printing equipment and the second printing equipment to execute the first printing task and the second printing task so as to obtain a target test paper and a target packaging bag, conveying the target test paper and the target packaging bag to a preset rechecking position, and extracting an actually measured full image of the target test paper to obtain an actually measured feature vector group; calculating the actually measured feature vector group and the standard image feature set to obtain a comprehensive image matching degree; if the comprehensive image matching degree is greater than or equal to a preset matching threshold value, generating a packaging instruction, loading the target test paper into a target packaging bag, and sealing; and if the comprehensive image matching degree is smaller than a preset matching threshold value, generating an exception processing signal. By implementing the method, the matching accuracy of the test paper and the packaging bag is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of production and printing technology, specifically to a method and apparatus for simultaneously printing candidate information on exam papers and packaging bags. Background Technology

[0002] Postgraduate entrance examinations are characterized by their large scale, numerous subjects, and high confidentiality requirements. Unlike general examinations, postgraduate candidates in the same examination room often come from different universities and majors, resulting in a wide variety of exam papers and a high degree of personalization. Therefore, ensuring accurate matching of exam content with candidate identity information during the exam paper production process, and guaranteeing that each candidate receives a flawless exam paper for their corresponding subject, is a crucial step in ensuring the fairness and smooth conduct of the examination.

[0003] Existing production of exam papers and exam paper bags typically employs automated production lines. A step-by-step production model is generally used: first, exam papers are printed in batches according to subject, while exam paper bags containing student information are printed independently. In the subsequent packaging stage, the production line equipment uses industrial cameras or barcode scanners to read the barcodes on the exam papers and the identification codes on the exam paper bags. A back-end system performs logical comparisons of the read barcode information. When the barcodes match, the system controls the mechanical device to pack the exam papers into the corresponding exam paper bags, thus completing the automated matching and packaging process.

[0004] However, the biggest drawback of the aforementioned existing technologies is that they can only confirm the matching of "codes," but cannot substantially verify the "actual printed content" of the exam paper. If data transmission errors occur during the printing process, resulting in a discrepancy between the barcode and the content on the exam paper, simple barcode scanning verification cannot identify such content-level errors. Once such errors occur, they may prevent candidates from taking the exam normally, seriously affecting the fairness and impartiality of the exam and causing significant damage to the credibility of the exam organization. Summary of the Invention

[0005] This application provides a method and apparatus for synchronously printing candidate information on exam papers and packaging bags. This method solves the problem in the prior art that relying solely on barcode matching cannot detect errors in the actual printed content, thereby improving the accuracy of matching exam papers and packaging bags.

[0006] In a first aspect, this application provides a method for simultaneously printing candidate information on examination papers and packaging bags. The method includes: responding to a production instruction, obtaining application information corresponding to the candidate's identity information; determining examination question information based on the application information; generating a first printing task and a second printing task based on the candidate's identity information and the examination question information; the first printing task is used to print examination papers containing examination question information, and the second printing task is used to print the candidate's identity information on the packaging bag; generating a corresponding standard image feature set based on the digital layout information of the first printing task, and associating the standard image feature set with the candidate's identity information; controlling a first printing device to execute the first printing task to obtain the target examination paper, and controlling a second printing device to execute the second printing task to obtain the target examination paper. The system retrieves the target packaging bag and transports both the target exam paper and the target packaging bag to a preset verification position. After confirming that the target exam paper and the target packaging bag are in the preset verification position, it acquires a measured full-frame image of the target exam paper and identifies the identification information on the target packaging bag. Based on the identification information, it retrieves the corresponding standard image feature set and extracts features from the measured full-frame image to obtain a measured feature vector set. It compares and calculates the measured feature vector set with the standard image feature set to obtain a comprehensive image matching degree. If the comprehensive image matching degree is greater than or equal to a preset matching threshold, it generates a packaging command to control the packaging equipment to pack the target exam paper into the target packaging bag and seal it. If the comprehensive image matching degree is less than the preset matching threshold, it generates an anomaly processing signal.

[0007] By adopting the above technical solution, a first printing task and a second printing task are generated simultaneously based on the examinee's identity information and application information. A standard image feature set is pre-generated based on the digital layout information of the first printing task. After the first and second printing devices execute the printing tasks respectively, the target test paper and the target packaging bag are transported to the preset verification position, achieving synchronous convergence at the physical level. The measured full-size image of the target test paper is acquired and the identity identification information on the target packaging bag is identified. The corresponding standard image feature set is retrieved through the identity identification information, and the measured full-size image is used to extract features to obtain a measured feature vector group. The measured feature vector group is compared with the standard image feature set to calculate the comprehensive image matching degree. When the comprehensive image matching degree reaches the preset matching threshold, a packaging instruction is generated to complete the automatic packaging. When the comprehensive image matching degree is lower than the preset matching threshold, an abnormal processing signal is generated to intercept the error. This effectively identifies content-level errors such as data transmission errors that cause discrepancies between the barcode and the test paper content. This solves the technical problem in the prior art that relying solely on barcode matching cannot detect errors in the actual printed content, and significantly improves the accuracy of matching the test paper and the packaging bag.

[0008] Optionally, feature extraction is performed on the measured full-frame image to obtain a measured feature vector set. Specifically, this includes: identifying all independent pixel connected regions in the measured full-frame image and calculating the bounding box of each independent pixel connected region; obtaining the centroid coordinates, area ratio, and aspect ratio of the bounding box; arranging the centroid coordinates, area ratio, and aspect ratio of all independent pixel connected regions in a preset order to obtain topological geometric features, and using the topological geometric features as macroscopic layout data; dividing the measured full-frame image based on preset sampling rules to obtain multiple local verification regions; extracting image texture features from each local verification region and using the image texture features as local texture fingerprint data; parsing the digital layout file corresponding to the first printing task to obtain the preset coordinate range of the examinee's identity information in the digital layout file; mapping the preset coordinate range to the measured full-frame image to obtain the region of interest; performing optical character recognition on the region of interest to obtain key region semantic data; and normalizing and splicing the macroscopic layout data, local texture fingerprint data, and key region semantic data to obtain the measured feature vector set.

[0009] By adopting the above technical solution, all independent pixel connected regions in the measured full-frame image are identified and the bounding box is calculated. Topological geometric features such as centroid coordinates, area ratio, and aspect ratio are obtained as macroscopic layout data. Based on preset sampling rules, the measured full-frame image is divided into multiple local verification regions and image texture features are extracted as local texture fingerprint data, realizing refined verification of local details of the test paper. By parsing the digital layout file corresponding to the first printing task, the preset coordinate range of the examinee's identity information is obtained, which is mapped to the measured full-frame image to obtain the region of interest and optical character recognition is performed to obtain semantic data of key regions, realizing semantic-level verification of specific information of examinees. The macroscopic layout data, local texture fingerprint data, and key region semantic data are normalized and spliced ​​to obtain the measured feature vector group, which has stronger accuracy than the single-dimensional feature extraction method and ensures the reliability of content-level verification.

[0010] Optionally, the measured full-frame image is divided based on preset sampling rules to obtain multiple local verification regions. Specifically, this includes: parsing the digital layout information of the first printing task, extracting high-frequency vector primitives from the digital layout information, constructing a virtual grid layer based on the distribution density of the high-frequency vector primitives, and calculating the information entropy weight of each grid unit; generating a dynamic pseudo-random sequence based on the information entropy weight, using the dynamic pseudo-random sequence to filter the virtual grid layer to obtain a discrete coordinate point set; mapping the discrete coordinate point set onto the measured full-frame image, and using the mapped points as the center, using a preset irregular polygon window to extract image segments; performing a discrete cosine transform on the extracted image segments, filtering out the DC component, and extracting the intermediate frequency coefficient matrix; performing an inverse transform on the intermediate frequency coefficient matrix to restore it to a spatial domain image, thus obtaining the local verification region after frequency domain filtering.

[0011] By adopting the above technical solution, high-frequency vector primitives are extracted from the digital layout information of the first printing task, and a virtual grid layer is constructed based on the distribution density. This avoids the problem of insufficient coverage of important content in traditional uniform sampling methods. The information entropy weight of each grid unit is calculated to achieve a quantitative assessment of the importance of different regions. A dynamic pseudo-random sequence is generated based on the information entropy weight, and the virtual grid layer is filtered to obtain a discrete coordinate point set. This ensures that the distribution of sampling points matches the importance of the content, and avoids the security risks of regular sampling being easily forged by malicious attacks through pseudo-random characteristics. The discrete coordinate point set is mapped to the measured full-frame image, and image segments are extracted using a preset irregular polygon window centered on the mapped points. The extracted image segments are subjected to discrete cosine transformation, and the DC component is filtered out before extracting the intermediate frequency coefficient matrix. This effectively eliminates the interference of uniform background and overall brightness variation. The intermediate frequency coefficient matrix is ​​inversely transformed to restore the spatial domain image to obtain the local verification area, which retains the texture details that reflect the substantive content. This makes the subsequent texture feature extraction more resistant to illumination changes and color difference interference.

[0012] Optionally, the measured feature vector set is compared with the standard image feature set to obtain the comprehensive image matching degree. Specifically, this includes: obtaining the dimension length of the measured feature vector set; segmenting the measured feature vector set according to the dimension length and concatenation order to obtain a first sub-vector, a second sub-vector, and a third sub-vector; restoring the first sub-vector to measured macroscopic layout data, the second sub-vector to measured local texture fingerprint data, and the third sub-vector to measured key region semantic data; retrieving from the standard image feature set the standard macroscopic layout data corresponding to the measured macroscopic layout data, the standard local texture fingerprint data corresponding to the measured local texture fingerprint data, and the standard key region semantic data corresponding to the measured key region semantic data; extracting the measured centroid coordinate set from the measured macroscopic layout data and the standard centroid coordinate set from the standard macroscopic layout data; calculating the maximum geometric deviation between the measured centroid coordinate set and the standard centroid coordinate set; and then... The data is converted into a measured binary encoded sequence. Standard local texture fingerprint data is converted into a standard binary encoded sequence. A bitwise XOR operation is performed between the binary encoded sequence and the standard binary sequence to obtain the result. The number of targets with binary bits set to 1 in the result is counted, and the number of targets is divided by the total number of bits in the sequence to obtain the logical error rate. The measured key region semantic data is converted into a measured character sequence, and the standard key region semantic data is converted into a standard character sequence. Based on the Levenstein distance algorithm, the minimum number of single-character editing operations required to convert the measured character sequence into a standard character sequence is calculated, and the number of editing operations is used as the character transformation cost. A three-dimensional Cartesian coordinate system is constructed based on the maximum geometric deviation, logical error rate, and character transformation cost, and used as the components of the X-axis, Y-axis, and Z-axis to obtain the difference feature vector. The Euclidean magnitude of the difference feature vector is calculated to obtain the comprehensive difference magnitude. The comprehensive difference magnitude is mapped and calculated based on a preset inverse proportional normalization function to obtain the comprehensive image matching degree.

[0013] By employing the above technical solution, the dimensional length of the measured feature vector group is obtained and segmented into a first sub-vector, a second sub-vector, and a third sub-vector according to the splicing order. These are then respectively restored to measured macroscopic layout data, measured local texture fingerprint data, and measured key region semantic data. After retrieving the corresponding standard macroscopic layout data, standard local texture fingerprint data, and standard key region semantic data from the standard image feature set, the measured centroid coordinate set and the standard centroid coordinate set are extracted, and the maximum geometric deviation is calculated, which can accurately quantify the spatial positional differences of the layout structure. The measured local texture fingerprint data and the standard local texture fingerprint data are then converted into binary codes. The sequence is processed by performing a bitwise XOR operation to count the number of targets and obtain the logical error rate. The character transformation cost is calculated based on the Levenstein distance algorithm between the measured character sequence and the standard character sequence, which can accurately measure the degree of difference in key text content such as candidate identity information. A three-dimensional rectangular coordinate system is constructed based on the maximum geometric deviation, logical error rate and character transformation cost to obtain the difference feature vector, and the Euclidean modulus is calculated to obtain the comprehensive difference modulus. The comprehensive image matching degree is obtained by mapping the comprehensive difference modulus based on the preset inverse proportional normalization function. This realizes the transformation from difference measurement to matching measurement, making the judgment result more intuitive and convenient for setting thresholds for automated decision-making.

[0014] Optionally, the maximum geometric deviation is calculated by examining the measured centroid coordinate set and the standard centroid coordinate set. Specifically, this includes: obtaining the target measured point from the measured centroid coordinate set, where the target measured point is any one of multiple measured coordinate points in the measured centroid coordinate set; calculating the Euclidean distance between the target measured point and each standard coordinate point in the standard centroid coordinate set to obtain the current distance set; selecting the minimum value from the current distance set and using the minimum value as the nearest neighbor matching distance of the target measured point; obtaining the nearest neighbor matching distances corresponding to each measured point in the measured centroid coordinate set and forming a distance sequence from the nearest neighbor matching distances corresponding to each measured point; and selecting the maximum value from the distance sequence and using the maximum value as the maximum geometric deviation.

[0015] By adopting the above technical solution, the target measured points are obtained one by one from the measured centroid coordinate set, and the Euclidean distance between the target measured points and each standard coordinate point in the standard centroid coordinate set is calculated to obtain the current distance set. The minimum value in the current distance set is selected as the nearest neighbor matching distance of the target measured point, which avoids the problem of failure of the simple point-to-point correspondence method when the element order changes. By obtaining the nearest neighbor matching distances corresponding to all measured points in the measured centroid coordinate set to form a distance sequence, the maximum value in the distance sequence is selected as the maximum geometric deviation. Compared with statistical indicators such as average deviation, this can better reflect the most serious abnormal situation and significantly improve the sensitivity to local serious errors.

[0016] Optionally, before acquiring the measured full-frame image of the target test paper and identifying the identification information on the target packaging bag, the method further includes: acquiring the theoretical weight range of the target test paper and acquiring the measured weight value of the target test paper; determining whether the measured weight value is within the theoretical weight range; if the measured weight value is within the theoretical weight range, determining that the physical state of the target test paper is normal, and acquiring the measured full-frame image of the target test paper; if the measured weight value is not within the theoretical weight range, determining that the physical state of the target test paper is abnormal, and generating a weight abnormality processing signal.

[0017] By adopting the above technical solution, before acquiring the measured full-frame image of the target test paper and identifying the identification information on the target packaging bag, the theoretical weight range and measured weight value of the target test paper are obtained, and it is determined whether the measured weight value is within the theoretical weight range. This achieves a rapid initial screening of the physical integrity of the target test paper. When the measured weight value is within the theoretical weight range, the physical state of the target test paper is determined to be normal, and the measured full-frame image is acquired for subsequent image feature comparison. This ensures that the subsequent complex image processing process is only performed on test papers with qualified physical states, effectively avoiding meaningless image analysis operations on obviously abnormal test papers. When the measured weight value is not within the theoretical weight range, the physical state of the target test paper is determined to be abnormal, and a weight abnormality processing signal is generated. This can quickly identify weight deviation problems caused by missing pages or multiple duplicate pages. Weight detection can intercept the abnormal test papers before image acquisition, avoiding the waste of resources caused by abnormal test papers entering subsequent processes.

[0018] Optionally, if the overall image matching degree is less than a preset matching threshold, an anomaly handling signal is generated, specifically including: when the overall image matching degree is less than the preset matching threshold, obtaining the identity code corresponding to the target test paper, storing the identity code and the overall image matching degree in the production log database; determining whether the overall image matching degree is less than a preset serious error threshold, wherein the preset serious error threshold is less than the preset matching threshold; if the overall image matching degree is less than the preset serious error threshold, determining that the identity of the target test paper does not match the identity of the target packaging bag, generating a reprint instruction for the identity code based on the identity mismatch, and printing according to the reprint instruction; if the overall image matching degree is greater than or equal to the preset serious error threshold, generating a manual review prompt signal to prompt the operator to perform a visual inspection of the target test paper.

[0019] By adopting the above technical solution, when the overall image matching degree is less than the preset matching threshold, the identity code corresponding to the target test paper is obtained and the identity code and the overall image matching degree are stored in the production log database. By judging whether the overall image matching degree is less than the preset serious error threshold, when the overall image matching degree is less than the preset serious error threshold, it is determined that the identity of the target test paper and the target packaging bag do not match, and a reprint instruction for the identity code is generated based on the identity mismatch for printing. When the overall image matching degree is greater than or equal to the preset serious error threshold, a manual review prompt signal is generated to prompt the operator to conduct a visual inspection of the target test paper. This dual-threshold hierarchical processing strategy is more flexible and intelligent than the single threshold judgment method, and can adaptively select the optimal processing path according to the severity of the abnormality.

[0020] A second aspect of this application provides a device for synchronously printing candidate information on exam papers and packaging bags. The device includes an acquisition unit, a processing unit, and an evaluation unit. The acquisition unit, in response to a production instruction, acquires the application information corresponding to the candidate's identity information, determines the exam question information based on the application information, and generates a first printing task and a second printing task based on the candidate's identity information and the exam question information. The first printing task is used to print exam papers containing the exam question information, and the second printing task is used to print the candidate's identity information on the packaging bag. The processing unit generates a corresponding standard image feature set based on the digital layout information of the first printing task and associates the standard image feature set with the candidate's identity information. It also controls a first printing device to execute the first printing task to obtain the target exam paper and controls a second printing device. The second printing task is performed to obtain the target packaging bag, and the target test paper and the target packaging bag are transported to the preset verification position. After confirming that the target test paper and the target packaging bag are in the preset verification position, a measured full-size image of the target test paper is acquired, and the identification information on the target packaging bag is identified. According to the identification information, the corresponding standard image feature set is retrieved, and features are extracted from the measured full-size image to obtain a measured feature vector set. The measured feature vector set is compared with the standard image feature set to obtain the comprehensive image matching degree. In the evaluation unit, if the comprehensive image matching degree is greater than or equal to the preset matching threshold, a packaging instruction is generated to control the packaging equipment to put the target test paper into the target packaging bag and seal it. If the comprehensive image matching degree is less than the preset matching threshold, an abnormal processing signal is generated.

[0021] In a third aspect, this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory, causing the electronic device to perform any of the methods described above in this application.

[0022] In a fourth aspect, this application provides a computer-readable storage medium storing instructions that, when executed, perform any of the methods described above in this application.

[0023] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Based on the examinee's identity information and application information, a first printing task and a second printing task are generated synchronously. A standard image feature set is pre-generated based on the digital layout information of the first printing task. After the first and second printing devices execute the printing tasks respectively, the target exam paper and the target packaging bag are transported to the preset verification position, achieving synchronous convergence at the physical level. The measured full-size image of the target exam paper is acquired, and the identity identification information on the target packaging bag is identified. The corresponding standard image feature set is retrieved through the identity identification information, and the measured full-size image is used to extract features to obtain a measured feature vector group. The measured feature vector group is compared with the standard image feature set to calculate the comprehensive image matching degree. When the comprehensive image matching degree reaches the preset matching threshold, a packaging instruction is generated to complete the automatic packaging. When the comprehensive image matching degree is lower than the preset matching threshold, an abnormal processing signal is generated to intercept the error. This effectively identifies content-level errors caused by data transmission errors, such as discrepancies between the barcode and the exam paper content. This solves the technical problem in the prior art that relying solely on barcode matching cannot detect errors in the actual printed content, and significantly improves the accuracy of matching the exam paper and the packaging bag. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating a method for simultaneously printing candidate information on exam papers and packaging bags, as provided in an embodiment of this application. Figure 2 This is a flowchart illustrating a device for synchronously printing candidate information on exam papers and packaging bags, as provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0025] Explanation of reference numerals in the attached drawings: 201, acquisition unit; 202, processing unit; 203, evaluation unit; 300, electronic device; 301, processor; 302, memory; 303, user interface; 304, network interface; 305, communication bus. Detailed Implementation

[0026] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0027] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0028] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0029] Therefore, how to address the current problem of relying solely on barcode matching in existing technologies, which cannot detect errors in the actual printed content, is a pressing issue. This application provides a method for synchronously printing examinee information on exam papers and packaging bags, applied in a production control system. The production control system of this application serves as a platform for printing companies to provide exam paper inspection services. Figure 1 This is a flowchart illustrating a method for simultaneously printing examinee information on exam papers and packaging bags, as provided in an embodiment of this application. (Refer to...) Figure 1 The method includes the following steps S101-S108.

[0030] S101: In response to the production order, obtain the application information corresponding to the candidate's identity information, determine the exam question information based on the application information, and generate the first printing task and the second printing task according to the candidate's identity information and the exam question information.

[0031] In the above-mentioned S101, in the scenario of producing exam papers for postgraduate entrance examinations, since the same examination room often contains candidates applying to different universities and majors, and the exam paper content required by each candidate is completely different, the production system must achieve a precise one-to-one correspondence between the exam paper content and the candidate's identity. To solve this problem, this embodiment adopts a technical solution of simultaneously generating dual printing tasks.

[0032] Upon receiving a production instruction, the production control system immediately retrieves the identity information of all examinees corresponding to that batch of exam papers to be produced from the examination management database. Examinee identity information includes unique identifying data such as the examinee's name, examination admission ticket number, and ID card number. Using a single examinee as the smallest processing unit, a query request is initiated to the registration database using the examination admission ticket number as the associated key value to obtain the examinee's application information. The application information records key data such as the examinee's target university code, applied major code, and list of examination subjects.

[0033] After obtaining the application information, the system retrieves and determines the required exam questions from the question bank management system based on the university and major codes. The exam question information is stored as digital files, containing complete exam paper layout data, question text content, charts and images, and mathematical formula formatting information. Since different universities may use different exam questions for the same major, the system strictly adheres to a dual index of university and major codes for precise matching, ensuring that the retrieved exam question information perfectly matches the applicant's actual application needs.

[0034] After obtaining the examinee's identity information and corresponding exam question information, two interconnected printing tasks are generated simultaneously. The data packet of the first printing task encapsulates the complete exam question information, which is sent to the first printing equipment specifically responsible for printing the exam papers. In addition to the exam questions themselves, the digital layout file of the first printing task automatically inserts some of the examinee's identity information at specific locations on the exam paper. For example, the admission ticket number is printed in the header of the exam paper, and a one-dimensional barcode or QR code is printed in a designated area. These barcodes encode the examinee's unique identifier. The second printing task is specifically used for printing the packaging bags. This data packet contains the examinee's complete identity information, which is printed on the outer surface of the packaging bags, so that each packaging bag carries a clear identifier of the examinee's affiliation.

[0035] This dual-task synchronous generation mechanism establishes a strong correlation between the exam paper content and the identity of the packaging bag at the data level. Compared to the traditional method of printing exam papers in batches and then sorting and packaging them, this synchronous generation scheme ensures consistency from the source of the production process, avoiding potential human error during later sorting. Each first and second printing task shares the same examinee's identity information as a unique data source. This uniformity in data structure provides a reliable comparison benchmark for subsequent automated verification, enabling the entire production process to maintain high efficiency while ensuring extremely high matching accuracy.

[0036] S102: Generate a corresponding standard image feature set based on the digital layout information of the first printing task, and associate the standard image feature set with the examinee's identity information.

[0037] In step S102 above, complete digital layout information is extracted from the first printing task. This information exists in the form of structured data, including vector graphics and text objects. The digital layout information contains the complete layout of the exam paper, including the position coordinates of text boxes, font size information, the embedding position of image resources, the row and column structure of tables, and all other typesetting elements. This digital layout information is rendered and converted into a standard resolution digital image. This rendering process simulates the ideal printing output effect.

[0038] After obtaining the rendered digital image, multi-dimensional feature extraction is performed. Specifically, image processing algorithms identify all independent pixel connected regions in the digital image, which correspond to visual elements such as text blocks, images, and tables on the exam paper. For each identified connected region, the system calculates its bounding box and extracts geometric parameters such as the centroid coordinates, area percentage, and aspect ratio. These geometric parameters are arranged in a spatial order from top to bottom and left to right, forming topological geometric features that reflect the overall layout of the exam paper. This feature data is labeled as macroscopic layout data, which can describe the overall structural features of the exam paper.

[0039] Simultaneously, the system analyzes high-frequency vector primitives in the digital layout information and constructs a virtual grid layer based on the distribution density of these primitives. The virtual grid layer divides the exam paper layout into regular grid units, calculating the number of primitives and information density within each grid unit, using this as an information entropy weight. A dynamic pseudo-random sequence is generated based on the information entropy weight, and this sequence is used to filter the virtual grid layer, resulting in a set of discrete coordinate points. These coordinate points are preferentially distributed in areas with high information density, such as formula-dense areas and chart areas. Using these discrete coordinate points as centers, the system uses a preset irregular polygonal window to extract local image fragments, performs a discrete cosine transform on each image fragment, and extracts the mid-frequency coefficient matrix. After inverse transformation to restore the spatial domain image, these local image fragments constitute local verification regions, and the extracted image texture features are summarized into local texture fingerprint data.

[0040] Further analysis of the preset coordinate ranges of the examinee's identity information in the digital layout file reveals the specific locations of key information such as the examination admission ticket number and name printed on the exam paper. The regions corresponding to these coordinate ranges are located in the rendered digital image and processed separately as regions of interest. Optical character recognition (OCR) processing is performed on the regions of interest, converting the text content into editable string data, which is then labeled as semantic data for key regions.

[0041] The macro-level layout data, local texture fingerprint data, and key region semantic data are normalized to ensure comparable numerical ranges for different types of feature data. The three types of normalized data are then concatenated in a predefined order to form a unified multi-dimensional feature vector, which constitutes the standard image feature set for the exam paper. A unique storage index is assigned to this standard image feature set in the feature set database, and a mapping relationship is established between this index and the corresponding examinee's identity information. This mapping relationship is implemented through a relational table in the database, enabling the system to quickly retrieve the corresponding standard image feature set using the examinee's admission ticket number and other identifying information.

[0042] For example, a student named Zhang applied to a university for a computer science major, and his examination admission ticket number is xxx. Based on Zhang's application information, a first print job containing data structure questions was generated. This digital layout file contains three major questions, with the second question containing a binary tree diagram. After rendering the digital layout, 37 independent pixel connected regions were identified, including question number text boxes, question stem text blocks, and the binary tree diagram. The system extracted the centroid coordinates of these 37 regions to form a coordinate sequence containing 111 values, arranged in order from question number 1 to question number 3. In the virtual mesh layer analysis, the binary tree diagram region of the second question, due to its large number of nodes and connections, has a significantly higher information entropy weight than the plain text region. Therefore, this region was selected as the key sampling region, and 8 discrete sampling points were generated within this region to extract local texture features. The pre-defined candidate information area in the digital document is located within a rectangular region on the right side of the exam paper header, at coordinates (1200, 50) to (1800, 120). Optical character recognition (OCR) is performed within this region to extract the admission ticket number "xxx" and the name "Zhang Mou". These multi-dimensional feature data are then normalized and concatenated into a feature vector containing 2048 floating-point values. This vector is associated with the admission ticket number "xxx" and stored in the feature set database.

[0043] S103: Control the first printing equipment to perform the first printing task to obtain the target test paper, and control the second printing equipment to perform the second printing task to obtain the target packaging bag, and transport the target test paper and the target packaging bag to the preset verification position.

[0044] In S103 above, after the printing task is generated and the standard feature set is established, the actual production execution stage begins.

[0045] The production control system sends a complete data packet for the first printing task to the first printing equipment via an industrial bus. Upon receiving the data packet, the first printing equipment parses the digital layout information into an executable sequence of printing instructions. These instructions control underlying parameters such as the rotation speed of the printing cylinder, the inkjet timing, and the CMYK ratio of the color management module. The first printing equipment picks up blank paper from the paper supply system and, after a series of physical processing steps including image transfer, ink curing, and cutting, outputs the printed target exam paper. This target exam paper not only contains all the exam questions required for the examinee but also prints a one-dimensional barcode or QR code corresponding to the examination admission ticket number in a preset location. This barcode information is physically linked to the exam paper content during the printing process.

[0046] In parallel with the execution process of the first printing equipment, the production control system synchronously sends data packets for the second printing task to the second printing equipment. The second printing equipment is specifically designed for printing on the packaging bag material. Its working principle is similar to the first printing equipment, but the process has been optimized for the special material of the packaging bags. The second printing equipment prints the complete identity information of the examinee on the outer surface of the packaging bag, including the examinee's name, examination number, applied university, and applied major, as well as an identification code containing the examination number. These printed contents on the packaging bag use a high-contrast black and white color scheme to ensure that subsequent image recognition equipment can reliably read this information.

[0047] Two printing machines are physically located at different stations on the production line, but their work cycles are precisely synchronized through a production control system. The estimated completion time for each task is calculated based on the amount of data generated and the processing capacity of the machines, and the start-up sequence of the machines is dynamically adjusted so that the target test papers and target packaging bags for the same examinee can be produced at approximately the same time. This timing coordination mechanism avoids situations where one type of product waits for another for an extended period, improving the overall continuity of the production cycle.

[0048] After the first printing unit completes printing the target exam paper, the paper is conveyed to the subsequent transport system via a paper output conveyor belt. The transport system employs a modular conveyor belt structure, with each conveyor belt unit equipped with a photoelectric sensor to detect the passage status of the exam paper. The target exam paper moves along a preset path on the conveyor belt, passing through a cooling zone to fully solidify the ink, and then enters the confluence area to await meeting the corresponding target packaging bag. After the second printing unit completes printing the target packaging bag, the packaging bag is also conveyed to the confluence area via a dedicated conveyor mechanism. The confluence area is equipped with temporary storage stations. By reading the barcode information on the exam paper and the packaging bag to confirm that they belong to the same examinee, a robotic arm or pushing mechanism is controlled to synchronously push both into the same conveyor channel.

[0049] After the data convergence process, the target test paper and target packaging bag continue to move along the transport system in a paired state, eventually reaching the preset verification position. The preset verification position is a specially designed inspection station equipped with high-resolution industrial cameras, barcode scanners, positioning fixtures, and other inspection equipment. Once the target test paper and target packaging bag enter this position, the positioning fixture uses a pneumatic or electric mechanism to fix them in a precise spatial position, ensuring that subsequent image acquisition and information recognition can be performed under stable conditions.

[0050] For example, suppose the system is processing the exam papers of Zhang (exam number xxx1) and Li (exam number xxx2). At 9:00 AM, the production control system issues Zhang's first printing task to the first printing equipment. This task contains 8 pages of exam paper content. The first printing equipment has a processing speed of 12 pages per minute, so it is expected to be completed at 9:01 AM. At 8:59:50 AM, Zhang's second printing task is issued to the second printing equipment. The packaging bag printing only requires single-sided processing, and the second printing equipment completes it at 9:00:30 AM. Zhang's target exam paper is output from the first printing equipment at 9:01 AM and arrives at the assembly area after 20 seconds of conveying and cooling. At this time, Zhang's target packaging bag has been waiting in the assembly area for 30 seconds. After scanning the barcodes of both to confirm a match, both are pushed to the verification conveyor belt at 9:01:25 AM. In front of the verification position, Li's test paper and packaging bag were being inspected. Zhang's product waited for 15 seconds in front of the positioning station before entering the positioning fixture at 9:01:40.

[0051] S104: After confirming that the target test paper and the target packaging bag are in the preset verification position, obtain the actual full-size image of the target test paper and identify the identification information on the target packaging bag.

[0052] In step S104 above, after the target test paper and target packaging bag arrive at the preset verification position, a comprehensive verification of the target test paper is required to ensure the accuracy of printing quality and identity matching. Before performing complex image feature comparison, physical weight detection is used as a rapid initial screening method. This layered verification strategy can immediately stop subsequent processing when obvious physical defects are found, avoiding sending products with fundamental errors into the time-consuming image analysis process. Before acquiring the measured full-frame image of the target test paper and identifying the identification information on the target packaging bag, the method further includes: acquiring the theoretical weight range of the target test paper and acquiring the measured weight value of the target test paper; determining whether the measured weight value is within the theoretical weight range; if the measured weight value is within the theoretical weight range, determining that the physical state of the target test paper is normal and acquiring the measured full-frame image of the target test paper; if the measured weight value is not within the theoretical weight range, determining that the physical state of the target test paper is abnormal and generating a weight abnormality processing signal.

[0053] Specifically, in practical applications, postgraduate entrance examination papers usually consist of multiple papers for multiple subjects. For example, the morning session may contain a 4-page political science paper and an 8-page foreign language paper, while the afternoon session may contain a 12-page professional course I paper and an 8-page professional course II paper. These papers need to be stacked for quality inspection and packaging. Therefore, this application designs a differentiated processing flow for single papers and stacked papers. When the target test paper and target packaging bag arrive at the preset verification position in a paired state after the convergence process, the positioning fixture at the preset verification position fixes the test paper in a precise spatial position through a pneumatic or electric mechanism. At this time, the upper and lower pressure plates of the positioning fixture apply uniform pressure to the stack of test papers. The high-precision electronic scale integrated at the bottom uses a strain gauge sensor to synchronously collect the measured weight value of the test paper, with a measurement accuracy of up to 0.1 grams. The data acquisition module of the electronic scale continuously monitors the pressure changes. When the pressure reading stabilizes for more than 200 milliseconds, it is considered that the stack of test papers has completely stopped. The weight value recorded at this time is the measured weight value. Whether it is a single test paper or a stack of multiple test papers, the same overall weighing method is used to complete the physical state verification. The theoretical weight range is calculated based on the total number of pages of the test paper read from the first printing task data. For example, the theoretical weight range of a 12-page test paper is 56.9 grams to 62.9 grams. If the measured weight value of 62.3 grams is within the theoretical range, the physical state is determined to be normal and the subsequent image acquisition process continues.

[0054] The theoretical weight range is calculated based on the total number of test papers read from the first printing task data. For example, if the weight of a single A4 test paper is 80g / m², the theoretical weight of a single page is approximately 4.99g. Considering the weight gain from printing ink and fluctuations in paper moisture content, the theoretical weight range for a single test paper is set to 4.74g to 5.24g. For a stack of 12 test papers, the theoretical weight range is 56.9g to 62.9g. If the actual measured weight of 62.3g is within the theoretical range, the physical state is considered normal, and the subsequent image acquisition process continues. If the weight value does not match the theoretical weight range, it is considered an abnormal situation. An abnormal weight signal is immediately generated to trigger the alarm mechanism. The abnormal signal includes the abnormality type, such as missing or extra pages, or damp paper, as well as the specific weight deviation value. The transmission system is suspended, and the abnormal test papers and packaging bags are transferred to the manual review area. Quality inspectors conduct manual inspections to confirm the cause of the abnormality according to the prompts. If it is confirmed that there are missing or extra pages, the batch of test papers is invalidated and reprinted. If it is confirmed that the paper is damp or there is a slight ink deviation that does not affect the printing quality, it is marked as qualified in the system and the packaging process can continue.

[0055] After the weight check is passed, different image acquisition strategies are executed according to the number of pages in the test paper. For a single test paper, the upper pressure plate of the positioning fixture maintains fixed pressure to ensure the test paper is flat. A high-resolution industrial camera positioned above the preset verification position directly scans and captures the front of the test paper. The industrial camera uses a 5-megapixel CMOS sensor with a resolution of 300 dpi. The lens field of view covers the A3 size of 297mm × 420mm. A ring-shaped LED cold light source provides 5500K color temperature illumination to eliminate shadows. After adjusting the focus, the camera captures a full-frame image of the front of the entire test paper in a single exposure. The image resolution is 2480 × 3508 pixels. The image sharpness score is calculated in real time using the Laplace variance method. If the sharpness is lower than the preset threshold, the image is automatically retaken up to 3 times. After the frontal image is acquired, the positioning fixture releases pressure on the test paper, and the page-flipping robotic arm positioned to the side of the detection station starts. The end of the robotic arm is equipped with a vacuum suction cup array, consisting of 16 independently controlled vacuum suction cups arranged in a 4×4 pattern. The suction cups are 20mm in diameter and made of flexible silicone to avoid damaging the test paper. Once the vacuum suction cups descend to a position 2mm from the surface of the test paper, the vacuum pump is activated. When the negative pressure reaches -40kPa, the test paper is firmly adsorbed. Pressure sensors monitor the adsorption force in real time to ensure a firm adsorption without causing paper deformation. After the adsorption stabilization time reaches 100 milliseconds, the linear motor slide connected to the robotic arm drives the suction cup array to move horizontally 300mm along the X-axis, moving the test paper to the flipping station. The servo rotary motor at the end of the slide has an accuracy of ±0.1°. The moving suction cup array rotates 180° around the Y-axis at a smooth, shock-free speed of 60° / second. After flipping, the test paper is placed face up on a transparent tempered glass flipping platform. The vacuum pump stops working and the negative pressure is released. The four corner positioning pins extend from the edge of the glass platform via pneumatic telescopic movement to precisely position the four corners of the test paper, ensuring that the test paper is flat and wrinkle-free. The bottom transmission scanning camera installed under the glass platform is activated, using a hybrid backlight and reflected light illumination method. The LED surface light source under the glass platform provides transmitted light, and the ring light above the glass platform provides reflected light. The full-frame image of the back of the test paper is captured with a resolution of 2480×3508 pixels. After the back scan is completed, the robotic arm flips the test paper back to its original state and places it back in the positioning fixture position, ready to enter the subsequent feature extraction and matching degree calculation process.

[0056] For stacks of multiple exam papers, an automatic page-by-page scanning process is executed after the overall weight check passes. The upper pressure plate of the positioning fixture automatically rises to release the pressure on the stack of exam papers. The vacuum suction cup array system starts and descends to a position 2mm away from the surface of the top layer of exam papers in the stack. To prevent multiple exam papers from being sucked up at the same time due to static electricity or ink adhesion, an ion air gun with a working voltage of ±5kV is configured around the suction cup array to eliminate static electricity on the surface of the exam papers. At the same time, a lateral air knife blows compressed air at 0.3MPa from the edge of the stack for 50 milliseconds to form a thin air film that separates the top layer of exam papers from the bottom layer. A laser displacement sensor with an accuracy of 10μm installed above the suction cup measures the thickness of the adsorbed exam papers in real time. If the thickness exceeds 1.5 times the thickness of a single sheet of paper (0.1mm), it is determined to be adhered, and the system automatically releases the adsorption and re-executes the separation process. After successfully adsorbing a single test paper, the top industrial camera immediately captures a full-frame image of the front of the page. Then, the page-turning robotic arm flips the test paper 180° and places it on a transparent glass flipping table. The bottom transmission camera captures a full-frame image of the back of the page. After the back scan is completed, the side-pushing cylinder of the flipping table is activated to push the scanned test paper to a temporary storage collection box located on the side of the flipping table. The temporary storage box stacks the test papers in the scanning order, maintaining the original order. The vacuum suction cup array returns to the top of the original stack and repeats the process of adsorbing, scanning, flipping, scanning, and temporarily storing the front and back pages one by one until all the test papers in the stack have been scanned.

[0057] For example, for a stack of 12 exam papers, the single-page processing flow includes 0.5 seconds for adsorption and positioning, 1.0 second for front scanning, 1.5 seconds for flipping and moving, 1.0 second for back scanning, 0.5 seconds for temporary storage and pushing, totaling 4.5 seconds. The complete scanning time for all 12 pages is 54 seconds. After all pages are scanned, the robotic arm retrieves the exam papers from the temporary storage box sequentially and re-stacks them in their original order to restore the initial state of the exam papers, ready for subsequent processes. The collected image data is stored in a structured manner. For a single exam paper, the record includes fields such as the examinee's number, the number of pages, the front image path, the back image path, and the scan timestamp. For multiple exam papers, an independent record object is created for each page. For example, for examinee xxx's 12-page exam paper, a scanned image array containing 12 page objects is generated. Each object records the page number, the front image path, the back image path, and the scan timestamp. Through the above differentiated image acquisition process for single exam papers and stacked exam papers, both physical layer weight verification and content layer page-by-page front and back image acquisition are achieved, ensuring that the number of pages received by each examinee meets the quality standards.

[0058] S105: Retrieve the corresponding standard image feature set based on the identity information, extract features from the measured full-frame image, and obtain the measured feature vector set.

[0059] In step S105 above, the identification information identified from the packaging bag is used as the search keyword to initiate a query request to the feature set database. The examination admission ticket number contained in the identification information serves as the primary key index, uniquely identifying a candidate's exam paper record. The database management system locates the corresponding feature set storage index in the association table based on the examination admission ticket number, and reads the complete standard image feature set data through this index. This standard image feature set is pre-generated based on the digital layout information and contains feature information in three dimensions: macro layout data, local texture fingerprint data, and key area semantic data. The retrieved standard image feature set is loaded into the comparison buffer in memory, awaiting comparison and analysis with the soon-to-be-generated measured feature data.

[0060] After the standard feature set is retrieved, feature extraction processing is initiated on the measured full-frame image. This process must strictly follow the same algorithm flow and parameter settings as when generating the standard features, ensuring that the two sets of feature data remain completely consistent in terms of extraction dimensions, sampling density, and calculation methods. Feature extraction is performed on the measured full-frame image to obtain a measured feature vector set. Specifically, this includes: identifying all independent pixel connected regions in the measured full-frame image and calculating the bounding box of each independent pixel connected region; obtaining the centroid coordinates, area ratio, and aspect ratio of the bounding box; arranging the centroid coordinates, area ratio, and aspect ratio of all independent pixel connected regions in a preset order to obtain topological geometric features, which are then used as macroscopic layout data; dividing the measured full-frame image based on preset sampling rules to obtain multiple local verification regions; extracting image texture features from each local verification region and using these image texture features as local texture fingerprint data; parsing the digital layout file corresponding to the first printing task to obtain the preset coordinate range of the examinee's identity information in the digital layout file; mapping the preset coordinate range to the measured full-frame image to obtain the region of interest; performing optical character recognition on the region of interest to obtain key region semantic data; and normalizing and splicing the macroscopic layout data, local texture fingerprint data, and key region semantic data to obtain the measured feature vector set.

[0061] Specifically, the full-frame measured image is binarized, converting the color or grayscale image into a black-and-white binary image. The binarization process employs an adaptive thresholding algorithm, which dynamically determines the threshold parameter based on the image's local grayscale distribution characteristics. The image is divided into several sub-regions, and the average grayscale value and standard deviation of each sub-region are calculated. Based on these statistical parameters, an independent binarization threshold is set for each sub-region. After binarization, text, formulas, charts, and other content areas on the exam paper are marked as black pixels, while the paper background and blank areas are marked as white pixels.

[0062] The binary image is scanned using a connected component analysis algorithm to identify all interconnected sets of black pixels. Connected component analysis employs a seed-filling method, scanning line by line starting from the top left corner of the image. When the first black pixel is encountered, it serves as a seed point to initiate a region growth process. During growth, the eight neighboring pixels of the seed point are examined, and any black pixels among them are added to the current connected region. These newly added pixels then serve as new seed points to continue expanding outwards. When a connected region cannot continue growing, a unique identifier is assigned to that region, and the image is scanned again to find the next unmarked black pixel as the starting point for a new connected region. In this way, all visual elements in the exam paper image, such as text blocks, images, and table borders, are identified as independent pixel connected regions.

[0063] For each identified connected region, the minimum bounding rectangle of that region is calculated. During this calculation, all pixels within the region are traversed, and their x and y coordinates are recorded. The left and right boundaries of the bounding rectangle are determined by finding the minimum and maximum values ​​of the x-coordinates. The top and bottom boundaries are determined by finding the minimum and maximum values ​​of the y-coordinates. These four boundary values ​​uniquely determine the spatial position and geometric dimensions of the bounding rectangle. The centroid coordinates of the bounding rectangle are calculated. The x-coordinate of the centroid is equal to the arithmetic mean of the x-coordinates of the left and right boundaries, and the y-coordinate is equal to the arithmetic mean of the y-coordinates of the top and bottom boundaries. This centroid coordinate reflects the spatial position of the visual element on the exam paper layout. The area of ​​the bounding box is further calculated, which is the product of the rectangle's width and height. This area is then divided by the total area of ​​the entire exam paper image to obtain the area percentage of the connected region. This area percentage quantifies the relative size relationships of different visual elements on the layout. It also calculates the aspect ratio of the rectangle, which is the ratio of the longer side to the shorter side of the rectangle. This parameter can distinguish between horizontal text blocks, vertical text blocks, and graphic elements that are close to squares.

[0064] All connected regions are sorted according to a top-to-bottom, left-to-right spatial order. The sorting rule is as follows: for any two connected regions A and B, if the ordinate of the centroid of A is smaller than that of B, then A is placed before B. If the difference in the ordinates of the centroids of two regions is less than a preset threshold (indicating they are on the same horizontal row), then their abscissas are compared, and the one with the smaller abscissa is placed first. This sorting method conforms to human reading habits from top to bottom and left to right, and is also consistent with the natural layout order of the test paper content. The centroid coordinates, area ratio, and aspect ratio parameters of each connected region are extracted sequentially according to the sorted order, and these parameters are concatenated to form a long vector. The spatial position of each parameter in the vector strictly corresponds to the distribution order of the connected regions on the test paper. This vector actually constitutes a topological geometric feature description of the overall layout structure of the test paper. This topological geometric feature vector is marked as the measured macroscopic layout data.

[0065] In addition, after completing the macro-layout feature extraction, the process moves to extracting local texture features. The virtual grid layer parameters and dynamic pseudo-random sequence used when generating the standard features are retrieved from the standard image feature set. These parameters record the specific method of gridding the digital layout information during the standard feature generation process, as well as the precise positions of discrete coordinate points selected based on information entropy weights. Based on these historical parameters, a virtual grid layer is reconstructed on the measured full-frame image, dividing the image space into regular grid cells with the same number of rows and columns. The positions of the grid cells to be sampled are determined based on the saved dynamic pseudo-random sequence. The dynamic pseudo-random sequence is an integer sequence, where each integer corresponds to a selected grid cell index. This sequence is traversed, and for each index value, the corresponding numbered grid cell in the virtual grid layer of the measured full-frame image is located, and the geometric center coordinates of that cell are calculated. These center coordinates constitute a set of discrete coordinate points, which are mapped to the pixel coordinate system of the measured full-frame image. A local image segment is extracted using a preset irregular polygonal window centered on each discrete coordinate point. The shape and size parameters of the irregular polygonal window are also read from the standard feature set to ensure complete consistency with the window used when generating the standard features. Assuming the window is a 64×64 pixel rhombus region, the positions of the four vertices of the rhombus are calculated based on discrete coordinates, and all pixel values ​​within the rhombus region are extracted to form a two-dimensional pixel matrix. For sampling points located at the image edge, if the window region exceeds the image boundary, a mirror filling strategy is used, setting the pixel values ​​outside the boundary as mirror copies of the boundary pixels.

[0066] The system performs Discrete Cosine Transform (DCT) on each captured local image segment. DCT decomposes the spatial domain image signal into a superposition of different frequency components, revealing the image's frequency domain characteristics. During the transformation, the system applies a two-dimensional DCT formula to the two-dimensional pixel matrix of the image segment, obtaining a coefficient matrix of the same size. The element in the upper left corner of the coefficient matrix is ​​called the DC component, representing the average gray value of the image. The elements in the lower right corner are called high-frequency components, reflecting the image's edge and detail information. The elements near the diagonal are called mid-frequency components, containing the image's main texture structure information. The DC component is filtered out from the DCT coefficient matrix by setting the first element in the upper left corner to zero to eliminate interference caused by differences in average brightness at different sampling locations. The system extracts the mid-frequency coefficients from the 8×8 region near the diagonal of the coefficient matrix. This 8×8 submatrix contains the main frequency features of the local image while filtering out high-frequency noise and low-frequency offsets. The extracted mid-frequency coefficient matrix is ​​then subjected to Inverse Discrete Cosine Transform (IDCT) to restore the frequency domain coefficients to the spatial domain image. The restored image is equivalent to bandpass filtering the original local image fragment, preserving the main structural features of the texture while suppressing the effects of noise and uneven illumination. Texture feature parameters are calculated for the frequency-domain filtered local image. The gray-level co-occurrence matrix (GLCM) of the image is constructed, which statistically analyzes the co-occurrence frequency of pixel pairs with different gray values ​​in a specific spatial relationship. The GLCM is then normalized to obtain local texture fingerprint data.

[0067] After completing the macro-layout and local texture feature extraction, the process moves to extracting semantic features of key areas. The digital layout file corresponding to the first printing task is parsed; this file is stored in a structured format such as XML or PDF. During parsing, the document object model (DOM) is used to traverse the file's tree structure to locate the metadata nodes that mark the examinee's identity information. The attributes of these nodes record the preset coordinate range of the examinee's information within the layout, such as the coordinates of the top-left corner (x1, y1) and bottom-right corner (x2, y2) of a rectangular area. The preset coordinate range in the digital layout file is mapped to the pixel coordinate system of the measured full-frame image. Since the digital layout file may use page units (such as millimeters or points), while the measured full-frame image uses pixel units, a coordinate system transformation is required. The transformation formula is: pixel coordinate xpixel = (xpage × image resolution DPI) / 25.4, where 25.4 is the conversion factor from millimeters to inches. After the coordinate transformation, the boundary of the rectangular area containing the examinee's information is determined in the measured full-frame image. Based on the mapped coordinate range, the corresponding image fragments are extracted from the measured full-frame image. The cropping operation is achieved by specifying the starting pixel coordinates and width and height parameters of a rectangular area, resulting in an independent sub-image. This sub-image is the Region of Interest (ROI), which should contain text content such as the examinee's name and admission ticket number printed on the exam paper. The ROI image undergoes preprocessing to optimize subsequent optical character recognition (OCR) results. Preprocessing operations include grayscale stretching to enhance the contrast between the characters and the background, calculating the grayscale histogram of the ROI image to determine the actual distribution range of grayscale values, and then remapping the grayscale values ​​to the full range of 0-255 using a linear transformation to make the character edges clearer. The tilt angle of the ROI image is detected, and the dominant direction of the text line is identified using a Hough transform. If the detected tilt exceeds a preset angle threshold, the image is rotated and corrected to a horizontal orientation using an affine transform.

[0068] After preprocessing, the ROI image is fed into an Optical Character Recognition (OCR) engine. The OCR engine, based on a deep learning character recognition model, can handle both printed and handwritten text. The recognition process includes three stages: character segmentation, feature extraction, and pattern classification. In the character segmentation stage, the OCR engine segments the text in the image into individual characters using connected component analysis and projection methods. In the feature extraction stage, HOG features or deep convolutional features are extracted from each character image to form a high-dimensional feature vector. In the pattern classification stage, the feature vector is input into a pre-trained classifier, which outputs the most likely corresponding character encoding and confidence score. The encoded text content is then converted into structured semantic data.

[0069] After extracting features across three dimensions, normalization was performed on the measured macroscopic layout data, measured local texture fingerprint data, and measured key region semantic data. The purpose of normalization was to eliminate dimensional differences between different feature types, making them comparable in numerical space. For the centroid coordinates in the macroscopic layout data, the coordinate values ​​were divided by the image width or height to normalize them to the [0, 1] interval. Area proportions remained unchanged since they are already relative values. For aspect ratios, a logarithmic transformation (log(aspect ratio)) was applied to compress large differences into a more compact numerical range. For local texture fingerprint data, Z-score normalization was applied, calculating the mean μ and standard deviation σ of all texture features. Each feature value x was transformed to (x-μ) / σ, resulting in a normalized feature mean of 0 and a standard deviation of 1. For key region semantic data, the numerical encoding of the examination admission ticket number and the Unicode encoding of the name were divided by the maximum possible value of their respective types, mapping them to the [0, 1] interval. After normalization, the three types of feature data are combined into a unified multidimensional feature vector according to a predefined concatenation order. The concatenation order is consistent with that used when generating the standard feature set, ensuring a one-to-one correspondence between the measured feature vector and the standard feature vector in terms of dimension.

[0070] Assuming the measured macroscopic layout data is a 174-dimensional vector, the measured local texture fingerprint data is a 144-dimensional vector, and the measured key region semantic data is a 128-dimensional vector, the system concatenates them end-to-end into a 446-dimensional vector. Considering that the standard feature set may contain more dimensions to cover the entire feature space of the test paper, the system performs a dimension expansion operation on the concatenated vector. By repeatedly extracting features at different resolution levels or introducing higher-order statistical features, a 2048-dimensional measured feature vector set that perfectly matches the dimensions of the standard feature set is finally generated.

[0071] Furthermore, based on preset sampling rules, the measured full-frame image is divided into multiple local verification regions. Specifically, this includes: parsing the digital layout information of the first printing task, extracting high-frequency vector primitives from the digital layout information, constructing a virtual grid layer based on the distribution density of the high-frequency vector primitives, and calculating the information entropy weight of each grid unit; generating a dynamic pseudo-random sequence based on the information entropy weight, using the dynamic pseudo-random sequence to filter the virtual grid layer, and obtaining a discrete coordinate point set; mapping the discrete coordinate point set onto the measured full-frame image, and using the mapped points as the center, using a preset irregular polygonal window to extract image segments; performing a discrete cosine transform on the extracted image segments, filtering out the DC component, and extracting the intermediate frequency coefficient matrix; and performing an inverse transform on the intermediate frequency coefficient matrix to restore it to a spatial domain image, thus obtaining the local verification region after frequency domain filtering.

[0072] Specifically, the process involves parsing the digital layout information carried by the first printing task. This information stores the original design data of the exam paper in vector graphics format. Unlike bitmap graphics, vector graphics describe the geometric characteristics of graphic elements through mathematical functions. For example, a straight line is defined by its starting and ending coordinates, a circle by its center coordinates and radius, and text by font parameters and character encoding. A vector graphics parsing library is used to read the internal structure of the digital layout file. This library can recognize graphic objects in standard vector formats such as PDF and SVG. During the parsing process, the object tree of the digital layout is traversed to extract all independent vector graphics. These graphics are categorized into three main types: path graphics, text graphics, and image graphics. Path graphics include geometric shapes such as straight line segments, Bézier curves, and polygons, commonly used to draw table borders, chart axes, and geometric figures. Text graphics contain character sequences and their layout parameters, corresponding to question text, formula symbols, and explanatory text in the exam paper. Image graphics are raster images embedded in the layout, such as illustrations, photographs, and scanned images.

[0073] The spatial area occupied by each vector primitive is calculated. For path primitives, the bounding box area is calculated based on the geometric parameters of the path; the bounding box of a straight line is its width multiplied by its line width, and the bounding box of a curve is obtained by fitting sample points. For text primitives, the rectangular area of ​​the text block is calculated based on the font size and the number of characters. For image primitives, the system directly reads the pixel dimensions of the image as its area. The area distribution of all primitives is statistically analyzed, and the median and standard deviation of the area are calculated. Primitives with areas smaller than the median minus the standard deviation are marked as low-frequency primitives, which are usually decorative elements or secondary content. Correspondingly, primitives with areas larger than the median plus the standard deviation, as well as densely distributed medium-area primitives, are marked as high-frequency vector primitives, which represent the core content with a large information content in the test paper.

[0074] Further analysis of the semantic types of high-frequency vector graphics primitives is conducted. For text primitives, their font information is read, and text markers in mathematical formula-specific fonts (such as italics in Times New Roman) are identified as formula primitives. Print quality checks are prioritized for formula areas because the details of subscripts, superscripts, fraction lines, square roots, and other structural elements in formulas have extremely stringent requirements for printing accuracy; any deviation can alter the meaning of the expression. For path primitives, the path's topological structure is analyzed, identifying specific shapes such as table borders (composed of regular rectangular grids) and function graph curves (composed of smooth, continuous curves). The areas corresponding to these primitives require focused checks on line clarity and continuity. For image primitives, the image's color mode and resolution are read. High-resolution color images are often important illustrations, and their color reproduction and detail retention need to be verified.

[0075] Obtain the page size parameters for the digital layout. Assume the exam paper is A3 size, with a page width of 297 mm and a height of 420 mm. Based on the preset grid density parameters, divide the page space into regular virtual grid layers. With the grid density set to one grid unit per 50 mm, the page width is divided into approximately 297 / 50 ≈ 6 grid columns, and the height is divided into approximately 420 / 50 ≈ 8 grid rows, forming 6 × 8 = 48 grid units. Each grid unit corresponds to a 50 × 50 mm square area on the page. Assign a unique index number to each grid unit, numbered sequentially from 0 to 47 according to row priority.

[0076] Count the number and total area of ​​high-frequency vector graphics elements within each grid cell. For grid cell number 0, the area corresponding to the top-left corner coordinates (0, 0) to (50, 50) of the page is calculated. Traverse all high-frequency vector graphics elements and calculate the intersection area of ​​the bounding box of each element with the rectangle of the grid cell. For example, the bounding box of a text element is (15, 20) to (65, 35), and the intersection rectangle with grid cell 0 is (15, 20) to (50, 35), with an intersection area of ​​35 × 15 = 525 square millimeters. Sum the intersection areas of all elements within the grid cell to obtain the total area occupied by the cell. Further calculate the information entropy weight of each grid cell. Information entropy is an indicator in information theory that measures the uncertainty of information. For exam paper layouts, areas with high information entropy indicate diverse content types, complex layouts, and rich details, making these areas more valuable for print quality inspection. Classify and count the high-frequency vector graphics elements within the grid cells by type. For example, grid cell 12 contains 5 formula primitives, 3 table primitives, and 2 text primitives. The probability distribution of each type of primitive is calculated: formula primitive probability P1 = 5 / 10 = 0.5, table primitive probability P2 = 3 / 10 = 0.3, and text primitive probability P3 = 2 / 10 = 0.2. The information entropy is H = 1.485 bits. The larger the information entropy value, the richer the content types and the more complex the layout within the grid cell. The information entropy of all grid cells is normalized. The maximum value Hmax and minimum value Hmin of the information entropy in the 48 grid cells are found, and a normalization transformation is performed on the information entropy H of each grid cell. After normalization, the weight values ​​are mapped to the [0, 1] interval. Grid cells with weights close to 1 represent core areas with extremely high information density, while grid cells with weights close to 0 represent blank or simple background areas. The normalized weight values ​​are stored as attributes of the virtual grid layer, with each grid cell carrying a floating-point weight parameter.

[0077] After the virtual grid layer is constructed, the system needs to select a set of discrete sampling points based on the information entropy weights for subsequent local quality detection. Simply selecting a few grid cells with the highest weights may lead to over-concentration of sampling points in a few complex areas, while missing other important areas. A dynamic pseudo-random sequence generation algorithm is adopted. This algorithm combines weight distribution and randomness, ensuring that high-weight areas receive more sampling opportunities while maintaining spatial dispersion of sampling across the entire page. The information entropy weights are used as the probability distribution function; grid cells with higher weights have a greater probability of being selected. A pseudo-random number generator is initialized, with the seed value set to the hash value of the task ID of the first printing task. This ensures that the same task generates the same random sequence at different execution times, guaranteeing consistency between the sampling positions of the standard feature set and the measured features. The pseudo-random number generator uses the Mason tween algorithm, which has the characteristics of long period and uniform distribution, enabling the generation of high-quality pseudo-random number sequences.

[0078] A weighted random sampling process is performed, selecting corresponding units in the virtual grid layer based on a dynamic pseudo-random sequence. The center point coordinates of all selected grid units are organized into a discrete coordinate point set, with each coordinate point represented in page units (millimeters). It is necessary to map the discrete coordinate point set in the digital layout coordinate system to the pixel coordinate system of the measured full-frame image. The measured full-frame image was captured by a high-speed industrial camera; during the mapping conversion, a correspondence between the two coordinate systems is established through scaling. All mapped discrete coordinate points are marked on the measured full-frame image. The distribution of these coordinate points on the image exhibits obvious weighted random characteristics, with denser points in complex areas and sparser points in simple, blank areas. A local image segment is captured using a pre-defined irregular polygonal window centered on each discrete coordinate point. The design of the irregular polygonal window considers two factors: first, the window shape should avoid resonance with the typical geometric features of the exam paper content; for example, a rectangular window might completely overlap with table units, leading to feature distortion. Therefore, irregular shapes such as rhombuses and hexagons are used. Secondly, the window size should be large enough to capture local texture features, but not so large that it contains too much irrelevant background. Experiments have shown that a window size of 64×64 pixels is more suitable.

[0079] Image cropping is performed using a rhombus window. A rhombus is geometrically defined as a polygon with four vertices whose diagonals bisect each other perpendicularly. For the center point coordinates (xc, yc), the coordinates of the four vertices of the rhombus are (xc, yc−32), (xc+32, yc), (xc, yc+32), and (xc−32, yc), where 32 pixels is the length of half a diagonal of the rhombus. All pixels within the rhombus region are determined using a polygon rasterization algorithm. The rasterization process employs a scan-line filling method. The system starts from the top vertex of the rhombus and scans line by line vertically. For each line, the intersection points with the left and right boundaries of the rhombus are calculated, and all pixels between these intersection points are extracted. All extracted pixels within the rhombus region are organized into an irregular two-dimensional pixel set. To facilitate subsequent mathematical transformations, the irregular rhombus pixel set needs to be converted into a regular rectangular pixel matrix. To determine whether the coordinates of each pixel in the rectangular matrix fall within the rhombus region, the method is as follows: substitute the pixel coordinates into the rhombus boundary equation. If the pixel is located inside the four boundaries, it belongs to the rhombus region, and the mask value is set to 1; otherwise, the mask value is set to 0. For pixels with a mask value of 1, the corresponding pixel value is copied from the measured full-frame image. For pixels with a mask value of 0 (located at the four corners of the rectangle outside the rhombus), a background grayscale value of 128 is filled to avoid introducing edge effects caused by blank pixels.

[0080] Perform Discrete Cosine Transform (DCT) on the pixel matrix. DCT is an orthogonal transform that decomposes the spatial domain image signal into a frequency domain coefficient representation, where coefficients at different positions correspond to different frequency components of the image. Extract the mid-frequency coefficient region from the DCT coefficient matrix. Mid-frequency coefficients correspond to medium-scale texture structures in the image, such as the stroke width of text, the spacing of table lines, and the size of formula symbols. These mid-frequency features contain sufficient information to distinguish different images and are robust enough not to be dominated by noise. Perform Inverse Discrete Cosine Transform (IDCT) on the extracted mid-frequency coefficient matrix to restore the frequency domain coefficients to the spatial domain image. The IDCT-restored image is equivalent to bandpass filtering the original image. Bandpass filtering suppresses low-frequency brightness variations and high-frequency random noise while preserving mid-frequency texture structure features. Repeat the above diamond window truncation, DCT transformation, mid-frequency extraction, and IDCT restoration process for all discrete coordinate points to generate a corresponding local verification region for each sampling point. The collection of these local verification regions constitutes the feature fingerprint library of the test paper image, which can efficiently represent the content features of the test paper with a small amount of data.

[0081] S106: Compare and calculate the measured feature vector set with the standard image feature set to obtain the comprehensive image matching degree.

[0082] In S106 above, the measured feature vector group is compared and calculated with the standard image feature set to obtain the comprehensive image matching degree. Specifically, this includes: obtaining the dimension length of the measured feature vector group; segmenting the measured feature vector group according to the dimension length and splicing order to obtain the first sub-vector, the second sub-vector, and the third sub-vector; restoring the first sub-vector to the measured macroscopic layout data, the second sub-vector to the measured local texture fingerprint data, and the third sub-vector to the measured key region semantic data; retrieving from the standard image feature set the standard macroscopic layout data corresponding to the measured macroscopic layout data, the standard local texture fingerprint data corresponding to the measured local texture fingerprint data, and the standard key region semantic data corresponding to the measured key region semantic data; extracting the measured centroid coordinate set from the measured macroscopic layout data and the standard centroid coordinate set from the standard macroscopic layout data; calculating the measured centroid coordinate set and the standard centroid coordinate set to obtain the maximum geometric deviation; and then... The fingerprint data is converted into a measured binary encoded sequence, and the standard local texture fingerprint data is converted into a standard binary encoded sequence. A bitwise XOR operation is performed between the binary encoded sequence and the standard binary sequence to obtain the result. The number of targets with binary bits of 1 in the result is counted, and the number of targets is divided by the total number of bits in the sequence to obtain the logical error rate. The measured key region semantic data is converted into a measured character sequence, and the standard key region semantic data is converted into a standard character sequence. Based on the Levenstein distance algorithm, the minimum number of single-character editing operations required to convert the measured character sequence into the standard character sequence is calculated, and the number of editing operations is used as the character transformation cost. A three-dimensional Cartesian coordinate system is constructed based on the maximum geometric deviation, the logical error rate, and the character transformation cost, and used as the components of the X-axis, Y-axis, and Z-axis to obtain the difference feature vector. The Euclidean magnitude of the difference feature vector is calculated to obtain the comprehensive difference magnitude. The comprehensive difference magnitude is mapped and calculated based on a preset inverse proportional normalization function to obtain the comprehensive image matching degree.

[0083] Specifically, upon receiving the measured feature vector group, which is a one-dimensional numerical array output from the previous feature extraction stage and contains various feature information of the test paper image, the system reads the dimension length of the measured feature vector group, which is equal to the total number of numerical elements contained in the vector group. Assuming a measured feature vector group contains 1536 floating-point numbers, the system records the dimension length as 1536. The system queries the feature concatenation protocol, which specifies the storage location and length occupied by different feature types in the vector group. According to the protocol definition, the first 512 dimensions of the measured feature vector group store the measured macroscopic layout data, dimensions 513 to 1280 store the measured local texture fingerprint data, and dimensions 1281 to 1536 store the measured key region semantic data. The system performs vector segmentation to extract a subsequence within a specified range from the measured feature vector group. Elements 0 to 511 (a total of 512 elements) of the vector group are accessed and organized into independent arrays, marked as the first sub-vector. Continue accessing elements 512 to 1279 (768 elements in total), organizing them into a second sub-vector. Access elements 1280 to 1535 (256 elements in total), organizing them into a third sub-vector. After segmentation, the original measured feature vector group is deconstructed into three independent sub-vectors, each corresponding to a specific type of feature data.

[0084] The first subvector is restored to the measured macroscopic layout data. This first subvector contains 512 floating-point numbers, which encode the overall spatial structure information of the exam paper layout. These values ​​are parsed according to the encoding rules, reconstructing the linear numerical sequence into a structured spatial description. The encoding rules define the segmented meanings of the numerical sequence: the first 64 values ​​represent the coordinates of the reference points at the four corners of the layout, the middle 384 values ​​represent the density distribution of the grid on the layout, and the last 64 values ​​represent the bounding box parameters of the main content blocks. The parsed corner coordinates, density matrix, and bounding box parameters are organized into a structured data object and labeled as the measured macroscopic layout data.

[0085] The second sub-vector is then restored to the measured local texture fingerprint data. This second sub-vector contains 768 floating-point numbers, derived from the frequency domain transformation results of multiple local sampling regions. Analysis is performed according to the number of sampling points and feature dimensions. Assuming 12 discrete locations were sampled on the exam paper, and each location yielded a 64-dimensional frequency domain feature, the 768 values ​​correspond to a 12×64 data matrix. These 768 values ​​are then divided into 64-dimensional groups, resulting in 12 subsequences of length 64. Each subsequence corresponds to the local texture feature of a sampling location, and the values ​​in the subsequence are the mid-frequency coefficients of the image at that location after DCT transformation. These 12 subsequences are organized into a list structure, recording the coordinates of each sampling point on the exam paper image, establishing a mapping between sampling coordinates and texture fingerprints. This data structure containing 12 sets of coordinate-fingerprint pairs is labeled as the measured local texture fingerprint data.

[0086] The third sub-vector is restored to the measured semantic data of key regions. The third sub-vector contains 256 floating-point numbers, which are encoded representations of key content regions in the exam paper after semantic understanding. Key content includes text elements that directly affect the answers, such as question numbers, option markers, and formula symbols. A pre-trained character recognition model is used to perform OCR recognition on these regions. The recognition results are stored as character sequences, but for easier vectorization, the character sequences are further encoded into numerical vectors. Character embedding technology is used to convert the text into numerical representations. Character embedding uses a predefined character dictionary containing 5000 commonly used characters, including Chinese characters, English letters, numbers, punctuation marks, and mathematical symbols. Each character is mapped to a 256-dimensional dense vector, which is obtained through neural network training and reflects the semantic relationships of characters in vector space. The recognized character sequences are embedded and encoded to obtain region semantic vectors. If the exam paper contains multiple key regions, the system concatenates or aggregates the semantic vectors of all regions to ultimately form 256-dimensional measured semantic data of key regions.

[0087] Access the standard image feature set, which is stored in the server's feature database. The feature set uses the test paper task ID as the index key, with each task corresponding to a set of standard feature data. Query the database using the ID of the current test task to retrieve the corresponding standard feature record. The data structure of the standard feature record is the same as that of the test features, also containing three parts: standard macroscopic layout data, standard local texture fingerprint data, and standard key area semantic data. These standard data are benchmark reference values ​​generated by the system preprocessing the digital layout file before the printing task begins, representing the feature performance under ideal printing effects.

[0088] Retrieve standard local texture fingerprint data corresponding to the measured local texture fingerprint data. The standard local texture fingerprint data contains the same number of sampling points as the measured data, and the coordinate positions of the sampling points are completely identical. The standard texture fingerprint is the frequency domain feature extracted at the corresponding coordinate position after rasterization rendering of the digital layout file, representing the texture pattern that should be presented at that position under perfect printing conditions. Retrieve standard key region semantic data corresponding to the measured key region semantic data. The standard key region semantic data is extracted directly from the vector text object of the digital layout file without undergoing OCR recognition, thus its accuracy is guaranteed. Read the text primitives in the digital layout, obtain the string representation of the text content, perform the same embedding encoding process on the string, and generate a standard semantic vector. Begin multi-dimensional comparison calculations between the measured data and the standard data. The comparison process is divided into three independent analysis channels, using different algorithms to calculate the difference measure for three feature types: layout, texture fingerprint, and semantic content.

[0089] In the layout comparison channel, the measured centroid coordinate set is extracted from the measured macro layout data. The centroid is a geometric parameter characterizing the center position of spatial distribution. For a two-dimensional image, the centroid coordinates are calculated by weighted averaging of all pixel coordinates according to pixel weights. A standard centroid coordinate set is extracted from the standard macro layout data, using the exact same calculation method as the measured data. The measured centroid coordinate set and the standard centroid coordinate set are compared point by point to obtain the maximum geometric deviation.

[0090] In the texture fingerprint comparison channel, the measured local texture fingerprint data is converted into a measured binary encoded sequence. The texture fingerprint data contains 12 sampling points, each with 64-dimensional floating-point features. Symbolic encoding is used to convert the floating-point features into binary bits. The basic idea of ​​symbolic encoding is to retain the sign information of the numerical value while discarding the absolute magnitude. This simplification improves the robustness of the features, making them insensitive to slight numerical fluctuations. Each floating-point element of the texture fingerprint data is traversed, and its sign is determined. If the element value is greater than zero, it is encoded as binary 1; if the element value is less than or equal to zero, it is encoded as binary 0. Symbolic encoding is performed on all feature vectors of the 12 sampling points, resulting in 12 binary subsequences of length 64. These 12 binary subsequences are concatenated into a continuous long binary sequence according to the sampling point order, with a total length of 12 × 64 = 768 bits. This 768-bit binary sequence is marked as the measured binary encoded sequence. Standard local texture fingerprint data is then converted into a standard binary encoded sequence using the same symbolic encoding method as the measured data. Standard texture fingerprint data also contains 64-dimensional features from 12 sampling points. After symbolization, it generates 12 64-bit binary subsequences, which are then concatenated into a 768-bit standard binary encoded sequence.

[0091] Perform a bitwise exclusive OR logical operation on the measured binary coding sequence and the standard binary coding sequence. The exclusive OR operation is a bit-by-bit comparison operation that outputs 0 when two binary bits are the same and 1 when they are different. Initialize a result array with a length of 768, traverse each bit of the measured sequence and the standard sequence, perform the exclusive OR calculation, and store the result in the array. Count the number of target binary bits with a value of 1 in the operation result sequence. Traverse all elements of the result sequence and accumulate the number of elements with a value of 1. Calculate the logical error rate, with the formula: logical error rate = number of targets / total number of bits in the sequence. The logical error rate reflects the difference ratio between the measured texture fingerprint and the standard texture fingerprint. The higher the error rate, the more serious the texture distortion.

[0092] In the semantic content comparison channel, convert the measured key area semantic data into a measured character sequence. The semantic data is a 256-dimensional numerical vector, which is obtained through character embedding encoding. Reverse decoding needs to be performed to restore the numerical vector to a string form for semantic-level comparison. During the reverse decoding process, access the character embedding dictionary, which stores 5000 characters and their corresponding 256-dimensional embedding vectors. Calculate the cosine similarity between the measured semantic vector and all embedding vectors in the dictionary, and select the top N characters with the highest similarity as the candidate decoding results. Calculate the cosine similarity between the measured semantic vector and the embedding vector of the first character "的" in the dictionary, and select the character "选" with the highest similarity as the decoding result. Since the measured semantic data may correspond to multiple key areas, the 256-dimensional vector needs to be decomposed into multiple sub-vectors. Segment the vector according to the region quantity parameter. Assuming the test paper contains 4 key areas, divide the 256-dimensional vector into 4 64-dimensional sub-vectors. Perform reverse decoding on each 64-dimensional sub-vector to obtain 4 character sequences.

[0093] Convert the standard key area semantic data into a standard character sequence using the same reverse decoding method as the measured data. The standard semantic data is extracted from the vector text object of the digital layout, and the decoding result should be exactly the same as the text content of the design draft. Calculate the difference between the measured character sequence and the standard character sequence based on the Levenshtein distance algorithm. The Levenshtein distance is a classic measure of string similarity, defined as the minimum number of single-character edit operations required to convert one string into another. The allowed edit operations include three types: inserting a character, deleting a character, and replacing a character, and the cost of each operation is 1. Take the obtained Levenshtein distance as the character transformation cost, indicating the degree to which the measured character sequence deviates from the standard character sequence. The greater the character transformation cost, the more serious the recognition error of the key content.

[0094] After obtaining the maximum geometric deviation, logical error rate, and character transformation cost, these heterogeneous metrics need to be integrated into a unified matching score. The physical meanings and numerical ranges of the three metrics are completely different: the maximum geometric deviation is a dimensionless normalized distance, typically ranging from 0 to 0.1; the logical error rate is a percentage, ranging from 0 to 1; and the character transformation cost is an integer, ranging from 0 to tens. Directly averaging or weighted summing these metrics is unreasonable. Therefore, a three-dimensional Cartesian coordinate system is constructed based on the three differing metrics. The maximum geometric deviation is used as the X-axis component, the logical error rate as the Y-axis component, and the character transformation cost as the Z-axis component. For the above calculation example, three values ​​are obtained: maximum geometric deviation 0.00141, logical error rate 0.0677, and character transformation cost 1. These three values ​​are organized into a three-dimensional vector V = (0.00141, 0.0677, 1).

[0095] This three-dimensional vector is called the difference feature vector. Each component of the vector represents the degree to which the measured image deviates from the standard image in the corresponding dimension. The geometric meaning of the difference feature vector is: considering the standard image as the origin O=(0,0,0) in three-dimensional space, and the measured image as a point P in space, the difference feature vector is the position vector pointing from the origin to the measured point. The more similar the measured image is to the standard image, the smaller the magnitude of the difference feature vector, and the closer point P is to the origin; conversely, the more serious the printing quality problem, the larger the magnitude of the difference feature vector, and the farther point P is from the origin. The Euclidean magnitude of the difference feature vector is calculated. The Euclidean magnitude is the length of the vector in three-dimensional space, and this magnitude value is denoted as the comprehensive difference magnitude. The comprehensive difference magnitude compresses the difference information in the three dimensions into a single scalar value, which reflects the overall quality level of the measured image. The larger the magnitude, the more severe the accumulated deviation of the measured image in multiple dimensions, and the worse the printing quality. A magnitude of 0 indicates that the measured image is completely consistent with the standard image in all dimensions, and the printing quality is perfect.

[0096] Those skilled in the art will understand that, in addition to obtaining the comprehensive difference measure by calculating the Euclidean modulus of the difference feature vector, other data fusion methods can be used, such as weighted summation of the maximum geometric deviation, the logical error rate, and the character transformation cost, to output the comprehensive image matching degree.

[0097] The overall difference modulus is mapped and calculated using a preset inverse proportional normalization function. The normalization function takes the form: Matching degree = 1 / (1 + k × modulus), where k is an adjustment coefficient used to control the rate of decrease in the matching degree. The adjustment coefficient is selected based on business experience and quality standards. Assuming the system sets k=1, the matching degree calculation formula is: Matching degree = 1 / (1 + modulus). For example, substituting the overall difference modulus of 1.00229, the matching degree = 1 / (1 + 1.00229) = 1 / 2.00229 = 0.4994, or 49.94%. This matching degree score reflects the overall similarity between the actual test paper and the standard design draft. A higher matching degree indicates better printing quality, while a lower matching degree indicates more serious quality problems.

[0098] In one possible implementation, the maximum geometric deviation is calculated by analyzing the measured centroid coordinate set and the standard centroid coordinate set. Specifically, this includes: obtaining a target measured point from the measured centroid coordinate set, where the target measured point is any one of multiple measured coordinate points in the measured centroid coordinate set; calculating the Euclidean distance between the target measured point and each standard coordinate point in the standard centroid coordinate set to obtain a current distance set; selecting the minimum value from the current distance set and using it as the nearest neighbor matching distance for the target measured point; obtaining the nearest neighbor matching distance for each measured point in the measured centroid coordinate set and forming a distance sequence from the nearest neighbor matching distances for all measured points; and selecting the maximum value from the distance sequence and using it as the maximum geometric deviation.

[0099] Specifically, the target measured point is obtained from the measured centroid coordinate set, which contains five two-dimensional coordinate points, corresponding to the global centroid and the four quadrant centroids, respectively. When traversing the coordinate set, the currently processed coordinate point is the target measured point. The Euclidean distance between the target measured point and each standard coordinate point in the standard centroid coordinate set is calculated. The standard centroid coordinate set also contains five coordinate points. The spatial distance between the target measured point and each standard point is calculated using the Euclidean distance formula. The five calculated distance values ​​are organized into the current distance set. This set reflects the degree of deviation of the target measured point relative to all standard reference points, and the minimum value in the set represents the best matching position between the target measured point and the standard coordinate set. The minimum value is selected from the current distance set. The five elements of the set are traversed, and the numerical values ​​are compared to identify the minimum value. This minimum value is used as the nearest neighbor matching distance of the target measured point. This distance represents the spatial deviation between the target measured point and the most similar standard reference point; this deviation value is the local geometric deviation of the measured point.

[0100] Continue processing other points in the measured centroid coordinate set. Extract the second measured point as the new target measured point, calculate the distance between the second measured point and the 5 points in the standard coordinate set, and obtain the current distance set. Filter out the minimum value and record it as the nearest neighbor matching distance of the second measured point. Process the third measured point, calculate the distance set, and filter out the minimum value. Process the fourth measured point, calculate the distance set, and filter out the minimum value. Process the fifth measured point, calculate the distance set, and filter out the minimum value. Obtain the nearest neighbor matching distances corresponding to each of the measured points in the measured centroid coordinate set, and arrange the nearest neighbor matching distances corresponding to the 5 measured points according to the order of the measured points to form a distance sequence. Each element of this sequence corresponds to the local deviation of a measured centroid, and the overall distribution of the sequence reflects the geometric deformation pattern of the page in different spatial regions. Filter out the maximum value from the distance sequence. Traverse the 5 elements of the sequence, compare the numerical values, and identify the maximum value. Use this maximum value as the maximum geometric deviation, which quantifies the most severe geometric deformation of the page in all spatial positions and is used to judge whether the page alignment accuracy of the printed matter meets the quality standards.

[0101] For example, the received measured centroid coordinate set contains 5 points, and the standard centroid coordinate set also contains 5 points. The first point in the measured coordinate set (0.0695, 0.0753) is processed, and the distance between the first point and all points in the standard coordinate set is calculated. After obtaining the current distance set, the minimum value of 0.00100 is selected. The second measured point (0.0416, 0.0360) is processed, and the minimum distance is obtained (0.00113). The third measured point (0.1346, 0.0349) is processed, and the minimum value of 0.00113 is obtained. The fourth measured point (0.0374, 0.1468) is processed, and the minimum value of 0.00099 is obtained. The fifth measured point (0.1273, 0.1433) is processed, and the minimum value of 0.00099 is obtained. The distances of the five nearest neighbor matches are used to form a distance sequence [0.00100, 0.00113, 0.00113, 0.00099, 0.00099]. The maximum value of 0.00113 is selected as the maximum geometric deviation. This value reflects a normalized deviation of 1.13‰ in the two quadrants, which is equivalent to a centroid offset of approximately 0.34 mm in actual size. This degree of deviation is used for subsequent quality matching evaluation.

[0102] S107: If the overall image matching degree is greater than or equal to the preset matching threshold, a packaging instruction is generated to control the packaging equipment to put the target test paper into the target packaging bag and seal it.

[0103] In step S107 above, matching thresholds are set in advance based on the page quality requirements of different subject exam papers, because fixed preset matching thresholds cannot adapt to diverse quality standards. The application information is parsed to obtain the professional subject categories. Based on these categories, corresponding benchmark matching thresholds are retrieved from a pre-set database. This database stores the mapping relationship between different professional subject categories and benchmark matching thresholds; the benchmark matching threshold for humanities subjects is higher than that for science and engineering subjects and arts subjects. The information entropy of the digital page information for the first printing task is calculated and used as the page complexity coefficient. The benchmark matching threshold is dynamically adjusted using the page complexity coefficient to obtain the preset matching threshold.

[0104] Specifically, humanities subjects are primarily text-based, and any printing misalignment can cause reading difficulties, requiring stricter quality control. Science and engineering subjects include formulas and charts, tolerating a certain degree of layout deviation. Art subjects, with their image elements, are more sensitive to color deviations but relatively tolerant of geometric shifts. Furthermore, the complexity of the layout directly affects the reliability of feature extraction; simple layouts, due to sparse feature points, may lead to distorted matching calculations, necessitating dynamic threshold adjustment to avoid misjudgments. The application information is parsed to determine the major / subject category. The application information data packet is in JSON format, containing fields such as candidate number, name, applied major, and examination subjects. Extract the value of the exam subject field, such as "Advanced Mathematics" or "History of Ancient Chinese Literature," and determine the major category by matching keywords in the subject name. The classification rule base stores the mapping relationship between subject names and categories. When the subject name contains keywords such as "literature," "history," "philosophy," or "law," it is classified as a humanities and social sciences subject; when it contains keywords such as "mathematics," "physics," "chemistry," or "engineering," it is classified as a science and engineering subject; and when it contains keywords such as "fine arts," "music," or "design," it is classified as an arts subject. Parse the subject field "Advanced Mathematics" in the application information and identify the major subject category as science and engineering by the keyword "mathematics."

[0105] The database retrieves the corresponding benchmark matching threshold based on the subject category. The database uses a key-value pair storage structure, where the key is an enumerated value for the subject category and the value is the corresponding benchmark matching threshold. The mapping relationship stored in the database is as follows: 0.95 for humanities subjects, 0.88 for science and engineering subjects, and 0.85 for arts subjects. This differentiated threshold setting stems from the different quality tolerances of exam papers across different disciplines. Humanities papers, primarily composed of dense text, are susceptible to text misalignment or paragraph errors due to minor layout misalignment, affecting the accuracy of students' answers. Therefore, a higher matching threshold of 0.95 is set, requiring a layout feature similarity of over 95% before encapsulation. Science and engineering papers contain elements such as mathematical formulas and physics diagrams, which typically exist as independent modules. Slight layout misalignment does not cause information confusion, so the matching threshold is lowered to 0.88. Arts papers are less sensitive to geometric distortions than to color deviations in their image content; layout matching prioritizes color consistency over precise alignment, hence the matching threshold is set to 0.85. Based on the identified science and engineering subject categories, a baseline matching threshold of 0.88 was obtained from the database query.

[0106] The information entropy of the digital layout information for the first printing task is calculated as the layout complexity coefficient. The digital layout information is stored in the form of a grayscale image matrix, where each element represents the grayscale value of a pixel, ranging from 0 to 255. The frequency of each grayscale level in the image is statistically analyzed to construct a grayscale distribution histogram. For example, if the layout image resolution is 300 dpi and the size is 2480×3508 pixels, all pixels are traversed, and the grayscale value 0 appears 23500 times, the grayscale value 1 appears 18200 times, and so on, up to the grayscale value 255 appearing 31000 times. The probability distribution of each grayscale level is calculated: the probability P(i) of grayscale value i = the number of times that grayscale value appears / the total number of pixels. The total number of pixels is calculated as 2480×3508=8699840, and the probability P(0) of grayscale value 0 = 23500 / 8699840 = 0.0027. The probabilities of the remaining grayscale levels are calculated sequentially.

[0107] The layout complexity coefficient is calculated using the information entropy formula. It iterates through 256 gray levels, calculating P(i) × log₂P(i) for each non-zero gray level; for example, the probability for gray level 0 is -0.0230. The results of all 256 gray levels are summed, yielding an information entropy H = 7.42. This information entropy value reflects the uniformity of gray level distribution in the layout image. Higher information entropy indicates richer gray levels, more complex content, denser feature point distribution, and higher reliability of matching calculations. Conversely, low information entropy indicates simpler content, sparser feature points, and susceptibility to noise interference in matching calculations. The system uses the calculated information entropy of 7.42 as the layout complexity coefficient.

[0108] The system dynamically adjusts the baseline matching threshold using a layout complexity coefficient. The preset complexity threshold is 6.0, derived from extensive sample statistics. When the information entropy is below 6.0, the layout is considered feature-sparse. The system compares the layout complexity coefficient (7.42) with the preset threshold (6.0) and determines that the current layout complexity is sufficient, indicating high reliability of feature extraction. The adjustment formula is: Preset matching threshold = Baseline matching threshold × (1 - α × (H0 - H) / H0), where α is the adjustment coefficient (0.08), H0 is the standard complexity reference value (8.0), and H is the actual layout complexity coefficient. Substituting the values, the preset matching threshold is calculated to be 0.8749. The design logic of this adjustment mechanism is that when the layout complexity is close to the standard value of 8.0, the adjustment coefficient is close to 1, and the threshold remains unchanged; when the layout complexity decreases, the adjustment coefficient slightly lowers the threshold to compensate for the overestimation of the matching degree caused by feature sparsity, avoiding the misjudgment of unqualified papers as qualified.

[0109] Furthermore, a trial production process was implemented to establish statistical benchmarks before formal production. A preset number of sample rolls (30 copies) were produced on both the first and second printing machines during the trial production. Both machines were set to use the same layout data and process parameters, continuously producing 30 test rolls. During the trial production, conditions such as temperature, humidity, paper tension, and ink concentration under normal production conditions were simulated. Image acquisition and matching degree calculation were performed on each of the 30 sample rolls, acquiring front and back images, extracting layout features, and calculating the overall image matching degree. The expected value of the sample roll matching degree set was calculated. The 30 matching degree values ​​were summed, resulting in a total of 26.4496. Dividing this by the sample size of 30 yielded the expected value μ = 26.4496 / 30 = 0.8817. This expected value represents the average matching degree level of test rolls under the current equipment combination and process conditions. The standard deviation of the sample roll matching degree set was calculated to quantify the fluctuation range of the matching degree. For example, calculate the squared deviation of each sample value from the expected value. For instance, for the first sample, (0.8821-0.8817)²=0.00000016, and so on for all 30 samples. Summing up the 30 squared deviations gives a total of 0.000092. Dividing this by the sample size of 30 gives the variance of 0.00000307. Taking the square root of the variance gives the standard deviation σ=0.00175.

[0110] Subtract three times the standard deviation from the mathematical expectation value to obtain the preset matching threshold. Calculate the preset matching threshold = 0.8765. This threshold setting is based on the 3σ principle of the normal distribution. Under the assumption of the normal distribution, the matching degrees of 99.73% of the qualified samples will fall within the interval of the expectation value plus or minus three times the standard deviation. Samples with a matching degree lower than the expectation value minus three times the standard deviation are regarded as outliers. Use this statistical threshold as the decision criterion for the encapsulation decision to ensure that only a very low probability of unqualified products pass the quality inspection, and at the same time avoid misjudging qualified products within the normal fluctuation range as unqualified.

[0111] After determining the preset matching threshold, compare the comprehensive image matching degree with the preset matching threshold. When the comprehensive image matching degree is greater than or equal to the preset matching threshold, determine that the target test paper and the target encapsulation bag belong to the same examinee, and then generate an encapsulation instruction to control the encapsulation device to load the target test paper into the target encapsulation bag and seal it. For example, receive a printing task for a batch of advanced mathematics test papers, analyze the application information to identify the subject category as science and engineering, and retrieve the reference matching threshold of 0.88 from the preset database. Load the digital layout information of the test paper, calculate the grayscale distribution histogram of the image, count the probability distribution of 256 gray levels, and calculate the layout complexity coefficient of 7.42 using the information entropy formula. Determine that the complexity is higher than the threshold of 6.0, and use the correction formula to adjust the reference matching threshold of 0.88 to 0.8749. Use 0.8749 as the final preset matching threshold. In formal production, calculate the comprehensive image matching degree of a certain test paper to be 0.86, determine that this value is greater than the preset matching threshold of 0.8749, generate an encapsulation instruction, control the robotic arm of the encapsulation device to grab the target test paper, accurately place the target test paper into the target seal bag, and start the heat sealing device to seal the mouth of the target encapsulation bag to complete the automated encapsulation process of the qualified test paper.

[0112] In a possible implementation manner, to prevent page order disorder, the OCR engine of the system automatically recognizes the page number identifier in the upper right corner of the test paper, such as "Page 1 of 12 Pages", compares the recognition result with the expected page number, and if they do not match, triggers a page order exception alarm. At the same time, a unique two-dimensional code is printed on the corners of each page of the test paper, which contains the candidate number plus the page number information. When scanning, it is synchronously read to ensure the dual matching of the page and the candidate identity. For the calculation of the comprehensive image matching degree of multi-page test papers, use the arithmetic mean of the matching degrees of the front and back sides of all pages. The calculation formula is that the comprehensive matching degree of the test paper is equal to the sum of the front and back matching degrees of all pages divided by the total number of pages, that is, 2 times the number of pages. For example, a 12-page test paper contains 24 pages. If the matching degree range of each page is between 0.89 and 0.93, the comprehensive matching degree is about 0.91. If the preset matching threshold is 0.8765, it is determined to be qualified and an encapsulation instruction is generated. Through the above comparison of the image matching degrees of single test papers and stacks of multiple test papers, ensure that the test papers received by each candidate meet the quality standards in terms of page number integrity, printing quality, and identity matching.

[0113] S108: If the overall image matching degree is less than the preset matching threshold, an anomaly processing signal is generated.

[0114] In S108 above, if the overall image matching degree is less than a preset matching threshold, an anomaly handling signal is generated, specifically including: when the overall image matching degree is less than the preset matching threshold, obtaining the identity code corresponding to the target test paper, storing the identity code and the overall image matching degree in the production log database; determining whether the overall image matching degree is less than a preset serious error threshold, wherein the preset serious error threshold is less than the preset matching threshold; if the overall image matching degree is less than the preset serious error threshold, determining that the target test paper and the target packaging bag do not match, generating a reprint instruction for the identity code based on the identity mismatch, and printing according to the reprint instruction; if the overall image matching degree is greater than or equal to the preset serious error threshold, generating a manual review prompt signal to prompt the operator to perform a visual inspection of the target test paper.

[0115] Specifically, after determining that the overall image matching degree is less than the preset matching threshold, the identity code corresponding to the target exam paper is immediately obtained. The identity code has been generated and associated with each exam paper during the printing task initialization stage, and the encoding format is "year-batch number-subject code-examinee number-serial number". The currently processed exam paper object is read from the exam paper task queue in memory, the identity code attribute field of the object is accessed, and the complete identity code string is extracted. Suppose that the overall image matching degree of a certain exam paper is detected to be 0.8421, and the preset matching threshold is 0.8765. It is determined that 0.8421 is less than 0.8765, triggering the exception handling process, and the identity code "2026-01-MA101xxx-00127" is read from the exam paper object.

[0116] The identification code and overall image matching score are stored in the production log database. The production log database uses a relational database structure and includes a quality record table. The table structure defines fields such as record ID, timestamp, identification code, overall image matching score, and processing status. The current timestamp "2026-02-11 14:35:22" is generated, and a database insert statement is constructed to write the identification code "2026-01-MA101-xxx-00127", the overall image matching score of 0.8421, the timestamp, and the processing status "pending" into the quality record table. The database storage mechanism ensures that the quality data of each non-conforming test paper is permanently saved. Production managers can query the complete inspection history of a test paper using its identification code, analyze the matching score value to determine the severity of quality problems, and statistically analyze the non-conforming rate for specific time periods or specific printing equipment.

[0117] The system determines whether the overall image matching degree is less than a preset critical error threshold. The preset critical error threshold is set to 0.70 in the system configuration parameters. This threshold is based on extensive historical data analysis: when the content on both sides of the exam paper is completely mismatched, the overall image matching degree is usually below 0.70 due to the completely different layout, text content, and image features; when the content on both sides of the exam paper matches but there are printing offsets or color differences, the overall image matching degree generally fluctuates between 0.70 and the preset matching threshold because the basic layout structure and content features remain consistent. The system compares the values ​​to determine if 0.8421 is less than 0.70. The calculation shows that 0.8421 is greater than 0.70, therefore the exam paper is not classified as a critical error. When the overall image matching degree is less than the preset critical error threshold, the identity mismatch processing procedure is executed. The cause of this extremely low matching degree is usually due to exam paper mixing during the packaging process. For example, the front of candidate xxx3's physics exam paper might be mistakenly placed into candidate xxx4's packaging bag, resulting in inconsistent identity codes on both sides. The system determines that the target exam paper and the target packaging bag do not match, which could lead to serious exam mishaps. For example, the exam paper received by the candidate might not match the registered subject, or the content on both sides might belong to different subjects, making it impossible to answer correctly. Based on the identity mismatch, a reprint instruction is generated for the identity code. A reprint instruction data structure is constructed, including fields such as instruction type "reprint", identity code "2026-01-PH102-xxx3-00089", reason code "identity mismatch", and priority "urgent". The reprint instruction is sent to the printing task scheduling module, which inserts the instruction at the front of the printing task queue to ensure priority processing. Simultaneously, a void instruction is generated, controlling the sorting mechanism of the packaging equipment to transfer the non-compliant exam paper with a matching degree of 0.6235 from the production line to the void collection box, preventing it from continuing into subsequent processes.

[0118] Printing is initiated according to the reprint instruction. The printing task scheduling module parses the reprint instruction, extracts the identification code "2026-01-PH102-xxx-00089", and queries the database for the corresponding digital layout data file and printing process parameters. The first printing equipment loads the front layout data of candidate xxx's physics exam paper, setting printing parameters including A3 paper size, 300dpi printing resolution, and standard ink density. The first printing equipment executes the printing operation, printing the front content of the exam paper on new paper. The first printing equipment then loads the corresponding back layout data, printing the back content of the exam paper on the back of the same sheet of paper. After printing, the newly printed exam papers are assigned the same identification code "2026-01-PH102-xxx-00089" and re-entered into the quality inspection process. Steps such as image acquisition, feature extraction, and matching degree calculation are performed. Once the overall image matching degree of the new exam paper reaches the preset matching threshold, the packaging operation is then executed. This reprint mechanism ensures that every candidate receives a correctly identified and high-quality exam paper, preventing production errors from affecting the fairness of the exam.

[0119] Furthermore, when the overall image matching degree is greater than or equal to the preset serious error threshold, a manual review process is executed. If the overall image matching degree of 0.8421 is determined to be greater than the preset serious error threshold of 0.70 but less than the preset matching threshold of 0.8765, the exam paper is in a critical quality zone and may have minor printing offsets, color difference fluctuations, or paper deformation, but the identity matching of the front and back content is correct. A manual review prompt signal is generated, presented in several forms: a pop-up prompt window appears on the monitoring interface of the central control console, displaying the exam paper's identity code "2026-01-MA101-xxx-00127", the overall image matching degree of 0.8421, and thumbnails of the collected front and back images; a buzzer sound and flashing orange warning light are emitted through an audible and visual alarm device to alert the operator; the production line's conveyor mechanism is controlled to pause the exam paper at the quality inspection station, awaiting manual inspection.

[0120] The operator is prompted to perform a visual inspection of the target exam paper. Upon receiving the manual review prompt signal, the operator retrieves the exam paper with the identification code "2026-01-MA101-xxx-00127" from the quality control station. The operator executes the visual inspection procedure, observing the printing quality of the exam paper: checking for defects such as blurriness, ghosting, and color blocks; measuring the cutting accuracy of the exam paper edges to ensure they meet specifications; verifying the alignment of the content on both sides; and confirming that the QR code or barcode is clear and identifiable. The operator compares the actual exam paper with the standard layout image displayed on the monitoring interface to determine the specific reason for the reduced matching accuracy. If the operator determines that the exam paper quality still meets the usage requirements (e.g., only slight color differences that do not affect text recognition and answering), the operator enters the approval command in the console, updates the processing status of the exam paper in the production log database to "Manual Approval," and resubmits the exam paper into the packaging process. If the operator determines that the test paper is not up to standard, for example, if the layout is severely off-center, causing the question numbers and answer areas to be misaligned, the operator will input a rejection command, mark the test paper as invalid, and trigger the reprint process.

[0121] This application also provides a device for synchronously printing candidate information on exam papers and packaging bags. Figure 2 This is a schematic diagram of a device for synchronously printing candidate information on exam papers and packaging bags, as provided in an embodiment of this application. (Refer to...) Figure 2 The device includes an acquisition unit 201, a processing unit 202, and an evaluation unit 203. The acquisition unit 201, in response to the production instruction, acquires the application information corresponding to the candidate's identity information, determines the exam question information based on the application information, and generates a first printing task and a second printing task according to the candidate's identity information and the exam question information. The first printing task is used to print the exam paper with the exam question information, and the second printing task is used to print the candidate's identity information on the packaging bag. Processing unit 202 generates a corresponding standard image feature set based on the digital layout information of the first printing task, and associates the standard image feature set with the examinee's identity information; controls the first printing equipment to perform the first printing task to obtain the target test paper, and controls the second printing equipment to perform the second printing task to obtain the target packaging bag, and transports the target test paper and the target packaging bag to a preset verification position; after confirming that the target test paper and the target packaging bag are in the preset verification position, it acquires a measured full-size image of the target test paper and identifies the identity information on the target packaging bag; it retrieves the corresponding standard image feature set according to the identity information, performs feature extraction on the measured full-size image, and obtains a measured feature vector group; it compares and calculates the measured feature vector group with the standard image feature set to obtain a comprehensive image matching degree. Evaluation unit 203 generates a packaging instruction if the overall image matching degree is greater than or equal to the preset matching threshold, and controls the packaging device to put the target test paper into the target packaging bag and seal it; if the overall image matching degree is less than the preset matching threshold, it generates an abnormal processing signal.

[0122] In one possible implementation, the processing unit 202 is used to identify all independent pixel connected regions in the measured full-frame image and calculate the bounding box of each independent pixel connected region; the acquisition unit 201 is used to acquire the centroid coordinates, area ratio, and aspect ratio of the bounding box, arrange the centroid coordinates, area ratio, and aspect ratio of all independent pixel connected regions in a preset order to obtain topological geometric features, and use the topological geometric features as macroscopic layout data; the processing unit 202 is used to divide the measured full-frame image based on preset sampling rules to obtain multiple local verification regions, extract image texture features from each local verification region, and use the image texture features as local texture fingerprint data; parse the digital layout file corresponding to the first printing task to obtain the preset coordinate range of the examinee's identity information in the digital layout file; map the preset coordinate range to the measured full-frame image to obtain the region of interest; perform optical character recognition on the region of interest to obtain key region semantic data; normalize and splice the macroscopic layout data, local texture fingerprint data, and key region semantic data to obtain a measured feature vector group.

[0123] In one possible implementation, the processing unit 202 is used to parse the digital layout information of the first printing task, extract high-frequency vector graphics primitives from the digital layout information, construct a virtual grid layer based on the distribution density of the high-frequency vector graphics primitives, and calculate the information entropy weight of each grid cell; generate a dynamic pseudo-random sequence according to the information entropy weight, and use the dynamic pseudo-random sequence to filter the virtual grid layer to obtain a discrete coordinate point set; map the discrete coordinate point set onto the measured full-frame image, and use a preset irregular polygon window to crop image segments with the mapped points as the center; perform discrete cosine transform on the cropped image segments, filter out the DC component, extract the intermediate frequency coefficient matrix, and perform inverse transform on the intermediate frequency coefficient matrix to restore it to the spatial domain image, thereby obtaining the local verification region after frequency domain filtering.

[0124] In one possible implementation, the acquisition unit 201 is used to acquire the dimension length of the measured feature vector group, and to segment the measured feature vector group according to the dimension length and the splicing order to obtain a first sub-vector, a second sub-vector, and a third sub-vector; the processing unit 202 is used to restore the first sub-vector to measured macroscopic layout data, the second sub-vector to measured local texture fingerprint data, and the third sub-vector to measured key region semantic data; retrieve standard macroscopic layout data corresponding to the measured macroscopic layout data, standard local texture fingerprint data corresponding to the measured local texture fingerprint data, and standard key region semantic data corresponding to the measured key region semantic data from the standard image feature set; extract the measured centroid coordinate set from the measured macroscopic layout data, extract the standard centroid coordinate set from the standard macroscopic layout data, calculate the maximum geometric deviation between the measured centroid coordinate set and the standard centroid coordinate set; and convert the measured local texture fingerprint data into measured... The standard local texture fingerprint data is converted into a standard binary encoded sequence. A bitwise XOR operation is performed between the binary encoded sequence and the standard binary sequence to obtain the result. The number of targets with binary bits set to 1 in the result is counted, and this number is divided by the total number of bits in the sequence to obtain the logical error rate. The measured key region semantic data is converted into a measured character sequence, and the standard key region semantic data is converted into a standard character sequence. Based on the Levenstein distance algorithm, the minimum number of single-character editing operations required to convert the measured character sequence into a standard character sequence is calculated, and this number of editing operations is used as the character transformation cost. A three-dimensional Cartesian coordinate system is constructed based on the maximum geometric deviation, the logical error rate, and the character transformation cost, serving as the components of the X, Y, and Z axes to obtain the difference feature vector. The Euclidean magnitude of the difference feature vector is calculated to obtain the comprehensive difference magnitude. The comprehensive difference magnitude is mapped and calculated based on a preset inverse proportional normalization function to obtain the comprehensive image matching degree.

[0125] In one possible implementation, the acquisition unit 201 is used to acquire a target measured point from the measured centroid coordinate set, where the target measured point is any one of the multiple measured coordinate points in the measured centroid coordinate set; the processing unit 202 is used to calculate the Euclidean distance between the target measured point and each standard coordinate point in the standard centroid coordinate set to obtain the current distance set; the minimum value is selected from the current distance set and used as the nearest neighbor matching distance of the target measured point; the acquisition unit 201 is used to acquire the nearest neighbor matching distance corresponding to each of all measured points in the measured centroid coordinate set and form a distance sequence from the nearest neighbor matching distances corresponding to all measured points; the processing unit 202 is used to select the maximum value from the distance sequence and use the maximum value as the maximum geometric deviation.

[0126] In one possible implementation, the acquisition unit 201 is used to acquire the theoretical weight range of the target test paper and acquire the measured weight value of the target test paper; the processing unit 202 is used to determine whether the measured weight value is within the theoretical weight range; if the measured weight value is within the theoretical weight range, the physical state of the target test paper is determined to be normal, and the measured full-frame image of the target test paper is acquired; if the measured weight value is not within the theoretical weight range, the physical state of the target test paper is determined to be abnormal, and a weight abnormality processing signal is generated.

[0127] In one possible implementation, the acquisition unit 201 is used to acquire the identity code corresponding to the target test paper when the overall image matching degree is less than a preset matching threshold, and store the identity code and the overall image matching degree in the production log database; the processing unit 202 is used to determine whether the overall image matching degree is less than a preset serious error threshold, wherein the preset serious error threshold is less than the preset matching threshold; the evaluation unit 203 is used to determine that the target test paper and the target packaging bag do not match if the overall image matching degree is less than the preset serious error threshold, generate a reprint instruction for the identity code based on the identity mismatch, and print according to the reprint instruction; if the overall image matching degree is greater than or equal to the preset serious error threshold, generate a manual review prompt signal to prompt the operator to perform a visual inspection of the target test paper.

[0128] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0129] This application also discloses an electronic device. (See reference...) Figure 3 , Figure 3 This application provides a schematic diagram of the structure of an electronic device. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 302, and at least one communication bus 305.

[0130] The communication bus 305 is used to enable communication between these components.

[0131] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0132] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0133] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 302, and by calling data stored in memory 302. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and application requests; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0134] The memory 302 may include random access memory (RAM) or read-only memory. Optionally, the memory 302 may include a non-transitory computer-readable storage medium. The memory 302 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 302 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc. The data storage area may store data involved in the various method embodiments described above. Optionally, the memory 302 may also be at least one storage device located remotely from the aforementioned processor 301.

[0135] like Figure 3As shown, the memory 302, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for synchronously printing candidate information on the exam papers and packaging bags.

[0136] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call the application program that stores the candidate information of the test paper and the packaging bag in the memory 302 for synchronous printing. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.

[0137] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.

[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0141] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0142] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0143] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.

Claims

1. A method for simultaneously printing examinee information on examination papers and packaging bags, characterized in that, The method includes: In response to a production order, the system obtains the application information corresponding to the candidate's identity information, determines the exam question information based on the application information, and generates a first printing task and a second printing task according to the candidate's identity information and the exam question information. The first printing task is used to print the exam paper with the exam question information, and the second printing task is used to print the candidate's identity information on the packaging bag. Based on the digital layout information of the first printing task, a corresponding standard image feature set is generated, and the standard image feature set is associated with the examinee's identity information; Control the first printing equipment to perform the first printing task to obtain the target test paper, and control the second printing equipment to perform the second printing task to obtain the target packaging bag, and transport the target test paper and the target packaging bag to the preset verification position; After confirming that the target test paper and the target packaging bag are in the preset verification position, a full-size measured image of the target test paper is obtained, and the identification information on the target packaging bag is identified; Based on the identity information, the corresponding standard image feature set is retrieved, and feature extraction is performed on the measured full-frame image to obtain a measured feature vector group. The measured feature vector set is compared with the standard image feature set to obtain the comprehensive image matching degree. If the overall image matching degree is greater than or equal to the preset matching threshold, a packaging instruction is generated to control the packaging device to put the target test paper into the target packaging bag and seal it. If the overall image matching degree is less than the preset matching threshold, an anomaly processing signal is generated.

2. The method according to claim 1, characterized in that, The step of extracting features from the measured full-frame image to obtain a set of measured feature vectors specifically includes: Identify all independent pixel connected regions in the measured full-frame image, and calculate the bounding box of each independent pixel connected region; Obtain the centroid coordinates, area percentage, and aspect ratio of the bounding box of the outer rectangle. Arrange the centroid coordinates, area percentage, and aspect ratio of all independent pixel connected regions in a preset order to obtain the topological geometric features. Use the topological geometric features as macro layout data. The measured full-frame image is divided based on a preset sampling rule to obtain multiple local verification regions. Image texture features are extracted from each of the local verification regions and used as local texture fingerprint data. The digital layout file corresponding to the first printing task is parsed to obtain the candidate's identity information within a preset coordinate range in the digital layout file; The preset coordinate range is mapped onto the measured full-frame image to obtain the region of interest; Optical character recognition is performed on the region of interest to obtain semantic data of the key region. The macro layout data, the local texture fingerprint data, and the key region semantic data are normalized and concatenated to obtain the measured feature vector group.

3. The method according to claim 2, characterized in that, The measured full-frame image is divided based on a preset sampling rule to obtain multiple local verification regions, specifically including: The digital layout information of the first printing task is analyzed, high-frequency vector graphics primitives are extracted from the digital layout information, a virtual grid layer is constructed based on the distribution density of the high-frequency vector graphics primitives, and the information entropy weight of each grid cell is calculated. A dynamic pseudo-random sequence is generated based on the information entropy weight, and the virtual grid layer is filtered using the dynamic pseudo-random sequence to obtain a set of discrete coordinate points; The discrete coordinate point set is mapped onto the measured full-frame image, and image segments are extracted using a preset irregular polygonal window centered on the mapped points. The extracted image segment is subjected to discrete cosine transform to filter out the DC component and extract the intermediate frequency coefficient matrix. The intermediate frequency coefficient matrix is ​​then inversely transformed to restore the spatial domain image, thus obtaining the local verification region after frequency domain filtering.

4. The method according to claim 2, characterized in that, The step of comparing the measured feature vector set with the standard image feature set to obtain the comprehensive image matching degree specifically includes: Obtain the dimension length of the measured feature vector group, and segment the measured feature vector group according to the dimension length and the concatenation order to obtain a first sub-vector, a second sub-vector, and a third sub-vector; The first sub-vector is restored to the measured macroscopic layout data, the second sub-vector is restored to the measured local texture fingerprint data, and the third sub-vector is restored to the measured key area semantic data. Retrieve standard macro layout data corresponding to the measured macro layout data, standard local texture fingerprint data corresponding to the measured local texture fingerprint data, and standard key region semantic data corresponding to the measured key region semantic data from the standard image feature set. The measured centroid coordinate set is extracted from the measured macroscopic layout data, and the standard centroid coordinate set is extracted from the standard macroscopic layout data. The measured centroid coordinate set and the standard centroid coordinate set are calculated to obtain the maximum geometric deviation. The measured local texture fingerprint data is converted into a measured binary encoding sequence, the standard local texture fingerprint data is converted into a standard binary encoding sequence, and a bitwise XOR operation is performed between the binary encoding sequence and the standard binary sequence to obtain the operation result. The number of targets with binary bits set to 1 in the operation result is counted, and the number of targets is divided by the total number of bits in the sequence to obtain the logical error rate; The measured key region semantic data is converted into a measured character sequence, and the standard key region semantic data is converted into a standard character sequence. Based on the Levenstein distance algorithm, the minimum number of single-character editing operations required to transform the measured character sequence into the standard character sequence is calculated, and the number of editing operations is used as the character transformation cost. A three-dimensional Cartesian coordinate system is constructed based on the maximum geometric deviation, the logical error rate, and the character transformation cost, respectively, as the components of the X-axis, Y-axis, and Z-axis, to obtain the difference feature vector; Calculate the Euclidean magnitude of the differential eigenvectors to obtain the comprehensive differential magnitude; The comprehensive difference modulus is mapped and calculated based on a preset inverse proportional normalization function to obtain the comprehensive image matching degree.

5. The method according to claim 4, characterized in that, The calculation of the maximum geometric deviation using the measured centroid coordinate set and the standard centroid coordinate set specifically includes: The target measured point is obtained from the set of measured centroid coordinates, and the target measured point is any one of the multiple measured coordinate points in the set of measured centroid coordinates. Calculate the Euclidean distance between the target measured point and each standard coordinate point in the standard centroid coordinate set to obtain the current distance set; The minimum value is selected from the current distance set and used as the nearest neighbor matching distance of the target measured point; Obtain the nearest neighbor matching distance of each of the measured points in the measured centroid coordinate set, and form a distance sequence from the nearest neighbor matching distances of each of the measured points. The maximum value is selected from the distance sequence and used as the maximum geometric deviation.

6. The method according to claim 1, characterized in that, Before acquiring the measured full-size image of the target test paper and identifying the identification information on the target packaging bag, the method further includes: Obtain the theoretical weight range of the target test paper, and obtain the measured weight value of the target test paper; Determine whether the measured weight value is within the theoretical weight range; If the measured weight value is within the theoretical weight range, the physical state of the target test paper is determined to be normal, and the measured full-frame image of the target test paper is obtained. If the measured weight value is not within the theoretical weight range, the physical state of the target test paper is determined to be abnormal, and a weight abnormality processing signal is generated.

7. The method according to claim 1, characterized in that, If the overall image matching degree is less than the preset matching threshold, an anomaly processing signal is generated, specifically including: When the overall image matching degree is less than the preset matching threshold, the identity code corresponding to the target test paper is obtained, and the identity code and the overall image matching degree are stored in the production log database; Determine whether the overall image matching degree is less than a preset severe error threshold, wherein the preset severe error threshold is less than the preset matching threshold; If the overall image matching degree is less than the preset serious error threshold, it is determined that the target test paper and the target packaging bag do not match. Based on the identity mismatch, a reprint instruction for the identity code is generated, and printing is carried out according to the reprint instruction. If the overall image matching degree is greater than or equal to the preset serious error threshold, a manual review prompt signal is generated to prompt the operator to perform a visual inspection of the target test paper.

8. A device for synchronously printing examinee information on examination papers and packaging bags, characterized in that, The device includes an acquisition unit, a processing unit, and an evaluation unit. The acquisition unit, in response to a production instruction, acquires the application information corresponding to the candidate's identity information, determines the exam question information based on the application information, and generates a first printing task and a second printing task according to the candidate's identity information and the exam question information. The first printing task is used to print the exam paper with the exam question information, and the second printing task is used to print the candidate's identity information on the packaging bag. The processing unit generates a corresponding standard image feature set based on the digital layout information of the first printing task, and associates the standard image feature set with the examinee's identity information; The system controls a first printing device to perform the first printing task to obtain a target test paper, and controls a second printing device to perform the second printing task to obtain a target packaging bag. The target test paper and the target packaging bag are then transported to a preset verification position. After confirming that the target test paper and the target packaging bag are at the preset verification position, a measured full-frame image of the target test paper is acquired, and the identification information on the target packaging bag is identified. Based on the identification information, the corresponding standard image feature set is retrieved, and feature extraction is performed on the measured full-frame image to obtain a measured feature vector group. The measured feature vector group is compared and calculated with the standard image feature set to obtain a comprehensive image matching degree. If the overall image matching degree is greater than or equal to a preset matching threshold, the evaluation unit generates a packaging instruction to control the packaging device to pack the target test paper into the target packaging bag and seal it; if the overall image matching degree is less than the preset matching threshold, an abnormal processing signal is generated.

9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.