CN115983874B - Wine anti-counterfeiting tracing method and system thereof - Google Patents

Wine anti-counterfeiting tracing method and system thereof Download PDF

Info

Publication number
CN115983874B
CN115983874B CN202310126237.3A CN202310126237A CN115983874B CN 115983874 B CN115983874 B CN 115983874B CN 202310126237 A CN202310126237 A CN 202310126237A CN 115983874 B CN115983874 B CN 115983874B
Authority
CN
China
Prior art keywords
feature map
feature
classification
image
product
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310126237.3A
Other languages
Chinese (zh)
Other versions
CN115983874A (en
Inventor
刘东兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Show Round Fruit Mdt Infotech Ltd
Original Assignee
Jiangsu Show Round Fruit Mdt Infotech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Show Round Fruit Mdt Infotech Ltd filed Critical Jiangsu Show Round Fruit Mdt Infotech Ltd
Priority to CN202310126237.3A priority Critical patent/CN115983874B/en
Publication of CN115983874A publication Critical patent/CN115983874A/en
Application granted granted Critical
Publication of CN115983874B publication Critical patent/CN115983874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an anti-counterfeiting traceability method and a system thereof for wines, which are characterized in that a product evidence storage image of a wine product to be traced is obtained from a blockchain network structure, and a product detection image of the wine product to be traced, which is acquired by a camera, is acquired; and adopting an artificial intelligence technology based on deep learning, taking the difference between the product evidence-storing image and the product detection image in a high-dimensional feature space as the difference between the to-be-traced data and the real-time detection data, and determining whether the to-be-traced wine is a genuine product or not based on the differential expression. Therefore, the accuracy of the judging result of whether the wine to be traced is a genuine product or not can be improved, and the identification capability of masses on fake wine is improved.

Description

Wine anti-counterfeiting tracing method and system thereof
Technical Field
The application relates to the technical field of intelligent anti-counterfeiting traceability, and in particular relates to an anti-counterfeiting traceability method and system for wines.
Background
The wine market in China has a large number of phenomena of counterfeiting and fake wine. In order to improve the authentication capability of the masses on the fake wine, many wines on the market are made into anti-counterfeiting and tracing systems, for example, commodity information inquiry and anti-counterfeiting verification are carried out by utilizing technologies such as two-dimension codes, electronic tags, AR and the like.
However, these efforts do not avoid counterfeiting or imitation of wine, because counterfeiters upload false pictures and text to build false tracing processes, and the above operations of counterfeiters are technically difficult, and such counterfeiters are also indistinguishable to consumers.
Therefore, an optimized wine anti-counterfeiting traceability scheme is expected.
Disclosure of Invention
The present application has been made in order to solve the above technical problems. The embodiment of the application provides an anti-counterfeiting wine tracing method and a system thereof, which obtain a product evidence storage image of a wine product to be traced from a blockchain network structure and obtain a product detection image of the wine product to be traced, which is acquired by a camera; and adopting an artificial intelligence technology based on deep learning, taking the difference between the product evidence-storing image and the product detection image in a high-dimensional feature space as the difference between the to-be-traced data and the real-time detection data, and determining whether the to-be-traced wine is a genuine product or not based on the differential expression. Therefore, the accuracy of the judging result of whether the wine to be traced is a genuine product or not can be improved, and the identification capability of masses on fake wine is improved.
According to one aspect of the present application, there is provided an anti-counterfeiting traceability method for wine, comprising:
Obtaining a product evidence storage image of the wine product to be traced from the blockchain network structure;
acquiring a product detection image of the wine product to be traced acquired by a camera;
passing the product certification image and the product detection image through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, wherein the first image encoder and the second image encoder have the same network structure;
calculating a difference feature map between the evidence feature map and the detection feature map; and
and the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
In the wine anti-counterfeiting tracing method, the first image encoder and the second image encoder are convolutional neural network models using a spatial attention mechanism.
In the above wine anti-counterfeiting tracing method, the step of passing the product evidence image and the product detection image through a twin detection model including a first image encoder and a second image encoder to obtain an evidence feature map and a detection feature map includes: input data are respectively carried out in the forward transfer process of the layers by using each layer of the first image encoder: convolving the input data to generate a first convolved feature map; pooling the first convolution feature map to generate a first pooled feature map; non-linearly activating the first pooled feature map to generate a first activated feature map; calculating the mean value of each position of the first activation feature map along the channel dimension to generate a first spatial feature matrix; calculating a Softmax-like function value of each position in the first space feature matrix to obtain a first space score matrix; calculating the first space feature matrix and multiplying the first space score matrix according to the position points to obtain a first feature matrix; the first feature matrix output by the last layer of the first image encoder is the certification feature map.
In the above wine anti-counterfeiting tracing method, the step of passing the product evidence image and the product detection image through a twin detection model including a first image encoder and a second image encoder to obtain an evidence feature map and a detection feature map includes: input data are respectively carried out in the forward transfer process of the layers by using each layer of the second image encoder: convolving the input data to generate a second convolved feature map; pooling the second convolution feature map to generate a second pooled feature map; non-linearly activating the second pooled feature map to generate a second activated feature map; calculating the mean value of each position of the second activation feature map along the channel dimension to generate a second spatial feature matrix; calculating a Softmax-like function value of each position in the second spatial feature matrix to obtain a second spatial score matrix; calculating the second space feature matrix and multiplying the second space score matrix according to the position points to obtain a second feature matrix; wherein the second feature matrix output by the last layer of the second image encoder is the detection feature map.
In the above wine anti-counterfeiting tracing method, the calculating the difference feature map between the evidence-preserving feature map and the detection feature map includes: calculating a differential feature map between the prover feature map and the detection feature map using the following formula; wherein, the formula is:
Figure SMS_1
Wherein,,
Figure SMS_2
representing the differential feature map, ">
Figure SMS_3
Representing the evidence feature map, ++>
Figure SMS_4
Representing the detection feature map, ">
Figure SMS_5
Representing per-position subtraction.
In the above wine anti-counterfeiting tracing method, the step of passing the differential feature map through a classifier to obtain a classification result, where the classification result is used to indicate whether the wine to be traced is a genuine product, includes: performing feature map expansion on the differential feature map to obtain a classification feature vector; carrying out local structure fuzzy correction on the classification characteristic vector to obtain an optimized classification characteristic vector; and passing the optimized classification feature vector through a classifier to obtain the classification result.
In the above wine anti-counterfeiting tracing method, the performing feature map expansion on the differential feature map to obtain a classification feature vector includes: and expanding the differential feature map according to a row vector to obtain the classification feature vector.
In the above wine anti-counterfeiting tracing method, the performing local structure fuzzy correction on the classification feature vector to obtain an optimized classification feature vector includes: carrying out local structure fuzzy correction on the classification characteristic vector by the following formula to obtain an optimized classification characteristic vector; wherein, the formula is:
Figure SMS_6
Wherein,,
Figure SMS_8
representing the classification feature vector,/->
Figure SMS_10
Representing the optimized classification feature vector, +.>
Figure SMS_12
Transpose vector representing the classification feature vector, < >>
Figure SMS_9
Square of two norms representing the classification feature vector,/->
Figure SMS_11
Is an ordered vector in which the feature values of the classification feature vector are arranged in order of magnitude, and the classification feature vector +.>
Figure SMS_13
In the form of column vectors, +.>
Figure SMS_14
Representing vector dot product, < >>
Figure SMS_7
Representing a matrix multiplication.
In the above wine anti-counterfeiting tracing method, the step of passing the optimized classification feature vector through a classifier to obtain the classification result includes: performing full-connection coding on the optimized classification feature vector by using a plurality of full-connection layers of the classifier to obtain a coding classification feature vector; and passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
According to another aspect of the present application, there is provided an anti-counterfeiting traceability system for wine, comprising:
the evidence storage image acquisition module is used for acquiring a product evidence storage image of the wine product to be traced from the blockchain network structure;
the detection image acquisition module is used for acquiring a product detection image of the wine product to be traced acquired by the camera;
The image coding module is used for enabling the product certification image and the product detection image to pass through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification characteristic image and a detection characteristic image, and the first image encoder and the second image encoder have the same network structure;
the differential feature map calculation module is used for calculating a differential feature map between the evidence storage feature map and the detection feature map; and
the anti-counterfeiting tracing result generation module is used for enabling the differential feature map to pass through a classifier to obtain a classification result, and the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Compared with the prior art, the wine anti-counterfeiting tracing method and the system thereof obtain the product evidence storage image of the wine product to be traced from the blockchain network structure, and obtain the product detection image of the wine product to be traced, which is acquired by the camera; and adopting an artificial intelligence technology based on deep learning, taking the difference between the product evidence-storing image and the product detection image in a high-dimensional feature space as the difference between the to-be-traced data and the real-time detection data, and determining whether the to-be-traced wine is a genuine product or not based on the differential expression. Therefore, the accuracy of the judging result of whether the wine to be traced is a genuine product or not can be improved, and the identification capability of masses on fake wine is improved.
Drawings
The foregoing and other objects, features and advantages of the present application will become more apparent from the following more particular description of embodiments of the present application, as illustrated in the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the application and are incorporated in and constitute a part of this specification, illustrate the application and not constitute a limitation to the application. In the drawings, like reference numerals generally refer to like parts or steps.
Fig. 1 is a schematic view of a scenario of an anti-counterfeiting traceability method for alcoholic beverages according to an embodiment of the present application.
Fig. 2 is a flowchart of an anti-counterfeiting traceability method for wine according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an architecture of an anti-counterfeit traceability method for wine according to an embodiment of the present application.
Fig. 4 is a flowchart of the sub-steps of step S150 in the wine anti-counterfeiting tracing method according to the embodiment of the application.
Fig. 5 is a flowchart of the substep of step S230 in the wine anti-counterfeiting tracing method according to the embodiment of the application.
Fig. 6 is a block diagram of an anti-counterfeiting traceability system for wine according to an embodiment of the present application.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
Scene overview
Accordingly, in the technical scheme of the application, the non-tamper property and the authenticity of the data to be traced are determined by adopting a blockchain technology, meanwhile, the difference between the data to be traced and the real-time detection data is intelligently compared by combining an artificial intelligence technology based on deep learning and a neural network, and whether the object to be traced is genuine is determined based on the differential expression.
Specifically, in the technical scheme of the application, firstly, a product evidence storage image of the wine product to be traced is obtained from a blockchain network structure, and a product detection image of the wine product to be traced, which is acquired by a camera, is acquired. Here, the blockchain network structure may be a coalition chain to determine the non-tamper-resistance and authenticity of the product certification image through technology-specific of the blockchain network itself.
Then, the product certification image and the product detection image are passed through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, the first image encoder and the second image encoder having the same network structure. It should be understood that if the product certification image and the product detection image do not have any difference at the image source domain side, there should be a high degree of consistency and alignment between the certification feature map and the detection feature map extracted by the first image encoder and the second image encoder having the same network structure; conversely, if there is a difference between the two at the image source domain side, this difference will also be captured and retained by the first image encoder and the second image encoder. In a specific example of the present application, the first image encoder and the second image encoder are convolutional neural network models with spatial attention mechanisms. It should be understood that the convolutional neural network model can effectively extract the local features of the high-dimensional image through the convolutional kernel, and the combination of the spatial attention mechanism can enable the features of the spatial dimension to have higher discriminativity so as to improve the accuracy of classification judgment.
Further, in the technical scheme of the application, a difference feature map between the evidence feature map and the detection feature map is further calculated, so that the difference between the product evidence image and the product detection image in a high-dimensional feature space is represented. And then, the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Here, in the technical solution of the present application, the high-dimensional feature extraction is performed on the product certification image and the product detection image by the first image encoder and the second image encoder having the same network structure, respectively, and the difference between the product certification image and the product detection image in the high-dimensional feature space, that is, the substantial difference between the two is represented by a difference feature map between the two. However, in the process of feature extraction, noise (which is represented as outliers in the feature map) existing in the source domain in the product verification image and the product detection image may be synchronously amplified through the processing of the first image encoder and the second image encoder, so that local structural ambiguity may exist in the high-dimensional manifold of the differential feature map, thereby reducing the expression certainty of the differential feature map and affecting the accuracy of the classification result obtained by the classifier of the differential feature map.
Based on the above, the applicant of the present application expands the differential feature map to obtain a classification feature vector
Figure SMS_15
Ordered hilbert completion of vectors is performed, expressed as:
Figure SMS_16
Figure SMS_17
and->
Figure SMS_18
Classification feature vectors before and after correction, respectively, +.>
Figure SMS_19
Representing the square of the two norms of the classification feature vector, i.e. the inner product of the classification feature vector itself,/->
Figure SMS_20
Is an ordered vector in which feature values of the classification feature vectors are arranged in order of magnitude, and the classification feature vector +.>
Figure SMS_21
Is in the form of a column vector.
Here, by mapping the ordered vectors into the hilbert space defined by the self-inner product of the vectors, a meaningful measure of the numerical relation of the feature set in the consistency space can be realized, based on which, a feature space with an orthorhombic structure is built by embedding the relative positions of the feature vectors, and the structure in the feature space is completed for the high-dimensional manifold of the feature vectors based on vector query, so that the expression certainty of the feature vectors is prevented from being reduced due to the fuzzification structure, and the accuracy of the classification result of the differential feature map obtained by the classifier is improved.
Based on the above, the application provides an anti-counterfeiting traceability method for wines, which comprises the following steps: obtaining a product evidence storage image of the wine product to be traced from the blockchain network structure; acquiring a product detection image of the wine product to be traced acquired by a camera; passing the product certification image and the product detection image through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, wherein the first image encoder and the second image encoder have the same network structure; calculating a difference feature map between the evidence feature map and the detection feature map; and the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Fig. 1 is a schematic view of a scenario of an anti-counterfeiting traceability method for alcoholic beverages according to an embodiment of the present application. As shown in fig. 1, in this application scenario, first, a product certification image (e.g., C1 as illustrated in fig. 1) of a wine product to be traced is obtained from a blockchain network structure, and a product detection image (e.g., C2 as illustrated in fig. 1) of the wine product to be traced, which is acquired by a camera, is acquired. Then, the obtained product evidence image and product detection image are input into a server (for example, S as illustrated in fig. 1) deployed with an alcohol anti-counterfeiting traceability algorithm, wherein the server can process the product evidence image and the product detection image by the alcohol anti-counterfeiting traceability algorithm to generate a classification result for indicating whether the alcohol to be traced is a genuine product.
Having described the basic principles of the present application, various non-limiting embodiments of the present application will now be described in detail with reference to the accompanying drawings.
Exemplary method
Fig. 2 is a flowchart of an anti-counterfeiting traceability method for wine according to an embodiment of the present application. As shown in fig. 2, the wine anti-counterfeiting tracing method according to the embodiment of the application includes the steps of: s110, obtaining a product evidence storage image of the wine product to be traced from a blockchain network structure; s120, acquiring a product detection image of the wine product to be traced acquired by a camera; s130, enabling the product certification image and the product detection image to pass through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification characteristic diagram and a detection characteristic diagram, wherein the first image encoder and the second image encoder have the same network structure; s140, calculating a difference characteristic diagram between the evidence characteristic diagram and the detection characteristic diagram; and S150, enabling the differential feature map to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Fig. 3 is a schematic diagram of an architecture of an anti-counterfeit traceability method for wine according to an embodiment of the present application. As shown in fig. 3, in the network architecture, first, a product certification image of a wine product to be traced is obtained from a blockchain network structure; then, acquiring a product detection image of the wine product to be traced acquired by a camera; then, the product certification image and the product detection image are passed through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, wherein the first image encoder and the second image encoder have the same network structure; then, calculating a difference feature map between the evidence feature map and the detection feature map; and finally, the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Specifically, in step S110 and step S120, a product certification image of the alcoholic beverage product to be traced is obtained from the blockchain network structure; and acquiring a product detection image of the wine product to be traced acquired by the camera. Accordingly, in the technical scheme of the application, the non-tamper property and the authenticity of the data to be traced are determined by adopting a blockchain technology, meanwhile, the difference between the data to be traced and the real-time detection data is intelligently compared by combining an artificial intelligence technology based on deep learning and a neural network, and whether the object to be traced is genuine is determined based on the differential expression.
Specifically, in the technical scheme of the application, firstly, a product evidence storage image of the wine product to be traced is obtained from a blockchain network structure, and a product detection image of the wine product to be traced, which is acquired by a camera, is acquired. Here, the blockchain network structure may be a coalition chain to determine the non-tamper-resistance and authenticity of the product certification image through technology-specific of the blockchain network itself.
Specifically, in step S130, the product certification image and the product detection image are passed through a twin detection model including a first image encoder and a second image encoder, the first image encoder and the second image encoder having the same network structure, to obtain a certification feature map and a detection feature map. Then, the product certification image and the product detection image are passed through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, the first image encoder and the second image encoder having the same network structure.
It should be understood that if the product certification image and the product detection image do not have any difference at the image source domain side, there should be a high degree of consistency and alignment between the certification feature map and the detection feature map extracted by the first image encoder and the second image encoder having the same network structure; conversely, if there is a difference between the two at the image source domain side, this difference will also be captured and retained by the first image encoder and the second image encoder.
In a specific example of the present application, the first image encoder and the second image encoder are convolutional neural network models with spatial attention mechanisms. It should be understood that the convolutional neural network model can effectively extract the local features of the high-dimensional image through the convolutional kernel, and the combination of the spatial attention mechanism can enable the features of the spatial dimension to have higher discriminativity so as to improve the accuracy of classification judgment.
Further, in an embodiment of the present application, the step of passing the product certification image and the product detection image through a twin detection model including a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map includes: input data are respectively carried out in the forward transfer process of the layers by using each layer of the first image encoder: convolving the input data to generate a first convolved feature map; pooling the first convolution feature map to generate a first pooled feature map; non-linearly activating the first pooled feature map to generate a first activated feature map; calculating the mean value of each position of the first activation feature map along the channel dimension to generate a first spatial feature matrix; calculating a Softmax-like function value of each position in the first space feature matrix to obtain a first space score matrix; calculating the first space feature matrix and multiplying the first space score matrix according to the position points to obtain a first feature matrix; the first feature matrix output by the last layer of the first image encoder is the certification feature map.
Still further, in an embodiment of the present application, the step of passing the product certification image and the product detection image through a twin detection model including a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map includes: input data are respectively carried out in the forward transfer process of the layers by using each layer of the second image encoder: convolving the input data to generate a second convolved feature map; pooling the second convolution feature map to generate a second pooled feature map; non-linearly activating the second pooled feature map to generate a second activated feature map; calculating the mean value of each position of the second activation feature map along the channel dimension to generate a second spatial feature matrix; calculating a Softmax-like function value of each position in the second spatial feature matrix to obtain a second spatial score matrix; calculating the second space feature matrix and multiplying the second space score matrix according to the position points to obtain a second feature matrix; wherein the second feature matrix output by the last layer of the second image encoder is the detection feature map.
Specifically, in step S140, a differential feature map between the certification feature map and the detection feature map is calculated. Further, in the technical scheme of the application, a difference feature map between the evidence feature map and the detection feature map is further calculated, so that the difference between the product evidence image and the product detection image in a high-dimensional feature space is represented. And then, the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
Wherein said calculating a differential signature between said prover signature and said detection signature comprises: calculating a differential feature map between the prover feature map and the detection feature map using the following formula; wherein, the formula is:
Figure SMS_22
wherein,,
Figure SMS_23
representing the differential feature map, ">
Figure SMS_24
Representing the evidence feature map, ++>
Figure SMS_25
Representing the detection feature map, ">
Figure SMS_26
Representing per-position subtraction.
Specifically, in step S150, the differential feature map is passed through a classifier to obtain a classification result, where the classification result is used to indicate whether the wine to be traced is a genuine product. And finally, the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not. That is, the classifier is used to determine a class probability tag to which the differential feature map belongs, wherein the class probability tag includes that the wine to be traced is a genuine product (first tag) and that the wine to be traced is not a genuine product (second tag).
Fig. 4 is a flowchart of a sub-step of step S150 in the wine anti-counterfeiting tracing method according to an embodiment of the present application, as shown in fig. 4, the step of passing the differential feature map through a classifier to obtain a classification result, where the classification result is used to indicate whether the wine to be traced is a genuine product, and includes: s210, performing feature map expansion on the differential feature map to obtain a classification feature vector; s220, carrying out local structure fuzzy correction on the classification characteristic vector to obtain an optimized classification characteristic vector; and S230, passing the optimized classification feature vector through a classifier to obtain the classification result.
The step of performing feature map expansion on the differential feature map to obtain a classification feature vector includes: and expanding the differential feature map according to a row vector to obtain the classification feature vector.
Here, in the technical solution of the present application, the high-dimensional feature extraction is performed on the product certification image and the product detection image by the first image encoder and the second image encoder having the same network structure, respectively, and the difference between the product certification image and the product detection image in the high-dimensional feature space, that is, the substantial difference between the two is represented by a difference feature map between the two. However, in the process of feature extraction, noise (which is represented as outliers in the feature map) existing in the source domain in the product verification image and the product detection image may be synchronously amplified through the processing of the first image encoder and the second image encoder, so that local structural ambiguity may exist in the high-dimensional manifold of the differential feature map, thereby reducing the expression certainty of the differential feature map and affecting the accuracy of the classification result obtained by the classifier of the differential feature map.
Based on the above, the applicant of the present application expands the differential feature map to obtain a classification feature vector
Figure SMS_27
Performing ordered hilbert completion of vectors, that is, performing local structure blur correction on the classification feature vectors to obtain optimized classification feature vectors, including: carrying out local structure fuzzy correction on the classification characteristic vector by the following formula to obtain an optimized classification characteristic vector; wherein, the formula is:
Figure SMS_28
wherein,,
Figure SMS_30
representing the classification feature vector,/->
Figure SMS_32
Representing the optimized classification feature vector, +.>
Figure SMS_34
Transpose vector representing the classification feature vector, < >>
Figure SMS_31
Square of two norms representing the classification feature vector,/->
Figure SMS_33
Is an ordered vector in which the feature values of the classification feature vector are arranged in order of magnitude, and the classification feature vector +.>
Figure SMS_35
In the form of column vectors, +.>
Figure SMS_36
Representing vector dot product, < >>
Figure SMS_29
Representing a matrix multiplication.
Here, by mapping the ordered vectors into the hilbert space defined by the self-inner product of the vectors, a meaningful measure of the numerical relation of the feature set in the consistency space can be realized, based on which, a feature space with an orthorhombic structure is built by embedding the relative positions of the feature vectors, and the structure in the feature space is completed for the high-dimensional manifold of the feature vectors based on vector query, so that the expression certainty of the feature vectors is prevented from being reduced due to the fuzzification structure, and the accuracy of the classification result of the differential feature map obtained by the classifier is improved.
Fig. 5 is a flowchart of a sub-step of step S230 in the wine anti-counterfeiting tracing method according to an embodiment of the present application, as shown in fig. 5, where the step of passing the optimized classification feature vector through a classifier to obtain the classification result includes: s310, performing full-connection coding on the optimized classification feature vector by using a plurality of full-connection layers of the classifier to obtain a coded classification feature vector; and S320, passing the coding classification feature vector through a Softmax classification function of the classifier to obtain the classification result.
In a specific example of the application, the classifier is used to process the optimized classification feature vector to obtain the classification result according to the following formula; wherein, the formula is:
Figure SMS_37
whereinXRepresenting the optimized classification feature vector, +.>
Figure SMS_38
To->
Figure SMS_39
Is a weight matrix>
Figure SMS_40
To->
Figure SMS_41
Representing the bias vector.
In summary, according to the wine anti-counterfeiting tracing method based on the embodiment of the application, a product evidence storage image of a wine product to be traced is obtained from a blockchain network structure, and a product detection image of the wine product to be traced, which is acquired by a camera, is obtained; and adopting an artificial intelligence technology based on deep learning, taking the difference between the product evidence-storing image and the product detection image in a high-dimensional feature space as the difference between the to-be-traced data and the real-time detection data, and determining whether the to-be-traced wine is a genuine product or not based on the differential expression. Therefore, the accuracy of the judging result of whether the wine to be traced is a genuine product or not can be improved, and the identification capability of masses on fake wine is improved.
Exemplary System
Fig. 6 is a block diagram of an anti-counterfeiting traceability system for wine according to an embodiment of the present application. As shown in fig. 6, the wine anti-counterfeiting traceability system 100 according to the embodiment of the present application includes: the evidence storage image acquisition module 110 is used for obtaining a product evidence storage image of the wine product to be traced from the blockchain network structure; a detection image acquisition module 120, configured to acquire a product detection image of the wine product to be traced acquired by the camera; an image encoding module 130, configured to pass the product certification image and the product detection image through a twin detection model including a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, where the first image encoder and the second image encoder have the same network structure; a differential feature map calculation module 140, configured to calculate a differential feature map between the verification feature map and the detection feature map; and an anti-counterfeiting traceability result generation module 150, configured to pass the differential feature map through a classifier to obtain a classification result, where the classification result is used to indicate whether the wine to be traceable is a genuine product.
In one example, in the wine anti-counterfeiting traceability system 100 described above, the first image encoder and the second image encoder are convolutional neural network models using a spatial attention mechanism.
In one example, in the wine anti-counterfeiting traceability system 100, the image encoding module is configured to: input data are respectively carried out in the forward transfer process of the layers by using each layer of the first image encoder: convolving the input data to generate a first convolved feature map; pooling the first convolution feature map to generate a first pooled feature map; non-linearly activating the first pooled feature map to generate a first activated feature map; calculating the mean value of each position of the first activation feature map along the channel dimension to generate a first spatial feature matrix; calculating a Softmax-like function value of each position in the first space feature matrix to obtain a first space score matrix; calculating the first space feature matrix and multiplying the first space score matrix according to the position points to obtain a first feature matrix; the first feature matrix output by the last layer of the first image encoder is the certification feature map.
In one example, in the wine anti-counterfeiting traceability system 100 described above, the image encoding module is further configured to: input data are respectively carried out in the forward transfer process of the layers by using each layer of the second image encoder: convolving the input data to generate a second convolved feature map; pooling the second convolution feature map to generate a second pooled feature map; non-linearly activating the second pooled feature map to generate a second activated feature map; calculating the mean value of each position of the second activation feature map along the channel dimension to generate a second spatial feature matrix; calculating a Softmax-like function value of each position in the second spatial feature matrix to obtain a second spatial score matrix; calculating the second space feature matrix and multiplying the second space score matrix according to the position points to obtain a second feature matrix; wherein the second feature matrix output by the last layer of the second image encoder is the detection feature map.
In the technical scheme of the application, firstly, a product evidence storage image of the wine product to be traced is obtained from a blockchain network structure, and a product detection image of the wine product to be traced, which is acquired by a camera, is acquired. Here, the blockchain network structure may be a coalition chain to determine the non-tamper-resistance and authenticity of the product certification image through technology-specific of the blockchain network itself.
Then, the product certification image and the product detection image are passed through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, the first image encoder and the second image encoder having the same network structure. It should be understood that if the product certification image and the product detection image do not have any difference at the image source domain side, there should be a high degree of consistency and alignment between the certification feature map and the detection feature map extracted by the first image encoder and the second image encoder having the same network structure; conversely, if there is a difference between the two at the image source domain side, this difference will also be captured and retained by the first image encoder and the second image encoder. In a specific example of the present application, the first image encoder and the second image encoder are convolutional neural network models with spatial attention mechanisms. It should be understood that the convolutional neural network model can effectively extract the local features of the high-dimensional image through the convolutional kernel, and the combination of the spatial attention mechanism can enable the features of the spatial dimension to have higher discriminativity so as to improve the accuracy of classification judgment.
In one example, in the wine anti-counterfeiting traceability system 100, the differential feature map calculation module is further configured to: calculating a differential feature map between the prover feature map and the detection feature map using the following formula; wherein, the formula is:
Figure SMS_42
wherein,,
Figure SMS_43
representing the differential feature map, ">
Figure SMS_44
Representing the evidence feature map, ++>
Figure SMS_45
Representing the detection feature map, ">
Figure SMS_46
Representing per-position subtraction.
Further, in the technical scheme of the application, a difference feature map between the evidence feature map and the detection feature map is further calculated, so that the difference between the product evidence image and the product detection image in a high-dimensional feature space is represented. And then, the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine to be traced is a genuine product or not.
In one example, in the wine anti-counterfeiting traceability system 100, the anti-counterfeiting traceability result generating module includes: the characteristic diagram unfolding unit is used for conducting characteristic diagram unfolding on the differential characteristic diagrams to obtain classified characteristic vectors; the correction unit is used for carrying out local structure fuzzy correction on the classification characteristic vector so as to obtain an optimized classification characteristic vector; and the classification result unit is used for enabling the optimized classification feature vector to pass through a classifier to obtain the classification result.
In one example, in the wine anti-counterfeiting traceability system 100, the feature map expanding unit is configured to: and expanding the differential feature map according to a row vector to obtain the classification feature vector.
Here, in the technical solution of the present application, the high-dimensional feature extraction is performed on the product certification image and the product detection image by the first image encoder and the second image encoder having the same network structure, respectively, and the difference between the product certification image and the product detection image in the high-dimensional feature space, that is, the substantial difference between the two is represented by a difference feature map between the two. However, in the process of feature extraction, noise (which is represented as outliers in the feature map) existing in the source domain in the product verification image and the product detection image may be synchronously amplified through the processing of the first image encoder and the second image encoder, so that local structural ambiguity may exist in the high-dimensional manifold of the differential feature map, thereby reducing the expression certainty of the differential feature map and affecting the accuracy of the classification result obtained by the classifier of the differential feature map.
In one example, in the wine anti-counterfeiting traceability system 100 described above, the correction unit is further configured to: carrying out local structure fuzzy correction on the classification characteristic vector by the following formula to obtain an optimized classification characteristic vector; wherein, the formula is:
Figure SMS_47
wherein,,
Figure SMS_49
representing the classification feature vector,/->
Figure SMS_52
Representing the optimized classification feature vector, +.>
Figure SMS_54
Transpose vector representing the classification feature vector, < >>
Figure SMS_50
Square of two norms representing the classification feature vector,/->
Figure SMS_51
Is an ordered vector in which the feature values of the classification feature vector are arranged in order of magnitude, and the classification feature vector +.>
Figure SMS_53
In the form of column vectors, +.>
Figure SMS_55
Representing vector dot product, < >>
Figure SMS_48
Representing a matrix multiplication.
Here, by mapping the ordered vectors into the hilbert space defined by the self-inner product of the vectors, a meaningful measure of the numerical relation of the feature set in the consistency space can be realized, based on which, a feature space with an orthorhombic structure is built by embedding the relative positions of the feature vectors, and the structure in the feature space is completed for the high-dimensional manifold of the feature vectors based on vector query, so that the expression certainty of the feature vectors is prevented from being reduced due to the fuzzification structure, and the accuracy of the classification result of the differential feature map obtained by the classifier is improved.
In one example, in the wine anti-counterfeiting traceability system 100, the classification result unit includes: the full-connection coding subunit is used for carrying out full-connection coding on the optimized classification feature vector by using a plurality of full-connection layers of the classifier so as to obtain a coding classification feature vector; and the classification result generating unit is used for enabling the coding classification feature vector to pass through a Softmax classification function of the classifier to obtain the classification result.
Here, it will be understood by those skilled in the art that the specific functions and operations of the respective units and modules in the above-described wine anti-counterfeiting tracing system 100 have been described in detail in the above description of the wine anti-counterfeiting tracing method with reference to fig. 1 to 5, and thus, repetitive descriptions thereof will be omitted.
The basic principles of the present application have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not intended to be limited to the details disclosed herein as such.
The block diagrams of the devices, apparatuses, devices, systems referred to in this application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent to the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (8)

1. An anti-counterfeiting tracing method for wines is characterized by comprising the following steps:
obtaining a product evidence storage image of the wine product to be traced from the blockchain network structure;
acquiring a product detection image of the wine product to be traced acquired by a camera;
passing the product certification image and the product detection image through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map, wherein the first image encoder and the second image encoder have the same network structure;
calculating a difference feature map between the evidence feature map and the detection feature map; and
the differential feature map is passed through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine products to be traced are genuine or not;
the step of enabling the differential feature map to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine product to be traced is a genuine product or not, and the step of comprising:
Performing feature map expansion on the differential feature map to obtain a classification feature vector;
carrying out local structure fuzzy correction on the classification characteristic vector to obtain an optimized classification characteristic vector; and
the optimized classification feature vector passes through a classifier to obtain the classification result;
the performing local structure blur correction on the classification feature vector to obtain an optimized classification feature vector includes: carrying out local structure fuzzy correction on the classification characteristic vector by the following formula to obtain an optimized classification characteristic vector;
wherein, the formula is:
Figure QLYQS_1
wherein,,
Figure QLYQS_2
representing the classification feature vector,/->
Figure QLYQS_5
Representing the optimized classification feature vector, +.>
Figure QLYQS_7
Transpose vector representing the classification feature vector, < >>
Figure QLYQS_4
Square of two norms representing the classification feature vector,/->
Figure QLYQS_6
Is an ordered vector in which the feature values of the classification feature vector are arranged in order of magnitude, and the classification feature vector +.>
Figure QLYQS_8
In the form of column vectors, +.>
Figure QLYQS_9
Representing vector dot product, < >>
Figure QLYQS_3
Representing a matrix multiplication.
2. The wine anti-counterfeiting traceability method according to claim 1, wherein the first image encoder and the second image encoder are convolutional neural network models using a spatial attention mechanism.
3. The wine anti-counterfeiting tracing method according to claim 2, wherein the passing the product certification image and the product detection image through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map comprises: input data are respectively carried out in the forward transfer process of the layers by using each layer of the first image encoder:
convolving the input data to generate a first convolved feature map;
pooling the first convolution feature map to generate a first pooled feature map;
non-linearly activating the first pooled feature map to generate a first activated feature map;
calculating the mean value of each position of the first activation feature map along the channel dimension to generate a first spatial feature matrix;
calculating a Softmax-like function value of each position in the first space feature matrix to obtain a first space score matrix; and
calculating the first space feature matrix and multiplying the first space score matrix according to the position points to obtain a first feature matrix;
the first feature matrix output by the last layer of the first image encoder is the certification feature map.
4. The wine anti-counterfeiting tracing method according to claim 3, wherein the step of passing the product certification image and the product detection image through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification feature map and a detection feature map comprises: input data are respectively carried out in the forward transfer process of the layers by using each layer of the second image encoder:
convolving the input data to generate a second convolved feature map;
pooling the second convolution feature map to generate a second pooled feature map;
non-linearly activating the second pooled feature map to generate a second activated feature map;
calculating the mean value of each position of the second activation feature map along the channel dimension to generate a second spatial feature matrix;
calculating a Softmax-like function value of each position in the second spatial feature matrix to obtain a second spatial score matrix; and
calculating the second space feature matrix and multiplying the second space score matrix according to the position points to obtain a second feature matrix;
wherein the second feature matrix output by the last layer of the second image encoder is the detection feature map.
5. The wine anti-counterfeiting tracing method according to claim 4, wherein the calculating the difference feature map between the evidence feature map and the detection feature map comprises: calculating a differential feature map between the prover feature map and the detection feature map using the following formula;
wherein, the formula is:
Figure QLYQS_10
wherein,,
Figure QLYQS_11
representing the differential feature map, ">
Figure QLYQS_12
Representing the evidence feature map, ++>
Figure QLYQS_13
Representing the detection feature map, ">
Figure QLYQS_14
Representing per-position subtraction.
6. The wine anti-counterfeiting tracing method according to claim 5, wherein the performing feature map expansion on the differential feature map to obtain a classification feature vector comprises: and expanding the differential feature map according to a row vector to obtain the classification feature vector.
7. The wine anti-counterfeiting traceability method according to claim 6, wherein the step of passing the optimized classification feature vector through a classifier to obtain the classification result comprises the steps of:
performing full-connection coding on the optimized classification feature vector by using a plurality of full-connection layers of the classifier to obtain a coding classification feature vector; and
and the coding classification feature vector is passed through a Softmax classification function of the classifier to obtain the classification result.
8. An anti-counterfeiting traceability system for wines, which is characterized by comprising:
the evidence storage image acquisition module is used for acquiring a product evidence storage image of the wine product to be traced from the blockchain network structure;
the detection image acquisition module is used for acquiring a product detection image of the wine product to be traced acquired by the camera;
the image coding module is used for enabling the product certification image and the product detection image to pass through a twin detection model comprising a first image encoder and a second image encoder to obtain a certification characteristic image and a detection characteristic image, and the first image encoder and the second image encoder have the same network structure;
the differential feature map calculation module is used for calculating a differential feature map between the evidence storage feature map and the detection feature map; and
the anti-counterfeiting tracing result generation module is used for enabling the differential feature map to pass through a classifier to obtain a classification result, wherein the classification result is used for indicating whether the wine product to be traced is a genuine product or not;
the anti-counterfeiting traceability result generation module is further used for:
performing feature map expansion on the differential feature map to obtain a classification feature vector;
carrying out local structure fuzzy correction on the classification characteristic vector to obtain an optimized classification characteristic vector; and
The optimized classification feature vector passes through a classifier to obtain the classification result;
carrying out local structure fuzzy correction on the classification characteristic vector by the following formula to obtain an optimized classification characteristic vector;
wherein, the formula is:
Figure QLYQS_15
wherein,,
Figure QLYQS_18
representing the classification feature vector,/->
Figure QLYQS_19
Representing the optimized classification feature vector, +.>
Figure QLYQS_21
Transpose vector representing the classification feature vector, < >>
Figure QLYQS_17
Square of two norms representing the classification feature vector,/->
Figure QLYQS_20
Is an ordered vector in which the feature values of the classification feature vector are arranged in order of magnitude, and the classification feature vector +.>
Figure QLYQS_22
In the form of column vectors, +.>
Figure QLYQS_23
Representing vector dot product, < >>
Figure QLYQS_16
Representing a matrix multiplication.
CN202310126237.3A 2023-02-17 2023-02-17 Wine anti-counterfeiting tracing method and system thereof Active CN115983874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310126237.3A CN115983874B (en) 2023-02-17 2023-02-17 Wine anti-counterfeiting tracing method and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310126237.3A CN115983874B (en) 2023-02-17 2023-02-17 Wine anti-counterfeiting tracing method and system thereof

Publications (2)

Publication Number Publication Date
CN115983874A CN115983874A (en) 2023-04-18
CN115983874B true CN115983874B (en) 2023-06-30

Family

ID=85959907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310126237.3A Active CN115983874B (en) 2023-02-17 2023-02-17 Wine anti-counterfeiting tracing method and system thereof

Country Status (1)

Country Link
CN (1) CN115983874B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664961B (en) * 2023-07-31 2023-12-05 东莞市将为防伪科技有限公司 Intelligent identification method and system for anti-counterfeit label based on signal code
CN116797248B (en) * 2023-08-22 2024-01-30 厦门瞳景智能科技有限公司 Data traceability management method and system based on block chain
CN117251699B (en) * 2023-11-17 2024-02-02 北京无极慧通科技有限公司 Medical big data analysis method and system based on artificial intelligence

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108985413A (en) * 2018-07-23 2018-12-11 程昔恩 A kind of anti-false true-guaranteeing method and device of ceramic product
CN109102305B (en) * 2018-08-06 2022-03-29 程昔恩 Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof
CN110866461A (en) * 2019-10-29 2020-03-06 上海躲猫猫信息技术有限公司 Commodity automatic identification tracing anti-counterfeiting method and system based on texture partition
CN111461743A (en) * 2020-03-26 2020-07-28 北京马上游科技有限责任公司 NFC-based block chain Pu' er tea anti-counterfeiting tracing implementation method
CN112488233B (en) * 2020-12-09 2021-12-17 中国农业科学院农业资源与农业区划研究所 Coding and identifying method and device based on fruit pattern map information
CN113610540B (en) * 2021-07-09 2024-02-02 北京农业信息技术研究中心 River crab anti-counterfeiting tracing method and system
CN114971653A (en) * 2022-05-23 2022-08-30 中山大学 Ceramic tracing and identifying method based on block chain and trusted data space
CN114758162A (en) * 2022-06-14 2022-07-15 北京市农林科学院信息技术研究中心 Commodity anti-counterfeiting identification method and device, electronic equipment and storage medium
CN115239515B (en) * 2022-07-28 2023-04-07 德玛克(长兴)精密机械有限公司 Precise intelligent processing and manufacturing system for mechanical parts and manufacturing method thereof
CN115511890B (en) * 2022-11-23 2023-04-07 深圳市吉斯凯达智慧科技有限公司 Analysis system for large-flow data of special-shaped network interface

Also Published As

Publication number Publication date
CN115983874A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN115983874B (en) Wine anti-counterfeiting tracing method and system thereof
CN105849747B (en) Method and system for facial image identification
CN109711422B (en) Image data processing method, image data processing device, image data model building method, image data model building device, computer equipment and storage medium
CN110322495A (en) A kind of scene text dividing method based on Weakly supervised deep learning
CN108596193B (en) Method and system for building deep learning network structure aiming at human ear recognition
CN112084841B (en) Cross-mode image multi-style subtitle generating method and system
CN112818951B (en) Ticket identification method
CN112633220B (en) Human body posture estimation method based on bidirectional serialization modeling
CN110633698A (en) Infrared picture identification method, equipment and medium based on loop generation countermeasure network
CN113610540A (en) River crab anti-counterfeiting tracing method and system
CN116664961B (en) Intelligent identification method and system for anti-counterfeit label based on signal code
CN113159023A (en) Scene text recognition method based on explicit supervision mechanism
CN114387641A (en) False video detection method and system based on multi-scale convolutional network and ViT
CN108154066A (en) A kind of Three-dimensional target recognition method based on curvature feature recurrent neural network
CN115951883B (en) Service component management system of distributed micro-service architecture and method thereof
CN116341518A (en) Data processing method and system for big data statistical analysis
CN113221852A (en) Target identification method and device
CN114973222A (en) Scene text recognition method based on explicit supervision mechanism
CN114782796A (en) Intelligent verification method and device for article image anti-counterfeiting
Rhee Composition of visual feature vector pattern for deep learning in image forensics
CN116778346B (en) Pipeline identification method and system based on improved self-attention mechanism
CN111353412B (en) End-to-end 3D-CapsNet flame detection method and device
CN116091873B (en) Image generation method, device, electronic equipment and storage medium
CN116129251A (en) Intelligent manufacturing method and system for office desk and chair
CN116416649A (en) Video pedestrian re-identification method based on multi-scale resolution alignment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant