A micro invisible code preparation and intelligent identification method fusing artificial intelligence and hyperspectral imaging
By integrating artificial intelligence and hyperspectral imaging, a digital twin model and physical information neural network of microscopic invisible codes are constructed, solving the problems of existing anti-counterfeiting technologies being easily imitated, having a single information dimension, and poor environmental adaptability, thus achieving high-security and highly environmentally adaptable anti-counterfeiting identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU TONGYING TECH CO LTD
- Filing Date
- 2026-04-15
- Publication Date
- 2026-07-10
AI Technical Summary
Existing anti-counterfeiting technologies are easily imitated or are costly. Microscopic invisible code identification methods have limited information dimensions and poor environmental adaptability. Hyperspectral imaging analysis has not been deeply integrated with dynamic excitation response. Physical information neural networks are not sufficiently applied in the field of microscopic anti-counterfeiting identification.
By integrating artificial intelligence and hyperspectral imaging, and constructing a digital twin model of microscopic invisible codes and a physical information neural network, combined with the dynamic spectral response characteristics of photochromic materials, active anti-counterfeiting identification is achieved.
It improves the accuracy and robustness of anti-counterfeiting identification, has a one-time password anti-counterfeiting mechanism, achieves environmental adaptive identification, provides judgment criteria to distinguish between environmental damage and counterfeiting attacks, and has self-evolution capabilities.
Smart Images

Figure CN122366478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anti-counterfeiting identification technology, specifically to a method for preparing and intelligently identifying microscopic invisible codes that integrates artificial intelligence and hyperspectral imaging. Background Technology
[0002] With the acceleration of global economic integration, the problem of counterfeit and shoddy products has become increasingly serious, causing not only huge economic losses but also posing a serious threat to consumer health and safety. According to research statistics, the annual economic losses caused by counterfeit and shoddy products worldwide have reached hundreds of billions of US dollars and are showing a continuous upward trend. Against this backdrop, product anti-counterfeiting technology has become a key means of maintaining brand reputation and ensuring public safety.
[0003] Currently, common anti-counterfeiting technologies mainly include holographic labels, radio frequency identification (RFID) labels, watermarking technology, fluorescent inks, and various QR codes. However, these traditional anti-counterfeiting methods all have limitations in practical applications. Although holographic labels are widely used, their production cost is high, and they are subject to counterfeiting because some holographic patterns can be forged through optical replication. Although RFID labels have a large information capacity, their cost is too high in large-scale single-item applications, and they pose a risk of data privacy leakage. The labels themselves may also be blocked or copied. Watermarking technology is mostly used for digital content protection, and its anti-counterfeiting effect on physical goods is limited, and it is easily degraded due to product wear and tear. Fluorescent ink and other luminescent material anti-counterfeiting technologies have raised the counterfeiting threshold to a certain extent, but existing materials often only exhibit a single luminescent color or a simple photochromic effect, which is difficult to meet the needs of high-level anti-counterfeiting. Studies have shown that most existing photochromic materials only exhibit two adjustable luminescent colors, have poor optical reversibility, and have complex synthesis processes, which restricts their practical application in multi-level dynamic anti-counterfeiting. To address the aforementioned issues, researchers have recently attempted to introduce microscopic stealth code technology into the field of anti-counterfeiting. Microscopic stealth codes achieve information hiding and reading by constructing specific graphic coding structures at a microscale. However, existing microscopic stealth code identification methods mainly rely on the extraction of spatial geometric features, such as code point center coordinate positioning and edge detection. These methods have the following inherent defects: First, they have a single information dimension, only utilizing the spatial location information of the code points and not including the spectral reflectance characteristics, three-dimensional morphology, or micro-texture and other physicochemical features of the code point material itself; Second, they have poor environmental adaptability, and the accuracy of geometric feature extraction decreases significantly when lighting conditions change, the substrate deforms, or the code point surface is contaminated; Third, they lack environmental compensation mechanisms and cannot distinguish between appearance changes caused by natural aging, environmental damage, and human forgery. Hyperspectral imaging technology, as a means to simultaneously acquire spatial and spectral information of a target, has shown unique advantages in material identification, object detection, and other fields in recent years. Hyperspectral data cubes contain image information in continuous bands and can reflect the intrinsic spectral fingerprint characteristics of materials. However, existing hyperspectral imaging recognition methods mostly adopt passive imaging modes, that is, only collect the reflectance spectrum of the target under ambient light, without making full use of the dynamic response characteristics of photochromic materials under active excitation conditions. In addition, traditional hyperspectral data analysis relies on methods such as feature band selection or spectral angle matching, which are difficult to handle spectral drift and mixed pixel problems in complex environments. Meanwhile, the rapid development of artificial intelligence technology has provided new solutions for anti-counterfeiting identification. Physical Information Neural Network (PINN), as a novel paradigm that embeds physical equations into a deep learning framework, has received widespread attention in the fields of scientific computing and digital twins in recent years. Studies have shown that PINN can accurately predict the state of complex systems through physical constraints even in the absence of a large amount of labeled data. However, existing PINN research is mostly concentrated in engineering physics fields such as fluid mechanics and structural mechanics, and its application in the field of microscopic anti-counterfeiting identification is still a blank. More importantly, traditional PINN without labeled data has the limitation of insufficient prediction accuracy when solving complex physical problems, especially when the range of physical parameters varies greatly, the model convergence is difficult and the prediction fails often. Although data-driven PINN methods can improve prediction performance by introducing labeled data, most existing studies use datasets with a single fidelity, and there is still room for improvement in terms of multi-source data fusion and prediction extrapolation capabilities. In summary, existing anti-counterfeiting technologies still have shortcomings in the following aspects: traditional physical anti-counterfeiting methods are easily imitated or are too costly; micro-encoding recognition methods have limited information dimensions and poor environmental adaptability; hyperspectral imaging analysis has not been deeply integrated with dynamic excitation response; and physical information neural networks have not been effectively applied in the field of micro-anti-counterfeiting recognition. Therefore, how to organically integrate the dynamic spectral response characteristics of photochromic materials, the multi-dimensional information acquisition capability of hyperspectral imaging, and the physical law learning capability of physical information neural networks to construct a micro-invisible code preparation and intelligent recognition method with high security and strong environmental adaptability has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] To overcome the problems of the prior art, this invention discloses a method for preparing and intelligently recognizing microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: One approach provides a method for preparing microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging, comprising the following steps: S101, Select a substrate material, and dope the substrate material with photochromic material to form micro-code points; Photochromic materials can reversibly switch between at least two different energy levels under excitation light of different wavelengths, and exhibit different hyperspectral characteristics accordingly. S102, Hyperspectral response data of micro-code points under multiple different excitation light parameters are collected by a hyperspectral imaging device to establish a hyperspectral feature library of micro-code points; S103, based on the hyperspectral feature library, constructs a digital twin initial model of micro-code points. The digital twin initial model includes a first partial differential equation describing the concentration change of photochromic material and a second partial differential equation describing the hyperspectral reflectance change of micro-code points. S104. The initial digital twin model is used as the training object of the physical information neural network PINN. The PINN is pre-trained using a hyperspectral feature library to obtain the pre-trained PINN model parameters.
[0006] On the other hand, a method for intelligent identification of microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging is provided, including the following steps: S201, a cube of measured hyperspectral data of microscopic hidden codes at the current moment is acquired through a hyperspectral imaging device; The microscopic stealth code is composed of photochromic materials doped in the substrate. The photochromic materials can reversibly switch between at least two different energy level states and exhibit different hyperspectral characteristics under irradiation with excitation light of different wavelengths. S202, the microscopic stealth code prepared by the above preparation method is identified to obtain a digital twin model of the microscopic stealth code. The digital twin model is obtained by pre-training the initial digital twin model constructed in step S103 in step S104, and includes a set of partial differential equations describing the state evolution of the microscopic stealth code under the action of external environmental factors. The set of partial differential equations includes at least a first equation describing the change in the concentration of photochromic material, a second equation describing the change in the hyperspectral reflectance of the microscopic code point, and an optional third equation describing the strain of the substrate material caused by environmental factors. S203, input the environmental parameters at the current moment and the hyperspectral data at the historical moment into the trained physical information neural network PINN. The physical information neural network PINN uses partial differential equations as physical constraints to predict the expected state data of the micro-hidden code at the current moment. S204, compare the measured hyperspectral data cube with the expected state data, and calculate the deviation between the two; S205, determine whether the deviation value is less than the preset threshold. If yes, the microscopic hidden code is determined to be true; otherwise, it is determined to be false.
[0007] Preferably, the loss function of the Physical Information Neural Network (PINN) includes a data fitting term and a physical constraint term; The data fitting term is used to constrain the error between the network output and the hyperspectral data collected at historical times; Physical constraints are used to constrain the network output to satisfy the partial differential equations and their boundary and initial conditions.
[0008] Preferably, the training process of the Physical Information Neural Network (PINN) includes: Obtain hyperspectral data cubes of microscopic hidden codes at multiple historical moments and their corresponding environmental parameters as training datasets; Using environmental parameters and corresponding time information as inputs, hyperspectral data cubes as supervision signals, and physical constraints from a system of partial differential equations, PINN is iteratively trained until the loss function converges.
[0009] Preferably, after determining the result to be true in step S205, a dynamic response verification step is also included: The first excitation light parameters are generated according to the preset challenge algorithm; The excitation light source is controlled to irradiate the microscopic invisible code with the first excitation light parameter, driving the photochromic material to switch to the first energy level state; The first response spectral data cube is acquired using a hyperspectral imaging device. The first response spectral data cube is compared with the first expected spectral data in the corresponding state predicted by the Physical Information Neural Network (PINN); If the deviation between the two values is less than the second preset threshold, the dynamic response verification is deemed to have passed; the second preset threshold is less than or equal to the preset threshold.
[0010] Preferably, the dynamic response verification step further includes secondary verification: After the dynamic response verification is passed, a second excitation light parameter different from the first excitation light parameter is generated according to the preset challenge algorithm; The excitation light source is controlled to irradiate the microscopic invisible code with the second excitation light parameters, driving the photochromic material to switch to the second energy level state; Acquire the second response spectral data cube at this time; The second response spectral data cube is compared with the second expected spectral data in the corresponding state predicted by the physical information neural network PINN; If the deviation between the two values is less than the third preset threshold, the secondary verification is considered successful.
[0011] Preferably, in step S205, when the deviation value is greater than or equal to a preset threshold, an anomaly type identification step is also included: The deviation values and their distribution characteristics in the spatial and spectral dimensions are input into the pre-trained anomaly classification model; The anomaly classification model outputs anomaly types based on distribution characteristics. Anomaly types include at least one of environmental damage and forgery attacks.
[0012] Preferably, the environmental parameters include at least one of temperature, relative humidity, and ambient light intensity; The partial differential equations also include third-party equations that describe the strain of the substrate material caused by temperature and humidity.
[0013] Preferably, the preset threshold is dynamically adjusted according to the environmental parameters at the current moment. The adjustment method is that the preset threshold is equal to the product of the basic threshold and the environmental compensation function, which is obtained by fitting historical misidentification rate data.
[0014] Preferably, the anomaly classification model is a support vector machine or a random forest, and its training data includes the distribution characteristics of deviation values under different environmental damage patterns and fake attack patterns generated by simulation.
[0015] The beneficial effects of this invention are as follows: Compared with the prior art, the technical solution provided by the present invention has the following significant advantages: This invention introduces physical laws into the recognition process by constructing a digital twin model of microscopic invisible codes and embedding a system of partial differential equations. This enables a shift from passive comparison to active prediction. Traditional methods can only collect the current state and compare it with historical templates, failing to distinguish between natural aging and artificial forgery. This invention utilizes a physical information neural network to predict the theoretical state of microscopic code points under current environmental conditions. By comparing the measured data with the theoretical prediction, it can effectively eliminate misjudgments caused by environmental changes, material aging, and other factors, significantly improving the accuracy and robustness of recognition. By introducing photochromic materials and designing dynamic response verification steps, an active anti-counterfeiting mechanism with one-time passwords is realized. Traditional anti-counterfeiting codes are mostly static features and are easily copied or counterfeited. This invention utilizes the characteristic of photochromic materials that can reversibly switch energy level states under different wavelength excitations, combined with a challenge algorithm to randomly generate excitation parameters, so that each verification presents a different spectral response. The physical information neural network accurately predicts the response, effectively resisting replay attacks and spectral copying attacks, and significantly improving the anti-counterfeiting level. By setting a dynamic threshold adjustment mechanism, environmental adaptive recognition is achieved. Traditional recognition methods use fixed thresholds, which are prone to misjudgment when environmental conditions such as temperature and humidity change drastically. This invention dynamically adjusts the judgment threshold according to the current environmental parameters, compensates for the fluctuation of deviation values caused by environmental factors, keeps the recognition performance stable in different application scenarios, and expands the applicability of the technology. By identifying the anomaly type, the cause of samples determined to be fake can be traced. Traditional methods only output a binary result of true and false, which cannot provide a basis for judgment. This invention inputs the spatial and spectral distribution characteristics of the deviation value into the anomaly classification model, which can distinguish between environmental damage and counterfeiting attacks, providing a basis for intelligent decision-making and subsequent handling of anti-counterfeiting systems, and helping to continuously optimize and iterate anti-counterfeiting technology. Through a closed-loop design of preparation and identification, the continuous optimization of the digital twin model is realized. The hyperspectral feature library established during the preparation process provides high-quality pre-training data for the physical information neural network, while the historical data accumulated during the identification process can be fed back to update the model parameters, forming a virtuous cycle in which data and physical laws reinforce each other, enabling the system to have self-evolution capabilities. Attached Figure Description
[0016] Figure 1 This is a flowchart of a method for preparing microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging, as provided in Embodiment 1 of the present invention. Figure 2 This is a flowchart of a method for intelligent identification of microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging, as provided in Embodiment 2 of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description relating to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.
[0018] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0019] The following detailed description of the specific implementation methods, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided in detail.
[0020] Example 1 Please refer to Figure 1This embodiment provides a method for preparing microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging. This method is used to prepare microscopic stealth codes with dynamic spectral response characteristics and to provide a pre-trained physical information neural network model for subsequent intelligent recognition. S101, Select the substrate material. In this embodiment, the substrate material is an optically transparent polyethylene terephthalate (PET) film with a thickness of 100 micrometers. In other embodiments, the substrate material may also be glass, paper, or other polymer materials, depending on the application scenario. Photochromic materials are doped into the substrate material to form micro-code points. In this embodiment, the photochromic material used is a spiropyran compound, specifically 1',3'-dihydro-1',3',3'-trimethyl-6-nitrospiro[2H-1-benzopyran-2,2'-indoline]. When irradiated with ultraviolet light at a wavelength of 365nm, the material transforms from a colorless closed-ring form, namely the spiropyran form, into a colored open-ring form, namely the bromocyanine form, and appears blue. Under visible light with a wavelength of 620 nm, it can be reversibly restored to a colorless closed-ring. By controlling the doping concentration and the illumination area, a micron-scale code array can be formed on the surface of the PET film. The key characteristic of photochromic materials is that they can reversibly switch between at least two different energy level states under irradiation with excitation light of different wavelengths, and each energy level state exhibits different hyperspectral characteristics. When the material is in an open-ring state after ultraviolet light excitation, it has a characteristic absorption peak in the 500-600nm band. When it is in a closed-ring state after visible light excitation, the characteristic absorption peak disappears. This difference in spectral characteristics forms the basis for subsequent identification. The doping method uses inkjet printing technology. The photochromic material is dissolved in toluene solvent to prepare a 1% solution by mass. The solution is then printed on the surface of a PET film using a piezoelectric printhead to form circular code dots with a diameter of 50 micrometers. After printing, the solution is dried at 60°C for 30 minutes to allow the solvent to evaporate, resulting in a stable microscopic invisible code.
[0021] S102, Establish a hyperspectral feature library. Use a hyperspectral imaging device to collect hyperspectral response data of micro-code points under multiple different excitation light parameters, and establish a hyperspectral feature library of micro-code points. The hyperspectral imaging system used in this embodiment includes a tunable excitation source covering the 300-800nm band, a liquid crystal tunable filter, an area array CCD detector, and a data processing unit. The imaging spectral range is 400-1000nm, the spectral resolution is 5nm, and the spatial resolution is 2048×2048 pixels. The data collection process is as follows: The microscopic stealth code sample prepared in step S101 is placed on the stage of the hyperspectral imaging system; Different excitation light parameters are set. In this embodiment, the excitation light parameters include wavelength and intensity, and three groups of excitation light parameters are specifically set: UV excitation, wavelength 365nm, intensity 10mW / cm 2 Irradiate continuously for 5 seconds; Visible light excitation, wavelength 620 nm, intensity 5 mW / cm 2 Irradiate continuously for 10 seconds; No excitation, dark state; Then, after each excitation light parameter irradiation, the hyperspectral image of the sample was immediately acquired. During acquisition, the sample was uniformly illuminated by a white light source and scanned in 5nm increments within the range of 400-1000nm through a liquid crystal tunable filter. One image was acquired for each band, and a total of 121 bands of image data were obtained, forming a hyperspectral data cube I(x,y,λ). Finally, all the collected hyperspectral data cubes are associated with and stored with the corresponding excitation light parameters to form a hyperspectral feature library. This feature library records the spectral response characteristics of micro-code points under different excitation conditions, including parameters such as absorption peak position, absorption intensity, and peak width, as well as the variation of these parameters with excitation conditions.
[0022] S103, Construct the initial digital twin model. Based on the hyperspectral feature library established in step S102, construct the initial digital twin model of the micro-code points. This initial digital twin model is a mathematical model coupled with multiple physics fields, used to describe the state evolution law of micro-code points under the influence of external environmental factors. In this embodiment, the initial model of the digital twin contains two core partial differential equations: The first partial differential equation describing the concentration change of the photochromic material, based on Fick's second diffusion law and coupled with the photoisomerization reaction kinetics, takes the following form:
[0023] Where C represents the local concentration of the photochromic material, in mol / m³. 3 t represents time, in seconds (s). D represents the diffusion coefficient of the material in the substrate, with units of m. 2 / s, in this embodiment, D is taken as 1.2×10 -14 m 2 / s; Let be the Laplace operator, representing the second-order partial derivative of concentration in space; k1 is the photodegradation rate constant, in seconds. -1 ·(mW / cm2 ) -1 In this embodiment, k1 is set to 0.05; Φ(λ,t) is the excitation light intensity function that varies with time, with units of mW / cm². 2 ; k2 is the thermal degradation rate constant, with units of s. -1 ·K -1 In this embodiment, k2 is 0.002; T is absolute temperature, and its unit is K. This equation describes the process by which the material concentration decreases over time due to diffusion, photodegradation, and thermal degradation. The second partial differential equation describing the change in hyperspectral reflectance of microscopic code points, which relates material concentration to spectral reflectance, is as follows:
[0024] Where R represents the spectral reflectance of the microcode point at a specific wavelength, which is dimensionless; α is the concentration-reflectance coupling coefficient, which is dimensionless, and in this embodiment, α is 0.8; β is the strain-reflectance coupling coefficient, which is dimensionless, and in this embodiment, β is 0.3; ε is the local strain of the substrate material, which is dimensionless. This equation shows that the change in spectral reflectance is caused by both the change in material concentration and the change in substrate strain; In practical applications, the parameters of the above equations, such as D, k1, k2, α, and β, can be fitted and calibrated using the hyperspectral feature library established in step S102. For example, by measuring the spectral data of the sample under constant temperature and humidity conditions as a function of time, the diffusion coefficient and degradation rate constant can be derived.
[0025] S104, Pre-train the physical information neural network. The initial digital twin model constructed in step S103 is used as the training object of the physical information neural network PINN. The hyperspectral feature library established in step S102 is used to pre-train PINN to obtain the pre-trained PINN model parameters. Physical Information Neural Network (PINN) is a deep learning architecture that embeds physical equations as constraints into the neural network training process. In this embodiment, the input of PINN includes spatial coordinates (x,y), time t, and environmental parameters such as temperature T, relative humidity RH, and excitation light parameter λ. The output is the state prediction of micro-code points, including material concentration C(x,y,t) and spectral reflectance R(x,y,t,λ). The network structure uses a fully connected neural network, containing 8 hidden layers, each with 128 neurons. The activation function is the hyperbolic tangent function tanh, and the loss function consists of two parts: One part is the data fitting term, which measures the mean square error between the network output and the measured data in the feature library in step S102; The other part is the physical constraint term, which measures the residual generated after the network output is substituted into the partial differential equation in step S103; The pre-training process is as follows: The hyperspectral data cube in the feature library of step S102 and its corresponding excitation light parameters and environmental parameters are used as the training dataset and randomly divided into training set and validation set in a ratio of 8:2. The Adam optimizer was used for iterative training with an initial learning rate of 0.001, a batch size of 64, and 5000 training rounds. In each training round, the network output was calculated during forward propagation, and the data fitting loss and physical constraint loss were calculated respectively. The network weights were updated during backpropagation. During training, the prediction accuracy on the validation set is calculated every 100 rounds. Training is terminated early when the validation set loss no longer decreases for 50 consecutive rounds. After training is completed, the network weight parameters are saved, which is the pre-trained PINN model parameters. These parameters will be used in the intelligent recognition method of micro-hidden codes. It should be noted that this embodiment only uses spiropyran-based photochromic materials and PET substrates as examples for illustration, but the scope of protection of the present invention is not limited to this. Any photochromic material that can achieve reversible energy level state switching and exhibit different hyperspectral characteristics, as well as any substrate material that can carry micro-code points, falls within the scope of protection of the present invention. Through the above steps S101 to S104, this embodiment successfully prepared a microscopic stealth code with dynamic spectral response characteristics and obtained a pre-trained physical information neural network model. This model can not only accurately predict the spectral response of the microscopic code points under various environmental conditions, but also provide a reliable prediction benchmark for subsequent intelligent recognition. In practical applications, the microscopic invisible code prepared in this embodiment can be attached to the surface of a product, enabling high-precision and high-reliability authentication through a matching intelligent identification system.
[0026] Example 2 Please refer to Figure 2 This embodiment provides a method for intelligent identification of microscopic stealth codes that integrates artificial intelligence and hyperspectral imaging, which is used to perform high-precision authentication of microscopic stealth codes obtained by the preparation method of Example 1. S201, Collect measured hyperspectral data. Use a hyperspectral imaging device to collect the measured hyperspectral data cube I of the microscopic hidden code under test at the current time t. t (x,y,λ), the hyperspectral imaging system used in this embodiment is the same as that in embodiment 1, including a tunable excitation source, a liquid crystal tunable filter, an area array CCD detector and a data processing unit, with an imaging spectral range of 400-1000nm and a spectral resolution of 5nm; During data acquisition, the sample with the microscopic invisible code to be measured is placed on the stage. Under standard white light illumination, the sample is scanned in 5nm increments through a liquid crystal tunable filter to acquire images of 121 spectral bands, forming a hyperspectral data cube I. t (x,y,λ), where x and y represent spatial coordinates and λ represents wavelength; The microscopic stealth code is composed of a photochromic material doped in a substrate. In this embodiment, the photochromic material is a spiropyran compound, and the substrate is a PET film. The photochromic material has the following characteristics: Under excitation light of different wavelengths, it can reversibly switch between at least two different energy level states, and each energy level state exhibits different hyperspectral characteristics. For example, when it is in the open-ring state after ultraviolet light excitation, it exhibits a characteristic absorption peak in the 500-600nm band; when it is restored to the closed-ring state after visible light excitation, the absorption peak disappears. This characteristic has been recorded in the hyperspectral feature library during the aforementioned preparation process. S202, Obtain the digital twin model. Obtain the pre-constructed digital twin model of the microscopic hidden code. This digital twin model is constructed using the preparation method described in Example 1 above, and specifically includes the following: A digital twin model is a multi-physics coupled mathematical model used to describe the state evolution of microscopic stealth codes under the influence of external environmental factors such as temperature, humidity, and illumination. This model contains a set of partial differential equations describing the state evolution of microscopic stealth codes, including at least: The first equation describing the concentration change of photochromic materials, such as equations based on diffusion and degradation; The second equation describing the change in hyperspectral reflectance of micro-code points correlates material concentration with spectral reflectance. Optional third-party program for describing the strain of the substrate material caused by environmental factors, such as changes in temperature and humidity; In this embodiment, the specific parameters of the digital twin model, such as diffusion coefficient, degradation constant, coupling coefficient, etc., have been calibrated through the hyperspectral feature library during the preparation process and solidified in the model, which serves as the physical constraint for the subsequent physical information neural network. S203, predict the current expected state, and use the environmental parameters E at the current time t. t The hyperspectral data from historical times t-1, t-2, ..., tn are input into the trained physical information neural network PINN, which then predicts the expected state data P of the microscopic hidden code at the current time t. t (x,y,λ); Among them, environmental parameter E tData such as temperature, relative humidity, and ambient light intensity can be acquired in real time by sensors placed near the sample. The hyperspectral data at historical moments are retrieved from the past identification records of the microscopic stealth code, or are composed of a series of data collected when the system is initially deployed. These historical data reflect the evolution trajectory of the code point from its initial state to the present moment. The Physical Information Neural Network (PINN) is a pre-trained deep learning model. Its network structure is a fully connected neural network. The input layer accepts spatial coordinates (x, y), time t, and environmental parameters, and the output layer provides predictions of material concentration and spectral reflectance at the corresponding location. The unique feature of this network is that, in addition to the conventional data fitting term, its loss function also incorporates a physical constraint term of a system of partial differential equations, which forces the network output to satisfy the laws of physical evolution. The physical constraint term calculates the residual after substituting the network output into the partial differential equations. By minimizing this residual, the solution learned by the network simultaneously conforms to the observed data and the physical laws. In this embodiment, the pre-training process of PINN has been completed in step S104 of embodiment 1, obtaining the optimized network weights. In the recognition stage, the current environmental parameters and known historical data are input into the network, and forward propagation can obtain the expected state data P at the current moment. t (x,y,λ), this expected state represents the theoretical state that the code point should reach under the action of real physical laws; S204, Calculate the deviation value, and convert the measured hyperspectral data cube I collected in step S201 into a single unit. t (x,y,λ) and the expected state data P predicted in step S203 t (x, y, λ) is compared pixel-by-pixel and band-by-band, and the deviation value Δ is calculated. The deviation value can be calculated using various methods, such as root mean square error and mean absolute error. In this embodiment, normalized root mean square error is used, and the calculation formula is as follows:
[0027] Where, N x N y N λ These represent the number of pixels in the horizontal and vertical directions and the number of bands, respectively; ε is a small positive number to prevent division by zero. This deviation value comprehensively reflects the overall difference between the measured data and the theoretical expectations in the spatial and spectral dimensions. S205, determine authenticity by judging whether the deviation value Δ is less than the preset threshold δ. The threshold δ is predetermined based on experimental data of a large number of real samples and fake samples. For example, it can be set to 0.05. If Δ < δ, it means that the measured data is highly consistent with the theoretical expectation, the state evolution of the micro-hidden code conforms to the physical law, and it has not been subjected to abnormal interference or forgery. Therefore, it is judged as true. Conversely, if Δ ≥ δ, it means that the measured data deviates from the theoretical expectation, which may be due to abnormal natural aging, environmental mutation or artificial forgery. Therefore, it is judged as fake. In this embodiment, the threshold δ can be a fixed value or dynamically adjusted according to environmental parameters. For example, under conditions of drastic environmental changes, the threshold can be appropriately relaxed to accommodate reasonable fluctuations; while a stricter threshold can be used in a stable environment. Through steps S201 to S205 above, this embodiment achieves high-precision intelligent recognition of microscopic stealth codes. This method utilizes a digital twin model and a physical information neural network, combining physical laws with data-driven approaches. It can effectively distinguish between the natural evolution of genuine code points and forgery attacks, and has the advantages of strong anti-interference capability and high recognition accuracy. In practical applications, this identification method can be integrated into handheld terminals or automated detection equipment and widely used in fields such as product anti-counterfeiting, document verification, and cultural relic tracing.
[0028] Furthermore, the loss function of the Physical Information Neural Network (PINN) includes a data fitting term and a physical constraint term; In the training process of the Physical Information Neural Network (PINN), the loss function L total From the data fitting term L data and physical constraint term L pde It consists of two parts, and its expression is:
[0029] Wherein, ω1 and ω2 are weight coefficients used to balance the contribution of data-driven and physical laws to network optimization. In this embodiment, ω1=1.0 and ω2=0.1 are set through experimental optimization to strengthen the constraint effect of physical laws while ensuring the accuracy of data fitting. In other application scenarios, the weights can be dynamically adjusted according to the amount of historical data and the confidence of the physical model. Data fitting term L data To constrain the error between the network output and the hyperspectral data collected at historical times, during the training process of PINN, the network input includes spatial coordinates (x, y), time t, and corresponding environmental parameters, and the output is the predicted micro-code point state, specifically including the material concentration distribution C. net (x,y,t) and spectral reflectance R net(x,y,t,λ), the data fitting term calculates the difference between the network's predicted value and the measured historical data, forcing the network output to be as close as possible to the actual observed value; Suppose the training dataset contains N historical time points t. i A hyperspectral data cube (i=1,2,...,N) is formed, with each time step corresponding to a set of spatial sampling points. For each sampling point (x,y,ti,λ), the network predicts the spectral reflectance as R. net (x,y,ti,λ), while the measured reflectance is R obs (x,y,ti,λ), then the data fitting term L data It can be expressed as the mean of the sum of squares of the differences between the predicted and measured values at all sampling points:
[0030] Where M is the total number of all sampling points, the summation iterates through all historical moments, all spatial locations and all wavelengths, this loss term enables the network to learn and reproduce the evolution trajectory of micro-code points in the real environment, providing a data foundation for subsequent predictions; Physical constraint term L pde This term is used to constrain the network output to satisfy a system of partial differential equations and their boundary and initial conditions. This term directly embeds physical laws into the network training process, so that the network output not only conforms to the observed data, but also obeys the physical equations derived from first principles, giving the network a strong extrapolation ability and physical consistency. In this embodiment, the partial differential equation set includes at least a first equation describing the change in the concentration of the photochromic material and a second equation describing the change in the hyperspectral reflectance of the micro-code point, as well as an optional third equation describing the strain of the substrate material. The physical constraint terms are measured by calculating the residuals generated after substituting the network output into these equations to measure their deviation from physical laws. The material concentration C predicted by the network net Substituting (x,y,t) into the first equation, we obtain the difference between the left and right sides of the equation, denoted as the residual r1(x,y,t); The spectral reflectance R predicted by the network is then used... net (x,y,t,λ) and concentration C net Substituting into the second equation, we obtain the residual r2(x,y,t,λ); if a third equation is involved, the corresponding residual is r3(x,y,t); the calculation of the residuals uses the same physical parameters and mathematical forms as in Example 1. In addition to the partial differential equations themselves, physical constraints also need to consider boundary conditions and initial conditions. Boundary conditions refer to the specific relationships that the material concentration or reflectivity should satisfy at the edge of the micro-code point region, such as zero flux boundary, where the material cannot diffuse out of the code point region. The initial condition refers to the network output being consistent with the initial state at time t=0. Let the boundary condition residual be r.bc The initial condition residual is r ic Then the physical constraint term L pde The sum of squares of all residuals:
[0031] Where Ω represents the set of sampling points in the spatiotemporal domain. Let M represent the set of boundary points. pde Given the total number of physical constraint points, minimize L pde The network is forced to learn solutions that satisfy physical laws, and can accurately predict the evolution state of micro-code points based on physical laws even in the absence of historical data. In step S104 of Example 1, the pre-training process of PINN is achieved by jointly optimizing the data fitting term and the physical constraint term. During training, the network output is calculated in each iteration of forward propagation, and L is calculated respectively. data and L pde Weighted summation yields L total Then, the network weights are updated by backpropagation. After sufficient training, the network weights are solidified and used for the prediction task in Example 2. In step S203 of embodiment 2, when the network is used to predict the expected state at the current moment, since physical constraints have been embedded during training, the prediction result naturally conforms to the evolution law of micro-code points. This prediction ability based on physical knowledge enables the subsequent step S205 of authenticity determination to effectively distinguish between natural aging and abnormal disturbances.
[0032] Furthermore, the training process of the Physical Information Neural Network (PINN) includes: Hyperspectral data cubes of microscopic stealth codes at multiple historical moments and their corresponding environmental parameters were acquired as a training dataset. For the same microscopic stealth code sample, hyperspectral imaging was performed at multiple different time points within its lifecycle, and the data at each time point t were recorded. i Hyperspectral data cube I (i=0,1,...,n-1) ti (x,y,λ), and simultaneously through i The environmental sensor synchronously records the environmental parameter E at that moment. ti Including temperature, relative humidity, and ambient light intensity, etc. The training dataset comes from two sources: one is the initial state acquisition that takes place immediately after the microscopic invisible code is prepared, i.e., time t0. Secondly, in subsequent actual use, the data collected during each identification and verification process was anonymized and then stored in the training database. After a period of accumulation, historical data sequences covering different environmental conditions and different aging stages can be obtained. For example, for a microscopic invisible code placed in an outdoor environment, data is collected continuously for 30 days, three times a day, in the morning, noon and evening, resulting in 90 sets of hyperspectral data cubes and their corresponding environmental parameters, which constitute the training dataset. To ensure data quality, consistent imaging conditions must be maintained during data acquisition, and the raw data must be preprocessed, including dark current correction, whiteboard correction, and image registration, to eliminate the effects of equipment noise and ambient light fluctuations. During training, environmental parameters and corresponding time information are used as inputs, and hyperspectral data cubes are used as supervision signals. For each training sample, i.e., a certain historical time t i The data is used to construct the input vector X. i =(x,y,t i E ti ),in: (x,y) are spatial coordinates, and their range covers the entire microscopic code point region; t i For time information, it is usually based on the initial time t0 and expressed in relative time, such as the number of days or seconds that have elapsed; E ti Let time t i An environmental parameter vector, including temperature T i Relative humidity R Hi Excitation light intensity Φ i wait; The network output is the predicted microscopic code point state, including the material concentration C. net (x,y,ti) and spectral reflectance R net (x,y,ti,λ), where the spectral reflectance output must cover all wavelengths λ; The monitoring signal is the measured hyperspectral data cube I. ti (x,y,λ), specifically the measured reflectance value R at each spatial location (x,y) at each wavelength λ. obs (x,y,ti,λ), the goal of network training is to make the predicted value R net Get as close as possible to the measured Robs value; Using environmental parameters and corresponding time information as input, hyperspectral data cubes as supervision signals, and physical constraints of partial differential equations, PINN is iteratively trained until the loss function converges. The specific process of iterative training is as follows: Initialize the neural network parameters. PINN adopts a fully connected neural network structure with 8 hidden layers, each with 128 neurons. The activation function is the hyperbolic tangent function tanh. The network weights are randomly initialized using the Xavier initialization method. The training dataset is divided into multiple batches, each batch containing several sets of data. In this embodiment, the batch size is set to 64. Perform the following forward and backward propagation processes for each batch: Forward propagation involves feeding the input vector X from the batch into the network and calculating the corresponding predicted output C. net and R net ; Calculate the loss function, loss function L total Includes data fitting term L data and physical constraint term L pde ,in: Data fitting term L data Calculate the R-value of the network prediction net With monitoring signal R obs The mean square error between them; Physical constraint term L pde The sum of squared residuals generated by substituting the network output into the first equation, the second equation, and the optional third equation of the partial differential equation system is calculated, while considering the constraints of boundary conditions and initial conditions. Backpropagation, calculate the loss function L total The Adam optimizer is used to update the network weights based on the gradients of the parameters of each layer of the network. In this embodiment, the initial learning rate is set to 0.001, and the momentum parameters β1=0.9 and β2=0.999. Iterative training continues, and each round of traversing all training data is called a training round. In this embodiment, the maximum number of training rounds is set to 5000 rounds. After each round, the loss value on the validation set is calculated, and the training progress is monitored. The training termination condition is the convergence of the loss function. In this embodiment, two convergence criteria are used: The main criterion is that the validation set loss no longer decreases and the decrease is less than 0.01% over 50 consecutive training rounds. The secondary criterion is reaching the maximum number of training rounds of 5000. Training terminates when any criterion is met, the current network weight parameters are saved, and the trained PINN model is obtained. Through the above iterative training, the PINN network not only learned to fit historical observation data, but more importantly, it learned to follow the physical laws described by partial differential equations, enabling the trained PINN to possess the following capabilities: It can accurately predict the state of microscopic invisible codes under known environmental conditions; It can extrapolate and predict reasonable state evolution based on physical laws under unseen environmental conditions; It is robust to noise and anomalies in the input data because the physical constraint term acts as a regularizer.
[0033] Based on the determination that the micro-invisible code is genuine in step S205, this part further introduces a dynamic response verification step to improve the anti-counterfeiting level. This verification utilizes the reversible energy level switching characteristics of photochromic materials to achieve higher accuracy in authenticity identification through active excitation and real-time response comparison. The first excitation light parameters are generated according to a preset challenge algorithm. The challenge algorithm is a predefined program module whose function is to generate a unique set of excitation light parameters based on the current time, device status, or random seed. In this embodiment, the excitation light parameters include wavelength and intensity, specifically wavelength λ1 = 365 nm and intensity Φ1 = 10 mW / cm². 2 The duration of continuous irradiation is t1 = 3 seconds; The challenge algorithm can be implemented using a true random number generator or a pseudo random number algorithm. The excitation light parameters generated each time are different, making it impossible for attackers to perform a replay attack using pre-recorded response data. The excitation light source is controlled to irradiate the microscopic invisible code with the first excitation light parameter, driving the photochromic material to switch to the first energy level state. In this embodiment, after irradiating with 365nm ultraviolet light for 3 seconds, the spiropyran-based photochromic material changes from a colorless closed-ring body to a colored open-ring body, that is, it enters the first energy level state. This state corresponds to the material exhibiting a characteristic absorption peak in the 500-600nm wavelength band. Immediately after irradiation, the first response spectral data cube I was acquired using a hyperspectral imaging device. resp1 (x,y,λ), the acquisition method is the same as in step S201, to acquire a hyperspectral image covering 400-1000nm with a spectral resolution of 5nm; Cube I containing the first response spectral data resp1 (x,y,λ) and the first expected spectral data P in the corresponding state predicted by the PINN physical information neural network. resp1 Compare (x,y,λ); The expected spectral data predicted by PINN were obtained in the following ways: The first excitation light parameters (λ1, Φ1, t1) are used as input conditions, combined with the current environmental parameter E. tThe historical evolution data of the micro-trace code is input into the trained PINN model. The model outputs the theoretical spectral response that the micro-code point should present under the excitation condition. Since PINN has learned the response law of photochromic materials under different excitation conditions during training, its prediction results represent the theoretical spectral characteristics of real micro-trace codes under the same conditions. Calculate the deviation Δ between the two. resp1 The specific calculation method is the same as in step S204, using the normalized root mean square error metric. Determine the deviation value Δ resp1 Whether it is less than the second preset threshold δ2, the second preset threshold δ2 is less than or equal to the preset threshold δ in step S205. In this embodiment, δ is 0.05 and δ2 is 0.03. The more stringent threshold is adopted because the dynamic response verification is carried out under actively controlled excitation conditions, which eliminates environmental interference factors, thus allowing for the setting of higher precision requirements. If Δ resp1 If the value is less than δ2, the dynamic response verification is deemed successful, indicating that the spectral response of the microscopic hidden code under active excitation is highly consistent with the theoretical expectation, further confirming its authenticity. If Δr esp1 If the value is ≥δ2, the dynamic response verification is deemed to have failed. Even though the static determination is true, the system may still output "suspicious" or trigger a secondary verification process due to the abnormal dynamic response. To further enhance the anti-counterfeiting level, a secondary verification can be performed after the dynamic response verification is passed. Through multiple rounds of challenges with different excitation parameters, a challenge and response chain is formed to achieve a one-time password anti-counterfeiting effect. After the dynamic response verification is passed, a second excitation light parameter different from the first excitation light parameter is generated according to the preset challenge algorithm. In this embodiment, the second excitation light parameter is set to wavelength λ2=620nm and intensity Φ2=5mW / cm. 2 The duration of continuous irradiation is t2 = 5 seconds; This parameter is completely different from the first excitation light parameter and is used to drive the photochromic material to switch to another energy level state.
[0034] The excitation light source is controlled to irradiate the microscopic invisible code with the second excitation light parameter, driving the photochromic material to switch to the second energy level state. In this embodiment, after irradiating with 620nm visible light for 5 seconds, the photochromic material in the open-ring state is restored to the closed-ring state, that is, it enters the second energy level state. This state corresponds to the disappearance of the characteristic absorption peak of the material in the 500-600nm band. Immediately after irradiation, the second response spectral data cube I was acquired using a hyperspectral imaging device. resp2 (x,y,λ).
[0035] The second response spectral data cube I resp2 (x,y,λ) and the second expected spectral data P in the corresponding state predicted by the PINN physical information neural network. resp2 Compare (x,y,λ); The PINN-predicted spectral data is also generated based on the second excitation parameters, current environmental parameters, and historical evolution data of the microscopic stealth code. The deviation value Δ between the two is calculated. resp2 .
[0036] Determine the deviation value Δ resp2 Whether it is less than the third preset threshold δ3, in this embodiment, δ3 is also taken as 0.03, the same as δ2, if Δ resp2 If the value is less than δ3, the secondary verification is deemed successful, and the system ultimately confirms that the microscopic hidden code is true. Through the above-mentioned multi-round dynamic response verification, this method achieves deep authentication of microscopic invisible codes. The excitation parameters for each round of verification are randomly generated by the challenge algorithm, making each verification process unique. Even if an attacker steals the response data of a verification, it cannot be used for the next verification because the excitation conditions have changed. This one-time password anti-counterfeiting mechanism, combined with the reversible energy level switching characteristics of photochromic materials and the accurate prediction capability of PINN, constitutes a high-security anti-counterfeiting solution. The specific implementation of the challenge algorithm, the range of excitation light parameters, the timing control strategy for multi-round verification, and the adaptive adjustment method for threshold setting under different application scenarios can be further optimized according to actual needs.
[0037] Current environmental parameters E t The environmental parameters used to input PINN to predict the expected state include at least one of temperature, relative humidity, and ambient light intensity. In this embodiment, the environmental parameters simultaneously include temperature T (unit: K), relative humidity RH (unit: %), and ambient light intensity Φ. amb (Unit: lux), collected in real time by temperature and humidity sensors and light sensors placed near the sample; To further improve the physical accuracy of the digital twin model, the partial differential equations also include a third equation describing the strain of the substrate material due to temperature and humidity. This third equation, together with the first and second equations in Example 1, constitutes a complete physical constraint system. The third equation, based on the theory of thermo-hygroelasticity, describes the strain evolution of the substrate material under changes in temperature and humidity. Its specific form has been mentioned as an option in step S103 of Example 1, and is now described in detail below:
[0038] Where ε represents the local strain of the substrate material, which is dimensionless; α T The coefficient of thermal expansion is K. -1 α represents the change in strain caused by a temperature change of 1 Kelvin; RH γ is the coefficient of hygroscopic expansion, dimensionless, representing the change in strain caused by a 1% change in relative humidity; γ is the stress relaxation coefficient, measured in seconds. -1 , describes the rate at which the strain of a material decays naturally over time; t is time, in seconds; The strain change of the substrate material consists of three parts: thermal expansion / contraction caused by temperature change, wet expansion / contraction caused by humidity change, and the stress relaxation effect of the material itself. Strain changes then affect spectral reflectance through the second equation, realizing a complete physical chain of environmental factors, substrate deformation, and spectral response. In the physical constraint term L of PINN pde In the calculation, the strain ε predicted by the network is used. net Substituting (x, y, t) into the third process, we obtain the residual:
[0039] The residual, together with the residual r1 of the first equation and the residual r2 of the second equation, constitutes the main part of the physical constraint term. By introducing the third equation, PINN can more accurately predict the deformation of the substrate material caused by changes in environmental humidity and temperature, and improve the prediction accuracy of spectral reflectance. Especially in outdoor application scenarios, where the temperature difference between day and night and humidity changes are significant, the introduction of this equation can effectively reduce spectral misjudgment caused by substrate deformation.
[0040] In step S205, a preset threshold δ is used to determine whether the deviation value Δ is less than this value to determine authenticity. To further adapt to the recognition needs under different environmental conditions, the preset threshold is dynamically adjusted according to the environmental parameters at the current moment. The adjustment method is that the preset threshold is equal to the product of the basic threshold and the environmental compensation function, that is:
[0041] Wherein, δ0 is the basic threshold, an empirical value determined through extensive real-sample testing under standard environmental conditions, such as a temperature of 25°C, relative humidity of 50%, and light intensity of 500 lux. In this embodiment, δ0 = 0.05; f(E t ) is the environmental compensation function, which is based on the current environmental parameter E. t The input is a scalar function with compensation coefficients as the output; Environmental compensation function f(E) t This is derived from fitting historical false recognition rate data, and its construction process is as follows: Collect historical identification data under different environmental conditions, including the environmental parameter E at the time of each identification. t The deviation value Δ and the final verification results are recorded. For real samples, the distribution of deviation values under different environmental conditions is recorded; for fake samples, the distribution of deviation values is also recorded. Calculate the statistical characteristics under different environmental conditions, divide the environmental parameter space into multiple intervals, such as temperature intervals of 5℃, relative humidity intervals of 10%, and light intensity intervals of 200 lux. Within each interval, calculate the mean and standard deviation of the deviation values of the real samples, as well as the degree of overlap between the distributions of the deviation values of the real samples and the fake samples. To minimize the false recognition rate, fit the environment compensation function f(E) t The goal is to maximize the pass rate of genuine samples and minimize the pass rate of fake samples by adjusting the threshold under different environmental conditions. In this embodiment, a multinomial regression method is used to fit f(E). t ), in the form of:
[0042] Where a0~a6 are the coefficients to be fitted. The 95th percentile of the true sample deviation value in each environmental interval in the historical data is used as the target threshold. The environmental parameters of the interval are used as input, and the least squares method is used to solve the regression coefficients. The coefficients obtained by fitting in this embodiment are: a0=0.8, a1=0.002, a2=0.0015, a3=0.0001, a4=-0.00001, a5=-0.000005, a6=-0.000008; For example, in a high temperature and high humidity environment, T=35℃, RH=80%, Φ=500 lux, the calculated f=0.6045, then the dynamically adjusted threshold is δ0.0302; This threshold is lower than the baseline threshold under standard conditions because under high temperature and high humidity conditions, the strain of the substrate material and the degradation rate of the photochromic material are accelerated, and the deviation value of the real sample itself will increase. If the threshold remains unchanged, it will lead to an increase in the false recognition rate. By dynamically reducing the threshold, more stringent screening can be carried out to maintain a constant true positive rate. In the actual identification process, each time step S205 is executed, the current environmental parameter E is first read. t Calculate f(E) t ), thus obtaining the dynamic threshold δ(E) t Then, determine whether the deviation value Δ is less than the dynamic threshold. If Δ < δ(E) t If the expression is true, it is considered true; otherwise, it is considered false.
[0043] In step S205, if the deviation value Δ is greater than or equal to the preset threshold δ, it is determined to be false. In order to further analyze the reasons for the determination of false and distinguish whether it is natural damage caused by environmental factors or artificial forgery attack, this method also includes an anomaly type identification step. When Δ≥δ, the deviation value Δ and its distribution characteristics in the spatial and spectral dimensions are input into the pre-trained anomaly classification model. The anomaly classification model outputs the anomaly type based on the distribution characteristics. The anomaly type includes at least one of environmental damage and forgery attack. The spatial distribution characteristics of the deviation values include the spatial distribution pattern of the deviation values within the micro-code point region, such as whether they are concentrated in a specific area, whether they exhibit edge effects, and whether they have periodic patterns. The spectral dimension distribution characteristics of the deviation value include the distribution pattern of the deviation value in different bands, such as whether it is significantly higher in certain characteristic absorption bands, or whether it deviates uniformly across the entire spectrum. In this embodiment, the anomaly classification model is either a support vector machine or a random forest. Both of these models are classic supervised learning algorithms and are suitable for classification tasks. Support Vector Machines separate samples of different categories by finding the optimal hyperplane. In this embodiment, the Radial Basis Function (RBF) is used as the kernel function to map the input features to a high-dimensional space. The model parameters are optimized through cross-validation, with the penalty coefficient C set to 10 and the kernel function coefficient gamma set to 0.1. Random forests use voting classification by integrating multiple decision trees. In this embodiment, the random forest contains 100 decision trees, each with a maximum depth of 10. The minimum number of samples required for split nodes is 2, and the minimum number of samples for leaf nodes is 1. The feature selection adopts the square root strategy, that is, each tree randomly selects features for consideration when splitting. One of the two models can be selected based on actual application needs, or they can be used in parallel and then judged comprehensively. The training data for the anomaly classification model includes the distribution characteristics of deviation values under different environmental damage patterns and fake attack patterns generated by simulation. The simulation generation of environmental damage patterns is based on digital twin models and the predictive capabilities of PINN. The specific method is as follows: The simulation generation of environmental damage patterns is based on digital twin models and the predictive capabilities of PINN. The specific method is as follows: Different environmental stress parameters were set, including high temperature (40℃~60℃), high humidity (relative humidity 80%~95%), and strong ultraviolet radiation (wavelength 365nm, intensity 20~50mW / cm²). 2 and their combinations; Starting from the initial state of the real microscopic stealth code, PINN is used to predict the expected damage state after different durations, such as 1 day, 7 days, and 30 days, under the aforementioned environmental stress, denoted as P.damage ; Under normal environmental conditions, such as a temperature of 25°C, relative humidity of 50%, and no additional ultraviolet radiation, the expected state P is in the same initial state. normal Using this as a benchmark, calculate the deviation value Δd. amage This deviation value is based on the actual collected data, and the expected damage state P can be used in the simulation. damage To simulate the normal expected state P, noise is superimposed. normal The differences were analyzed, and the spatial and spectral distribution characteristics of the deviation value were extracted. These features are labeled as environmental damage categories and used as training samples; The simulation generation of fake attack patterns simulates the fake attack methods that attackers might use. This embodiment considers the following attack patterns: Material substitution attacks use photochromic materials from different brands or batches to create counterfeit code points. The spectral response characteristics of these counterfeit code points differ from those of the real materials. By altering material parameters, such as diffusion coefficient and degradation constant, and rerunning PINN, a counterfeit expected state P can be generated. forgery Calculate its normal expected state P compared with the actual PINN prediction. normal Distribution of deviation values between; Spectral copying attack: The attacker attempts to copy the static spectral features of the real code point, but cannot reproduce the dynamic response characteristics. Using the initial spectrum of the real code point as a template, a static copy is generated, and then the response is collected under different excitation conditions to calculate the deviation between it and the dynamic response predicted by PINN. Local tampering attacks physically damage or alter local areas of code points, causing spectral anomalies in some areas. By applying random perturbations to local areas of code points in simulations, the spatial distribution of the generated deviation values exhibits a local clustering pattern. Multiple samples are generated for each forgery pattern and labeled as forgery attack categories; The training set is input into the anomaly classification model for training. For support vector machines, support vectors and decision functions are obtained by solving the dual problem; for random forests, decision trees are constructed using a greedy algorithm and voting is performed. After training, the model performance is evaluated on the validation set to ensure that the classification accuracy is not less than 95%. In actual identification, when step S205 triggers anomaly identification, the current deviation value Δ and its distribution characteristics are extracted into a 50-dimensional feature vector, which is then input into the trained anomaly classification model. The model outputs the anomaly type, such as environmental damage or forgery attack. This result can be used for subsequent processing. For example, environmental damage can be re-verified, while forgery attack will trigger an alarm. By identifying anomaly types, this method can not only determine authenticity but also provide a basis for judgment, laying the foundation for intelligent decision support for anti-counterfeiting systems. The online update mechanism of the anomaly classification model, the automatic discovery and incremental learning of new attack modes, and the multimodal fusion identification method can be further optimized according to actual deployment needs.
[0044] Although alternative embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make further changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0045] The above specific embodiments further illustrate the purpose, technical solution and beneficial effects of this application. It should be understood that the above are only specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this application should be included within the scope of protection of this invention.
Claims
1. A method for preparing microscopic stealth codes integrating artificial intelligence and hyperspectral imaging, characterized in that, Includes the following steps: S101, Select a substrate material, and dope the substrate material with a photochromic material to form micro-code points; The photochromic material can reversibly switch between at least two different energy levels under irradiation with excitation light of different wavelengths, and exhibits different hyperspectral characteristics accordingly. S102, Collect hyperspectral response data of the micro-code points under multiple different excitation light parameters using a hyperspectral imaging device, and establish a hyperspectral feature library of the micro-code points; S103, Based on the hyperspectral feature library, construct the initial digital twin model of the micro-code points. The initial digital twin model includes a first partial differential equation describing the concentration change of the photochromic material and a second partial differential equation describing the hyperspectral reflectance change of the micro-code points. S104, the initial digital twin model is used as the training object of the physical information neural network PINN, and the hyperspectral feature library is used to pre-train the PINN to obtain the pre-trained PINN model parameters.
2. A method for intelligent identification of microscopic stealth codes integrating artificial intelligence and hyperspectral imaging, characterized in that, Includes the following steps: S201, a cube of measured hyperspectral data of microscopic hidden codes at the current moment is acquired through a hyperspectral imaging device; The microscopic stealth code is composed of a photochromic material doped in the substrate. The photochromic material can reversibly switch between at least two different energy level states and exhibit different hyperspectral characteristics under irradiation with excitation light of different wavelengths. S202, the microscopic stealth code prepared by the preparation method of claim 1 is identified, and a digital twin model of the microscopic stealth code is obtained. The digital twin model is obtained by pre-training the initial digital twin model constructed in step S103 of claim 1 in step S104, and includes a set of partial differential equations describing the state evolution of the microscopic stealth code under the action of external environmental factors. The set of partial differential equations includes at least a first equation describing the change in the concentration of photochromic material, a second equation describing the change in the hyperspectral reflectance of the microscopic code point, and an optional third equation describing the strain of the substrate material caused by environmental factors. S203, the environmental parameters at the current moment and the hyperspectral data at the historical moment are input into the trained physical information neural network PINN. The physical information neural network PINN uses the partial differential equations as physical constraints to predict the expected state data of the microscopic invisible code at the current moment. S204, compare the measured hyperspectral data cube with the expected state data, and calculate the deviation value between the two; S205, determine whether the deviation value is less than a preset threshold. If yes, determine that the microscopic invisible code is true; otherwise, determine that it is false.
3. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 2, characterized in that, The loss function of the Physical Information Neural Network (PINN) includes a data fitting term and a physical constraint term. The data fitting term is used to constrain the error between the network output and the hyperspectral data collected at historical times; The physical constraint term is used to constrain the network output to satisfy the partial differential equations and their boundary and initial conditions.
4. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 3, characterized in that, The training process of the physical information neural network PINN includes: Obtain hyperspectral data cubes of microscopic hidden codes at multiple historical moments and their corresponding environmental parameters as training datasets; The environmental parameters and corresponding time information are used as inputs, the hyperspectral data cube is used as a supervision signal, and the PINN is iteratively trained in conjunction with the physical constraints of the partial differential equations until the loss function converges.
5. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 2, characterized in that, After the result is determined to be true in step S205, a dynamic response verification step is also included: The first excitation light parameters are generated according to the preset challenge algorithm; The excitation light source is controlled to irradiate the microscopic invisible code with the first excitation light parameters, causing the photochromic material to switch to the first energy level state; The first response spectral data cube is acquired at this time using the hyperspectral imaging device; The first response spectral data cube is compared with the first expected spectral data in the corresponding state predicted by the physical information neural network PINN; If the deviation between the two values is less than the second preset threshold, the dynamic response verification is deemed to have passed; the second preset threshold is less than or equal to the preset threshold.
6. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 5, characterized in that, The dynamic response verification step also includes secondary verification: After the dynamic response verification is passed, a second excitation light parameter different from the first excitation light parameter is generated according to the preset challenge algorithm; The excitation light source is controlled to irradiate the microscopic invisible code with the second excitation light parameters, thereby driving the photochromic material to switch to the second energy level state. Acquire the second response spectral data cube at this time; The second response spectral data cube is compared with the second expected spectral data in the corresponding state predicted by the physical information neural network PINN; If the deviation between the two values is less than the third preset threshold, the secondary verification is considered successful.
7. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 2, characterized in that, In step S205, when the deviation value is greater than or equal to a preset threshold, an anomaly type identification step is also included: The deviation values and their distribution characteristics in the spatial and spectral dimensions are input into the pre-trained anomaly classification model; The anomaly classification model outputs anomaly types based on the distribution characteristics, and the anomaly types include at least one of environmental damage and forgery attacks.
8. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 2, characterized in that, The environmental parameters include at least one of temperature, relative humidity, and ambient light intensity; The set of partial differential equations also includes a third equation describing the strain of the substrate material due to temperature and humidity.
9. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 2, characterized in that, The preset threshold is dynamically adjusted based on the environmental parameters at the current moment. The adjustment method is that the preset threshold is equal to the product of the basic threshold and the environmental compensation function, which is obtained by fitting historical misidentification rate data.
10. The intelligent identification method for microscopic stealth codes integrating artificial intelligence and hyperspectral imaging according to claim 7, characterized in that, The anomaly classification model is a support vector machine or a random forest, and its training data includes the distribution characteristics of deviation values under different environmental damage patterns and fake attack patterns generated by simulation.