Aquaculture production process full-cycle tracing management platform based on block chain
By obtaining and labeling data in the aquaculture farm, and using blockchain to encrypt on-chain evidence storage and copying aquaculture data binding key tables, the problem of low security of information islands and data in traditional traceability methods is solved, and credible evidence storage and refined management of the entire life cycle is achieved.
Patent Information
- Application Number
- CN202510859381.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional aquaculture traceability methods cannot achieve refined management, and blockchain technology can only ensure that data is not tampered with and cannot prevent theft, resulting in information silos and low security.
By obtaining the aquaculture data of aquaculture farms, marking and copying, using blockchain for on-chain proofing, and using the copy breeding data binding key table to achieve secure storage and traceability of data.
It realizes the trustworthy data storage throughout the life cycle, supports refined traceability management with the smallest breeding unit as the object, improves data security and prevents theft, and is suitable for multiple batches of aquatic products with high risk of heavy pollution.
Smart Images

Figure CN120373669A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blockchain traceability, and more specifically, the present invention relates to a full-cycle traceability management platform for the aquaculture production process based on blockchain. Background Art
[0002] The patent application with the publication number CN116579576A discloses an intelligent decision-making aquaculture traceability method and system based on blockchain. The method includes: constructing an aquaculture traceability alliance blockchain according to the aquatic product production process; monitoring each production link of the aquatic product to obtain production link data and multi-source environmental data and uploading them to the alliance blockchain; collecting a large amount of aquaculture data and constructing an aquaculture knowledge base; optimizing the parameters of the decision-making model according to the constructed aquaculture knowledge base to obtain an aquaculture intelligent decision-making model; inputting the real-time multi-source environmental data into the aquaculture intelligent decision-making model to obtain production decisions and uploading them to the alliance blockchain. The system includes: an aquatic product data full-process collection module, a production intelligent decision-making module, and an alliance blockchain network module. It can reduce the intervention of manual work on the traceability chain and improve the credibility of aquatic product traceability. It can be widely applied to the field of blockchain application technology.
[0003] However, in the process of tracing the aquaculture production process, traditional methods usually involve "result tracing" (such as origin plus detection), which leads to less data obtained during the tracing process and cannot comprehensively obtain the aquaculture production process, thus resulting in information islands. Traditional methods usually take the entire farm as the tracing object, so more refined traceability management cannot be achieved. Moreover, blockchain can only ensure that the aquaculture data is not tampered with through the hash algorithm, but cannot guarantee that the aquaculture data is not stolen. If the aquaculture data stored in the database is not encrypted with high security, it is possible that the aquaculture data stored in the database will be stolen. Traditional methods usually do not encrypt the aquaculture data stored in the database or use conventional encryption algorithms for encryption. Once the aquaculture data is stolen, the thief can easily obtain the aquaculture data, thus causing huge economic losses to the aquaculture farm and also reducing the security during the tracing process.
[0004] In view of this, the present invention proposes a full-cycle traceability management platform for the aquaculture production process based on blockchain to solve the above problems. Summary of the Invention
[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above object, the present invention provides the following technical solution: A full-cycle traceability management platform for the aquaculture production process based on blockchain, including a management center, and further including the following components communicatively connected to the management center: The aquaculture data acquisition component is responsible for acquiring the aquaculture data of each aquaculture area in the aquaculture farm and annotating the aquaculture environment data in the aquaculture data; The blockchain evidence storage component is responsible for replicating the aquaculture data to obtain replicated aquaculture data and storing the aquaculture data on the chain; The replicated aquaculture data encryption component is responsible for splitting the replicated aquaculture data into replicated aquaculture binary data blocks, numbering the replicated aquaculture binary data blocks, obtaining the aquaculture data seed key, obtaining the aquaculture data binding key corresponding to the replicated aquaculture binary data block according to the aquaculture data seed key and the number of the replicated aquaculture binary data block, creating an empty table, filling the aquaculture data binding key into the empty table to obtain the aquaculture data binding key table, encrypting the corresponding replicated aquaculture binary data block through the corresponding aquaculture data binding key table to obtain the encrypted replicated aquaculture binary data block, merging the encrypted replicated aquaculture binary data blocks in the splitting order to obtain the encrypted replicated aquaculture data, and storing the encrypted replicated aquaculture data; The traceability component is responsible for tracing the aquaculture production process.
[0006] Furthermore, the aquaculture data includes aquaculture environment data and manual operation record data; The aquaculture environment data includes water temperature, pH value, dissolved oxygen content, and harmful substance content; The manual operation record data includes feeding record data, medication record data, abnormal record data, and detection record data.
[0007] Furthermore, the method for storing the aquaculture data on the chain includes: Converting the aquaculture data into JSON format, generating the hash value of the aquaculture data through the SHA256 algorithm, and using the hash value of the aquaculture data as the aquaculture data digest; Uploading the aquaculture data digest to the consortium blockchain to complete the storage of the aquaculture data on the chain.
[0008] Furthermore, the method for splitting the replicated aquaculture data into replicated aquaculture binary data blocks and numbering the replicated aquaculture binary data blocks includes: Converting the replicated aquaculture data into English representation, converting each character after conversion into the corresponding ASCII code representation, converting the ASCII code of each character into an eight-bit binary representation, and combining the binary representations of all characters to obtain the replicated aquaculture binary data stream; Every bits of binary, split the replicated aquaculture binary data stream once, is the length of the replicated aquaculture binary data block, and is Multiples to obtain a replicated breeding binary data block, label the replicated breeding binary data block according to the segmentation order, denoted as , , is the number of replicated breeding binary data blocks.
[0009] Further, the method for obtaining the breeding data seed key includes: Randomly generate random values, set a random value threshold. If the random value is greater than the random value threshold, replace the random value with , if the random value is less than or equal to the random value threshold, replace the random value with , gather all the replaced random values to obtain the breeding data seed key.
[0010] Further, the method for obtaining the breeding data binding key corresponding to the replicated breeding binary data block based on the breeding data seed key and the label of the replicated breeding binary data block includes: When the label of the replicated breeding binary data block is odd, perform an exclusive OR operation on the th bit binary of the replicated breeding binary data block and the th bit binary of the breeding data seed key to obtain a first exclusive OR operation result. Replace the th bit binary of the breeding data seed key with the first exclusive OR operation result to obtain a first replaced breeding data seed key, and perform an exclusive OR operation on the first replaced breeding data seed key and the replicated breeding binary data block to obtain the breeding data binding key corresponding to the replicated breeding binary data block; When the label of the replicated breeding binary data block is even, perform an equivalence operation on the th bit binary of the replicated breeding binary data block and the th bit binary of the breeding data seed key to obtain a first equivalence operation result. Replace the th bit binary of the breeding data seed key with the first equivalence operation result to obtain a second replaced breeding data seed key, and perform an exclusive OR operation on the second replaced breeding data seed key and the replicated breeding binary data block to obtain the breeding data binding key corresponding to the replicated breeding binary data block.
[0011] Further, the method for establishing an empty table and filling the breeding data binding key into the empty table to obtain the breeding data binding key table includes: Construct rows columns empty table, , and ; Before binding the breeding data to the key Binary Fill OK Empty the first row of the table and bind the breeding data to the key to Binary Fill OK Empty the second row of the table and bind the breeding data to the key to Binary Fill OK Leave the third row of the table blank, ..., bind the breeding data to the key to Binary Fill OK Empty the table Row, obtain the breeding data binding key table corresponding to the copied breeding binary data block.
[0012] Furthermore, the method of encrypting the corresponding copied aquaculture binary data block by binding the corresponding aquaculture data key table to obtain the encrypted copied aquaculture binary data block includes: The same method as that for obtaining the aquaculture data binding key table is used to obtain the copy aquaculture binary data block table; Before binding the breeding data to the key Convert binary to decimal and record it as , , will copy the front of the breeding binary data block Convert binary to decimal and record it as , bind the breeding data to the key table The binary in the row is the same as the copy breeding binary data block in the table The binary numbers in the row are XORed to obtain XOR operation result, and copy the breeding binary data block table The binary in the line is replaced by XOR operation result; Bind the breeding data to the key to Convert binary to decimal and record it as , will copy the first to Convert binary to decimal and record it as , bind the breeding data to the key table The binary in the row is the same as the copy breeding binary data block in the table The binary numbers in the row are XORed to obtain The XOR operation result, and replace the binary in the th row in the replicated aquaculture binary data block table with the XOR operation result; And so on, until the th to th bits of the aquaculture data binding key are converted to decimal and denoted as , , convert the th to th bits of the replicated aquaculture binary data block to decimal and denote it as , perform an XOR operation on the binary in the th row in the aquaculture data binding key table and the binary in the th row in the replicated aquaculture binary data block table to obtain the XOR operation result, and replace the binary in the th row in the replicated aquaculture binary data block table with the XOR operation result to obtain the encrypted replicated aquaculture binary data block table; Extract the binary in the encrypted replicated aquaculture binary data block table to obtain the encrypted replicated aquaculture binary data block; The alliance chain is provided with a data storage area, and the encrypted replicated aquaculture data is stored in the data storage area.
[0013] Further, the method for extracting the binary in the encrypted replicated aquaculture binary data block table to obtain the encrypted replicated aquaculture binary data block includes: Extract the binary in the first row of the encrypted replicated aquaculture binary data block table as the first bits of the encrypted replicated aquaculture binary data block, extract the binary in the second row of the encrypted replicated aquaculture binary data block table as the rd to th bits of the encrypted replicated aquaculture binary data block, extract the binary in the third row of the encrypted replicated aquaculture binary data block table as the th to th bits of the encrypted replicated aquaculture binary data block, ……, extract the binary in the th row of the encrypted replicated aquaculture binary data block table as the th to th bits of the encrypted replicated aquaculture binary data block.
[0014] Further, the method for tracing the aquaculture production process includes: The traceability personnel access the consortium blockchain. The consortium blockchain decrypts the encrypted replicated aquaculture data in the data storage area to obtain the decrypted replicated aquaculture data, and returns the decrypted replicated aquaculture data and the aquaculture data digest to the traceability personnel. The traceability personnel calculate the hash value of the decrypted replicated aquaculture data, and compare the hash value of the decrypted replicated aquaculture data with the aquaculture data digest. If the hash value of the decrypted replicated aquaculture data is the same as the aquaculture data digest, the decrypted replicated aquaculture data has not been tampered with, and the traceability personnel view the decrypted replicated aquaculture data to complete the traceability. If the hash value of the decrypted replicated aquaculture data is different from the aquaculture data digest, the decrypted replicated aquaculture data has been tampered with, and relevant personnel are notified for handling.
[0015] The technical effects and advantages of a full-cycle traceability management platform for the aquaculture production process based on blockchain according to the present invention: 1. Obtain the aquaculture data of each aquaculture area in the aquaculture farm, label the aquaculture environment data in the aquaculture data, replicate the aquaculture data to obtain replicated aquaculture data, and perform on-chain evidence storage on the aquaculture data, and upload the data of the entire aquaculture process to the consortium blockchain, thereby breaking the information silos and truly realizing "credible evidence storage of data throughout the life cycle"; 2. Obtain the aquaculture data of each aquaculture area, support tracing with the smallest aquaculture unit (such as fish pond / net cage / batch) as the basic object, rather than coarse-grained management with "aquaculture farm", and realize more refined traceability management, especially suitable for aquatic product varieties with multiple batches and high heavy pollution risks; 3. Encrypt the corresponding replicated aquaculture binary data block through the corresponding aquaculture data binding key table to obtain the encrypted replicated aquaculture binary data block, merge the encrypted replicated aquaculture binary data blocks in the splitting order to obtain the encrypted replicated aquaculture data, and store the encrypted replicated aquaculture data. Instead of using a conventional encryption algorithm for encryption, it is encrypted through the aquaculture data binding key table. Even if the aquaculture data is stolen, it is impossible to easily crack the encrypted replicated aquaculture data, thereby safely and reliably protecting the aquaculture data of the aquaculture farm and increasing the security during the traceability process. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of a full-cycle traceability management platform for the aquaculture production process based on blockchain according to the present invention; Figure 2 It is a schematic diagram of a full-cycle traceability management method for the aquaculture production process based on blockchain according to the present invention; Figure 3 It is a flow chart of obtaining the aquaculture data seed key according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0018] Embodiment 1 Please refer to Figure 1 and Figure 3 As shown, a full-cycle traceability management platform for the aquaculture production process based on blockchain in this embodiment includes a management center, and the management center is communicatively connected to a breeding data acquisition component, a blockchain evidence storage component, a replicated breeding data encryption component, and a traceability component; The breeding data acquisition component is responsible for acquiring the breeding data of each aquaculture area in the aquaculture farm and annotating the aquaculture environment data in the breeding data; The blockchain evidence storage component is responsible for replicating the breeding data to obtain replicated breeding data and storing the breeding data on the blockchain; The replicated breeding data encryption component is responsible for splitting the replicated breeding data into replicated breeding binary data blocks, numbering the replicated breeding binary data blocks, obtaining the breeding data seed key, obtaining the breeding data binding key corresponding to the replicated breeding binary data block according to the breeding data seed key and the number of the replicated breeding binary data block, establishing an empty table, filling the breeding data binding key into the empty table to obtain the breeding data binding key table, encrypting the corresponding replicated breeding binary data block through the corresponding breeding data binding key table to obtain the encrypted replicated breeding binary data block, merging the encrypted replicated breeding binary data blocks in the splitting order to obtain the encrypted replicated breeding data, and storing the encrypted replicated breeding data; The traceability component is responsible for tracing the aquaculture production process.
[0019] The process of acquiring the breeding data of each aquaculture area in the aquaculture farm and annotating the aquaculture environment data in the breeding data includes: The breeding data includes aquaculture environment data and manual operation record data; The aquaculture environment data includes water temperature, pH value, dissolved oxygen content, and harmful substance content (ammonia nitrogen, nitrite, etc.); The manual operation record data includes feeding record data, medication record data, abnormal record data, and detection record data; The feeding record data includes the feeding time, the type of feed put in, and the feeding amount. The medication record data includes the medication time, the type of medication, the dosage of medication, and the use of the drug. The abnormal record data includes the death time of aquaculture organisms and the number of dead aquaculture organisms. The detection record data includes the test data of residual drugs (such as prohibited drugs like nitrofurans metabolites and malachite green) detected by a third party or self-inspection; Each aquaculture area (such as fish ponds, ponds, cages, etc., areas for cultivating aquatic organisms) in the aquaculture farm is numbered, denoted as j, where j = 1, 2, 3, ……, m, and m is a positive integer. The variety and feeding time of the aquatic organisms in the aquaculture area are obtained by accessing the server of the aquaculture farm, and a corresponding unique QR code is generated based on the variety of the aquatic organisms, the feeding time, and the number of the aquaculture area; A temperature sensor, an electrode type sensor, a fluorescence method dissolved oxygen sensor, and a harmful substance sensor are set. The temperature sensor is used to obtain the water temperature, the electrode type sensor is used to obtain the pH value, the fluorescence method dissolved oxygen sensor is used to obtain the dissolved oxygen content, and the harmful substance sensor is used to obtain the content of harmful substances; In each aquaculture area, a temperature sensor, an electrode type sensor, a fluorescence method dissolved oxygen sensor, and a harmful substance sensor are deployed. The water temperature, pH value, dissolved oxygen content, and harmful substance content in the aquaculture area are obtained respectively through the deployed temperature sensor, electrode type sensor, fluorescence method dissolved oxygen sensor, and harmful substance sensor, and the corresponding acquisition time and the label number of the aquaculture area are marked; After the employees in the aquaculture farm perform feeding, medication, abnormal record or detection, they obtain the corresponding feeding record data, medication record data, abnormal record data, and detection record data. By scanning the corresponding QR code, they obtain the corresponding form to be filled, and input the corresponding feeding record data, medication record data, abnormal record data, and detection record data into the form to be filled, thus obtaining the feeding record data, medication record data, abnormal record data, and detection record data.
[0020] The process of storing the aquaculture data for evidence includes: Convert the aquaculture data into JSON format, generate the hash value of the aquaculture data through the SHA256 algorithm, and use the hash value of the aquaculture data as the aquaculture data digest; Upload the aquaculture data digest to the alliance chain to complete the on-chain storage of the aquaculture data; It should be noted that in the process of tracing the aquaculture production process, the traditional method is usually "result tracing" (such as origin plus detection), which will lead to less data obtained in the tracing process and cannot comprehensively obtain the aquaculture production process, thus resulting in information islands. The traditional method usually takes the entire farm as the tracing object, so it cannot achieve more refined tracing management. Therefore, the present invention uploads the data of the entire aquaculture process to the alliance chain, thereby breaking the information islands and truly realizing "trusted storage of data throughout the life cycle", supporting tracing with the smallest aquaculture unit (such as fish pond / net cage / batch) as the basic object, rather than coarse-grained management with "farm", and realizing more refined tracing management, especially applicable to aquatic product varieties with multiple batches and high heavy pollution risks.
[0021] The process of splitting the replicated aquaculture data into replicated aquaculture binary data blocks, numbering the replicated aquaculture binary data blocks, obtaining the aquaculture data seed key, obtaining the aquaculture data binding key corresponding to the replicated aquaculture binary data block according to the aquaculture data seed key and the number of the replicated aquaculture binary data block, creating an empty table, filling the aquaculture data binding key into the empty table to obtain the aquaculture data binding key table, encrypting the corresponding replicated aquaculture binary data block through the corresponding aquaculture data binding key table to obtain the encrypted replicated aquaculture binary data block, merging the encrypted replicated aquaculture binary data blocks in the splitting order to obtain the encrypted replicated aquaculture data, and storing the encrypted replicated aquaculture data includes: Convert the replicated aquaculture data into English representation, convert each character after conversion into the corresponding ASCII code representation, convert the ASCII code of each character into an eight-bit binary representation, and combine the binary representations of all characters to obtain the replicated aquaculture binary data stream; Split the replicated aquaculture binary data stream into replicated aquaculture binary data blocks, specifically including: Obtain the lengths of the replicated aquaculture binary data stream and the replicated aquaculture binary data block, and obtain the supplementary judgment factor according to the lengths of the replicated aquaculture binary data stream and the replicated aquaculture binary data block; The process of obtaining the supplementary judgment factor according to the lengths of the replicated aquaculture binary data stream and the replicated aquaculture binary data block includes: Divide the length of the replicated aquaculture binary data stream by the length of the replicated aquaculture binary data block to obtain the supplementary judgment factor; Judge whether to supplement the replicated aquaculture binary data stream according to the supplementary judgment factor. When the supplementary judgment factor is an integer, do not supplement the replicated aquaculture binary data stream; When the supplementary judgment factor is not an integer, supplement the replicated aquaculture binary data stream, and obtain the supplementary coefficient according to the lengths of the replicated aquaculture binary data stream and the replicated aquaculture binary data block ; Obtain a supplementary coefficient based on the length of the replicated breeding binary data stream and the length of the replicated breeding binary data block The process includes: Obtain the remainder of the length of the replicated breeding binary data stream divided by the length of the replicated breeding binary data block, and subtract the remainder of the length of the replicated breeding binary data stream divided by the length of the replicated breeding binary data block from the length of the replicated breeding binary data block to obtain the supplementary coefficient ; Add binary digits at the end of the replicated breeding binary data stream; Every binary digits, slice the replicated breeding binary data stream once. is the length of the replicated breeding binary data block, and is a multiple of The value of can be set through experimental data analysis or experience. Obtain the replicated breeding binary data block, label the replicated breeding binary data block according to the slicing order, denoted as , is the number of replicated breeding binary data blocks; Obtain the breeding data seed key, specifically including: generating random values through a random value generation formula; Among them, the random value generation formula is: ; is the random value generated by the random value generation formula, is a randomly varying value, and , represents randomly generating a to floating value between, represents randomly generating a to floating value between; It should be noted that the first part (composite triangular transformation + logarithm + square root): ; This part increases linearly as increases, grows slowly, generating a sine wave with non-linear frequency variation, This part generates a non-periodic but still fluctuating perturbation term, This part generates a non-periodic but still fluctuating perturbation term, This part prevents division by zero while modulating the overall amplitude within a stable range (preventing explosive growth). The first part as a whole provides a highly complex periodic fluctuation with a controllable amplitude, which can effectively avoid out-of-control situations that are too large or too small; The second part (tangent function + random perturbation term): ; This part of the tangent function has its own poles and discontinuities. Adding random values increases the uncertain perturbation, This part is used to smoothly control the output amplitude, allowing the random fluctuation to gradually converge when it is large. The second part as a whole provides perturbations with high variability and local random jump characteristics; The third part (pure noise perturbation): ; This part randomly generates a to floating value between, allowing negative perturbations, This part slowly increases as increases, making the noise significant when is small and stable when is large. The third part as a whole provides a gradually converging mild perturbation source, which is very suitable for adjusting the intensity in the early stage of the sequence and tending to be stable in the later stage; Set the random value threshold. The random value threshold can be set through experimental data analysis or experience. If the random value is greater than the random value threshold, then replace the random value with , if the random value is less than or equal to the random value threshold, then replace the random value with . Pool all the replaced random values to obtain the breeding data seed key; Obtain the breeding data binding key corresponding to each replicated breeding binary data block according to the breeding data seed key and the label of the replicated breeding binary data block. Specifically, it includes: When the label of the replicated breeding binary data block is odd, perform an exclusive OR operation on the th bit binary of this replicated breeding binary data block and the th bit binary of the breeding data seed key to obtain the first exclusive OR operation result. Replace the th bit binary of the breeding data seed key with the first exclusive OR operation result to obtain the first replaced breeding data seed key, and perform an exclusive OR operation on the first replaced breeding data seed key and this replicated breeding binary data block to obtain the breeding data binding key corresponding to this replicated breeding binary data block; When the label of the replicated breeding binary data block is even, perform an exclusive OR operation on the th bit binary of this replicated breeding binary data block and the Perform an exclusive-NOR operation on the bits of the binary number to obtain the first exclusive-NOR operation result. Replace the -th bit of the breeding data seed key with the first exclusive-NOR operation result to obtain the second replaced breeding data seed key, and perform an exclusive-OR operation on the second replaced breeding data seed key and the replicated breeding binary data block to obtain the breeding data binding key corresponding to the replicated breeding binary data block; It should be noted that the number of bits of the replicated breeding binary data block is greater than the label of the replicated breeding binary data block ; Construct rows and columns of empty tables, , and and The values of can be set through experimental data analysis or experience. Fill the breeding data binding key into rows and columns of the empty table to obtain the breeding data binding key table corresponding to the replicated breeding binary data block; rows and columns of the empty table to obtain the breeding data binding key table. The process includes: Fill the first rows and to bits of the breeding data binding key into the first row of the empty table with rows and to bits of the breeding data binding key into the second row of the empty table with rows and to bits of the breeding data binding key into the third row of the empty table with rows and columns of the empty table to obtain the breeding data binding key table corresponding to the replicated breeding binary data block; Obtain the replicated breeding binary data block table by the same method as obtaining the breeding data binding key table. Specifically, it includes: Construct a new rows and columns of empty table. Fill the first rows The first row of the empty column table will copy the to bits of binary data from the breeding binary data block and fill them into the new row The second row of the empty column table will copy the to bits of binary data from the breeding binary data block and fill them into the new row The third row of the empty column table, ……, will copy the to bits of binary data from the breeding binary data block and fill them into the new row The th row of the empty column table to obtain the breeding binary data block copy table; Encrypt the breeding binary data block copy table with the breeding data binding key table to obtain the encrypted breeding binary data block copy table, which specifically includes:
[0022] Convert the first bits of binary data of the breeding data binding key to decimal, and record the decimal number converted from the first bits of binary data of the breeding data binding key as , , convert the first bits of binary data of the breeding binary data block copy to decimal, and record the decimal number converted from the first bits of binary data of the breeding binary data block copy as , perform an exclusive OR operation on the binary data in the th row of the breeding data binding key table and the binary data in the th row of the breeding binary data block copy table to obtain the exclusive OR operation result, and replace the binary data in the th row of the breeding binary data block copy table with the exclusive OR operation result. Convert the to bits of binary data of the breeding data binding key to decimal, and record the decimal number converted from the to bits of binary data of the breeding data binding key as , convert the to bits of binary data of the breeding binary data block copy to decimal, and record the decimal number converted from the to bits of binary data of the breeding binary data block copy as , perform an exclusive OR operation on the binary data in the The binary in the row is XORed with the binary in the th row in the replicated breeding binary data block table to obtain the XOR result, and replace the binary in the th row in the replicated breeding binary data block table with the XOR result,..., convert the to th bit binary of the breeding data binding key to decimal, and record the decimal converted from the to th bit binary of the breeding data binding key as , where , convert the to th bit binary of the replicated breeding binary data block to decimal, and record the decimal converted from the to th bit binary of the replicated breeding binary data block as , XOR the binary in the th row in the breeding data binding key table with the binary in the th row in the replicated breeding binary data block table to obtain the XOR result, and replace the binary in the th row in the replicated breeding binary data block table with the XOR result to obtain the encrypted replicated breeding binary data block table; Extract the binary in the encrypted replicated breeding binary data block table to obtain the encrypted replicated breeding binary data block, specifically including: Extract the binary in the first row of the encrypted replicated breeding binary data block table as the first bits binary of the encrypted replicated breeding binary data block, extract the binary in the second row of the encrypted replicated breeding binary data block table as the to bits binary of the encrypted replicated breeding binary data block, extract the binary in the third row of the encrypted replicated breeding binary data block table as the to bits binary of the encrypted replicated breeding binary data block,..., extract the binary in the th row of the encrypted replicated breeding binary data block table as the to bits binary of the encrypted replicated breeding binary data block; Merge the encrypted replicated breeding binary data block according to the splitting order to obtain the encrypted replicated breeding data; The consortium blockchain is provided with a data storage area (such as a database, etc.), and the encrypted replicated aquaculture data is stored in the data storage area; It should be noted that the blockchain can only ensure that the aquaculture data is not tampered with through the hash algorithm, but cannot guarantee that the aquaculture data is not stolen. If the aquaculture data stored in the database is not encrypted with a high level of security, it is possible for the aquaculture data stored in the database to be stolen. Traditional methods usually do not encrypt the aquaculture data stored in the database or use conventional encryption algorithms for encryption. Once the aquaculture data is stolen, the thief can easily obtain the aquaculture data, thus causing huge economic losses to the aquaculture farm and also reducing the security during the traceability process. Therefore, in the present invention, the corresponding replicated aquaculture binary data blocks are encrypted through the corresponding aquaculture data binding key table to obtain encrypted replicated aquaculture binary data blocks, the encrypted replicated aquaculture binary data blocks are merged according to the segmentation order to obtain encrypted replicated aquaculture data, and the encrypted replicated aquaculture data is stored. Instead of using conventional encryption algorithms for encryption, encryption is performed through the aquaculture data binding key table. Even if the aquaculture data is stolen, it is impossible to easily crack the encrypted replicated aquaculture data, thus safely and reliably protecting the aquaculture data of the aquaculture farm and also increasing the security during the traceability process.
[0023] The process of tracing the aquaculture production process includes: The traceability personnel access the consortium blockchain, and the consortium blockchain decrypts the encrypted replicated aquaculture data in the data storage area to obtain decrypted replicated aquaculture data, and returns the decrypted replicated aquaculture data and the aquaculture data digest to the traceability personnel. The traceability personnel calculate the hash value of the decrypted replicated aquaculture data, and compare the hash value of the decrypted replicated aquaculture data with the aquaculture data digest. If the hash value of the decrypted replicated aquaculture data is the same as the aquaculture data digest, it means that the decrypted replicated aquaculture data has not been tampered with, and the traceability personnel view the decrypted replicated aquaculture data to complete the traceability. If the hash value of the decrypted replicated aquaculture data is different from the aquaculture data digest, it means that the decrypted replicated aquaculture data has been tampered with, and relevant personnel are notified for handling.
[0024] In this embodiment, the aquaculture data of each aquaculture area in the aquaculture farm is obtained, and the aquaculture environment data in the aquaculture data is labeled. The aquaculture data is copied to obtain replicated aquaculture data, and the aquaculture data is stored on the chain. The data of the entire aquaculture process is uploaded to the consortium blockchain, thus breaking the information silos and truly realizing "trusted storage of data throughout the life cycle"; the aquaculture data of each aquaculture area is obtained, which supports tracing with the smallest aquaculture unit (such as fish pond / net cage / batch) as the basic object, rather than the coarse-grained management of "aquaculture farm", realizing more refined traceability management, especially suitable for aquatic product varieties with multiple batches and high heavy pollution risks; the corresponding replicated aquaculture binary data blocks are encrypted through the corresponding aquaculture data binding key table to obtain encrypted replicated aquaculture binary data blocks. The encrypted replicated aquaculture binary data blocks are merged according to the segmentation order to obtain encrypted replicated aquaculture data, and the encrypted replicated aquaculture data is stored. Instead of using conventional encryption algorithms for encryption, it is encrypted through the aquaculture data binding key table. Even if the aquaculture data is stolen, it is not easy to crack the encrypted replicated aquaculture data, thus safely and reliably protecting the aquaculture data of the aquaculture farm and increasing the security during the traceability process.
[0025] Embodiment 2 Please refer to Figure 2 As shown, for the parts not described in detail in this embodiment, refer to the description content of Embodiment 1. A full-cycle traceability management method for the aquaculture production process based on blockchain is provided, including: Step S1: Obtain the aquaculture data of each aquaculture area in the aquaculture farm, and label the aquaculture environment data in the aquaculture data; Step S2: Copy the aquaculture data to obtain replicated aquaculture data, and store the aquaculture data on the chain; Step S3: Encrypt the replicated aquaculture data to obtain encrypted replicated aquaculture data, and store the encrypted replicated aquaculture data; Step S4: Trace the aquaculture production process.
[0026] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0027] In several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only one way, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0028] As described above, this is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
[0029] Finally: The above description is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should all be included within the protection scope of the present invention.
Claims
1. A full-cycle traceability management platform for the aquaculture production process based on blockchain, including a management center, characterized in that, It also includes the following components communicatively connected to the management center: A breeding data acquisition component, which is responsible for acquiring the breeding data of each aquaculture area in the aquaculture farm and annotating the aquaculture environment data in the breeding data; A blockchain evidence storage component, which is responsible for replicating the breeding data to obtain replicated breeding data and storing the breeding data on the chain; A replicated breeding data encryption component, which is responsible for splitting the replicated breeding data into replicated breeding binary data blocks, numbering the replicated breeding binary data blocks, obtaining the breeding data seed key, obtaining the breeding data binding key corresponding to the replicated breeding binary data block according to the breeding data seed key and the number of the replicated breeding binary data block, creating an empty table, filling the breeding data binding key into the empty table to obtain a breeding data binding key table, encrypting the corresponding replicated breeding binary data block through the corresponding breeding data binding key table to obtain an encrypted replicated breeding binary data block, merging the encrypted replicated breeding binary data blocks in the splitting order to obtain encrypted replicated breeding data, and storing the encrypted replicated breeding data; A traceability component, which is responsible for tracing the aquaculture production process.
2. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 1, characterized in that The breeding data includes aquaculture environment data and manual operation record data; The aquaculture environment data includes water temperature, pH value, dissolved oxygen content and harmful substance content; The manual operation record data includes feeding record data, medication record data, abnormal record data and detection record data.
3. A full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 2, characterized in that, The method for storing the breeding data on the chain includes: Converting the breeding data into JSON format, generating the hash value of the breeding data through the SHA256 algorithm, and using the hash value of the breeding data as the breeding data digest; Uploading the breeding data digest to the consortium chain to complete the on-chain evidence storage of the breeding data.
4. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 3, characterized in that, The method for splitting the replicated breeding data into replicated breeding binary data blocks and numbering the replicated breeding binary data blocks includes: Converting the replicated breeding data into English representation, converting each converted character into the corresponding ASCII code representation, converting the ASCII code of each character into an eight-bit binary representation, and combining the binary representations of all characters to obtain a replicated breeding binary data stream; Every bit binary pair, the replicated breeding binary data stream is sliced once, is the length of the replicated breeding binary data block, and is a multiple of, obtaining the replicated breeding binary data block, numbering the replicated breeding binary data block according to the slicing order, denoted as , , is the number of replicated breeding binary data blocks.
5. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 4, characterized in that, The method for obtaining the breeding data seed key includes: Random generation random values, set a random value threshold. If the random value is greater than the random value threshold, then replace the random value with ; if the random value is less than or equal to the random value threshold, then replace the random value with , collect all the replaced random values to obtain the seed key for breeding data.
6. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 5, characterized in that, The method for obtaining the breeding data binding key corresponding to the replicated breeding binary data block according to the breeding data seed key and the number of the replicated breeding binary data block includes: When the label of the replicated breeding binary data block is odd, the th bit of the replicated breeding binary data block is XORed with the th bit of the breeding data seed key to obtain a first XOR operation result. The th bit of the breeding data seed key is replaced with the first XOR operation result to obtain a first replaced breeding data seed key, and the first replaced breeding data seed key is XORed with the replicated breeding binary data block to obtain the breeding data binding key corresponding to the replicated breeding binary data block; When the label of the replicated breeding binary data block is an even number, the th bit of the replicated breeding binary data block is exclusive-NORed with the th bit of the breeding data seed key to obtain a first exclusive-NOR operation result. The th bit of the breeding data seed key is replaced with the first exclusive-NOR operation result to obtain a second replaced breeding data seed key, and the second replaced breeding data seed key is XORed with the replicated breeding binary data block to obtain the breeding data binding key corresponding to the replicated breeding binary data block.
7. A full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 6, characterized in that, The method for creating an empty table, filling the breeding data binding key into the empty table to obtain a breeding data binding key table includes: Construct row column empty table, and ; Fill the first bits of the binary of the breeding data binding key into the th row of the -column empty table. Fill the th to th bits of the binary of the breeding data binding key into the th row of the -column empty table. Fill the th to th bits of the binary of the breeding data binding key into the th row of the -column empty table. And so on. Fill the th to th bits of the binary of the breeding data binding key into the th row of the -column empty table at the th row to obtain the breeding data binding key table corresponding to the replicated breeding binary data block.
8. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 7, characterized in that, The method for encrypting the corresponding replicated breeding binary data block through the corresponding breeding data binding key table to obtain an encrypted replicated breeding binary data block includes: Obtaining a replicated breeding binary data block table by the same method as obtaining the breeding data binding key table; Convert the first bits of the binary number of the breeding data binding key to decimal, and denote it as , , convert the first bits of the copied breeding binary data block to decimal, and denote it as , perform an exclusive OR operation on the binary number in the th row of the breeding data binding key table and the binary number in the th row of the copied breeding binary data block table to obtain the exclusive OR operation result, and replace the binary number in the th row of the copied breeding binary data block table with the exclusive OR operation result; Convert the binary digits from the nd to the th digit of the breeding data binding key to decimal, and denote it as . Convert the binary digits from the th to the th digit of the replicated breeding binary data block to decimal, and denote it as . Perform an exclusive OR operation on the binary in the th row of the breeding data binding key table and the binary in the th row of the replicated breeding binary data block table to obtain the exclusive OR operation result, and replace the binary in the th row of the replicated breeding binary data block table with the exclusive OR operation result; And so on until the to bits of the breeding data binding key are converted from binary to decimal and denoted as , , and the to bits of the copied breeding binary data block are converted from binary to decimal and denoted as . Then, the binary in the th row of the breeding data binding key table is XORed with the binary in the th row of the copied breeding binary data block table to obtain the XOR operation result, and the binary in the th row of the copied breeding binary data block table is replaced with the XOR operation result to obtain the encrypted copied breeding binary data block table; Extracting the binary in the encrypted replicated breeding binary data block table to obtain an encrypted replicated breeding binary data block; The consortium chain is provided with a data storage area, and the encrypted replicated breeding data is stored in the data storage area.
9. A full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 8, characterized in that, The method for extracting binary in the encrypted copy farming binary data block table to obtain the encrypted copy farming binary data block includes: Extract the binary in the first row of the encrypted copy farming binary data block table as the first bits of the encrypted copy farming binary data block. Extract the binary in the second row of the encrypted copy farming binary data block table as the to bits of the encrypted copy farming binary data block. Extract the binary in the third row of the encrypted copy farming binary data block table as the to bits of the encrypted copy farming binary data block, ……, extract the binary in the th row of the encrypted copy farming binary data block table as the to bits of the encrypted copy farming binary data block.
10. The full-cycle traceability management platform for the aquaculture production process based on blockchain according to claim 9, characterized in that, The method for tracing the aquaculture production process includes: The tracing personnel access the alliance chain, the alliance chain decrypts the encrypted copy farming data in the data storage area to obtain the decrypted copy farming data, returns the decrypted copy farming data and the farming data digest to the tracing personnel. The tracing personnel calculate the hash value of the decrypted copy farming data, and compare the hash value of the decrypted copy farming data with the farming data digest. If the hash value of the decrypted copy farming data is the same as the farming data digest, the decrypted copy farming data has not been tampered with, and the tracing personnel view the decrypted copy farming data to complete the tracing. If the hash value of the decrypted copy farming data is different from the farming data digest, the decrypted copy farming data has been tampered with, and relevant personnel are notified for handling.
Citation Information
Patent Citations
Equivocation augmentation
CN110313146A
Intelligent decision-making aquaculture traceability method and system based on block chain
CN116579576A
Secure storage method and device for console game data and computer equipment
CN119203177A
Encryption method based on RSA algorithm
CN119449308A
Breeding product tracing method and system based on block chain
CN119476716A