Agricultural product quality safety full-chain tracing system based on multi-node cooperation
By using a multi-node collaborative agricultural product quality and safety full-chain traceability system, which combines knowledge graph and blockchain technology, the problems of blind node setting and chaotic data ownership in agricultural product quality traceability have been solved. This has enabled accurate quality assessment and consumer feedback, and improved the efficiency and transparency of the entire traceability process.
Patent Information
- Application Number
- CN202511437545.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-01-02
AI Technical Summary
The existing agricultural product quality and safety traceability chain correlation analysis system cannot set nodes according to the differences in the characteristics of agricultural products, resulting in blind spots in control and redundant resources, chaotic data ownership, difficulty in accurately locating quality problems, and low consumer trust.
The system adopts a multi-node collaborative traceability system for the entire agricultural product quality and safety chain, including a historical data collection module, a graph construction module, an analysis node module, an analysis on-chain module, an analysis control module, and a query and display module. Through knowledge graph and blockchain technology, each stage is recorded on the chain and bound to a unique fruit code. Combined with fragility coefficient and characteristic data, it achieves accurate quality assessment and feedback.
It enables precise coverage and monitoring of agricultural product quality, improves data aggregation efficiency and consumer trust, provides an efficient, accurate, and transparent end-to-end traceability system, and supports collaborative handling of anomalies and system iteration.
Smart Images

Figure CN121258542A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of agricultural product analysis, in particular to an agricultural product quality and safety whole-chain traceability system based on multi-node cooperation. BACKGROUND
[0002] With the increasing attention of consumers to the quality and safety of agricultural products and the development of the fresh food industry, the demand for whole-chain management and control of agricultural products from planting to sales is increasingly urgent. The current agricultural product industry faces two core pain points: first, the characteristics of agricultural products differ greatly, the whole-chain loss rate is high, and quality problems are mostly concentrated in key stages such as transportation and storage, which need to be precisely managed and controlled; second, the traditional traceability system cannot achieve precise correlation, and after a problem occurs, the responsibility is often evaded due to vague traceability, resulting in low consumer trust.
[0003] To solve the above problems, the prior art has carried out related exploration. The existing patent application No. CN110880151A, entitled "Invention patent of a safe agricultural product quality and safety traceability chain correlation analysis system", records that the configuration data source unit is associated with the data extraction module and the data feature conversion module; the configuration data source unit is connected with the calling data mining unit; the calling data mining unit is associated with the data exploration module, the data processing and conversion module; the calling data mining unit is connected with the big data analysis unit; the big data analysis unit is associated with the data extraction module and the training set construction module; the big data analysis unit is connected with the publishing and displaying unit, which can effectively integrate the information resources scattered in various business systems, localized files and agricultural management service data warehouses in the agricultural data center, and complete the sorting and classification of various data assets.
[0004] However, the above scheme has certain disadvantages in actual use. First, it only integrates traceability data through data mining, without setting nodes according to the differentiated characteristics of agricultural products, and the nodes are fixed, which cannot meet the different control needs of fruits with different characteristics, and blind spots or resource redundancy may occur. Moreover, although it realizes multi-source data extraction and integration, it does not use unique codes to associate data at each link, and the ownership relationship between data is chaotic, so manual matching of whole-chain data for the same fruit is required, which is time-consuming and prone to errors, low in efficiency, and finally it focuses on overall data mining and analysis, without splitting the quality evaluation dimensions according to key nodes, and can only output the overall quality conclusion of the whole chain, which cannot locate the specific link problem and the traceability is not targeted enough, making it difficult for supervision to be precise.
[0005] Therefore, the existing agricultural product quality and safety traceability chain correlation analysis system has certain disadvantages, and thus an agricultural product quality and safety whole-chain traceability system based on multi-node cooperation is provided. SUMMARY
[0006] To achieve the above object, the present application is realized by the following technical solutions: The agricultural product quality safety whole-chain tracing system based on multi-node cooperation comprises a historical acquisition module, a graph construction module, an analysis node module, an analysis chain module, an analysis control module, a query display module and a comprehensive rectification module. The historical acquisition module acquires whole-chain data of various fruits in the past 3-5 years and pre-processes the acquired data. The graph construction module performs feature extraction and correlation analysis on the pre-processed whole-chain data of various fruits and constructs a knowledge graph. The analysis node module sets an analysis node based on the knowledge graph and the pre-processed whole-chain data. The analysis chain module acquires whole-chain data of current fruits, pre-processes the data and encodes the pre-processed whole-chain data. The analysis control module retrieves data on each link through fruit coding, integrates the data, evaluates the quality of each link and analyzes whether there is any abnormality. The query display module enables consumers to scan the code to check the associated report and generates a feedback report and a feedback code, which are uploaded to the alliance chain separately. The comprehensive rectification module downloads abnormal reports and feedback reports, analyzes and formulates rectification schemes and assists in replying to consumer opinions.
[0007] Preferably, the historical acquisition module comprises a first data acquisition unit and a pre-processing unit. The pre-processing unit performs outlier identification and elimination and missing value completion on the acquired planting link data, processing link data, transportation link data, storage link data and sales link data.
[0008] Preferably, the graph construction module comprises a feature extraction unit and a correlation analysis unit. The feature extraction unit first calculates the correlation of each parameter with the core quality index using the Pearson correlation coefficient, selects parameters with an absolute value of the correlation coefficient > 0.6 as core features, then performs dimension reduction on high-dimensional data in the core features using principal component analysis, extracts principal components with a cumulative variance contribution rate > 85% as core feature combinations, quantizes numerical value type features and encodes type features, sorts features based on importance, and calculates the importance of each feature to the quality index using a random forest model. The association analysis unit forms reusable rule models, specifically including intra-link association models and cross-link association models, the intra-link association models focus on the parameter and result relationship of a single link, and the cross-link association models construct a comprehensive model for serial multi-link data.
[0009] Preferably, the knowledge graph includes a core layer, a link layer, and an association layer, the core layer takes a specific fruit variety as a core node, the link layer constructs five secondary nodes of planting, processing, transportation, warehousing, and sales around the core node, each secondary node contains three sub-dimensions of parameters, standards, and risks, and the association layer defines the association relationship between nodes and marks the relationship type and weight with a directed edge; the data classification entry includes structured data entry and unstructured data entry, the structured data entry is to enter the numerical and categorical data after feature extraction into the knowledge graph, and directly associate the corresponding association model, and the unstructured data entry stores detection reports, field photos, and videos in historical data through IPFS, generates a unique tag, and marks the tag as an attribute under the corresponding node after the tag is generated.
[0010] Preferably, the steps of setting the analysis nodes after analysis and processing are as follows: Retrieve the core parameters from the pretreated whole-chain data, select K key category data, and perform standardization processing thereon; Perform weighted processing on the standardized core parameters, match the influence degree of each parameter on the fruit quality with the weighted weight, and divide by 100 to obtain the vulnerability coefficient; Calculate the number of analysis nodes: number of analysis nodes = number of basic links x vulnerability coefficient, and the result is rounded up; According to the number of analysis nodes calculated, in combination with the risk rules of the whole chain in the knowledge graph, the specific positions of the nodes are determined, and the determined analysis node information is solidified as an analysis node configuration table.
[0011] Preferably, when the specific positions of the nodes are determined in combination with the risk rules of the whole chain in the knowledge graph, the analysis node quantity is used to select mandatory nodes and optional nodes first, the mandatory nodes are the end of the planting link and the end of the transportation link, the optional nodes include a node after initial processing and a node after warehousing, if the number of analysis nodes is greater than 2, the fruit needs initial processing, the historical abnormal rate of the link in the knowledge graph is greater than or equal to 8%, the node after initial processing is added, if the number of analysis nodes is greater than 2, the fruit storage time is greater than 3 days, and the historical warehousing loss rate in the knowledge graph is greater than or equal to 5%, the node after warehousing is added, if the number of analysis nodes is 3, and the node after initial processing and the node after warehousing are both added, the number of analysis nodes is increased.
[0012] Preferably, the analysis on-chain module generates a unique fruit code through the coding construction unit, assigns a link code to the full-chain data of the current fruit after preprocessing, combines the fruit code with the link code to form a total code, generates a JSON file of the current link data after preprocessing, and associates the total code of the corresponding link, after the association is completed, is uploaded to the alliance chain alone: the total code is used as the key of on-chain storage, and the hash value of the JSON file after preprocessing is used as the value.
[0013] Preferably, the analysis and control module includes a quality evaluation unit, and the analysis and control module takes on-chain data as a data source and a preset analysis node as an evaluation object. The data download unit uses the fruit code to parse the total code to extract the link code, clearly defines the five links, calls the block link interface to pull data in batches and converts it into JSON format; and integrates it into a structured data set according to the timeline and link order. The quality evaluation unit filters the preset analysis node from the data set, sets the index weight according to the analysis node characteristics; calculates the basic score, and calculates the correction score using the basic score, performs rating based on the correction score, judges whether it is abnormal based on the rating result, generates an abnormal report if there is an abnormality, otherwise generates a comprehensive quality report, and uploads it to the chain after association with the fruit code.
[0014] Preferably, the query display module includes a first traceability unit, a query unit and a feedback unit. The traceability unit generates a dynamic two-dimensional code traceability code containing three layers of information, and pushes it to the sales link for pasting. Then the consumer scans the traceability code with a code scanning tool, the query unit calls the data through the fruit code by calling the block link interface, and preferentially loads the comprehensive quality report, and the comprehensive quality report is attached with the link of the node quality report; The feedback unit receives consumer graphic, video and text feedback, generates a feedback report and a unique feedback code, uploads them to the alliance chain after association with the fruit code, and synchronously pushes a prompt to the corresponding link enterprise management system.
[0015] Preferably, the comprehensive rectification module downloads the abnormal report and the feedback report, analyzes the abnormal reasons relying on the knowledge graph, divides the abnormal reasons into operation type, equipment type and environment type, positions the feedback opinions corresponding to the data and the link, and then pushes the abnormal data to the corresponding link management system, and the management personnel form a rectification scheme including the abnormal reason, the rectification time limit, the data target and the verification method.
[0016] The present application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which has the following beneficial effects: 1. The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which is based on knowledge graph and fruit link-quality correlation data in the past 3-5 years, combines transport temperature, damage resistance and other characteristic data with damage coefficient, calculates and analyzes the number of nodes according to fruit differentiation, focuses on high-risk stages, solves the problems of blind node setting in traditional traceability, and sets the same nodes regardless of fruit hardness, achieves the effects of accurately covering key quality control links, avoiding redundant node waste of resources, and making each node be able to monitor key quality risk points, and the overall use effect is good, and has good use prospect.
[0017] 2. The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which collects 5-link data of planting, processing, transportation, storage and sales, and is chained by links after pretreatment, and each piece of data is bound with a unique fruit code, solves the problems of scattered storage of data in each link, fuzzy attribution relationship, and difficult association with the same fruit in subsequent retrieval, achieves the effects of one-to-one correspondence between data and fruit, chain-by-link data protection, and quick retrieval of full-chain data according to the code, and greatly improves the data aggregation efficiency.
[0018] 3. The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which collects fruit code automatic aggregation full-link chain data, divides quality control stages according to analysis nodes, customizes evaluation indexes according to different analysis nodes, and calculates node scores in combination with knowledge graph historical standards, solves the problems of lack of focus in quality analysis after full-chain data aggregation, and only overall conclusion can be obtained but specific stage cannot be positioned, achieves the effects of quickly locking high-risk nodes and accurately reflecting the quality level of each stage by evaluation results, and provides clear problem direction for traceability.
[0019] 4. The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which adopts a simplified version of node quality report associated with fruit code retrieved by consumers, directly selects the corresponding analysis node and uploads the evidence when feeding back the problem, and the system automatically feeds back the corresponding data, solves the problems of difficult accurate positioning of specific control links in consumer feedback, and the need of merchants to check full-chain data when processing, achieves the effects of direct association of feedback information and node data, and fast processing result, and can improve the consumer trust and satisfaction.
[0020] 5. The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which comprehensively uses knowledge graph, block chain link-by-link, unique fruit code, node quality evaluation and consumer feedback rectification technology, realizes full-process traceability, guarantees the authenticity of data in each link, promotes the multi-node cooperative participation of production, logistics, supervision and consumers, lays the foundation of an efficient, accurate and transparent fruit quality and safety traceability system, provides support for subsequent abnormal cooperative processing and system iteration, has good use effect, and has good use prospect. Attached Figure Description
[0021] Fig. 1 This is the overall system flowchart of the present invention; Fig. 2 This is a diagram of the overall system framework of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] This invention addresses the issue of existing agricultural product quality and safety traceability systems that use a uniform approach. However, for fruit, a category of agricultural products, the characteristics of fruits vary considerably, and a uniform traceability method cannot accurately reflect anomalies, making subsequent analysis and rectification quite troublesome.
[0024] Example: like Figs. 1-2 As shown, this invention is a multi-node collaborative agricultural product quality and safety full-chain traceability system, including a historical data collection module, a graph construction module, an analysis node module, an analysis and on-chain module, an analysis and control module, a query and display module, and a comprehensive rectification module. Historical data acquisition module: Collects full-chain data of various fruits over the past 3-5 years and preprocesses the collected data; The historical data acquisition module includes a first data acquisition unit and a preprocessing unit. The first data acquisition unit collects data on the entire data chain of various fruits over the past 3-5 years, as detailed below: The first data acquisition unit obtains data through corresponding management systems, such as obtaining planting data from the grower management system, processing data from the processing and transportation management system, transportation data from the transportation management system, warehousing data from the warehousing management system, and sales data from the sales management system.
[0025] The data for the entire fruit supply chain includes data from five stages: planting, processing, transportation, storage, and sales. The planting link data includes variety-specific data, farming record data and harvesting quality data, the variety-specific data includes fruit category and production area adaptation data, contains a large category, the large category includes berry, pome, stone fruit, citrus and melon, the small category is the fruit refined to a specific variety, such as sweet orange, navel orange, blood orange and the like, the production area adaptation data includes region, soil PH data and sunshine data; the farming record data includes fertilizer data containing fertilizer category, application amount, application method and application cycle, pesticide application data containing pesticide type, application amount, application method and application interval and environmental regulation data containing temperature and humidity requirements and irrigation frequency in different growth periods, the harvesting quality data includes harvesting time containing harvesting period and harvesting maturity and harvesting loss data containing loss rate caused by different harvesting methods.
[0026] The processing link data includes primary processing data and quality detection data, the primary processing data includes data of cleaning link, sorting link and packaging link, the quality detection data is sensory index and physicochemical index collected after sorting, the sensory index is evaluated through color and luster after processing, the physicochemical index includes water content and special treatment data, for example, the special treatment data of apple is the wax layer thickness after waxing of apple.
[0027] The transportation link data includes transportation parameter data containing transportation mode, loss data during transportation, preservation mode, transportation duration and loading density, and environmental monitoring data containing average temperature, average humidity and vibration data during transportation.
[0028] The storage link data includes storage environment data containing storage temperature, storage humidity and gas regulation measures, storage management data containing inventory turnover rate and stacking data, packaging and protection measure data, the gas regulation measures include oxygen concentration and carbon dioxide concentration of storage.
[0029] The sales link data includes shelf life data, commodity display data, consumer feedback data and after-sales processing data; the consumer feedback data includes quality problem feedback and service problem feedback, the after-sales processing data includes feedback response time, processing method and processing satisfaction.
[0030] The preprocessing unit is used for analyzing the collected data, the preprocessing unit guarantees data accuracy, eliminates invalid data and completes missing information, and the specific steps are as follows: Data cleaning includes abnormal value identification and elimination and missing value completion.
[0031] The steps of abnormal value identification and elimination are as follows: based on the 3σ principle, it is determined whether the data is abnormal, the single abnormal data is directly eliminated; for continuous abnormal data, the data is marked and fed back to the corresponding system, reminding the management personnel of the relevant system to check the data acquisition equipment, so as to ensure that the subsequent data is more standard.
[0032] The missing value is completed by using the mean value data of the same variety, the same link, and the same time period. For example, if the strawberry transportation temperature is missing for 2 days in June 2023, the mean value of the strawberry transportation temperature in the same period from 2021 to 2022 is 1.2°C. For continuous missing data for more than 3 days, linear interpolation is used to complete it. For example, the temperature on the first day is 1°C, and the temperature on the fourth day is 1.5°C. Then the temperature on the second day is 1.17°C, and the temperature on the third day is 1.33°C.
[0033] The atlas construction module: the feature extraction and correlation analysis of the whole chain data of various fruits after preprocessing are performed to construct a knowledge graph. The atlas construction module includes a feature extraction unit and a correlation analysis unit. The feature extraction unit screens the core parameters of fruits to reduce redundant data.
[0034] The feature extraction unit first calculates the correlation between each parameter and the core quality index using the Pearson correlation coefficient, and selects parameters with an absolute value of the correlation coefficient greater than 0.6 as core features.
[0035] Then, using principal component analysis, the high-dimensional data in the core features are reduced, and the principal components with a cumulative variance contribution rate greater than 85% are extracted as the core feature combination.
[0036] Numerical features are quantified and categorical features are encoded to facilitate subsequent comparison and search, providing a unified format for subsequent data comparison and search.
[0037] Based on the importance ranking of features, the importance of each feature to the quality index is calculated using a random forest model, and features with high priority are given higher weights in the subsequent knowledge graph.
[0038] Different fruits have different focuses. For example, nuts have a longer shelf life and are not easily damaged, so the importance of warehouse and transportation data is lower. Therefore, the above feature extraction is needed to extract important data.
[0039] The correlation analysis unit forms reusable rule models, including intra-link correlation models and cross-link correlation models. Intra-link correlation models focus on the relationship between single-link parameters and results. For example, a fertilizer application amount and maturity model is established for the planting link, such as the linear relationship between strawberry flowering period organic fertilizer application amount and mature sugar content. A super-temperature duration and loss rate model is established for the transportation link, such as the nonlinear relationship between cherry transportation super-temperature duration and loss rate.
[0040] Cross-link correlation models build comprehensive models for serial multi-link data, including planting, processing, and transportation. For example, a multivariate regression model is established for strawberry planting maturity, processing cleaning time, transportation super-temperature duration, and final loss rate. Warehouse and sales correlation: for example, the correlation between apple storage duration, sales display temperature, and post-sale feedback rate.
[0041] The knowledge graph is constructed by converting the rule model and core features obtained by correlation analysis into node and relationship structure to form a three-level graph and realize data visualization and reuse. The knowledge graph includes a core layer, a link layer, and a correlation layer. The core layer takes specific fruit varieties as core nodes, such as Red Beauty strawberry, Golden Pillow Durian, and Yantai Apple. Each core node is labeled with basic attributes such as scientific name, main producing area, and marketing season.
[0042] The link layer is constructed around the core nodes with five secondary nodes of planting, processing, transportation, storage, and sales. Each secondary node contains three sub-dimensions of parameters, standards, and risks, i.e., each secondary node contains three tertiary nodes: parameter node: storing core features such as Red Beauty strawberry planting parameters including soil pH, maturity sugar content, and fertilizer amount, labeling the optimal value, allowable deviation, and data source, standard node: specifying agricultural operation standards, harvesting standards, etc., labeling standard number and implementation time, risk node: recording high-risk factors, risk threshold, and countermeasures.
[0043] The correlation layer defines the correlation between nodes and labels the relationship type and weight with directed edges: intra-link relationships such as Red Beauty strawberry, planting parameters, maturity sugar content → Red Beauty strawberry, planting risk, low sweetness risk, relationship type trigger; cross-link relationships such as Red Beauty strawberry, processing parameters, cleaning time → Red Beauty strawberry, transportation parameters, loss rate, relationship type influence; rule relationships such as Red Beauty strawberry, transportation risk, high loss risk → Red Beauty strawberry, sales feedback, high complaint rate, relationship type cause.
[0044] Data classification entry: including structured data entry and unstructured data entry; Structured data entry is to enter the numerical and categorical data after feature extraction into the knowledge graph, directly associate the corresponding correlation model, and ensure that the data matches the rules.
[0045] Unstructured data entry stores detection reports, field photos, and videos in historical data through IPFS and generates a unique tag. The tag is labeled as an attribute under the corresponding node.
[0046] Each attribute value needs to be labeled with the source type, and a credibility score is assigned according to the authority of the data source. The entered data needs to be labeled with the collection time or standard implementation time to facilitate subsequent updates and determine the timeliness of the data.
[0047] Neo4j graph database is used to construct a visual graph, with different colors for core nodes and different thickness of edges to represent the weight difference of correlation relationships.
[0048] The knowledge graph adds the monthly full-chain historical data of the month, and sequentially carries out pretreatment, feature extraction and correlation analysis, and supplements the attributes of the corresponding nodes, re-trains the correlation model based on the newly added data every quarter, adjusts the relationship weight between nodes, and adjusts the node attribute value according to the newly released national standard and industry standard every year.
[0049] Before new data is entered, the technical node automatically checks the data format and source reliability, and if the check fails, the data is returned for supplementation.
[0050] Every quarter, 10% of the node data is extracted by the regulatory node, compared with the offline measured data, if the deviation is greater than 5%, the data entry process is re-verified, the deviation is corrected, the graph feedback entry is opened, and users such as growers and processing enterprises are allowed to feedback data deviation, the technical node is verified within 24 hours, and the users who feedback the truth are given credit points.
[0051] The application provides a multi-node collaborative agricultural product quality and safety full-chain traceability system, which combines transportation temperature, damage resistance and other characteristic data with the damage coefficient based on knowledge graph and fruit link-quality correlation data in the past 3-5 years, calculates and analyzes the number of nodes according to the fruit differentiation, focuses on the high-risk stage, solves the problem of blind node setting in traditional traceability, and avoids the problem of setting the same node regardless of the hardness of the fruit, so that the quality control key link is accurately covered, the redundant node waste resource problem is avoided, each node can monitor the key quality risk point, the overall use effect is good, and the application prospect is good.
[0052] The analysis node module is based on the knowledge graph and the pretreated full-chain data, and sets the analysis node after analysis and processing; The analysis node module is based on the knowledge graph and the pretreated full-chain data, and sets the analysis node through the processes of data screening, standardization processing, coefficient calculation, node positioning and configuration solidification, so as to realize the key collection and quality control of full-chain data.
[0053] The core parameters in the pretreated full-chain data are called, selected, converted into 0-100 standardized values, and unit differences are eliminated, 2
[0054] Based on the above standardized data, weighted processing is carried out, the weighted weight is matched with the influence degree of each parameter on the fruit quality, and then the damage coefficient is obtained by dividing 100, and the coefficient range is divided according to the fruit texture characteristics: Soft fruits, such as strawberries and grapes, have a damage coefficient of 0.8-1.0; Medium fruit, such as apples and pears: vulnerability coefficient = 0.5-0.7; Hard fruit, such as durians and mangoes: vulnerability coefficient = 0.3-0.4; The number of analysis nodes is calculated, specifically analysis node number = base ring number x vulnerability coefficient, and the result is rounded up.
[0055] According to the number of analysis nodes calculated, combined with the risk rules of the whole chain in the knowledge graph, the specific position of the node is determined. After analysis, the commonly used analysis nodes include mandatory nodes and optional nodes, as follows: Mandatory nodes include the end of the planting link and the end of the transportation link: the knowledge graph shows that the quality changes within 2 hours after picking is the key period, and data such as maturity and picking damage rate need to be collected at this node to control the initial quality. The abnormal rate of the transportation link accounts for 35% of the whole chain, so corresponding analysis nodes need to be set to ensure the accuracy of data collection, and data such as transportation time, over-temperature times, and loss rate need to be collected to intercept transportation loss in a timely manner.
[0056] Optional nodes are added according to the characteristics of the variety and the historical abnormal rate. According to the characteristics of the variety and the historical data in the knowledge graph, they are added as needed, including nodes after primary processing and nodes after storage. If the fruit needs primary processing and the historical abnormal rate of this link in the knowledge graph is ≥8%, a node after primary processing is added to collect data such as processing qualification rate and sugar content / water content after primary processing. If the storage time of the fruit is >3 days and the historical storage loss rate is ≥5%, a node after storage is added to collect data such as storage time, temperature and humidity fluctuation value, and storage loss rate.
[0057] If the number of analysis nodes calculated is 3, 2 mandatory nodes and 1 optional node are used.
[0058] The information of the analysis nodes is solidified to generate an analysis node configuration table, which contains the following fields: fruit variety code, node number, node position, collection item, data accuracy requirement, and reference standard, to facilitate the implementation and data traceability.
[0059] Rules are optimized every year to ensure that the analysis node settings are more accurate and the evaluation standards are more practical. If the abnormal rate of a specific node for a certain type of fruit is consistently low, such as the transportation node abnormal rate of a certain hard fruit <1%, the vulnerability coefficient can be lowered to reduce the number of analysis nodes. If the abnormal rate is high, such as the storage node loss rate of a certain soft fruit >10%, the vulnerability coefficient can be increased to increase the number of analysis nodes.
[0060] The application provides a multi-node cooperation-based agricultural product quality and safety whole-chain tracing system, collects 5-link data of planting, processing, transportation, storage and sales, links each piece of data after preprocessing, binds each piece of data with a unique fruit code, solves the problems of scattered storage of data at each link, fuzzy attribution relationship, and difficulty in subsequent retrieval of the same fruit, achieves the effects of one-to-one correspondence between data and fruit, link-by-link chaining to ensure data unforgeability, and quick retrieval of whole-chain data according to the code, and greatly improves data aggregation efficiency.
[0061] The analysis and chaining module collects whole-chain data of the current fruit, pre-processes and chains the whole-chain data. The analysis and chaining module includes an encoding construction unit and a data chaining unit.
[0062] The analysis and chaining module focuses on the generation of the unique identifier of the whole-chain data of the current fruit, data preprocessing, link-by-link chaining and secure query, and realizes data integrity, security and traceability through the cooperation of the encoding construction unit and the data chaining unit, and reuses the core components of the historical acquisition module to ensure data consistency.
[0063] The encoding construction unit adopts a fruit code of 18-20 bits, which includes a variety identifier, a production area identifier, a batch date, a link serial number and a check digit.
[0064] When the fruit code is generated, the system initiates a unique code query to the blockchain, and if the same code already exists, the serial number is automatically regenerated to avoid confusion caused by repeated codes.
[0065] The second data acquisition unit is used to collect the whole-chain data of the current fruit, and the data types collected by the second data acquisition unit and the first data acquisition unit in the historical acquisition module are the same, only the data is collected at different times. The whole-chain data of the current fruit collected is preprocessed by the preprocessing unit.
[0066] The data chaining unit chains the data of each link after preprocessing separately. The data collection is different in terms of time and source, so after collecting the data, in order to ensure the integrity and security of the data, the data of each link is chained separately after being collected.
[0067] Each link is assigned a corresponding link code in order, and the fruit code and the link code are combined to form a total code before chaining.
[0068] Before each link is chained, the consistency of the current fruit code and the total code is verified, and if they are inconsistent, the chaining is rejected to ensure the continuity of the chain.
[0069] Data association is performed before data chaining. The hash value of the data chained in the planting link is associated through fruit coding to ensure data continuity. Then, a JSON file is generated to associate the total coding of the corresponding link and clarify data ownership.
[0070] After the association of each link is completed, it is uploaded to the alliance chain separately. The total coding is used as the key for on-chain storage, and the hash value of the preprocessed JSON file is used as the value to ensure that the data is tamper-proof and the association is clear.
[0071] This setting allows users to initiate queries through fruit coding, and the system automatically completes on-chain hash verification, off-chain original data retrieval, and full-link data integration.
[0072] The specific query steps are as follows: the user inputs the fruit code on the traceability platform or scans the code on the packaging. The information in the code is the fruit code. The platform automatically generates the storage keys of the planting, processing, transportation, warehousing, and sales links, initiates batch queries to the blockchain node, and obtains the data hash values of each link.
[0073] The platform retrieves the original JSON file of the corresponding link from the off-chain encrypted database according to the hash value, calculates the original data hash value, and compares it with the on-chain hash value. If the hash values are consistent, it confirms that the data has not been tampered with, integrates the original data of the five links in the order of planting, processing, transportation, warehousing, and sales, extracts the core information of each link, and generates a structured traceability report.
[0074] If the data hash values of a certain link do not match, the data of that link is marked as abnormal, highlighted in the summary report, and the difference between the on-chain hash value and the calculated hash value is displayed to facilitate responsibility tracing.
[0075] Based on the blockchain permission management module, set different roles for summary query permissions to protect enterprise privacy data.
[0076] Analysis and control module: retrieve on-chain data of each link through fruit coding, integrate and evaluate quality by link to analyze whether there are abnormalities; The analysis and control module uses on-chain data as the data source and pre-set analysis nodes as the evaluation object. Through the data download unit, the on-chain data is safely retrieved and integrated. Then, through the quality evaluation unit, the quality rating and abnormal positioning of each link are completed. Finally, a closed-loop management report is formed to ensure controllable quality throughout the chain.
[0077] The analysis and control module includes a data download unit and a quality evaluation unit. The core function of the data download unit is to accurately obtain and verify on-chain data through fruit coding, providing a reliable data source for subsequent quality assessment. During use, the total code is split using a coding analysis tool to extract the link code, and the five core links of planting, processing, transportation, storage, and sales are identified. The on-chain data query request is generated according to the link correlation code, the blockchain data interface is called, and the on-chain data of the five links is pulled in batches. The heterogeneous data of each link is converted to JSON format.
[0078] The downloaded data is subjected to integrity verification and consistency verification. The integrity verification checks whether the data of each link is missing key fields, and the consistency verification calculates the hash value of the retrieved data and compares it with the hash value stored on the chain. If they are consistent, the data is marked as reliable, and the cross-link data logic is verified. If they are not consistent, the data is pushed to the supervision node for verification. The five-link data that passes the verification is integrated according to the timeline and link order to generate a structured data set.
[0079] The quality assessment unit selects the analysis node data set from the aggregated data, which is the data set by the analysis node module. The data is sorted according to the analysis node classification and the evaluation index and weight are set according to the characteristics of each node. For example, there are four groups of nodes, namely post-harvest nodes, post-processing nodes, post-transportation nodes, and post-storage nodes. The evaluation index of the post-harvest nodes is 60% maturity and 40% integrity, with 60 points for maturity ≥ 15%, and 5 points deducted for each 1% decrease. The evaluation index of the post-processing nodes is 50% process compliance rate and 50% sorting pass rate, with 50 points for full compliance, and 10 points deducted for each violation. The pass rate ≥ 95% is worth 50 points, and 2 points are deducted for each 1% decrease. The evaluation index of the post-transportation nodes is 70% temperature and humidity compliance rate and 30% integrity rate, with 70 points for temperature and humidity compliance rate 100%, and 7 points deducted for each 5% decrease. The evaluation index of the post-storage nodes is 60% temperature and humidity stability and 40% loss rate, with 60 points for fluctuation ≤ ± 0.5℃, and 2 points deducted for each 0.1℃ increase. The loss rate ≤ 2% is worth 40 points, and 4 points are deducted for each 0.5% increase.
[0080] The basic score is obtained according to the above-mentioned rules, the scoring objectivity is optimized by combining historical data, and the corrected score = basic score × [1 + (current data - historical mean) / historical mean] is calculated to obtain the corrected score of each link. The corrected score of each link is compared with the set equalization threshold to perform link rating. Specifically, the corrected score ≥ 90 is evaluated as A level, 90 > corrected score ≥ 80 is evaluated as B level, 80 > corrected score ≥ 70 is evaluated as C level, and corrected score < 70 is evaluated as D level.
[0081] In subsequent use, the index weight can be flexibly optimized based on consumer feedback and quality risk, such as increasing the integrity rate weight from 40% to 50% and decreasing the temperature and humidity compliance rate weight from 60% to 50% due to consumer complaints of squeezing damage.
[0082] If it is at level D, it is marked as a process abnormality, the stage at which the abnormality occurred is located, an abnormal report is generated containing the abnormal process, abnormal data, time of occurrence and possible causes, and an abnormality notification is automatically pushed to relevant management personnel.
[0083] The data generated during the evaluation are compiled into a node quality report. The node quality report and anomaly report are encoded using fruit codes and finally stored in a distributed database.
[0084] If no anomalies are found, the node quality reports are aggregated, core data is extracted, and a comprehensive quality report is generated. The comprehensive quality report is then encoded using fruit codes and finally stored in a distributed database.
[0085] This invention provides a full-chain traceability system for agricultural product quality and safety based on multi-node collaboration. It automatically collects and summarizes data from all stages of the process, divides the quality control stages according to the analysis nodes, customizes evaluation indicators for different analysis nodes, and calculates node scores by combining historical standards from a knowledge graph. This solves the problem that quality analysis after the full-chain data is summarized lacks focus and can only draw overall conclusions but is difficult to pinpoint specific stage problems. It achieves the effect of quickly identifying high-risk nodes and accurately reflecting the quality level of each stage in the evaluation results, thus providing clear problem directions for traceability.
[0086] Query and display module: Consumers scan the code to query the report associated with the code, and the feedback is generated into a feedback report and feedback code, which are then uploaded to the consortium blockchain separately; The query and display module serves as the core entry point for consumers to access data across the entire fruit supply chain. It receives quality reports generated by the analysis and control module and unique fruit codes from the analysis and on-chain module. Through the collaboration of the first traceability unit, query unit, and feedback unit, it enables the interaction of codes, reports, and feedback, ensuring consumers' right to know while providing enterprises with a basis for rectification.
[0087] The query and display module includes a first traceability unit, a query unit, and a feedback unit. The first traceability unit is used to generate traceability codes. The traceability codes adopt a dynamic QR code format and have three layers of key association information built in, ensuring that consumers can accurately locate the data of the entire chain node when querying. The three layers of key association information include a basic association layer that binds the unique code of the fruit as the core index for retrieving data, a storage link layer for the quality reports, anomaly reports, and comprehensive quality reports of the associated nodes, and a verification layer that compares the hash value of the report data with the hash stored on the chain to determine whether it has been tampered with.
[0088] The traceability code is generated after the node quality report is generated and is simultaneously pushed to the sales process for sales staff to affix, ensuring that consumers can easily scan it.
[0089] The node quality report and the comprehensive quality report only display node data related to fruit quality, hide commercial information, and protect merchant data.
[0090] The query unit is mainly used for consumers to scan the traceability code through a common code scanning tool, and then extract the associated data corresponding to the traceability code by automatically calling the blockchain through the fruit code.
[0091] The feedback unit is used for recording the actual feedback of consumers, and the feedback data is included in the whole chain management system to realize data closed loop.
[0092] The present application provides a multi-node cooperative agricultural product quality and safety whole chain traceability system, which adopts a simplified version of node quality report associated with fruit code by consumer code scanning, directly selects the corresponding analysis node and uploads the evidence when feedback problems, and the system automatically feeds back the corresponding data, solves the problem of precise positioning of specific control links in consumer feedback, and the problem of checking whole chain data when the merchant handles, achieves the effect of direct association of feedback information and node data and fast processing result, and can improve the consumer trust and satisfaction.
[0093] Comprehensive rectification module: download abnormal report and feedback report, analyze and formulate rectification scheme; The comprehensive rectification module receives the feedback report of the query display module and the abnormal report of the analysis and control module, realizes reason disassembly and responsibility positioning based on the knowledge graph, and at the same time, dynamically optimizes the analysis node through quarterly data summary, and perfects the whole chain management.
[0094] The second traceability unit realizes the download of the abnormal report and the feedback report, analyzes the abnormal report based on the knowledge graph, and accurately divides the abnormal reasons into three categories by means of the standard nodes and risk nodes of each link in the knowledge graph, and each category matches actual scene examples, ensures clear positioning, and is specific to the operation category of not executing according to the standard, the equipment category of equipment failure of each link, and the environment category of uncontrollable environmental factors.
[0095] Through the cross-link correlation model of the knowledge graph, core data corresponding to the consumer opinions in the feedback report is extracted, the link to which the feedback problem belongs is determined, the specific abnormality is further analyzed according to the link to which the abnormal analysis node belongs, the specific abnormality is judged, and the specific abnormality is sent to the management system of the corresponding link to inform the relevant management personnel to make a rectification scheme for the specific abnormality, and the rectification scheme records the corresponding abnormal reason, the rectification completion time limit, the data target after rectification and the verification method.
[0096] Based on the knowledge graph, the feedback report is analyzed, the data to which the feedback opinions in the feedback report are directed are obtained, and the corresponding data are sent to the management system of the corresponding link to inform the relevant management personnel to reply to the consumer opinions.
[0097] The module carries out a review based on full batch data every quarter, and adjusts the analysis node configuration through quantitative analysis; Full batch analysis node abnormal data are summarized every quarter, the node abnormal rate and the abnormal influence range are analyzed, the node abnormal rate is the number of node abnormalities / total batch quantity, and the abnormal influence range is the change of the loss rate caused by the abnormality, for example, the node temperature and humidity exceed the standard after transportation, which causes the loss rate to increase by 10% after storage.
[0098] The node abnormal rate and the loss rate are weighted, the adjustment value is calculated, and the adjustment value is compared with the preset standard threshold value, if the adjustment value is less than the standard threshold value, no processing is performed, if the adjustment value is greater than or equal to the standard threshold value, the risk is high, and one group of analysis nodes are added to the fruit to supplement the collection of key data and improve the full-chain risk coverage.
[0099] The application provides a multi-node cooperative agricultural product quality and safety full-chain traceability system, which comprehensively uses knowledge graph, block chain link-by-link, unique fruit coding, node quality evaluation and consumer feedback rectification technology, realizes full-process traceability, guarantees the authenticity and traceability of data in each link, promotes the multi-node cooperative participation of production, logistics, supervision and consumers, lays a foundation for an efficient, accurate and transparent fruit quality and safety traceability system, provides support for subsequent abnormality cooperative processing and system iteration, has good use effect and good use prospect.
[0100] The above embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, the above embodiments can be realized in the form of a computer program product in whole or in part. Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present text can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solutions.
[0101] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, and may be located in one place, or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment of the present application according to actual needs.
[0102] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A multi-node collaborative traceability system for the entire agricultural product quality and safety chain, characterized in that: include: Historical data acquisition module: Collects full-chain data of various fruits over the past 3-5 years and preprocesses the collected data; Knowledge graph construction module: Performs feature extraction and association analysis on the whole chain data of various fruits after preprocessing to construct a knowledge graph; Analysis Node Module: Based on knowledge graphs and pre-processed full-chain data, analysis nodes are set after analysis and processing; Analysis of the on-chain module: Collect the full chain data of the current fruit, preprocess it and upload it to the chain, and encode the full chain data uploaded to the chain; Analysis and Control Module: Retrieves data from each stage of the chain through fruit coding, integrates the data, performs quality assessments at each stage, and analyzes whether any anomalies exist; Query and display module: Consumers scan the code to query the report associated with the code, and the feedback is generated into a feedback report and feedback code, which are then uploaded to the consortium blockchain separately; Comprehensive rectification module: Download anomaly reports and feedback reports, analyze and formulate rectification plans, and assist in responding to consumer opinions.
2. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 1, characterized in that, The historical data acquisition module includes a first data acquisition unit and a preprocessing unit; the first data acquisition unit obtains planting data from the grower management system, processing data from the processing and transportation management system, transportation data from the transportation management system, warehousing data from the warehousing management system, and sales data from the sales management system. The preprocessing unit identifies and removes outliers and completes missing values for the collected data from the planting, processing, transportation, warehousing, and sales stages.
3. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 2, characterized in that, The map construction module includes a feature extraction unit and a correlation analysis unit; The feature extraction unit first uses the Pearson correlation coefficient to calculate the correlation between each parameter and the core quality indicators, and selects parameters with an absolute correlation coefficient > 0.6 as core features. Then, it uses principal component analysis to reduce the dimensionality of the high-dimensional data in the core features, extracts principal components with a cumulative variance contribution rate > 85% as core feature combinations, quantifies numerical features and encodes categorical features. Based on the ranking of feature importance, it uses a random forest model to calculate the importance of each feature to the quality indicators. The correlation analysis unit forms a reusable pattern model, specifically including intra-stage correlation models and cross-stage correlation models. Intra-stage correlation models focus on the relationship between parameters and results in a single stage, while cross-stage correlation models construct a comprehensive model by connecting data from multiple stages.
4. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 3, characterized in that, The knowledge graph consists of a core layer, a process layer, and a relationship layer. The core layer uses specific fruit varieties as core nodes. The process layer builds five secondary nodes around the core nodes: planting, processing, transportation, warehousing, and sales. Each secondary node contains three sub-dimensions: parameters, standards, and risks. The relationship layer defines the relationships between nodes and uses directed edges to label the relationship type and weight. Data classification and entry includes structured data entry and unstructured data entry. Structured data entry involves entering the numerical and categorical data after feature extraction into the knowledge graph and directly associating it with the corresponding association model. Unstructured data entry uses IPFS to store detection reports, on-site photos, and videos from historical data. After generating unique labels, the labels are marked as attributes under the corresponding nodes.
5. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 4, characterized in that, The steps for setting up analysis nodes after analysis and processing are as follows: Core parameters are retrieved from the preprocessed full-chain data, K key categories of data are selected, and they are standardized. The standardized core parameters are weighted, and the weights are matched to the degree of influence of each parameter on fruit quality. The result is then divided by 100 to obtain the vulnerability coefficient. Calculate the number of analysis nodes: Number of analysis nodes = Number of basic links × Vulnerability coefficient, round the result to the nearest integer; Based on the calculated number of analysis nodes and combined with the risk patterns of the entire chain in the knowledge graph, the specific locations of the nodes are determined, and the determined analysis node information is solidified into an analysis node configuration table.
6. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 5, characterized in that, Based on the risk patterns across the entire chain in the knowledge graph, when determining the specific location of nodes, mandatory nodes and optional nodes are first selected according to the number of nodes to be analyzed. Mandatory nodes are the end of the planting stage and the end of the transportation stage. Optional nodes include nodes after initial processing and nodes after storage. If the number of nodes to be analyzed is greater than 2, and the fruit requires initial processing, and the historical anomaly rate of this stage in the knowledge graph is ≥8%, then a node after initial processing is added. If the number of nodes to be analyzed is greater than 2, the fruit storage time is >3 days, and the historical storage loss rate in the knowledge graph is ≥5%, then a node after storage is added. If the number of nodes to be analyzed is 3, and there are cases where nodes after initial processing and nodes after storage are added simultaneously, then the number of nodes to be analyzed is increased.
7. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 6, characterized in that, The analysis module generates a unique fruit code through the coding construction unit, assigns a link code to the whole chain data of the current fruit after preprocessing, combines the fruit code and the link code to form the total code, generates a JSON file from the preprocessed current link data, and associates it with the total code of the corresponding link. After the association is completed, it is uploaded to the consortium blockchain separately: the total code is used as the key for on-chain storage, and the hash value of the preprocessed JSON file is used as the value.
8. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 7, characterized in that, The analysis and control module includes a quality assessment unit. The analysis and control module uses on-chain data as the data source and preset analysis nodes as the assessment objects. The data download unit uses fruit codes to parse the overall code and extract the process codes, identifying five processes. It then calls a blockchain interface to batch retrieve data and convert it to JSON format. After processing, the data is integrated into a structured dataset according to the timeline and process order. The quality assessment unit selects pre-defined analysis nodes from the structured dataset and sets indicator weights according to the characteristics of the analysis nodes; After calculating the base score, a revised score is calculated using the base score. A rating is then performed based on the revised score. The rating results are used to determine if there are any anomalies. If there are anomalies, an anomaly report is generated; otherwise, a comprehensive quality report is generated. The results are then linked to the fruit code and uploaded to the blockchain.
9. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 8, characterized in that, The query and display module includes a first traceability unit, a query unit, and a feedback unit; The traceability unit generates a dynamic QR code traceability code containing three layers of information and pushes it to the sales stage for affixing; Next, consumers scan the traceability code with a barcode scanner. The query unit calls the blockchain interface through the fruit code to retrieve data, and prioritizes loading the comprehensive quality report, which includes a link to the node quality report. The feedback unit receives consumer feedback in the form of images, videos, and text, summarizes and generates a feedback report and a unique feedback code, links it to the fruit code, uploads it to the alliance chain, and simultaneously pushes notifications to the corresponding enterprise management system.
10. The agricultural product quality and safety full-chain traceability system based on multi-node collaboration according to claim 9, characterized in that, The comprehensive rectification module downloads anomaly reports and feedback reports, analyzes the causes of anomalies based on knowledge graphs, categorizes the causes into operational, equipment, and environmental factors, locates the data and processes corresponding to the feedback, and then pushes the abnormal data to the corresponding process management system. Managers then formulate rectification plans that include the causes of the anomalies, rectification deadlines, data targets, and verification methods.
Citation Information
Patent Citations
Secure agricultural product quality safety tracing chain correlation analysis system
CN110880151A
Cited By
Data-driven scene map identification method and device, equipment and medium
CN121834742A
A data-driven scene graph recognition method, device, equipment and medium
CN121834742B
