CN110809058A - Block chain traceability system and method based on feature code identification and verification technology - Google Patents

Block chain traceability system and method based on feature code identification and verification technology Download PDF

Info

Publication number
CN110809058A
CN110809058A CN201911103506.4A CN201911103506A CN110809058A CN 110809058 A CN110809058 A CN 110809058A CN 201911103506 A CN201911103506 A CN 201911103506A CN 110809058 A CN110809058 A CN 110809058A
Authority
CN
China
Prior art keywords
data
entity
module
verification
block chain
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.)
Granted
Application number
CN201911103506.4A
Other languages
Chinese (zh)
Other versions
CN110809058B (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.)
Beijing Wuzi University
Original Assignee
Beijing Wuzi 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 Beijing Wuzi University filed Critical Beijing Wuzi University
Priority to CN201911103506.4A priority Critical patent/CN110809058B/en
Publication of CN110809058A publication Critical patent/CN110809058A/en
Application granted granted Critical
Publication of CN110809058B publication Critical patent/CN110809058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Abstract

The invention provides a block chain traceability system based on a feature code identification and verification technology, which comprises the following steps: the acquisition layer is used for respectively acquiring a plurality of state attribute characteristics of the entity by deploying the Internet of things equipment nodes, and storing the acquired state attribute characteristics as data in a data storage file format; the transmission layer is used for transmitting the acquired state data information to the processing layer through a data transmission protocol, further processing the data and ensuring that the data can be transmitted under the condition of unreliable network conditions; the processing layer is used for realizing related operations of data analysis and processing, and comprises a data cleansing module DCM (data cleansing module), a data Standardization module DSM (data Standardization module), a data Encryption module DEM (data Encryption module) and a data Verification module DVM (data Verification module); a storage layer: a storage function for data; a presentation layer: the intelligent contract management system is used for executing related operations of the intelligent contract, automatically executing corresponding rules through the intelligent contract, and inquiring and displaying the operation. A corresponding tracing method is also disclosed.

Description

Block chain traceability system and method based on feature code identification and verification technology
Technical Field
The invention relates to the technical field of block chains, in particular to a block chain traceability system and a block chain traceability method based on a feature code identification and verification technology.
Background
At present, the block chain technology is different from military projects, is developed rapidly, and is widely concerned and popularized. The block chain is a chain data structure formed by combining blocks for storing data according to a time sequence, adopts a cryptology mode to ensure the safe access of the data, has non-tamper property, ensures the public transparency of the data through distributed storage and a consensus mechanism, and can realize the data processing and the operation of related services by using an automatically executed intelligent contract code. Specifically, the blockchain uses an encryption algorithm, a consensus mechanism and a P2P (Point) network correlation technique to ensure that data cannot be tampered and key data is stored in the blockchain in a chained manner, wherein the data and the transaction records are public and transparent, and the tracing of each data can be realized in a secure access manner. Therefore, the block chain has the characteristics of traceability, no tampering, decentralization and transparent transaction process.
Tracing refers to tracing the whole life cycle of a processing object to monitor the whole process, find problems and trace to a specific person of responsibility. Due to the technical and architecture advantages of the block chain, the block chain is suitable for product traceability, can enhance the authenticity of traceability information, perfects a traceability mechanism on the basis, increases the counterfeiting cost and risk, and improves the credibility of a traceability system. At present, the research on the application of block chain traceability is more, for example, a beef traceability scheme based on a block chain technology is introduced in kyoto; IBM and walmart collaborated on a pork source tracking project.
A basic precondition for tracing is to have an identification code, which can identify a tracing object. However, the problem that the traceability item has one code with multiple purposes and one code with multiple objects exists at present, and the one code with multiple purposes means that the bar code can be repeatedly used in each link of production, circulation and the like of an entity. The code-unmatched object means that the barcode of the entity has the risk of being tampered, cannot correspond to the characteristics of the entity one by one, and uniquely identifies the entity. In addition, the current commonly used identification code only can keep static attribute information, and cannot provide state conditions, and the state information plays an important role in tracing and transaction reliability. Therefore, in the internet of things + blockchain mode, the primary objective is to digitize the identity of an entity, ensure the one-to-one correspondence between the real identity and the digital identity, and inseparable the entity from the barcode, thereby requiring the provision of effective status characteristic information.
Disclosure of Invention
In order to solve the problems, the invention provides a system and a method for tracing a block chain based on a characteristic code identification and verification technology. The data are collected and the feature codes are constructed through the Internet of things equipment, the feature codes comprise two parts of fixed attribute information and state information, and analysis and verification can be carried out in the tracing process. The system and the method are mainly suitable for the source tracing application of live livestock and poultry.
The invention aims to provide a block chain traceability system based on a feature code identification and verification technology, which comprises the following steps:
the acquisition layer is used for acquiring state data information of the entity, respectively acquiring a plurality of state attribute characteristics of the entity by deploying the Internet of things equipment nodes, and storing the acquired state attribute characteristics as data in a universal and simple data storage file format;
the transmission layer is used for transmitting the state data information acquired by the Internet of things equipment nodes of the acquisition layer to the processing layer through a data transmission protocol, further processing the data and ensuring that the data can be transmitted under the condition of unreliable network conditions;
and (3) treatment layer: the processing layer comprises a data cleansing module DCM (data cleansing module), a data standardization module DSM (data standardization module), a data Encryption module DEM (data Encryption module) and a data Verification module DVM (data Verification module);
a storage layer: a storage function for data;
a presentation layer: the intelligent contract management system is used for executing related operations of the intelligent contract, automatically executing corresponding rules through the intelligent contract, and inquiring and displaying the operation.
Preferably, the file format of the collection layer is a data storage file format of csv (com Separated value), json (javascript Object notification), xml (extensible Markup language) type.
Preferably, the data Transmission Protocol of the transport layer is TCP/IP (Transmission control Protocol/Internet Protocol) or MQTT (message queue queuing teletransmission Protocol).
Preferably, the DCM is configured to filter data that does not conform to the data storage file format, read corresponding data through an algorithm, perform examination and verification on the data by using a data cleaning method, remove duplicate values and abnormal values, compare and verify data acquired by different devices if there are multiple internet of things acquisition devices at the same acquisition point, obtain a cleaned data set, and send the data set to the DSM for further processing.
Preferably, the data normalization module DSM is configured to normalize the data passing through the data cleansing module, and according to different practical application scenarios, different normalization methods are adopted to eliminate differences between dimensions and dimension units between different attributes.
Preferably, the data encryption module DEM is configured to ensure security of a feature code in an entity, prevent the entity from being tampered by encrypting a feature code ID generated by a feature value of the entity, and store the feature code ID in the entity in a block chain database bcd (blockchain database) in an encrypted manner.
Preferably, the data verification module DVM is configured to ensure authenticity and benign state of an entity, so as to implement trusted traceability and transaction, and the function of the data verification module is divided into two parts, one part is to verify an entity fixed ID obtained from a block chain and confirm an identity; the other part decrypts the feature code ID in the data encryption module DEM, and then uses a verification algorithm to compare and verify the feature code ID with the current real feature value of the entity; and verifying the uniqueness, authenticity and benign state of the entity through the verification algorithm, wherein the data is represented to be credible only if the data verification is successful.
Preferably, the storage layer has three storage modes, which are JSON files, Blockchain databases (BCDs), and Blockchain Systems (BCS), respectively, where:
the JSON file is used for storing original data collected by the Internet of things equipment; the block chain database adopts a distributed storage mode, and a unique fixed ID generated by an entity and a feature code ID encrypted by a data encryption module are respectively stored in the block chain database, wherein the fixed ID is used for identifying identity information of the entity, and the feature code ID ensures the safety and traceability of data; the blockchain system realizes the automation of transaction through intelligent contracts, and uploads the fixed ID of the entity to the blockchain system through the intelligent contracts without manual intervention.
Preferably, the presentation layer is provided with a data query module, a data display module and a data uplink module, users in all links of a supply chain including a supervision node log in the presentation layer, then query entity related information through the data query module, and display the searched information in the data display module of the presentation layer; and the block chain adopts a alliance chain, a plurality of users or managers in each link issue data as nodes of the alliance chain, and the entity fixed ID is uploaded to the block chain system through an intelligent contract.
The invention also aims to provide a block chain tracing method based on the characteristic code identification and verification technology, which comprises the following steps:
step 1, after each entity is generated, a publishing user or an administrator stores fixed data information during the production of the entity into a Block Chain Database (BCD), inquires and traces the fixed data information, generates a unique fixed ID of the entity, and uploads the unique fixed ID to a block chain system through an intelligent contract;
step 2, the internet of things equipment is used as an acquisition terminal, entity data with a digital Identity (ID) are acquired and used as an entity characteristic value, the characteristic value is dynamically tracked to ensure the reliability of the acquired data, the entity characteristic value is preprocessed, part of data with larger fluctuation is smoothed, verification is performed through a cosine similarity algorithm to ensure the authenticity and credibility of the entity characteristic value, the verified stable characteristic value is used as a characteristic code ID of the entity and is stored in a Block Chain Database (BCD), wherein the preprocessing is performed on the entity characteristic value, and the process of smoothing part of data with larger fluctuation comprises the following steps:
step 21, preliminarily filtering and cleaning the acquired data beyond the normal range, then obtaining the characteristic value of the entity by adopting a moving average method, and updating the characteristic value in real time by circularly using the moving average method, wherein the moving average method is a method for carrying out moving average calculation on time series data in a specified time period;
step 22: standardizing the characteristic values, and eliminating differences of dimensions and dimension units among different attributes through standardization;
the verification process by the cosine similarity algorithm includes:
step 23: cosine similarity processing is conducted on the characteristic values after the standard, the cosine similarity processing is achieved through a cosine similarity calculation method, the cosine similarity is obtained through calculation of a formula (1), the closer the cosine value is to 1, the closer the included angle is to 0 degree, the lower the difference degree of the two vectors is, if three-dimensional variables are adopted, the three characteristic values collected at the previous time point of the entity are used as a first vector, the updated three characteristic values are used as a second vector, and the stability of the characteristic values of the entity is proved through calculation of the cosine value of the included angle between the two vectors;
Figure BDA0002270545390000051
wherein X1, Y1 and Z1 respectively represent a first vector consisting of three eigenvalues collected at a previous time point of the entity, and X2, Y2 and Z2 respectively represent a second vector consisting of three updated eigenvalues;
step 3, combining the fixed ID and the feature code ID of the entity to generate a digital identity ID certificate which uniquely identifies a target entity so as to realize the public transparency, the non-tampering and the state expression of the entity identity, namely the digital identity ID consists of two parts, namely the fixed ID and the feature code ID, wherein the fixed ID is the ID obtained when the entity is generated, and the feature code ID is a feature value which dynamically changes along with the entity;
step 4, in the process of tracing inquiry or entity transaction, when an entity is transported from a production place to a destination, measuring the characteristic value of the entity and the characteristic value extracted from the entity digital identity ID certificate to carry out cosine similarity verification, successfully verifying that the entity is credible and unique and the state characteristic meets the requirement, and further finishing credible tracing or transaction operation; if the verification fails, other methods need to be further verified, otherwise, the tracing or transaction operation cannot be completed.
The invention has the beneficial effects that:
the invention provides a block chain traceability system and a block chain traceability method based on a feature code identification and verification technology on the basis of adopting an Internet of things terminal device and a block chain, which not only enhances the credibility of traceability data storage and solves the problem that information is easy to be distorted, but also realizes the digitization of entity identities by using the Internet of things device at the edge end of the block chain and tightly combines the entity with digital identities. In addition, the characteristic value reflects the dynamic characteristics of the entity, can be used as effective information to ensure the benign state of the entity, and further ensures high-quality tracing and transaction operation.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter, by way of illustration and not limitation, with reference to the accompanying drawings. The same reference numbers in the drawings identify the same or similar elements or components. Those skilled in the art will appreciate that the drawings are not necessarily drawn to scale. The objects and features of the present invention will become more apparent in view of the following description taken in conjunction with the accompanying drawings, in which:
fig. 1 is a block chain tracing system architecture diagram based on signature identification and verification technology according to an embodiment of the present invention;
FIG. 2 is a flowchart of a block chain tracing method based on signature identification and verification according to a first embodiment of the present invention;
fig. 3 is a flowchart of a feature extraction prototype system of a blockchain internet-of-things device pig oriented blockchain traceability method based on feature code identification and verification technology according to a second embodiment of the present invention;
fig. 4 is a diagram illustrating an example of a fixed ID rule for a pig according to a second embodiment of the present invention;
fig. 5 is a diagram showing an example of the rule of the feature code ID of a pig according to a second embodiment of the present invention.
Detailed Description
In order to make the present invention more comprehensible with respect to its gist, the present invention will be further described with reference to the accompanying drawings and examples. In the following description, numerous specific details and specific examples are set forth in order to provide a more thorough understanding of the present invention and to provide a thorough understanding of the present invention. While this invention is susceptible of embodiment in many different forms than that described herein, there will be many equivalents to those skilled in the art which incorporate such variations and modifications without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.
Referring to fig. 1, the system for tracing a block chain based on feature code identification and verification technology of the present embodiment includes:
the acquisition layer is used for acquiring data information of the entity, respectively acquiring a plurality of state attribute characteristics of the entity by deploying the Internet of things equipment nodes, and storing the acquired state attribute characteristics as data in a universal and simple file format; the file format of the collection layer is CSV (Comma Separated value), JSON (JavaScript object notification), XML (extensible Markup language) data storage file format.
The transmission layer is used for transmitting the state data information acquired by the Internet of things equipment nodes of the acquisition layer to the processing layer through a data transmission protocol, further processing the data and ensuring that the data can be transmitted under the condition of unreliable network conditions; the data Transmission Protocol of the Transport layer is TCP/IP (Transmission control Protocol/Internet Protocol) or MQTT (message queue Telemetry Transport Protocol), although other Transmission protocols known to those skilled in the art may also be used.
And (3) treatment layer: the processing layer comprises a data cleaning module DCM, a data standardization module DSM, a data encryption module DEM and a data verification module DVM.
The data cleaning module DCM is used for filtering out data which do not conform to the format of the data storage file, and reading the corresponding data through an algorithm. And (3) using a data cleaning method to inspect and check the data, removing repeated values and abnormal values, if the same acquisition point has a plurality of internet-of-things acquisition devices, comparing and verifying the data acquired by different devices to obtain a cleaned data set, and sending the data set to a data standardization module DSM for further processing.
The data standardization module DSM is used for standardizing the data passing through the data cleaning module, and adopting different standardization methods to eliminate differences of dimensions and dimension units among different attributes according to different practical application scenes.
The data encryption module DEM is used for ensuring the security of the characteristic value in the entity, preventing the characteristic code ID generated by the characteristic value of the entity from being tampered by encrypting the characteristic code ID, and storing the characteristic code ID in the entity in a block chain database bcd (blockchain database) in an encrypted manner.
The data verification module DVM is used for ensuring the authenticity and the benign state of an entity so as to realize credible tracing and transaction, and the function of the data verification module is divided into two parts, wherein one part is used for verifying the fixed ID of the entity acquired from the block chain and confirming the identity; the other part decrypts the feature code ID in the data encryption module DEM, and then uses a verification algorithm to compare and verify the feature code ID with the current real feature value of the entity; the uniqueness, authenticity and benign state of the entity are verified through a verification algorithm, and the data is credible only if the data verification is successful, so that the reliability of the tracing or transaction operation is effectively improved. The verification algorithm is a cosine similarity method.
A storage layer: a storage function for data; the storage layer has three storage modes, namely a JSON file, a Blockchain Database (BCD) and a Blockchain system (BCS), wherein: the JSON file is used for storing original data collected by the Internet of things equipment; the block chain database adopts a distributed storage mode, has the advantages of high throughput, low delay and large capacity on the basis of the basic characteristics of the block chain, and respectively stores a unique fixed ID generated by an entity and a feature code ID encrypted by a data encryption module, wherein the fixed ID is used for identifying the identity information of the entity, and the feature code ID ensures the safety and traceability of data; the blockchain system realizes the automation of transactions through intelligent contracts, and uploads the fixed ID of the entity to the blockchain system through the intelligent contracts without manual intervention.
A presentation layer: the presentation layer is provided with a data query module, a data display module and a data uplink module. After a user logs in a presentation layer in each link of a supply chain including a supervision node, a data query module queries entity related information, and the searched information can be displayed in a data display module of the presentation layer; the block chain adopts a alliance chain, a plurality of users or managers in each link can serve as nodes of the alliance chain to issue data, and the entity fixed ID is uploaded to the block chain system through an intelligent contract.
Referring to fig. 2, a first embodiment provides a block chain tracing method based on a feature code identification and verification technology, and in order to solve the problems of one code being multipurpose and code being not object-to-object, the embodiment designs a digital identity ID of a target entity capable of being uniquely identified, where the ID is composed of two parts, a fixed ID and a feature code ID. Where the fixed ID is the ID obtained when the entity is generated and the signature ID is a dynamically changing value of the signature with the entity. A specific embodiment of the method comprises the following steps:
step 1: when an entity is produced in a certain place, a fixed ID which uniquely identifies the entity is given according to the fixed characteristics of the entity, wherein the fixed ID can comprise a production place, a production date, a current time stamp and the like, and the fixed ID is uploaded to a block chain database BCD.
Step 2: the method comprises the steps of collecting a plurality of state attribute characteristics of an entity through Internet of things equipment, transmitting collected data to a server end through a transmission protocol MQTT protocol, and storing the data in a general JSON data format, wherein the adopted Internet of things equipment is sensor, raspberry group, Arduino board, NodeMCU (ESP8266) and other Internet of things equipment known in the field. In the data acquisition process of the Internet of things equipment, the single chip microcomputer is adopted to carry out program control on the equipment, and by arranging the alarm device, when the data measured by the Internet of things equipment is not accordant with the program setting, the alarm device is triggered to remind a worker to carry out manual inspection so as to ensure the reliability of the acquired data.
And step 3: reading the collected data, primarily filtering and cleaning the data beyond the normal range, then obtaining the characteristic value of the entity by adopting a moving average method, and circularly updating the characteristic value by using the moving average method in real time.
The moving average method is a method of moving an average value of time-series data in a predetermined time period. The moving average method performs data analysis by using a moving average. In this embodiment, the average value of the feature data of the same attribute from the first day to the fifth day is used as the first feature value, the average value from the second day to the sixth day is used as the second feature value, and new feature values are continuously obtained to perform the next data analysis. Therefore, the characteristic value is the dynamic characteristic of the entity, and the latest state of the entity is continuously acquired, stored and processed and updated.
And 4, step 4: and (4) normalizing the characteristic values to eliminate the difference of dimensions and dimension units among different attributes through normalization.
And 5: and performing cosine similarity processing on the standard characteristic value, and realizing by using a cosine similarity calculation method. The cosine similarity algorithm is an algorithm for evaluating two vectors by calculating the cosine value of the included angle of the two vectors, and the closer the cosine value is to 1, the closer the included angle is to 0 degree, and the formula is shown in (2). In this embodiment, a three-dimensional variable is used, that is, three eigenvalues collected at a previous time point of the entity are used as a first vector, three updated eigenvalues are used as a second vector, and by calculating a cosine value of an included angle between the two vectors, when the cosine value is greater than 0.95, it is indicated that the difference between the two vectors is very low, so as to prove the stability of the eigenvalue of the entity.
Figure BDA0002270545390000091
Wherein, X1, Y1, Z1 respectively represent a first vector composed of three eigenvalues collected at a previous time point of the entity, and X2, Y2, Z2 respectively represent a second vector composed of three updated eigenvalues;
step 6: the characteristic value verified by the cosine similarity is used as the characteristic code ID of the entity and is stored in a block chain database BCD; and simultaneously combining the fixed ID of the entity with the feature code ID to generate a unique digital identity ID certificate. To achieve public transparency, non-tampering and state expression of entity identities.
And 7: during tracing inquiry or entity transaction, when an entity is transported from a production place to a destination, the cosine similarity verification is carried out on the characteristic value of the entity and the characteristic value extracted from the digital identity ID certificate of the entity, and when the value is verified to be more than 0.95, the entity can be proved to be credible and unique, and the state characteristic meets the requirement, thereby completing credible tracing or transaction operation. If the verification fails, other methods for further verification need to be adopted, otherwise, the tracing or transaction operation cannot be completed.
See fig. 3, a second embodiment.
The specific implementation mode comprises the following steps:
step 1: when a new pig is born in a farm, the pig is given a fixed ID uniquely identifying the pig as shown in fig. 4, wherein the fixed ID may include the region, farm, date of birth, male and female, and current timestamp. And uploading the fixed ID to the blockchain database. The issuing user or administrator uploads the fixed ID of the pig to the blockchain system through an intelligent contract.
In actual needs, the pig birth obtains a fixed ID, the pig is traced during the breeding or transaction process, the state cannot be stored, the authenticity of the pig cannot be further determined through state attributes, and the risk of the occurrence of fake information is still small. In order to effectively reduce this phenomenon, the embodiment designs a set of dynamic feature codes ID to track the features of the pigs in real time.
Step 2: the method comprises the steps of collecting three attribute characteristics of a pig through Internet of things equipment such as a sensor and a raspberry pie, transmitting collected data to a server end through an MQTT protocol, and storing the data in a JSON data format.
And step 3: reading the acquired data from the JSON, performing primary filtering and cleaning on the data beyond the normal range, acquiring the characteristic value of the entity by adopting a moving average method, and updating the characteristic value by circularly using the moving average method.
And 4, step 4: and normalizing the updated characteristic values to eliminate the difference of dimensions and dimension units among different attributes through normalization. In order to maintain the accuracy of the measurement in the system, the accurate measurement is required, and the accurate digit of the three attributes of the system is set to four digits, so the accurate digit is standardized to the number between 1000 and 10000.
And 5: the cosine similarity processing is performed on the normalized feature values, and in this embodiment, three-dimensional variables, namely, the weight, the body temperature, and the height, are used. Namely, three eigenvalues collected at the previous time point of the entity are used as a first vector, the three updated eigenvalues are used as a second vector, and the cosine value of the included angle between the two vectors is calculated, and when the cosine value is greater than 0.95, the difference degree of the two vectors is very low, so that the stability of the eigenvalue of the entity is proved.
Step 6: the characteristic value after the cosine similarity verification is used as the characteristic code ID of the entity and is stored in a block chain database; meanwhile, the fixed ID of the pig and the feature code ID are combined to generate a two-dimensional code with a unique digital identity. To achieve the public transparency, non-tampering and state expression of the entity identity; the signature ID rule is shown in fig. 5.
And 7: in the process of tracing inquiry or entity transaction, when a pig is transported from a farm to a slaughter house, the characteristic value of the pig is measured and the characteristic value is extracted from the two-dimensional code of the digital identity of the pig for cosine similarity verification, and when the value is verified to be greater than 0.95, the pig can be proved to be credible and unique, and the state characteristic meets the requirement, so that credible tracing or transaction operation is completed. If the verification fails, other methods for further verification need to be adopted, otherwise, the tracing or transaction operation cannot be completed.
And 8: the data of each pig is obtained from the block chain database, and the relevant data information of the pigs can be displayed through a page.
The two embodiments realize the digitization of the entity identity, ensure the one-to-one correspondence of the real identity and the digital identity, provide the state attribute to ensure the state verification and promote the close combination of the entity and the digital identity.
While the present invention has been described with reference to the particular illustrative embodiments, it is not to be restricted by the embodiments but only by the appended claims. It will be understood by those skilled in the art that variations and modifications of the embodiments of the present invention can be made without departing from the scope and spirit of the invention.

Claims (10)

1. A block chain traceability system based on a feature code identification and verification technology is characterized by comprising:
an acquisition layer: the system comprises a data storage file, a state data acquisition unit, a state attribute acquisition unit and a state attribute acquisition unit, wherein the data storage file is used for acquiring state data information of an entity, respectively acquiring a plurality of state attribute characteristics of the entity by deploying Internet of things equipment nodes, and storing the acquired plurality of state attribute characteristics as data in a universal and simple data storage file format;
a transmission layer: the data transmission layer is used for transmitting the state data information acquired by the Internet of things equipment nodes of the acquisition layer to the processing layer through a data transmission protocol, further processing the data and ensuring that the data can be transmitted under the condition of unreliable network conditions;
and (3) treatment layer: the processing layer comprises a data cleansing module DCM (data cleansing module), a data Standardization module DSM (data Standardization module), a data Encryption module DEM (data Encryption module) and a data verification module DVM (data verification module);
a storage layer: a storage function for data;
a presentation layer: the intelligent contract management system is used for executing related operations of the intelligent contract, automatically executing corresponding rules through the intelligent contract, and inquiring and displaying the operation.
2. The system of claim 1, wherein the system comprises: the file format of the acquisition layer is a data storage file format of CSV (Comma Separated value), JSON (JavaScriptObject Notation) and XML (extensible Markup language) type.
3. The system of claim 1, wherein the system comprises: the data Transmission Protocol of the Transmission layer is TCP/IP (Transmission Control Protocol/internet Protocol) or MQTT (Message Queuing telemeasuring Transport Protocol).
4. The system of claim 1, wherein the system comprises: the data cleaning module DCM is used for filtering out data which do not conform to the data storage file format, reading corresponding data through an algorithm, using a data cleaning method to carry out examination and verification on the data, removing repeated values and abnormal values, if a plurality of internet of things collection devices exist at the same collection point, comparing and verifying the data collected by different devices to obtain a cleaned data set, and sending the data set to the data standardization module DSM for further processing.
5. The system of claim 1, wherein the system comprises: the data standardization module DSM is used for standardizing the data passing through the data cleaning module, and adopting different standardization methods to eliminate differences of dimensions and dimension units among different attributes according to different practical application scenes.
6. The system of claim 1, wherein the system comprises: the data encryption module DEM is used for ensuring the security of the feature codes in the entity, preventing the feature codes from being tampered by encrypting the feature code IDs generated by the entity feature values, and storing the feature code IDs in the entity in a block chain database bcd (blockchain database) in an encrypted manner.
7. The system of claim 1, wherein the system comprises: the data verification module DVM is used for ensuring the authenticity and the benign state of an entity so as to realize credible tracing and transaction, and the function of the data verification module is divided into two parts, wherein one part is used for verifying the fixed ID of the entity acquired from the block chain and confirming the identity; the other part decrypts the feature code ID in the data encryption module DEM, and then uses a verification algorithm to compare and verify the feature code ID with the current real feature value of the entity; and verifying the uniqueness, authenticity and benign state of the entity through the verification algorithm, wherein the data is represented to be credible only if the data verification is successful.
8. The system of claim 1, wherein the system comprises: the storage layer has three storage modes, namely a JSON file, a Block Chain Database (BCD) and a Block Chain System (BCS), wherein:
the JSON file is used for storing original data collected by the Internet of things equipment; the block chain database adopts a distributed storage mode, and a unique fixed ID generated by an entity and a feature code ID encrypted by a data encryption module are respectively stored in the block chain database, wherein the fixed ID is used for identifying identity information of the entity, and the feature code ID ensures the safety and traceability of data; the blockchain system realizes the automation of transaction through intelligent contracts, and uploads the fixed ID of the entity to the blockchain system through the intelligent contracts without manual intervention.
9. The system of claim 1, wherein the system comprises: the presentation layer is provided with a data query module, a data display module and a data uplink module, users in all links of a supply chain including a supervision node log in the presentation layer and query entity related information through the data query module, and the searched information is displayed in the data display module of the presentation layer; the block chain adopts a alliance chain, and a plurality of users or administrators of all links issue data as nodes of the alliance chain; and uploading the entity fixed ID to the block chain system through the intelligent contract.
10. A tracing method of a blockchain tracing system based on signature code identification and verification technology according to claims 1-9, comprising the steps of:
step 1, after each entity is generated, a publishing user or an administrator stores fixed data information during the production of the entity into a Block Chain Database (BCD), inquires and traces the fixed data information, generates a unique fixed ID of the entity, and uploads the unique fixed ID to a block chain system through an intelligent contract;
step 2, the internet of things equipment is used as an acquisition terminal, entity data with a digital Identity (ID) are acquired and used as an entity characteristic value, the characteristic value is dynamically tracked to ensure the reliability of the acquired data, the entity characteristic value is preprocessed, part of data with larger fluctuation is smoothed, verification is performed through a cosine similarity algorithm to ensure the authenticity and credibility of the entity characteristic value, the verified stable characteristic value is used as a characteristic code ID of the entity and is stored in a Block Chain Database (BCD), wherein the preprocessing is performed on the entity characteristic value, and the process of smoothing part of data with larger fluctuation comprises the following steps:
step 21, preliminarily filtering and cleaning the acquired data beyond the normal range, then obtaining the characteristic value of the entity by adopting a moving average method, and updating the characteristic value in real time by circularly using the moving average method, wherein the moving average method is a method for carrying out moving average calculation on time series data in a specified time period;
step 22: standardizing the characteristic values, and eliminating differences of dimensions and dimension units among different attributes through standardization;
the verification process by the cosine similarity algorithm includes:
step 23: cosine similarity processing is conducted on the characteristic values after the standard, the cosine similarity processing is achieved through a cosine similarity calculation method, the cosine similarity is obtained through calculation of a formula (1), the closer the cosine value is to 1, the closer the included angle is to 0 degree, the lower the difference degree of the two vectors is, if three-dimensional variables are adopted, the three characteristic values collected at the previous time point of the entity are used as a first vector, the updated three characteristic values are used as a second vector, and the stability of the characteristic values of the entity is proved through calculation of the cosine value of the included angle between the two vectors;
Figure FDA0002270545380000041
wherein X1, Y1 and Z1 respectively represent a first vector consisting of three eigenvalues collected at a previous time point of the entity, and X2, Y2 and Z2 respectively represent a second vector consisting of three updated eigenvalues;
step 3, combining the fixed ID and the feature code ID of the entity to generate a digital identity ID certificate which uniquely identifies a target entity so as to realize the public transparency, the non-tampering and the state expression of the entity identity, namely the digital identity ID consists of two parts, namely the fixed ID and the feature code ID, wherein the fixed ID is the ID obtained when the entity is generated, and the feature code ID is a feature value which dynamically changes along with the entity;
step 4, in the process of tracing inquiry or entity transaction, when an entity is transported from a production place to a destination, measuring the characteristic value of the entity and the characteristic value extracted from the entity digital identity ID certificate to carry out cosine similarity verification, successfully verifying that the entity is credible and unique and the state characteristic meets the requirement, and further finishing credible tracing or transaction operation; if the verification fails, other methods for further verification need to be adopted, otherwise, the tracing or transaction operation cannot be completed.
CN201911103506.4A 2019-11-13 2019-11-13 Block chain traceability system and method based on feature code identification and verification technology Active CN110809058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911103506.4A CN110809058B (en) 2019-11-13 2019-11-13 Block chain traceability system and method based on feature code identification and verification technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911103506.4A CN110809058B (en) 2019-11-13 2019-11-13 Block chain traceability system and method based on feature code identification and verification technology

Publications (2)

Publication Number Publication Date
CN110809058A true CN110809058A (en) 2020-02-18
CN110809058B CN110809058B (en) 2020-10-27

Family

ID=69502587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911103506.4A Active CN110809058B (en) 2019-11-13 2019-11-13 Block chain traceability system and method based on feature code identification and verification technology

Country Status (1)

Country Link
CN (1) CN110809058B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462872A (en) * 2020-02-27 2020-07-28 山东公链信息科技有限公司 Vaccination reservation system based on block chain traceability technology
CN111770050A (en) * 2020-05-16 2020-10-13 贵阳信息技术研究院(中科院软件所贵阳分部) Sensor access and data transmission device based on block chain technology
CN112073251A (en) * 2020-10-27 2020-12-11 常州铂沃尔智能科技有限公司 Internet of things topology stability detection device and method based on DSM
CN112202830A (en) * 2020-03-16 2021-01-08 北京天德科技有限公司 Early warning decision system model based on block chain internet technology
CN113014575A (en) * 2021-02-23 2021-06-22 清华大学 Ore digging flow detection method and device based on time series tracking
CN113612766A (en) * 2021-07-30 2021-11-05 北京锐安科技有限公司 Data management device, method, computer equipment and storage medium
CN113627959A (en) * 2021-09-29 2021-11-09 支付宝(杭州)信息技术有限公司 Method and device for generating digital identity of geographic marking product
CN114926191A (en) * 2022-07-20 2022-08-19 一物一码数据(广州)实业有限公司 Block chain traceability system based on feature code identification and verification technology
CN116993373A (en) * 2023-09-27 2023-11-03 青岛君盛食品股份有限公司 Infant food information safety traceability management system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107403303A (en) * 2017-06-16 2017-11-28 兴业数字金融服务(上海)股份有限公司 A kind of signature method for the electronic contract system that card is deposited based on block chain
CN107657463A (en) * 2017-09-29 2018-02-02 北京京东尚科信息技术有限公司 Article is traced to the source platform and method and device
CN109191146A (en) * 2018-08-07 2019-01-11 广东蓝蜜蜂信息技术有限公司 A kind of agricultural product traceability system and its working method based on block chain
CN109325331A (en) * 2018-09-13 2019-02-12 北京航空航天大学 Transaction system is acquired based on the big data of block chain and credible calculating platform
CN109743323A (en) * 2019-01-08 2019-05-10 中国石油大学(华东) A kind of Resources Sharing based on block chain technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107403303A (en) * 2017-06-16 2017-11-28 兴业数字金融服务(上海)股份有限公司 A kind of signature method for the electronic contract system that card is deposited based on block chain
CN107657463A (en) * 2017-09-29 2018-02-02 北京京东尚科信息技术有限公司 Article is traced to the source platform and method and device
CN109191146A (en) * 2018-08-07 2019-01-11 广东蓝蜜蜂信息技术有限公司 A kind of agricultural product traceability system and its working method based on block chain
CN109325331A (en) * 2018-09-13 2019-02-12 北京航空航天大学 Transaction system is acquired based on the big data of block chain and credible calculating platform
CN109743323A (en) * 2019-01-08 2019-05-10 中国石油大学(华东) A kind of Resources Sharing based on block chain technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
乔 蕊 等: "《基于联盟链的物联网动态数据溯源机制》", 《软件学报》 *
吕婧淑 等: "《基于区块链和人脸识别的双因子身份认证模型》", 《应用科学学报》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462872A (en) * 2020-02-27 2020-07-28 山东公链信息科技有限公司 Vaccination reservation system based on block chain traceability technology
CN112202830A (en) * 2020-03-16 2021-01-08 北京天德科技有限公司 Early warning decision system model based on block chain internet technology
CN111770050A (en) * 2020-05-16 2020-10-13 贵阳信息技术研究院(中科院软件所贵阳分部) Sensor access and data transmission device based on block chain technology
CN111770050B (en) * 2020-05-16 2022-07-12 贵阳信息技术研究院(中科院软件所贵阳分部) Sensor access and data transmission device based on block chain technology
CN112073251B (en) * 2020-10-27 2022-09-02 常州铂沃尔智能科技有限公司 Internet of things topology stability detection device and method based on DSM
CN112073251A (en) * 2020-10-27 2020-12-11 常州铂沃尔智能科技有限公司 Internet of things topology stability detection device and method based on DSM
CN113014575A (en) * 2021-02-23 2021-06-22 清华大学 Ore digging flow detection method and device based on time series tracking
CN113014575B (en) * 2021-02-23 2022-03-22 清华大学 Ore digging flow detection method and device based on time series tracking
CN113612766A (en) * 2021-07-30 2021-11-05 北京锐安科技有限公司 Data management device, method, computer equipment and storage medium
CN113627959A (en) * 2021-09-29 2021-11-09 支付宝(杭州)信息技术有限公司 Method and device for generating digital identity of geographic marking product
CN114926191A (en) * 2022-07-20 2022-08-19 一物一码数据(广州)实业有限公司 Block chain traceability system based on feature code identification and verification technology
CN114926191B (en) * 2022-07-20 2022-11-22 一物一码数据(广州)实业有限公司 Block chain traceability system based on feature code identification and verification technology
CN116993373A (en) * 2023-09-27 2023-11-03 青岛君盛食品股份有限公司 Infant food information safety traceability management system
CN116993373B (en) * 2023-09-27 2023-12-22 青岛君盛食品股份有限公司 Infant food information safety traceability management system

Also Published As

Publication number Publication date
CN110809058B (en) 2020-10-27

Similar Documents

Publication Publication Date Title
CN110809058B (en) Block chain traceability system and method based on feature code identification and verification technology
Hepp et al. Securing physical assets on the blockchain: Linking a novel object identification concept with distributed ledgers
Kamaludin et al. Clone tag detection in distributed RFID systems
Kumar et al. Blockchain technology in food supply chain security
Bai et al. Entropic dynamic time warping kernels for co-evolving financial time series analysis
CN202584166U (en) RFID technology based foodstuff safety tracking system
Yang et al. Cloud-based livestock monitoring system using RFID and blockchain technology
CN108628973B (en) Agricultural data sharing system based on block chain
Chiranjeevi et al. Block chain technology in agriculture product supply chain
Son et al. Novel system using blockchain for origin traceability of agricultural products
CN111984724A (en) Operating strategy and distributed database for industrial field devices
CN106951743A (en) A kind of software code infringement detection method
CN111507710A (en) Data query and sharing system
CN105681088B (en) Reliability and performance comprehensive evaluation method for Internet of things
CN105069158B (en) Data digging method and system
Yuan et al. Trustworthy traceability of quality and safety for pig supply chain based on blockchain
CN117240522A (en) Vulnerability intelligent mining method based on attack event model
CN112035469A (en) Food data tracing method based on block chain
US20210233091A1 (en) System and method for facilitating a record of information of an organism
Zhang et al. Colour‐patterned fabric‐defect detection using unsupervised and memorial defect‐free features
CN111162945A (en) Method, device, equipment and storage medium for determining alarm association relationship
Kesidis An introduction to communication network analysis
Ganev et al. On the Inadequacy of Similarity-based Privacy Metrics: Reconstruction Attacks against" Truly Anonymous Synthetic Data''
CN111953546B (en) Internet of things equipment management method based on block chain system and intelligent home system
CN112950222A (en) Resource processing abnormity detection method and device, electronic equipment and storage medium

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