CN109102305B - Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof - Google Patents

Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof Download PDF

Info

Publication number
CN109102305B
CN109102305B CN201810886975.7A CN201810886975A CN109102305B CN 109102305 B CN109102305 B CN 109102305B CN 201810886975 A CN201810886975 A CN 201810886975A CN 109102305 B CN109102305 B CN 109102305B
Authority
CN
China
Prior art keywords
intelligent contract
article
hash value
transaction
blockchain
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
CN201810886975.7A
Other languages
Chinese (zh)
Other versions
CN109102305A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810886975.7A priority Critical patent/CN109102305B/en
Publication of CN109102305A publication Critical patent/CN109102305A/en
Application granted granted Critical
Publication of CN109102305B publication Critical patent/CN109102305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses an article anti-counterfeiting and tracing method realized by using a block chain and an intelligent contract thereof.A producer issues a transaction for deploying the intelligent contract to the block chain at a production end, acquires a first hash value returned by the block chain, attaches the first hash value to the surface of an article, shoots a first image of a specified area on the surface of the article, issues the transaction for deploying the first image to the block chain, acquires a second hash value returned by the block chain, and transmits the second hash value to the intelligent contract; after the article reaches a consumption end through a circulation link, a consumer acquires a first hash value from the surface of the article, then acquires a second hash value through a block chain and an intelligent contract, further acquires a first image, then shoots a second image of a specified area on the surface of the article, then identifies and contrasts the first image and the second image, and realizes the consistency check of the article through the consistency identification and contrast of the images, thereby realizing the anti-counterfeiting and traceability of the article.

Description

Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof
Technical Field
The invention relates to the field of information processing technology and anti-counterfeiting technology, in particular to an article anti-counterfeiting and tracing method realized by using a block chain and an intelligent contract thereof.
Background
In order to distinguish whether or not an article in circulation is dropped, two-dimensional codes, RFID, and the like are used. For a part of circulating articles, a party can verify whether the articles received by a receiver or a consumer and the articles sent by a sender or a producer are the same by identification and comparison of the images of the articles, which requires that the conditions for shooting the images of the articles by the receiver of the articles and the conditions for shooting the images of the articles by the sender of the articles are consistent, and the sender of the articles can transmit the images of the articles shot by the sender of the articles to the receiver of the articles through a channel which is not falsifiable and counterfeitable, so that the receiver of the articles can identify and compare the images of the articles shot by the receiver of the articles and the received images of the articles transmitted by the sender of the articles through an artificial intelligence algorithm, and the consistency verification of the articles is realized through the identification and comparison of the consistency of the images. How to tell the receiver of article the shooting condition when the sender of article was shot article image with its, how to transmit the article image that the sender shot article image to the receiver of article through a channel that can't be tampered, can't be forged is the key problem of realizing the identification contrast based on article image to confirm the uniformity of circulation article.
The block chain technology is an application set of computer information technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and from the data level, the block chain is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence.
Disclosure of Invention
In order to solve the technical problems, the invention provides a commodity anti-counterfeiting and tracing method realized by using a blockchain and an intelligent contract thereof.A producer firstly issues a transaction I for deploying the intelligent contract to the blockchain at a production end, acquires a hash value I returned by the blockchain and corresponding to the transaction I, attaches the hash value I to the surface of a commodity, then shoots a commodity image I in a specified area of the surface of the commodity by using a digital camera, then issues a transaction II for deploying data to the blockchain, converts the image into transaction data of the transaction II, acquires a hash value II which is returned by the blockchain and uniquely identifies the transaction II, and then calls a method I of the intelligent contract to transmit the hash value II as anti-counterfeiting key data of the commodity to a state variable I of the intelligent contract; after an article reaches a consumption end through a circulation link, a consumer firstly obtains a first hash value from the surface of the article, then an interface for accessing an intelligent contract is constructed by using the first hash value, then a second method for calling the intelligent contract in a block chain is called, and the value of a first state variable of the intelligent contract is obtained, wherein the first hash value comprises a second hash value, then transaction data of block chain transaction with the unique identifier of the second hash value is obtained by using the second hash value to access the block chain, the transaction data is converted into a first image, a second article image of an appointed area on the surface of the article is shot by adopting shooting conditions consistent with a producer, then the first image and the second image are identified and compared, and consistency check of the article is realized through consistency identification and comparison of the images, so that anti-counterfeiting and traceability of the article are realized.
In one embodiment of the article anti-counterfeiting and tracing method implemented by using the block chain and the intelligent contract thereof, the specific steps at the production end include:
1) issuing a transaction one for deploying an intelligent contract to a blockchain, and acquiring a hash value one which is returned by the blockchain and corresponds to the transaction one;
for the blockchain technology, the intelligent contract may be regarded as a program running on a blockchain, and therefore, before the intelligent contract is deployed, a source program of the intelligent contract needs to be written, the source program is compiled, and when a transaction time for deploying the intelligent contract is issued, the compiling result is transaction data of the transaction one.
After a user issues a transaction for deploying an intelligent contract to a blockchain, a blockchain miner confirms the transaction one and then indicates that the intelligent contract is packaged into the blockchain, and in consideration of delay of confirming the transaction by the blockchain miner, for a pipeline product, the hash value one can be a hash value which is returned by the blockchain and uniquely identifies the transaction one; for anti-counterfeiting and tracing of non-pipelined products, such as celebrity calligraphy and painting, and ancient porcelain playing, the hash value one can be a blockchain account address of the intelligent contract after the blockchain miners confirm the transaction one.
2) Attaching the hash value one to the surface of the article;
the first hash value is attached to the surface of the article by the user, the first hash value can be directly transmitted among different users in each link of circulation through the article, other modes are not needed, and any anonymous user can obtain the first hash value by directly observing the surface of the article.
3) Shooting a first article image of a designated area on the surface of the article by using a digital camera with a magnifying or microscopic function;
wherein, the purpose of taking the enlarged or microscopic image of the object is that the surface of the same kind of object does not have unique distinctiveness in macroscopic view, such as two apples which look similar, or a vase with uniform surface, color or pattern, at this time, the image of the surface of the object is enlarged or microscopic, so that the unique fine texture of the surface can be observed, such as spots and lines on the surface of the apple, sintered texture of ceramic, wood grain, metal surface processing trace, and the local image of the surface of the object after enlargement or microscopy can be used as the unique 'fingerprint' of the object for distinguishing different objects;
the purpose of shooting the designated area of the surface of the article is to shoot a local image of the surface of the article, which is magnified or microscopic at the same position, in each link of article circulation.
4) Issuing a transaction two of deployment data to a block chain, converting the image into transaction data of the transaction two, packaging the transaction data of the transaction two into the block chain through the transaction two, and acquiring a hash value two which is returned by the block chain and uniquely identifies the transaction two;
the purpose of deploying the check value of the image one instead of the image one as the transaction data of the transaction two into the blockchain is to fully utilize the decentralized feature of the blockchain, if only the check value of the image one is deployed as the transaction data of the transaction two into the blockchain, a data center is needed to store the image one, and when the data center is inaccessible, the image one is also inaccessible, so that the decentralized feature of the blockchain is obviously destroyed;
after the user deploys a second data transaction to the blockchain, the user needs the blockchain miners to confirm the second transaction to indicate that the first image is packaged into the blockchain, but the action of confirming the second transaction in the blockchain miners does not change the second hash value.
5) Calling the method I of the intelligent contract, and transmitting the hash value II serving as anti-counterfeiting key data of the article to the state variable I of the intelligent contract;
the first hash value is attached to the surface of the article, a user can obtain the first hash value by observing and identifying the surface of the article, and according to a block chain technology, the user can further obtain an access interface of the intelligent contract through the first hash value, so that after the second hash value is transmitted to the first state variable of the intelligent contract, the user can obtain the value of the first state variable of the intelligent contract, namely the second hash value, through a second method of the intelligent contract, and further can obtain transaction data of the second transaction, namely the first image through the block chain technology;
for the blockchain technology, when the intelligent contract method is called to change the value of the state variable of the intelligent contract, the method calling can be completed only after the blockchain miner confirms, and the value of the state variable of the intelligent contract can be modified only, but the transaction is delayed in the blockchain, so that the step 5) does not need to process subsequent confirmation time.
Further, the producer has a registered account in the blockchain; preferably, there is a one-to-one correspondence between producers and blockchain accounts.
Further, the producer issues a transaction to the blockchain for an item to deploy an intelligent contract, i.e., to build a one-to-one correspondence between the item and the intelligent contract.
Furthermore, the intelligent contract comprises a first method for allowing only the account number for deploying the intelligent contract to add anti-counterfeiting key data, and can also comprise a second method for allowing other account numbers to add circulation link key data;
preferably, the anti-counterfeiting key data comprises a hash value of the transaction two and producer data;
preferably, the circulation link key data includes a hash value of a blockchain transaction of the deployment data and corresponding circulation channel data.
And further, after the hash value I is coded into a two-dimensional code of a public code system or a private code system, the two-dimensional code is attached to the surface of the article.
Further, areas for shooting the object images in different shapes are marked according to the characteristics of the object or the characteristics of the surface of the object.
Furthermore, after the central area of the two-dimensional code is hollowed out, the two-dimensional code is attached to the surface of an article.
Furthermore, when the two-dimensional code with the hollow center is attached to the surface of an article, the marked shooting area is visible through the two-dimensional code hollow area.
Further, the central hollow-out area of the two-dimensional code is used as a designated area for shooting the surface image of the article.
Optionally, the hash value I or the two-dimensional code is printed on a stickable label and then pasted on the surface of an article;
optionally, directly printing the hash value I or the two-dimensional code on the surface of the article by using a special ink printer;
optionally, the hash value I or the two-dimensional code is attached to the surface of an article in an embroidering, sewing or dyeing mode;
optionally, the hash value or the two-dimensional code is directly engraved on the surface of the article by a laser marking machine.
Furthermore, shooting conditions for shooting the object image are attached to the surface of the object or are encoded into the two-dimensional code and then attached to the surface of the object.
Further, the digital camera is a digital camera with a macro shooting function.
Further, the smart contract only allows the contract deployment account to invoke method one at a time.
Further, after the article enters a circulation link, a circulation channel party shoots an article image in a designated area on the surface of the article by adopting a shooting condition consistent with a producer, issues a transaction of deployment data to a block chain, converts the article image into transaction data of the transaction, acquires a hash value corresponding to the transaction and returned by the block chain, and then calls a second method of the intelligent contract to transmit the hash value serving as key data of the circulation link to a second state variable of the intelligent contract.
Optionally, a data center may be provided, the data center uploads data such as video records of a process of producing or making the article by a producer, biological characteristics of the producer, and the like to the data center, and the data center generates an access link and a check value of the uploaded data, and the producer registers the access link and the check value returned by the data center as data information associated with the hash value one to the blockchain.
In another embodiment of the article anti-counterfeiting and tracing method implemented by using the block chain and the intelligent contract thereof, the article reaches the consumption end through the circulation channel, and the method at the consumption end comprises the following specific steps:
1) acquiring a first hash value from the surface of the article;
if the hash value is directly attached to the surface of the article, the consumer can acquire the first hash value in an artificial intelligence identification mode or a manual input mode of a user, and if the hash value is attached to the surface of the article, the consumer acquires the first hash value in a two-dimensional code scanning identification mode;
wherein, the shooting condition when the producer shoots the article image can also be obtained.
2) Constructing an intelligent contract access interface;
if the hash value is a hash value which is returned by a blockchain and uniquely identifies the first transaction of the intelligent contract, inquiring a blockchain miner with the hash value to a blockchain to confirm a transaction receipt of the first transaction, and extracting a blockchain account address of the intelligent contract in the transaction receipt, wherein the other condition is that the hash value is the blockchain account address of the intelligent contract;
according to the blockchain technology, the blockchain account address of the intelligent contract is known, so that a user can construct an intelligent contract interface and call an intelligent contract method in a corresponding blockchain through the interface.
3) Calling a second method of the intelligent contract in the block chain through the interface, acquiring a value of a first state variable of the intelligent contract, and acquiring anti-counterfeiting key data, wherein the first method comprises the second hash value;
in order to support full circulation tracing of the articles, the intelligent contract has two types of state variables, one type is only one state variable I for storing anti-counterfeiting key data and storing a hash value of a second deployment data transaction issued to a blockchain by an article producer, the other type is multiple state variables II for storing circulation channel key data and storing hash values of a transaction including the second deployment data issued to the blockchain by a channel party in a circulation link, and the second hash value obtained by calling a second method of the intelligent contract is the hash value of the second transaction issued to the blockchain by the producer.
4) Calling a query transaction interface of a block chain by the second hash value to acquire transaction data of a second transaction of the deployment data uniquely identified by the second hash value, and converting the transaction data into the first image;
the transaction data of the transaction two of the deployment data packaged in the blockchain is a complete image of a designated area on the surface of the article shot by an article producer, and the transaction data confirmed by a miner cannot be forged, denied or tampered, so that the transaction data is ideal blue book data for anti-counterfeiting verification.
5) Shooting a second article image of the designated area on the surface of the article by using a digital camera with a magnifying or microscopic function;
when the consumer terminal shoots the image of the article, the shooting condition is required to be set to be consistent with the shooting condition when the producer shoots the image, the article image shooting area is marked on the surface of the article, or the article image shooting area is determined by utilizing the hollow area in the center of the two-dimensional code, and the consumer terminal and the producer terminal can shoot the image at the same position; in addition, in step 1), additional shooting conditions including illumination, magnification, shooting distance, focal length and the like are obtained, so that the consumer end and the production end can shoot images with consistent image size, pixel brightness, color restoration and the like.
6) And identifying and comparing the second image with the first image, and realizing the consistency check of the article through the consistency identification and comparison of the images.
Further, the method does not limit the sequence of steps 5) and 2), 3), 4), i.e. step 5) may be performed before or after any of steps 2), 3), 4), without affecting the beneficial effect of the subsequent step 6) of performing the identification and comparison of the images, but may affect the psychology of the user, preferably in the sequence of steps 2), 3), 4), 5).
Further, the consumer can acquire the photographing conditions for photographing the image of the article from the surface of the article.
Further, the consumer may share a blockchain account number, which is necessary for each type of transaction issued to the blockchain, but if the outcome of the transaction does not change the state of the blockchain, the blockchain supports different transactions to initiate transactions using the same default account number, i.e., supports anonymous transactions with respect to the consumer.
The beneficial effects of the invention include: firstly, a producer deploys an intelligent contract to a block chain for each product, transmits data by using a method of the intelligent contract, and stores key data by using a state variable of the intelligent contract, so that the producer can call an intelligent contract method to transmit anti-counterfeiting key data, a circulation link can call the intelligent contract method to transmit circulation link key data, and flexible storage and extraction of product anti-counterfeiting and tracing data are realized by applying the intelligent contract;
secondly, identifying the intelligent contract deployed in the block chain by using the hash value attached to the surface of the article, transmitting the hash value identifying the transaction of the deployed complete image data to a state variable of the intelligent contract, establishing a one-to-one correspondence among the hash value on the surface of the article, the intelligent contract in the block chain and the image data in the block chain after the confirmation of a blockchain miner, ensuring that the article and the intelligent contract in the block chain cannot be forged and changed by using a blockchain technology, and destroying the correspondence if the article is replaced, thereby realizing the irretrievable of the article;
thirdly, both a producer and a consumer shoot the article images in the same area under the same condition, the article images shot by the consumer are identified and compared with the article images obtained from the block chain, the consistency verification of the articles is realized through the consistency identification and comparison of the images, if the articles are replaced, the article images shot by the consumer cannot be matched with the article images obtained from the block chain, and any article passing the verification can be traced to the producer of the article through the characteristic that the data in the block chain cannot be forged and cannot be repudiated, so that the anti-counterfeiting and tracing of the article are realized;
fourthly, the invention fully utilizes the decentralized characteristic of the block chain technology, completely stores the article image shot by a producer in the block chain, and key data for article anti-counterfeiting is stored in the block chain nodes after the confirmation of miners, so that the anti-counterfeiting verification and article traceability of the article can be realized under the condition that the independent terminal synchronous with the block chain is off-line, and the convenient and fast portable anti-counterfeiting verification and circulation traceability terminal can be constructed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention.
Fig. 1 is a schematic structural diagram of an article anti-counterfeiting and tracing method implemented by using a block chain and an intelligent contract thereof according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a shooting area of an article picture marked on the surface of an article according to an embodiment of the present invention.
Fig. 3 is a schematic view of an interface structure for interacting an article anti-counterfeiting and tracing method implemented by using a block chain and an intelligent contract thereof and the block chain and the intelligent contract according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a hash value and encoding the hash value into a two-dimensional code according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a two-dimensional code according to an embodiment of the present invention, the center area of which is hollowed out.
Detailed Description
The invention is further described with reference to the following figures and specific examples, which are not intended to be limiting.
A first embodiment.
As shown in fig. 1 to 5, a method for preventing counterfeit and tracing to source of an article by using a blockchain and an intelligent contract thereof includes, at a production end 100:
step S101, deploying an intelligent contract, acquiring a block chain return hash value one 302: calling a blockchain interface, issuing a transaction one 301 for deploying an intelligent contract to a blockchain, and acquiring a hash value one 302 corresponding to the transaction one returned by the blockchain;
for the blockchain technology, the intelligent contract may be considered as a program running on a blockchain, so that before the intelligent contract is deployed, a source program of the intelligent contract needs to be written, the source program is compiled, and when a transaction one 301 deploying the intelligent contract is issued, the compiling result is transaction data of the transaction one 301.
After a user issues a transaction one 301 for deploying an intelligent contract to a blockchain, a blockchain miner confirms the transaction one 301 to indicate that the intelligent contract is packaged into the blockchain, and considering the delay of confirming the transaction by the blockchain miner, for a pipeline product, the hash value one 302 may be a hash value which is returned by the blockchain and uniquely identifies the transaction one 301, for example, in an ethernet, the hash value for marking the transaction one 301 is a 64-bit hexadecimal number; for anti-counterfeiting and tracing of non-pipelined products, such as celebrity calligraphy and painting, and ancient porcelain playing, the hash value one may be the blockchain account address of the intelligent contract after the blockchain miners confirm 301 the transaction, for example, in an ethernet workshop, the blockchain account address identifying the intelligent contract is a 40-digit hexadecimal number.
Each producer user registers an account in the blockchain in advance, and preferably, the producer and the blockchain account are in one-to-one correspondence.
Wherein, the producer issues a trade one for deploying the intelligent contract to the blockchain for an item 301, namely the item and the intelligent contract have a one-to-one relationship.
The intelligent contract comprises state variables for storing data and a method for calling a user, wherein the method comprises a first method for allowing an account number which is deployed with the intelligent contract to add anti-counterfeiting key data and a second method for allowing other account numbers to add circulation link key data.
Step S102, attaching the first hash value 302 to the surface of an article;
the user attaches the first hash value 302 to the surface of the article, and the first hash value 302 can be directly transmitted between different users through the article in each link of circulation without other ways, and any anonymous user can obtain the first hash value 302 by directly observing the surface of the article.
Optionally, the user may print the first hash value 302 on a stickable label and then stick the stickable label to the surface of the article, which requires that the label is immovable after being stuck to the surface of the article, or the user may print the first hash value 302 directly on the surface of the article by using a special ink printer, or the user may directly engrave the first hash value 302 on the surface of the article by using a laser marking machine;
wherein, optionally, for silk fabrics and the like, the user can attach the hash value one 302 to the surface of the article by embroidery, sewing or dyeing.
Further, after encoding the hash value one 302 into the two-dimensional code 401 of the public code system or the private code system, the user can attach the two-dimensional code to the surface of the article.
Further, the user can attach the shooting condition for shooting the image of the article to the surface of the article or attach the image to the surface of the article after the image is coded in the two-dimensional code 401.
Step S103, shooting a first article image of the designated area on the surface of the article: shooting a first article image of a designated area on the surface of the article by using a digital camera with a magnifying or microscopic function;
wherein, the purpose of taking the enlarged or microscopic image of the object is that the surface of the same kind of object does not have unique distinctiveness in macroscopic view, such as two apples which look similar, or a vase with uniform surface, color or pattern, at this time, the image of the surface of the object is enlarged or microscopic, so that the unique fine texture of the surface can be observed, such as spots and lines on the surface of the apple, sintered texture of ceramic, wood grain, metal surface processing trace, and the enlarged or microscopic image of the surface of the object can be used as the unique 'fingerprint' of the object for distinguishing different objects of the same kind; on the other hand, the purpose of shooting the designated area on the surface of the article is to shoot the magnified or microscopic image of the same position in each link of article circulation.
According to the characteristics of the article or the characteristics of the surface of the article, as shown in fig. 2, areas for shooting the image of the article with different shapes can be marked, and the area for shooting the image of the article cannot be the area where the surface of the article is attached to the hash value of one 302;
if the hash value one 302 is encoded into the two-dimensional code 401 and then attached to the surface of the article in step S102, the central area 501 of the two-dimensional code 401 is hollowed out, and then the hollowed area 501 is used as a shooting area of the image of the surface of the article.
4) Deploying the first image, acquiring a block chain return hash value two 304: issuing a trade II 303 of deployment data to a blockchain, converting the image into trade data of the trade II 303 so as to enable the trade data to be packaged into the blockchain through the trade II 303, and acquiring a hash value II 304 which is returned by the blockchain and uniquely identifies the trade II 303;
the purpose of deploying the complete image data of the first image, but not the check value of the first image, as the transaction data of the second transaction 303 into the blockchain is to fully utilize the decentralized feature of the blockchain, if only the check value of the first image is deployed into the blockchain as the transaction data of the second transaction 303, a data center is needed to store the first image, and when the data center is inaccessible, the first image is also inaccessible, which obviously destroys the decentralized feature of the blockchain;
for the blockchain technology, after the user deploys the second transaction 303 to the blockchain, the second transaction 303 needs to be confirmed by the blockchain miner, which means that the first image is packaged into the blockchain, but the action of the second transaction 303 is confirmed by the blockchain miner, and the second hash value 304 is not changed.
5) Invoking the smart contract method one 305, passing the hash value two 304: invoking a first method 305 of the intelligent contract, and transmitting the second hash value 304 as anti-counterfeiting key data of the article to a state variable of the intelligent contract;
the first hash value 302 is attached to the surface of the article, a user can obtain the first hash value 302 by observing and identifying the surface of the article, and according to a blockchain technology, the user can further obtain an access interface of the intelligent contract through the first hash value 302, so that after the second hash value 304 is transmitted to the first state variable of the intelligent contract, the user can obtain the first state variable of the intelligent contract, namely the second hash value 304, by the second method of the intelligent contract, and further can obtain the transaction data of the second transaction 303, namely the first image, by the blockchain technology.
In the method, for the blockchain technology, an intelligent contract method is called, and the value of a state variable of an intelligent contract is changed, after the blockchain miner confirms, the method is completed only by calling 305, and the value of the state variable can be modified, but the transaction delay of the blockchain is caused, so the step 5) can not need to process the subsequent confirmation time.
Further, the first intelligent contract method 305 only allows the contract deployment account to be invoked once, that is, only allows the user to transfer the anti-counterfeiting key data of the article to the first state variable of the intelligent contract, but does not allow the anti-counterfeiting key data to be updated or replaced;
preferably, the anti-counterfeiting key data comprises a second hash value 304 of the second transaction and producer data.
In the article anti-counterfeiting and tracing method implemented by using the blockchain and the intelligent contract thereof, further, after an article enters a circulation link, a circulation channel party shoots an article image in a designated area on the surface of the article by adopting a shooting condition consistent with a producer, issues a transaction of deployment data to the blockchain, converts the article image into transaction data of the transaction, acquires a hash value corresponding to the transaction returned by the blockchain, and then calls a method of the intelligent contract to transmit the hash value as key data of the circulation link to a state variable two of the intelligent contract;
preferably, the circulation link key data includes a hash value of a blockchain transaction of the deployment data and corresponding circulation channel data.
In the article anti-counterfeiting and tracing method implemented by using the blockchain and the intelligent contract thereof according to this embodiment, optionally, a data center may be provided, the data center uploads data such as video records of a process in which a producer produces or manufactures the article, and biological characteristics of the producer, and generates an access link and a check value of the uploaded data by the data center, and the producer registers the access link and the check value returned by the data center to the blockchain as data information associated with the hash value attached to the surface of the article.
In summary, in the method for article anti-counterfeiting and tracing by using a blockchain and an intelligent contract thereof according to this embodiment, at a production end, a producer first issues a transaction one for deploying an intelligent contract to the blockchain, obtains a hash value one corresponding to the transaction one and returned by the blockchain, attaches the hash value one to the surface of an article, then shoots an article image one in a designated area on the surface of the article by using a digital camera, then issues a transaction two for deploying data to the blockchain, converts the image into transaction data of the transaction two, obtains a hash value two uniquely identifying the transaction two and returned by the blockchain, and then calls the method one of the intelligent contract to transfer the hash value two as anti-counterfeiting key data of the article to a state variable one of the intelligent contract.
A second embodiment.
As shown in fig. 1 to 5, a method for preventing counterfeit and tracing to source of an article by using a blockchain and an intelligent contract thereof includes, at a consuming end 200:
step S106, acquiring the hash value I302 from the surface of the article;
if the first hash value 302 is directly attached to the surface of the article, the consumer can acquire the first hash value 302 in an artificial intelligence image recognition mode or a manual input mode of a user, and if the two-dimensional code 401 is attached to the surface of the article, the consumer acquires the first hash value 302 in a two-dimensional code 401 scanning recognition mode;
wherein, the shooting condition when the producer shoots the article image can also be obtained.
Step S107, an intelligent contract access interface is constructed;
wherein if the hash value one 302 is a hash value returned by a blockchain uniquely identifying the deploy intelligent contract transaction one 301, for example, for an ethernet, the hash value one 302 is a 64-bit hexadecimal number, querying a blockchain miner with the hash value one 302 to confirm the transaction receipt 306 of the transaction one 301 and extract the blockchain account address of the intelligent contract in the transaction receipt 306, and in another case, the hash value one 302 is the blockchain account address of the intelligent contract, for example, for the ethernet, the hash value one 302 is a 40-bit hexadecimal number;
according to the blockchain technology, the blockchain account address of the intelligent contract is known, so that a user can construct an intelligent contract interface and call an intelligent contract method in a corresponding blockchain through the interface.
Step S108 calls the second intelligent contract method 308 with the interface to obtain the second hash value 304: calling a second interface 308 of the intelligent contract in the block chain through an access interface, acquiring a value of a first state variable of the intelligent contract, and acquiring anti-counterfeiting key data, wherein the anti-counterfeiting key data comprises a second hash value 304;
in order to support the full circulation tracing of the articles, the intelligent contract has two types of state variables, one type is only one state variable I for storing anti-counterfeiting key data, the hash value II 304 of the deployment data transaction II 303 issued to the blockchain by an article producer is stored, and the other type is provided with a plurality of state variables II for storing circulation channel key data, and the hash value of the transaction of the deployment data issued to the blockchain by a channel party in a circulation link is stored.
Step S109 calls the query transaction interface 310 of the block chain with the second hash value 304 to obtain the first image: calling a query transaction interface 310 of a block chain by using the second hash value 304, acquiring transaction data of the second deployment data transaction 303 uniquely identified by the second hash value 304, and converting the transaction data into the first image;
the transaction data of the second transaction 303 of the deployment data packaged in the blockchain is a complete image of a designated area on the surface of the article shot by an article producer, and the transaction data confirmed by a miner cannot be forged, denied or tampered, so that the second transaction data is ideal blue data for anti-counterfeiting verification.
Where the account number of the transaction initiator is necessary for each type of transaction issued to the blockchain, but if the outcome of the transaction does not change the state of the blockchain, the blockchain supports different transactions to initiate transactions using the same default account number, i.e., supports anonymous transactions with respect to the consumer. .
Step S110 is to photograph a second article image of the designated area on the article surface: shooting a second article image of the designated area on the surface of the article by using a digital camera with a magnifying or microscopic function;
when the consumer terminal shoots the image of the article, the shooting condition is required to be set to be consistent with the shooting condition when the producer shoots the image, the article image shooting area is marked on the surface of the article, or the article image shooting area is determined by utilizing the hollow area in the center of the two-dimensional code 401, and the consumer terminal and the producer terminal can shoot the image at the same position;
in step 1), additional shooting conditions including illumination, magnification, shooting distance, focal length and the like can be obtained, so that the consumer end and the production end can shoot images with consistent image size, pixel brightness, color restoration and the like.
Step S111, the second image and the first image are identified and compared: and identifying and comparing the second image with the first image, and realizing the consistency check of the article through the consistency identification and comparison of the images.
In the method for preventing counterfeit and tracing to source of an article by using a block chain and an intelligent contract thereof described in this embodiment, the method does not limit the sequence implemented between step S110 and step S107, step S108, and step S109, that is, step S110 may be implemented before or after any step of step S107, step S108, and step S109, and does not affect the beneficial effect of image recognition and comparison in subsequent step S111, but may affect the psychology of a user, and preferably is implemented in the sequence of step S107, step S108, step S109, and step S110.
In summary, in the method for anti-counterfeit and tracing to the source of the article by using the blockchain and the intelligent contract thereof described in this embodiment, the consumer first obtains the hash value one from the surface of the article, then, an interface for accessing the intelligent contract is constructed by utilizing the first hash value, then a second method of the intelligent contract in the block chain is called, the value of a first state variable of the intelligent contract is obtained, the transaction data of the transaction two which is uniquely identified by the hash value two are obtained by utilizing a hash value two access block chain, and converting the transaction data into a first image, shooting a second image of the article in the designated area on the surface of the article by adopting shooting conditions consistent with the producer, and then, identifying and comparing the first image and the second image, and realizing the consistency check of the article through the consistency identification and comparison of the images, thereby realizing the anti-counterfeiting and tracing of the article.
The technical solutions provided by the present invention are described in detail above, and for those skilled in the art, the ideas according to the embodiments of the present invention may be changed in the specific implementation manners and the application ranges, and in summary, the content of the present description should not be construed as limiting the present invention.

Claims (7)

1. A physical anti-counterfeiting and tracing method realized by using a blockchain and an intelligent contract thereof is characterized in that step 1) a producer issues a first transaction for deploying the intelligent contract to the blockchain, obtains a first hash value returned by the blockchain, wherein the first hash value corresponds to an address of the intelligent contract, step 2) attaches the first hash value to the surface of an article, step 3) shoots a first image of the article in a designated area of the surface of the article by using a digital camera, step 4) issues a second transaction for deploying data to the blockchain, converts the image into second transaction data of the second transaction, packages the second transaction data into the blockchain through the second transaction, obtains a second hash value which is returned by the blockchain and uniquely identifies the second transaction, step 5) calls a first method for the intelligent contract, and transmits the second hash value to a first state variable of the intelligent contract, wherein the intelligent contract comprises a method one which is only allowed to be used by a producer for deploying the intelligent contract, and step 6) after the article enters a circulation link, a channel party can call the intelligent contract and transfer circulation link data to a state variable two of the intelligent contract, wherein the intelligent contract comprises a method two which is allowed to be used by the circulation channel party.
2. The physical anti-counterfeiting and tracing method implemented by using the block chain and the intelligent contract thereof according to claim 1, wherein the intelligent contract only allows a producer to use the method one time.
3. The physical anti-counterfeiting and tracing method implemented by using the blockchain and the intelligent contract thereof as claimed in claim 1, wherein before the step 2), the method comprises a step of encoding the hash value one into a two-dimensional code.
4. The physical anti-counterfeiting and tracing method realized by using the block chain and the intelligent contract thereof according to claim 3, wherein before the step 2), the method comprises a step of hollowing out a central region of the two-dimensional code.
5. The physical anti-counterfeiting and tracing method implemented by using the block chain and the intelligent contract thereof according to claim 1, wherein before the step 3), a step of marking a shooting area on the surface of the article is included.
6. The physical anti-counterfeiting and tracing method implemented by using blockchains and intelligent contracts thereof according to any one of claims 1 to 5, wherein step 7) a consumer obtains the first hash value from the surface of a commodity, step 8) uses the first hash value to call a third method of the intelligent contract, obtains the value of a first state variable of the intelligent contract, wherein the first hash value is included, wherein the intelligent contract comprises a third method which is allowed to be used by the consumer, step 9) uses the second hash value to access the blockchains, obtains transaction data of blockchain transaction uniquely identified by the second hash value, and converts the transaction data into a first image, step 10) uses shooting conditions consistent with a producer to shoot a second commodity image of a specified area on the surface of the commodity, and step 11) identifies and compares the first image with the second image, and the consistency verification of the article is realized through the consistency identification comparison of the images.
7. The physical anti-counterfeiting and tracing method implemented by using the block chain and the intelligent contract thereof according to claim 6, wherein the sequence of steps 10) and 7), 8) and 9) is not limited, that is, step 10) can be implemented before or after any of steps 7), 8) and 9).
CN201810886975.7A 2018-08-06 2018-08-06 Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof Active CN109102305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810886975.7A CN109102305B (en) 2018-08-06 2018-08-06 Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810886975.7A CN109102305B (en) 2018-08-06 2018-08-06 Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof

Publications (2)

Publication Number Publication Date
CN109102305A CN109102305A (en) 2018-12-28
CN109102305B true CN109102305B (en) 2022-03-29

Family

ID=64848923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810886975.7A Active CN109102305B (en) 2018-08-06 2018-08-06 Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof

Country Status (1)

Country Link
CN (1) CN109102305B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109829731A (en) * 2019-01-30 2019-05-31 众安信息技术服务有限公司 Source tracing method based on block chain and device of tracing to the source
CN109978571B (en) * 2019-04-01 2024-01-19 众安信息技术服务有限公司 Block chain-based tracing method and tracing device
CN110084623B (en) * 2019-04-18 2021-03-19 深圳市科迈爱康科技有限公司 Block chain-based product anti-counterfeiting method and device and three-dimensional label anti-counterfeiting product
CN110134668B (en) * 2019-04-28 2023-08-01 创新先进技术有限公司 Data migration method, device and equipment applied to blockchain
WO2019144978A2 (en) * 2019-05-20 2019-08-01 Alibaba Group Holding Limited Identifying copyrighted material using embedded copyright information
SG11202002616QA (en) 2019-05-20 2020-04-29 Alibaba Group Holding Ltd Identifying copyrighted material using copyright information embedded in electronic files
PL3662637T3 (en) 2019-05-20 2021-09-20 Advanced New Technologies Co., Ltd. Identifying copyrighted material using embedded copyright information
EP3673390B1 (en) 2019-05-20 2022-10-05 Advanced New Technologies Co., Ltd. Identifying copyrighted material using embedded copyright information
SG11202002417PA (en) 2019-05-20 2020-04-29 Alibaba Group Holding Ltd Identifying copyrighted material using copyright information embedded in tables
CN111279338A (en) 2019-05-20 2020-06-12 阿里巴巴集团控股有限公司 Identifying copyrighted material using embedded copyright information
WO2019141297A2 (en) 2019-05-20 2019-07-25 Alibaba Group Holding Limited Copyright protection based on hidden copyright information
CN110809763A (en) 2019-05-20 2020-02-18 阿里巴巴集团控股有限公司 Identifying copyrighted material using time-stamped embedded copyright information
CN110866761A (en) * 2019-11-07 2020-03-06 四川农链数科科技有限公司 Anti-counterfeiting mark and tracing method and system for decentralized article
CN113269568A (en) * 2021-05-25 2021-08-17 深圳市尊时科技有限公司 Ceramic bubble anti-counterfeiting method
CN113641992A (en) * 2021-08-14 2021-11-12 深圳众享互联科技有限公司 Chain tracing method of data and data operation algorithm
CN115983874B (en) * 2023-02-17 2023-06-30 江苏秀圆果信息科技有限公司 Wine anti-counterfeiting tracing method and system thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339880A (en) * 2016-08-23 2017-01-18 白大文 Product production method and system for users to trace and examine filling process easily
CN106598579A (en) * 2016-12-06 2017-04-26 北京果仁宝科技有限公司 Method and device for integrating dynamic type programming language on block chain
CN107341676A (en) * 2017-07-17 2017-11-10 深圳天净喔溯源科技有限公司 False proof mark and the method for tracing to the source
CN107657460A (en) * 2017-09-08 2018-02-02 众安信息技术服务有限公司 A kind of tobacco based on block chain is false proof and source tracing method and system
CN108269100A (en) * 2018-04-08 2018-07-10 景德镇陶瓷大学 A kind of self-service product fidelity based on block chain technology and device of tracing to the source

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140279613A1 (en) * 2013-03-14 2014-09-18 Verizon Patent And Licensing, Inc. Detecting counterfeit items

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339880A (en) * 2016-08-23 2017-01-18 白大文 Product production method and system for users to trace and examine filling process easily
CN106598579A (en) * 2016-12-06 2017-04-26 北京果仁宝科技有限公司 Method and device for integrating dynamic type programming language on block chain
CN107341676A (en) * 2017-07-17 2017-11-10 深圳天净喔溯源科技有限公司 False proof mark and the method for tracing to the source
CN107657460A (en) * 2017-09-08 2018-02-02 众安信息技术服务有限公司 A kind of tobacco based on block chain is false proof and source tracing method and system
CN108269100A (en) * 2018-04-08 2018-07-10 景德镇陶瓷大学 A kind of self-service product fidelity based on block chain technology and device of tracing to the source

Also Published As

Publication number Publication date
CN109102305A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN109102305B (en) Article anti-counterfeiting and tracing method realized by block chain and intelligent contract thereof
CN206805623U (en) A kind of random texture anti-fake product and random grain anti-fake system
CN102099844B (en) Univocal label to be stored by optical devices, method of production of the same and use thereof in the anticounterfeiting and in the identification of products
CN104794629B (en) Handset identity coding sawtooth method for anti-counterfeit
CN101836221B (en) Security system using encoded image with puzzled image
CN106782035B (en) Sawtooth code anti-counterfeiting method
CN105144198B (en) System and method for note recognition
CN104809622A (en) Ultra-limit texture anti-counterfeiting method
CN112313716B (en) Method for producing a security element in an image that is invisible to the human eye and that is not reproducible, and printed image
CN109472337B (en) Label anti-counterfeiting method and device based on random characteristics
CN104820854A (en) Combined anti-counterfeiting mark, and generation method and generation device of combined anti-counterfeiting mark
EP3671604A1 (en) Product anti-counterfeiting verification system based on natural biological information
CN103745247A (en) Mark and anti-fake identification method
US20150076219A1 (en) Tactile anti-forgery method using random emboss
CN107705139A (en) A kind of novel article anti-counterfeiting authentication method
CN106997540A (en) A kind of commodity counterfeit prevention traceability system and method based on dual authentication mechanism
US20200412555A1 (en) Anti-counterfeiting tag, system and method of manufacturing and authentication therefor
CN111813354A (en) Anti-counterfeit label printing system and printing method thereof
CN108647980A (en) A kind of Antiforge recognizing method of fine diffusion trace
CN109102046A (en) Novel Internet anti-counterfeiting system and method
TW201839669A (en) Anti-fake label identifying method
CN110033694A (en) The method for anti-counterfeit and antifalsification label and application system of random aberration inducing
KR20090001382A (en) Puzzle typed keycode with image, and security system and method using it
WO2018173756A1 (en) Information recording medium
CN112396142A (en) Anti-counterfeiting traceability application system and anti-counterfeiting traceability method for ceramic tiles

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