A method for enhancing agricultural product supply chain traceability based on graph neural network
The graph neural network constructs a supply chain data graph model, which solves the problem of inefficiency in traditional systems when processing complex data, realizes accurate analysis and prediction of key events in the supply chain, improves the transparency and response speed of the supply chain, and enhances the Trust in product quality and safety.
Patent Information
- Application Number
- CN202410600830.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The traditional agricultural product supply chain management system is inefficient when processing large-scale and dynamically changing data, resulting in serious information silos, insufficient real-time update and sharing capabilities of information, making it difficult to effectively integrate and analyze complex data, affecting the response speed of the supply chain. and decision quality.
Using a graph neural network-based method, a supply chain data graph model is built, and the dependency relationship between nodes is trained through graph convolutional networks. Dynamic tracking analysis and prediction of key events in the supply chain are used to generate traceability reports to improve the transparency of the supply chain and Response speed.
Through graph neural networks, process complex relationship data, accurately analyze and predict key supply chain events, improve response speed and decision-making quality, improve supply chain transparency, make changes in each link traceable, and enhance consumers and regulators' product quality and safety trust.
Smart Images

Figure CN118505248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural product supply chain, and in particular to a method for enhancing the traceability of an agricultural product supply chain based on a graph neural network. Background Art
[0002] In modern agricultural product supply chain management, ensuring product safety, traceability and transparency is crucial. Traditional supply chain management relies on linear data recording and processing systems, which usually involve manual records, spreadsheets or database-based management systems. Although these methods have been industry standards for the past few decades, they have shown obvious limitations as supply chains become more and more complex.
[0003] Traditional systems are inefficient in processing large-scale, dynamically changing supply chain data. The agricultural product supply chain involves multiple links, including production, processing, distribution, and retail, and each link generates a large amount of data. These data are not only large in volume, but also complex in type, including time series data, geographic information, environmental parameters, etc. Traditional systems often find it difficult to effectively integrate and analyze these data, resulting in serious information island problems and insufficient real-time update and sharing capabilities of information. Therefore, how to provide a method for enhancing traceability of agricultural product supply chains based on graph neural networks is an urgent problem that technicians in this field need to solve. Summary of the invention
[0004] One object of the present invention is to propose a method for enhancing traceability of agricultural product supply chains based on graph neural networks, which can more accurately analyze and predict key events in the supply chain, such as logistics delays or product quality issues, thereby improving the response speed and decision-making quality of the entire supply chain.
[0005] A method for enhancing agricultural product supply chain traceability based on a graph neural network according to an embodiment of the present invention comprises the following steps:
[0006] S1. Collect producer information, product batches, processing information, and distributor and retailer information to build an agricultural product supply chain entity dataset;
[0007] S2, collect logistics routes, microclimate conditions of production sites, soil quality index and crop growth cycle monitoring data to build a data set of agricultural product supply chain relationships;
[0008] S3. Use the agricultural product supply chain entity dataset and the agricultural product supply chain relationship dataset to build a supply chain data graph model, in which the entities in the supply chain and the supply relationships between entities are mapped to nodes and edges in the graph respectively;
[0009] S4. Use graph neural networks to process the supply chain data graph model, use graph convolutional networks to train graph neural networks to learn the dependencies between nodes, and monitor and predict key events in the agricultural product supply chain through the dynamic changes of node attributes and edges;
[0010] S5. Implement dynamic tracking analysis to monitor the changes of the original data set of agricultural product supply chain in real time through the dynamic update capability of graph neural network;
[0011] S6. Generate a traceability report based on the graph neural network analysis results.
[0012] Optionally, the S1 includes the following steps:
[0013] S11. Identify data collection points and collect the required information through interfaces with supply chain producers, processors, distributors, and retailers using API calls or direct data input:
[0014]
[0015] Among them, \C represents the overall data collection configuration, E k represents the kth supply chain entity, T k The type of information technology system that represents the entity, and the Interface function defines how to collect data from each type of system;
[0016] S12. Collect and record producer information P i :
[0017]
[0018] Among them, i represents different producers, P i It is the information set of the i-th producer, including its ID, address and valid certificate. The validate function is used to confirm the validity of the certificate.
[0019] S13. Collect product batch information B at the same time j :
[0020]
[0021] Among them, j represents different batches of products, B j Including production date Batch number and product categories
[0022] S14. Collect processing information M k :
[0023]
[0024] Among them, k represents different processing events, M k Including the name of the processing plant Processing Date Processing methods and quality control parameters during processing The check function is used to check whether the quality control parameters meet the standards;
[0025] S15. Collect information about distributors and retailers D l :
[0026]
[0027] Among them, l represents different distributors and retailers, D l Include Name Location Availability Date and contact information with other supply chain links
[0028] S16. Use the data collected in steps S12-S15 to construct the agricultural product supply chain entity dataset E:
[0029]
[0030] Among them, E represents the entire supply chain entity data set, which is composed of the structured data set of producers, product batches, processing information, distributors and retailers. Each entity e i is the union of sets.
[0031] Optionally, S2 includes the following steps:
[0032] S21. Determine the collection points of the logistics route and use the global positioning system to collect specific logistics route information from the production site to the consumption site:
[0033]
[0034] Among them, L represents the total logistics path information set, R m represents the route information of the mth transport segment, T m It represents the transportation time of the mth transportation segment. The Logistics function definition collects the route and time information from the GPS system;
[0035] S22. Collect data on microclimate conditions at the production site, including temperature, humidity, precipitation, and light intensity:
[0036] C i ={(Temp i ,Hum i ,Preci ,Light i )|i∈C};
[0037] Among them, i represents different climate monitoring stations, C i Including temperature Temp i Hum i 、Precipitation i and light intensity Light i ;
[0038] S23. Collect soil quality index data, including pH, organic matter content, and soil compactness:
[0039] S k ={(pH k ,Org k ,Comp k )|k∈S};
[0040] Among them, k represents different soil testing points, S k Including pH k 、Org k and soil compaction Comp k ;
[0041] S24. Collect monitoring data on crop growth cycles, covering key stages such as sowing, growth, pest and disease conditions, and harvesting:
[0042] G j ={(Seed j ,Grow j ,Pest j ,Harv j )|j∈G};
[0043] Where j represents different crops or batches monitored, G j Including seeding time j 、Grow j , Pest and disease situation j and Harvest Time Harv j ;
[0044] S25. Use the data collected in steps S21-S24 to construct the agricultural product supply chain relationship dataset R:
[0045]
[0046] Among them, R represents the entire supply chain relationship dataset, which is composed of a structured data set of logistics routes, microclimate conditions, soil quality index and crop growth cycle. Each relationship r lis the union of sets.
[0047] Optionally, S3 includes the following steps:
[0048] S31. Based on the agricultural product supply chain entity dataset E and the agricultural product supply chain relationship dataset R, a supply chain data graph model is constructed;
[0049] S32, for each entity e in the supply chain data graph model i Define a graph node N i :
[0050]
[0051] Among them, id(e i ) represents the unique identifier of the entity, attr(e i ) indicates that from entity e i The extracted attribute set, type(e i ) indicates the node type, is node N i The feature vector of is learned by the graph neural network and represents the influence or other importance measure of the node;
[0052] S33, for each supply chain relationship r in the supply chain data graph model l Define a graph edge E ij , connecting node N i and N j :
[0053] E ij =Edge(N i ,N j ,r l )=
[0054] (source(N i ),target(N j ),relation_type(r l ),relation_attr(r l ),w ij );
[0055] Among them, source(N i ) and target(N j ) point to the start and end nodes of the relationship respectively, relation_type(r l ) indicates the type of relationship, relation_attr(r l ) includes the specific attributes of the relationship, w ij is the weight of the edge, which is dynamically calculated based on the importance of the relationship or the frequency of transactions;
[0056] S34. Integrate the outputs of steps S32 and S33 to build a complete supply chain data graph model G:
[0057]
[0058] Among them, N is the set of all nodes, E is the set of all edges, and each edge includes weight w ij , r ij is the connection node N i and N j A collection of relationships.
[0059] Optionally, S4 includes the following steps:
[0060] S41. Initialize the graph convolutional network, configure network parameters including learning rate, number of layers, and number of nodes per layer, and process the supply chain data graph model G:
[0061]
[0062] b (0) =zeros(d out ),;
[0063] α (0) =rand(d out );
[0064] Among them, α (0) is the initial attention vector, used to evaluate the importance of interactions between nodes;
[0065] S42, loading the supply chain data graph model G;
[0066] S43. Apply graph convolutional network to node N i Perform forward propagation and feature learning, and use the graph attention mechanism for feature update:
[0067]
[0068]
[0069] Among them, ∥ represents vector concatenation, LeakyReLU is a nonlinear activation function, is the learned attention coefficient;
[0070] S44. Use node features to dynamically update edge weights and characteristics to reflect real-time changes, monitor and predict key events in the supply chain, status changes of product batches, logistics delays or quality degradation:
[0071]
[0072]
[0073] Among them, β is a tuning parameter that emphasizes the new dependencies between nodes learned through the attention mechanism.
[0074] Optionally, S5 includes the following steps:
[0075] S51. Activate the real-time data monitoring system to track the key data changes in the agricultural product supply chain in real time based on the supply chain data graph model G;
[0076] S52. Apply graph neural network to dynamically adjust node features and edge weights to reflect the update of production data, logistics status changes and market dynamic parameters in the supply chain entity dataset E;
[0077]
[0078] in, Represents node N i Update features under the influence of real-time data, N(i) is N i The set of adjacent nodes, W and b are network parameters, Represents node-specific additional information obtained from real-time data sources, including urgent logistics changes or sudden market demands;
[0079] S53. Use updated graph models to identify and predict key events in the supply chain in real time, including supply shortage or excess risks:
[0080]
[0081] in, Represents node N i The probability distribution of potential risks or opportunities predicted at time t, V and c are another set of weights and biases used for the prediction task;
[0082] S54. Generate customized early warning reports to provide managers with information on supply chain challenges and opportunities:
[0083]
[0084] Among them, context(E, t ) is contextual information extracted from the external environment and ERP systems, including weather conditions and policy changes.
[0085] Optionally, the S6 comprises the following steps:
[0086] S61. Obtain the node and edge information of the analyzed and updated supply chain data graph model G from the graph neural network model, including the key node N iThe eigenvectors and edges E ij Attributes;
[0087] S62. Extract information about raw material procurement, product processing, quality control, and logistics processes in the supply chain. The information is obtained from the node and edge attributes of the graph model. For each key node N i and edge E ij Extract relevant attributes, which cover detailed information of agricultural products from raw materials to final products:
[0088] R i =Extract(N i ,attributes);
[0089] T ij =Extract(E ij ,attributes);
[0090] Among them, R i Representative node N i Entity information recorded in the T ij Represents edge E ij The relationship information recorded in the , including logistics path and time;
[0091] S63. Organize and format the information extracted in step S62 to build a traceability report, including the full life cycle information of each agricultural product, from raw material procurement to the final consumer. After the information is extracted from the graph model, it will be organized and formatted into a traceability report, including information on each production link:
[0092]
[0093] Among them, I and J are the index collections of nodes and edges respectively, FormatEntity and FormatRelation are functions that format entity and relationship data into report parts, It means that all formatted data segments are structured and combined according to the supply chain process;
[0094] S64. Output traceability report, providing a view of the product's origin, processing, quality control records and logistics information.
[0095] The beneficial effects of the present invention are:
[0096] (1) The present invention uses graph neural networks to process complex relational data in the supply chain, which can effectively capture various entities and their dynamic relationships. Graph neural networks are suitable for processing graph structure data. Compared with traditional data processing methods, they can more accurately analyze and predict key events in the supply chain, such as logistics delays or product quality issues, thereby improving the response speed and decision-making quality of the entire supply chain.
[0097] (2) By constructing a detailed supply chain data graph model and implementing dynamic tracking analysis, the present invention can monitor and record every key event and link change in the supply chain in real time, thereby improving the transparency of the supply chain and enabling every step from raw material procurement to the product reaching the hands of consumers to be traced and verified, greatly enhancing the trust of consumers and regulators in product quality and safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0098] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0099] Figure 1 This is a flow chart of a method for enhancing agricultural product supply chain traceability based on graph neural network proposed by the present invention. DETAILED DESCRIPTION
[0100] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0101] refer to Figure 1 , a method for enhancing agricultural product supply chain traceability based on graph neural network, comprising the following steps:
[0102] S1. Collect producer information, product batches, processing information, and distributor and retailer information to build an agricultural product supply chain entity dataset;
[0103] In this implementation, S1 includes the following steps:
[0104] S11. Identify data collection points and collect the required information through interfaces with supply chain producers, processors, distributors, and retailers using API calls or direct data input:
[0105]
[0106] Among them, \C represents the overall data collection configuration, E k represents the kth supply chain entity, T kThe type of information technology system that represents the entity, and the Interface function defines how to collect data from each type of system;
[0107] S12. Collect and record producer information P i :
[0108]
[0109] Among them, i represents different producers, P i It is the information set of the i-th producer, including its ID, address and valid certificate. The validate function is used to confirm the validity of the certificate.
[0110] S13. Collect product batch information B at the same time j :
[0111]
[0112] Among them, j represents different batches of products, B j Including production date Batch number and product categories
[0113] S14. Collect processing information M k :
[0114]
[0115] Among them, k represents different processing events, M k Including the name of the processing plant Processing Date Processing methods and quality control parameters during processing The check function is used to check whether the quality control parameters meet the standards;
[0116] S15. Collect information about distributors and retailers D l :
[0117]
[0118] Among them, l represents different distributors and retailers, D l Include Name Location Availability Date and contact information with other supply chain links
[0119] S16. Use the data collected in steps S12-S15 to construct the agricultural product supply chain entity dataset E:
[0120]
[0121] Among them, E represents the entire supply chain entity data set, which is composed of the structured data set of producers, product batches, processing information, distributors and retailers. Each entity e i is the union of sets.
[0122] S2, collect logistics routes, microclimate conditions of production sites, soil quality index and crop growth cycle monitoring data to build a data set of agricultural product supply chain relationships;
[0123] In this implementation, S2 includes the following steps:
[0124] S21. Determine the collection points of the logistics route and use the global positioning system to collect specific logistics route information from the production site to the consumption site:
[0125]
[0126] Among them, L represents the total logistics path information set, R m represents the route information of the mth transport segment, T m It represents the transportation time of the mth transportation segment. The Logistics function definition collects the route and time information from the GPS system;
[0127] S22. Collect data on microclimate conditions at the production site, including temperature, humidity, precipitation, and light intensity:
[0128] C i ={(Temp i ,Hum i ,Prec i ,Light i )|i∈C};
[0129] Among them, i represents different climate monitoring stations, C i Including temperature Tempi, humidity Hum i 、Precipitation i and light intensity Light i ;
[0130] S23. Collect soil quality index data, including pH, organic matter content, and soil compactness:
[0131] S k ={(pH k ,Org k ,Comp k )|k∈S};
[0132] Among them, k represents different soil testing points, S kIncluding pH k 、Org k and soil compaction Comp k ;
[0133] S24. Collect monitoring data on crop growth cycles, covering key stages such as sowing, growth, pest and disease conditions, and harvesting:
[0134] G j ={(Seed j ,Grow j ,Pest j ,Harv j )|j∈G};
[0135] Where j represents different crops or batches monitored, G j Including seeding time j 、Grow j , Pest and disease situation j and Harvest Time Harv j ;
[0136] S25. Use the data collected in steps S21-S24 to construct the agricultural product supply chain relationship dataset R:
[0137]
[0138] Among them, R represents the entire supply chain relationship dataset, which is composed of a structured data set of logistics routes, microclimate conditions, soil quality index and crop growth cycle. Each relationship r l is the union of sets.
[0139] S3. Use the agricultural product supply chain entity dataset and the agricultural product supply chain relationship dataset to build a supply chain data graph model, in which the entities in the supply chain and the supply relationships between entities are mapped to nodes and edges in the graph respectively;
[0140] In this implementation, S3 includes the following steps:
[0141] S31. Based on the agricultural product supply chain entity dataset E and the agricultural product supply chain relationship dataset R, a supply chain data graph model is constructed;
[0142] S32, for each entity e in the supply chain data graph model i Define a graph node N i :
[0143]
[0144] Among them, id(e i ) represents the unique identifier of the entity, attr(ei ) indicates that from entity e i The extracted attribute set, type(e i ) indicates the node type, is node N i The feature vector of is learned by the graph neural network and represents the influence or other importance measure of the node;
[0145] S33, for each supply chain relationship r in the supply chain data graph model l Define a graph edge E ij , connecting node N i and N j :
[0146] E ij =Edge(N i ,N j ,r l )=
[0147] (source(N i ),target(N j ),relation_type(r l ),relation_attr(r l ),w ij );
[0148] Among them, source(N i ) and target(N j ) point to the start and end nodes of the relationship respectively, relation_type(r l ) indicates the type of relationship, relation_attr(r l ) includes the specific attributes of the relationship, w ij is the weight of the edge, which is dynamically calculated based on the importance of the relationship or the frequency of transactions;
[0149] S34. Integrate the outputs of steps S32 and S33 to build a complete supply chain data graph model G:
[0150]
[0151] Among them, N is the set of all nodes, E is the set of all edges, and each edge includes weight w ij , r ij is the connection node N i and N j A collection of relationships.
[0152] S4. Use graph neural networks to process the supply chain data graph model, use graph convolutional networks to train graph neural networks to learn the dependencies between nodes, and monitor and predict key events in the agricultural product supply chain through the dynamic changes of node attributes and edges;
[0153] In this implementation, S4 includes the following steps:
[0154] S41. Initialize the graph convolutional network, configure network parameters including learning rate, number of layers, and number of nodes per layer, and process the supply chain data graph model G:
[0155]
[0156] b (0) =zeros(d out ),;
[0157] α (0) =rand(d out );
[0158] Among them, α (0) is the initial attention vector, used to evaluate the importance of interactions between nodes;
[0159] S42, loading the supply chain data graph model G;
[0160] S43. Apply graph convolutional network to node N i Perform forward propagation and feature learning, and use the graph attention mechanism for feature update:
[0161]
[0162]
[0163] Among them, || represents vector concatenation, LeakyReLU is a nonlinear activation function, is the learned attention coefficient;
[0164] S44. Use node features to dynamically update edge weights and characteristics to reflect real-time changes, monitor and predict key events in the supply chain, status changes of product batches, logistics delays or quality degradation:
[0165]
[0166]
[0167] Among them, β is a tuning parameter that emphasizes the new dependencies between nodes learned through the attention mechanism.
[0168] S5. Implement dynamic tracking analysis to monitor the changes of the original data set of agricultural product supply chain in real time through the dynamic update capability of graph neural network;
[0169] In this implementation, S5 includes the following steps:
[0170] S51. Activate the real-time data monitoring system to track the key data changes in the agricultural product supply chain in real time based on the supply chain data graph model G;
[0171] S52. Apply graph neural network to dynamically adjust node features and edge weights to reflect the update of production data, logistics status changes and market dynamic parameters in the supply chain entity dataset E;
[0172]
[0173] in, Represents node N i Update features under the influence of real-time data, N(i) is N i The set of adjacent nodes, W and b are network parameters, Represents node-specific additional information obtained from real-time data sources, including urgent logistics changes or sudden market demands;
[0174] S53. Use updated graph models to identify and predict key events in the supply chain in real time, including supply shortage or excess risks:
[0175]
[0176] in, Represents node N i The probability distribution of potential risks or opportunities predicted at time t, V and c are another set of weights and biases used for the prediction task;
[0177] S54. Generate customized early warning reports to provide managers with information on supply chain challenges and opportunities:
[0178]
[0179] Among them, context(E,t) is the contextual information extracted from the external environment and ERP system, including weather conditions and policy changes.
[0180] S6. Generate a traceability report based on the graph neural network analysis results.
[0181] In this implementation, S6 includes the following steps:
[0182] S61. Obtain the node and edge information of the analyzed and updated supply chain data graph model G from the graph neural network model, including the key node N iThe eigenvectors and edges E ij Attributes;
[0183] S62. Extract information about raw material procurement, product processing, quality control, and logistics processes in the supply chain. The information is obtained from the node and edge attributes of the graph model. For each key node N i and edge E ij Extract relevant attributes, which cover detailed information of agricultural products from raw materials to final products:
[0184] R i =Extract(N i ,attributes);
[0185] T ij =Extract(E ij ,attributes);
[0186] Among them, R i Representative node N i Entity information recorded in the T ij Represents edge E ij The relationship information recorded in the , including logistics path and time;
[0187] S63. Organize and format the information extracted in step S62 to build a traceability report, including the full life cycle information of each agricultural product, from raw material procurement to the final consumer. After the information is extracted from the graph model, it will be organized and formatted into a traceability report, including information on each production link:
[0188]
[0189] Among them, I and J are the index collections of nodes and edges respectively, FormatEntity and FormatRelation are functions that format entity and relationship data into report parts, It means that all formatted data segments are structured and combined according to the supply chain process;
[0190] S64. Output traceability report, providing a view of the product's origin, processing, quality control records and logistics information.
[0191] This implementation effectively manages and analyzes complex supply chain data by building a supply chain graph model. Specifically:
[0192] Construct supply chain entity data sets and relationship data sets: The system collects and integrates various entity information (such as producers, product batches, processing information, etc.) and relationship data (such as logistics routes, environmental conditions, etc.) in the supply chain, and constructs these data into nodes and edges in the graph model.
[0193] Apply graph neural networks for data processing: Use graph neural networks to process the constructed supply chain data graph model, learn the dependencies between nodes through graph convolutional networks, and monitor and predict key events in the supply chain.
[0194] Implement dynamic tracking analysis: Based on the dynamic update capability of graph neural networks, data changes in the supply chain can be monitored in real time to improve response speed and decision-making efficiency.
[0195] Generate traceability report: Generate detailed traceability report based on the analysis results of graph neural network, including the product's origin, processing process, quality control records and logistics information, to improve supply chain transparency and consumer trust.
[0196] Embodiment 1:
[0197] In today's globalized market, the supply chain of agricultural products is becoming increasingly complex, especially for fruit and vegetable products that involve cross-border transportation and multi-level distribution. In this scenario, a large international food company faces many challenges in managing the supply chain of apples exported from Shandong Province, China to major supermarkets in Europe. These challenges include ensuring food safety, strengthening product quality control, achieving transparency in the supply chain, and improving logistics efficiency. Because the traditional supply chain management system cannot effectively process and analyze large amounts of data from different stages, the company often encounters complaints about product quality issues and inefficiencies in the supply chain.
[0198] To solve these problems, the company decided to implement the method of the present invention. First, a large amount of data was collected by connecting with the systems of various supply chain nodes (including apple farms, receiving and packaging centers, logistics companies, and retailers). This data includes planting information (such as planting date, pesticides and fertilizers used, etc.), harvesting and packaging batches, detailed records of various processing processes, logistics routes and environmental conditions (such as temperature, humidity, etc.), and retail data.
[0199] These data are integrated and constructed into a supply chain data graph model, in which each entity (such as farms, processing plants, distribution centers) and the relationships between them are mapped as nodes and edges in the graph. This model is then processed using a graph neural network to learn the complex dependencies between nodes and dynamically track and analyze key events in the supply chain.
[0200] Through the analysis of graph neural networks, the company can monitor in real time any changes that may affect product quality and supply chain efficiency. For example, if a logistics node is delayed, the system will immediately alert and predict the possible scope and severity of the impact, so that supply chain managers can quickly make adjustments, such as changing logistics routes or adjusting product distribution plans.
[0201] In the second quarter of 2023 after the implementation of the system, product quality complaints decreased by 43.34% compared with the same period of the previous year. In terms of logistics efficiency, the overall transportation time was shortened by 15.15% by optimizing routes and promptly responding to potential logistics problems, thereby also reducing logistics costs by approximately 23.14%.
[0202] Especially in a summer when a heat wave affected Europe, the system successfully predicted the possible decline in product quality due to high temperatures and adjusted the cold chain logistics settings in time to ensure the freshness of the apples before they arrived at the supermarket. In addition, the traceability report showed that the specific source and processing process of each batch of apples could be traced through the system, which greatly enhanced consumer trust and improved the market competitiveness of the company's brand.
[0203] Example 1 not only demonstrates the effectiveness of the method of the present invention, but also fully proves the practical application value of supply chain management tools based on graph neural networks in modern agricultural production.
[0204] The present invention uses graph neural networks to process complex relational data in the supply chain, which can effectively capture various entities and their dynamic relationships. Graph neural networks are suitable for processing graph structure data. Compared with traditional data processing methods, they can more accurately analyze and predict key events in the supply chain, such as logistics delays or product quality problems, thereby improving the response speed and decision-making quality of the entire supply chain.
[0205] By constructing a detailed supply chain data graph model and implementing dynamic tracking analysis, the present invention can monitor and record every key event and link change in the supply chain in real time, thereby improving the transparency of the supply chain and enabling every step from raw material procurement to product delivery to consumers to be traced and verified, greatly enhancing the trust of consumers and regulators in product quality and safety.
[0206] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for enhancing agricultural product supply chain traceability based on graph neural network, characterized in that: The following steps are involved: S1. Collect producer information, product batches, processing information, and distributor and retailer information to build an agricultural product supply chain entity dataset; S2, collect logistics routes, microclimate conditions of production sites, soil quality index and crop growth cycle monitoring data to build a data set of agricultural product supply chain relationships; S3. Use the agricultural product supply chain entity dataset and the agricultural product supply chain relationship dataset to build a supply chain data graph model, in which the entities in the supply chain and the supply relationships between entities are mapped to nodes and edges in the graph respectively; The S3 comprises the following steps: S31. Based on the agricultural product supply chain entity dataset E and the agricultural product supply chain relationship dataset R, a supply chain data graph model is constructed; S32, for each entity e in the supply chain data graph model i Define a graph node N i : Among them, id(e i ) represents the unique identifier of the entity, attr(e i ) indicates that from entity e i The extracted attribute set, type(e i ) indicates the node type, is node N i The feature vector of is learned by the graph neural network and represents the influence or other importance measure of the node; S33, for each supply chain relationship r in the supply chain data graph model l Define a graph edge E ij , connecting node N i and N j : E ij =Edge(N i ,N j ,r l )= (source(N i ),target(N j ),relation_type(r l ),relation_attr(r l ),w ij ); Among them, source(N i ) and target(N j ) point to the start and end nodes of the relationship respectively, relation_type(r l ) indicates the type of relationship, relation_attr(r l ) includes the specific attributes of the relationship, w ij is the weight of the edge, which is dynamically calculated based on the importance of the relationship or the frequency of transactions; S34. Integrate the outputs of steps S32 and S33 to build a complete supply chain data graph model G: Among them, N is the set of all nodes, E is the set of all edges, and each edge includes weight w ij , r ij is the connection node N i and N j A set of relationships; S4. Use graph neural networks to process the supply chain data graph model, use graph convolutional networks to train graph neural networks to learn the dependencies between nodes, and monitor and predict key events in the agricultural product supply chain through the dynamic changes of node attributes and edges; The S4 comprises the following steps: S41. Initialize the graph convolutional network, configure network parameters including learning rate, number of layers, and number of nodes per layer, and process the supply chain data graph model G: b (0) =zeros(d out ),; a (0) =rand(d out ); Among them, α (0) is the initial attention vector, used to evaluate the importance of interactions between nodes; S42, loading the supply chain data graph model G; S43. Apply graph convolutional network to node N i Perform forward propagation and feature learning, and use the graph attention mechanism for feature update: Among them, ∥ represents vector concatenation, LeakyReLU is a nonlinear activation function, is the learned attention coefficient; S44. Use node features to dynamically update edge weights and characteristics to reflect real-time changes, monitor and predict key events in the supply chain, status changes of product batches, logistics delays or quality degradation: Among them, β is a tuning parameter that emphasizes the new dependencies between nodes learned through the attention mechanism; S5. Implement dynamic tracking analysis to monitor the changes of the original data set of agricultural product supply chain in real time through the dynamic update capability of graph neural network; S6. Generate a traceability report based on the graph neural network analysis results.
2. The method for enhancing agricultural product supply chain traceability based on graph neural network according to claim 1, characterized in that: The S1 comprises the following steps: S11. Identify data collection points and collect the required information through interfaces with supply chain producers, processors, distributors, and retailers using API calls or direct data input: Where C represents the overall data collection configuration, E k represents the kth supply chain entity, T k The type of information technology system that represents the entity, and the Interface function defines how to collect data from each type of system; S12. Collect and record producer information P i : Among them, i represents different producers, P i It is the information set of the i-th producer, including its ID, address and valid certificate. The validate function is used to confirm the validity of the certificate. S13. Collect product batch information B at the same time j : Among them, j represents different batches of products, B j Including production date Batch number and product categories S14. Collect processing information M k : Among them, k represents different processing events, M k Including the name of the processing plant Processing Date Processing methods and quality control parameters during processing The check function is used to check whether the quality control parameters meet the standards; S15. Collect information about distributors and retailers D l : Among them, l represents different distributors and retailers, D l Include Name Location Availability Date and contact information with other supply chain links S16. Use the data collected in steps S12-S15 to construct the agricultural product supply chain entity dataset E: Among them, E represents the entire supply chain entity data set, which is composed of the structured data set of producers, product batches, processing information, distributors and retailers. Each entity e i is the union of sets.
3. The method for enhancing agricultural product supply chain traceability based on graph neural network according to claim 1, characterized in that: The S2 comprises the following steps: S21. Determine the collection points of the logistics route and use the global positioning system to collect specific logistics route information from the production site to the consumption site: Among them, L represents the total logistics path information set, R m represents the route information of the mth transport segment, T m It represents the transportation time of the mth transportation segment. The Logistics function definition collects the route and time information from the GPS system; S22. Collect data on microclimate conditions at the production site, including temperature, humidity, precipitation, and light intensity: Among them, i1 represents different climate monitoring stations, Including temperature humidity Precipitation and light intensity S23. Collect soil quality index data, including pH, organic matter content, and soil compactness: Among them, k1 represents different soil testing points, Including pH Organic matter content and soil compaction S24. Collect monitoring data on crop growth cycles, covering key stages such as sowing, growth, pest and disease conditions, and harvesting: Among them, j1 represents different crops or batches to be monitored, G j1 Including sowing time Growth status Pest and disease situation and harvest time S25. Use the data collected in steps S21-S24 to construct the agricultural product supply chain relationship dataset R: Among them, R represents the entire supply chain relationship dataset, which is composed of a structured data set of logistics routes, microclimate conditions, soil quality index and crop growth cycle. Each relationship r l is the union of sets.
4. The method for enhancing agricultural product supply chain traceability based on graph neural network according to claim 1, characterized in that: The S5 comprises the following steps: S51. Activate the real-time data monitoring system to track the key data changes in the agricultural product supply chain in real time based on the supply chain data graph model G; S52. Apply graph neural network to dynamically adjust node features and edge weights to reflect the update of production data, logistics status changes and market dynamic parameters in the supply chain entity dataset E; in, Represents node N i Update features under the influence of real-time data, N(i) is N i The set of adjacent nodes, W and b are network parameters, Represents node-specific additional information obtained from real-time data sources, including urgent logistics changes or sudden market demands; S53. Use updated graph models to identify and predict key events in the supply chain in real time, including supply shortage or excess risks: in, Represents node N i The probability distribution of potential risks or opportunities predicted at time t, V and c are another set of weights and biases used for the prediction task; S54. Generate customized early warning reports to provide managers with information on supply chain challenges and opportunities: Among them, context(E,t) is the contextual information extracted from the external environment and the ERP system, including weather conditions and policy changes.
5. The method for enhancing agricultural product supply chain traceability based on graph neural network according to claim 1, characterized in that: The S6 comprises the following steps: S61. Obtain the node and edge information of the analyzed and updated supply chain data graph model G from the graph neural network model, including the key node N i The eigenvectors and edges E ij Attributes; S62. Extract information about raw material procurement, product processing, quality control, and logistics processes in the supply chain. The information is obtained from the node and edge attributes of the graph model. For each key node N i and edge E ij Extract relevant attributes, which cover detailed information of agricultural products from raw materials to final products: R i =Extract(N i ,attributes); T ij =Extract(E ij ,attributes); Among them, R i Representative node N i Entity information recorded in the T ij Represents edge E ij The relationship information recorded in the , including logistics path and time; S63. Organize and format the information extracted in step S62 to build a traceability report, including the full life cycle information of each agricultural product, from raw material procurement to the final consumer. After the information is extracted from the graph model, it will be organized and formatted into a traceability report, including information on each production link: Among them, I and J are the index collections of nodes and edges respectively, FormatEntity and FormatRelation are functions that format entity and relationship data into report parts, It means that all formatted data segments are structured and combined according to the supply chain process; S64. Output traceability report, providing a view of the product's origin, processing, quality control records and logistics information.
