Disclosure of Invention
In order to overcome the technical problems, the invention provides a seed warehouse entry and exit management method and system based on a block chain, which greatly improve the seed warehouse entry and exit efficiency, save the labor and reduce the cost.
In order to achieve the purpose, the technical scheme of the invention is as follows:
according to one aspect of the invention, a block chain-based seed warehousing and warehousing management method is provided and comprises the following steps:
s1: a seed sending and storing step, in which a sending and storing unit node records seed information, the seed information comprises public information and private information, the public information is stored on all nodes of a block chain, the private information is only reserved in the block chain nodes of the sending and storing unit node, and only the sending and storing unit node can read the information; acquiring a block chain asset number according to the seed information and attaching the block chain asset number to a seed package;
and S2, germplasm asset transfer step: according to the key of the transfer unit node, transferring the germplasm assets to the transfer unit node;
s3, a seed warehousing step, in which, a germplasm library node records warehousing information which is only reserved in the block link points of the germplasm library node and only can be read;
s4 seed warehouse-out step: the usage unit node records usage information, which is shared by the delivery unit and the usage unit.
Preferably, the seed stocking step and the germplasm asset transfer step are performed simultaneously.
Preferably, the pairing data of the block chain asset number and the seed is stored in a database of the germplasm database.
Preferably, the transfer unit node may be a transfer and storage unit node or a germplasm library node; the assigned unit node may be a germplasm library node or a use unit node.
According to another aspect of the present invention, there is provided a blockchain-based seed in and out library management system, including:
the system comprises a seed storage unit node, a germplasm asset transfer unit node, a germplasm asset yielding unit node, a germplasm library node and a seed use unit node;
the seed sending and storing unit node is used for recording seed information, the seed information comprises public information and private information, the public information is stored on all nodes of a block chain, the private information is only reserved in the block chain nodes of the seed sending and storing unit node, and only the seed sending and storing unit node can read the information; acquiring a block chain asset number according to the seed information and attaching the block chain asset number to a seed package;
the germplasm asset transfer unit node is used for transferring germplasm assets to germplasm asset transfer unit nodes;
the germplasm asset assignor node is used for receiving the germplasm assets assigned by the germplasm asset assignor node;
the germplasm library node is used for recording warehousing information, the warehousing information is only reserved in the block link points of the germplasm library node, and only the germplasm library node can read the warehousing information;
the seed using unit node is used for recording using information, and the using information is shared by the transmitting and storing unit and the using unit.
According to another aspect of the present invention, there is provided a blockchain-based seed in and out library management system, including: the system comprises a seed storage module, a germplasm asset transfer module, a seed storage module, a seed delivery module, a block chain module and a local database module;
the seed sending and storing module is used for storing seed information into the block chain module; meanwhile, the seed storage module obtains the asset number of the block chain according to the seed information and attaches the asset number to a seed package, and the seeds are stored in a germplasm bank;
the germplasm asset transfer module is used for transferring germplasm resources and recording transfer information, and the transfer records are stored in the block chain module;
the seed storage module is used for recording the seed information stored by the seed storage module, and the information is stored in the local database module;
the seed ex-warehouse module is used for recording the extracted information of the seeds, and the extracted information is stored in the local database module;
preferably, the method further comprises the following steps: and the uplink seed query module is used for querying the seed information stored in the block chain module.
Preferably, the seed information includes but is not limited to: block chain asset number, transfer and storage unit seed number, transfer and storage quantity, storage condition and transfer and storage unit wallet.
Preferably, the assignment information includes, but is not limited to: block chain asset number, transfer timestamp, transfer-out wallet address and sponsor information, transfer-in wallet address and sponsor information.
The invention has the beneficial effects that:
the invention takes the block chain technology as a support, can fully play the technical advantages of the block chain distributed account book, and has great value for long-term storage of germplasm resources, frequent seed warehousing and ex-warehouse management, avoidance of data information loss, and convenient lookup and access of germplasm resource information. The account book is separated into two databases, and the data needing to be shared, such as the access amount of the seeds, the time stamps and the like, can not be tampered and recorded on the block chain, wherein the confidential information is recorded in the local database. The defects that the traditional germplasm bank is low in efficiency, the form and the receipt are easy to lose and the like are overcome. Meanwhile, the characteristics of non-tampering and decentralization of the block chain technology are also ensured, the data after chain linking is real and reliable, the data sharing is facilitated, and the problem of data isolated island that the resources are difficult to integrate and share because the germplasm resource library and the seed company are respectively administrative is broken.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to make the objects, technical solutions and advantages of the present invention more apparent, a blockchain-based seed warehousing management method and system as claimed in the present invention will be described in detail with reference to specific embodiments.
Referring to fig. 1, according to an aspect of the present invention, there is provided a method for managing seed in and out library based on blockchain, including:
s1: a seed sending and storing step, in which a sending and storing unit node records seed information, the seed information comprises public information and private information, the public information is stored on all nodes of a block chain, the private information is only reserved in the block chain nodes of the sending and storing unit node, and only the sending and storing unit node can read the information; acquiring a block chain asset number according to the seed information and attaching the block chain asset number to a seed package;
specifically, taking rice seeds as an example, the following table 1 is rice seed information recorded by rice, where the rice seed information includes a delivery and storage unit, a block chain seed asset number (block chain automatic generation), a seed name, a storage condition, a storage period, a minimum storage group unit, and a delivery and storage unit; and according to the above-mentioned rice seed information obtain block chain asset number and attach to the seed package;
TABLE 1 Rice institute seed information
And S2, germplasm asset transfer step: according to the key of the transfer unit node, transferring the germplasm assets to the transfer unit node; it should be noted that different blockchain wallet addresses correspond to different keys, as shown in table 2:
TABLE 2 wallet Address and Key
Block chain wallet address
|
Secret key
|
User's hand
|
ARDOR-VCQQ-TPAA-73LW-93FYU
|
my-proof-of-first-use-using-ardor
|
Zhang San
|
ARDOR-U9BK-FRCM-ZX2W-H9K4R
|
TMt-^!J3bt*@YT@${9ygUDbw58U<9u_Xj\j6
|
Wang Wu |
S3, a seed warehousing step, in which, a germplasm library node records warehousing information which is only reserved in block link points of the germplasm library node and only can be read, and a table 3 shows information in the germplasm library node;
TABLE 3 information in germplasm pool nodes
S4 seed warehouse-out step: the usage unit node records usage information, which is shared by the delivery unit and the usage unit.
Preferably, the seed stocking step and the germplasm asset transfer step are performed simultaneously. It should be noted that, when the germplasm assets are linked, the block chain API is used to generate through the WEB table. Here an HTTP link is used to demonstrate the integrity of the API:
http://localhost:27876/nxt?
requestType=issueAsset&
secretPhrase=my-proof-of-first-use-using-ardor&
chain=2&
name=NKYSDS0001&
description unit, g &
quantityQNT=20000&
decimals=0&
feeNQT=100000000&
The material that must be filled in is the key secreephrase, the asset name, the quantity quantityQNT, and the description. Since we see from the description that the minimum unit is grams, the asset of 20000 units represents 20 kilograms ready to be handed to the germplasm pool. From Table 1, the rice was known to be "super rice 001" of 20 kg.
Preferably, the pairing data of the block chain asset number and the seed is stored in a database of the germplasm database.
Preferably, the transfer unit node may be a transfer and storage unit node or a germplasm library node; the assigned unit node may be a germplasm library node or a use unit node.
When the amount of the same seed to be stored needs to be increased, the following code may be used, and the NKYSDS001 is taken as an example, and the amount of the same seed to be stored is increased by 50 kg.
http://localhost:27876/nxt?
requestType=increaseAssetShares&
chain=2&
asset=8799735895842799277&
quantityQNT=50000&
secretPhrase=my-proof-of-first-use-using-ardor
Referring to fig. 1, according to another aspect of the present invention, there is provided a blockchain-based seed warehousing and warehousing management system, including:
the system comprises a seed storage unit node, a germplasm asset transfer unit node, a germplasm asset yielding unit node, a germplasm library node and a seed use unit node;
the seed sending and storing unit node is used for recording seed information, the seed information comprises public information and private information, the public information is stored on all nodes of a block chain, the private information is only reserved in the block chain nodes of the seed sending and storing unit node, and only the seed sending and storing unit node can read the information; acquiring a block chain asset number according to the seed information and attaching the block chain asset number to a seed package;
the germplasm asset transfer unit node is used for transferring germplasm assets to germplasm asset transfer unit nodes;
the germplasm asset assignor node is used for receiving the germplasm assets assigned by the germplasm asset assignor node;
the germplasm library node is used for recording warehousing information, the warehousing information is only reserved in the block link points of the germplasm library node, and only the germplasm library node can read the warehousing information;
the seed using unit node is used for recording using information, and the using information is shared by the transmitting and storing unit and the using unit.
Referring to fig. 1, according to another aspect of the present invention, there is provided a blockchain-based seed warehousing and warehousing management system, including: the system comprises a seed storage module, a germplasm asset transfer module, a seed storage module, a seed delivery module, a block chain module and a local database module;
the seed sending and storing module is used for storing seed information into the block chain module; meanwhile, the seed storage module obtains the asset number of the block chain according to the seed information and attaches the asset number to a seed package, and the seeds are stored in a germplasm bank, wherein the specific codes are as follows:
http://localhost:27876/nxt?
requestType=transferAsset&
secretPhrase=my-proof-of-first-use-using-ardor&
chain=2&
recipient=ARDOR-4XQE-BKHF-S9ES-DM827&
asset=8799735895842799277&
quantityQNT=30000&
feeNQT=100000000
the germplasm asset transfer module is used for transferring germplasm resources and recording transfer information, and the transfer records are stored in the block chain module;
the seed storage module is used for recording the seed information stored by the seed storage module, and the information is stored in the local database module;
the seed ex-warehouse module is used for recording the extracted information of the seeds, and the extracted information is stored in the local database module;
preferably, the method further comprises the following steps: the uplink seed query module is used for querying the seed information stored in the block chain module, and the specific codes are as follows:
http://localhost:27876/nxt?
requestType=getAssetAccounts&
asset=8799735895842799277
the running results are shown in the following code:
preferably, the seed information includes but is not limited to: block chain asset number, transfer and storage unit seed number, transfer and storage quantity, storage condition and transfer and storage unit wallet.
Preferably, the assignment information includes, but is not limited to: block chain asset number, transfer timestamp, transfer-out wallet address and sponsor information, transfer-in wallet address and sponsor information.
In summary, compared with the prior art, the invention provides a seed in-out library management method and system based on a block chain, which can permanently record the seed access quantity and the timestamp on the block chain and ensure that the seed in-out library can not be tampered by utilizing the characteristic of decentralization of the block chain technology without building and maintaining a relatively expensive centralized database. The defects that the traditional manual accounting is difficult to archive and the files are easy to lose are overcome. When the seed information is shared, the cold chain information which is complete and accurate to gram can be provided, and the defect that other cold chains in the current market can not manage the warehouse-in and warehouse-out and sales quantity in a quantitative mode is overcome. By using the block chain technology, the confidentiality of the seed development stage can be realized, and the intellectual property can be prevented from being stolen.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are given by way of illustration of the principles of the present invention, and that various changes and modifications may be made without departing from the spirit and scope of the invention as defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.