Method, device and equipment for preventing fraud based on printed label, storage medium

By predicting the texture changes of concrete samples using a diffusion model based on printed labels, and using the morphology of glutinous rice paper after it absorbs water for anti-tampering identification, the problem of decreased identification reliability during the solidification process of concrete samples is solved, and accurate identification is achieved at any time.

CN121684964BActive Publication Date: 2026-06-09ZHUHAI XINHUATONG SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI XINHUATONG SOFTWARE CO LTD
Filing Date
2026-02-09
Publication Date
2026-06-09

Smart Images

  • Figure CN121684964B_ABST
    Figure CN121684964B_ABST
Patent Text Reader

Abstract

The application provides a printed label-based fraud identification method, device and equipment and a storage medium. The method comprises the following steps: acquiring a first image and a second image of a concrete sample surface, and determining a first time point at which the first image is acquired; determining a target region corresponding to a label window in the second image, and determining a target image in the first image based on the target region; inputting the target image and the first time point into a trained diffusion model to predict a plurality of prediction images corresponding to a plurality of prediction time points; and when a third image is acquired at a second time point, determining a fraud identification result based on a reference image and the third image, wherein the reference image is a prediction image corresponding to the second time point. The diffusion model can be used to predict the texture of the glutinous rice paper fitting region, and a plurality of prediction images at different time points can be obtained. The fraud identification can be performed at any time by using the shape of the glutinous rice paper after water absorption, the reliability is improved, and the operating system is optimized by using artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for identifying counterfeit goods based on printed labels. Background Technology

[0002] Concrete needs to be used immediately after it is transported to the construction site, but it usually takes several days for it to solidify. The industry typically uses sampling boxes to take samples of the concrete and send them to relevant testing institutions. After the samples solidify, relevant tests are conducted to determine whether the concrete meets the building requirements.

[0003] In related technologies, various markings are typically placed on the surface of concrete samples, and a photograph is taken during sampling and testing. Image recognition is then used to determine whether the sample has been tampered with. However, as concrete samples gradually solidify during delivery, the surface particles, bubbles, and cracks change, resulting in subtle differences in surface features when photographed at different times. This affects the reliability of anti-tampering identification. Summary of the Invention

[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a method, apparatus, device, and storage medium for anti-tampering identification based on printed labels, which can utilize the water absorption characteristics of glutinous rice paper to predict identification information at different times, thereby improving the reliability of anti-tampering identification.

[0005] In a first aspect, embodiments of the present invention provide a method for preventing tampering based on printed labels, wherein the printed label has a label window with glutinous rice paper, and the method includes:

[0006] Acquire a first image and a second image of the concrete sample surface, and determine a first moment when the first image is acquired, wherein the first image is acquired before the printed label is inserted, and the second image is acquired after the printed label is inserted and the glutinous rice paper absorbs water and adheres to the concrete sample surface.

[0007] In the second image, determine the target region corresponding to the label window, and based on the target region, determine the target image in the first image;

[0008] The target image and the first time step are input into the trained diffusion model, and the prediction images corresponding to multiple prediction times are predicted based on the diffusion model. The diffusion model is used to predict the texture changes of the concrete sample during the solidification process.

[0009] When the third image is acquired at the second time, the anti-spoofing identification result is determined based on the reference image and the third image, wherein the reference image is the predicted image corresponding to the second time.

[0010] According to some embodiments of the present invention, predicting multiple predicted images corresponding to different prediction times based on the diffusion model includes:

[0011] Based on the ResNet-50 network, multi-scale texture analysis is performed on the target image through wavelet transform and gray-level co-occurrence matrix to obtain multiple quantized features. A texture feature map is constructed based on the multiple quantized features, wherein each quantized feature corresponds to a type of texture feature of the concrete sample.

[0012] Multiple preset time points are mapped to time-series vectors by sinusoidal position encoding, wherein each time-series vector is used to represent a predicted time.

[0013] Multiple predicted images are predicted based on the texture feature map and each of the temporal vectors.

[0014] According to some embodiments of the present invention, the diffusion model includes a U-Net, which includes n encoders, a bottleneck layer, and n decoders. The n encoders are connected sequentially, the nth encoder is connected to the input of the bottleneck layer, and the output of the encoder is connected to the first decoder. A skip connection is provided between the xth encoder and the yth decoder. n, x, and y are all positive integers, and the sum of x and y is n+1. Multiple predicted images are predicted based on the texture feature map and each temporal vector, including:

[0015] The encoder corresponding to each of the temporal vectors is determined based on the time sequence, wherein the encoder is used to output the predicted texture map and the decoder is used to output the predicted image;

[0016] The xth encoded input information and the xth temporal vector are input to the xth encoder to obtain the xth predicted texture map. The xth predicted texture map and the texture feature map are fused into a fused feature in the corresponding skip connection and then input to the yth decoder. The first encoded input information includes the texture feature map and the target image, and the non-first encoded input information is the predicted texture map obtained by the previous encoder.

[0017] The nth predicted texture map is input into the bottleneck layer, and the bottleneck features are obtained through attention extraction.

[0018] Based on the y-th decoder, the y-th predicted image is decoded based on the y-th decoding input information and the x-th fusion feature, and associated with the prediction time corresponding to the y-th temporal vector, wherein the decoding input information of the first decoder is the bottleneck feature, and the decoding input information of non-first decoders is the predicted image output by the previous decoder.

[0019] According to some embodiments of the present invention, inputting the xth encoded input information and the xth temporal vector into the xth encoder to obtain the xth predicted texture map includes:

[0020] Encoded input features are obtained based on the x-th encoded input information, wherein the first encoded input feature is obtained by convolution calculation based on the texture feature map and the target image, and the subsequent encoded input features are obtained by convolution calculation and downsampling based on the input predicted texture map;

[0021] The timing modulation features are obtained by projecting the x-th timing vector into a channel scaling factor and an offset and then performing an affine transformation.

[0022] The predicted texture map is obtained by smoothing the encoded input features based on the temporal modulation features.

[0023] According to some embodiments of the present invention, decoding the y-th predicted image based on the y-th decoded input information and the x-th fused feature includes:

[0024] The xth fused feature is lightly upsampled to obtain an upsampled image, wherein the resolution of the yth upsampled image is the same as the decoding resolution of the yth decoder;

[0025] Based on the upsampled image and the decoded input information, the prediction noise corresponding to the y-th temporal vector is predicted, and the denoising mean is determined based on the prediction noise;

[0026] The predicted image is obtained by denoising and sampling the decoded input information based on the denoised mean.

[0027] According to some embodiments of the present invention, after predicting the predicted images corresponding to multiple prediction times based on the diffusion model, the method further includes:

[0028] Determine the current third moment in real time;

[0029] When the third time point is any of the predicted time points, the corresponding predicted image is determined as the reference image;

[0030] When the third time point is located between two adjacent prediction times, the first similarity of the prediction images corresponding to the two adjacent prediction times is determined.

[0031] When the first similarity is greater than or equal to a preset first threshold, the predicted image corresponding to the earlier prediction time is determined as the reference image corresponding to the third time.

[0032] Alternatively, when the first similarity is less than the first threshold, the predicted image corresponding to the later prediction time is determined as the reference image corresponding to the third time.

[0033] According to some embodiments of the present invention, the surface of the glutinous rice paper is provided with an identification code, and the determination of the anti-tampering identification result based on the reference image and the third image includes:

[0034] Based on the identification area corresponding to the identification code in the target area, a first identification image is extracted from the reference image, and a second identification image is extracted from the third image;

[0035] Based on the first and second identifier images, an image comparison is performed to obtain a second similarity, and a third similarity is determined between the reference image and the third image;

[0036] When both the second similarity and the third similarity are greater than a preset second threshold, the anti-tampering identification result is determined to be successful.

[0037] Secondly, embodiments of the present invention provide an anti-tampering identification device based on printed labels, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the anti-tampering identification method based on printed labels as described in the first aspect above.

[0038] Thirdly, embodiments of the present invention provide an electronic device including a label-based anti-tampering identification device as described in the second aspect above.

[0039] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the anti-tampering identification method based on printed labels as described in the first aspect above.

[0040] The anti-tampering identification method based on printed labels according to embodiments of the present invention has at least the following beneficial effects: acquiring a first image and a second image of the surface of a concrete sample; determining a first time when the first image is acquired, wherein the first image is acquired before the printed label is placed, and the second image is acquired after the printed label is placed and the glutinous rice paper absorbs water and adheres to the surface of the concrete sample; determining a target area corresponding to the label window in the second image, and determining a target image in the first image based on the target area; inputting the target image and the first time into a trained diffusion model, and predicting multiple prediction images corresponding to each prediction time based on the diffusion model, wherein the diffusion model is used to predict the texture changes of the concrete sample during the solidification process; when a third image is acquired at a second time, determining the anti-tampering identification result based on a reference image and the third image, wherein the reference image is the prediction image corresponding to the second time. According to the technical solution of the embodiments of the present invention, a diffusion model can be used to predict the texture of the glutinous rice paper adhesion area to obtain multiple prediction images at different times, enabling anti-tampering identification at any time using the morphology of the glutinous rice paper after absorbing water, thus improving reliability. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of a printed label provided in one embodiment of the present invention;

[0042] Figure 2 This is a flowchart of another embodiment of the anti-tampering identification method based on printed labels provided by the present invention;

[0043] Figure 3 This is a structural diagram of a printing label-based anti-tampering identification device provided in another embodiment of the present invention. Detailed Implementation

[0044] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having 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 limiting the present invention.

[0045] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0046] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0047] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0048] This invention provides a method, apparatus, device, and storage medium for anti-tampering identification based on printed labels. The method includes: acquiring a first image and a second image of a concrete sample surface; determining a first moment when the first image is acquired, wherein the first image is acquired before the printed label is placed, and the second image is acquired after the printed label is placed and the rice paper absorbs water and adheres to the concrete sample surface; determining a target area corresponding to the label window in the second image; determining a target image in the first image based on the target area; inputting the target image and the first moment into a trained diffusion model; predicting multiple prediction images corresponding to different prediction moments based on the diffusion model, wherein the diffusion model is used to predict the texture changes of the concrete sample during the solidification process; and determining the anti-tampering identification result based on a reference image and the third image when a third image is acquired at a second moment, wherein the reference image is the prediction image corresponding to the second moment. According to the technical solution of this invention, a diffusion model can be used to predict the texture of the rice paper adhesion area, obtaining multiple prediction images at different moments. Anti-tampering identification can be performed at any moment using the morphology of the rice paper after absorbing water, improving reliability.

[0049] First, refer to Figure 1 , Figure 1 This is a schematic diagram of a printed label provided in an embodiment of the present invention. The main body of the printed label 20 in this embodiment has a label window 21, as shown below. Figure 1As shown above, the bottom side of the printed label 20 is provided with an insertion part 23, which facilitates the insertion and fixation of the printed label 20 into the concrete sample 10. The label window 21 of the printed label 20 is provided with rice paper 22, and an identification code is printed on the upper surface of the rice paper 22, with a waterproof membrane to prevent moisture from the outside of the concrete sample 10 from affecting the shape of the rice paper. After the printed label 20 is inserted into the concrete sample 10, the lower surface of the rice paper 22 contacts the surface of the concrete sample. Because the surface of the concrete sample 10 has a certain amount of moisture, the rice paper 22 adheres to the surface of the concrete sample 10.

[0050] The following is based on the appendix Figure 1 The printed label shown further illustrates the technical solution of the embodiment of the present invention.

[0051] Reference Figure 2 , Figure 2 The flowchart illustrates a method for identifying counterfeit goods based on printed labels, as provided in this embodiment of the invention. This method includes, but is not limited to, the following steps:

[0052] S10, acquire a first image and a second image of the concrete sample surface, and determine the first moment of acquiring the first image, wherein the first image is acquired before the printed label is inserted, and the second image is acquired after the printed label is inserted and the glutinous rice paper absorbs water and adheres to the concrete sample surface.

[0053] It should be noted that the first image is taken after the concrete sample is collected, and the moment the first image is captured is automatically recorded. The placement position of the printed label is randomly generated in the display frame of the capturing terminal, thus obtaining a randomly placed printed label. Introducing random placement improves the reliability of anti-tampering identification. The second image is taken after the printed label is placed. Since the capture time of the second image and the first image is not too far apart, the surface of the concrete sample can be considered identical.

[0054] S20, determine the target region corresponding to the label window in the second image, and determine the target image in the first image based on the target region.

[0055] It should be noted that in this embodiment, the area corresponding to the label window is defined as the target area. Although the placement of the printed label will cause changes in the surface morphology of the concrete sample, the target area in this embodiment is the area corresponding to the label window. The target area does not have any part in contact with the concrete sample, so that the texture of the target area can be largely preserved to be consistent with the first image. Therefore, the target image can be extracted from the first image based on the target area, and the target image is used as the initial input for prediction.

[0056] It should be noted that because glutinous rice paper is easily deformed after absorbing water, it can form a relatively significant morphological change when there are subtle texture changes on the surface of the concrete sample. For example, when a fine crack forms on the surface of the concrete sample, the corresponding part of the glutinous rice paper will tear, which can serve as a significant feature for image comparison. Furthermore, the glutinous rice paper has already obscured the target area of ​​the concrete sample, making it impossible to restore the texture of the target area when forging the concrete sample. Using glutinous rice paper for image comparison can effectively improve the reliability of anti-spoofing.

[0057] S30: Input the target image and the first time step into the trained diffusion model, and predict the prediction images corresponding to multiple prediction times based on the diffusion model. The diffusion model is used to predict the texture changes of the concrete sample during the solidification process.

[0058] It should be noted that the diffusion model can predict the texture changes of the concrete sample surface during the solidification process. The diffusion model in this embodiment adopts a texture-driven time-conditioned diffusion network (TTD-Diffusion). TTD-Diffusion is a technique for generating and controlling images. It can generate image textures according to time conditions while maintaining the coherence of image content. In this embodiment, the time conditions are multiple prediction times, and the generated image texture is the predicted image, thereby realizing the image prediction of the target area in the future.

[0059] It should be noted that the target image is used as the input image for the diffusion model, and the granularity of the prediction time can be set according to actual needs. Since the concrete solidification process is relatively slow, the prediction time can be determined based on multiple time points where the concrete solidification changes significantly. For example, taking the first time point as the starting time, multiple prediction times can be set as 1 hour, 6 hours, 12 hours and 24 hours after the first time point. The specific number and value of prediction times can be set according to actual needs.

[0060] S40, when the third image is acquired at the second time, the anti-spoofing identification result is determined based on the reference image and the third image, wherein the reference image is the predicted image corresponding to the second time.

[0061] It should be noted that each prediction time and prediction image in this embodiment are uniquely associated. The reference image is replaced every time a prediction time is reached. The last prediction time corresponds to the moment when the concrete sample is completely solidified. Its surface texture will not change due to the solidification process. Therefore, when the last prediction time is reached, the last prediction image is retained as the reference image. Thus, when the third image is obtained at any second time, it can be ensured that the reference image is consistent with the texture of the current concrete sample.

[0062] It should be noted that since the target area is known, the anti-spoofing identification result can be determined simply by cropping the corresponding image from the third image based on the target area and comparing it with the reference image. Of course, the predicted image in this embodiment is based on prediction, thus allowing for some error in image comparison. Through the technical solution of this embodiment, anti-spoofing identification can be performed at any time based on the predicted image from the diffusion model, effectively improving the reliability of anti-spoofing identification.

[0063] In another embodiment, in step S30, the predicted images corresponding to multiple prediction times are predicted based on the diffusion model, which specifically includes, but is not limited to, the following steps:

[0064] S31, based on the ResNet-50 network, performs multi-scale texture analysis on the target image through wavelet transform and gray-level co-occurrence matrix to obtain multiple quantized features, and constructs a texture feature map based on the multiple quantized features, where each quantized feature corresponds to a type of texture feature of the concrete sample;

[0065] S32 maps multiple preset time points into time vectors through sinusoidal position coding, where each time vector is used to represent a prediction time.

[0066] S33 predicts multiple images based on texture feature maps and various temporal vectors.

[0067] It should be noted that the diffusion model in this embodiment incorporates a ResNet-50 network. Multi-scale texture analysis is performed using wavelet transform and gray-level co-occurrence matrix (GLCM) to extract quantized features of deep textures. Each type of texture feature is treated as a quantized feature, such as roughness, contrast, or local entropy. ResNet-50 network, wavelet transform, and GLCM are technologies well-known to those skilled in the art. In this embodiment, they are used to extract quantized features from a target image at a specific location and to stitch these features together to form a texture feature map. Since the rice paper is close to the surface of the concrete sample, the texture skeleton of the concrete sample surface can be displayed on the rice paper surface. The ResNet-50 network can accurately capture the texture skeleton of the concrete surface in the target image, ignoring irrelevant background (such as dust and bubbles), providing a feature basis for subsequent accurate prediction of concrete texture.

[0068] It should be noted that this embodiment aims to obtain prediction images for multiple prediction times. The prediction time is determined by a preset time point, which is the duration of time elapsed relative to the first time point, such as 1 hour and 6 hours in the example above. In this embodiment, each preset time point is encoded into a learnable temporal vector. For example, the preset time point is mapped to a 64-dimensional vector through sinusoidal position encoding, so that the diffusion model can learn the influence of different time points on the glutinous rice paper. For example, the diffusion model learns that the glutinous rice paper after 1 hour and the glutinous rice paper after 12 hours should belong to different texture states, thus avoiding prediction jumps.

[0069] In another embodiment, the diffusion model includes a U-Net, which includes n encoders, a bottleneck layer, and n decoders. The n encoders are connected sequentially, with the nth encoder connected to the input of the bottleneck layer and the output of the encoder connected to the first decoder. A skip connection is provided between the xth encoder and the yth decoder. n, x, and y are all positive integers, and the sum of x and y is n+1. Step S33 specifically includes, but is not limited to, the following steps:

[0070] S331, determine the encoder corresponding to each temporal vector based on the time order, wherein the encoder is used to output the predicted texture map and the decoder is used to output the predicted image;

[0071] S332, the x-th encoded input information and the x-th temporal vector are input to the x-th encoder to obtain the x-th predicted texture map. The x-th predicted texture map and the texture feature map are fused into a fused feature in the corresponding skip connection and then input to the y-th decoder. The first encoded input information includes the texture feature map and the target image. The non-first encoded input information is the predicted texture map obtained by the previous encoder.

[0072] S333: Input the nth predicted texture map into the bottleneck layer and extract the bottleneck features through attention;

[0073] S334, based on the y-th decoder, decodes the y-th predicted image based on the y-th decoded input information and the x-th fusion feature, and associates it with the prediction time corresponding to the y-th temporal vector. Here, the decoded input information of the first decoder is the bottleneck feature, and the non-first decoded input information is the predicted image output by the previous decoder.

[0074] It should be noted that the U-Net structure is a common network structure. The number of encoders and decoders can be set according to actual needs. For ease of description, this embodiment takes n=4 as an example, that is, there are 4 layers of encoders and 4 layers of decoders. There is a skip connection between the x-th encoder and the y-th decoder. For example, if x=1, y=4, x+y=1+4=n+1, there is a skip connection between the 1st layer encoder and the 4th layer decoder, and a skip connection between the 2nd layer encoder and the 3rd layer decoder.

[0075] It should be noted that the input of the x-th encoder in this embodiment includes encoded input information and a temporal vector. In this embodiment, the number of preset time points can be determined according to the number of encoders. For example, if n=4, four preset time points are selected. The temporal vector, texture feature map, and target image corresponding to 1 hour (x=1) are used as the input of the first encoder (x=1). After the first encoder encodes the first predicted texture map, it is input to the second encoder (x=2). The input of the second encoder also includes the temporal vector corresponding to 6 hours (x=2), and so on.

[0076] It should be noted that, unlike the existing U-Net, this embodiment embeds not only the predicted texture map output from each encoder layer through skip connections, but also the texture feature map input to the prediction model. That is, the texture feature map is embedded into each skip connection for feature fusion. For example, when x=1, the first predicted texture map output from the first encoder is embedded into the texture feature map of the skip connection for feature fusion to obtain the decoding input information for the y-th (y=n+1-x=4+1-1=4) layer decoder, and so on. The diffusion model is used to predict the texture of the rice paper surface. By embedding the texture feature map of the corresponding region of concrete, it ensures that the predicted texture map input to the decoder matches the surface texture of the concrete sample, so that the predicted texture of the concrete also appears in the predicted texture of the rice paper.

[0077] It should be noted that the U-Net in this embodiment also includes a bottleneck layer, which is connected between the nth encoder and the first decoder. In this embodiment, ResBlock operation, Self-Attention operation and Cross-Attention operation are performed on the bottleneck layer. The bottleneck features are obtained through attention extraction and used as the decoding input information of the first decoder. This can improve the attention between the deepest semantic layer and the key texture region of concrete, establish global dependency, and thus more accurately notice the concrete texture features during decoding.

[0078] It should be noted that the decoder in this embodiment is used to perform backdiffusion to achieve image prediction. It decodes the predicted image by accepting the decoding input information as fusion features. In this embodiment, each decoder corresponds to a prediction time. Taking y=1 as an example, it corresponds to x=4. Therefore, the decoding input information of the first decoder is the bottleneck feature and the fourth fusion feature. In the case of x=4, it corresponds to the fourth time vector. Taking the 24th hour as an example, the first decoder determines the predicted image 24 hours later through the backdiffusion process. Taking y=2 as an example, it corresponds to x=3. The decoding input information of the second decoder is the predicted image output by the first decoder and the third fusion feature, thus obtaining the predicted image 12 hours later. Similarly, the third decoder obtains the predicted image 6 hours later, and the fourth decoder obtains the predicted image 1 hour later. This yields the predicted image corresponding to each prediction time.

[0079] It is worth noting that since the texture changes slowly during concrete curing, this embodiment uses U-Net for layer-by-layer decoding, which can ensure smooth and natural texture changes and improve prediction accuracy.

[0080] In another embodiment, step S332 specifically includes, but is not limited to, the following steps:

[0081] S3321, based on the x-th encoded input information, the encoded input features are obtained, wherein the first encoded input feature is obtained by convolution calculation based on the texture feature map and the target image, and the non-first encoded input features are obtained by convolution calculation and downsampling based on the input predicted texture map;

[0082] S3322, after projecting the x-th time vector into the channel scaling factor and offset, perform an affine transformation to obtain the time modulation feature;

[0083] S3323, based on temporal modulation features, performs smooth activation on the encoded input features to obtain the predicted texture map.

[0084] It should be noted that each encoder performs convolution calculations on the encoded input information to obtain encoded input features. For encoders other than the first one (x=2, 3, ..., n), the encoded input information is a predicted texture map. Therefore, further downsampling is required before performing convolution calculations. Furthermore, after each layer's convolution calculation, group normalization (GN) and SiLU activation are performed sequentially to obtain the predicted texture map.

[0085] It should be noted that, in this embodiment, before SiLU activation, the temporal vector is projected as a channel scaling factor and an offset, and then an affine transformation is performed to obtain temporal modulation features. These features are then used for SiLU activation to progressively extract multi-scale spatial semantics. Simultaneously, each encoder layer determines which time point's texture is being predicted. The formula for the affine transformation in this embodiment is as follows: ,in, This is the channel scaling factor. This is the preset offset. These are the features obtained after group normalization.

[0086] In another embodiment, step S334 specifically includes, but is not limited to, the following steps:

[0087] S3341, the x-th fused feature is lightly upsampled to obtain an upsampled image, wherein the resolution of the y-th upsampled image is the same as the decoding resolution of the y-th decoder;

[0088] S3342, based on the upsampled image and decoded input information, predict the prediction noise corresponding to the y-th time-series vector, and determine the denoising mean based on the prediction noise;

[0089] S3343, based on the denoised mean, performs denoising and sampling processing on the decoded input information to obtain the predicted image.

[0090] It should be noted that each decoder is input with a fusion feature. In this embodiment, the fusion feature is first lightly upsampled to obtain an upsampled image, so that the upsampled image and the corresponding decoder have the same decoding resolution, ensuring that the upsampled image and the decoding input information can be stitched together.

[0091] It should be noted that the decoding input information is either a bottleneck feature (y=1) or a predicted image (y>1). In this embodiment, the upsampled image with the same resolution, the decoding input information, and the temporal vector are input into the dynamic texture generator to obtain the prediction noise. The prediction noise is used to characterize the texture mask. Therefore, after determining the denoising mean based on the prediction noise, the decoding input information is denoised and sampled to achieve the back diffusion of the prediction image, thereby deriving the prediction images at different prediction times.

[0092] It should be noted that after encoding by a multi-layer encoder, the target image is transformed into a noisy image characterized by depth features. Therefore, the noise can be predicted, and then the noise can be appropriately denoised using the denoising mean. The resulting texture features are the predicted features of this embodiment, thereby realizing texture prediction at different times.

[0093] In another embodiment, after step S30 is performed, the following steps are included, but are not limited to:

[0094] S34, determine the current third moment in real time;

[0095] S35, when the third time point is any prediction time point, the corresponding prediction image is determined as the reference image;

[0096] S36, when the third time point is located between two adjacent prediction times, determine the first similarity of the prediction images corresponding to the two adjacent prediction times;

[0097] S37, when the first similarity is greater than or equal to the preset first threshold, the predicted image corresponding to the earlier prediction time is determined as the reference image corresponding to the third time.

[0098] S38, when the first similarity is less than the first threshold, the predicted image corresponding to the later prediction time is determined as the reference image corresponding to the third time.

[0099] It should be noted that after obtaining the second image, multiple predicted images can be obtained according to the above embodiment. At this time, the concrete sample is sent from the construction site to the inspection point. Before the inspection, this embodiment determines the current third moment in real time and uses the third moment to determine the reference image in real time, so that the reference image is updated over time. When the third image is obtained, the image comparison can be quickly performed based on the currently updated reference image.

[0100] It should be noted that when the third time reaches any prediction time, such as 1 hour or 6 hours after the first time, the corresponding prediction image can be directly determined as the reference image.

[0101] It should be noted that this embodiment can select the prediction time based on the setting characteristics of concrete. For example, in the example above, the morphology of concrete after 1 hour, 6 hours, 12 hours, and 24 hours of sampling shows significant changes compared to the previous time. When the third time falls between two prediction times, for example, the third time is the 4th hour, it falls between the 1st and 6th hour prediction times. In this scenario, this embodiment determines the first similarity between the two prediction images. If the first similarity is high, the difference between the two prediction images is not significant, and the earlier prediction image can be used as the reference image. If the first similarity is low, the later prediction image should be used as the reference image. The first threshold can be set according to actual needs.

[0102] In another embodiment, an identification code is provided on the surface of the glutinous rice paper, and step S40 specifically includes, but is not limited to, the following steps:

[0103] S41, based on the identification area corresponding to the identification code in the target area, extract the first identification image from the reference image and extract the second identification image from the third image;

[0104] S42, based on the first and second identifier images, perform image comparison to obtain the second similarity, and determine the third similarity between the reference image and the third image;

[0105] S43, when both the second similarity and the third similarity are greater than the preset second threshold, the anti-spoofing identification result is determined to be successful.

[0106] It should be noted that in this embodiment, an identification code is set on the surface of the glutinous rice paper. During verification, the area corresponding to the identification code is determined as the identification area. The first identification image and the second identification image are extracted from the reference image and the third image, respectively. Since the glutinous rice paper is easily damaged after absorbing water and adhering to the surface of the concrete sample, it will be damaged when cracks or other texture changes occur. In this embodiment, the first identification image can characterize the predicted degree of damage of the identification code through texture prediction, and the second identification image represents the actual degree of damage of the identification code. Since the identification code has a higher recognition accuracy than the blank area, this embodiment simultaneously determines the second similarity and the third similarity. If the second similarity is low, there is a risk of identification code forgery. If the third similarity is low, there is a risk that the target area has been forged. Only when both the second similarity and the third similarity are greater than the second threshold is the recognition result determined as successful, ensuring the accuracy of anti-tampering identification.

[0107] like Figure 3 As shown, Figure 3 This is a structural diagram of an anti-tampering identification device based on printed labels provided in one embodiment of the present invention. The present invention also provides an anti-tampering identification device based on printed labels, comprising:

[0108] The processor 401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0109] The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 to implement the anti-tampering identification method based on printed labels according to the embodiments of this application.

[0110] Input / output interface 403 is used to implement information input and output;

[0111] The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0112] Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404);

[0113] The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.

[0114] This application also provides an electronic device, including the anti-tampering identification device based on printed labels as described above.

[0115] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described anti-tampering identification method based on printed labels.

[0116] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0117] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0118] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for preventing tampering based on printed labels, characterized in that, The label window of the printed label is provided with glutinous rice paper, and the method includes: Acquire a first image and a second image of the concrete sample surface, and determine a first moment when the first image is acquired, wherein the first image is acquired before the printed label is inserted, and the second image is acquired after the printed label is inserted and the glutinous rice paper absorbs water and adheres to the concrete sample surface. In the second image, determine the target region corresponding to the label window, and based on the target region, determine the target image in the first image; The target image and the first time step are input into the trained diffusion model. Based on the diffusion model, prediction images corresponding to multiple prediction times are predicted. The diffusion model is used to predict the texture changes of concrete samples during the solidification process. The diffusion model includes a U-Net, which includes n encoders, a bottleneck layer, and n decoders. The n encoders are connected sequentially. The nth encoder is connected to the input of the bottleneck layer, and the output of the encoder is connected to the first decoder. A skip connection is set between the xth encoder and the yth decoder. n, x, and y are all positive integers, and the sum of x and y is n+1. When the third image is acquired at the second time, the anti-spoofing identification result is determined based on the reference image and the third image, wherein the reference image is the predicted image corresponding to the second time. The method involves predicting multiple predicted images at different prediction times based on the diffusion model, including: Based on the ResNet-50 network, multi-scale texture analysis is performed on the target image through wavelet transform and gray-level co-occurrence matrix to obtain multiple quantized features. A texture feature map is constructed based on the multiple quantized features, wherein each quantized feature corresponds to a type of texture feature of the concrete sample. Multiple preset time points are mapped to time-series vectors by sinusoidal position encoding, wherein each time-series vector is used to represent a predicted time. Multiple predicted images are predicted based on the texture feature map and each of the temporal vectors; The prediction of multiple predicted images is based on the texture feature map and each of the temporal vectors, including: The encoder corresponding to each of the temporal vectors is determined based on the time sequence, wherein the encoder is used to output the predicted texture map and the decoder is used to output the predicted image; The xth encoded input information and the xth temporal vector are input to the xth encoder to obtain the xth predicted texture map. The xth predicted texture map and the texture feature map are fused into a fused feature in the corresponding skip connection and then input to the yth decoder. The first encoded input information includes the texture feature map and the target image, and the non-first encoded input information is the predicted texture map obtained by the previous encoder. The nth predicted texture map is input into the bottleneck layer, and the bottleneck features are obtained through attention extraction. Based on the y-th decoder, the y-th predicted image is decoded based on the y-th decoding input information and the x-th fusion feature, and associated with the prediction time corresponding to the y-th temporal vector, wherein the decoding input information of the first decoder is the bottleneck feature, and the decoding input information of non-first decoders is the predicted image output by the previous decoder.

2. The anti-tampering identification method based on printed labels according to claim 1, characterized in that, The x-th encoded input information and the x-th temporal vector are input into the x-th encoder to obtain the x-th predicted texture map, including: Encoded input features are obtained based on the x-th encoded input information, wherein the first encoded input feature is obtained by convolution calculation based on the texture feature map and the target image, and the subsequent encoded input features are obtained by convolution calculation and downsampling based on the input predicted texture map; The timing modulation features are obtained by projecting the x-th timing vector into a channel scaling factor and an offset and then performing an affine transformation. The predicted texture map is obtained by smoothing the encoded input features based on the temporal modulation features.

3. The anti-tampering identification method based on printed labels according to claim 2, characterized in that, Decoding the y-th predicted image based on the y-th decoded input information and the x-th fused feature includes: The xth fused feature is lightly upsampled to obtain an upsampled image, wherein the resolution of the yth upsampled image is the same as the decoding resolution of the yth decoder; Based on the upsampled image and the decoded input information, the prediction noise corresponding to the y-th temporal vector is predicted, and the denoising mean is determined based on the prediction noise; The predicted image is obtained by denoising and sampling the decoded input information based on the denoised mean.

4. The anti-tampering identification method based on printed labels according to claim 1, characterized in that, After predicting the predicted images corresponding to multiple prediction times based on the diffusion model, the method further includes: Determine the current third moment in real time; When the third time point is any of the predicted time points, the corresponding predicted image is determined as the reference image; When the third time point is located between two adjacent prediction times, the first similarity of the prediction images corresponding to the two adjacent prediction times is determined. When the first similarity is greater than or equal to a preset first threshold, the predicted image corresponding to the earlier prediction time is determined as the reference image corresponding to the third time. Alternatively, when the first similarity is less than the first threshold, the predicted image corresponding to the later prediction time is determined as the reference image corresponding to the third time.

5. The anti-tampering identification method based on printed labels according to claim 1, characterized in that, The glutinous rice paper surface is provided with an identification code. Based on the reference image and the third image, the anti-tampering identification result is determined, including: Based on the identification area corresponding to the identification code in the target area, a first identification image is extracted from the reference image, and a second identification image is extracted from the third image; Based on the first and second identifier images, an image comparison is performed to obtain a second similarity, and a third similarity is determined between the reference image and the third image; When both the second similarity and the third similarity are greater than a preset second threshold, the anti-tampering identification result is determined to be successful.

6. A device for identifying tampering based on printed labels, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; The memory stores instructions that can be executed by the at least one control processor to enable the at least one control processor to perform the anti-tampering identification method based on printed labels as described in any one of claims 1 to 5.

7. An electronic device, characterized in that, Includes the anti-tampering identification device based on printed labels as described in claim 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the anti-tampering identification method based on printed labels as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • AI-based image recognition concrete test piece anti-counterfeiting method

    CN118570501A

  • Aerosol prediction method and system based on artificial intelligence

    CN119964669A