Vegetable anti-counterfeiting tracing method and device based on block chain and Internet of Things
By using blockchain and Internet of Things technology in vegetable traceability systems to verify and upload data from data acquisition equipment, the problem of low data acquisition accuracy in the existing technology is solved, and higher data acquisition accuracy and security are achieved.
Patent Information
- Application Number
- CN202411922377.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-09
AI Technical Summary
The existing anti-counterfeiting and traceability methods for agricultural products have problems such as forgery, tampering, and mis-entry of information during the data collection process, resulting in low data collection accuracy.
The vegetable anti-counterfeiting traceability method based on blockchain and the Internet of Things is adopted. By connecting the data collection device to the network and registering online, the device is verified based on the registration information, and the data is uploaded to the blockchain after the verification is successful.
By combining Internet of Things technology with blockchain, data acquisition devices are avoided illegally stolen and non-authenticated devices are used for data acquisition, thereby reducing the possibility of data being forged, tampered, and misently entered, and improving the accuracy of data acquisition.
Smart Images

Figure CN119963211A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural product traceability, and in particular to a vegetable anti-counterfeiting traceability method and device based on blockchain and the Internet of Things. Background Art
[0002] As people's living standards improve, the requirements for vegetable quality and safety are also increasing. Vegetable quality and safety involve producers, processors, storage and transportation companies, sellers, consumers and regulatory agencies. Therefore, it is necessary to establish a traceability system that can cover the entire supply chain process and has authentic and reliable data to ensure the quality and safety of vegetables.
[0003] Existing agricultural product anti-counterfeiting and traceability methods collect multi-source information of agricultural products, integrate it and upload it to a cloud platform; consumers can trace the production process, quality information, geographical information of the origin and other data of the agricultural products by scanning the QR code and anti-counterfeiting code on the product packaging, thereby identifying the authenticity of the agricultural products.
[0004] However, the existing agricultural product anti-counterfeiting and traceability methods do not solve the problems of information being forged, tampered with, and incorrectly entered during the data collection process, resulting in low data collection accuracy. Summary of the invention
[0005] The present invention provides a vegetable anti-counterfeiting and tracing method and device based on blockchain and the Internet of Things, which are used to solve the defect of low data collection accuracy in the anti-counterfeiting and tracing process in the prior art, and to improve the data collection accuracy.
[0006] The present invention provides a vegetable anti-counterfeiting and tracing method based on blockchain and the Internet of Things, comprising: Connect the data collection device to the Internet and register online; Verifying the data acquisition device based on the registration information of the data acquisition device; When the data acquisition device is successfully verified, the data collected by the data acquisition device is uploaded to the blockchain.
[0007] In some embodiments, the verifying the data collection device based on the registration information of the data collection device includes: The data collection device communicates with the verification APP application through Bluetooth to obtain the geographic location information and identification information of the data collection device; Comparing the geographical location information and identification information of the data collection device with the registration information of the data collection device for consistency; When the consistency comparison is successful, it is confirmed that the data acquisition device is successfully verified.
[0008] In some embodiments, before uploading the data collected by the data collection device to the blockchain, the process further includes: Correcting the data collected by the data collection device according to predefined business rules and data quality standards; Using standard scores or interquartile ranges to identify outliers in the data collected by the data collection device; In the case where the data collected by the data collection device is completely randomly missing data, deleting the records containing the completely randomly missing data; In the case that the data collected by the data collection device is randomly missing data, multiple interpolation is performed based on historical data and statistical models to generate filling data.
[0009] In some embodiments, uploading the data collected by the data collection device to the blockchain includes: Distinguishing the data collected by the data collection device into private data and public data; The private data is encrypted using the ECIES encryption algorithm and uploaded to the blockchain.
[0010] In some embodiments, the method further comprises: Each of the data acquisition devices is encoded by using a mapping method of numbers and letters; According to the batch number of the current batch of vegetables and the code of the data collection device in the first link, construct the traceability code of the data collection device in the first link; Constructing a traceability code for the data acquisition device in the current link based on the traceability code for the data acquisition device in the previous link and the code for the data acquisition device in the current link; According to the traceability code of the data acquisition device in the last link, the traceability code of the current batch of vegetables is generated.
[0011] In some embodiments, the blockchain is a consortium chain.
[0012] The present invention also provides a vegetable anti-counterfeiting and tracing device based on blockchain and the Internet of Things, comprising: Internet of Things module, used to connect data collection equipment to the network and register online; A verification module, used for verifying the data acquisition device based on the registration information of the data acquisition device; The data uploading module is used to upload the data collected by the data collection device to the blockchain when the data collection device is successfully verified.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned vegetable anti-counterfeiting and traceability methods based on blockchain and the Internet of Things.
[0016] The vegetable anti-counterfeiting and tracing method and device based on blockchain and the Internet of Things provided by the present invention connect a data acquisition device to the network and perform online registration, verify the data acquisition device based on the registration information of the data acquisition device, and upload the data collected by the data acquisition device to the blockchain when the data acquisition device is successfully verified. The combination of the Internet of Things technology and the blockchain can prevent the data acquisition device from being misappropriated by illegal enterprises, and also prevent enterprises from using other non-certified data acquisition devices for data acquisition, thereby reducing the possibility of data being forged, tampered with, and incorrectly entered, and improving the accuracy of data collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the present invention; Figure 2 It is a flow chart of registration and binding of data acquisition equipment provided by the present invention; Figure 3 It is a structural schematic diagram of a vegetable anti-counterfeiting and traceability device based on blockchain and the Internet of Things provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Figure 1 This is one of the flow charts of the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the present invention, such as Figure 1 As shown, the present invention provides a vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things, comprising: Step 110, connecting the data acquisition device to the network and performing online registration; Step 120, verifying the data acquisition device based on the registration information of the data acquisition device; Step 130, when the data collection device is successfully verified, the data collected by the data collection device is uploaded to the blockchain.
[0021] Specifically, according to the entire vegetable supply chain, data collection equipment can include weather stations, video monitoring equipment, insect lamps, pesticide residue detectors, agricultural collection apps, barcode printers, storage monitoring equipment, logistics monitoring equipment, and smart electronic scales, etc. Table 1 shows the collection method, collected data, and usage of each data collection device, which explains the collection method, collected data, and usage of each data collection device.
[0022] Table 1 Collection methods, collected data and usage of each data collection device
[0023] Apply Internet of Things technology to build the hardware architecture of the vegetable traceability system, connect the data collection equipment to the network, and realize device identification, information collection and association of traceability information through information exchange and communication.
[0024] During the vegetable traceability process, data collection equipment needs to be authenticated and bound to the corporate entity to avoid equipment tampering. Figure 2 It is a flow chart of data acquisition device registration and binding provided by the present invention, such as Figure 2As shown, the vegetable supply chain enterprise will register the data collection equipment to be used in the traceability system online, submit the equipment ID, equipment name, type, version number, equipment serial number, enterprise geographical area and other registration information, and the platform regulator will review the authenticity, completeness and accuracy of the registration information. After the review is successful, the registration information of the data collection equipment will be registered and bound to the enterprise information. After successful registration, the data collected from the data collection device will be identified as the data of the bound enterprise and uploaded. If the information of the data collection device and the enterprise entity changes, the vegetable supply chain enterprise can apply for change and re-bind according to the above process.
[0025] A device verification mechanism is designed for data collection devices, and the data collection devices are verified using the registration information of the data collection devices. If the geographic location information and identification information of the data collection device are consistent with the registration information when the data collection device is registered, the data collection device is deemed to have passed the verification and is a legal device.
[0026] If the data collection device is successfully verified, the data collection device can be applied, that is, the interface of the data collection device can be called to collect data, and the collected data can be uploaded to the blockchain through wired network, WiFi, 4G, etc. Otherwise, data interaction will not be possible.
[0027] The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the embodiment of the present invention connects a data acquisition device to the network and performs online registration, verifies the data acquisition device based on the registration information of the data acquisition device, and uploads the data collected by the data acquisition device to the blockchain when the data acquisition device is successfully verified. The combination of the Internet of Things technology and the blockchain can prevent the data acquisition device from being stolen by illegal enterprises, and also prevent enterprises from using other non-certified data acquisition devices for data collection, thereby reducing the possibility of data being forged, tampered with, and mistakenly entered, and improving the accuracy of data collection.
[0028] In some embodiments, verifying the data collection device based on the registration information of the data collection device includes: Use Bluetooth communication between the data collection device and the verification APP application to obtain the geographic location information and identification information of the data collection device; Compare the geographic location information and identification information of the data collection device with the registration information of the data collection device for consistency; If the consistency comparison is successful, it is confirmed that the data acquisition device verification is successful.
[0029] Specifically, the data collection device is equipped with a Bluetooth function. Bluetooth communication has the characteristic of a short distance. If the Bluetooth connection between the data collection device and the verification APP application is successful, it can be considered that the data collection device and the verification APP application belong to the same geographical location.
[0030] When the Bluetooth connection between the data collection device and the verification APP is successful, the positioning information obtained by the verification APP is regarded as the geographic location information of the data collection device. The verification APP communicates with the data collection device to obtain the identification information of the data collection device.
[0031] The geographic location information and identification information of the data collection device are compared with the registration information of the data collection device for consistency. If the consistency comparison is successful, that is, the geographic location information and the identification information are both consistent, it is confirmed that the data collection device has been successfully verified.
[0032] The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the embodiment of the present invention verifies the data acquisition device by applying Bluetooth communication technology, thereby realizing a simple and efficient device verification process.
[0033] In some embodiments, before uploading the data collected by the data collection device to the blockchain, the process further includes: Correct the data collected by data collection equipment according to predefined business rules and data quality standards; Use standard scores or interquartile ranges to identify outliers in data collected by data collection devices; In the case where the data collected by the data collection device are completely randomly missing data, the records containing completely randomly missing data shall be deleted; When the data collected by the data acquisition device is randomly missing data, multiple interpolation is performed based on historical data and statistical models to generate fill data.
[0034] Specifically, in the process of vegetable anti-counterfeiting and traceability based on the Internet of Things and blockchain, data preprocessing is a key step to ensure the accuracy and systematicness of traceability data. According to the characteristics of the vegetable supply chain, a data preprocessing process is designed, including data cleaning, anomaly detection, missing value processing and other links, to ensure the quality of the data, thereby providing consumers with authentic and reliable vegetable traceability information.
[0035] In the vegetable supply chain, data collection devices such as weather stations, video surveillance, and insect detection lights continuously generate a large amount of data. These data may contain incorrectly formatted, inconsistent, or duplicate information. The data cleaning process uses rule-based cleaning algorithms to automatically detect and correct these errors based on predefined business rules and data quality standards.
[0036] For example, if a record of vegetable production dates is incorrectly formatted or inconsistent with a known date range, these errors will be automatically identified and corrected, ensuring that all data conforms to the predetermined format and logic.
[0037] The collected data may be abnormal, such as abnormally high pesticide residue values recorded by the pesticide residue detector. The present invention uses standard scores (Z scores) or interquartile ranges (IQR) to identify abnormal values.
[0038] For example, if the Z-score of the pesticide residue value of a sample exceeds 3 or is less than -3, or the value is lower than the lower quartile minus 1.5 times the interquartile range, or the value is higher than the upper quartile plus 1.5 times the interquartile range, the value is marked as abnormal and its cause is further investigated to ensure the safety of vegetable products.
[0039] Due to IoT device failure or other reasons, some data may not be successfully recorded. For these missing values, different processing strategies are adopted according to the mechanism of data missing. For completely random missing data, records with missing values are deleted; for randomly missing data, multiple interpolation methods are used to generate reasonable filling values based on historical data and statistical models to maintain the integrity of the data set and the accuracy of the analysis.
[0040] The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the embodiment of the present invention improves data quality through a series of data preprocessing steps such as data correction, abnormal data identification, and missing data deletion or supplementation, thereby increasing consumers' trust in vegetable traceability results.
[0041] In some embodiments, uploading data collected by a data collection device to a blockchain includes: Differentiate the data collected by the data collection device into private data and public data; The private data is encrypted using the ECIES encryption algorithm and uploaded to the blockchain.
[0042] Specifically, in vegetable traceability and anti-counterfeiting tracing, the data collected by the data collection device is divided into private data and public data. Public data includes product information, test results, logistics status, etc., and private data includes user identity, internal traceability information, and corporate trade secrets, etc.
[0043] The present invention uses the Elliptic Curve Integrated Encryption Scheme (ECIES) algorithm to encrypt private data and realize the anti-counterfeiting function of private data in the vegetable supply chain. The specific process is as follows: When the data collection device in the vegetable supply chain uploads private data, the data owner uses a symmetric key to encrypt the private data. The private data accessor of the vegetable supply chain makes a request to access the private data. The data owner confirms his identity through the public key of the data accessor and decides to use the public key of the data owner to encrypt the symmetric key, and encapsulates the encrypted symmetric key and the encrypted ciphertext. The private data accessor of the vegetable supply chain obtains the encrypted ciphertext and the encrypted symmetric key by decapsulation, decrypts it with its own private key, obtains the symmetric key of the private data of the vegetable supply chain, and decrypts the private data uploaded by the data collection device with the symmetric key.
[0044] The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the embodiment of the present invention divides the data collected by the data collection device into private data and public data. The private data is encrypted by the ECIES encryption algorithm and uploaded to the blockchain network to ensure data sensitivity. The regulatory agency and the relevant vegetable supply chain organization nodes can obtain the plain text of the relevant private data through encryption authorization, and consumers cannot obtain the plain text of private information, thereby improving the operating efficiency of the vegetable supply chain and enhancing the quality supervision of the vegetable supply chain.
[0045] In some embodiments, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the present invention further includes: Each data collection device is coded by using a number plus letter mapping method; According to the batch number of the current batch of vegetables and the code of the data collection equipment in the first link, construct the traceability code of the data collection equipment in the first link; According to the traceability code of the data collection device in the previous link and the coding of the data collection device in the current link, the traceability code of the data collection device in the current link is constructed; Based on the traceability code of the data collection equipment in the last link, the traceability code of the current batch of vegetables is generated.
[0046] Specifically, a number plus letter mapping method is used to encode each data collection device involved in the vegetable anti-counterfeiting traceability process. For example, the weather station is coded as QX1, the video monitoring equipment is coded as SP1, and the insect situation light is coded as CQ1.
[0047] According to the batch number of the current batch of vegetables and the code of the data collection equipment in the first link, the traceability code of the data collection equipment in the first link is constructed. Table 2 shows the traceability code of the data collection equipment. As shown in Table 2, the traceability code of the weather station is A-QX1, where A is the batch number of the current batch of vegetables and QX1 is the code of the weather station.
[0048] The traceability code of the data acquisition device in the current link is based on the traceability code of the data acquisition device in the previous link, plus its own code. As shown in Table 2, the traceability code A-QX1-SP1 of the video monitoring device is based on the traceability code A-QX1 of the weather station plus its own code SP1. This cycle is repeated to determine the traceability codes of the data acquisition devices in all links of the current vegetable batch. According to the traceability code of the data collection device in the last link, the traceability code of the current batch of vegetables is generated. For example, if the data collection device in the last link is an intelligent electronic scale, the traceability code of the current batch of vegetables is generated according to the traceability code of the intelligent electronic scale.
[0049] Table 2 Traceability code of data acquisition equipment
[0050] The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the embodiment of the present invention encodes each data acquisition device, and constructs a traceability code of the data acquisition device according to the batch number of the current batch of vegetables and the encoding of the data acquisition device. The traceability code of the data acquisition device in the latter link includes the traceability code of the data acquisition device in the previous link. According to the traceability code of the data acquisition device in the last link, the traceability code of the current batch of vegetables is prepared. Since different batches of vegetables involve different data acquisition devices, the uniqueness of the traceability code of each batch of vegetables is ensured.
[0051] In some embodiments, the blockchain is a consortium chain.
[0052] Specifically, blockchain can be divided into three types: public chain, private chain and alliance chain. Among these three types, alliance chain is more suitable for vegetable supply chain traceability. Vegetable supply chain involves multiple participants, who need to share data but also need a certain degree of authority control and privacy protection. Unlike the public chain, the consensus and transaction process of the alliance chain are open to all groups and individuals, and unlike the private chain, which only stores blockchain data within the team or individuals, the alliance chain can isolate the ledgers of various enterprises in the supply chain in the blockchain network. On the basis of not being able to tamper with all the accounting transaction information and processes of the supply chain, it can realize the isolated storage of private business information between enterprises.
[0053] In order to further illustrate the advantages of the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the present invention, a real test is provided below: Taking the scenario of pesticide residue detection data entry as an example, the data collection accuracy and entry time efficiency of the equipment network access method and the manual entry method were tested. 1,000 pesticide residue samples were used for testing, and data were collected through three methods: equipment network access, single-person manual entry, and double-person manual entry. Table 3 is the test result table of information collection accuracy. The test results show that in terms of entry time efficiency, the equipment network access method is significantly higher than manual entry. In terms of entry accuracy, affected by factors such as personnel attention, sample quantity, and entry time, the equipment network access and double-person manual entry methods have a data accuracy rate 0.9% higher than the single-person entry method, but double-person manual entry requires double labor costs.
[0054] Table 3 Information collection accuracy test results
[0055] The vegetable anti-counterfeiting and tracing device based on blockchain and the Internet of Things provided by the present invention is described below. The vegetable anti-counterfeiting and tracing device based on blockchain and the Internet of Things described below and the vegetable anti-counterfeiting and tracing method based on blockchain and the Internet of Things described above can be referenced to each other.
[0056] Figure 3 : is a schematic diagram of the structure of the vegetable anti-counterfeiting and traceability device based on blockchain and the Internet of Things provided by the present invention, such as Figure 3 As shown, the present invention provides a vegetable anti-counterfeiting and tracing device based on blockchain and the Internet of Things, comprising: The Internet of Things module 310 is used to connect the data collection device to the network and perform online registration; A verification module 320, configured to verify the data collection device based on the registration information of the data collection device; The data uploading module 330 is used to upload the data collected by the data collection device to the blockchain when the data collection device is successfully verified.
[0057] In some embodiments, the verification module 320 is specifically used to: The data collection device communicates with the verification APP application through Bluetooth to obtain the geographic location information and identification information of the data collection device; Comparing the geographical location information and identification information of the data collection device with the registration information of the data collection device for consistency; When the consistency comparison is successful, it is confirmed that the data acquisition device is successfully verified.
[0058] In some embodiments, the apparatus further comprises: A data correction module, used to correct the data collected by the data collection device according to predefined business rules and data quality standards; An abnormality identification module, used to identify abnormal values of the data collected by the data collection device using a standard score or an interquartile range; A missing deletion module, used for deleting records containing completely randomly missing data when the data collected by the data collection device is completely randomly missing data; The missing data filling module is used to generate filling data by performing multiple interpolation based on historical data and statistical models when the data collected by the data collection device is randomly missing data.
[0059] In some embodiments, the apparatus further comprises: A data distinguishing module, used for distinguishing the data collected by the data collection device into private data and public data; The encryption upload module is used to encrypt the private data using the ECIES encryption algorithm and then upload it to the blockchain.
[0060] In some embodiments, the apparatus further comprises: An encoding module, used to encode each of the data acquisition devices by mapping numbers and letters; A first construction module is used to construct a traceability code of the data collection device in the first link according to the batch number of the current batch of vegetables and the code of the data collection device in the first link; A second construction module is used to construct the traceability code of the data acquisition device in the current link according to the traceability code of the data acquisition device in the previous link and the coding of the data acquisition device in the current link; A production module is used to produce the traceability code of the current batch of vegetables according to the traceability code of the data acquisition device in the last link.
[0061] In some embodiments, the blockchain is a consortium chain.
[0062] It should be noted here that the vegetable anti-counterfeiting and traceability device based on blockchain and the Internet of Things provided by the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment will not be specifically described here.
[0063] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a vegetable anti-counterfeiting traceability method based on blockchain and the Internet of Things, the method comprising: connecting a data acquisition device to a network and performing online registration; verifying the data acquisition device based on the registration information of the data acquisition device; and uploading the data collected by the data acquisition device to the blockchain when the data acquisition device is successfully verified.
[0064] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0065] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the above methods. The method includes: connecting a data acquisition device to the network and registering online; verifying the data acquisition device based on the registration information of the data acquisition device; and if the data acquisition device is successfully verified, uploading the data collected by the data acquisition device to the blockchain.
[0066] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things provided by the above methods. The method includes: connecting a data acquisition device to the network and performing online registration; verifying the data acquisition device based on the registration information of the data acquisition device; and uploading the data collected by the data acquisition device to the blockchain when the verification of the data acquisition device is successful.
[0067] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things, characterized in that: include: Connect the data collection device to the Internet and register online; Verifying the data acquisition device based on the registration information of the data acquisition device; When the data acquisition device is successfully verified, the data collected by the data acquisition device is uploaded to the blockchain.
2. The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things according to claim 1 is characterized in that: The verifying the data acquisition device based on the registration information of the data acquisition device includes: The data collection device communicates with the verification APP application through Bluetooth to obtain the geographic location information and identification information of the data collection device; Comparing the geographical location information and identification information of the data collection device with the registration information of the data collection device for consistency; When the consistency comparison is successful, it is confirmed that the data acquisition device is successfully verified.
3. The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things according to claim 1 is characterized in that: Before uploading the data collected by the data collection device to the blockchain, it also includes: Correcting the data collected by the data collection device according to predefined business rules and data quality standards; Using standard scores or interquartile ranges to identify outliers in the data collected by the data collection device; In the case where the data collected by the data collection device is completely randomly missing data, deleting the records containing the completely randomly missing data; In the case that the data collected by the data collection device is randomly missing data, multiple interpolation is performed based on historical data and statistical models to generate filling data.
4. The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things according to claim 1 is characterized in that: The uploading of the data collected by the data collection device to the blockchain includes: Distinguishing the data collected by the data collection device into private data and public data; The private data is encrypted using the ECIES encryption algorithm and uploaded to the blockchain.
5. The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things according to claim 1 is characterized in that: The method further comprises: Each of the data acquisition devices is encoded by using a mapping method of numbers and letters; According to the batch number of the current batch of vegetables and the code of the data collection device in the first link, construct the traceability code of the data collection device in the first link; Constructing a traceability code for the data acquisition device in the current link based on the traceability code for the data acquisition device in the previous link and the code for the data acquisition device in the current link; According to the traceability code of the data acquisition device in the last link, the traceability code of the current batch of vegetables is generated.
6. The vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things according to claim 1 is characterized in that: The blockchain is a consortium chain.
7. A vegetable anti-counterfeiting and traceability device based on blockchain and the Internet of Things, characterized in that: include: Internet of Things module, used to connect data collection equipment to the network and register online; A verification module, used for verifying the data acquisition device based on the registration information of the data acquisition device; The data uploading module is used to upload the data collected by the data collection device to the blockchain when the data collection device is successfully verified.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by the processor, the vegetable anti-counterfeiting and traceability method based on blockchain and the Internet of Things as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Animation file problem verification method and system based on multi-version comparison
CN120687418A
A multi-version comparison-based animation file problem verification method and system
CN120687418B