A printing and stamping scanning method and device, computer equipment and medium

CN122348990BActive Publication Date: 2026-09-25ZHEJIANG SUNON FURNITURE MFG
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610827265.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-09-25
Estimated Expiration
2046-06-09

AI Technical Summary

Technical Problem

[0004]本发明实施例提供了一种打印盖章扫描方法、装置、计算机设备及介质,旨在解决现有技术中的打印盖章扫描方案缺乏面向物理介质特性的深度感知能力的问题

Benefits of technology

[0009]本发明实施例提供一种打印盖章扫描方法,包括对获取的待处理原始电子文档进行版面语义分割与几何形变预补偿,再结合预采集的纸张克重参数与定影温度参数生成动态盖章目标坐标矩阵;基于所述动态盖章目标坐标矩阵分别进行多轴曲线轨迹规划与介质阻抗测算,生成印鉴盖印联合驱动指令集;执行所述印鉴盖印联合驱动指令集,同时采用可见光、近红外与紫外三波段交替照明并配合光度立体法进行数据采集,得到多维度初步扫描数据张量;对所述多维度初步扫描数据张量分别进行印泥剥离处理与孪生网络多尺度特征比对,构建得到印鉴异常评估矩阵;根据所述印鉴异常评估矩阵驱动预设的编解码生成网络重构印鉴图层,并通过拉普拉斯金字塔多频段融合,输出高保真目标归档文件;提取所述高保真目标归档文件的字节哈希指纹与纸张纤维散斑特征,并根据所述字节哈希指纹和纸张纤维散斑特征生成双重溯源防篡改结果。本发明通过将版面语义分割、几何形变预补偿、多光谱与光度立体联合扫描、孪生网络印鉴异常评估、编解码生成网络重构融合以及纸张纤维散斑与字节哈希双重锚定等技术手段贯穿于打印、盖章、扫描与归档的全流程,实现了面向物理介质特性的深度感知与全流程管控,有效提升了盖章定位精度、印鉴真伪鉴别以及归档文件的防篡改溯源能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122348990B_ABST
    Figure CN122348990B_ABST
Patent Text Reader

Abstract

The application discloses a printing, stamping and scanning method and device, computer equipment and medium. The method comprises the following steps: locating the stamping coordinates through layout semantic segmentation and geometric deformation pre-compensation; reconstructing the seal layer and fusing and outputting the archive file after multi-spectral scanning and twin network evaluation; finally, extracting the hash fingerprint and fiber speckle to generate a double tamper-proof result. The application applies technical means such as layout semantic segmentation, geometric deformation pre-compensation, multi-spectral and photometric stereo joint scanning, twin network seal anomaly evaluation, coding and decoding generation network reconstruction fusion, and paper fiber speckle and byte hash double anchoring to the whole process of printing, stamping, scanning and archiving, realizes deep perception and whole-process control oriented to the characteristics of physical media, and effectively improves the stamping positioning accuracy, seal authenticity identification and anti-tampering traceability of the archive file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a printing and stamping scanning method, apparatus, computer equipment, and medium. Background Technology

[0002] With the development of smart office equipment, all-in-one printers, stampers, and scanners are gradually being introduced into applications such as document approval and contract signing. The aim is to integrate the printing, stamping, and scanning processes, which previously required manual intervention, into an automated workflow, thereby improving document processing efficiency and reducing operating costs. Currently, existing printing, stamping, and scanning technologies typically use fixed coordinates or simple template matching to determine the stamping position. After stamping, a single white light optical scan acquires a planar image of the document. Then, a template comparison method based on the image pixels is used for preliminary verification of the seal. Finally, conventional digital signatures or hash verification methods are used to protect the archived documents from tampering.

[0003] However, the aforementioned solutions remain at a simple two-dimensional image processing level throughout the entire process, lacking in-depth perception and closed-loop control capabilities tailored to the physical characteristics of the medium. In the stamping positioning stage, the fixed coordinate positioning method fails to consider the physical phenomenon of uneven paper shrinkage caused by the high temperature of the all-in-one printer's fixing component. This results in the actual stamping position deviating from the preset coordinates, easily causing the seal to obscure key text or deviate from the expected area. In the scanning verification stage, optical scanning using a single white light band can only acquire two-dimensional color distribution information of the imprint, failing to perceive the three-dimensional microscopic morphological characteristics formed by the penetration and diffusion of ink along the paper fibers during the actual physical stamping process. This makes it difficult for the system to physically distinguish between genuine stamps and counterfeit printing. In the archiving and anti-tampering stage, relying solely on the digital file's own verification mechanism is insufficient to establish a unique association between electronic files and their corresponding physical paper media. Once the original paper document is replaced or reproduced, the existing mechanism cannot provide physical-level traceability verification evidence. In summary, existing printing and stamping scanning solutions are inadequate in terms of stamp positioning accuracy, authenticity verification of seals, and anti-tampering and traceability capabilities of archived documents, meaning they lack deep perception capabilities tailored to the characteristics of physical media. Summary of the Invention

[0004] This invention provides a printing and stamping scanning method, apparatus, computer equipment, and medium, aiming to solve the problem that existing printing and stamping scanning solutions lack depth perception capabilities oriented towards the characteristics of physical media.

[0005] In a first aspect, embodiments of the present invention provide a printing and stamping scanning method, comprising: The acquired original electronic documents to be processed are subjected to semantic segmentation of the layout and pre-compensation of geometric deformation. Then, the dynamic stamping target coordinate matrix is ​​generated by combining the pre-collected paper weight parameters and fixing temperature parameters. Based on the dynamic stamping target coordinate matrix, multi-axis curve trajectory planning and dielectric impedance calculation are performed respectively to generate a joint driving instruction set for stamping. The seal stamping joint driving instruction set is executed, and data acquisition is carried out by alternating illumination of visible light, near-infrared and ultraviolet three bands and in conjunction with photometric stereo method to obtain multi-dimensional preliminary scan data tensor. The tensors of the multi-dimensional preliminary scan data are subjected to ink pad stripping processing and twin network multi-scale feature comparison to construct an anomaly assessment matrix for the seal impression. The seal anomaly assessment matrix drives a preset encoding and decoding generation network to reconstruct the seal layer, and outputs a high-fidelity target archive file through Laplace pyramid multi-band fusion. Extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features.

[0006] Secondly, embodiments of the present invention provide a printing and stamping scanning device, comprising: The matrix generation unit is used to perform semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then combine the pre-collected paper weight parameters and fixing temperature parameters to generate a dynamic stamping target coordinate matrix. The instruction generation unit is used to perform multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix to generate a joint driving instruction set for stamping. The data scanning unit is used to execute the seal stamping joint driving instruction set, and at the same time, it uses the visible light, near-infrared and ultraviolet three-band alternating illumination and the photometric stereo method to collect data and obtain multi-dimensional preliminary scan data tensors. The matrix evaluation unit is used to perform ink stripping processing and twin network multi-scale feature comparison on the tensors of the multi-dimensional preliminary scan data to construct an anomaly evaluation matrix for the seal. The target archiving unit is used to drive a preset encoding and decoding generation network to reconstruct the seal layer according to the seal anomaly evaluation matrix, and output a high-fidelity target archiving file through Laplace pyramid multi-band fusion. The result output unit is used to extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features.

[0007] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the printing and stamping scanning method of the first aspect.

[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the printing and stamping scanning method of the first aspect.

[0009] This invention provides a printing and stamping scanning method, including performing semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then generating a dynamic stamping target coordinate matrix by combining pre-acquired paper weight parameters and fixing temperature parameters; performing multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix to generate a seal stamping joint driving instruction set; executing the seal stamping joint driving instruction set, and simultaneously using alternating illumination of visible light, near-infrared and ultraviolet bands and photometric stereo method for data acquisition to obtain a multi-dimensional preliminary scanning data tensor; performing ink removal processing and twin network multi-scale feature comparison on the multi-dimensional preliminary scanning data tensor to construct a seal anomaly evaluation matrix; driving a preset encoding and decoding generation network to reconstruct the seal layer according to the seal anomaly evaluation matrix, and outputting a high-fidelity target archive file through Laplace pyramid multi-band fusion; extracting the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generating a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features. This invention integrates various technologies, including semantic segmentation of the printing layout, pre-compensation for geometric deformation, multispectral and photometric stereoscopic joint scanning, twin network seal anomaly assessment, encoding and decoding generation network reconstruction and fusion, and dual anchoring of paper fiber speckle and byte hash, into the entire process of printing, stamping, scanning, and archiving. This achieves deep perception and full-process control oriented towards the characteristics of physical media, effectively improving the accuracy of stamping positioning, the identification of genuine and counterfeit seals, and the anti-tampering and traceability capabilities of archived documents.

[0010] This invention also provides a printing and stamping scanning device, a computer device, and a storage medium, which have the same beneficial effects as described above. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a printing and stamping scanning method provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a printing and stamping scanning device provided in an embodiment of the present invention.

[0013] Explanation of reference numerals in the attached figures: 200. Printing and stamping scanning device; 201. Matrix generation unit; 202. Instruction generation unit; 203. Data scanning unit; 204. Matrix evaluation unit; 205. Target archiving unit; 206. Result output unit. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0016] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0017] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0018] Please see below. Figure 1 , Figure 1 The flowchart of a printing and stamping scanning method provided in an embodiment of the present invention specifically includes steps S101 to S106.

[0019] S101. Perform semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then generate a dynamic stamping target coordinate matrix by combining the pre-collected paper weight parameters and fixing temperature parameters. S102. Based on the dynamic stamping target coordinate matrix, perform multi-axis curve trajectory planning and dielectric impedance calculation respectively to generate a joint driving instruction set for stamping. S103. Execute the seal stamping joint driving instruction set, and simultaneously use the visible light, near-infrared and ultraviolet three-band alternating illumination and the photometric stereo method to collect data to obtain a multi-dimensional preliminary scan data tensor. S104. The tensors of the multi-dimensional preliminary scan data are subjected to ink stripping processing and twin network multi-scale feature comparison to construct an anomaly assessment matrix for the seal impression. S105. Based on the seal anomaly evaluation matrix, drive the preset encoding and decoding generation network to reconstruct the seal layer, and output a high-fidelity target archive file through Laplace pyramid multi-band fusion. S106. Extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features.

[0020] In step S101, the original electronic document uploaded by the user is first acquired, and two processes, semantic segmentation and geometric deformation pre-compensation, are performed on the document. Semantic segmentation involves using a deep learning model to divide the electronic document into regions and label semantic categories to identify the spatial location and semantic attributes of each functional area, thus providing structural information for determining the stamping position. Geometric deformation pre-compensation addresses the uneven shrinkage deformation of paper caused by the high temperature of the fixing assembly during printing by pre-correcting the target coordinates to eliminate coordinate drift caused by the physical printing process. Paper weight parameter characterizes the mass per unit area of ​​paper, reflecting its thickness and rigidity; fixing temperature parameter characterizes the working temperature of the fixing assembly of the all-in-one printer, directly affecting the shrinkage amplitude and directional distribution of the paper after heating. The system combines the pre-acquired parameters to perform geometric deformation pre-compensation on the semantic segmentation results, ultimately generating a dynamic stamping target coordinate matrix. This matrix contains the stamping spatial coordinate information after temperature compensation and deformation correction, used to guide the subsequent mechanical actuator to accurately locate the stamping position.

[0021] In one embodiment, step S101 includes: The preset layout analysis deep learning model is invoked to perform layout segmentation and semantic annotation on the original electronic document to be processed, and the segmentation and annotation results are obtained. Based on the segmentation and annotation results, the corresponding title area, body paragraphs, table area, signature bar and stamp anchor point of the electronic document are identified, and then the key fields are read through the preset optical character recognition engine. The remaining blank area other than the key field is used as the candidate search domain, and the weighted Euclidean distance between the divided candidate positions and the signature bar, text baseline and the key field is used as the cost function; Based on the cost function and the minimum coverage and maximum blank space rules, a constrained nonlinear programming solution is performed to obtain the optimal stamp center coordinates for preventing occlusion. Based on the pre-collected paper weight parameters and fixing temperature parameters, the geometric pre-compensation lookup table is invoked; Based on the geometric pre-compensation lookup table, the optimal stamping center coordinates are subjected to affine and perspective transformations for pre-distortion correction, and a dynamic stamping target coordinate matrix is ​​output.

[0022] In this embodiment, after obtaining the original electronic document uploaded by the user, a pre-defined layout analysis deep learning model is first invoked to perform layout segmentation and semantic annotation on the original electronic document, obtaining the segmentation and annotation results. Here, the layout analysis deep learning model refers to a pre-trained neural network model used to understand the spatial structure of document layout and the semantic categories of regions. For example, a multimodal layout understanding network that integrates visual features and text embeddings using a Transformer encoding structure can be used as a specific implementation. Layout segmentation refers to dividing the pages of the electronic document into several non-overlapping sub-regions according to functional areas, while semantic annotation refers to assigning corresponding semantic category labels to each sub-region, enabling the system to understand the functional roles and spatial distribution of each part of the document at the structural level. After performing end-to-end inference processing on the input electronic document pages, the model outputs segmentation and annotation results containing the boundary coordinates of each region and the corresponding semantic category labels.

[0023] After obtaining the segmentation and annotation results, the system identifies the corresponding title area, body paragraphs, table area, signature area, and seal anchor point of the electronic document. The title area is the region containing the title text; the body paragraphs are the regions containing the main text content; the table area contains the table structure; the signature area is a designated area reserved for the signatory's handwritten or electronic signature; and the seal anchor point is an existing or pre-set marker in the document indicating the approximate location of the seal. Accurate identification of these functional areas provides complete layout structure constraints for subsequently determining the seal location. Based on the region identification, a pre-set optical character recognition (OCR) engine is used to read key fields. An OCR engine is a recognition tool that automatically converts printed or handwritten text in a document image into editable text. The system uses this engine to read the text content in each semantic region identified in the segmentation and annotation results field by field, extracting the specific location coordinates and recognition confidence of key fields such as contract number, signing date, and party names, so that these unobstructed core text information can be avoided when selecting the seal location.

[0024] Furthermore, the remaining blank area outside the key fields is used as the candidate search domain, and the weighted Euclidean distance between the divided candidate positions and the signature bar, text baseline, and key fields is used as the cost function. After excluding the space occupied by the identified title area, body paragraphs, table area, signature bar, stamp anchor point, and key fields on the electronic document page, the system uses the remaining blank area as the candidate search domain for the stamp position, that is, it searches for possible stamp center points within this range. The text baseline refers to the horizontal reference line along which the text is arranged in the body paragraph, reflecting the spatial direction of the text lines and the distribution of line spacing. Within the candidate search domain, for each candidate position, the system calculates the weighted Euclidean distance between that position and the signature bar boundary, text baseline, and each key field. The weighted Euclidean distance is based on the standard Euclidean distance, assigning differentiated weight coefficients to different directions or different objects to reflect the different degrees of influence of different constraints on the stamp position. The system combines the above weighted Euclidean distances to form a cost function. The smaller the value of the cost function, the less sufficient the distance between the candidate location and the key content area is and the higher the risk of occlusion. Conversely, the larger the value, the more reasonable the spatial distance between the candidate location and the key content area is.

[0025] After constructing the cost function, a constrained nonlinear programming solution is performed based on this cost function and the minimum coverage and maximum white space rules to obtain the optimal stamp center coordinates to prevent occlusion. The minimum coverage rule refers to minimizing the area covered by the stamp area on existing text content while ensuring the complete presentation of the stamp. The maximum white space rule prioritizes the position with the most ample surrounding white space among multiple candidate positions that satisfy the minimum coverage constraint, so as to maintain good visual aesthetics and readability of the document layout after stamping. Nonlinear programming is a mathematical optimization method used to solve for decision variables that achieve the extreme value of the objective function under given constraints. The system uses the above cost function as the objective function, transforms the minimum coverage and maximum white space rules into inequality constraints, and combines physical constraints such as stamp size and page boundaries. The nonlinear programming solver globally searches for the optimal solution in the candidate search domain, and finally outputs the optimal stamp center coordinates that satisfy all constraints, that is, the two-dimensional plane coordinate point that makes the stamping position most reasonable without obscuring any key text information.

[0026] Furthermore, based on the pre-collected paper weight parameters and fixing temperature parameters, the geometric pre-compensation lookup table is invoked. During actual printing, stamping, and scanning multifunction printer operation, when the fixing assembly heat-fuses and fixes the toner onto the paper at a high temperature of approximately 180 degrees Celsius, it causes the paper to undergo uneven shrinkage deformation of approximately 0.2% to 0.3%, with a difference in shrinkage rate along the printing paper feed direction and perpendicular to the paper feed direction. This means that the stamping coordinates pre-calculated in the electronic document will drift in actual position after the paper passes through the fixing assembly due to physical shrinkage. To compensate for this error, the system invokes the geometric pre-compensation lookup table pre-stored in the device's non-volatile memory based on the paper weight parameters used in the current operation and the real-time operating temperature parameters of the multifunction printer's fixing assembly. This lookup table is a mapping database established before the device leaves the factory or during the maintenance calibration phase, after systematically calibrating and measuring the actual shrinkage deformation of paper with different weights at different fixing temperatures. It records the shrinkage rate and deformation distribution parameters of the paper in the paper feed direction and perpendicular to the paper feed direction under various combinations of conditions.

[0027] Finally, based on the geometric pre-compensation lookup table, the optimal stamping center coordinates are pre-distorted by affine and perspective transformations, outputting a dynamic stamping target coordinate matrix. Affine transformation is a linear geometric transformation that preserves the parallelism of lines, encompassing translation, rotation, scaling, and shearing operations, used to compensate for coordinate shifts caused by uniform stretching or compression of paper in a plane. Perspective transformation, on the other hand, is a non-linear geometric transformation that allows lines to converge, used to compensate for non-uniform warping deformation of paper caused by uneven local heating or differences in fiber orientation. Based on the deformation parameters corresponding to the current paper weight and fixing temperature obtained from the geometric pre-compensation lookup table, the system sequentially applies affine and perspective transformations to the obtained optimal stamping center coordinates, i.e., pre-shifting the coordinates in the opposite direction of deformation to compensate for the actual shrinkage of the paper after passing through the fixing assembly, ensuring that the physical landing point of the stamp accurately returns to the originally planned optimal position. After the above pre-distortion correction process, the system integrates and encapsulates the corrected coordinate information along with temperature compensation parameters and paper deformation compensation parameters, and finally outputs a dynamic stamping target coordinate matrix for precise stamping positioning of the mechanical actuator in subsequent steps.

[0028] In step S102, using the output dynamic stamping target coordinate matrix as input, multi-axis curve trajectory planning and media impedance calculation are performed respectively. Multi-axis curve trajectory planning refers to planning the continuous trajectory of displacement, velocity, and acceleration of each axis over time using a smooth curve acceleration and deceleration strategy for the paper feed axis and the stamping robot arm motion axis, so as to achieve coordinated movement of paper feeding and stamping action and suppress mechanical vibration. Media impedance calculation refers to estimating the impedance characteristics of the paper medium to the pressure head during the stamping process by detecting the paper thickness and stacking state in real time through sensors and combining the load feedback of the stamping motor, thereby determining the output torque and stamping force required by the stamping pressure head. The above trajectory planning results and impedance calculation results are encapsulated to generate a seal stamping joint drive instruction set. This instruction set contains both spatial trajectory coordinates and dynamic torque control signals, which are used to drive the mechanical actuator to complete the precise stamping action.

[0029] In one embodiment, step S102 includes: Based on the dynamic stamping target coordinate matrix, an S-curve acceleration / deceleration planning method is adopted; Based on the continuous changes in the S-curve acceleration and deceleration plan, a dual-axis position result is constructed for the dynamic stamping action that is synchronized with paper feeding and addressing. Based on the dual-axis position results, the extracted trajectory parameters are registered in real time, and the registration residuals are corrected by a proportional-integral-derivative controller to obtain the residual correction results. Based on the residual correction results, the paper thickness and stacking state are measured, and the dielectric impedance is calculated based on the real-time feedback of the stamping motor phase current to obtain the stamping load. The step output torque of the stamping head is dynamically calculated based on the paper thickness, stacking state, and stamping load. The spatial trajectory coordinates corresponding to the dynamic stamping target coordinate matrix and the dynamic torque control signal corresponding to the step output torque are encapsulated to generate a seal stamping joint drive instruction set.

[0030] In this embodiment, after obtaining the generated dynamic stamping target coordinate matrix, an S-curve acceleration / deceleration planning method is first applied based on this matrix. S-curve acceleration / deceleration planning is a smooth speed planning strategy for controlling motor motion. Its core feature is that the speed curve is divided into seven stages: acceleration, uniform acceleration, deceleration, uniform speed, acceleration / deceleration, uniform deceleration, and deceleration / deceleration. This ensures that the acceleration (i.e., the derivative of acceleration with respect to time) remains continuously changing throughout the motion, unlike trapezoidal acceleration / deceleration planning which involves abrupt jumps in acceleration between acceleration and uniform speed. In the actual operation of the print-stamp-scan all-in-one machine, the system needs to simultaneously coordinate and control both the paper feed stepper motor and the stamping robotic arm. If a simple planning method with discontinuous acceleration is used, the motor will generate significant mechanical impact and resonance noise during start-stop switching, causing the stamping position to shift and jitter. Therefore, based on the target space coordinate information contained in the dynamic stamping target coordinate matrix, the system plans the corresponding seven-segment S-curve velocity profiles for the paper feed axis and the stamping robot arm motion axis, so that the two axes maintain motion stability throughout the entire process of acceleration, constant speed and deceleration, thereby effectively suppressing start-stop impact and resonance noise, and laying a stable kinematic foundation for subsequent high-precision stamping actions.

[0031] After completing the S-curve acceleration / deceleration planning, based on the continuous change characteristics of this planning, a dual-axis position result is constructed for the dynamic stamping action that synchronizes paper feeding and addressing. During the actual stamping process of the all-in-one machine, the paper is not stationary but continuously moving under the drive of the feed motor. Simultaneously, the stamping robot arm needs to track the real-time position of the paper in the direction of motion and accurately address the target stamping coordinates in the vertical direction. This process of synchronized paper feeding and addressing is the dynamic stamping action. To achieve precise control of this dynamic tracking stamping action, the system establishes a dual-axis position closed-loop control architecture. One axis corresponds to the displacement control in the paper feeding direction, and the other axis corresponds to the addressing displacement control of the stamping robot arm in the direction perpendicular to the paper feeding direction. The system uses incremental photoelectric encoders as the position feedback source for each axis, collecting the current position information of both axes in real time. Based on the target position and target speed determined by the S-curve acceleration / deceleration planning, the desired motion trajectories of the two axes are synchronized in time, ultimately constructing the dual-axis position result. The dual-axis position results include the target position coordinates and actual feedback position coordinates of the paper feed axis and the stamping robot arm motion axis at each sampling time, providing data basis for subsequent trajectory registration.

[0032] Furthermore, based on the dual-axis position results, the extracted trajectory parameters are registered in real time, and the registration residual is corrected using a proportional-integral-derivative (PID) controller to obtain the residual correction result. During dynamic stamping, the motion trajectory of the stamping robotic arm's end effector needs to maintain strict consistency with the real-time motion trajectory of the paper in both space and time to ensure the seal accurately falls on the target coordinate position. The actual displacement and actual velocity of the paper feed axis and the robotic arm's motion axis are extracted from the dual-axis position results, and the two-axis trajectory parameters are registered in real time on the time axis, i.e., the spatial position deviation between the actual trajectory of the robotic arm's end effector and the paper's motion trajectory is calculated periodically. Due to factors such as mechanical transmission clearance, motor response delay, and paper slippage, a registration residual inevitably occurs between the two-axis trajectories, i.e., the deviation between the actual trajectory and the ideal trajectory. To eliminate this registration residual, a PID controller can be introduced for closed-loop correction. The proportional-integral-derivative (PID) controller is a classic feedback control algorithm. It uses a proportional element to respond instantly to the current error, an integral element to eliminate accumulated historical errors, and a derivative element to predict error trends. The combined effect of these three elements allows the registration residual to converge rapidly to an acceptable range. After continuous correction processing by the PID controller, the system outputs the residual correction result, which reflects the actual registration accuracy and correction compensation amount of the two-axis trajectories after closed-loop compensation.

[0033] Furthermore, based on the residual correction results, the paper thickness and stacking state are measured, and the dielectric impedance is calculated based on the real-time feedback of the stamping motor phase current to obtain the stamping load. After the residual correction results confirm that the two-axis trajectory registration accuracy meets the stamping requirements, the system enters the pre-stamping dielectric physical parameter detection stage. The system uses a linkage detection mechanism between a capacitive thickness sensor and a photoelectric pair located in the paper feed path to accurately measure the paper thickness below the current stamping area and determine whether there is an abnormal state of multiple sheets of paper sticking together. The paper thickness directly affects the stroke depth required when the stamping head presses down, while the stacking state is related to the uniform transmission effect of stamping pressure. If the paper is stacked and stuck and the system fails to detect and adjust it, it will lead to uneven imprint depth or stamping offset. At the same time, during the process of the stamping motor starting to drive the pressure head to press down, the phase current signal of the stamping motor is collected in real time. The phase current of the stamping motor refers to the current value flowing through each phase winding of the motor that drives the stamping head, and the magnitude of this current value is proportional to the load torque borne by the motor. The system calculates the dielectric impedance based on the real-time feedback signal of the stamping motor's phase current. Specifically, by analyzing the amplitude changes and dynamic response characteristics of the current waveform, it estimates the reaction resistance exerted by the paper medium on the pressure head during the stamping process, thus obtaining the stamping load. The stamping load comprehensively reflects the combined impedance effect of physical factors such as paper material hardness, surface roughness, and the contact resistance between the ink pad and the paper surface on the stamping action.

[0034] Finally, based on the paper thickness, stacking state, and stamping load, the stepping output torque of the stamping head is dynamically calculated. The spatial trajectory coordinates corresponding to the dynamic stamping target coordinate matrix and the dynamic torque control signal corresponding to the stepping output torque are encapsulated to generate a joint stamping drive instruction set. The stepping output torque refers to the rotational torque required to drive the stepper motor when the stamping head performs the downward stamping action. If the stepping output torque is too small, the ink cannot fully contact and compact with the paper fibers, resulting in a blurred and incomplete imprint; if the stepping output torque is too large, it may puncture the paper or cause excessive diffusion and deformation of the imprint. The system comprehensively considers the three parameters currently measured—paper thickness, stacking state, and stamping load—and dynamically calculates the optimal stepping output torque value that matches the current paper medium conditions through a preset mechanical model, ensuring that the stamping pressure precisely meets the requirements for uniform ink transfer. Based on this, the system deeply encapsulates and integrates the spatial trajectory coordinates corresponding to the dynamic stamping target coordinate matrix (i.e., the target position sequence at each moment after S-curve planning and dual-axis registration correction) with the dynamic torque control signal corresponding to the stepping output torque (i.e., the torque command sequence that changes in real time with the stamping stroke), ultimately generating a joint stamping drive instruction set. This instruction set uniformly encodes spatial positioning information and force control information into a complete instruction sequence that can be directly parsed and executed by the underlying microcontroller, ensuring precise control of subsequent stamping actions in both positional accuracy and stamping force.

[0035] In step S103, the generated seal stamping joint driving instruction set is first parsed and executed to drive the mechanical actuator to complete the physical stamping action. In the scanning phase after stamping, three light sources—visible, near-infrared, and ultraviolet—are used for alternating illumination to collect the reflectance characteristics of the imprint at different spectral bands. The near-infrared band is used to penetrate the color interference of the ink powder and highlight the inherent absorption characteristics of the ink's chemical composition, while the ultraviolet band is used to excite the paper's fluorescent whitening agent to highlight the penetration morphology of the imprint's edge. Based on this, the system further incorporates photometric stereo method for data acquisition. The photometric stereo method involves illuminating and exposing the stamped area at different azimuth angles, analyzing the brightness differences of the same pixel under different lighting directions, and reconstructing the three-dimensional morphological parameters of the imprint surface based on a preset reflection model. The system aligns and stitches the aforementioned multispectral reflectance characteristics and three-dimensional surface morphological parameters according to pixel position to obtain a multi-dimensional preliminary scan data tensor. This tensor is a high-dimensional data structure containing multiple channel dimensions, encompassing the imprint's color information, spectral absorption information, and three-dimensional morphological information.

[0036] In one embodiment, step S103 includes: The seal stamping joint drive instruction set is parsed and executed to drive the mechanical actuator to complete the stamping action and enter the scanning mode; Based on the scanning mode, the paper is illuminated by a three-band alternating light source array of visible light, near-infrared and ultraviolet light, and the reflectance characteristics of ink pigments in different bands are collected simultaneously by the photometric stereo method. Based on the reflectivity characteristics, multiple brightness images are captured by exposure at different azimuth angles in the stamping area, and the three-dimensional surface morphology parameters of the imprint are reconstructed according to the preset Lambert reflection model. The reflectivity features are aligned and stitched with the three-dimensional surface topography parameters of the imprint to obtain a multi-dimensional preliminary scan data tensor.

[0037] In this embodiment, the generated seal stamping joint drive instruction set is parsed and executed to drive the mechanical actuator to complete the stamping action and enter the scanning mode. Specifically, after receiving the seal stamping joint drive instruction set, the underlying microcontroller parses the encapsulated spatial trajectory coordinates and dynamic torque control signals frame by frame. According to the timing sequence, the parsed position and force instructions are sent to the drive circuits of the paper feed stepper motor and the stamping robotic arm, respectively. The mechanical actuator completes the coordinated stamping action of paper feeding addressing and pressure head pressing according to a predetermined S-curve speed profile. After the stamping action is completed and the stamping pressure head returns to its reset position, the system automatically switches from the stamping working state to the scanning mode, that is, the motion control channel of the stamping robotic arm is closed, and the acquisition control channels of the light source array and image sensor are activated, preparing the hardware state for subsequent multispectral scanning data acquisition.

[0038] After entering scanning mode, the system uses an alternating array of three light sources—visible light, near-infrared light, and ultraviolet light—to provide stroboscopic illumination to the paper, and simultaneously acquires the reflectivity characteristics of the ink pigment at different wavelengths using the photometric stereo method. In traditional printer-stamp-scanner all-in-one machines, the scanning process typically uses only a single white light source for illumination, and the information obtained is limited to the two-dimensional color distribution of the imprint, making it difficult to deeply perceive the chemical composition of the ink and the microscopic morphology of the paper surface from a physical perspective. This embodiment abandons the traditional single white light scanning method and uses an alternating array of three light sources—visible white light, 850 nm near-infrared light, and 365 nm ultraviolet light—as the illumination system. Stroboscopic illumination refers to the rapid alternation of the three light sources according to a preset time sequence, with the single exposure time of each band controlled at the sub-millisecond level to avoid crosstalk interference between different light sources. During stroboscopic illumination, the contact image sensor maintains strict timing synchronization with the light sources of each wavelength, completing the exposure and acquisition of one frame of image within the extremely short time window of each wavelength's illumination. This allows for the acquisition of the reflectance characteristics of ink pigments in the visible, near-infrared, and ultraviolet light bands. Reflectance characteristics refer to the spatial distribution of the ratio of light energy reflected from the ink pigment surface to the incident light energy after receiving illumination of a specific wavelength. Reflectance characteristics at different wavelengths can reveal different dimensions of the physicochemical properties of ink materials. Specifically, the near-infrared band has the ability to penetrate the cyan, magenta, yellow, and black toners used in ordinary color printers. Ink-specific chemical components (such as vermilion or synthetic azo pigments) exhibit significant high absorption characteristics in this band. Therefore, the reflectance characteristics in the near-infrared band can effectively highlight the inherent chemical absorption characteristics of ink and eliminate interference from toner color. Ultraviolet (UV) illumination can excite the fluorescent whitening agent inside the paper to produce a fluorescent response. Since the ink paste will penetrate and diffuse along the capillary of the paper fibers during the actual physical stamping process, a unique penetration transition area will be formed at the edge of the imprint. This area will have a shielding effect on the excitation effect of the fluorescent whitening agent. Therefore, the reflectance characteristics under UV band can clearly reflect the penetration morphology outline of the imprint edge.

[0039] After acquiring reflectance characteristics in three wavebands, multiple brightness images are further captured by exposure at different azimuth angles of the stamping area based on these reflectance characteristics. The three-dimensional surface morphology parameters of the imprint are then reconstructed according to a preset Lambertian reflection model. In the actual physical stamping process, after the ink is transferred to the paper surface under pressure, a microscopic three-dimensional raised structure with a certain thickness and undulations is formed on the paper surface. This microscopic three-dimensional morphology feature is an important physical basis for distinguishing between a genuine physical stamp and a color-printed counterfeit flat stamp. To acquire this three-dimensional morphology information, the system uses photometric stereo method for acquisition. Photometric stereo method is an optical measurement technique that reconstructs the three-dimensional morphology of an object's surface by changing the direction of illumination and analyzing the brightness changes of the same scene under different illumination conditions. In specific implementation, four sets of oblique illumination sources with small incident angles are evenly arranged along the circumference of the stamping area, with the four sets of light sources located at four different azimuth angles of the stamping area. During the acquisition process, the system sequentially illuminates each of the four azimuth light sources individually, performing an exposure acquisition on the stamped area when each azimuth light source is illuminated, thus obtaining four brightness images. Since the light intensity received by each pixel on the same imprint surface under oblique illumination at different azimuth angles will exhibit different brightness distributions due to differences in the surface normal direction, the four brightness images contain rich information about the normal direction of each point on the imprint surface. The Lambertian reflection model is a classic optical reflection model that assumes the object surface is an ideal diffuse reflector. Under this model, the reflected brightness at a point on the surface is proportional to the cosine of the angle between the incident light direction and the surface normal direction at that point. Based on the preset Lambertian reflection model, the system uses the brightness observation values ​​of each pixel position in the four brightness images under four known illumination directions to solve a system of equations simultaneously, calculating the surface normal vector and height difference component at each pixel position, thereby reconstructing the three-dimensional surface topography parameters of the imprint with micron-level precision. The three-dimensional surface morphology parameters of the imprint, in the form of a height map, characterize the three-dimensional ridge height distribution of each point on the imprint surface within the stamping area relative to the paper reference plane, and fully record the microscopic topological structure information formed by the ink on the paper surface.

[0040] Finally, the reflectivity features are aligned and stitched with the three-dimensional surface morphology parameters of the imprint to obtain a multi-dimensional preliminary scan data tensor. Alignment and stitching refers to establishing a strict one-to-one spatial correspondence between the channel data acquired in the preceding steps according to pixel positions, and then stacking and merging them along the channel dimension. Specifically, the color reflectivity features acquired in the visible light band (including red, green, and blue color channels), the absorption reflectivity features acquired in the near-infrared band (single channel), the fluorescence reflectivity features acquired in the ultraviolet band (single channel), and the three-dimensional surface morphology parameters of the imprint reconstructed by photometric stereo (i.e., the three-dimensional height channel) are aligned pixel-by-pixel with the same spatial resolution and pixel coordinate system to ensure that each channel data describes the information of the exact same physical point on the paper at the same pixel position. After spatial alignment, the system stitches and merges the above channel data along the channel dimension to finally obtain the multi-dimensional preliminary scan data tensor. This tensor is a high-dimensional data structure that includes spatial dimensions (length and width) and channel dimensions. Each pixel location simultaneously carries the color information of the imprint, near-infrared chemical composition absorption information, ultraviolet fluorescence penetration morphology information, and three-dimensional surface bulge height information, providing data support for subsequent steps to identify the authenticity and assess anomalies of the imprint from multiple physical dimensions.

[0041] In step S104, the obtained multi-dimensional preliminary scan data tensor is first subjected to ink pad stripping processing. Ink pad stripping processing refers to using the absorption characteristics of the unique chemical components of ink pads in specific spectral bands to separate and extract the real physical ink pad layer from the underlying document content in the mixed data. After completing the ink pad stripping, the system sends the separated seal layer into a Siamese network for multi-scale feature comparison. A Siamese network is a comparison architecture composed of two deep neural network branches with identical structures and shared weights. It inputs the seal layer to be detected and a pre-stored standard template into the two branches respectively to extract feature representations at each scale, and evaluates the degree of consistency between the two through feature alignment and similarity measurement. The system integrates the ink pad stripping results and the Siamese network multi-scale feature comparison results to construct a seal anomaly evaluation matrix. This matrix quantitatively records the abnormal deviation information of the seal in dimensions such as shape, edge, and color in a structured manner, providing a basis for subsequent judgment on whether the seal needs repair and the degree of repair.

[0042] In one embodiment, step S104 includes: The ink paste component stripping process is performed on the multi-dimensional preliminary scan data tensor to obtain the real physical stamp layer; The real physical stamp layer is subjected to two-dimensional plane fake stamp removal processing to obtain the stamp layer to be compared. The seal layer to be compared and the standard vector template are transmitted to a preset twin deep neural network for processing to obtain multi-scale feature maps; The multi-scale feature maps are aligned along the channel dimension to jointly measure the consistency of the overall shape and obtain the shape deviation component. The gradient direction histogram and local binary pattern texture features are calculated using the edge regions of the seal layer to be compared, and the shape deviation component is fused to construct the seal anomaly evaluation matrix.

[0043] In this embodiment, the obtained multi-dimensional preliminary scan data tensor is first subjected to ink paste component stripping processing to obtain a real physical stamp layer. Ink paste component stripping processing refers to the process of accurately separating and extracting the layer information belonging to the real physical ink paste from the multi-dimensional preliminary scan data tensor containing multiple information channels by utilizing the absorption response differences of the unique chemical components of ink paste in specific spectral bands, which distinguish it from other printing materials. In specific implementation, the image processing engine uses the high absorption characteristics exhibited by the unique chemical components of ink paste (such as vermilion red or synthetic azo pigments) in the near-infrared band as the stripping basis. Since the multi-dimensional preliminary scan data tensor contains the reflectance feature channel in the near-infrared band, the system analyzes the data of this channel. The pixel areas that show a significantly low reflectance (i.e., high absorption rate) response in the near-infrared band correspond to the spatial range covered by the real ink paste components. Based on this, the system extracts these pixel areas from the multi-dimensional preliminary scan data tensor and strips them together with their complete information in each channel dimension, finally obtaining a real physical stamp layer containing only the real physical ink paste information.

[0044] After obtaining the genuine physical stamp layer, a two-dimensional planar fake stamp removal process is further performed on this layer to obtain the stamp layer for comparison. Two-dimensional planar fake stamps refer to stamp patterns printed on paper using cyan, magenta, yellow, and black inks from a regular color printer. These counterfeit stamps only have a two-dimensional color distribution and lack the three-dimensional microscopic raised structure and chemical absorption characteristics formed by the diffusion of ink along the paper fibers during the genuine physical stamping process. Since the four-color inks used in regular color printers are almost completely transparent to the near-infrared band, meaning they do not produce significant absorption or reflection responses under near-infrared illumination, during the ink component removal process, any two-dimensional planar fake stamp areas formed by printing with four-color inks will not exhibit the high absorption characteristics unique to ink in the near-infrared channel. Therefore, they are naturally excluded from the genuine physical stamp layer at the physical principle level. Based on this, the system further verifies and cleans the real physical stamp layer, removing residual artifacts of non-ink components that may be introduced by toner edge scattering or noise interference. This ensures that the output stamp layer to be compared retains only the real ink component information that has been double-verified, providing pure and reliable input data for subsequent accurate comparison with the standard template.

[0045] Furthermore, the seal layer to be compared and the standard vector template are transmitted to a pre-defined Siamese deep neural network for processing to obtain multi-scale feature maps. The standard vector template refers to a standard seal pattern described in vector graphics format and pre-stored in the system database. This template records the standard outline shape, text arrangement, pattern details, and other benchmark information of the seal, serving as a reference benchmark for seal authenticity comparison. The Siamese deep neural network is a comparison architecture composed of two structurally identical and weight-shared deep neural network branches. Its design aims to map two inputs to a unified feature space, measuring their similarity by comparing their distance in that feature space. In this embodiment, the Siamese deep neural network uses a residual network as its backbone structure. The residual network introduces skip connections, enabling the deep network to effectively learn the residual mapping of the input data, thereby increasing network depth to extract richer semantic features while avoiding the gradient vanishing problem. The seal layer to be compared and the standard vector template are fed into two branches of the Siamese deep neural network, respectively. Both branches use the same network structure and shared weight parameters to perform layer-by-layer convolution and pooling on their respective inputs. At different depth levels of the network, feature representations at multiple scales, from low-level texture details to high-level semantic contours, are extracted, ultimately outputting multi-scale feature maps. Multi-scale feature maps refer to the set of feature maps output at each layer of the network, possessing different spatial resolutions and levels of semantic abstraction. Shallow feature maps retain higher spatial resolution and richer local texture details, while deep feature maps, with lower spatial resolution, carry more abstract global shape and structural semantic information.

[0046] After obtaining the multi-scale feature maps, feature alignment is performed on the channel dimension to jointly measure the consistency of the overall shape, resulting in a shape deviation component. Feature alignment refers to establishing a one-to-one mapping relationship between the multi-scale feature maps output by the two branches of the Siamese deep neural network along the channel dimension at the same level, enabling channels describing the same semantic content in the two sets of feature maps to be directly compared in a unified feature space. Specifically, for the feature maps output by the two branches at each scale level, they are aligned channel by channel along the channel dimension, and the consistency between the two sets of feature maps is jointly measured by cosine similarity and contrast loss. Cosine similarity measures the similarity in direction by calculating the cosine of the angle between two feature vectors, with values ​​ranging from negative one to positive one; the closer the value is to positive one, the more similar the two are. Contrast loss optimizes the network's discriminative ability by narrowing the feature distance between matching sample pairs and widening the feature distance between unmatched sample pairs. The system integrates the cosine similarity and contrast loss calculation results at each scale level, converging and integrating the shape consistency measurement results at multiple scales to finally obtain the shape deviation component. The shape deviation component quantitatively characterizes the degree of deviation between the seal layer to be compared and the standard vector template in macroscopic dimensions such as overall outline shape, text arrangement position, and pattern structure layout. It can reflect macroscopic seal anomalies such as local outline loss caused by ink shortage and overall shape distortion caused by stamping deviation.

[0047] Finally, the gradient direction histogram and local binary pattern texture features are calculated using the edge regions of the seal layer to be compared, and the shape deviation component is fused to construct an anomaly evaluation matrix. In the actual physical stamping process, after the ink comes into contact with the paper fibers under pressure, it permeates and diffuses along the capillary channels between the paper fibers, forming a characteristic micro-morphology with irregular serrated contours and gradual blurring transitions at the edge of the imprint. This edge permeation morphology is an important microscopic physical evidence distinguishing genuine physical stamping from printing forgery. To quantitatively describe this edge micro-feature, the system first extracts the edge region from the seal layer to be compared, namely the transition zone between the ink-covered and uncovered areas. Within this edge region, the system calculates two types of complementary local feature descriptors. One is the gradient direction histogram, which calculates the image grayscale gradient magnitude and gradient direction at each pixel position within the edge region, statistically voting on the gradient direction within a preset angle range to form a histogram vector describing the gradient direction distribution pattern within the local region. This effectively captures the directional distribution characteristics of the serrated contours of the imprint edge and the changing patterns of the edge direction. Secondly, there is the local binary pattern texture feature. This feature descriptor compares the grayscale value of each pixel within the edge region with its neighboring pixels, encodes the comparison result into a fixed-length binary string, and statistically plots its distribution histogram. This allows for the capture of the smudging gradient and micro-texture variation patterns formed by the diffusion of ink along the paper fibers with low computational complexity. After calculating the above two types of local edge region features, the system structurally fuses the edge directional distribution information described by the gradient direction histogram, the micro-penetration texture information described by the local binary pattern texture feature, and the macro-shape consistency information described by the aforementioned shape deviation component, ultimately constructing a seal anomaly assessment matrix. This seal anomaly assessment matrix, in a structured matrix form, provides a unified quantitative representation of the overall shape deviation at the macro level and the edge penetration texture anomaly at the micro level, providing a quantitative assessment basis for subsequent steps to determine whether the seal has abnormal defects and to determine the corresponding repair strategy.

[0048] In step S105, based on the seal anomaly evaluation matrix constructed in the previous step, the preset encoder-decoder generation network is driven to reconstruct the seal layer. The encoder-decoder generation network is a deep generative model composed of a symmetrical encoder and decoder. The encoder compresses the input defective seal layer layer by layer into a high-dimensional semantic feature representation, while the decoder, guided by a standard template, restores and reconstructs this semantic feature representation layer by layer into a complete and full seal layer. After the seal layer reconstruction is completed, the reconstructed seal layer is further synthesized with the underlying text layer through Laplacian pyramid multi-band fusion. The Laplacian pyramid is a multi-resolution representation method that decomposes an image into different spatial frequency components. The system performs targeted fusion processing on the low-frequency and high-frequency bands respectively, and then performs inverse reconstruction to synthesize a complete image, thereby outputting a high-fidelity target archive file with natural visual transitions and intact core details.

[0049] In one embodiment, step S105 includes: A threshold determination is performed on the comprehensive anomaly score in the seal anomaly assessment matrix to obtain a repair initiation signal; According to the repair initiation signal, the U-Net structure is invoked to use the original defect stamp layer and the standard vector template as dual-channel conditional inputs. The standard vector template is non-rigidly geometrically aligned based on the shape deviation component in the seal anomaly evaluation matrix to obtain the reconstructed complete seal layer. The complete seal layer and the underlying text layer are decomposed into multiple frequency bands through the Laplacian pyramid, and brightness and contrast equalization processing is performed on the low frequency band to obtain low frequency band data with balanced tone transition. Edge anti-aliasing and directional filtering are fused into the high-frequency bands in the multi-layer frequency bands, and the low-frequency band data is combined with the Laplace pyramid for inverse reconstruction to output a high-fidelity target archive file.

[0050] In this embodiment, the comprehensive anomaly score in the constructed seal anomaly evaluation matrix is ​​first subjected to threshold determination to obtain a repair initiation signal. The comprehensive anomaly score is a scalar value calculated by the system according to the anomaly deviation information of each dimension recorded in the seal anomaly evaluation matrix (including shape deviation components and micro-penetration texture anomalies reflected by the gradient direction histogram of the edge region and the local binary pattern texture features), according to a preset weighted convergence rule. This value represents the overall degree of comprehensive anomaly deviation of the current seal relative to the standard vector template. Threshold determination is a decision-making process that compares the comprehensive anomaly score with a preset dynamic repair threshold. When the comprehensive anomaly score is lower than or equal to the threshold, it indicates that the quality of the current seal is within an acceptable range, and the system does not need to initiate the repair process but directly enters the subsequent archiving stage. When the comprehensive anomaly score exceeds the threshold, it indicates that the current seal has defects that need to be repaired (such as incomplete outline caused by local ink shortage, shape distortion caused by stamping deviation, or color loss caused by uneven ink transfer). Based on this, the system generates a repair initiation signal to trigger the digital repair module to enter the working state. The repair start signal serves as a prerequisite for the execution of subsequent sub-steps, ensuring that the system only initiates the repair and reconstruction process when the seal actually has abnormal defects that exceed the allowable range, thereby avoiding unnecessary modifications to seals of normal quality.

[0051] Upon receiving the repair initiation signal, the U-Net structure is invoked according to the signal, using the original defective stamp layer and a standard vector template as dual-channel conditional inputs. The U-Net structure is a deep convolutional neural network architecture consisting of a symmetrical encoder and decoder. The encoder compresses the input image into a high-dimensional semantic feature representation through layer-by-layer convolution and downsampling operations. The decoder then restores and reconstructs the high-dimensional semantic feature representation into an output image with the same spatial resolution as the input through layer-by-layer upsampling and convolution operations. Simultaneously, skip connections are set between corresponding layers of the encoder and decoder to transmit multi-scale spatial detail information, enabling the network to simultaneously consider global semantic understanding and local detail restoration during the reconstruction process. In this embodiment, the U-Net structure further integrates channel attention and spatial attention mechanisms. The channel attention mechanism enhances the response to key semantic features and suppresses interference from redundant channels by adaptively learning the importance weights of each feature channel. The spatial attention mechanism focuses on the defective region and weakens the influence of irrelevant background regions by adaptively learning the importance weights of each spatial location in the feature map. The fusion of these two attention mechanisms allows the network to more accurately locate and repair the defective parts of the stamp. The system abandons traditional pixel-level interpolation repair methods. Instead, it splices the original defective stamp layer (i.e., the real physical stamp layer with quality defects obtained after the previous step of removing stamps and eliminating fake stamps) with a standard vector template (i.e., the standard stamp reference pattern pre-stored in the system database) in the channel dimension as a dual-channel conditional input for the U-Net structure. This dual-channel conditional input design allows the network to both refer to the complete shape and pattern information in the standard vector template to fill in the missing contour areas when generating repair results, and retain the physical authenticity features such as the real stamp texture and natural ink color gradation from the original defective stamp layer, thereby avoiding the texture distortion and color breakage problems caused by traditional pixel-level interpolation methods.

[0052] Furthermore, the standard vector template is non-rigidly geometrically aligned based on the shape deviation component in the seal anomaly assessment matrix to obtain the reconstructed complete seal layer. Since the shape of the seal impression formed under different pressing angles, pressures, and paper deformation conditions during actual physical stamping is not strictly rigidly consistent with the standard vector template, but rather exhibits non-linear deformation differences such as non-uniform stretching, twisting, or compression in local areas, a non-rigid geometric alignment process is required when using the standard vector template as a repair reference to adapt it to the actual shape of the current impression. Non-rigid geometric alignment is a geometric transformation method that allows the reference template to undergo differentiated deformation in different spatial locations. Unlike rigid alignment, which only involves overall translation, rotation, and scaling, non-rigid alignment can handle independent twisting and non-uniform deformation in local areas. In specific implementation, this non-rigid geometric alignment operation is performed through a thin-plate spline transformation module. Thin-plate spline transformation is a non-rigid interpolation transformation method based on the criterion of minimum bending energy. It establishes several corresponding control point pairs between a standard vector template and the original defective stamp layer, and solves for a transformation function that ensures strict coincidence between the control points on the transformed template and their corresponding counterparts on the defective layer, while minimizing overall bending energy. This achieves a smooth, non-rigid mapping from the template shape to the actual stamp shape. The system utilizes the deviation direction and magnitude information provided by the shape deviation component in the stamp anomaly evaluation matrix to determine the correspondence and displacement vector of the control point pairs, driving the thin-plate spline transformation module to perform fine-tuning of the local deformation of the standard vector template. After non-rigid geometric alignment, the standard vector template and the original defective stamp layer achieve high-precision spatial matching in shape. Based on this, the U-Net structure completes and reconstructs the defective region, reconstructing a complete and full stamp layer while preserving the original ink texture and natural ink color gradation characteristics—the reconstructed complete stamp layer.

[0053] Furthermore, the complete seal layer and the underlying text layer are decomposed into multiple frequency bands using a Laplacian pyramid, and brightness and contrast equalization processing is performed on the low-frequency bands to obtain low-frequency band data with balanced tone transitions. When the reconstructed complete seal layer is overlaid back onto the original document for archiving output, since the seal layer and the underlying text layer come from different acquisition and processing processes, they may differ in terms of brightness level, contrast range, and tone style. If simple pixel overlay synthesis is performed directly, obvious tone jumps and brightness abruptness can easily occur at the boundary between the seal edge and the underlying text, affecting the visual naturalness of the archived file. To solve this problem, a Laplacian pyramid can be used for multi-band layered fusion. The Laplacian pyramid is a multi-resolution representation method that decomposes an image into multiple layers with different spatial frequency components. It constructs a Gaussian pyramid by sequentially applying Gaussian low-pass filtering and downsampling operations to the image, and then obtains the frequency band images of each layer through difference operations between adjacent layers. Ultimately, the original image is decomposed into multiple frequency bands from low to high frequencies. The low-frequency band contains information on the overall brightness distribution and large-scale tonal variations of the image, while the high-frequency band contains information on the image's edge contours, texture details, and local sharpness variations. The system decomposes the complete seal layer and the underlying text layer into corresponding multiple frequency bands using the Laplacian pyramid. First, it performs brightness and contrast equalization processing on the low-frequency band, adjusting the average brightness and contrast range of the two layers in the low-frequency band to make them more consistent. This ensures a smooth transition in the large-scale tonal distribution of the two layers without abrupt changes in brightness, thus obtaining low-frequency band data with balanced tonal transitions.

[0054] Finally, edge anti-aliasing and directional filtering are performed on the high-frequency bands in the multi-layer frequency bands, and the low-frequency band data is combined with the data for inverse reconstruction using the Laplacian pyramid to output a high-fidelity target archive file. In the high-frequency band fusion process, due to differences in texture direction, sharpness level, and pixel transition methods between the seal layer and the underlying text layer in the edge region, simply overlaying or hard switching on the high-frequency band can easily produce artificially synthesized hard edge marks and stepped jagged artifacts at the seal edges of the synthesized image, resulting in unnatural digital processing traces in the fusion result. To avoid these problems, the system performs edge anti-aliasing and directional filtering fusion processing on the high-frequency bands. Edge anti-aliasing processing refers to applying a sub-pixel-level smooth transition on the high-frequency components at the intersection of the seal outline edge and the underlying text, eliminating the stepped jagged artifacts caused by the discontinuity of pixels at the edges of the two layers. Directional filtering fusion refers to adaptive filtering along the tangent direction of the seal's edge contour. While maintaining the sharpness of the edge along the normal direction, it achieves a smooth, gradual transition of high-frequency textures between the two layers along the tangent direction, ensuring that the fusion result does not lose texture details in the edge area nor produce harsh stitching marks. After completing the anti-aliasing and directional filtering fusion processing of the high-frequency bands, the system combines the processed high-frequency band data with the obtained low-frequency band data with balanced tonal transitions. Following the inverse reconstruction process of the Laplacian pyramid, starting from the lowest frequency level, it sequentially upsamples and adds the high-frequency bands of the next higher level, reconstructing layer by layer until the original spatial resolution is restored, finally outputting a high-fidelity target archive file. This high-fidelity target archive file achieves a natural and seamless fusion of the reconstructed seal layer and the underlying text layer at the visual level. At the low-frequency level, the tonal transition is uniform and natural; at the high-frequency level, edge details are clear and there are no artificial synthesis marks. While ensuring the preservation of core details, it possesses publication-grade visual fidelity quality, suitable for subsequent evidence preservation and electronic archiving.

[0055] In step S106, two types of feature information are extracted from the output high-fidelity target archive file. The first is a byte hash fingerprint, a fixed-length digital digest obtained by unidirectional compression of the archive file's byte stream using a cryptographic hash algorithm. Any minor alteration to the file content will cause a significant change in this fingerprint, thus providing digital integrity verification capabilities. The second is paper fiber speckle characteristics, extracted from the scanned data, which show the unique speckle pattern formed by the interweaving of paper fibers in the stamped area. This speckle pattern originates from the random three-dimensional interweaving structure of cellulose fibers during papermaking, possessing natural uniqueness and being impossible to accurately replicate through ordinary printing or photographing, thus providing physical media traceability capabilities. The system generates a dual-traceability anti-tampering result based on the byte hash fingerprint and paper fiber speckle characteristics, achieving a unique binding between the digital electronic file and the physical paper medium, ensuring that the archive file possesses verifiable anti-tampering traceability capabilities at both the digital and physical levels.

[0056] In one embodiment, step S106 includes: The byte stream of the high-fidelity target archive file is processed using a hash algorithm to obtain a byte hash fingerprint; The paper fiber speckle features of the stamped area are extracted from the high-fidelity target archive file, and the paper fiber speckle features are transformed by feature dimensionality reduction and fixed-length quantization hash algorithm to obtain a fixed-length bit string; The fixed-length bit string and the byte hash fingerprint are incorporated into the Merkle tree as leaf nodes, and the Merkle root is used as the commitment value for the entire archive. The Merkle root, along with the trusted timestamp and the issuer's digital signature, is broadcast to the consortium blockchain network for consensus and on-chain processing to generate a dual-traceability, tamper-proof result.

[0057] In this embodiment, a hash algorithm is used to process the byte stream of the high-fidelity target archive file output from the previous step to obtain a byte hash fingerprint. A hash algorithm is a cryptographic algorithm that maps input data of arbitrary length to a fixed-length output digest through a one-way compression function. Its core characteristic is that the same input will inevitably produce the same output, while any tiny modification to the input data (even changing only one bit) will lead to a significant and unpredictable change in the output result. Furthermore, it is computationally infeasible to deduce from the output result that the original input was not feasible. In this embodiment, a cryptographic hash algorithm (e.g., SHA-256) is used to perform hash calculations byte-by-byte on the complete byte stream of the high-fidelity target archive file, compressing all the digital content of the entire archive file into a fixed-length digital digest, i.e., the byte hash fingerprint. This byte hash fingerprint uniquely identifies the content state of the high-fidelity target archive file at the digital level. Once any content in the archive file is tampered with (whether it's text modification, image replacement, or format adjustment), the recalculated hash value will be completely different from the original byte hash fingerprint, thus enabling immediate detection of tampering and providing digital-level integrity verification capabilities for the archive file.

[0058] Furthermore, the paper fiber speckle features of the stamped area are extracted from the high-fidelity target archive file, and these features are transformed using feature dimensionality reduction and fixed-length quantization hashing algorithms to obtain a fixed-length bit string. Paper fiber speckle features refer to the unique speckle pattern formed by the interweaving of cellulose fibers in the stamped area of ​​the paper. This speckle pattern originates from the random three-dimensional interweaving structure of cellulose fibers during the pulp deposition and pressing stages of papermaking. The fiber interweaving pattern of each sheet of paper has a natural uniqueness similar to human fingerprints, and this microscopic random three-dimensional structure cannot be accurately replicated by ordinary printing or scanning methods. Therefore, it can be used as a physically unclonable functional feature for the unique identification of paper media. In specific implementation, the spatial range corresponding to the stamped area is located from the three-dimensional height channel and ultraviolet fluorescence channel data contained in the collected multi-dimensional preliminary scan data tensor. The speckle texture distribution pattern presented by the interweaving of paper fibers is extracted from this area to obtain the original paper fiber speckle feature data. Since the original speckle feature data is typically high-dimensional and large in volume, it is unsuitable for direct use in subsequent hash commitments and on-chain storage. Therefore, further transformation processing using feature dimensionality reduction and fixed-length quantization hashing algorithms is performed. Feature dimensionality reduction refers to compressing high-dimensional feature data into a low-dimensional representation space using mathematical transformation methods while preserving as much of the discriminative core information as possible. This reduces data redundancy and extracts the most representative feature components. Fixed-length quantization hashing algorithms transform the dimensionality-reduced continuous numerical feature vectors into fixed-length binary bit strings through quantization encoding and hash mapping. This ensures that similar speckle features are mapped to similar bit strings, while significantly different speckle features are mapped to significantly different bit strings. Simultaneously, the length of the output bit string is fixed and uniform to facilitate subsequent data structure standardization. After the above transformation, the original high-dimensional paper fiber speckle features are compressed and encoded into a fixed-length bit string. This bit string uniquely identifies the specific paper medium corresponding to the current archived document at the physical level.

[0059] After obtaining the byte hash fingerprint and the fixed-length bit string, the fixed-length bit string and the byte hash fingerprint are incorporated into the Merkle tree as leaf nodes, and the Merkle root is used as the commitment value for the entire archive. A Merkle tree is a tree-like data structure based on hash operations. Its bottom layer consists of several leaf nodes, each storing the hash value of a data item. The hash values ​​of two adjacent leaf nodes are concatenated and subjected to a secondary hash operation to generate the hash value of their parent node. This process is recursively performed layer by layer upwards until it finally converges into a unique root node hash value, i.e., the Merkle root. The core characteristic of a Merkle tree is that any change in the data of a leaf node will cause a cascading change in the hash values ​​of all nodes along the entire path from that leaf node to the Merkle root. This allows the Merkle root to make a global commitment to the integrity of all leaf node data in the entire tree with a very small amount of data (a fixed-length hash value). In this embodiment, the system incorporates the byte hash fingerprint representing the integrity of the digital file and the fixed-length bit string representing the uniqueness of the physical paper as leaf nodes into the same Merkle tree. Through layer-by-layer hash operations, the Merkle root of the tree is finally calculated. This Merkle root serves as the commitment value for the entire archive, encompassing both the content integrity information of the digital electronic file and the unique identification information of the physical paper medium with a fixed-length hash value, thus achieving a dual information binding commitment at both the digital and physical levels.

[0060] Finally, the Merkle root, trusted timestamp, and issuer's digital signature are broadcast to the consortium blockchain network for consensus and on-chain consensus, generating a dual-track, tamper-proof result. A trusted timestamp is a time-stamping certificate issued by an authoritative timestamp service provider, proving that data existed at a specific moment. It cannot be forged or altered afterward, providing legally valid chronological evidence of the archived document's creation time. The issuer's digital signature is the signature data generated by the issuer of the archived document using their private key to perform asymmetric encryption on the Merkle root. Any verifier holding the corresponding public key can verify that the signature was indeed generated by the issuer and that the signature content has not been tampered with, thus cryptographically binding the responsible party of the archived document with its content. A consortium blockchain network is a distributed ledger network jointly maintained by multiple mutually trusted organizations. Through a consensus mechanism, it ensures that data written to the blockchain cannot be unilaterally altered or deleted once on-chain, possessing decentralized data immutability and multi-party verifiability. The system encapsulates the Merkle root, trusted timestamp, and issuer's digital signature, and broadcasts them to the consortium blockchain network. Consensus nodes within the network verify and confirm the transaction data, completing the consensus on-chain operation. It's worth noting that to protect the privacy of sensitive information such as the contract text, the system only stores the Merkle root commitment value on the blockchain, rather than uploading the complete content of the archived document. When verification is required, the system can disclose the Merkle path of a designated leaf node to the authorized verifier, allowing the verifier to complete ownership and integrity proofs without obtaining the full document. After this on-chain encapsulation process, the system ultimately generates a dual-traceability, tamper-proof result. This result achieves a unique and rigid binding between the digital electronic document and the physical paper medium through the Merkle tree, and through the consensus mechanism of the consortium blockchain network, it grants on-chain immutability and off-chain two-way verifiability. At the legal proof level, this provides highly reliable tamper-proof traceability guarantees for the authenticity, integrity, and timeliness of the archived document.

[0061] In summary, this application performs semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and generates a dynamic stamping target coordinate matrix by combining pre-collected paper weight parameters and fixing temperature parameters. This enables the system to automatically avoid key text areas based on a full understanding of the document's layout structure. Simultaneously, it pre-compensates for the uneven shrinkage deformation of paper caused by the high temperature of fixing, effectively solving the stamping position offset problem caused by neglecting physical medium deformation in existing fixed coordinate positioning methods, and significantly improving stamping positioning accuracy. Furthermore, by performing multi-axis curve trajectory planning and medium impedance calculation based on the dynamic stamping target coordinate matrix and generating a joint stamping driving instruction set, it achieves coordinated control of paper feeding and stamping actions, as well as adaptive adjustment of stamping force according to paper medium conditions. This ensures precise controllability of the stamping action in both positional accuracy and imprinting force, laying a reliable execution foundation for obtaining high-quality physical imprints.

[0062] Furthermore, this application employs alternating illumination across three bands—visible light, near-infrared, and ultraviolet—along with a photometric stereo method for data acquisition during the scanning process. This overcomes the limitation of existing single-white-light scanning, which can only acquire two-dimensional color distribution information. The system can simultaneously perceive the color information of the imprint, the spectral absorption information of the ink's chemical composition, the ultraviolet fluorescence penetration morphology of the imprint edge, and the three-dimensional microscopic morphology of the ink protrusions on the paper surface. This provides comprehensive multi-physical data support for subsequent authentication of the seal. Based on this, by performing ink stripping processing on the tensors of the multi-dimensional preliminary scan data and comparing multi-scale features using twin networks to construct an anomaly assessment matrix, the system can eliminate two-dimensional planar counterfeit seals printed in color from a physical principle perspective. It also comprehensively quantifies and evaluates seal anomalies from both macroscopic shape consistency and microscopic edge penetration texture levels, significantly improving the reliability and precision of seal authentication.

[0063] Furthermore, this application reconstructs the seal layer by driving an encoding / decoding generation network based on the seal anomaly evaluation matrix, and outputs a high-fidelity target archive file through Laplace pyramid multi-band fusion. This ensures that the defective seal layer is completely reconstructed while maintaining the original ink texture and natural ink gradation characteristics. The reconstructed seal layer and the underlying text layer achieve natural and seamless fusion in both low-frequency tones and high-frequency edge details, ensuring the visual fidelity of the archive file. Finally, by extracting the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file and generating a dual-traceability anti-tampering result, the content integrity verification of the digital electronic document is rigidly bound to the unique identification of the physical paper medium. This overcomes the shortcomings of existing solutions that rely solely on digital verification mechanisms and cannot establish a unique association between electronic documents and physical paper, providing the archive file with verifiable anti-tampering traceability at both the digital and physical levels.

[0064] This application integrates various technologies, including semantic segmentation of the page layout, pre-compensation for geometric deformation, multispectral and photometric stereoscopic joint scanning, twin network seal anomaly assessment, encoding and decoding generative network reconstruction and fusion, and dual anchoring of paper fiber speckle and byte hash, into the entire process of printing, stamping, scanning and archiving. This constructs a deep perception and closed-loop control capability for the physical media characteristics, achieving significant improvements in stamping positioning accuracy, reliability of seal authenticity identification, visual fidelity quality of archived documents, and anti-tampering traceability capabilities.

[0065] Combination Figure 2 As shown, Figure 2 This is a schematic block diagram of a printing and stamping scanning device provided in an embodiment of the present invention. The printing and stamping scanning device 200 includes: The matrix generation unit 201 is used to perform semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then combine the pre-collected paper weight parameters and fixing temperature parameters to generate a dynamic stamping target coordinate matrix. Instruction generation unit 202 is used to perform multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix to generate a joint driving instruction set for stamping. The data scanning unit 203 is used to execute the seal stamping joint driving instruction set, and simultaneously uses the visible light, near-infrared and ultraviolet three-band alternating illumination and photometric stereo method to collect data to obtain multi-dimensional preliminary scan data tensors. The matrix evaluation unit 204 is used to perform ink stripping processing and twin network multi-scale feature comparison on the tensors of the multi-dimensional preliminary scan data to construct an anomaly evaluation matrix for the seal. The target archiving unit 205 is used to drive a preset encoding and decoding generation network to reconstruct the seal layer according to the seal anomaly evaluation matrix, and output a high-fidelity target archiving file through Laplace pyramid multi-band fusion. The result output unit 206 is used to extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features.

[0066] In this embodiment, the matrix generation unit 201 performs semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then generates a dynamic stamping target coordinate matrix by combining the pre-collected paper weight parameters and fixing temperature parameters; the instruction generation unit 202 performs multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix to generate a seal stamping joint driving instruction set; the data scanning unit 203 executes the seal stamping joint driving instruction set, and simultaneously uses alternating illumination of visible light, near-infrared and ultraviolet bands and photometric stereo method to collect data, obtaining multi-dimensional preliminary data. The scanning data tensor; the matrix evaluation unit 204 performs ink removal processing and twin network multi-scale feature comparison on the multi-dimensional preliminary scanning data tensor to construct an imprint anomaly evaluation matrix; the target archiving unit 205 drives a preset encoding and decoding generation network to reconstruct the imprint layer according to the imprint anomaly evaluation matrix, and outputs a high-fidelity target archive file through Laplacian pyramid multi-band fusion; the result output unit 206 extracts the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generates a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features.

[0067] In one embodiment, the matrix generation unit 201 is specifically used for: The preset layout analysis deep learning model is invoked to perform layout segmentation and semantic annotation on the original electronic document to be processed, and the segmentation and annotation results are obtained. Based on the segmentation and annotation results, the corresponding title area, body paragraphs, table area, signature bar and stamp anchor point of the electronic document are identified, and then the key fields are read through the preset optical character recognition engine. The remaining blank area other than the key field is used as the candidate search domain, and the weighted Euclidean distance between the divided candidate positions and the signature bar, text baseline and the key field is used as the cost function; Based on the cost function and the minimum coverage and maximum blank space rules, a constrained nonlinear programming solution is performed to obtain the optimal stamp center coordinates for preventing occlusion. Based on the pre-collected paper weight parameters and fixing temperature parameters, the geometric pre-compensation lookup table is invoked; Based on the geometric pre-compensation lookup table, the optimal stamping center coordinates are subjected to affine and perspective transformations for pre-distortion correction, and a dynamic stamping target coordinate matrix is ​​output.

[0068] In one embodiment, the instruction generation unit 202 is specifically used for: Based on the dynamic stamping target coordinate matrix, an S-curve acceleration / deceleration planning method is adopted; Based on the continuous changes in the S-curve acceleration and deceleration plan, a dual-axis position result is constructed for the dynamic stamping action that is synchronized with paper feeding and addressing. Based on the dual-axis position results, the extracted trajectory parameters are registered in real time, and the registration residuals are corrected by a proportional-integral-derivative controller to obtain the residual correction results. Based on the residual correction results, the paper thickness and stacking state are measured, and the dielectric impedance is calculated based on the real-time feedback of the stamping motor phase current to obtain the stamping load. The step output torque of the stamping head is dynamically calculated based on the paper thickness, stacking state, and stamping load. The spatial trajectory coordinates corresponding to the dynamic stamping target coordinate matrix and the dynamic torque control signal corresponding to the step output torque are encapsulated to generate a seal stamping joint drive instruction set.

[0069] In one embodiment, the data scanning unit 203 is specifically used for: The seal stamping joint drive instruction set is parsed and executed to drive the mechanical actuator to complete the stamping action and enter the scanning mode; Based on the scanning mode, the paper is illuminated by a three-band alternating light source array of visible light, near-infrared and ultraviolet light, and the reflectance characteristics of ink pigments in different bands are collected simultaneously by the photometric stereo method. Based on the reflectivity characteristics, multiple brightness images are captured by exposure at different azimuth angles in the stamping area, and the three-dimensional surface morphology parameters of the imprint are reconstructed according to the preset Lambert reflection model. The reflectivity features are aligned and stitched with the three-dimensional surface topography parameters of the imprint to obtain a multi-dimensional preliminary scan data tensor.

[0070] In one embodiment, the matrix evaluation unit 204 is specifically used for: The ink paste component stripping process is performed on the multi-dimensional preliminary scan data tensor to obtain the real physical stamp layer; The real physical stamp layer is subjected to two-dimensional plane fake stamp removal processing to obtain the stamp layer to be compared. The seal layer to be compared and the standard vector template are transmitted to a preset twin deep neural network for processing to obtain multi-scale feature maps; The multi-scale feature maps are aligned along the channel dimension to jointly measure the consistency of the overall shape and obtain the shape deviation component. The gradient direction histogram and local binary pattern texture features are calculated using the edge regions of the seal layer to be compared, and the shape deviation component is fused to construct the seal anomaly evaluation matrix.

[0071] In one embodiment, the target archiving unit 205 is specifically used for: A threshold determination is performed on the comprehensive anomaly score in the seal anomaly assessment matrix to obtain a repair initiation signal; According to the repair initiation signal, the U-Net structure is invoked to use the original defect stamp layer and the standard vector template as dual-channel conditional inputs. The standard vector template is non-rigidly geometrically aligned based on the shape deviation component in the seal anomaly evaluation matrix to obtain the reconstructed complete seal layer. The complete seal layer and the underlying text layer are decomposed into multiple frequency bands through the Laplacian pyramid, and brightness and contrast equalization processing is performed on the low frequency band to obtain low frequency band data with balanced tone transition. Edge anti-aliasing and directional filtering are fused into the high-frequency bands in the multi-layer frequency bands, and the low-frequency band data is combined with the Laplace pyramid for inverse reconstruction to output a high-fidelity target archive file.

[0072] In one embodiment, the result output unit 206 is specifically used for: The byte stream of the high-fidelity target archive file is processed using a hash algorithm to obtain a byte hash fingerprint; The paper fiber speckle features of the stamped area are extracted from the high-fidelity target archive file, and the paper fiber speckle features are transformed by feature dimensionality reduction and fixed-length quantization hash algorithm to obtain a fixed-length bit string; The fixed-length bit string and the byte hash fingerprint are incorporated into the Merkle tree as leaf nodes, and the Merkle root is used as the commitment value for the entire archive. The Merkle root, along with the trusted timestamp and the issuer's digital signature, is broadcast to the consortium blockchain network for consensus and on-chain processing to generate a dual-traceability, tamper-proof result.

[0073] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0074] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0075] This invention also provides a computer device, which may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the computer device may also include various network interfaces, a power supply, a graphics card, etc., to utilize the graphics card's performance to operate the model, such as for inference and training.

[0076] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0077] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for scanning printed stamps, characterized in that, include: The acquired original electronic documents to be processed are subjected to semantic segmentation of the layout and pre-compensation of geometric deformation. Then, the dynamic stamping target coordinate matrix is ​​generated by combining the pre-collected paper weight parameters and fixing temperature parameters. Based on the dynamic stamping target coordinate matrix, multi-axis curve trajectory planning and dielectric impedance calculation are performed respectively to generate a joint driving instruction set for stamping. The seal stamping joint driving instruction set is executed, and data acquisition is carried out by alternating illumination of visible light, near-infrared and ultraviolet three bands and in conjunction with photometric stereo method to obtain multi-dimensional preliminary scan data tensor. The tensors of the multi-dimensional preliminary scan data are subjected to ink pad stripping processing and twin network multi-scale feature comparison to construct an anomaly assessment matrix for the seal impression. The seal anomaly assessment matrix drives a preset encoding and decoding generation network to reconstruct the seal layer, and outputs a high-fidelity target archive file through Laplace pyramid multi-band fusion. Extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features; The process of performing semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then generating a dynamic stamping target coordinate matrix by combining the pre-collected paper weight parameters and fixing temperature parameters, includes: calling a preset deep learning model for page analysis to perform page segmentation and semantic annotation on the original electronic document to be processed, and obtaining segmentation and annotation results. Based on the segmentation and annotation results, the corresponding title area, body paragraphs, table area, signature bar, and stamp anchor point of the electronic document are identified. Then, key fields are read through a preset optical character recognition engine. The remaining blank area outside the key fields is used as the candidate search domain, and the weighted Euclidean distance between the divided candidate positions and the signature bar, text baseline, and key fields is used as the cost function. Based on the cost function, combined with the minimum coverage and maximum blank rules, a constrained nonlinear programming solution is performed to obtain the optimal stamp center coordinates to prevent occlusion. According to the pre-collected paper weight parameters and fixing temperature parameters, a geometric pre-compensation lookup table is called. Based on the geometric pre-compensation lookup table, the optimal stamp center coordinates are subjected to affine transformation and perspective transformation pre-distortion correction, and a dynamic stamp target coordinate matrix is ​​output.

2. The printing and stamping scanning method according to claim 1, characterized in that, The process involves multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix, generating a joint stamping driving instruction set, including: Based on the dynamic stamping target coordinate matrix, an S-curve acceleration / deceleration planning method is adopted; Based on the continuous changes in the S-curve acceleration and deceleration plan, a dual-axis position result is constructed for the dynamic stamping action that is synchronized with paper feeding and addressing. Based on the dual-axis position results, the extracted trajectory parameters are registered in real time, and the registration residuals are corrected by a proportional-integral-derivative controller to obtain the residual correction results. Based on the residual correction results, the paper thickness and stacking state are measured, and the dielectric impedance is calculated based on the real-time feedback of the stamping motor phase current to obtain the stamping load. The step output torque of the stamping head is dynamically calculated based on the paper thickness, stacking state, and stamping load. The spatial trajectory coordinates corresponding to the dynamic stamping target coordinate matrix and the dynamic torque control signal corresponding to the step output torque are encapsulated to generate a seal stamping joint drive instruction set.

3. The printing and stamping scanning method according to claim 1, characterized in that, The execution of the seal stamping joint driving instruction set, while employing alternating illumination in the visible, near-infrared, and ultraviolet bands and combining it with photometric stereo method for data acquisition, yields a multi-dimensional preliminary scan data tensor, including: The seal stamping joint drive instruction set is parsed and executed to drive the mechanical actuator to complete the stamping action and enter the scanning mode; Based on the scanning mode, the paper is illuminated by a three-band alternating light source array of visible light, near-infrared and ultraviolet light, and the reflectance characteristics of ink pigments in different bands are collected simultaneously by the photometric stereo method. Based on the reflectivity characteristics, multiple brightness images are captured by exposure at different azimuth angles in the stamping area, and the three-dimensional surface morphology parameters of the imprint are reconstructed according to the preset Lambert reflection model. The reflectivity features are aligned and stitched with the three-dimensional surface topography parameters of the imprint to obtain a multi-dimensional preliminary scan data tensor.

4. The printing and stamping scanning method according to claim 1, characterized in that, The process involves performing ink residue stripping processing on the tensors of the multi-dimensional preliminary scan data and comparing them with multi-scale features of a twin network to construct an anomaly assessment matrix for the seal impression, including: The ink paste component stripping process is performed on the multi-dimensional preliminary scan data tensor to obtain the real physical stamp layer; The real physical stamp layer is subjected to two-dimensional plane fake stamp removal processing to obtain the stamp layer to be compared. The seal layer to be compared and the standard vector template are transmitted to a preset twin deep neural network for processing to obtain multi-scale feature maps; The multi-scale feature maps are aligned along the channel dimension to jointly measure the consistency of the overall shape and obtain the shape deviation component. The gradient direction histogram and local binary pattern texture features are calculated using the edge regions of the seal layer to be compared, and the shape deviation component is fused to construct the seal anomaly evaluation matrix.

5. The printing and stamping scanning method according to claim 1, characterized in that, The process of reconstructing the seal layer using a preset encoding / decoding generation network driven by the seal anomaly evaluation matrix, and outputting a high-fidelity target archive file through Laplacian pyramid multi-band fusion, includes: A threshold determination is performed on the comprehensive anomaly score in the seal anomaly assessment matrix to obtain a repair initiation signal; According to the repair initiation signal, the U-Net structure is invoked to use the original defect stamp layer and the standard vector template as dual-channel conditional inputs. The standard vector template is non-rigidly geometrically aligned based on the shape deviation component in the seal anomaly evaluation matrix to obtain the reconstructed complete seal layer. The complete seal layer and the underlying text layer are decomposed into multiple frequency bands through the Laplacian pyramid, and brightness and contrast equalization processing is performed on the low frequency band to obtain low frequency band data with balanced tone transition. Edge anti-aliasing and directional filtering are fused into the high-frequency bands in the multi-layer frequency bands, and the low-frequency band data is combined with the Laplace pyramid for inverse reconstruction to output a high-fidelity target archive file.

6. The printing and stamping scanning method according to claim 1, characterized in that, The step of extracting the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generating a dual traceability and tamper-proof result based on the byte hash fingerprint and paper fiber speckle features, includes: The byte stream of the high-fidelity target archive file is processed using a hash algorithm to obtain a byte hash fingerprint; The paper fiber speckle features of the stamped area are extracted from the high-fidelity target archive file, and the paper fiber speckle features are transformed by feature dimensionality reduction and fixed-length quantization hash algorithm to obtain a fixed-length bit string; The fixed-length bit string and the byte hash fingerprint are incorporated into the Merkle tree as leaf nodes, and the Merkle root is used as the commitment value for the entire archive. The Merkle root, along with the trusted timestamp and the issuer's digital signature, is broadcast to the consortium blockchain network for consensus and on-chain processing to generate a dual-traceability, tamper-proof result.

7. A printing and stamping scanning device, characterized in that, include: The matrix generation unit is used to perform semantic segmentation and geometric deformation pre-compensation on the acquired original electronic document to be processed, and then combine the pre-collected paper weight parameters and fixing temperature parameters to generate a dynamic stamping target coordinate matrix. The instruction generation unit is used to perform multi-axis curve trajectory planning and dielectric impedance calculation based on the dynamic stamping target coordinate matrix to generate a joint driving instruction set for stamping. The data scanning unit is used to execute the seal stamping joint driving instruction set, and at the same time, it uses the visible light, near-infrared and ultraviolet three-band alternating illumination and the photometric stereo method to collect data and obtain multi-dimensional preliminary scan data tensors. The matrix evaluation unit is used to perform ink stripping processing and twin network multi-scale feature comparison on the tensors of the multi-dimensional preliminary scan data to construct an anomaly evaluation matrix for the seal. The target archiving unit is used to drive a preset encoding and decoding generation network to reconstruct the seal layer according to the seal anomaly evaluation matrix, and output a high-fidelity target archiving file through Laplace pyramid multi-band fusion. The result output unit is used to extract the byte hash fingerprint and paper fiber speckle features of the high-fidelity target archive file, and generate a dual traceability and anti-tampering result based on the byte hash fingerprint and paper fiber speckle features. The matrix generation unit is specifically used for: calling a preset deep learning model for page layout analysis to perform page segmentation and semantic annotation on the original electronic document to be processed, and obtaining segmentation and annotation results; identifying the corresponding title area, body paragraphs, table area, signature bar, and stamp anchor point of the electronic document based on the segmentation and annotation results, and then reading key fields through a preset optical character recognition engine; using the remaining blank area outside the key fields as the candidate search domain, and using the weighted Euclidean distance between the divided candidate positions and the signature bar, text baseline, and key fields as the cost function; performing constrained nonlinear programming based on the cost function and the minimum coverage and maximum blank rules to obtain the optimal stamp center coordinates to prevent occlusion; calling a geometric pre-compensation lookup table based on the pre-collected paper weight parameters and fixing temperature parameters; performing affine transformation and perspective transformation pre-distortion correction on the optimal stamp center coordinates based on the geometric pre-compensation lookup table, and outputting a dynamic stamp target coordinate matrix.

8. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the printing and stamping scanning method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the printing and stamping scanning method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Traditional Chinese painting verification method and device based on spectral imaging technology

    CN103149164A

  • Printing control management system and device

    CN119336283A

  • Intelligent control method, device, equipment and system for automatic stamping

    CN121214466A

  • Digital and physical mixed signature method and device, electronic equipment and storage medium

    CN122020728A

  • Imprint device, imprint method and manufacturing method of goods

    JP2021022594A