A blockchain-based method and system for detecting and tracing medicinal and edible ingredients
By designing a blockchain-based medicinal and food homologous food ingredient detection and traceability system, the problems in the existing technology that cannot be realized in decentralized data storage and abnormal processing functions, location pollution sources and responsibility allocation, dynamic scoring, user query and risk warning are achieved, and efficient food safety guarantee and information transparency are achieved.
Patent Information
- Application Number
- CN202510258943.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
AI Technical Summary
The existing technology cannot realize the decentralized data storage and exception handling functions, locate pollution sources through time and space analysis and perform responsibility allocation functions, dynamic scoring functions based on the behavioral data of supply chain participants, and user query and risk warning functions, resulting in the problems of supply chain data being easily intervened by manual intervention and tampered with, supply chain information is opaque, unclear responsibilities and the inability to display relevant data in real time.
A blockchain-based medicinal and food homologous food ingredient detection and traceability system is designed, including detection module, data collection module, blockchain storage module, smart contract module, credit evaluation module and user interaction module. Decentralized data storage is realized through blockchain storage module, smart contract module performs abnormal processing, credit evaluation module performs dynamic scoring, and user interaction module provides query and risk warning functions.
Decentralized data storage and abnormal handling functions have been realized, pollution sources are located through time and space analysis and responsibility allocation, dynamic scoring is performed based on the behavioral data of supply chain participants, user query and risk warning functions have been improved, food safety guarantee efficiency has been enhanced, pollutant traceability has been enhanced, information transparency and user experience have been improved.
Smart Images

Figure CN119762100A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food safety traceability, and specifically to a method and system for detecting and tracing food ingredients with medicinal and edible homology based on blockchain. Background Art
[0002] In recent years, food safety issues have occurred frequently. Food and medicine ingredients have attracted much attention due to their unique food and medicinal value, but safety and quality issues in their production, processing, logistics and sales have always been difficult to fully resolve. Traditional traceability systems are prone to data tampering, information is opaque, and links are scattered, making it impossible for consumers and regulators to accurately understand the full life cycle information of products from source to terminal.
[0003] Therefore, this application proposes a blockchain-based method and system for detecting and tracing the origin of food ingredients with medicinal and edible properties. The traceability system based on blockchain technology achieves transparency in the supply chain of food ingredients with medicinal and edible properties through its decentralized and tamper-proof characteristics, providing an innovative solution for improving food safety.
[0004] Patent document CN115829597B discloses a method for uploading food traceability information to a chain and a food traceability system. The above patent can improve the efficiency of uploading food traceability information to a chain, but the above patent cannot realize decentralized data storage and exception handling functions.
[0005] Patent document CN118379075B discloses a food full-cycle traceability method based on food safety. The above patent provides more accurate food risk assessment results, but the above patent cannot locate the source of pollution and assign responsibilities through time and space analysis.
[0006] Patent document CN118260676B discloses a method and system for rapid food traceability based on food safety. The above patent achieves the goal of increasing the speed of food traceability, but the above patent cannot achieve a dynamic scoring function based on the behavioral data of supply chain participants.
[0007] Patent document CN112116361B discloses a green food safety traceability and distribution system. The above patent realizes the traceability of green food and determines whether the price of green food is reasonable. Sellers can predict the distribution of green food through this system, but the above patent cannot realize user query and risk warning functions.
[0008] In summary, the above patents cannot realize the decentralized data storage and exception handling functions, the functions of locating pollution sources and allocating responsibilities through time and space analysis, the dynamic scoring function based on the behavioral data of supply chain participants, and the user query and risk warning functions, which leads to the problems that supply chain data is easily tampered by human intervention, supply chain information is not transparent, responsibilities are not clear, and relevant data cannot be displayed in real time; To this end, this application proposes a blockchain-based method and system for detecting and tracing the source of medicinal and edible ingredients, which can realize decentralized data storage and exception handling functions, locate pollution sources and assign responsibilities through time and space analysis, perform dynamic scoring functions based on the behavioral data of supply chain participants, and user query and risk warning functions. Summary of the invention
[0009] The purpose of the present invention is to provide a method and system for detecting and tracing medicinal and edible ingredients based on blockchain, so as to solve the technical problems proposed in the above background technology, such as the inability to realize decentralized data storage and exception handling functions, the inability to locate pollution sources and perform responsibility allocation functions through time and space analysis, the dynamic scoring function based on the behavioral data of supply chain participants, and the user query and risk warning functions, which leads to the supply chain data being easily tampered with by human intervention, the opacity of supply chain information, unclear responsibilities and the inability to display relevant data in real time.
[0010] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a blockchain-based medicine and food homologous food detection and traceability system, comprising a detection module, a data acquisition module, a blockchain storage module, a smart contract module, a credit evaluation module and a user interaction module, wherein the detection module generates structured data and transmits it to the data acquisition module, the data acquisition module is connected to the blockchain storage module through a database communication protocol, the blockchain storage module is connected to the smart contract module through a rule base communication protocol, the credit evaluation module is connected to the smart contract module and the user interaction module through a two-way communication interface, and the user interaction module is connected to the blockchain storage module through digital network communication; The blockchain storage module is used to upload the detection data and the collected data to the blockchain storage, adopt the distributed ledger technology to realize the transparency and immutability of the data, and support the fast query based on the side chain; The blockchain storage module adopts a storage architecture combining the main chain and the side chain, including: Main chain: stores core traceability data, including test reports, behavior records of supply chain participants, and credit scores; Sidechain: Stores unstructured data, including large-scale environmental monitoring data and consumer feedback, and supports fast query and analysis; Storage optimization unit: Classify and manage basic data, business data, and shared data through a hierarchical storage structure to improve storage and access efficiency.
[0011] Preferably, the detection module includes a nanomaterial sensor, a spectral analysis device and a pollutant identification algorithm, which is used to detect pesticide residues, heavy metals and microbial indicators in food and medicine ingredients, generate structured data, and attach a timestamp and batch identification; The detection module further comprises: Monitoring algorithm optimization submodule: Improves the sensitivity and accuracy of pollutant detection through machine learning algorithms, and supports pollution trend analysis based on historical data; Data interface module: connected to the data acquisition module, used to integrate the detection data and environmental parameters and transmit them to the blockchain storage module.
[0012] Preferably, the data acquisition module is used to collect multi-dimensional data of the planting, processing, logistics, storage and sales environment in real time, including environmental parameters, processing records and logistics status; The data acquisition module includes: Data encryption unit: Hash the collected data and add timestamps and geographic location tags; Distributed data transmission module: used to distribute pre-processed data to multiple blockchain nodes to ensure the reliability and speed of data upload.
[0013] Preferably, the smart contract module is used to perform consistency verification and exception handling on the stored data according to preset rules, and automatically trigger an early warning mechanism when data anomalies are detected, including locking the relevant batches and sending notifications; Smart contract modules include: Anomaly detection logic unit: performs logical verification on uploaded data based on preset rules to detect data integrity, consistency and compliance; Early warning mechanism submodule: When abnormalities occur in the detection and collection data, batch locking, recall and responsibility notification functions are triggered; Contract execution recording unit: records the execution process of smart contracts, generates execution logs and stores them in the blockchain.
[0014] Preferably, the credit evaluation module is used to generate a dynamic credit frequency score based on the behavior records, test results and operational compliance of each supply chain participant, and the score results are provided to consumers and regulators through a visual interface; The credit evaluation module includes: Dynamic scoring algorithm unit: combines historical behavior data, compliance records and consumer feedback of supply chain participants to update credit scores in real time; Credit change monitoring module: monitors credit score change trends and provides score fluctuation analysis.
[0015] Preferably, the user interaction module is used to provide users with full-process traceability information of the food and medicine ingredients through unique identifier QR codes and RFID tags, including test reports, supply chain records and dynamic credit scores; The user interaction module includes: Traceability query interface: supports querying food testing data, supply chain information and credit scores through QR code scanning, web and mobile applications; Personalized recommendation module: push products from suppliers with high credit scores based on the user's query records and consumption preferences; Real-time warning notification module: When the queried product involves abnormal batches, warning information and alternative product recommendations are pushed to users.
[0016] Preferably, the traceability system further includes a pollutant contribution analysis module, which is connected to the blockchain storage module and the smart contract module and is used for analysis based on AI models and big data: Locate pollution sources and calculate their contribution to each link in the supply chain; Generate an analysis report based on the scope of pollution impact and provide it to regulatory agencies for reference.
[0017] Preferably, the smart contract module embeds an automatic verification mechanism for smart contracts in the logistics and processing links to eliminate the risk of data tampering caused by human intervention, and the contract triggers an exception handling procedure according to the set threshold.
[0018] Preferably, the method comprises the following steps: S1. Detect contaminants in food and medicine ingredients through the detection module to generate structured detection data; S2, collect environmental parameters and operation records of planting, processing, logistics and storage through the data acquisition module, and perform data preprocessing; S3, upload the test data and collection data to the blockchain through the blockchain storage module to form a traceability chain; S4. Use the smart contract module to verify the traceability chain data, detect anomalies and trigger processing logic; S5. Generate dynamic credit scores based on supply chain behavior data through the credit evaluation module and store them in the blockchain; S6. Provide traceability query services to consumers through the user interaction module, displaying test data, supply chain records and credit scores.
[0019] Preferably, the method further comprises the following steps: S41. When any abnormality occurs in the detection data or the collection data, the abnormal batch is locked through the smart contract module, and an early warning is sent to the relevant responsible party; S42. Calculate the responsibility distribution of pollution sources through the pollutant contribution analysis module, generate a report and send it to the regulatory agency; S61. Push personalized safety warning information and high-credit supplier recommendations to consumers through the user interaction module.
[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention realizes decentralized data storage and exception handling functions by designing a blockchain storage module and a smart contract module, eliminates data tampering caused by manual intervention, improves system automation and credibility, and improves food safety assurance efficiency; 2. The present invention is designed with a pollutant contribution analysis module, which can locate the pollution source and distribute responsibilities through time and space analysis, solve the problem of being unable to clearly identify the pollution source and responsibility distribution, enhance the pollutant traceability, and support regulatory agencies to accurately enforce the law and rectify the responsible parties; 3. The present invention realizes the dynamic scoring function based on the behavioral data of the supply chain participants by designing a credit evaluation module, which solves the problem of lack of newcomers and transparency of supply chain participants for consumers. Consumers can choose high-credit products when applying for certificates and transfers, thus improving information transparency and food safety; 4. The present invention realizes user query and risk warning functions by designing a user interaction module, solves the problem that consumers and regulatory agencies cannot obtain traceability information and risk warnings in real time, improves user experience, enhances consumers' perception of food safety, and promotes enterprises to optimize supply chain management. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram of the traceability system of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0023] See also Figure 1 , an embodiment provided by the present invention: a blockchain-based medicine and food homologous food detection and traceability system, comprising a detection module, a data acquisition module, a blockchain storage module, a smart contract module, a credit evaluation module and a user interaction module, characterized in that: the detection module generates structured data and transmits it to the data acquisition module, the data acquisition module is connected to the blockchain storage module through a database communication protocol, the blockchain storage module is connected to the smart contract module through a rule base communication protocol, the credit evaluation module is connected to the smart contract module and the user interaction module through a two-way communication interface, and the user interaction module is connected to the blockchain storage module through digital network communication; The blockchain storage module is used to upload the detection data and the collected data to the blockchain storage, adopt the distributed ledger technology to realize the transparency and immutability of the data, and support the fast query based on the side chain; The blockchain storage module adopts a storage architecture combining the main chain and the side chain, including: Main chain: stores core traceability data, including test reports, behavior records of supply chain participants, and credit scores; Sidechain: Stores unstructured data, including large-scale environmental monitoring data and consumer feedback, and supports fast query and analysis; Storage optimization unit: Classify and manage basic data, business data, and shared data through a hierarchical storage structure to improve storage and access efficiency; Furthermore, the blockchain storage module receives multi-dimensional data from the data acquisition module, including the following: detection data: pollutant detection results generated by the detection module, including pesticide residues, heavy metal content and microbial indicators; environmental parameters: temperature and humidity, light intensity and gas concentration in logistics, storage and processing; operation records: timestamps, batch identification and geographic location information in production, processing and logistics operations; pre-processing the above data, first verifying the integrity and format of the received data to ensure that the data meets the requirements for blockchain uploading; hash encryption: hashing the data packet to generate a unique hash value for on-chain verification; additional identification: attaching timestamps and geographic location identification to each piece of data to ensure the authenticity and traceability of the data; The blockchain storage module adopts a layered storage architecture, dividing the data into the following three categories and storing them separately: Basic data layer: including test reports and environmental monitoring data, which are stored in the main chain as core traceability information to ensure immutability; Business data layer: storing operation records of supply chain links, such as processing time, transportation routes and storage conditions, which are shared through smart contracts; Shared data layer: including consumer evaluations, regulatory agency opinions and other data, which are stored in the side chain for fast query and extended application; When data is stored by category, the hash value of each category is written to the main chain through a distributed node network, and the complete data is stored in the distributed storage system of the main chain or side chain to ensure data consistency during query; Using block segmentation technology, each block stores fixed-size data packets to improve storage efficiency and network load capacity; The blockchain storage module writes data to the chain through the following steps: Packing data: Integrate hashed and classified data into blocks to ensure that the data order in the block is consistent with the transaction order; Consensus verification: Verify the authenticity and integrity of the data packet through the BFT consensus mechanism of the blockchain network; Data on the chain: The data after consensus verification is formally written into the blockchain, and the corresponding block header is generated (including timestamp, hash value of the previous block and hash value of the current data); The blockchain storage module supports hierarchical access rights to data for different user roles: Consumers: can query test reports, supply chain information and credit scores in the basic data layer through the user interaction module; Supply chain participants: can access relevant operation records and process information through the business data layer; Regulators: have the highest authority and can access all core data and extended data stored in the side chain through the main chain; After the user initiates a query request, the system verifies the user's identity and authority through the blockchain network node, queries the data range that matches the user's authority, returns the corresponding data, and compares the hash value of the returned data with the hash value on the chain to ensure that the data has not been tampered with.
[0024] See also Figure 1 , an embodiment provided by the present invention: a blockchain-based food and medicine food ingredient detection and traceability system, the detection module includes a nanomaterial sensor, a spectral analysis device and a pollutant identification algorithm, which is used to detect pesticide residues, heavy metals and microbial indicators of food and medicine food ingredients, generate structured data, and attach a timestamp and batch identification; The detection module further comprises: Monitoring algorithm optimization submodule: Improves the sensitivity and accuracy of pollutant detection through machine learning algorithms, and supports pollution trend analysis based on historical data; Data interface module: connected to the data acquisition module, used to integrate the detection data and environmental parameters and transmit them to the blockchain storage module; The data acquisition module is used to collect multi-dimensional data of the planting, processing, logistics, storage and sales environment in real time, including environmental parameters, processing records and logistics status; The data acquisition module includes: Data encryption unit: Hash the collected data and add timestamps and geographic location tags; Distributed data transmission module: used to distribute pre-processed data to multiple blockchain nodes to ensure the reliability and speed of data upload; Furthermore, nanomaterial sensors detect pesticide residues on the surface or inside of food ingredients, generate numerical values through specific spectral signal responses, and spectral analysis equipment performs spectroscopic detection of heavy metal content or microbial indicators of food ingredients to generate pollutant concentration data. Pollutant identification algorithms are used to classify and compare the test results with thresholds, and output compliance or abnormal status; embedded sensor networks monitor environmental parameters in logistics, storage and processing in real time, temperature and humidity sensors record storage temperature and humidity changes, gas concentration sensors detect oxygen or carbon dioxide levels in packaging, and light sensors evaluate light intensity to prevent damage to photosensitive food ingredients; pollutant detection data is integrated with environmental parameter data, and the following identifiers are uniformly attached: timestamp, batch identifier and geographic location; The edge computing device performs denoising on the data output by the detection module and embedded sensor network, removes duplicate or redundant environmental data, retains key information, eliminates outliers caused by equipment fluctuations, and interpolates missing data; the data is structured: the detection data is converted into JSON format for distributed ledger storage, and the environmental parameters are sorted by time axis to form time series data, and a hash value is attached to each data for subsequent verification; the integrated data is quickly analyzed using intelligent screening rules. If the pollutant detection data exceeds the set threshold, it is marked as abnormal. If the environmental parameters deviate from the set range, a warning label is generated and attached to the data packet; Use hash algorithm to encrypt the integrated data: generate a unique hash value for each piece of data to ensure that the data cannot be tampered with during transmission and storage, and use symmetric encryption algorithm to encrypt sensitive information to protect data privacy; set different priorities according to data type: detection results and abnormal data are uploaded to the blockchain main chain first for smart contract verification and traceability, and real-time monitoring data such as environmental parameters are uploaded to the side chain or edge storage device for fast query and temporary analysis; after the data is uploaded successfully, the blockchain storage module generates a data upload confirmation message and feeds it back to the data acquisition module. The data acquisition module records the upload log, including the upload time, data hash value and target blockchain node.
[0025] See also Figure 1 , an embodiment provided by the present invention: a drug and food homologous food detection and traceability system based on blockchain, wherein the smart contract module is used to perform consistency verification and exception processing on stored data according to preset rules, and when data anomalies are detected, an early warning mechanism is automatically triggered, including locking related batches and sending notifications; Smart contract modules include: Anomaly detection logic unit: performs logical verification on uploaded data based on preset rules to detect data integrity, consistency and compliance; Early warning mechanism submodule: When abnormalities occur in the detection and collection data, batch locking, recall and responsibility notification functions are triggered; Contract execution recording unit: records the execution process of smart contracts, generates execution logs and stores them in the blockchain; The smart contract module embeds an automatic verification mechanism for smart contracts in the logistics and processing links to eliminate the risk of data tampering caused by manual intervention. The contract triggers an exception handling procedure according to the set threshold; Furthermore, the system administrator presets rules in the smart contract module, including data integrity, data consistency, and data compliance rules. The smart contract module is deployed to the blockchain network nodes, and the key equipment in each logistics or processing link is embedded in the smart contract execution environment for real-time verification of collected data; The inspection data, logistics data and processing records uploaded by the data acquisition module are sent to the blockchain storage module, and the smart contract module is triggered for verification. The hash value of the uploaded data is extracted to verify whether the data has been tampered with during transmission. The anomaly detection logic unit performs integrity, consistency and compliance verification in sequence. If the verification passes, the data is marked as "normal" and written into the blockchain. If the verification fails: the exception handling process is triggered, and an alarm is sent to the early warning mechanism submodule. The early warning mechanism submodule identifies the type of anomaly based on the verification results of the anomaly detection logic unit, including detection data anomalies (such as excessive pollutants), environmental data anomalies (such as excessive temperature and humidity), and data logic anomalies (such as mismatched logistics time). When an anomaly is detected, the following operations are triggered: Batch locking: Mark the abnormal batch as "suspended circulation" and lock its logistics operation rights; Recall operation: Notify relevant participants in the supply chain (such as processing plants and storage managers) to recall the affected batches; Responsibility notification: Generate an abnormality report and send it to the relevant responsible parties and regulatory agencies through the blockchain node; The contract execution recording unit automatically generates an execution log after each verification or exception handling, including the result of data verification, the triggered processing logic, the execution timestamp and the blockchain transaction ID; the execution log is written into the blockchain main chain for subsequent query.
[0026] See also Figure 1 , an embodiment provided by the present invention: a blockchain-based food and medicine homologous food ingredients detection and traceability system, the credit evaluation module is used to generate a dynamic credit frequency score based on the behavior records, test results and operational compliance of each supply chain participant, and the scoring results are provided to consumers and regulatory agencies through a visual interface; The credit evaluation module includes: Dynamic scoring algorithm unit: combines historical behavior data, compliance records and consumer feedback of supply chain participants to update credit scores in real time; Credit change monitoring module: monitors credit score change trends and provides score fluctuation analysis; The user interaction module is used to provide users with full-process traceability information of food and medicine ingredients through unique identifier QR codes and RFID tags, including test reports, supply chain records and dynamic credit scores; The user interaction module includes: Traceability query interface: supports querying food testing data, supply chain information and credit scores through QR code scanning, web and mobile applications; Personalized recommendation module: push products from suppliers with high credit scores based on the user's query records and consumption preferences; Real-time warning notification module: When the queried product involves abnormal batches, push warning information and alternative product recommendations to users; Furthermore, the credit evaluation module loads the following rules from the blockchain main chain during initialization: Scoring dimensions: including production compliance, logistics timeliness, processing quality stability and consumer feedback; weight setting: assign weights to each scoring dimension, such as production compliance accounting for 40%, logistics timeliness accounting for 30%, processing quality accounting for 20%, and consumer feedback accounting for 10%; dynamic update rules: adjust the scoring weights of supply chain participants based on historical table selection; The credit evaluation module obtains the behavioral data of supply chain participants through the blockchain main chain and smart contract module, including: production compliance data: such as whether the pollutant detection results meet the standards and whether the processing parameters are within the set range; logistics timeliness data: whether the transportation arrives at the specified time and whether the transportation conditions meet the requirements; processing quality data: the stability of the processing link records and whether there are abnormal batches; consumer feedback data: based on user evaluation and complaint records, extract positive and negative evaluation keywords; the credit scoring module calls the dynamic scoring algorithm unit to calculate the credit score according to the following steps: normalization processing: convert data of different dimensions into the same numerical range (0-100); weighted average: calculate the comprehensive score according to the weight and generate a real-time credit score; fluctuation monitoring: compare the current score with the historical score, identify significant changes and mark abnormal trends; the scoring results are stored in the blockchain main chain after hash encryption; Consumers submit query requests through QR code scanning, web or mobile applications: enter the batch number or product ID, and the system retrieves relevant traceability data from the blockchain main chain; the returned data includes: test reports, supply chain participant records and credit scores; the user interaction module visualizes the credit score and traceability information: displays the scores of supply chain participants in each scoring dimension, shows the historical change curve of the credit score, helps users evaluate the long-term performance of suppliers, and displays the production, processing, logistics and sales paths of food ingredients in the form of charts.
[0027] See also Figure 1 , an embodiment provided by the present invention: a blockchain-based food and medicine homologous food food detection and traceability system, the traceability system also includes a pollutant contribution analysis module, the pollutant contribution analysis module is connected with the blockchain storage module and the smart contract module, and is used for analysis based on AI model and big data: Locate pollution sources and calculate their contribution to each link in the supply chain; Generate analysis reports based on the scope of pollution impact and provide them to regulatory agencies for reference; Furthermore, the pollutant contribution analysis module obtains relevant pollutant information from the detection module, data collection module and blockchain storage module, performs time series analysis on the detection data, identifies the trend of pollutant concentration changes over time, determines the first time point when the pollutant appears, and compares it with the supply chain operation records to lock possible pollution links. Based on the logistics path and geographical location information, the distribution of pollutant concentrations in different storage points or transportation sections is analyzed. If the detection value of a storage point or section is significantly higher than that of other nodes, it is marked as a candidate pollution source. The most likely pollution source is determined by combining the time and space analysis results with the probability score predicted by the AI model. If there is uncertainty in the model score, multiple candidate links are generated for further verification. Contribution calculation: Responsibility allocation formula:
[0028] Among them, C i represents the contribution of link i, W i represents the weight of link i (e.g., 40% for generation, 30% for processing, etc.), D i represents the pollution data distribution factor of link i (such as detection concentration, number of abnormalities, etc.), and n represents the total number of supply chain links.
[0029] Working principle: In the production, processing, logistics and storage links, the system collects pollutant detection data, environmental parameters and operation records in real time through embedded sensor networks and detection equipment, and pre-processes the data through edge computing devices to form structured data packets; The pre-processed multi-dimensional data packets are uploaded to the blockchain storage module through encryption and hashing technology. The blockchain adopts a distributed ledger storage method to ensure the transparency and immutability of the data. At the same time, the smart contract module verifies the consistency of the data and triggers the early warning mechanism when anomalies are found, locking the relevant batches and notifying the responsible parties and regulatory agencies; Consumers can query the full life cycle information of food and medicine ingredients by scanning the code or using the traceability APP, including test reports, logistics records and credit scores. The credit evaluation module generates dynamic scores based on the behavioral data of supply chain participants and provides visual results to enhance consumer awareness and help regulators enforce the law accurately.
[0030] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A blockchain-based food and medicine food detection and traceability system, including a detection module, a data acquisition module, a blockchain storage module, a smart contract module, a credit evaluation module and a user interaction module, characterized in that: The detection module generates structured data and transmits it to the data acquisition module. The data acquisition module is connected to the blockchain storage module through a database communication protocol, and the blockchain storage module is connected to the smart contract module through a rule base communication protocol. The credit evaluation module is connected to the smart contract module and the user interaction module through a two-way communication interface, and the user interaction module is connected to the blockchain storage module through digital network communication; the detection module includes a nanomaterial sensor, a spectral analysis device and a pollutant identification algorithm, which are used to detect pesticide residues, heavy metals and microbial indicators of food and medicine ingredients, generate structured data, and attach timestamps and batch identifiers; the data acquisition module is used to collect planting, Multi-dimensional data of processing, logistics, storage and sales environment, including environmental parameters, processing records and logistics status; the smart contract module is used to verify the consistency and handle exceptions of stored data according to preset rules. When data anomalies are detected, the early warning mechanism is automatically triggered, including locking the relevant batches and sending notifications; the credit evaluation module is used to generate dynamic credit frequency scores based on the behavior records, test results and operational compliance of each participant in the supply chain, and the scoring results are provided to consumers and regulatory agencies through a visual interface; the user interaction module is used to provide users with full-process traceability information of medicinal and edible ingredients through unique identifier QR codes and RFID tags, including test reports, supply chain records and dynamic credit scores; The blockchain storage module is used to upload the detection data and the collected data to the blockchain storage, adopt the distributed ledger technology to realize the transparency and immutability of the data, and support the fast query based on the side chain; The blockchain storage module adopts a storage architecture combining the main chain and the side chain, including: Main chain: stores core traceability data, including test reports, behavior records of supply chain participants, and credit scores; Sidechain: Stores unstructured data, including large-scale environmental monitoring data and consumer feedback, and supports fast query and analysis; Storage optimization unit: Classify and manage basic data, business data, and shared data through a hierarchical storage structure to improve storage and access efficiency.
2. According to claim 1, a blockchain-based food and medicine homologous food detection and traceability system is characterized by: The detection module further comprises: Monitoring algorithm optimization submodule: Improves the sensitivity and accuracy of pollutant detection through machine learning algorithms, and supports pollution trend analysis based on historical data; Data interface module: connected to the data acquisition module, used to integrate the detection data and environmental parameters and transmit them to the blockchain storage module.
3. According to claim 1, a blockchain-based food and medicine homologous food detection and traceability system is characterized by: The data acquisition module includes: Data encryption unit: Hash the collected data and add timestamps and geographic location tags; Distributed data transmission module: used to distribute pre-processed data to multiple blockchain nodes to ensure the reliability and speed of data upload.
4. According to claim 1, a blockchain-based food and medicine food detection and traceability system is characterized by: Smart contract modules include: Anomaly detection logic unit: performs logical verification on uploaded data based on preset rules to detect data integrity, consistency and compliance; Early warning mechanism submodule: When abnormalities occur in the detection and collection data, batch locking, recall and responsibility notification functions are triggered; Contract execution recording unit: records the execution process of smart contracts, generates execution logs and stores them in the blockchain.
5. According to claim 1, a blockchain-based food and medicine homologous food detection and traceability system is characterized by: The credit evaluation module includes: Dynamic scoring algorithm unit: combines historical behavior data, compliance records and consumer feedback of supply chain participants to update credit scores in real time; Credit change monitoring module: monitors credit score change trends and provides score fluctuation analysis.
6. According to claim 1, a blockchain-based food and medicine homologous food detection and traceability system is characterized by: The user interaction module includes: Traceability query interface: supports querying food testing data, supply chain information and credit scores through QR code scanning, web and mobile applications; Personalized recommendation module: push products from suppliers with high credit scores based on the user's query records and consumption preferences; Real-time warning notification module: When the queried product involves abnormal batches, warning information and alternative product recommendations are pushed to users.
7. According to claim 1, a blockchain-based food and medicine homologous food detection and traceability system is characterized by: The traceability system also includes a pollutant contribution analysis module, which is connected to the blockchain storage module and the smart contract module for analysis based on AI models and big data: Locate pollution sources and calculate their contribution to each link in the supply chain; Generate an analysis report based on the scope of pollution impact and provide it to regulatory agencies for reference.
8. According to claim 1, a blockchain-based food and medicine food detection and traceability system is characterized by: The smart contract module embeds an automatic verification mechanism for smart contracts in the logistics and processing links to eliminate the risk of data tampering caused by human intervention. The contract triggers the exception handling procedure according to the set threshold.
9. A method for detecting and tracing the source of food ingredients with medicinal and edible properties based on blockchain, applicable to a system for detecting and tracing the source of food ingredients with medicinal and edible properties based on blockchain as claimed in any one of claims 1 to 8, characterized in that: The method comprises the following steps: S1. Detect contaminants in food and medicine ingredients through the detection module to generate structured detection data; S2, collect environmental parameters and operation records of planting, processing, logistics and storage through the data acquisition module, and perform data preprocessing; S3, upload the test data and collection data to the blockchain through the blockchain storage module to form a traceability chain; S4. Use the smart contract module to verify the traceability chain data, detect anomalies and trigger processing logic; S5. Generate dynamic credit scores based on supply chain behavior data through the credit evaluation module and store them in the blockchain; S6. Provide traceability query services to consumers through the user interaction module, displaying test data, supply chain records and credit scores.
10. A blockchain-based method for detecting and tracing the source of medicinal and edible ingredients according to claim 9, characterized in that: The method further comprises the following steps: S41. When any abnormality occurs in the detection data or the collection data, the abnormal batch is locked through the smart contract module, and an early warning is sent to the relevant responsible party; S42. Calculate the responsibility distribution of pollution sources through the pollutant contribution analysis module, generate a report and send it to the regulatory agency; S61. Push personalized safety warning information and high-credit supplier recommendations to consumers through the user interaction module.
Citation Information
Patent Citations
Green Food Safety Traceability and Distribution System
CN112116361B
Methods for uploading food traceability information to the blockchain and food traceability systems
CN115829597B
Food rapid traceability method and system based on food safety
CN118260676B
Food full cycle traceability method based on food safety
CN118379075B
Grain block chain information tracing method based on master-slave multiple chains
CN115994770A
Cited By
Method for tracing quality of high polymer material in down garment based on block chain
CN119990921A
Blockchain-based method for tracing quality of polymer materials in down clothing
CN119990921B
Agricultural data intelligent contract cross-domain sharing method based on master-slave chain
CN120128596A
Fertilizer traceability system based on block chain and big data fusion
CN120198141A
Tracing method and system for food safety and storage medium
CN120471633A