CN107578250B - Two-dimensional code anti-counterfeiting method and system - Google Patents

Two-dimensional code anti-counterfeiting method and system Download PDF

Info

Publication number
CN107578250B
CN107578250B CN201710582334.8A CN201710582334A CN107578250B CN 107578250 B CN107578250 B CN 107578250B CN 201710582334 A CN201710582334 A CN 201710582334A CN 107578250 B CN107578250 B CN 107578250B
Authority
CN
China
Prior art keywords
dimensional code
commodity
abstract
information
verification
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
CN201710582334.8A
Other languages
Chinese (zh)
Other versions
CN107578250A (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.)
China Agricultural University
Original Assignee
China Agricultural University
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 China Agricultural University filed Critical China Agricultural University
Priority to CN201710582334.8A priority Critical patent/CN107578250B/en
Publication of CN107578250A publication Critical patent/CN107578250A/en
Application granted granted Critical
Publication of CN107578250B publication Critical patent/CN107578250B/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

  • Storage Device Security (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a two-dimensional code anti-counterfeiting method and a two-dimensional code anti-counterfeiting system. The method comprises the following steps: acquiring a two-dimensional code picture of a commodity to be detected and first scanning attribute information of scanning the two-dimensional code picture; and if the two-dimensional code picture passes the abstract verification and is judged to be the non-first abstract verification, judging the authenticity of the commodity to be detected according to a preset classifier and the first scanning attribute information. According to the two-dimensional code anti-counterfeiting method and system provided by the embodiment of the invention, the characteristics that the two-dimensional code picture contains large information and can be identified are utilized, the two-dimensional code picture is taken as an anti-counterfeiting carrier, the non-first-verification two-dimensional code picture is judged to be true or false according to the preset classifier and the first scanning attribute information, the commodity information type is intelligently distributed, the online real-time inquiry of the commodity true or false information is realized, and the counterfeits can be rapidly and accurately identified.

Description

Two-dimensional code anti-counterfeiting method and system
Technical Field
The embodiment of the invention relates to the technical field of anti-counterfeiting, in particular to a two-dimensional code anti-counterfeiting method and system.
Background
At present, counterfeiting commodities are popular in the economic market of China, and the counterfeiting commodities not only damage the interests of merchants, but also affect the life and property safety of vast consumers. The two-dimensional bar code is used for carrying out commodity verification by taking a two-dimensional bar code picture as an anti-counterfeiting carrier by utilizing the characteristics of large information content and readable information content of the two-dimensional bar code, and is called a mainstream commodity anti-counterfeiting method.
In the commodity anti-counterfeiting system based on the two-dimension codes, firstly, a unique mark code is allocated to each commodity, the two-dimension codes are generated according to the mark codes, and the two-dimension codes are stored and attached to the commodity; then storing the unique mark codes of all commodities in a trusted center; the inquirer extracts a unique mark code in the two-dimensional code and inquires the trusted center; after the unique mark code of the two-dimension code is found by the trusted center, judging whether the unique mark code is the first inquiry, if so, considering the commodity as a genuine commodity, otherwise, considering the commodity as a counterfeit commodity, and then returning an inquiry result to an inquirer.
However, in the conventional two-dimensional code commodity counterfeit verification query system, if a user performs a verification for a first commodity and passes the verification, the commodity can be considered as a genuine commodity. When the same two-dimensional code information appears again to check the fake inquiry, the commodity is directly judged to be a fake product. However, the same two-dimensional code is verified again, besides the two-dimensional code is obtained and imitated by lawbreakers, the two-dimensional code is also possibly scanned by a certain user for a plurality of times, and at the moment, the false detection system can generate false judgment, so that the system accuracy is reduced.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a two-dimensional code anti-counterfeiting method and a two-dimensional code anti-counterfeiting system.
In one aspect, an embodiment of the present invention provides a two-dimensional code anti-counterfeiting method, including:
acquiring a two-dimensional code picture of a commodity to be detected and first scanning attribute information of scanning the two-dimensional code picture;
and if the two-dimensional code picture passes the abstract verification and is judged to be the non-first abstract verification, judging the authenticity of the commodity to be detected according to a preset classifier and the first scanning attribute information.
On the other hand, the embodiment of the invention provides a two-dimensional code anti-counterfeiting system, which comprises:
the two-dimension code generation server is used for generating two-dimension code pictures of the commodity to be detected;
the two-dimensional code verification client is used for scanning the two-dimensional code picture, carrying out abstract verification on the two-dimensional code picture, and sending an abstract verification result and first scanning attribute information of scanning the two-dimensional code picture to the data analysis server;
the data analysis server is connected with the two-dimensional code verification client and is used for judging whether the two-dimensional code picture passes the abstract verification or not according to the preset classifier and the first scanning attribute information if the two-dimensional code picture is judged to pass the abstract verification.
According to the two-dimensional code anti-counterfeiting method and system provided by the embodiment of the invention, the characteristics that the two-dimensional code picture contains large information and can be identified are utilized, the two-dimensional code picture is taken as an anti-counterfeiting carrier, the non-first-verification two-dimensional code picture is judged to be true or false according to the preset classifier and the first scanning attribute information, the commodity information type is intelligently distributed, the online real-time inquiry of the commodity true or false information is realized, and the counterfeits can be rapidly and accurately identified.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a two-dimensional code anti-counterfeiting method provided by an embodiment of the invention;
fig. 2 is a schematic flow chart of a two-dimensional code anti-counterfeiting method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a two-dimensional code anti-counterfeiting system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a two-dimensional code anti-counterfeiting method provided by an embodiment of the invention, as shown in fig. 1, the method includes:
s11, acquiring a two-dimensional code picture of a commodity to be detected and scanning first scanning attribute information of the two-dimensional code picture;
specifically, in the two-dimensional code anti-counterfeiting system, each genuine commodity outer package is stuck with a two-dimensional code picture, and a user can acquire information of the genuine commodity, such as a production place, a delivery time, logistics information, a production date, a batch number, specifications, a product name and the like, by scanning the two-dimensional code picture. However, a counterfeiter can copy a large amount of one or a plurality of two-dimensional code pictures, so that the uniqueness of the anti-counterfeiting two-dimensional code is destroyed. At this time, the two-dimensional code anti-counterfeiting system is required to be able to identify whether the commodity corresponding to the two-dimensional code is genuine or counterfeit. For this reason, firstly, a two-dimensional code picture of the commodity to be detected needs to be acquired, for example, the two-dimensional code picture on the outer package of the commodity can be scanned by a scanning device such as a mobile terminal or a scanning gun, so that the two-dimensional code picture and the scanning attribute information of the scanned two-dimensional code picture can be acquired.
And step S12, if the two-dimensional code picture is judged to pass the abstract verification and is not the first abstract verification, judging the authenticity of the commodity to be detected according to a preset classifier and the first scanning attribute information.
Specifically, after the two-dimensional code picture and the first scanning attribute information are obtained, the two-dimensional code picture is firstly subjected to abstract verification, after the abstract verification is passed, the two-dimensional code picture is subjected to times of verification, whether the two-dimensional code picture is first abstract verification or not is judged, if the two-dimensional code picture is first abstract verification, whether the commodity to be detected is a genuine product is judged, if the two-dimensional code picture is not first abstract verification, two conditions possibly exist, one condition is that the two-dimensional code picture is used by a counterfeit product, and the other condition is that a user repeatedly scans the purchased genuine product, at the moment, the commodity to be detected is classified according to a preset classifier and the first scanning attribute information, and whether the commodity to be detected is the genuine product or the counterfeit product is judged. Specifically, two-dimensional code data corresponding to the two-dimensional code picture can be stored in the database, and the scanning times are increased by 1 each time the two-dimensional code picture is scanned, so that the verification times of the two-dimensional code picture can be obtained by inquiring the database.
For example, to obtain whether a certain commodity is a genuine commodity, firstly scanning an anti-counterfeiting two-dimensional code picture on the outer package of the commodity, then performing abstract verification on the obtained two-dimensional code picture, if the two-dimensional code picture does not pass the abstract verification, determining whether the two-dimensional code commodity is the first verification by continuing the times verification if the two-dimensional code picture passes the abstract verification, if yes, determining whether the commodity is the genuine commodity according to the first scanning attribute information of the scanned two-dimensional code picture and the preset classifier, and if not, classifying the commodity to be detected according to the first scanning attribute information of the scanned two-dimensional code picture and the preset classifier.
According to the two-dimensional code anti-counterfeiting method provided by the embodiment of the invention, the characteristics of large information content and readability of the two-dimensional code picture are utilized, the two-dimensional code picture is taken as an anti-counterfeiting carrier, the non-first-verification two-dimensional code picture is judged to be true or false according to the preset classifier and the first scanning attribute information, the commodity information type is intelligently distributed, the online real-time inquiry of the commodity true or false information is realized, and the counterfeits can be rapidly and accurately identified.
On the basis of the above embodiment, further, the digest verification includes:
determining two-dimensional code plaintext information according to the two-dimensional code picture;
determining commodity information and a first abstract according to the two-dimensional code plaintext information and a preset rule;
acquiring a commodity key according to the commodity information;
calculating a second abstract according to the commodity information, the commodity key and a preset abstract algorithm;
and judging whether the first abstract is identical to the second abstract.
Specifically, a two-dimensional code picture is identified, two-dimensional code plaintext information is extracted, then the two-dimensional code plaintext information is analyzed according to a preset rule, commodity information and a first abstract are extracted, if the commodity information or the first abstract cannot be extracted from the two-dimensional code plaintext information according to the preset rule, the two-dimensional code picture is a non-anti-counterfeiting two-dimensional code picture, namely the two-dimensional code picture does not pass format verification, and the commodity to be detected is a counterfeiter. If the commodity information and the first abstract can be extracted from the two-dimensional code plaintext information according to a preset rule, that is, the two-dimensional code picture passes the format verification, the commodity key is obtained according to the commodity information, for example, whether the commodity key corresponding to the commodity is locally checked according to the commodity information. If so, calculating a second abstract according to the commodity information, the commodity key and a preset abstract algorithm, if not, downloading the commodity key corresponding to the commodity from a database through the Internet, then calculating the second abstract according to the commodity information, the commodity key and the preset abstract algorithm, judging whether the first abstract and the second abstract are identical, if so, verifying the first abstract and the second abstract, and if not, judging that the commodity to be tested is a counterfeit product. And after passing the abstract verification, carrying out times verification, if the two-dimensional code is the first abstract verification, judging whether the commodity to be tested is genuine or not, and if the two-dimensional code is not the first abstract verification, judging whether the commodity to be tested is genuine or not according to a preset classifier and first scanning attribute information.
According to the two-dimensional code anti-counterfeiting method provided by the embodiment of the invention, the format verification is performed on the two-dimensional code picture, and the abstract verification is performed after the format verification is passed, so that the reliability of the subsequent verification result is ensured.
On the basis of the above embodiments, further, the two-dimensional code picture is generated by the following steps:
calculating a first abstract according to commodity information and commodity keys of the commodity to be detected and a preset abstract algorithm;
generating two-dimensional code plaintext information according to the commodity information and the first abstract and preset rules;
and generating a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information.
Specifically, according to various production information of the commodities to be tested, such as production place, production date, batch number, specification, product name and the like, commodity information of each commodity is selectively spliced, then a first abstract is calculated according to the commodity information and a commodity key corresponding to the commodity information and a preset abstract algorithm, for example, the commodity information and the commodity key are generated together through an MD5 algorithm to generate a first abstract, and during abstract verification, the commodity information obtained through a two-dimension code picture and the commodity key are generated together through the MD5 algorithm to generate a second abstract. And then generating two-dimensional code plaintext information according to the commodity information, the first abstract and the preset rule, and analyzing the two-dimensional code plaintext information according to the preset rule during abstract verification. And finally, generating a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information.
According to the two-dimensional code anti-counterfeiting method provided by the embodiment of the invention, the two-dimensional code picture is generated through the preset abstract algorithm and the preset rule, and the two-dimensional code picture is analyzed by using the same preset abstract algorithm and the same preset rule during abstract verification, so that the reliability of a subsequent verification result is ensured.
On the basis of the above embodiments, further, the preset classifier is obtained by:
acquiring second scanning attribute information of two-dimensional code samples in the sample set;
extracting a classification feature vector according to the second scanning attribute information;
and establishing a preset classifier according to the classification feature vector.
In practical application, the condition of performing multiple verification on two-dimensional code pictures is divided into two types, wherein the first condition is that a counterfeiter can copy a certain or a plurality of two-dimensional code pictures in a large quantity, so that scanning attributes are relatively scattered when different users scan the two-dimensional code pictures, for example, scanning time, scanning equipment, scanning places and the like are relatively scattered, and the counted scanning times of the two-dimensional code pictures are relatively large; the second case is that the user repeatedly scans for genuine products he purchases, at which time the scan attributes are relatively concentrated. It follows that although the case of non-first verification also occurs, both cases have distinct features, respectively. At this time, the intrinsic rules of the two conditions can be mined by using a data mining technology, and whether the representation of a certain two-dimensional code picture with non-first verification is a genuine product or not is judged according to the rules.
Specifically, in order to enable the built preset classifier to correctly reflect the authenticity of the commodity to be tested, the sample set needs to include the authenticity, the scanning attribute information, the scanning times and the like of the commodity to be tested represented by the two-dimensional code picture.
And then analyzing second scanning attribute information of training samples in the sample set, determining the dimension of the classified feature vector, determining the feature vector according to the dimension of the feature vector, unifying the data format of the feature vector, constructing a preset classifier according to the classified feature vector by adopting a data mining algorithm, and classifying the training samples into two classes of genuine products and counterfeit products, for example, using a support vector machine algorithm to establish the classifier. And then, verifying the preset classifier through the test sample so as to improve the accuracy of the classifier.
In practical application, the selected feature vector can be used as a knowledge base, the database is perfected according to the updated data, and the preset classifier is updated continuously.
For example, by analyzing the second scan attribute information in the sample set, it was found that the classification feature vector can be established with four dimensions:
dimension one: time since last verification. I.e. the difference between the time of this verification and the time of the last verification of the two-dimensional code picture. Generally, if a user performs a first verification on a certain genuine two-dimensional code picture, and then performs a second verification, the time difference between the two verifications is small, which may be only a few seconds or a few minutes. If the time is very short and shorter than the operation time of normal human beings, the commodity verified at the time is very likely to be a counterfeiter;
dimension two: distance from last verification. The distance between the place verified at this time and the place verified last time of the two-dimensional code picture can be obtained by a positioning system on the scanning equipment, and obviously, the farther the distance from the last time of verification is, the more likely the distance is a counterfeit; the closer the distance from the last verification is, the more likely the scanning information of the genuine two-dimensional code is;
dimension three: whether it is the same device. I.e. whether the verification device for the present verification is the same as the verification device for the last verification of the two-dimensional code picture. If the user verifies the two-dimensional code picture again after verifying the two-dimensional code picture of a certain genuine product for the first time, the two-time verification devices should be identical. If the user scans the two-dimensional code picture of the counterfeit, the two verification devices are likely to be different, because different users are likely to verify;
dimension four: the total number of times was verified. This refers to the number of times the two-dimensional code picture is verified in total in the verification process. The probability of multiple times of verification of a certain genuine two-dimensional code picture by a user is small, and if the genuine two-dimensional code picture is copied, the number of times of verification of the two-dimensional code picture by the user is large. Namely: the fewer the total verification times, the more likely the two-dimensional code verification information is genuine information; the greater the number of verifications, the more likely it is a counterfeit;
and extracting classification feature vectors from the second scanning attribute information according to the four dimensions, wherein each training sample corresponds to a group of classification feature vectors, time difference, distance, equipment difference and verification times, wherein the equipment is marked as 1, and the equipment is marked as 0. In practical application, the time, the place and the equipment of the scanning can be obtained from the second scanning attribute information, for example, the above classification feature vector is applied, and the time difference, the distance, the equipment difference and the verification times are also needed to be obtained.
Thus, according to the second attribute information and the two-dimensional code data in the database, a classification feature vector can be obtained, and then a preset classifier is established according to the classification feature vector; or classifying the unknown type of data by using a preset classifier. For example, training samples are classified using an algorithm supporting a vector machine, and a preset classifier is established.
According to the two-dimensional code anti-counterfeiting method provided by the embodiment of the invention, the preset classifier is constructed according to the second scanning attribute information of the sample set, and the preset classifier is used for classifying the commodity to be detected, so that the judging result is obtained, and the reliability of the subsequent query result is ensured.
Further, on the basis of the above embodiments, the first scan attribute information includes, but is not limited to: scanning time, scanning location and scanning device.
Specifically, acquiring a two-dimensional code picture of a commodity to be detected and first scanning attribute information of the scanned two-dimensional code picture, such as scanning time, scanning place and scanning equipment, performing abstract verification on the two-dimensional code picture, and judging whether the commodity to be detected is true or false according to a preset classifier and the first scanning attribute information if the two-dimensional code picture is judged to pass the abstract verification and is not first abstract verification.
Fig. 2 is a schematic flow chart of a two-dimensional code anti-counterfeiting method according to another embodiment of the present invention, as shown in fig. 2, wherein steps S21 to S24 are two-dimensional code picture generation stages, and steps S25 to S210 are two-dimensional code picture verification stages, specifically:
step S21: calculating a first abstract according to commodity information and a commodity key;
step S22: generating two-dimensional code plaintext information according to the first abstract information and the commodity information;
step S23: generating a two-dimensional code picture according to the two-dimensional code plaintext information;
step S24: sticking the two-dimensional code picture on the commodity to be tested;
step S25: a user scans a two-dimensional code picture;
step S26: judging whether the first abstract can be obtained according to the two-dimensional code picture, if so, executing a step S27, and if not, judging that the commodity to be detected is a counterfeiter;
step S27: judging whether the second abstract can be calculated, if so, executing the step S28, and if not, judging that the commodity to be detected is a counterfeit product;
step S28: judging whether the first abstract is the same as the second abstract, if so, executing step S29, otherwise, judging that the commodity to be detected is a counterfeiter;
step S29: judging whether the two-dimensional code picture is scanned for the first time, if so, judging that the commodity to be tested is a genuine commodity, otherwise, executing a step S210;
step S210: and judging the authenticity of the commodity to be detected according to the preset classifier.
In practical application, two-dimensional code data corresponding to the two-dimensional code pictures can be stored in the database, so that information such as verification results of verification times and the like can be recorded.
According to the two-dimensional code anti-counterfeiting method provided by the embodiment of the invention, after the commodity information of each commodity is calculated and assembled, a two-dimensional bar code picture is generated; the two-dimensional code picture is used as an anti-counterfeiting carrier to perform format verification, abstract verification and scanning times verification by utilizing the characteristic that the two-dimensional code picture contains large information and can be read; and (3) performing type matching on the information which still cannot be judged to be true or false by using a preset classifier so as to obtain a judging result, thereby realizing online real-time inquiry of the commodity true or false information and ensuring the reliability of a follow-up inquiry result.
Fig. 3 is a schematic structural diagram of a two-dimensional code anti-counterfeiting system according to an embodiment of the present invention, as shown in fig. 3, where the system includes: a two-dimensional code generation server 31, a two-dimensional code verification client 32, and a data analysis server 33, wherein:
the two-dimensional code generation server 31 is used for generating two-dimensional code pictures of the commodity to be detected; the two-dimensional code verification client 32 is configured to scan the two-dimensional code picture, perform abstract verification on the two-dimensional code picture, and send an abstract verification result and first scanning attribute information of scanning the two-dimensional code picture to the data analysis server; the data analysis server 33 is connected to the two-dimensional code verification client 32, and is configured to determine whether the to-be-detected commodity is true or false according to a preset classifier and the first scanning attribute information if it is determined that the two-dimensional code picture passes the digest verification and the two-dimensional code picture is not the first digest verification.
Specifically, the two-dimensional code generating server 31 generates the two-dimensional code picture 34 according to the commodity information, and calls the two-dimensional code label printer driver to print the two-dimensional code picture 34 on the commodity label, then pastes the two-dimensional code label on the key positions such as the opening of the commodity package, or calls the industrial picture spray printing device to directly spray print the two-dimensional code picture 34 on the commodity package.
The two-dimensional code verification client 32 scans the two-dimensional code picture 34, identifies the two-dimensional code picture 34, acquires first scanning attribute information, then performs abstract verification on the two-dimensional code picture 34, if the abstract verification is not passed, the commodity to be tested is a counterfeit product, sends a verification result to the data analysis server 33, if the abstract verification is passed, the first scanning attribute information is sent to the data analysis server 33, the data analysis server 33 judges whether the two-dimensional code picture 34 is first abstract verification according to the first scanning attribute information, if the two-dimensional code picture 34 is first abstract verification, the commodity to be tested is a genuine product, feeds back information which is the genuine product to the two-dimensional code verification client 32, and if the two-dimensional code verification is not first abstract verification, judges whether the commodity to be tested is genuine or not according to a preset classifier and the first scanning attribute information.
In addition, the two-dimension code verification client can also perform functions such as user registration login, scanning history inquiry and the like. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the characteristics of large information content and readability of the two-dimensional code pictures are utilized, the two-dimensional code pictures are used as anti-counterfeiting carriers, the non-first-verification two-dimensional code pictures are judged to be true or false according to the preset classifier and the first scanning attribute information, the commodity information type is intelligently distributed, the online real-time inquiry of the commodity true or false information is realized, and counterfeits can be rapidly and accurately identified.
On the basis of the foregoing embodiment, further, the two-dimensional code generation server includes:
the abstract calculation module is used for calculating a first abstract according to commodity information and commodity keys of the commodity to be detected and a preset abstract algorithm;
the assembly module is used for generating two-dimensional code plaintext information according to the commodity information, the first abstract and a preset rule;
and the picture generation module is used for generating a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information.
Specifically, the summary calculation module selectively splices the commodity information of each commodity according to various production information of the commodity to be tested, such as a production place, a production date, a batch number, a specification, a product name and the like, then calculates a first summary according to the commodity information and a corresponding commodity key and a preset summary algorithm, for example, generates the first summary by using the commodity information and the commodity key together through an MD5 algorithm, and generates a second summary by using the commodity information obtained through the two-dimension code picture and the commodity key together through the MD5 algorithm during summary verification. And then the assembly module generates two-dimensional code plaintext information according to the commodity information, the first abstract and the preset rule, and analyzes the two-dimensional code plaintext information according to the preset rule during abstract verification. And finally, the picture generation module generates a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the two-dimensional code picture is generated through the preset abstract algorithm and the preset rule, and the two-dimensional code picture is analyzed by using the same preset abstract algorithm and the same preset rule during abstract verification, so that the reliability of a subsequent verification result is ensured.
On the basis of the above embodiments, further, the two-dimensional code verification client includes:
the scanning module is used for scanning a two-dimensional code picture of the commodity to be detected, acquiring first scanning attribute information, sending the two-dimensional code picture to the abstract verification module and sending the first scanning attribute information to the data analysis server;
and the abstract verification module is used for verifying whether the two-dimensional code picture passes the abstract verification.
Specifically, the scanning module scans a two-dimensional code picture, acquires first scanning attribute information, then sends the two-dimensional code picture to the abstract verification module, sends the first scanning attribute information to the data analysis server, and the abstract verification module verifies whether the two-dimensional code picture passes abstract verification or not. If the commodity information and the first abstract can be extracted from the two-dimensional code plaintext information according to a preset rule, that is, the two-dimensional code picture passes the format verification, the commodity key is obtained according to the commodity information, for example, whether the commodity key corresponding to the commodity is locally checked according to the commodity information. If the commodity information and the commodity key are the same, calculating a second abstract according to a preset abstract algorithm, if the commodity key corresponding to the commodity is not available locally, downloading the commodity key corresponding to the commodity from a data analysis server through the Internet, calculating the second abstract according to the commodity information and the commodity key and the preset abstract algorithm, judging whether the first abstract is the same as the second abstract, if the first abstract is the same as the second abstract, verifying the first abstract, and if the first abstract is different, judging that the commodity to be tested is a counterfeit product. And then sending the verification result to the data analysis server. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
The two-dimensional code anti-counterfeiting system provided by the embodiment of the invention firstly performs format verification on the two-dimensional code picture, and performs abstract verification after the format verification is passed, so that the reliability of a subsequent verification result is ensured.
Further, on the basis of the above embodiments, the data analysis server includes:
the classifier establishing module is used for establishing a preset classifier according to the second scanning attribute information of the two-dimensional code samples in the sample set;
and the classifier application module is used for determining the authenticity of the commodity to be detected according to the first scanning attribute information and a preset classifier.
Specifically, the classifier establishing module establishes a preset classifier according to a data mining algorithm according to second scanning attribute information of two-dimensional code samples in the sample set; the classifier application module determines authenticity of the commodity to be detected according to the first scanning attribute information and a preset classifier, for example, after the classifier application module obtains the first scanning attribute information, the commodity to be detected is classified according to the preset classifier, and then a classification result is fed back to the two-dimensional code verification client. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the commodity to be detected is classified according to the preset classifier, so that the judgment result is obtained, and the reliability of the subsequent query result is ensured.
On the basis of the above embodiments, further, the data analysis server further includes: and the database module is used for storing the two-dimension code data corresponding to the two-dimension code pictures.
Specifically, the database module stores, for each two-dimensional code picture, corresponding commodity information, a commodity key and historical verification information, for example, the number of times of current verification of the commodity, a scanning device, a scanning place, a scanning time, a scanning result and the like.
In this way, when the digest verification is performed, the second digest can be calculated through the commodity key stored by the database module, the classifier building module can update the knowledge base according to the two-dimensional code data in the database, and the classifier application module can judge the verification result according to the history verification information and store the result. In addition, the database module may also store an association of a brand of the commodity with a commodity key, an association of commodity information with two-dimensional code plaintext information, an association of commodity information with packages, an association between packages, an association of the commodity with a delivery destination, and the like. The association relation ensures the accuracy of two-dimension code abstract verification. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the commodity to be detected is classified according to the preset classifier, so that the judgment result is obtained, and the reliability of the subsequent query result is ensured.
On the basis of the foregoing embodiments, further, the classifier building module includes:
the acquisition unit is used for acquiring second scanning attribute information of the two-dimensional code samples in the sample set;
an analysis unit, configured to extract a classification feature vector according to the second scan attribute information;
and the processing unit is used for establishing a preset classifier according to the classification feature vector.
Specifically, in order to enable the built preset classifier to correctly reflect the authenticity of the commodity to be tested, the sample set needs to include the authenticity, the scanning attribute information, the scanning times and the like of the commodity to be tested represented by the two-dimensional code picture.
The acquisition unit acquires second scanning attribute information of two-dimensional code samples in the sample set, the analysis unit analyzes the second scanning attribute information of training samples in the sample set to determine the dimension of the classified feature vector, the processing unit determines the feature vector according to the dimension of the feature vector, unifies the data format of the feature vector, and then builds a preset classifier according to the classified feature vector by adopting a data mining algorithm to divide the training samples into two classes of genuine and counterfeit products, for example, a classifier is built by using a support vector machine algorithm. And then, verifying the preset classifier through the test sample so as to improve the accuracy of the classifier. In practical application, the selected feature vector can be used as a knowledge base, the database is perfected according to the updated data, and the preset classifier is updated continuously. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the preset classifier is constructed according to the second scanning attribute information of the sample set, and the preset classifier is used for classifying the commodity to be detected, so that the judging result is obtained, and the reliability of the follow-up query result is ensured.
On the basis of the foregoing embodiments, further, the classifier building module further includes: the verification unit is used for verifying the correctness of the preset classifier.
Specifically, the verification unit verifies the selection of the dimensions of the training samples and the classification feature vectors at the initial stage of the system so as to ensure the classification accuracy; on the other hand, the accuracy of the system is evaluated at the later stage of the system, and the data used by the evaluation is supplemented to training samples on the basis of passing the evaluation so as to generate a new and more perfect knowledge base.
In addition, the classifier establishing module further includes: the data preparation unit is used for realizing data preparation at the initial stage of system establishment and establishing a knowledge base, namely, the selected scanning attribute information data is unified into a certain format for generating the knowledge base; on the other hand, in the running process of the system, the text of the scanning attribute information to be analyzed is uniformly converted into a certain format for judgment by the classifier application module. The functions of the system provided by the embodiment of the present invention are specifically referred to the above method embodiments, and are not repeated here.
According to the two-dimensional code anti-counterfeiting system provided by the embodiment of the invention, the characteristics of large information content and readability of the two-dimensional code pictures are utilized, the two-dimensional code pictures are used as anti-counterfeiting carriers, the non-first-verification two-dimensional code pictures are judged to be true or false according to the preset classifier and the first scanning attribute information, the commodity information type is intelligently distributed, the online real-time inquiry of the commodity true or false information is realized, and counterfeits can be rapidly and accurately identified.
The apparatus and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.

Claims (9)

1. The two-dimensional code anti-counterfeiting method is characterized by comprising the following steps of:
acquiring a two-dimensional code picture of a commodity to be detected and first scanning attribute information of scanning the two-dimensional code picture;
if the two-dimensional code picture is judged to pass the abstract verification and is not the first abstract verification, judging whether the commodity to be detected is true or false according to a preset classifier and the first scanning attribute information;
the digest verification includes:
determining two-dimensional code plaintext information according to the two-dimensional code picture;
determining commodity information and a first abstract according to the two-dimensional code plaintext information and a preset rule;
acquiring a commodity key according to the commodity information;
calculating a second abstract according to the commodity information, the commodity key and a preset abstract algorithm;
and judging whether the first abstract is identical to the second abstract.
2. The method of claim 1, wherein the two-dimensional code picture is generated by:
calculating a first abstract according to commodity information and commodity keys of the commodity to be detected and a preset abstract algorithm;
generating two-dimensional code plaintext information according to the commodity information and the first abstract and preset rules;
and generating a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information.
3. The method according to claim 1, wherein the preset classifier is obtained by:
acquiring second scanning attribute information of two-dimensional code samples in the sample set;
extracting a classification feature vector according to the second scanning attribute information;
and establishing a preset classifier according to the classification feature vector.
4. The method of claim 1, wherein the first scan attribute information includes, but is not limited to: scanning time, scanning location and scanning device.
5. A two-dimensional code anti-counterfeiting system is characterized by comprising:
the two-dimension code generation server is used for generating two-dimension code pictures of the commodity to be detected;
the two-dimensional code verification client is used for scanning the two-dimensional code picture, carrying out abstract verification on the two-dimensional code picture, and sending an abstract verification result and first scanning attribute information of scanning the two-dimensional code picture to the data analysis server;
the data analysis server is connected with the two-dimensional code verification client and is used for judging whether the two-dimensional code picture passes the abstract verification or not according to a preset classifier and the first scanning attribute information if the two-dimensional code picture is judged to pass the abstract verification; the digest verification includes: determining two-dimensional code plaintext information according to the two-dimensional code picture; determining commodity information and a first abstract according to the two-dimensional code plaintext information and a preset rule; acquiring a commodity key according to the commodity information; calculating a second abstract according to the commodity information, the commodity key and a preset abstract algorithm; and judging whether the first abstract is identical to the second abstract.
6. The system of claim 5, wherein the two-dimensional code generation server comprises:
the abstract calculation module is used for calculating a first abstract according to commodity information and commodity keys of the commodity to be detected and a preset abstract algorithm;
the assembly module is used for generating two-dimensional code plaintext information according to the commodity information, the first abstract and a preset rule;
and the picture generation module is used for generating a two-dimensional code picture of the commodity to be detected according to the two-dimensional code plaintext information.
7. The system of claim 5, wherein the two-dimensional code verification client comprises:
the scanning module is used for scanning a two-dimensional code picture of the commodity to be detected, acquiring first scanning attribute information, sending the two-dimensional code picture to the abstract verification module and sending the first scanning attribute information to the data analysis server;
and the abstract verification module is used for verifying whether the two-dimensional code picture passes the abstract verification.
8. The system of claim 5, wherein the data analysis server comprises:
the classifier establishing module is used for establishing a preset classifier according to the second scanning attribute information of the two-dimensional code samples in the sample set;
and the classifier application module is used for determining the authenticity of the commodity to be detected according to the first scanning attribute information and a preset classifier.
9. The system of claim 8, wherein the classifier creation module comprises:
the acquisition unit is used for acquiring second scanning attribute information of the two-dimensional code samples in the sample set;
an analysis unit, configured to extract a classification feature vector according to the second scan attribute information;
and the processing unit is used for establishing a preset classifier according to the classification feature vector.
CN201710582334.8A 2017-07-17 2017-07-17 Two-dimensional code anti-counterfeiting method and system Active CN107578250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710582334.8A CN107578250B (en) 2017-07-17 2017-07-17 Two-dimensional code anti-counterfeiting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710582334.8A CN107578250B (en) 2017-07-17 2017-07-17 Two-dimensional code anti-counterfeiting method and system

Publications (2)

Publication Number Publication Date
CN107578250A CN107578250A (en) 2018-01-12
CN107578250B true CN107578250B (en) 2023-06-16

Family

ID=61050082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710582334.8A Active CN107578250B (en) 2017-07-17 2017-07-17 Two-dimensional code anti-counterfeiting method and system

Country Status (1)

Country Link
CN (1) CN107578250B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063492B (en) * 2018-07-05 2020-11-13 北京小米智能科技有限公司 Information processing method and device
CN111680772A (en) * 2020-06-02 2020-09-18 云南省烟草质量监督检测站 Method, device and equipment for detecting authenticity of cigarette strip and box packaging paper

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714458A (en) * 2013-12-20 2014-04-09 江苏大学 Two-dimension code-based mobile terminal transaction encryption method
CN104268498A (en) * 2014-09-29 2015-01-07 杭州华为数字技术有限公司 Two-dimension code recognition method and terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110323B (en) * 2011-01-14 2012-11-21 深圳市怡化电脑有限公司 Method and device for examining money
CN103106413A (en) * 2013-02-07 2013-05-15 华中科技大学 Autograph two-dimension code representing and authentication method
CN104751337B (en) * 2013-12-31 2017-04-12 腾讯科技(深圳)有限公司 Product anti-fake method, device and system
US9858569B2 (en) * 2014-03-21 2018-01-02 Ramanan Navaratnam Systems and methods in support of authentication of an item
CN104881787A (en) * 2015-05-13 2015-09-02 景视佳传媒科技(北京)有限公司 Method, system and device for two-dimension code authenticity
CN105678369A (en) * 2016-02-25 2016-06-15 诸葛天下(北京)信息技术股份有限公司 Anti-counterfeiting-tag-based anti-counterfeiting method for commodity
CN106599964A (en) * 2016-11-24 2017-04-26 中国银联股份有限公司 Two-dimensional code generation and verification method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714458A (en) * 2013-12-20 2014-04-09 江苏大学 Two-dimension code-based mobile terminal transaction encryption method
CN104268498A (en) * 2014-09-29 2015-01-07 杭州华为数字技术有限公司 Two-dimension code recognition method and terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"一种提高QR码安全性的方法";张雅奇等;《信息技术》(第11期);第90-92,95页 *
Mohammad AIAhmad等."Protection of the Digital Holy Quran Hash Digest by Using Cryptography Algorithms".《2013 international Conference on Advanced Computer Science Applications and Technologies》.2014,全文. *
基于二维码和商用密码算法的商品防伪技术研究;耿子烨等;《数码世界》(第04期);第96-98页 *

Also Published As

Publication number Publication date
CN107578250A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
US10740767B2 (en) Centralized databases storing digital fingerprints of objects for collaborative authentication
US10956732B2 (en) System and method for detecting the authenticity of products
AU2014324171A1 (en) System for authenticating items
CN104995656A (en) Unauthorized product detection techniques
CN109685528A (en) System and method based on deep learning detection counterfeit product
CN111476559A (en) Merchant authentication method and device, computer equipment and storage medium
CN108537227A (en) A kind of offline false distinguishing method of commodity based on width study and wide-angle micro-image
CN106651407B (en) Data acquisition method and device
CN110298662A (en) Transaction repeats the automated detection method and device submitted
CN107578250B (en) Two-dimensional code anti-counterfeiting method and system
CN109544715A (en) It registers method, apparatus, terminal device, system and storage medium
US10581840B2 (en) Systems and methods for product authentication
CN111985930B (en) Client number generation method and device
US11328568B2 (en) Method and apparatus for generating information, and device for human-computer interaction
US10248532B1 (en) Sensitive data usage detection using static analysis
CN115018505A (en) Payment request processing method, device, equipment and storage medium
WO2020014314A1 (en) Currency verification and transaction validation system
CN106570711B (en) Method and system for authenticity analysis
CN112465600A (en) Order data detection method and system applied to online business
CN111611465A (en) Product detection system, method, device, computer equipment and storage medium
CN110782265A (en) Information processing method, device, system and computer readable storage medium
CN116318974A (en) Site risk identification method and device, computer readable medium and electronic equipment
KR20040044555A (en) Method and system for authenticating a packaged good
CN113688650B (en) Method and device for identifying picture
KR101873246B1 (en) Method for searching product classification and providing shopping data based on object recognition, server and system thereof

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