AI identification method for generating invisible dynamic secret code by micro optical structure
By constructing a multimodal acquisition and decoding process on a mobile terminal, using the dynamic reflection characteristics and physical laws of microstructures, the identification stability problem of microstructure recognition technology under environmental changes and forgery attacks is solved, and dynamic password recognition with high security and practicality is achieved.
Patent Information
- Application Number
- CN202510456236.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-11
AI Technical Summary
The existing microstructure recognition technology lacks stability and practicality in recognition under environmental changes and forgery attacks, and lacks the ability to adapt to dynamic changes. Traditional AI recognition methods rely on single-frame image recognition and fail to effectively utilize the dynamic reflection characteristics of microstructures.
Build a multimodal acquisition and decoding process on a mobile terminal, and adaptively adjust the image preprocessing strategy through image acquisition, normalization processing, structure response decoding model and generation model, use the reflection characteristics of microstructures under multi-angle and multi-light conditions, combine physical laws to verify the authenticity, and generate image similarity sequences for identification.
It realizes stable identification of micro-optical structures in complex environments, enhances the robustness and anti-forgery capabilities of the recognition system, has good versatility and easy deployment, and can adapt to lighting changes and camera differences, and prevents image imitation attacks.
Smart Images

Figure CN120373329A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of AI recognition, and particularly relates to an AI recognition method for generating invisible dynamic ciphers with micro-optical structures. Background Art
[0002] With the continuous growth of application requirements such as information security, commodity anti-counterfeiting, and intelligent recognition, anti-counterfeiting technologies based on physical non-reproducible characteristics have received extensive attention. Among them, micro-optical structures (such as nano gratings, microlens arrays, surface relief structures, etc.) are widely used to manufacture anti-counterfeiting marks that are invisible to the naked eye and difficult to imitate due to their characteristics of high structural complexity, viewing angle dependence, and sensitivity to ambient light. These microstructures can be embedded on the surface of labels, packages, or other carriers, and by precisely controlling their geometric morphology, optical patterns are formed under specific lighting or observation conditions for tasks such as identity authentication and anti-counterfeiting recognition. However, despite the good non-reproducibility of microstructures, the technological development at the recognition end still faces many challenges.
[0003] Traditional micro-structure recognition methods are mostly based on the "static imaging + template matching" mode, that is, the micro-structure pattern is photographed under standard lighting and angle conditions and then compared with the pre-registered image. Such methods work well in the laboratory environment, but show serious instability in practical applications. First, micro-structures are extremely sensitive to external conditions (especially the incident light angle, observation angle, light source type, ambient brightness, etc.), and their reflection patterns may change drastically under different angles or lighting, resulting in recognition failure. Second, with the improvement of printing technology and forgery means, attackers can copy "seemingly identical" optical patterns under specific conditions, deceiving traditional image recognition algorithms. Third, traditional AI recognition algorithms are often built on a standardized image training set and lack the ability to model dynamic change information in the real environment. When faced with factors such as angle perturbation, lighting change, and camera module differences, the recognition accuracy drops significantly. In addition, some existing studies have tried to introduce AI-assisted recognition, but still often rely on single-frame images for recognition and fail to effectively utilize the physical characteristics of "angle responsiveness" or "dynamic reflection mode" of micro-structures.
[0004] In the context of the widespread deployment of mobile terminals, higher requirements are put forward for micro-structure recognition systems. The system must have the ability to adapt to environmental changes, the ability to recognize forgery attacks, and the robustness in actual user operations. Currently, there is no mature solution that can combine the physical micro-structure response and the artificial intelligence recognition model without changing the user's operation habits to build a dynamic cipher recognition system with both high security and high practicality. Therefore, there is an urgent need for a recognition method that can both utilize the complex physical response characteristics of micro-structures and adapt to various usage conditions through intelligent algorithms to fundamentally solve the deficiencies of traditional solutions in terms of anti-counterfeiting ability, recognition stability, and deployment flexibility. Summary of the Invention
[0005] The object of the present invention is to propose a method for AI recognition of invisible dynamic passwords generated by micro-optical structures, and to construct a multi-modal acquisition and decoding process that can run in real time on a mobile terminal, which can adaptively adjust the image preprocessing strategy, resist the influence of real factors such as light changes, shooting angle differences, and camera module differences, and has good versatility and easy deployability.
[0006] To achieve the above object, the present invention provides a method for AI recognition of invisible dynamic passwords generated by micro-optical structures, and the method includes:
[0007] S1. Use a mobile terminal to scan the product packaging, automatically start the image acquisition process to perform frame-by-frame image acquisition, as well as the light parameters of each frame of the corresponding image and the shooting angle of the image corresponding to each frame, and organize each frame of the image, the light parameters of the corresponding frame of the image, and the shooting angle of the corresponding frame of the image into a structured data sequence;
[0008] S2. Normalize each frame of the structured data sequence of each frame of the image to regenerate a normalized sequence; wherein, the normalized sequence includes each normalized frame of the image, the shooting angle corresponding to the image, and the light parameters of each frame of the image;
[0009] S3. Input the generated normalized sequence into a pre-trained structure response decoding model to identify the unique structure code corresponding to the sequence image formed by the reflection of the micro-optical structure under multi-angle and multi-light conditions, and output the corresponding structure code;
[0010] S4. Design a structure generation model, use the corresponding structure code, the shooting angle corresponding to the image, and the light parameters of the corresponding frame of the image as the model input for inference analysis, to simulate the generated image under the current shooting conditions if a certain structure code is real, and then compare the generated image with each normalized frame of the image to generate an image similarity sequence, so as to complete the authenticity verification of its structure code;
[0011] S5. Use the average value of the image similarity sequence as the credibility score, compare the credibility score with a preset credibility threshold, and make a judgment on whether to accept the recognition result:
[0012] If the credibility score is greater than or equal to the preset credibility threshold, it is considered that the current structure code recognition is credible, and the system returns it as a valid recognition result;
[0013] If the credibility score is less than the preset credibility threshold, the system rejects the output of the recognition result, prompts the user to rescan or warns of the risk of forgery.
[0014] Further, the structured data sequence is a triple;
[0015] Among them, the S1 further includes:
[0016] Perform a legality analysis on each frame of image to determine whether it should be included in the sequence; among them, the legality analysis performs a multi-factor weighted comprehensive analysis based on the brightness variance of each frame of image, the edge entropy of each frame of image, and the cosine similarity between the current frame image and the previous frame, and generates a legality score.
[0017] Further, the S1 further includes: evaluating the angle and light coverage of the structured data sequence to determine whether the structured data sequence is valid:
[0018] Based on the structured data sequence, calculate the ratio of the number of elements of the corresponding shooting angle to the number of the set minimum effective angle intervals to obtain the angle coverage;
[0019] Based on the structured data sequence, calculate the ratio of the light parameter of each frame of image to the number of the set effective light condition types to obtain the light parameter coverage;
[0020] If the angle coverage is less than 0.8 and the light parameter coverage is less than 0.7, prompt the user to rescan.
[0021] Further, the S2 specifically includes:
[0022] After converting each frame of image into the corresponding grayscale image, calculate the average brightness, smooth the average brightness to obtain a normalization factor, multiply all pixel values of each frame of image by the normalization factor, and adjust the overall image brightness to unify the images collected under different light intensities to the brightness level of the average brightness;
[0023] Based on the dominant color of each frame of image in the HSV space and the color temperature obtained from the environmental parameters, perform equivalent color offset adjustment;
[0024] Generate a normalized image for each frame and form a normalized sequence.
[0025] Further, the operation steps of the structure response decoding model are as follows:
[0026] First, use a convolutional encoder to extract the local feature vector of each normalized frame of image, encode the corresponding angle and light parameters through a two-layer fully connected network into a context vector, splice the two to obtain the joint input representation of each frame of image, and construct a joint input representation sequence;
[0027] Then, a multi-layer residual attention modeling module is constructed. The joint input representation sequence is input, combined with the angular position encoding of each frame of the image, and the global representation vector of the structural response sequence is output. Then, a decoder is used to predict the structural encoding, which is expressed as:
[0028]
[0029] where C is the structural encoding, f φ is the structure generation model, x i is the joint input representation of image i, n is the total number of frames, MLP is the multi-layer perceptron, AttnBlock is the multi-layer residual attention modeling module, and Ω({x i}) is the response trajectory sparse regularization term, which is used to penalize information redundancy in the sequence;
[0030] Finally, the structural encoding C is output, including:
[0031] A fixed-length binary vector for encryption recognition and / or a unique structure ID number for database comparison and verification.
[0032] Furthermore, the multi-layer residual attention modeling module is a two-layer residual attention block, and the residual attention block includes multi-head attention and a feed-forward network; the angular position encoding of each frame of the image is constructed by sine and cosine functions.
[0033] Furthermore, the response trajectory sparse regularization term performs sparse constraint analysis by measuring the difference between the feature and the mean using the L1 norm.
[0034] Furthermore, the structure generation model is used to simulate and generate images, and is designed as follows:
[0035]
[0036] where is the generated image, G θ is the structure generation model, (C, θ i , E i ) is the fusion vector of the corresponding structural encoding, the shooting angle of the image, and the illumination parameters of each frame of the image, Φ C (C) is the prior tensor of the structure pattern obtained by feature mapping of the structural encoding; Φ env (θ i , E i ) is the modulation tensor output by the environmental factor encoder, representing the optical modulation of the structure under specific shooting conditions; is the residual response activation term, which is used to learn the high-order nonlinear response behavior under the coupling of the structure and the angle / illumination;
[0037] where the residual response activation term It is generated by performing a single-head weighted attention operation on the structure diagram prior tensor obtained through the structure and environment channel mapping matrix and structure encoding feature mapping, and the modulation tensor output by the environment factor encoder.
[0038] Furthermore, the structure generation model further includes a response consistency regularization term, which is used to ensure that the images generated by the model exhibit typical physical response behaviors of real microstructures in the local structure region; the response consistency regularization term is obtained based on the difference analysis of the energy spectra extracted after performing a fast Fourier transform on the generated image of each frame and the normalized image of each frame in the horizontal direction.
[0039] Among them, the inference analysis includes:
[0040] Calculate the structural similarity between the generated image of each frame and the normalized image of each frame to generate a structural similarity index. After full-sequence alignment, output a similarity sequence.
[0041] Furthermore, the structural similarity index includes the SSIM index.
[0042] The beneficial technical effects of the present invention are at least as follows:
[0043] The present invention proposes an intelligent recognition method and system for invisible cipher codes carried by micro-optical structures, which can still be stably recognized and have a high anti-counterfeiting ability in complex actual environments. Compared with the traditional method that relies on single static image recognition, the present invention fully explores the physical characteristics of microstructures that present different optical responses under different angles and different lighting conditions, and proposes to extract multi-dimensional features of the structure through dynamic information acquisition and modeling, significantly enhancing the robustness and anti-counterfeiting ability of the recognition system. At the same time, the present invention does not only rely on the image recognition model itself to improve the accuracy, but introduces a structure authenticity verification mechanism based on physical laws, which can discriminate the source of the captured image and effectively prevent image imitation attacks. In addition, the present invention constructs a multi-modal acquisition and decoding process that can run in real time on mobile terminals, which can adaptively adjust the image preprocessing strategy, resist the influence of real factors such as lighting changes, shooting angle differences, and camera module differences, and has good versatility and easy deployability.
[0044] Generally speaking, the present invention establishes a closed-loop recognition system from four aspects: "structural coding design", "information acquisition strategy", "AI recognition modeling", and "authenticity verification mechanism", and systematically solves the core problems existing in the environmental adaptability, anti-counterfeiting ability, and practical usability of existing micro-structure cipher code recognition technologies. Brief Description of the Drawings
[0045] The present invention will be further described with reference to the accompanying drawings. However, the embodiments in the drawings do not constitute any limitation to the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the following drawings without creative efforts.
[0046] Figure 1 This is a flowchart of the AI recognition method for generating invisible dynamic passwords by the micro-optical structure of the present invention. Detailed implementation manners
[0047] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation to the present invention.
[0048] As Figure 1 shown, the AI recognition method for generating invisible dynamic passwords by the micro-optical structure provided by the embodiment of the present invention includes the following steps S1 - S5:
[0049] S1. Use a mobile terminal to scan the product packaging, automatically start the image acquisition process to acquire images frame by frame, as well as the lighting parameters of each frame of the corresponding image and the shooting angle of the corresponding image, and organize the each frame of image, the lighting parameters of the corresponding each frame of image, and the shooting angle of the corresponding each frame of image into a structured data sequence.
[0050] Specifically, when the user scans the micro-optical structure on the product packaging with a mobile terminal, the system automatically starts the image acquisition process. The device uses the camera to acquire a frame of image I i every 60 milliseconds, and obtains the shooting angle θ i of the corresponding image through the perspective change naturally generated by hand jitter. Among them, I i is an RGB image with a resolution of 640×480, taken by the rear camera of the device in the automatic exposure mode; θ i =(α i , β i ), where α i represents the pitch angle and β i represents the yaw angle, in degrees, and is synchronously acquired from the device gyroscope in real time, with the timestamp aligned to each frame of image.
[0051] Meanwhile, during the process of acquiring each frame of image I i , the device obtains the lighting parameter E i =(l i , T i , ψ i ) through the ambient light sensor. Among them:
[0052] l i represents the ambient light intensity (in lux), which is obtained in real time by the light intensity sensor of the mobile phone;
[0053] T i represents the color temperature of the main light source (in K), which is obtained by fitting the gray channel from the color histogram of the image I i ;
[0054] ψ i represents the direction angle of the main light source (in degrees), which is estimated from the region with the maximum brightness in the image brightness distribution.
[0055] This design ensures that the optical imaging conditions of the image I i are completely described in the data structure, enhancing the physical consistency modeling ability of subsequent processing.
[0056] Furthermore, each collected triple (I i , θ i , E i ) is organized into a structured data sequence:
[0057]
[0058] where n is controlled between 8 and 15 frames, ensuring that the samples are dense enough in the time and angle dimensions without causing system performance bottlenecks. This data structure is the core input structure of the entire system.
[0059] To avoid image blurring, redundancy, or abnormal exposure, the system calculates the legality score μ i for each frame of the image I i to determine whether it should be included in the sequence:
[0060]
[0061] where:
[0062] The brightness variance of the image I i , which measures its overall texture contrast, is calculated from the grayscale image of I i ;
[0063] G(I i ): The edge entropy of the image I i , which is calculated by extracting the Shannon entropy after extracting the Sobel gradient map;
[0064] D(I i , I i-1 ): The cosine similarity between the image and the previous frame, which avoids redundancy of consecutive frames;
[0065] λ1, λ2, λ3: Control item weights, recommended to be set as (0.5, 1.0, 0.8).
[0066] Only when μ i > τ (empirical threshold τ = 3.5), this frame is included in the final sequence to ensure the quality and variability of the collected data.
[0067] Furthermore, to ensure comprehensive coverage of structural response information, the system evaluates the angle and light coverage of the entire sequence as follows:
[0068]
[0069] Where:
[0070] C θ represents the angle coverage, and M θ is the set number of minimum effective angle intervals;
[0071] C E represents the light parameter coverage, and M E is the set number of effective light conditions;
[0072] The system requires C θ ≥ 0.8 and C E ≥ 0.7, otherwise prompt the user to rescan.
[0073] The effective sampling sequence filtered by the above mechanism will be used as the only input for the next step of image normalization. Compared with the traditional "image as input" method, the present invention ensures that each frame of image carries traceable physical environment information, providing basic support for the problem of "structural response being vulnerable to external environmental interference" solved by the present invention.
[0074] S2. Normalize each frame of the structured data sequence of each frame of image to regenerate a normalized sequence; wherein, the normalized sequence includes each normalized frame of image, the shooting angle corresponding to the image, and the light parameters of each frame of image.
[0075] Specifically, the goal of this step is to receive the image - environment sequence output in step one For each frame of image I i perform normalization based on the light parameters E i = (l i , T i , ψ i ), and output the standard image I i ′, forming a new input sequence The goal of this process is to enhance the consistency of the image, enabling the subsequent structure decoding model to obtain stable input features in diverse environments.
[0076] Image brightness normalization is the first step. For image I i Convert it to grayscale After that, calculate the average brightness m i , and define the normalization factor:
[0077]
[0078] Where:
[0079] m i is the average brightness value of all pixels in the image , with a value range of [0, 255], obtained by accumulating and averaging the grayscale values of the image;
[0080] m0 is the standard brightness target, set to 128;
[0081] ∈ is a small constant, taken as 1, used to prevent division by zero.
[0082] The normalization operation is: multiply all pixel values of I i by η i , adjust the overall image brightness, and unify the images collected under different light intensities to the m0 brightness level.
[0083] Then perform color temperature correction. Based on the dominant color of image I i in the HSV space and the color temperature T obtained from the lighting parameters i , perform equivalent color shift adjustment. This invention does not introduce a fixed color reference model, but adopts a linear mapping method of the image's own hue under the standard color temperature T0 = 5000K to converge the image hue to the standard light source color gamut:
[0084]
[0085] Where:
[0086] is the image after light intensity normalization;
[0087] T i is the current frame environment color temperature recorded in the first step;
[0088] T0 is the standard color temperature designed by the system, with a recommended value of 5000K;
[0089] γ is the adjustment amplitude coefficient, recommended to be set to 0.6;
[0090] ColorShift(·) is an operation that globally translates the hue channel of an image, used to simulate the shift from warm light to white light or vice versa.
[0091] Finally, a normalized sequence is formed:
[0092]
[0093] This sequence retains each frame of the image I i ′ and its shooting angle θ i and the ambient light E i , but the image content has been unified into a standard optical environment space.
[0094] S3. Input the generated normalized sequence into a pre-trained structure response decoding model to identify the unique structure encoding corresponding to the sequence images formed by the reflection of the micro-optical structure under multi-angle and multi-illumination conditions, and output the corresponding structure encoding.
[0095] Specifically, the core task of this step is based on the light-normalized image sequence output in step two to construct a structure response decoding model f φ , to identify the unique structure encoding C corresponding to the sequence images formed by the reflection of the micro-optical structure under multi-angle and multi-illumination conditions, that is, the "dynamic invisible cipher". This process is the core information extraction link in the whole system, which determines whether a stable and identifiable structure fingerprint can be accurately extracted from the weak optical response under the influence of the environment.
[0096] It should be noted that different from traditional image recognition tasks, the image sequence of the present invention has the following patent features:
[0097] Each frame of the image I i ′ is acquired under the known shooting angle θ i and the light parameter E i ;
[0098] The pattern changes in the image are not free changes, but the "response trajectories" of the physical structure under different observation conditions;
[0099] All frames come from the same micro-structure encoding, but only show different reflection patterns due to different viewing angles and illuminations.
[0100] Therefore, the modeling task of this step is not to classify "who the image belongs to", but to learn a function f φ , which can restore the initially embedded encoding C through the "change trend" of the image sequence. This trend modeling is much more complex than traditional classification because its input information is the continuous feature changes implicitly existing in the differences between sequences.
[0101] First, for each frame of image I i ′, use a convolutional encoder to extract its local feature vector and combine the corresponding angle θ i =(α i ,β i ) and the illumination parameter E i =(l i ,T i ,ψ i ) and encode them into a context vector through a two-layer fully connected network After concatenating the two, the joint input representation of each frame of image is obtained:
[0102]
[0103] where:
[0104] z i is the output of the image encoder for I i ′ (convolution + pooling + Flatten), with dimension d = 128;
[0105] e i is the output of mapping the concatenation of θ i and E i into a vector, which is used to introduce physical context information;
[0106] The concatenated x i is the basic unit for the model to model the sequence response behavior.
[0107] Then, construct a multi-layer residual attention modeling module, input the joint input representation sequence {x1,...,x n}, output the global representation vector r of the structural response sequence, and then predict the structural encoding C through a decoder:
[0108]
[0109] where:
[0110] p i is the angle position encoding of each frame (constructed by sine and cosine functions);
[0111] AttnBlock is a two-layer residual attention block, including multi-head attention + feed-forward network;
[0112] Ω({x i}) is a response trajectory sparse regularization term specially designed for the scenario of the present invention, which is used to punish information redundancy in the sequence and improve the focusing modeling ability for the "strong structural response region". The sparse constraint analysis is as follows:
[0113]
[0114] Wherein:
[0115] is the mean vector of the sequence;
[0116] The term represents the sparsity of each frame relative to the average response;
[0117] The coefficient λ controls the regularization strength, and it is recommended to take 0.1.
[0118] This innovative design is used to emphasize the difference between the "response peak frame" (i.e., the frame with the clearest structure) and the "ordinary frame", so that the model can focus on the most discriminative image change interval and adapt to the problems of unbalanced reflected images and high frame - to - frame information redundancy under multi - angle perturbation acquisition in this invention patent.
[0119] The final C output by the model is:
[0120] A fixed - length binary vector (e.g., C ∈ {0, 1} 64 ) is used for encrypted identification;
[0121] Or a unique structure ID number (e.g., ) is used for database comparison and verification.
[0122] The meaning of C is standardized and encoded by the structure manufacturing end, and the structure samples and their encoded labels are used during system training for cross - entropy loss optimization.
[0123] S4. Design a structure generation model, which takes the corresponding structure encoding, the shooting angle corresponding to the image, and the illumination parameters of each frame of the image as model inputs, and conducts inference and analysis to simulate the generated image under the current shooting conditions if a certain structure encoding is real. Then, compare the generated image with each normalized frame image to generate an image similarity sequence, thereby completing the authenticity verification of its structure encoding.
[0124] Specifically, this step plays a key anti - counterfeiting verification role in the entire patent system and is a link for substantially judging the authenticity of the structure decoding result C. In the previous step, this invention identified a certain structure encoding C based on the image response trajectory through the decoding model f φ However, since the image sequence may be interfered by forged images, imitation materials, or even image attacks, this invention cannot directly trust C and must determine whether it truly originates from a physically existing micro - optical structure. For this reason, this step introduces a structure generation model G θ , which is used to simulate "what the image should look like if a certain structure encoding C is real under the current shooting conditions (θ i , E i ). Then compare the generated image Compare with the actual image I i ′ to complete the authenticity verification of C.
[0125] Among them, the input data consists of the following three items, all from the previous steps:
[0126] Structure code C: Output by the model f in step 3 φ and is the decoding result to be verified;
[0127] Image acquisition angle θ i =(α i , β i ): Reserved from step 1;
[0128] Lighting parameter E i =(l i , T i , ψ i ): Reserved from step 1.
[0129] The objective of the present invention is to construct a generative model G θ to simulate the reflection response image of the structure code C under specified observation conditions.
[0130] In the model design, G θ receives (C, θ i , E i ) as input and outputs an image To ensure that the generated image has high structural consistency and physical interpretability, the present invention proposes a generative architecture based on the fusion of structural conditional control and environmental modulation, separately modeling and fusing the structure and physical observation variables in the network:
[0131]
[0132] Among them:
[0133] Φ C (C) is the prior tensor of the structure pattern obtained by the structure code feature mapping (such as through an embedding + deconvolution network);
[0134] Φ env (θ i , E i ) is the modulation tensor output by the environmental factor encoder, representing the optical modulation of the structure under specific shooting conditions;
[0135] is a residual response activation term innovatively designed by the present invention for learning the high-order nonlinear response behavior under the coupling of structure and angle / lighting.
[0136] In particular, Not directly from the input, but through cross - condition fusion and attention - guided structure response difference enhancement, in the form of:
[0137]
[0138] Where:
[0139] W c ,W e is the structure - environment channel mapping matrix;
[0140] Attn(·) is a single - head weighted attention operation that dynamically amplifies the regions in the structure - encoded features sensitive to the current environment, strengthening the modeling of angle - sensitive points and specific reflection regions.
[0141] During training, the present invention not only uses the image reconstruction error as a loss term, but also introduces a response consistency regularization term Ω, which is designed to ensure that the images generated by the model exhibit the typical physical response behavior of real micro - structures in the local structure regions. This regularization term is based on the typical "angle - related high - frequency texture response" in micro - structure images and is defined as follows:
[0142]
[0143] Where:
[0144] FFT h (·) represents extracting the energy spectrum after performing a fast Fourier transform on the image in the horizontal direction;
[0145] This operation is used to capture the frequency feature changes brought about by the reflection of micro - structures in the horizontal direction;
[0146] The significance of the regularization term is to force the generated images to be consistent with the real - shot images in terms of frequency response, thus avoiding the generation of "blurred average images".
[0147] In the inference stage, the system will calculate the structural similarity between each frame of the generated image and the real - shot image I i ′. Usually, the structural similarity index is used. After full - sequence alignment, a set of similarity sequences is output. This result will be used as the only input to the next - step credibility scoring function. The biggest difference between this step and traditional methods lies in:
[0148] It does not classify and judge whether the "image is forged", but constructs a generation path that can "simulate the expected image response";
[0149] The generation process is based on the structure - decoding results and the physical acquisition environment, rather than simple labels, thus realizing the physical traceability of the discrimination logic;
[0150] Using the structural residual attention term Improve the modeling ability for the nonlinear response of microstructures;
[0151] Using the frequency response consistency as the structural authenticity regularization term Ω, which is particularly suitable for the modeling requirements of typical periodic reflection patterns in the optical field of microstructures.
[0152] The final output is:
[0153] Image sequence The system predicts the expected response of the structure at the current angle and illumination;
[0154] Similarity sequence Measure the true consistency between the predicted and the real captured images, providing physical support for the next credibility judgment module.
[0155] S5. Use the average value of the image similarity sequence as the credibility score, compare the credibility score with a preset credibility threshold, and make a judgment on whether to accept the recognition result:
[0156] Specifically, this step is the final output link of the entire patent system, receiving the image similarity sequence generated in the previous step Comprehensively evaluate the credibility of the structure recognition result C, and decide whether to accept the recognition result based on this evaluation result.
[0157] The credibility scoring function is defined based on the average value of the similarity sequence:
[0158]
[0159] Where:
[0160] r represents the overall credibility score of the structure recognition result;
[0161] n is the number of image frames participating in the comparison;
[0162] sim i Represents the structural similarity between the real and the generated images of the i-th frame of the structure image, usually using the SSIM index (the closer the value is to 1, the more consistent the images are).
[0163] The system compares this score with the set credibility threshold τ and makes a judgment on whether to accept the recognition result:
[0164]
[0165] Where:
[0166] τ is the credibility threshold value, usually set in [0.85, 0.95], and can be adjusted according to the application scenario;
[0167] If r ≥ τ, it is considered that the structure code recognition is reliable, and the system returns it as the valid recognition result C;
[0168] If r < τ, the system rejects the output of the recognition result and prompts the user to rescan or warns of the risk of forgery.
[0169] For the convenience of accessing the actual business system, the system encapsulates the output result into a structured interface format, for example:
[0170] {
[0171] "result":"accepted",
[0172] "structure_code":"C_01783F9A",
[0173] "confidence":0.921
[0174] }
[0175] It should be noted that the above-described work process is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and no limitation is made here.
[0176] In addition, for the technical details not described in detail in this embodiment, reference can be made to the parameter operation method provided in any embodiment of the present invention, which will not be elaborated here.
[0177] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.
[0178] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0179] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0180] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for generating a stealth dynamic cipher for AI recognition of a micro-optical structure, characterized in that The method includes: S1. Use a mobile terminal to scan the product packaging, automatically start the image acquisition process to perform image acquisition in units of frames, as well as the illumination parameters of each frame of the corresponding image and the shooting angle of the image corresponding to each frame, and organize each frame of the image, the illumination parameters of each corresponding frame of the image, and the shooting angle of each corresponding frame of the image into a structured data sequence; S2. Perform normalization processing on each frame of the structured data sequence of each frame of the image to generate a normalization sequence; wherein, the normalization sequence includes each normalized frame of the image, the shooting angle corresponding to the image, and the illumination parameters of each frame of the image; S3. Input the generated normalization sequence into a pre-trained structure response decoding model to identify the unique structure code corresponding to the sequence image formed by the reflection of the micro-optical structure under multi-angle and multi-illumination conditions, and output the corresponding structure code; S4. Design a structure generation model, use the corresponding structure code, the shooting angle corresponding to the image, and the illumination parameters of each corresponding frame of the image as the model input for inference analysis, to simulate the generated image under the current shooting conditions if a certain structure code is real, and then compare the generated image with each normalized frame of the image to generate an image similarity sequence, thereby completing the authenticity verification of its structure code; S5. Use the average value of the image similarity sequence as the credibility score, compare the credibility score with a preset credibility threshold, and make a judgment on whether to accept the recognition result: If the credibility score is greater than or equal to the preset credibility threshold, it is considered that the current structure code recognition is credible, and the system returns it as a valid recognition result; If the credibility score is less than the preset credibility threshold, the system rejects the output of the recognition result and prompts the user to rescan or warns of the forgery risk.
2. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 1, characterized in that The structured data sequence is a triple; Among them, S1 further includes: Perform a legality analysis on each frame of the image to determine whether it should be included in the sequence; wherein, the legality analysis performs a multi-factor weighted comprehensive analysis based on the brightness variance of each frame of the image, the edge entropy of each frame of the image, and the cosine similarity between the current frame of the image and the previous frame to generate a legality score.
3. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 1, wherein S1 further includes: performing an angle and illumination coverage evaluation on the structured data sequence to determine whether the structured data sequence is valid: Based on the structured data sequence, calculate the ratio of the number of elements of the corresponding shooting angle to the number of the set minimum effective angle intervals to obtain the angle coverage; Based on the structured data sequence, calculate the ratio of the illumination parameter of each frame of the image to the number of the set effective illumination condition types to obtain the illumination parameter coverage; If the angle coverage is less than 0.8 and the illumination parameter coverage is less than 0.7, then prompt the user to rescan.
4. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 1, characterized in that S2 specifically includes: After converting each frame of the image into the corresponding grayscale image, calculate the average brightness, perform smoothing processing on the average brightness to obtain a normalization factor, multiply all pixel values of each frame of the image by the normalization factor, and adjust the overall image brightness to unify the images collected under different light intensities to the brightness level of the average brightness; Based on the dominant color of each frame of image in the HSV space and the color temperature obtained from the environmental parameters, equivalent color shift adjustment is performed; Generate a normalized image for each frame and form a normalized sequence.
5. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 1, characterized in that The operation steps of the structure response decoding model are as follows: First, use a convolutional encoder to extract the local feature vector of each normalized frame of image, and encode the corresponding angle and illumination parameters into a context vector through a two-layer fully connected network. After splicing the two, the joint input representation of each frame of image is obtained, and a joint input representation sequence is constructed; Then, construct a multi-layer residual attention modeling module. Input the joint input representation sequence, and combine the angle position encoding of each frame of image to output the global representation vector of the structure response sequence. Then, a decoder is used to predict the structure encoding, which is expressed as: Among them, C is the structure encoding, f φ is the structure generation model, x i is the joint input representation of image i, n is the total number of frames, MLP is the multi-layer perceptron, AttnBlock is the multi-layer residual attention modeling module, Ω({x i}) is the response trajectory sparse regularization term, which is used to punish the information redundancy in the sequence; Finally, output the structure encoding C, including: A fixed-length binary vector for encryption recognition and / or a unique structure ID number for database comparison and verification.
6. The AI recognition method for generating a stealth dynamic cipher by the micro-optical structure according to claim 5, characterized in that The multi-layer residual attention modeling module is a two-layer residual attention block, and the residual attention block includes multi-head attention and a feed-forward network; the angle position encoding of each frame of image is constructed by sine and cosine functions.
7. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 5, wherein The response trajectory sparse regularization term measures the difference between the feature and the mean through the L1 norm for sparse constraint analysis.
8. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 1, wherein, The structure generation model is used to simulate and generate images, and is designed as follows: Among them, For generating an image, G θ is a structure generation model, (C, θ i , E i ) is a fusion vector of the corresponding structure encoding, the shooting angle corresponding to the image, and the illumination parameters of each frame of the image, Φ C (C) is a structure pattern prior tensor obtained by feature mapping of the structure encoding; Φ env (θ i , E i ) is a modulation tensor output by the environmental factor encoder, representing the optical modulation of the structure under specific shooting conditions; is a residual response activation term, used to learn the high-order nonlinear response behavior under the coupling of structure and angle / illumination; Among them, the residual response activation term is generated by performing a single-head weighted attention operation on the structure and environment channel mapping matrix, the structure diagram prior tensor obtained by mapping the structure-encoded features, and the modulation tensor output by the environment factor encoder.
9. The AI recognition method for generating a stealth dynamic cipher based on the micro-optical structure according to claim 8, characterized in that, The structure generation model also includes a response consistency regularization term, which is used to ensure that the images generated by the model exhibit the typical physical response behavior of real microstructures in the local structure area; The response consistency regularization term is obtained based on the difference analysis of the energy spectra extracted after performing a fast Fourier transform on the generated image for each frame and the normalized image for each frame in the horizontal direction; Among them, the inference analysis includes: Calculate the structural similarity between the generated image for each frame and the normalized image for each frame to generate a structural similarity index. After full-sequence comparison, output a similarity sequence.
10. The AI recognition method for generating a stealth dynamic cipher using the micro-optical structure according to claim 9, characterized in that, The structural similarity index includes the SSIM index.
Citation Information
Patent Citations
Bill anti-counterfeit method and device based on texture image characteristics
CN103761799A
Anti-counterfeiting method based on random plain and secret code association examination
CN104951943A
Anti-counterfeit mark based on invisible secret code technology and recognition method thereof
CN106803118A
Dynamic implicit two-dimensional code and generation and detection method and device thereof
CN112163655A
Indoor positioning method based on invisible projection two-dimensional code
CN113792564A