A character recognition method for drug and reagent expiration date verification

By acquiring local curvature and temperature data, and utilizing anisotropic constraint operators and Laplacian matrix spectral analysis, the problem of morphological distortion of thermal characters on medical reagent containers under extreme environments was solved, achieving high-precision character recognition.

CN122176720APending Publication Date: 2026-06-09QINHUANGDAO TRADITIONAL CHINESE MEDICINE HOSPITAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINHUANGDAO TRADITIONAL CHINESE MEDICINE HOSPITAL
Filing Date
2026-03-26
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies for recognizing thermal characters on medical reagent containers are affected by fluctuations in ambient temperature and humidity and light, resulting in character distortion and low recognition accuracy. Traditional methods cannot effectively compensate for the physical erosion and topological breakage of the characters.

Method used

By acquiring local curvature parameters and real-time temperature data, a local polar coordinate system is established. Anisotropic constraint operators are used for topology compensation and image resampling. Combined with Laplacian matrix spectral analysis, graph isomorphism matching is performed to achieve accurate restoration of thermal characters.

Benefits of technology

In extreme environments, high-precision recognition of thermal characters was achieved, avoiding the misreading problem caused by environmental interference in traditional methods, and ensuring the accuracy and stability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176720A_ABST
    Figure CN122176720A_ABST
Patent Text Reader

Abstract

The present application relates to the field of character recognition, and discloses a kind of character recognition methods of drug and reagent expiration date verification, comprising: obtaining the image of the character region of the curved object to be identified, collecting local curvature parameters and real-time temperature data, resampling based on local polar coordinate system, eliminating the geometric distortion of character region, determining anisotropic constraint operator according to temperature data, implementing stroke topology compensation by adjusting pixel intensity gradient distribution, diffusing against environmental color development, extracting two-dimensional skeleton features and implementing graph isomorphism matching with standard character dynamic grid, determining the recognition result, the present application uses physical prior constraint to solve the recognition problem caused by narrow curved distortion and temperature fluctuation, on the basis of ensuring the stability of recognition scheme, realize the essential improvement of expiration date verification accuracy in high-load supervision scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a character recognition method for verifying the expiration dates of pharmaceuticals and reagents, belonging to the field of character recognition technology. Background Technology

[0002] In medical process management, the verification of the expiration dates of drugs and reagents forms the basis of safety control. Currently, the technology generally uses image acquisition equipment in conjunction with character recognition algorithms to extract the date sequence on the packaging label. This recognition method based on two-dimensional pixel feature extraction has high stability when processing labels with uniform lighting and flat surfaces.

[0003] However, medical reagent containers often have cylindrical or other curved surface structures, and the labels often use thermosensitive color-developing materials that are significantly affected by environmental thermodynamic conditions. When the curvature of the container surface is coupled with fluctuations in environmental temperature and humidity, the physical form of the characters undergoes a complex nonlinear evolution. Temperature deviation from the color development reference domain can cause anisotropic thermal diffusion and smudging of the character strokes, or cause topological breaks in the strokes due to insufficient color development.

[0004] To address the aforementioned challenges, conventional improvement approaches often focus on simple image contrast gain adjustment or global brightness compensation. These linear image enhancement methods cannot characterize the physical morphological erosion of character strokes and are prone to introducing specular reflection interference from the bottle surface, leading to overlapping feature spaces for similar characters. Furthermore, not only are feature extraction difficult due to the limitations of the curved surface of the hardware container, but existing software algorithms and recognition control methods also have shortcomings. For example, Chinese invention patent application CN121074920A discloses a machine learning-based method for recognizing coded characters on orthopedic implants, which extracts deformation parameters through surface curvature distribution and utilizes… Angle deviation matrix enables geometric restoration of curved text. However, the underlying premise of this control method is that the physical material of the characters on the object surface is constant and the boundaries are fixed. It only attributes the distortion to a single geometric spatial projection misalignment. When applied to the medical reagent verification scenario, it encounters a fundamental mismatch of objective constraints: medical thermal labels will undergo irreversible physical-level thermal diffusion or color fracture under temperature fluctuations. This anisotropic morphological erosion accompanied by thermodynamic evolution destroys the pixel continuity assumption on which traditional geometric correction depends, causing the recognition algorithm based purely on spatial curvature feature compensation to fail rapidly when encountering environmental color diffusion.

[0005] Therefore, how to provide a character recognition method for verifying the expiration dates of drugs and reagents, and achieve accurate restoration of the topological features of distorted characters under extreme environments, has become the technical problem to be solved by this invention. Summary of the Invention

[0006] To address the problems mentioned in the background art, such as the weak ability of existing technologies to reproduce the morphology of thermally sensitive characters and the low recognition accuracy under conditions of curved container surface features, fluctuating ambient temperature and humidity, and complex light and shadow coupling, the technical solution of this invention is as follows: A character recognition method for verifying the expiration date of pharmaceuticals and reagents, comprising the following steps: Step S1: Extract the original image of the character region on the surface object to be identified, obtain the local curvature parameters that characterize the surface geometry of the surface object to be identified, and simultaneously collect real-time temperature data that reflects the thermal color diffusion state of the character region. Step S2: Establish a local polar coordinate system based on the local curvature parameters, and resample the pixels in the nonlinear distortion region of the original image to the normalized two-dimensional coordinate plane through spatial coordinate transformation. Use the projection mapping relationship between the local polar coordinate system and the three-dimensional physical space to eliminate the geometric stretching distortion of the character region on the complex surface. Step S3: Using the pixel coordinate reference provided by the normalized two-dimensional coordinate plane, determine the tangential constraint radius and radial constraint radius of the target anisotropic constraint operator based on real-time temperature data, and use the target anisotropic constraint operator to perform topological compensation on the stroke edge. By adjusting the pixel intensity gradient distribution of the stroke edge, the physical characteristics of edge pixel diffusion or color defects caused by temperature disturbance are offset. Step S4: Extract two-dimensional skeleton features containing key stroke nodes and arc curvature information from the pixel connected domain of the character image after topological compensation. Perform graph isomorphic matching between the two-dimensional skeleton features and the standard character dynamic mesh after geometric projection evolution. Use the convergence accuracy based on Laplacian matrix spectral analysis to determine the correlation degree of graph isomorphic matching, and output the recognition result of the character to be recognized according to the correlation degree.

[0007] Preferably, step S2 specifically involves: determining the deflection angle of the tangent normal vector of the surface to be identified based on the local curvature parameters, calculating the spatial point transformation matrix of the original image when projected onto the normalized two-dimensional coordinate plane, and using the spatial point transformation matrix to perform a nonlinear transformation on the pixel coordinates of the character region to restore the pixel width in the distorted state to a preset proportional range.

[0008] Preferably, the logic for determining the target anisotropic constraint operator in step S3 is as follows: the real-time temperature data is compared with the preset first temperature threshold of 35℃ and the second temperature threshold of 10℃ respectively; when the real-time temperature data is higher than the first temperature threshold, it is determined that there are pixel diffusion features at the stroke edge, and the anisotropic erosion operator is used to remove the edge background noise; when the real-time temperature data is lower than the second temperature threshold, it is determined that there are color breakage features inside the stroke, and the anisotropic dilation operator is used to stitch up the broken stroke connectivity.

[0009] Preferably, the kernel size K of the target anisotropic constraint operator is calculated according to the following formula: Where K is the convolution kernel size and T is the real-time temperature data. The preset color development standard temperature value is 25℃, C is the local curvature parameter, α and β are preset weight adjustment coefficients, and the value range of the convolution kernel size K is limited to odd numbers between 3 and 11.

[0010] Preferably, step S4 specifically includes: using computer-aided design components to perform three-dimensional surface projection rendering on the standard character vector model to generate the corresponding standard character dynamic mesh; extracting the stroke center lines of the character image after topological compensation through a thinning algorithm to construct a two-dimensional skeleton feature composed of nodes and edges; calculating the Laplacian matrix spectral distance between the two-dimensional skeleton feature and the standard character dynamic mesh, and performing graph isomorphism matching according to the convergence degree of the spectral distance.

[0011] Preferably, before generating the standard character dynamic mesh, the method further includes: performing linear fine-tuning on the stroke thickness parameters of the standard character vector model based on real-time temperature data to simulate the color deformation characteristics of the thermosensitive material under different ambient temperatures, so that the standard character dynamic mesh and the two-dimensional skeleton features are logically aligned on the feature scale.

[0012] Preferably, the two-dimensional skeleton features include stroke endpoints, intersections, and segment curvature; step S4 establishes a topological correlation matrix between the two-dimensional skeleton features and the standard character dynamic grid, determines the isomorphic matching probability based on the rank and eigenvalue distribution of the topological correlation matrix, and identifies the character model with the highest isomorphic matching probability as the recognition result.

[0013] Preferably, the local curvature parameters of the surface of the object to be identified are obtained by fitting the contour data acquired by the laser line scanning unit; real-time temperature data are acquired by the infrared sensing unit; the original image is acquired by the optical imaging component, and the object distance when acquiring the original image is maintained within the range of 50mm to 150mm.

[0014] Preferably, the method further includes: performing logical discrimination between the identification result and a preset expiration date, generating a classification signal based on the discrimination result, the classification signal being used to indicate the current verification status of the surface object to be identified; wherein, the classification signal includes an permission signal indicating that the current object is usable, or an alarm signal indicating that the current object is invalid.

[0015] Preferably, the target anisotropic constraint operator has a first constraint radius in the tangential direction of the local polar coordinate system and a second constraint radius in the radial direction of the local polar coordinate system in the normalized two-dimensional coordinate plane, and the first constraint radius is greater than the second constraint radius, so as to offset the attenuation of character stroke anisotropic features caused by resampling processing.

[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. In character recognition for reagent expiration verification, based on the correlation between environmental physical parameters and thermal printing mechanisms, a feature adaptive modulation mechanism based on thermodynamic priors is established. By acquiring real-time temperature data and converting it into a morphological scaling factor in the convolutional feature extraction network, the algorithm can dynamically adjust the perceptual morphology and hole rate parameters of the convolutional operator according to the influence of environmental temperature on the stroke morphology of thermal labels. When the temperature is in the high-temperature range and stroke smudging occurs, the system automatically switches to the erosion operator with anisotropic constraints and simultaneously increases the convolutional receptive field to remove edge interference caused by thermal diffusion. When the temperature is in the low-temperature range and insufficient color development occurs, the system automatically switches to the dilation operator and reduces the convolutional receptive field. By stitching together the broken stroke topology through local feature aggregation, the recognition process changes from passively adapting to pixel noise to actively reconstructing physical features, solving the technical bottleneck of character feature collapse in low or high temperature environments without changing hardware costs.

[0017] 2. By deeply coupling surface polar coordinate remapping with anisotropic morphological operators, a topology-preserving path is constructed for the unique geometric shape of pharmaceutical packaging. When processing inkjet-printed characters on narrow curved surfaces such as vials or ampoules, the system performs spatial coordinate transformation based on the local curvature change rate of the label image and simultaneously combines the morphological correction results based on temperature perception. This ensures that character strokes distorted by surface stretching and topological features damaged by physical fading are compensated and normalized in the same feature space. This multi-mechanism synergy enables the recognition algorithm to extract high-dimensional and pure character topological sequences even under conditions of multiple nonlinear interferences such as light and shadow reflection, geometric stretching, and material degradation. This avoids the problem of misreading similar characters caused by the lack of physical prior constraints in traditional recognition methods.

[0018] 3. A geometric feature collision mechanism based on parametric vector modeling is introduced to transform the complex 2D image recognition task into a geometric approximation and optimization process of 3D vector boundaries. The system pre-sets a vector model of standard characters and drives the vector model to undergo geometric evolution in accordance with thermodynamic deformation based on the collected real-time temperature and curvature parameters, thereby generating a 3D projection mesh that highly matches the current actual working conditions. By extracting the 2D skeleton primitives of the image to be verified and performing topological isomorphism calculation with the dynamically generated candidate projection mesh, the theoretical standard model is actively collided with the degraded image in reality to eliminate pixel-level interference such as specular reflection and local graying of background color commonly found in drug packaging from the source, ensuring the determinism of character recognition under extreme physical degradation conditions. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the overall steps of the drug and reagent expiration date verification character recognition method of the present invention; Figure 2This is a branch diagram of the physical feature compensation and logical architecture for character recognition of the expiration date verification of this invention.

[0020] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0022] A character recognition method for verifying the expiration dates of pharmaceuticals and reagents includes the following steps: Step S1: Extract the original image of the character region on the surface object to be identified, obtain the local curvature parameters that characterize the surface geometry of the surface object to be identified, and simultaneously collect real-time temperature data that reflects the thermal color diffusion state of the character region. Step S2: Establish a local polar coordinate system based on the local curvature parameters, and resample the pixels in the nonlinear distortion region of the original image to the normalized two-dimensional coordinate plane through spatial coordinate transformation. Use the projection mapping relationship between the local polar coordinate system and the three-dimensional physical space to eliminate the geometric stretching distortion of the character region on the complex surface. Step S3: Using the pixel coordinate reference provided by the normalized two-dimensional coordinate plane, determine the tangential constraint radius and radial constraint radius of the target anisotropic constraint operator based on real-time temperature data, and use the target anisotropic constraint operator to perform topological compensation on the stroke edge. By adjusting the pixel intensity gradient distribution of the stroke edge, the physical characteristics of edge pixel diffusion or color defects caused by temperature disturbance are offset. Step S4: Extract two-dimensional skeleton features containing key stroke nodes and arc curvature information from the pixel connected domain of the character image after topological compensation. Perform graph isomorphic matching between the two-dimensional skeleton features and the standard character dynamic mesh after geometric projection evolution. Use the convergence accuracy based on Laplacian matrix spectral analysis to determine the correlation degree of graph isomorphic matching, and output the recognition result of the character to be recognized according to the correlation degree.

[0023] Preferably, step S2 specifically involves: determining the deflection angle of the tangent normal vector of the surface to be identified based on the local curvature parameters, calculating the spatial point transformation matrix of the original image when projected onto the normalized two-dimensional coordinate plane, and using the spatial point transformation matrix to perform a nonlinear transformation on the pixel coordinates of the character region to restore the pixel width in the distorted state to a preset proportional range.

[0024] Preferably, the logic for determining the target anisotropic constraint operator in step S3 is as follows: the real-time temperature data is compared with the preset first temperature threshold of 35℃ and the second temperature threshold of 10℃ respectively; when the real-time temperature data is higher than the first temperature threshold, it is determined that there are pixel diffusion features at the stroke edge, and the anisotropic erosion operator is used to remove the edge background noise; when the real-time temperature data is lower than the second temperature threshold, it is determined that there are color breakage features inside the stroke, and the anisotropic dilation operator is used to stitch up the broken stroke connectivity.

[0025] Preferably, the kernel size of the target anisotropic constraint operator. Calculate according to the following formula: Where K is the convolution kernel size and T is the real-time temperature data. The preset color development standard temperature value is 25℃, C is the local curvature parameter, α and β are preset weight adjustment coefficients, and the value range of the convolution kernel size K is limited to odd numbers between 3 and 11.

[0026] Preferably, step S4 specifically includes: using computer-aided design components to perform three-dimensional surface projection rendering on the standard character vector model to generate the corresponding standard character dynamic mesh; extracting the stroke center lines of the character image after topological compensation through a thinning algorithm to construct a two-dimensional skeleton feature composed of nodes and edges; calculating the Laplacian matrix spectral distance between the two-dimensional skeleton feature and the standard character dynamic mesh, and performing graph isomorphism matching according to the convergence degree of the spectral distance.

[0027] Preferably, before generating the standard character dynamic mesh, the method further includes: performing linear fine-tuning on the stroke thickness parameters of the standard character vector model based on real-time temperature data to simulate the color deformation characteristics of the thermosensitive material under different ambient temperatures, so that the standard character dynamic mesh and the two-dimensional skeleton features are logically aligned on the feature scale.

[0028] Preferably, the two-dimensional skeleton features include stroke endpoints, intersections, and segment curvature; step S4 establishes a topological correlation matrix between the two-dimensional skeleton features and the standard character dynamic grid, determines the isomorphic matching probability based on the rank and eigenvalue distribution of the topological correlation matrix, and identifies the character model with the highest isomorphic matching probability as the recognition result.

[0029] Preferably, the local curvature parameters of the surface of the object to be identified are obtained by fitting the contour data acquired by the laser line scanning unit; real-time temperature data are acquired by the infrared sensing unit; the original image is acquired by the optical imaging component, and the object distance when acquiring the original image is maintained within the range of 50mm to 150mm.

[0030] Preferably, the method further includes: performing logical discrimination between the identification result and a preset expiration date, generating a classification signal based on the discrimination result, the classification signal being used to indicate the current verification status of the surface object to be identified; wherein, the classification signal includes an permission signal indicating that the current object is usable, or an alarm signal indicating that the current object is invalid.

[0031] Preferably, the target anisotropic constraint operator has a first constraint radius in the tangential direction of the local polar coordinate system and a second constraint radius in the radial direction of the local polar coordinate system in the normalized two-dimensional coordinate plane, and the first constraint radius is greater than the second constraint radius, so as to offset the attenuation of character stroke anisotropic features caused by resampling processing.

[0032] Example 1: The implementation environment of this invention is a high-throughput reagent verification scenario in a clinical biobank. The object to be identified is a cylindrical glass vial with a diameter of 15mm. The surface of the vial is affixed with a thermal label and the initial storage temperature is 4℃. When the vial is placed on a 25℃ room temperature verification bench, condensation and water droplet reflection noise occur, along with shrinkage and color breakage of the thermal character strokes. Under this superposition of physical degradation and nonlinear geometric stretching caused by the narrow curved surface, the optical imaging component extracts the original image of the character area on the object to be identified at an object distance of 50mm. Simultaneously, the laser line scanning unit acquires the local curvature parameters characterizing the geometric properties of the surface of the object to be identified. The number is explicitly defined as the unidirectional curvature of the tangent line of the cross-section of a cylindrical object; the specific extraction and calibration steps are as follows: the laser line scanning unit is controlled to perform a scan along the radial direction of the object at a sampling frequency of 500Hz to obtain a 1D depth array containing 50 discrete distance values. The system establishes a sliding window with a length of 10 sampling points. Within each scanning window, the depth value is fitted to a local arc based on the least squares method. The reciprocal of the radius of curvature of this local arc is calculated and extracted as the local curvature parameter of the current position. The infrared sensing unit synchronously collects real-time temperature data reflecting the thermal color dispersion state of the character area. The surface curvature of the object to be identified is determined based on the local curvature parameter. The deflection angle of the tangent normal vector is used to calculate the spatial point transformation matrix when the original image is projected onto the normalized two-dimensional coordinate plane. The construction logic of this transformation matrix is ​​as follows: taking the intersection of the optical axis of the optical lens center and the object surface as the origin of polar coordinates, the physical pixel distance from each pixel in the image matrix to the origin is extracted. This pixel distance is multiplied by the aforementioned local curvature parameter to obtain the corresponding tangent normal vector deflection angle. A pre-pre-built cosine function lookup table matrix is ​​read, and the unidirectional pixel scaling ratio caused by the tilt of the projection surface is calculated. A one-dimensional coordinate stretching mapping table is constructed using this unidirectional pixel scaling ratio. The spatial point transformation matrix is ​​then used to transform the pixel coordinates of the character region to establish... In the local polar coordinate system, the specific transformation process calls the bilinear interpolation resampling logic: read the 1D coordinate stretching mapping table, when it is determined that the target pixel coordinates are mapped to a non-integer source pixel position, extract the gray values ​​of the four surrounding neighboring source pixels, and perform a weighted average based on the inverse geometric distance weight as the final gray value of the target pixel. This hard operation restores the pixel width in the distorted state to the preset ratio range, eliminating the geometric stretching distortion generated by the character area on the complex surface; on the pixel coordinate reference provided by this normalized 2D coordinate plane, the system determines the tangential constraint radius and radial constraint radius of the target anisotropic constraint operator based on real-time temperature data.

[0033] When the collected real-time temperature data of 4℃ is lower than the preset second temperature threshold of 10℃, the system determines that there are color fracture features inside the stroke. An anisotropic dilation operator is used to mend the fractured stroke connectivity. The convolution kernel size K of the target anisotropic constraint operator is determined according to the formula... Determined, where K is the convolution kernel size, and this size is limited to an odd number between 3 and 11, and T is the real-time temperature data. The preset color development standard temperature is 25℃, C is the local curvature parameter, α is the first weighting adjustment coefficient with the dimension of the reciprocal of temperature, and β is the second weighting adjustment coefficient with the dimension of the reciprocal of curvature. The target anisotropic constraint operator has a first constraint radius along the tangential direction of the local polar coordinate system and a second constraint radius along the radial direction, with the first constraint radius being greater than the second constraint radius. Based on the optical principle of the mismatch between the normal and tangential deformation ratios caused by the geometric projection of the cylindrical surface, an operator size decoupling operation is performed to determine the first constraint radius. The radial attenuation factor characterizing the geometric stretch ratio is set to determine the second constraint radius. and The maximum value in; when outputting the convolution kernel size K according to the aforementioned formula, an integer parity judgment is performed to verify the initial calculated value. If it is even, add 1 and set upper and lower limit thresholds to truncate data outside the boundary that is less than 3 and greater than 11, generating an odd-dimensional matrix structure with a uniquely determined center reference pixel that conforms to the hardware register bandwidth limit; when the real-time temperature data is between 10℃ and 35℃, the anisotropic morphological conditioning branch is closed according to the material properties that the thermosensitive color microcapsules maintain structural stability in the room temperature range and do not undergo overall edge material migration. The matrix specification is 3×3, and the variance standard deviation is 1.0. The isotropic Gaussian low-pass filter operator is used to scan and process the two-dimensional pixel plane to adjust the pixel intensity gradient distribution of the stroke edge. The system adjusts the pixel intensity gradient distribution of the stroke edge through the target anisotropic constraint operator to offset the physical characteristics of color defects caused by temperature disturbance. The two-dimensional image pixel domain repair is converted into morphological operator reconstruction under the physical field; after completing the topology compensation, the system extracts two-dimensional skeleton features containing stroke endpoints, intersections and segment arc curvature information from the pixel connected domain of the character image through a thinning algorithm.

[0034] Based on this, the computer-aided design component introduces linear fine-tuning of the stroke thickness parameters of the preset standard character vector model according to the real-time temperature data of 4℃. This drives the standard character vector model to generate a standard character dynamic mesh that simulates the deformation characteristics of the thermosensitive material. The standard character dynamic mesh and the two-dimensional skeleton features are logically aligned on the feature scale. Based on the strong nonlinear shrinkage physical law exhibited by the polymer thermosensitive coating when approaching the color transition temperature, the real-time temperature data is extracted and input into the interpolation unit of the field-programmable gate array. The offline calibration loads the material temperature-volume deformation discrete data table and calculates the exact deformation multiplier using the cubic spline interpolation algorithm. The exact deformation multiplier is used to scale the coordinates of the control points of the stroke edges of the vector model. In the process of generating the standard character dynamic mesh, the real-time three-dimensional geometric rendering calculation process is bypassed. The local curvature parameters and the exact deformation multiplier are concatenated into a memory addressing index to read the offline calibration module. The polyhedral projection is pre-executed and burned into the two-dimensional mesh template data in the static random access memory. By utilizing hardware-level parallel addressing mechanisms to avoid time delays caused by floating-point matrix multiplication, the subsequent graph isomorphic matching calculation for single-object feature mapping is controlled within a 150ms physical cycle limit. The system establishes a topological correlation matrix between two-dimensional skeleton features and standard character dynamic meshes, calculates the Laplacian matrix spectral distance between the two, and uses the convergence accuracy based on Laplacian matrix spectral analysis to determine the correlation degree of graph isomorphic matching. The rank and eigenvalue distribution of the topological correlation matrix outputs the isomorphic matching probability. The system determines the character model with the highest isomorphic matching probability as the recognition result and compares the recognition result with the preset expiration date time-stamped logical discrimination rules, outputting an approved signal indicating the current object's availability or an alarm signal indicating its failure. This mechanism inputs the geometric distortion eliminated by polar coordinate resampling and the topological fracture repaired by temperature adaptive operators into the back-end graph isomorphic matching stage, avoiding the single dependence of traditional feature extraction on pixel brightness. In curved surface recognition scenarios with condensation reflection and thermal fading, it outputs a determined expiration date text sequence.

[0035] Example 2: In high-throughput verification operations at a clinical biobank, sudden temperature changes causing condensation reflection noise and thermal label deformation jointly limit character recognition accuracy. A high-throughput reagent verification simulation test platform was constructed, including a laser line scanning unit with 0.01 mm spatial resolution, an infrared sensing unit with a measurement accuracy of 0.1℃, and an optical imaging component with an object distance set to 50 mm. Test samples were cylindrical glass vials with nominal diameters ranging from 10 mm to 20 mm, with thermal labels attached to their surfaces to record the degradation state during the temperature range from 25℃ room temperature to the extreme value of 2℃ refrigeration. The anisotropy of the target was determined. The logical link of the weight adjustment coefficient of the convolution kernel size of the constraint operator is to balance the sufficiency of the stitching of the broken strokes and the risk of morphological adhesion of adjacent fine strokes. When the absolute value of the temperature deviation, which represents the degree of thermal shrinkage, increases and the local curvature increases, the convolution kernel size tends to the upper limit of the value range to stitch the physical break. The value of the first weight adjustment coefficient α, which is the reciprocal of temperature, corresponds to the physical shrinkage rate of the thermosensitive coating. The value of the second weight adjustment coefficient β, which is the reciprocal of curvature, corresponds to the tangential distortion rate of the cylindrical projection. In this simulation platform, combined with the inherent properties of the sample material, α is set to 0.25 and β is set to 18.5.

[0036] The test platform was activated, and the 4.1℃ surface object to be identified, with condensation droplets adhering to its surface, was placed in the optical inspection station. The laser line scanning unit obtained a local curvature parameter of 0.133. The optical imaging component extracted the original image. The measured image showed that the initial connectivity was reduced to 41.2% due to the combined disturbance of condensation and thermal contraction. The system established a local polar coordinate system based on this local curvature parameter to eliminate geometric stretching distortion and calculated the convolution kernel size K of the target anisotropic constraint operator. According to the formula... Substituting the measured numerical values, K was determined to be 7. The first constraint radius along the tangential direction was set to 3, and the second constraint radius along the radial direction to be 1. The system invoked this operator to perform topology compensation. Measured data showed that the internal connectivity of the compensated character 2D skeleton features recovered to 97.5%. The computer-aided design component fine-tuned the standard character vector model based on real-time temperature data of 4.1℃ to generate a standard character dynamic mesh. The spectral distance between the 2D skeleton features and the standard character dynamic mesh was calculated to be 0.014. The system internally executed a linear mapping logic program to convert this spectral distance scalar into isomorphic matching probabilities. The most... The spectral distance threshold is fixed at 1.5, and 0 is established as the ideal axis point for a perfect match. The control unit extracts the measured spectral distance value, and the instruction arithmetic unit subtracts the measured spectral distance value from the maximum threshold of 1.5. The resulting absolute difference is then divided by 1.5 to obtain the preliminary confidence ratio. The system performs conditional judgment. If the measured spectral distance value is lower than the tolerance red line of 0.05, a fixed gain value of 0.02 is added to the preliminary confidence ratio value for linear proportional adjustment. Through this step-increment control instruction, the system deterministically converts the scalar distance of 0.014 into a percentage value, outputting an isomorphic matching probability of 98.8%. Based on this matching result, the system generates an indication signal indicating that the object is usable.

[0037] Two control groups were set up. Control group 1 omitted the step of establishing a local polar coordinate system to eliminate geometric distortion and applied anisotropic operators in Cartesian coordinates. Its measured skeleton connectivity only recovered to 73.4%, and the final isomorphic matching probability dropped to 65.2%, confirming that the surface projection dimension reduction unfolding constitutes the physical premise for the accurate topological compensation. Control group 2 retained the polar coordinate resampling step and used an isotropic Gaussian filter operator instead of the temperature adaptive anisotropic operator. Its skeleton connectivity reached 88.1%. The measured image showed that adjacent strokes were morphologically adhered, causing the Laplacian matrix spectral distance to suddenly increase to 0.156, and the isomorphic matching probability... The degradation reached 54.3%. The above data comparison confirms that the local polar coordinate system dimensionality reduction mechanism and the temperature-driven anisotropic constraint operator produce a synergistic effect exceeding the superposition of single methods. This achieves the reconstruction of physical topological features in an environment with both reflection noise and geometric deformation. The gradient response law and parameter boundaries of the technical solution to environmental disturbance intensity are explored. Image sequences of the same sample size were collected at four measured temperature gradients of 22.3℃, 14.8℃, 8.2℃, and 2.1℃. The measured data show that as the temperature deviates from the 25℃ standard value, the initial connectivity of the original image decreases from 95.1% to 38.6% of its original nonlinearity. The experimental group, under the four temperature gradients mentioned above, calculated the output convolution kernel size K as 3, 5, 7, and 11 according to adaptive logic. The final isomorphic matching probabilities after processing remained stable at benchmarks of 99.2%, 98.9%, 98.5%, and 97.8%, respectively, confirming that the recognition accuracy of the system output exhibits a stable resistance correlation with the intensity of temperature degradation disturbances. To protect the convolution kernel size K, an out-of-range control group was set up to implement extreme value convergence calculation. When the convolution kernel size was forcibly limited to 1, the operator lost its topological stitching physical ability, and the isomorphic matching probability at the extreme low temperature of 2.1℃ plummeted to 41.5%. When the convolution kernel size exceeds the limit and reaches 13, the operator overfills the stroke edges. The measured data shows that the closed hole features inside the character undergo topological collapse, inducing the failure of the graph isomorphic matching mechanism, and the isomorphic matching probability deteriorates to 32.1%. This nonlinear performance inflection point data proves that limiting the value range of the convolution kernel size K to odd numbers between 3 and 11 constitutes the optimal working window after physical trade-offs. It achieves an engineering convergence state between suturing thermally sensitive fractures and maintaining the inherent topological geometric information of the character. The system combines deformation analysis in the physical dimension and topological reshaping in the mathematical dimension to offset the optical imaging deviation under the coupling environment and outputs a deterministic validity period discrimination result.

[0038] Example 3: In the high-throughput automated verification process of a clinical biobank, the thermal inkjet printing on the surface of a 10mm diameter reagent bottle produces color bleeding under alternating temperature differences of 2℃ to 25℃. This causes local pixel boundary adhesion of structurally similar characters in the expiration date character sequence. The image reading mechanism based on pixel brightness comparison misjudges the topological structure under this deformation condition. The system extracts the two-dimensional skeleton features of the contaminated character region on the object to be identified, and simultaneously acquires key feature nodes containing stroke endpoints and intersections. The key feature nodes are defined as graph nodes, and the skeleton line segments connecting adjacent key feature nodes are defined as graph edges, thus constructing a two-dimensional skeleton undirected graph. The system acquires the standard character dynamic mesh generated by the computer-aided design component based on temperature parameters, and constructs a standard feature undirected graph using the same graph mapping logic. For the two-dimensional skeleton undirected graph and the standard feature undirected graph, the system calculates the degree matrix corresponding to each graph node and the adjacency matrix representing the node connectivity relationship, respectively. Based on the formula L=DA, the system calculates the Laplacian matrix, where L is the Laplacian matrix, D is the degree matrix, and A is the adjacency matrix.

[0039] The system solves for the eigenvalues ​​of the Laplacian matrix, extracts non-zero eigenvalues, and arranges them in ascending order to generate spectral descriptor vectors. These vectors characterize the topological invariants of the characters. The Euclidean distance between the spectral descriptor vectors of the 2D skeleton undirected graph and the standard feature undirected graph is calculated and determined as the Laplacian matrix spectral distance. The system sets an isomorphic matching tolerance threshold. The setting procedure for this threshold includes selecting 500 thermal character samples at 25℃ color development, calculating the variance of the Laplacian matrix spectral distance distribution for each standard thermal character sample under manufacturing tolerances, and selecting three times this variance value as the isomorphic matching tolerance threshold. When the Laplacian matrix spectral distance is lower than the isomorphic matching tolerance threshold, the system determines that the 2D skeleton features and the standard character dynamic mesh are aligned on the feature scale and form a graph isomorphic match, outputting the character category of the corresponding standard character dynamic mesh. This step converts visual comparison into a matrix operation process based on the relationship between graph nodes and graph edges. The system outputs the expiration date text result when the characters are deformed by local breakage and boundary adhesion.

[0040] Example 4: When the system faces a completely new clinical application environment or the initial deployment of a batch of heterogeneous thermal label consumables, the heterogeneous thermal coating exhibits a shift in its color shrinkage rate parameter under the same temperature gradient. The system connects to the environmental calibration module, inputs the batch of label samples in a 25°C standard test chamber, and prints test character clusters using a printing array. The optical imaging component extracts distortion-free baseline image features and constructs a dedicated standard character vector model. The calibration module uniformly lowers the test chamber temperature to the 2°C refrigeration extreme value, and the infrared sensing unit simultaneously records real-time temperature data. The system extracts the actual shrinkage of character strokes at each temperature node and calculates the difference between the actual shrinkage and the theoretical pixel deviation of the dedicated standard character vector model. The system fits the linear slope of this deviation difference with temperature change and sets it as the calibration value of the first weight adjustment coefficient α. The system simultaneously measures the physical distortion coefficient of the standard cylindrical object, determines the second weight adjustment coefficient β, and solidifies the target anisotropic constraint operator under the specific material system based on the above calibration value. Before accessing the service, the system initiates an offline mapping pre-generation sequence for standard character dynamic meshes. It reads the calibrated dedicated standard character vector model and traverses discrete temperature mapping points within the 2℃ to 25℃ range. Based on the fitting relationship between temperature data and actual shrinkage, the system drives the dedicated standard character vector model to generate a three-dimensional simulated topology. This three-dimensional simulated topology is projected and output as a series of standard character dynamic meshes. Feature nodes of this series of standard character dynamic meshes are extracted, the degree matrix and adjacency matrix are calculated, and the non-zero eigenvalues ​​of the Laplacian matrix are solved to generate corresponding prior spectral descriptor vectors. The system constructs all prior spectral descriptor vectors, associated temperature mapping points, and character categories into a structured addressing matrix and writes this structured addressing matrix into local storage hardware. Under actual operating conditions, the system addresses the corresponding temperature prior spectral descriptor vector in the structured addressing matrix based on the collected real-time temperature data, calculates the Laplacian matrix spectral distance based on the prior spectral descriptor vector, and outputs the validity period category signal.

[0041] Example 5: When the system faces the initial deployment of a surface object with a completely new curvature specification, the projection of the object's surface with different curvature radii onto the normalized two-dimensional coordinate plane causes resampling interpolation distortion of edge pixels. The system activates the geometric distortion offline calibration module and places a calibration cylinder object with a standard two-dimensional grid array printed on its surface on the verification platform. The optical imaging component extracts the distortion reference image containing the standard two-dimensional grid array, and the laser line scanning unit simultaneously acquires the reference local curvature parameters of the calibration cylinder object. Based on the reference local curvature parameters, the system calculates the reference spatial point transformation matrix of the distorted reference image projected onto the normalized two-dimensional coordinate plane, and uses the reference spatial point transformation matrix to transform the pixel coordinates of the distorted reference image to output the restored grid image.

[0042] The system measures the actual pixel width of each grid in the restored grid image and calculates the mapping ratio between the actual pixel width and the preset standard physical width. The system summarizes the mapping ratios under different cross-sectional normal vector deflection angles to form a data set, extracts the maximum and minimum values ​​in the data set to determine the preset ratio range, and writes the preset ratio range into the local storage hardware. When extracting two-dimensional skeleton features, the system sets the iteration termination condition of the thinning algorithm according to the preset ratio range. The control logic of the iteration termination condition is to stop the skeleton stripping iteration when the number of non-zero pixels in the neighborhood of the center pixel drops to the lower limit equivalent threshold of the preset ratio range. The offline calibration procedure converts the interpolation error in the surface unfolding process into quantized boundary parameters and outputs a determined coordinate transformation benchmark in the reagent bottle recognition scenario with heterogeneous curvature.

[0043] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A character recognition method for verifying the expiration dates of pharmaceuticals and reagents, characterized in that, Includes the following steps: Step S1: Extract the original image of the character region on the surface object to be identified, obtain the local curvature parameters that characterize the surface geometry of the surface object to be identified, and simultaneously collect real-time temperature data that reflects the thermal color diffusion state of the character region. Step S2: Establish a local polar coordinate system based on the local curvature parameters, and resample the pixels in the nonlinear distortion region of the original image to the normalized two-dimensional coordinate plane through spatial coordinate transformation. Use the projection mapping relationship between the local polar coordinate system and the three-dimensional physical space to eliminate the geometric stretching distortion of the character region on the complex surface. Step S3: Using the pixel coordinate reference provided by the normalized two-dimensional coordinate plane, determine the tangential constraint radius and radial constraint radius of the target anisotropic constraint operator based on real-time temperature data, and use the target anisotropic constraint operator to perform topological compensation on the stroke edge. By adjusting the pixel intensity gradient distribution of the stroke edge, the physical characteristics of edge pixel diffusion or color defects caused by temperature disturbance are offset. Step S4: Extract two-dimensional skeleton features containing key stroke nodes and arc curvature information from the pixel connected domain of the character image after topological compensation. Perform graph isomorphic matching between the two-dimensional skeleton features and the standard character dynamic mesh after geometric projection evolution. Use the convergence accuracy based on Laplacian matrix spectral analysis to determine the correlation degree of graph isomorphic matching, and output the recognition result of the character to be recognized according to the correlation degree.

2. The character recognition method for verifying the expiration date of drugs and reagents according to claim 1, characterized in that, Step S2 specifically involves: determining the deflection angle of the tangent normal vector of the surface to be identified based on the local curvature parameters, calculating the spatial point transformation matrix of the original image when projected onto the normalized two-dimensional coordinate plane, and using the spatial point transformation matrix to perform a nonlinear transformation on the pixel coordinates of the character region to restore the pixel width in the distorted state to the preset ratio range.

3. The character recognition method for verifying the expiration date of drugs and reagents according to claim 1, characterized in that, The logic for determining the target anisotropic constraint operator in step S3 is as follows: compare the real-time temperature data with the preset first temperature threshold of 35℃ and the second temperature threshold of 10℃ respectively; when the real-time temperature data is higher than the first temperature threshold, it is determined that there are pixel diffusion features at the stroke edge, and the anisotropic erosion operator is used to remove the edge background noise; when the real-time temperature data is lower than the second temperature threshold, it is determined that there are color breakage features inside the stroke, and the anisotropic dilation operator is used to stitch up the broken stroke connectivity.

4. The character recognition method for verifying the expiration date of drugs and reagents according to claim 3, characterized in that, The kernel size K of the target anisotropic constraint operator is calculated according to the following formula: Where K is the convolution kernel size and T is the real-time temperature data. The preset color development standard temperature value is 25℃, C is the local curvature parameter, α and β are preset weight adjustment coefficients, and the value range of the convolution kernel size K is limited to odd numbers between 3 and 11.

5. The character recognition method for verifying the expiration date of drugs and reagents according to claim 1, characterized in that, Step S4 specifically includes: using computer-aided design components to perform three-dimensional surface projection rendering on the standard character vector model to generate the corresponding standard character dynamic mesh; extracting the stroke center lines of the character image after topological compensation through a thinning algorithm to construct a two-dimensional skeleton feature composed of nodes and edges; calculating the Laplacian matrix spectral distance between the two-dimensional skeleton feature and the standard character dynamic mesh, and performing graph isomorphism matching based on the convergence degree of the spectral distance.

6. The character recognition method for verifying the expiration date of drugs and reagents according to claim 5, characterized in that, Before generating the standard character dynamic mesh, the method also includes: linearly fine-tuning the stroke thickness parameters of the standard character vector model based on real-time temperature data to simulate the color deformation characteristics of the thermosensitive material under different ambient temperatures, so that the standard character dynamic mesh and the two-dimensional skeleton features are logically aligned on the feature scale.

7. The character recognition method for verifying the expiration date of pharmaceuticals and reagents according to claim 1, characterized in that, Two-dimensional skeleton features include stroke endpoints, intersections, and segment curvature; step S4 establishes a topological correlation matrix between the two-dimensional skeleton features and the standard character dynamic grid, determines the isomorphic matching probability based on the rank and eigenvalue distribution of the topological correlation matrix, and identifies the character model with the highest isomorphic matching probability as the recognition result.

8. The character recognition method for verifying the expiration date of pharmaceuticals and reagents according to claim 1, characterized in that, The local curvature parameters of the surface of the object to be identified are obtained by fitting the contour data acquired by the laser line scanning unit; real-time temperature data are acquired by the infrared sensing unit; the original image is acquired by the optical imaging component, and the object distance when acquiring the original image is maintained within the range of 50mm to 150mm.

9. The character recognition method for verifying the expiration date of pharmaceuticals and reagents according to claim 1, characterized in that, The method further includes: performing logical discrimination between the identification result and a preset expiration date, generating a classification signal based on the discrimination result, the classification signal being used to indicate the current verification status of the surface object to be identified; wherein, the classification signal includes an permission signal indicating that the current object is usable, or an alarm signal indicating that the current object is invalid.

10. The character recognition method for verifying the expiration date of pharmaceuticals and reagents according to claim 1, characterized in that, The target anisotropy constraint operator has a first constraint radius along the tangential direction of the local polar coordinate system and a second constraint radius along the radial direction of the local polar coordinate system in the normalized two-dimensional coordinate plane, and the first constraint radius is greater than the second constraint radius, in order to offset the attenuation of anisotropic features of character strokes caused by resampling processing.