Transaction anti-counterfeiting identification method based on deep learning
By using the diffusion model and attention-based Unet model in transaction anti-counterfeiting forensic identification, and configuring the lora model to hide the anti-counterfeiting forensic identification marks, the problem of insufficient optimization and adaptability of prompt words in the existing technology is solved, and efficient anti-counterfeiting forensic identification effect is achieved.
Patent Information
- Application Number
- CN202510457478.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The existing steganography method based on deep learning has difficulties in the optimization and adaptability of prompt words, which makes it difficult to effectively hide and extract anti-counterfeiting identification marks in transaction anti-counterfeiting identification.
The initial transaction identification vector is processed by the variational autoencoder of the pre-trained diffusion model, and the low-dimensional vector characterization is obtained, and the attention-based Unet model is used for inverse denoising, and the anti-counterfeiting identification mark is added to the low-frequency region of the frequency domain characterized by the low-dimensional vector. Configure the learnable lora model, cooperate with the Unet model after training, realize the hidden anti-counterfeiting identification flags during the denoising process, and extract the flags through the variational self-decoder.
The hiding and extraction efficiency of anti-counterfeiting identification marks is improved, the anti-interference ability and robustness of marks is enhanced, the training process is simplified, and the adaptability is improved.
Smart Images

Figure CN119992303A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transaction anti-counterfeiting identification technology, and in particular to a transaction anti-counterfeiting identification method based on deep learning. Background Art
[0002] Steganography is a technology that embeds specific information into information carriers to achieve anti-counterfeiting and identification. For example, image steganography means hiding secret information in an image without changing the visual quality and representation of the image.
[0003] Steganographic embedding can be done by modifying pixel values, frequency domain transformation (such as DCT, DFT), or deep learning-based steganography. When identification is required, the embedded information is extracted from the image through a specific algorithm to verify its authenticity. Among the deep learning-based steganography methods, the diffusion model steganography technology based on the hint word is a new type of steganography method. It uses the generation ability of the diffusion model and the randomness and diversity of the image generated by the diffusion model to hide the secret information in the noise or details of the image. By adjusting the noise distribution or sampling strategy in the generation process, the information can be embedded and extracted. The process requires the design of effective hint words to achieve steganography, which requires high technology and experience. The optimization convergence of the hint words is difficult and the adaptability is poor.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present invention provides a transaction anti-counterfeiting identification method based on deep learning.
[0006] The present invention provides a transaction anti-counterfeiting identification method based on deep learning, comprising: Processing the initial transaction identification vector through a variational autoencoder of a pre-trained diffusion model , and obtain the low-dimensional vector representation of the initial transaction identification vector ; The low-dimensional vector representation is performed by the attention-based Unet model of the diffusion model according to the inverse denoising process. Processing is performed to obtain a low-dimensional vector representation that obeys the Gaussian distribution ; Among them, the low-dimensional vector represents The Nth step inverse denoising is achieved by the attention-based Unet model; Adding anti-counterfeiting identification marks to low-dimensional vector representation In the low frequency region of the frequency domain; The attention-based Unet model is configured with a learnable lora model, and the trained lora model cooperates with the attention-based Unet model to perform a denoising process on the low-dimensional vector representation of the added anti-counterfeiting identification mark, so as to hide the anti-counterfeiting identification mark through the denoising process realized by the lora model in cooperation with the attention-based Unet model, and obtain a low-dimensional vector representation The restoration result , the variational self-decoder of the diffusion model can be based on Get the transaction identification vector ; During the identification process, the variational autoencoder of the diffusion model processes the transaction identification vector Then, the lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, extract the anti-counterfeiting identification mark from it, and compare whether the similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark exceeds the set threshold to achieve anti-counterfeiting identification.
[0007] Furthermore, the diffusion model includes: a variational autoencoder, an attention-based Unet model and a variational self-decoder; wherein the attention-based Unet model includes: an input encoding unit composed of a residual module, a multi-head self-attention module and a downsampling module, multiple levels of input encoding units are cascaded, the last level of input encoding units are connected to the intermediate encoding units, the intermediate encoding units are composed of a residual module, a multi-head self-attention module and a residual module, multiple levels of intermediate encoding units are cascaded, the last level of intermediate encoding units are connected to the output decoding unit, the output decoding unit is composed of a residual module, a multi-head self-attention module and an upsampling module, the output decoding unit receives the splicing result of the output of the input decoding unit at the same level and the output of the previous level output decoding unit or the intermediate coding unit for decoding, and the last level of output decoding unit is connected to the output layer.
[0008] Furthermore, in the inverse denoising process implemented by the attention-based Unet model, the attention-based Unet model uses the low-dimensional vector representation of the nth time step in the denoising process and the predicted Gaussian noise of the nth time step. The predicted Gaussian noise is added to the low-dimensional vector representation obtained by the inverse denoising process at the n-1th time step for inverse denoising. The inverse denoising process implemented by the attention-based Unet model gradually converts the low-dimensional vector representation into Diffusion into a low-dimensional vector representation that follows a Gaussian distribution .
[0009] Furthermore, the anti-counterfeiting identification mark is added to the low-dimensional vector representation The frequency domain includes: Representation of low-dimensional vectors Perform a two-dimensional Fourier transform and move the low-frequency component to the center of the frequency domain through the fftshift operation; Construct anti-counterfeiting identification marks and refer to low-dimensional vector representation The anti-counterfeiting identification mark is encoded using the frequency domain specification, and the encoded anti-counterfeiting identification mark is added to the low-dimensional vector representation. The low frequency part in the frequency domain; The frequency domain result of adding the anti-counterfeiting identification mark is converted into the spatial domain through two-dimensional inverse Fourier transform to obtain a low-dimensional vector representation of the added anti-counterfeiting identification mark.
[0010] Furthermore, the convolutional layer and output layer in the residual module of the attention-based UNet model are configured with LoRa parameters to form a LoRa model.
[0011] Furthermore, the denoising process of the low-dimensional vector representation of the anti-counterfeiting identification mark and the transaction identification vector A low-dimensional vector representation of The inverse denoising process is used to train the learnable lora model. During the training, the diffusion model and the lora model participate in the following process: the lora model cooperates with the attention-based Unet model to iteratively denoise the low-dimensional vector representation of the added anti-counterfeiting identification mark, and obtains the denoised intermediate state of the low-dimensional vector representation of the added anti-counterfeiting identification mark in turn. … And the restoration results during training , where the variational self-decoder of the diffusion model can be based on the restoration results during training Get the transaction identification vector during the training process; Get the transaction identification vector during the training process After that, the transaction identification vector The transaction identification vector is obtained through variational autoencoder processing A low-dimensional vector representation of , lora model cooperates with attention-based Unet model to represent low-dimensional vectors Iteratively perform inverse denoising and obtain … , .
[0012] Furthermore, in the process of training the learnable lora model, the parameters of the attention-based Unet model remain unchanged, and only the parameters of the lora model are adjusted, while the loss function of the constrained sampling training process is: The restoration result of the denoising process achieved by the LoRa model in conjunction with the attention-based UNet model and low-dimensional vector representation The distance between them, the variational self-decoder is based on the restoration result Generated transaction identification vector and the initial transaction identification vector The lora model cooperates with the attention-based Unet model to identify the transaction vector A low-dimensional vector representation of The low-dimensional vector representation obtained by the inverse denoising process The KL divergence sum is calculated between the distribution of and the distribution of the low-dimensional vector representation of the anti-counterfeiting identification mark.
[0013] Furthermore, during the training process, after the transaction identification vector is generated, an interference operation is performed on the transaction identification vector, and then the recognizability of the anti-counterfeiting identification mark is verified, wherein the interference operation adopts any one or a combination of the following operations: compression interference, adding Gaussian noise interference, Gaussian blur interference, scaling interference, partial cropping interference, rotation interference, adding a constant interference to each element of the transaction identification vector, and multiplying each element of the transaction identification vector by a constant coefficient interference.
[0014] Furthermore, during the identification process, the product side uses the variational autoencoder of the diffusion model to process the transaction identification vector Get its low-dimensional vector representation Then, the private lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, and performs a two-dimensional Fourier transform on the low-dimensional vector representation of the added anti-counterfeiting identification mark to obtain the frequency domain result, and extracts the anti-counterfeiting identification mark from the frequency domain result. The similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark is compared to see whether it exceeds the set threshold, so as to realize anti-counterfeiting identification.
[0015] Furthermore, the similarity between extracting the anti-counterfeiting identification mark and constructing the anti-counterfeiting identification mark is as follows: ; in, are the mean values of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. are the variances of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. In order to extract the anti-counterfeiting identification mark and construct the covariance of the anti-counterfeiting identification mark, is a constant that stabilizes the similarity.
[0016] The above technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art: This application uses the attention-based Unet model of the diffusion model to represent the low-dimensional vector according to the inverse denoising process. Processing is performed to obtain a low-dimensional vector representation that obeys the Gaussian distribution ; Low-dimensional vector representation of the inverse denoising process following Gaussian distribution Add anti-counterfeiting identification marks to the diffusion process instead of the low-dimensional vector representation that follows the Gaussian distribution. An anti-counterfeiting identification mark is added. Since the noise predicted by the attention-based Unet model is added, it is easier to converge in the subsequent training process of the lora model with the attention-based Unet model, thereby improving the training efficiency.
[0017] This application adds anti-counterfeiting identification marks to low-dimensional vector representation In the low-frequency area of the frequency domain; the visible representation is mainly related to the high frequency. The present application adds the anti-counterfeiting identification mark coding to the low-frequency part. When the high-frequency part that determines the visible representation changes, the anti-counterfeiting identification mark coding information of the low-frequency part will not be lost.
[0018] The attention-based Unet model is configured with a learnable lora model. The trained lora model cooperates with the attention-based Unet model to perform a denoising process on the low-dimensional vector representation with the anti-counterfeiting identification mark added, so as to hide the anti-counterfeiting identification mark through the denoising process realized by the lora model in cooperation with the attention-based Unet model, and obtain a low-dimensional vector representation. The restoration result , the variational self-decoder of the diffusion model can be based on Get the transaction identification vector The original variational autoencoder, variational autodecoder, lora model and attention-based Unet model in this application actually form a new diffusion model, which can use its generation ability to hide anti-counterfeiting identification marks in the denoising process and obtain a low-dimensional vector representation. The restoration result , the variational self-decoder can be based on Get the transaction identification vector , the generated transaction identification vector The representation of the initial transaction identification vector is retained. This method can retain the original representation of the carrier image in image-based steganography. During the identification process, the variational autoencoder of the diffusion model processes the transaction identification vector Then, the Lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, extract the anti-counterfeiting identification mark from it, and compare whether the similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark exceeds the set threshold to achieve anti-counterfeiting identification. Since the product party retains the Lora model and the constructed anti-counterfeiting identification mark, even if the diffusion model is an existing model, it can still achieve the privacy of identification and is not easy to be cracked. The Lora model is used to participate in the denoising and inverse denoising process, and the robustness of the model is fully utilized, which improves the robustness of the anti-counterfeiting identification mark encoding and decoding process and improves the anti-interference ability of the anti-counterfeiting identification mark. Lora directly fine-tunes the parameters of the attention-based Unet model through low-rank matrix decomposition, which can more accurately control the generation results, and has stronger adaptability than the existing prompt word optimization processing of anti-counterfeiting identification marks. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flowchart of a transaction anti-counterfeiting identification method based on deep learning provided in an embodiment disclosed by the present invention.
[0022] Figure 2 A schematic diagram of the overall architecture of a transaction anti-counterfeiting identification method based on deep learning provided in an embodiment disclosed in the present invention.
[0023] Figure 3 A schematic diagram of an attention-based Unet model provided for an embodiment of the present invention.
[0024] Figure 4 The invention discloses an embodiment of adding an anti-counterfeiting identification mark to a low-dimensional vector representation. Schematic diagram of the frequency domain.
[0025] Figure 5 A flowchart of the processes involved in the model training process of the LoRa model provided in the disclosed embodiment of the present invention.
[0026] Figure 6 A schematic diagram of a transaction anti-counterfeiting identification device based on deep learning provided in an embodiment disclosed by the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0029] Example 1 Combined with reference Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a transaction anti-counterfeiting identification method based on deep learning, comprising: S100, processing the initial transaction identification vector through a variational autoencoder of a pre-trained diffusion model , and obtain the low-dimensional vector representation of the initial transaction identification vector ; Initial transaction identification vector It is a high-dimensional vector whose parameter distribution has a set meaning, such as the identifier of a trading product.
[0030] The pre-trained diffusion model includes: a variational autoencoder, an attention-based Unet model and a variational self-decoder, wherein the variational autoencoder converts the initial transaction identification vector Mapping to low-dimensional space for processing reduces the complexity of processing operations and reduces hardware configuration requirements. The attention-based Unet model supports subsequent inverse denoising and noise reduction processes in low-dimensional space. The variational autodecoder restores the initial transaction identification vector based on the output results of the attention-based Unet model in the noise reduction process.
[0031] like Figure 2 As shown, in the diffusion process of the diffusion model, the low-dimensional vector representation of the initial transaction identification vector is iteratively Add Gaussian noise to get low-dimensional vector representations … , , where the low-dimensional vector represents Obey Gaussian distribution. In the denoising process, the attention-based Unet model predicts noise according to the time step encoding and the current low-dimensional vector representation. The predicted noise corresponds to the noise added in the corresponding step of the diffusion process. The noise is reduced by modeling the predicted noise based on the attention-based Unet model to represent the low-dimensional vector. Iterative denoising to obtain low-dimensional vector representation … , .in, Representation as a low-dimensional vector The restoration result of the variational self-decoder is represented by a low-dimensional vector The restoration result Restore the initial transaction identification vector Time step encoding is a common technique involved in diffusion models. The prediction of the attention-based Unet model is related to the time step, so time step encoding is introduced to control the prediction.
[0032] In the specific implementation process, Figure 3 As shown, the attention-based Unet model includes: an input coding unit consisting of a residual module, a multi-head self-attention module and a downsampling module, a multi-level input coding unit cascade, the last level of input coding unit connected to the intermediate coding unit, the intermediate coding unit consisting of a residual module, a multi-head self-attention module and a residual module, a multi-level intermediate coding unit cascade, the last level of intermediate coding unit connected to the output decoding unit, the output decoding unit consisting of a residual module, a multi-head self-attention module and an upsampling module, the output decoding unit receives the splicing result of the output of the same level input decoding unit and the output of the previous level output decoding unit or the intermediate coding unit for decoding, and the last level of output decoding unit is connected to the output layer. In the specific implementation process, the multi-head self-attention module can be optimized to other types of attention modules according to needs, such as cross attention and linear attention.
[0033] In this application, S200, the low-dimensional vector is represented by the attention-based Unet model according to the inverse denoising process. Processing is performed to obtain a low-dimensional vector representation that obeys the Gaussian distribution ; Among them, the low-dimensional vector represents The Nth step of inverse denoising implemented by the attention-based Unet model is generated. In the inverse denoising process implemented by the attention-based Unet model, the attention-based Unet model uses the low-dimensional vector representation of the nth time step in the denoising process and the predicted Gaussian noise of the nth time step. The predicted Gaussian noise is added to the low-dimensional vector representation obtained by the inverse denoising process at the n-1th time step. The inverse denoising process implemented by the attention-based Unet model gradually converts the low-dimensional vector representation into Diffusion into a low-dimensional vector representation that follows a Gaussian distribution .
[0034] S300, adding anti-counterfeiting identification marks to low-dimensional vector representation In the low-frequency area of the frequency domain. During the specific implementation process, the product party will construct an anti-counterfeiting identification mark and retain the constructed anti-counterfeiting identification mark for subsequent identification.
[0035] In the specific implementation process, Figure 4 As shown, the above process includes: Representation of low-dimensional vectors Perform a two-dimensional Fourier transform and move the low-frequency component to the center of the frequency domain through the fftshift operation; Construct anti-counterfeiting identification marks and refer to low-dimensional vector representation The anti-counterfeiting identification mark is encoded using the frequency domain specification, and the encoded anti-counterfeiting identification mark is added to the low-dimensional vector representation. The low-frequency part in the frequency domain; the visible representation is mainly related to the high frequency. The present application adds the anti-counterfeiting identification mark code to the low-frequency part. When the high-frequency part that determines the visible representation changes, the anti-counterfeiting identification mark code of the low-frequency part will not be lost.
[0036] The frequency domain result of adding the anti-counterfeiting identification mark is converted into the spatial domain through two-dimensional inverse Fourier transform to obtain a low-dimensional vector representation of the added anti-counterfeiting identification mark.
[0037] Since the anti-counterfeiting identification mark is added to the low-dimensional vector representation of the anti-counterfeiting identification mark, the low-dimensional vector representation of the anti-counterfeiting identification mark cannot be obtained by denoising the low-dimensional vector representation of the anti-counterfeiting identification mark through the attention-based Unet model. Correspondingly, the variational self-decoder of the diffusion model cannot generate the initial transaction identification vector The purpose of this application is to enable the diffusion model to obtain a transaction identification vector based on a low-dimensional vector representation with an anti-counterfeiting identification mark, and the transaction identification vector is consistent with the visible representation of the initial transaction identification vector, so that the transaction identification vector retains the meaning of the initial transaction identification vector while also hiding the anti-counterfeiting identification mark. In this way, the product provider can use the "decoding key" retained in his hand to restore the low-dimensional vector representation with the anti-counterfeiting identification mark added from the transaction identification vector, and then extract the anti-counterfeiting identification mark for anti-counterfeiting identification.
[0038] To achieve the above purpose, this application performs the following operations: S400, such as Figure 2As shown, the attention-based UNet model is configured with a learnable LoRa model. The LoRa model does not affect the parameters of the attention-based UNet model, and the parameters of the LoRa model exist independently of the attention-based UNet model. In the specific implementation process, the convolutional layer and output layer in the residual module of the attention-based UNet model are configured with LoRa parameters to form a LoRa model.
[0039] The trained lora model cooperates with the attention-based Unet model to perform a denoising process on the low-dimensional vector representation of the added anti-counterfeiting identification mark; the anti-counterfeiting identification mark is hidden by the denoising process realized by the lora model in conjunction with the attention-based Unet model, and a low-dimensional vector representation is obtained The restoration result , and With consistency, the variational self-decoder of the diffusion model can be based on A transaction identification vector is obtained, and the obtained transaction identification vector is consistent with the visible representation of the initial transaction identification vector.
[0040] To achieve the above purpose, it is necessary to increase the denoising process of the low-dimensional vector representation of the anti-counterfeiting identification mark and the transaction identification vector A low-dimensional vector representation of The inverse denoising process trains the learnable lora model. Figure 2 and Figure 5 As shown, during the training, the diffusion model and the lora model participate in the following process: the lora model cooperates with the attention-based Unet model to iteratively denoise the low-dimensional vector representation of the added anti-counterfeiting identification mark, and successively obtains the denoised intermediate state of the low-dimensional vector representation of the added anti-counterfeiting identification mark … And the restoration results during training , where the variational self-decoder of the diffusion model can be based on the restoration results during training Get the transaction identification vector during training ; Get the transaction identification vector during training After that, the transaction identification vector The transaction identification vector in the training process is obtained through the variational autoencoder processing of the diffusion model A low-dimensional vector representation of ; The lora model is combined with the attention-based Unet model to represent low-dimensional vectors Iteratively perform inverse denoising and obtain … , and the low-dimensional vector representation of the anti-counterfeiting identification mark added during the training process .
[0041] During training, the parameters of the attention-based Unet model remain unchanged, and only the parameters of the LoRa model are adjusted. The loss function of the constrained sampling training process is the restoration result of the denoising process implemented by the LoRa model in conjunction with the attention-based Unet model. and low-dimensional vector representation The distance between them, the variational self-decoder is based on the restoration result Generated transaction identification vector and the initial transaction identification vector The lora model cooperates with the attention-based Unet model to identify the transaction vector A low-dimensional vector representation of The low-dimensional vector representation obtained by the inverse denoising process The KL divergence between the distribution of and the distribution of the low-dimensional vector representation of the added anti-counterfeiting identification mark is summed. The parameters of the lora model are adjusted with the goal of minimizing the loss function. Through the above training process, the lora model cooperates with the attention-based Unet model to achieve hiding the anti-counterfeiting identification mark during the denoising process. This hiding can be used as the "decoding key" of the lora model and the attention-based Unet model in the inverse denoising process. In the process of hiding the anti-counterfeiting identification mark, the loss function constrains the restoration result. and low-dimensional vector representation The distance between them constrains the variational self-decoder based on the restoration result Generated transaction identification vector and the initial transaction identification vector The distance between them ensures that the generated transaction identification vector Basic and Initial Transaction Identification Vectors Consistent.
[0042] In the specific training process, after the transaction identification vector is generated, an interference operation is performed on the transaction identification vector, and then the recognizability of the anti-counterfeiting identification mark is verified to verify the identification effect of the transaction identification vector generated in this application after being interfered. The interference operation adopts any one or a combination of the following operations: Compression interference, Gaussian noise interference, Gaussian blur interference, scaling interference, partial cropping interference, rotation interference, adding a constant interference to each element of the transaction identification vector, and multiplying each element of the transaction identification vector by a constant coefficient interference. Through verification, it is ensured that the parameters of the LoRa model are robust to the transaction identification vector after interference.
[0043] After the transaction identification vector is generated, it will be delivered to the buyer together with the product during the transaction. In the specific implementation process, after the buyer obtains the product, he will provide the corresponding transaction identification vector to the product party. The product party will use the diffusion model and lora model in hand to extract the anti-counterfeiting identification mark to achieve identification.
[0044] During the identification process, the product side uses the variational autoencoder of the diffusion model to process the transaction identification vector Get its low-dimensional vector representation Then, the private lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, and performs a two-dimensional Fourier transform on the low-dimensional vector representation of the added anti-counterfeiting identification mark to obtain the frequency domain result, and extracts the anti-counterfeiting identification mark from the frequency domain result. The similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark is compared to see whether it exceeds the set threshold, so as to realize anti-counterfeiting identification.
[0045] An example of similarity is as follows: ; in, are the mean values of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. are the variances of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. In order to extract the anti-counterfeiting identification mark and construct the covariance of the anti-counterfeiting identification mark, is a constant that stabilizes the similarity.
[0046] Of course, it also supports directly comparing the similarity between the extracted anti-counterfeiting identification mark and the encoding for constructing the anti-counterfeiting identification mark, thus eliminating the decoding process of the anti-counterfeiting identification mark.
[0047] Example 2 See also Figure 6 As shown, the present invention provides a transaction anti-counterfeiting identification device based on deep learning, including: a sending end and a receiving end, wherein the sending end and the receiving end both include a processing unit, a storage unit and a communication unit interconnected via a bus, and the communication units of the sending end and the receiving end are connected, wherein the storage unit stores a computer program, and when the processing unit reads and executes the computer program, the transaction anti-counterfeiting identification method based on deep learning is implemented.
[0048] In the specific implementation process, the sending end is controlled by the buyer. The buyer sends the transaction identification vector of the product to the receiving end through the sending end. The receiving end is controlled by the product party. After receiving the transaction identification vector, the product party uses the variational autoencoder of the diffusion model to process the transaction identification vector. Get its low-dimensional vector representation Then, the private lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, and performs a two-dimensional Fourier transform on the low-dimensional vector representation of the added anti-counterfeiting identification mark to obtain the frequency domain result, extract the anti-counterfeiting identification mark from the frequency domain result, and compare whether the similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark exceeds the set threshold.
[0049] Of course, the computer program stored in the storage unit of a deep learning-based transaction anti-counterfeiting identification device provided in an embodiment of the present invention is not limited to the method operations described above, but can also execute related operations in a deep learning-based transaction anti-counterfeiting identification method provided in any embodiment of the present invention.
[0050] Example 3 An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the transaction anti-counterfeiting identification method based on deep learning is implemented, including: Processing the initial transaction identification vector through a variational autoencoder of a pre-trained diffusion model , and obtain the low-dimensional vector representation of the initial transaction identification vector ; The low-dimensional vector representation is performed by the attention-based Unet model of the diffusion model according to the inverse denoising process. Processing is performed to obtain a low-dimensional vector representation that obeys the Gaussian distribution ; Among them, the low-dimensional vector represents The Nth step inverse denoising is achieved by the attention-based Unet model; Adding anti-counterfeiting identification marks to low-dimensional vector representation In the low frequency region of the frequency domain; The attention-based Unet model is configured with a learnable lora model. The trained lora model cooperates with the attention-based Unet model to perform a denoising process on the low-dimensional vector representation with the anti-counterfeiting identification mark added, so as to hide the anti-counterfeiting identification mark through the denoising process realized by the lora model in cooperation with the attention-based Unet model, and obtain a low-dimensional vector representation. The restoration result , the variational self-decoder of the diffusion model can be based on Get the transaction identification vector ; During the identification process, the variational autoencoder of the diffusion model processes the transaction identification vector Then, the lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, extract the anti-counterfeiting identification mark from it, and compare whether the similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark exceeds the set threshold to achieve anti-counterfeiting identification.
[0051] Of course, the computer-readable storage medium provided by an embodiment of the present invention stores a computer program that is not limited to the method operations described above, but can also execute related operations in a deep learning-based transaction anti-counterfeiting identification method provided by any embodiment of the present invention.
[0052] In the embodiments provided by the present invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, structures or units, which can be electrical, mechanical or other forms.
[0053] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0054] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0055] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A transaction anti-counterfeiting identification method based on deep learning, characterized in that: include: Processing the initial transaction identification vector through a variational autoencoder of a pre-trained diffusion model , and obtain the low-dimensional vector representation of the initial transaction identification vector ; The low-dimensional vector representation is performed by the attention-based Unet model of the diffusion model according to the inverse denoising process. Processing is performed to obtain a low-dimensional vector representation that obeys the Gaussian distribution ; Among them, the low-dimensional vector represents The Nth step inverse denoising is achieved by the attention-based Unet model; Adding anti-counterfeiting identification marks to low-dimensional vector representation In the low frequency region of the frequency domain; The attention-based Unet model is configured with a learnable lora model. The trained lora model cooperates with the attention-based Unet model to perform a denoising process on the low-dimensional vector representation with the anti-counterfeiting identification mark added, so as to hide the anti-counterfeiting identification mark through the denoising process realized by the lora model in cooperation with the attention-based Unet model, and obtain a low-dimensional vector representation. The restoration result , the variational self-decoder of the diffusion model can be based on Get the transaction identification vector ; During the identification process, the variational autoencoder of the diffusion model processes the transaction identification vector Then, the lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, extract the anti-counterfeiting identification mark from it, and compare whether the similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark exceeds the set threshold to achieve anti-counterfeiting identification.
2. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: The diffusion model includes: a variational autoencoder, an attention-based Unet model and a variational self-decoder; wherein the attention-based Unet model includes: an input encoding unit consisting of a residual module, a multi-head self-attention module and a downsampling module, a cascade of multiple levels of input encoding units, a last-level input encoding unit connected to an intermediate encoding unit, an intermediate encoding unit consisting of a residual module, a multi-head self-attention module and a residual module, a cascade of multiple levels of intermediate encoding units, a last-level intermediate encoding unit connected to an output decoding unit, an output decoding unit consisting of a residual module, a multi-head self-attention module and an upsampling module, an output decoding unit receiving a concatenation of the output of an input decoding unit at the same level and the output of an output decoding unit or an intermediate encoding unit at the previous level for decoding, and a last-level output decoding unit connected to an output layer.
3. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: In the inverse denoising process implemented by the attention-based Unet model, the attention-based Unet model predicts Gaussian noise based on the low-dimensional vector representation of the nth time step in the denoising process and the nth time step. The predicted Gaussian noise is added to the low-dimensional vector representation obtained by the inverse denoising process at the n-1th time step. The inverse denoising process implemented by the attention-based Unet model gradually converts the low-dimensional vector representation into Diffusion into a low-dimensional vector representation that follows a Gaussian distribution .
4. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: The anti-counterfeiting identification mark is added to the low-dimensional vector representation The frequency domain includes: Representation of low-dimensional vectors Perform a two-dimensional Fourier transform and move the low-frequency component to the center of the frequency domain through the fftshift operation; Construct anti-counterfeiting identification marks and refer to low-dimensional vector representation The anti-counterfeiting identification mark is encoded using the frequency domain specification, and the encoded anti-counterfeiting identification mark is added to the low-dimensional vector representation. The low frequency part in the frequency domain; The frequency domain result of adding the anti-counterfeiting identification mark is converted into the spatial domain through two-dimensional inverse Fourier transform to obtain a low-dimensional vector representation of the added anti-counterfeiting identification mark.
5. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: The convolutional layer and output layer in the residual module of the attention-based UNet model are configured with LoRa parameters to form a LoRa model.
6. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: The denoising process of the low-dimensional vector representation of the added anti-counterfeiting identification mark and the transaction identification vector A low-dimensional vector representation of The inverse denoising process is used to train the learnable lora model. During the training, the diffusion model and the lora model participate in the following process: the lora model cooperates with the attention-based Unet model to iteratively denoise the low-dimensional vector representation of the added anti-counterfeiting identification mark, and obtains the denoised intermediate state of the low-dimensional vector representation of the added anti-counterfeiting identification mark in turn. … And the restoration results during training , where the variational self-decoder of the diffusion model can be based on the restoration results during training Get the transaction identification vector during the training process; Get the transaction identification vector during the training process After that, the transaction identification vector The transaction identification vector is obtained through variational autoencoder processing A low-dimensional vector representation of , lora model cooperates with attention-based Unet model to represent low-dimensional vectors Iteratively perform inverse denoising and obtain … , .
7. The transaction anti-counterfeiting identification method based on deep learning according to claim 6 is characterized in that: In the process of training the learnable lora model, the parameters of the attention-based Unet model remain unchanged, and only the parameters of the lora model are adjusted. The loss function of the constrained sampling training process is: The restoration result of the denoising process achieved by the LoRa model in conjunction with the attention-based UNet model and low-dimensional vector representation The distance between them, the variational self-decoder is based on the restoration result Generated transaction identification vector and the initial transaction identification vector The lora model cooperates with the attention-based Unet model to identify the transaction vector A low-dimensional vector representation of The low-dimensional vector representation obtained by the inverse denoising process The KL divergence sum is calculated between the distribution of and the distribution of the low-dimensional vector representation of the anti-counterfeiting identification mark.
8. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: After the transaction identification vector is generated during the training process, an interference operation is performed on the transaction identification vector, and then the recognizability of the anti-counterfeiting identification mark is verified, wherein the interference operation adopts any one or a combination of the following operations: compression interference, adding Gaussian noise interference, Gaussian blur interference, scaling interference, partial cropping interference, rotation interference, adding a constant interference to each element of the transaction identification vector, and multiplying each element of the transaction identification vector by a constant coefficient interference.
9. The transaction anti-counterfeiting identification method based on deep learning according to claim 1 is characterized in that: During the identification process, the product side uses the variational autoencoder of the diffusion model to process the transaction identification vector Get its low-dimensional vector representation Then, the private lora model cooperates with the attention-based Unet model to restore the low-dimensional vector representation of the added anti-counterfeiting identification mark through the inverse denoising process, and performs a two-dimensional Fourier transform on the low-dimensional vector representation of the added anti-counterfeiting identification mark to obtain the frequency domain result, and extracts the anti-counterfeiting identification mark from the frequency domain result. The similarity between the extracted anti-counterfeiting identification mark and the constructed anti-counterfeiting identification mark is compared to see whether it exceeds the set threshold, so as to realize anti-counterfeiting identification.
10. The transaction anti-counterfeiting identification method based on deep learning according to claim 1, characterized in that: The similarity between extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks is as follows: ; in, are the mean values of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. are the variances of extracting anti-counterfeiting identification marks and constructing anti-counterfeiting identification marks, respectively. In order to extract the anti-counterfeiting identification mark and construct the covariance of the anti-counterfeiting identification mark, is a constant that stabilizes the similarity.
Citation Information
Patent Citations
Identifiable security natural steganography method and device based on reversible image processing network
CN115643348A
Generative steganography method for anti-counterfeiting of electronic certificate
CN117376484A
Trademark identification method and system based on anti-counterfeiting codes
CN119129620A
Federated large codeword model deep learning architecture with homomorphic compression and encryption
US20250047296A1