Agricultural product whole industry chain management system based on big data and internet of things
Patent Information
- Application Number
- CN202611268108.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-10-27
AI Technical Summary
当清洁未达到要求时,原有接触关系难以及时恢复,易造成污染传播路径遗漏
本发明通过物联网终端采集农产品生产、加工、仓储、运输及销售环节的产业链数据,并按照批次承接关系构建直接物料链,同时根据接触载体的占用、转移及清洁过程建立接触版本图,使农产品的直接流转关系与接触载体引起的潜在残留暴露关系能够协同表征,克服现有技术仅依据批次流转记录进行追溯而容易遗漏间接接触传播路径的问题,提高受影响批次识别的完整性。
Smart Images

Figure CN122989140A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural Internet of Things (IoT) technology, and in particular to a whole-industry chain management system for agricultural products based on big data and IoT. Background Technology
[0002] Existing agricultural product supply chain management systems typically utilize IoT terminals to collect data from production, processing, warehousing, transportation, and sales stages, and establish circulation records according to agricultural product batches to achieve quality monitoring and traceability. These systems primarily determine the affected area based on direct contact relationships between batches, paying insufficient attention to indirect residue transmission caused by contact carriers such as processing equipment, conveying devices, and storage containers.
[0003] Current technologies typically use cleaning operation records directly as the basis for terminating contact transmission, lacking actual verification of cleaning effectiveness. When cleaning fails to meet requirements, existing contact relationships are difficult to restore in a timely manner, easily leading to omissions in contamination transmission paths. Furthermore, existing sampling methods largely rely on fixed locations or manual experience, making it difficult to dynamically determine sampling locations and sequences based on the path to be verified, resulting in insufficient sampling coverage or duplicate sampling.
[0004] Therefore, existing systems struggle to accurately trace affected batches by leveraging direct material flow relationships and contact carrier transmission relationships, and also find it difficult to promptly control the continued flow of related agricultural products and the reuse of contact carriers.
[0005] Therefore, how to provide a management system for the entire agricultural product industry chain based on big data and the Internet of Things is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a comprehensive agricultural product supply chain management system based on big data and the Internet of Things. This invention employs a method combining direct material chain, contact version graph, and improved EvolveGCN model. It uses convolution weights in the parent version relationship evolution graph and truncates or restores the evolution at candidate clean boundaries. The sampling location and order are determined through a snow ablation optimization algorithm, and the boundaries are corrected based on cleanliness verification results. Then, by combining material flow relationships and contact exposure relationships, the affected batches are traced and flow is blocked. This method has the advantages of accurate traceability, correctable cleanliness failures, high sampling efficiency, and timely control.
[0007] According to an embodiment of the present invention, an agricultural product whole-industry chain management system based on big data and the Internet of Things includes: The industry chain data collection module collects agricultural product industry chain data and arranges it chronologically to form an industry chain sequence. The material chain construction module connects batch acceptance relationships based on the industrial chain sequence to form a direct material chain; The contact version module divides contact carrier units according to the industry chain sequence, arranges batch occupancy relationships along the contact path, sets candidate cleaning boundaries according to the cleaning process and establishes parent version relationships to form a contact version diagram sequence. The evolutionary analysis module integrates the contact version graph sequence into the improved EvolveGCN model, convolves the weight matrix according to the parent version relationship evolution graph, truncates the evolution at the candidate clean boundary, and re-evolves the successor weight matrix with the weight matrix before the boundary when the boundary is removed, thus forming the contact exposure state and the path to be reviewed. The sampling optimization module selects and sorts sampling locations along the path to be verified based on the contact exposure status using a snow melting optimization algorithm, controls the sampling of IoT terminals, and generates cleanliness verification data. The boundary correction module confirms or cancels candidate cleaning boundaries based on cleaning validation data, updates the parent version relationship, and feeds back to the evolution analysis module to form a corrected contact exposure status. The dual-chain traceability module traces affected agricultural product batches and associated contact carrier units based on the direct material chain and corrected contact exposure status. It stops contact exposure tracing upon confirming the clean boundary and generates traceability results. The management and control module issues control commands based on the traceability results to block the flow of agricultural products and the reuse of contact carriers within the traceability scope, thus forming the supply chain management results.
[0008] Optionally, the industry chain acquisition module specifically includes: Data is collected from the agricultural product supply chain through IoT terminals distributed across all stages of the supply chain, forming raw supply chain data. The occurrence time of the original supply chain data is corrected based on the time difference between the IoT terminal clock and the system clock to form synchronized supply chain data. Data from the agricultural product supply chain is collected and synchronized according to the actual sequence of agricultural product batches passing through the supply chain links. Within the same supply chain link, the data is arranged according to the corrected occurrence time, and delayed data is inserted into the corresponding time sequence position to form a supply chain sequence.
[0009] Optionally, the material chain construction module specifically includes: Extract the batch transfer time and batch receiving time of adjacent circulation links along the industrial chain sequence, and match the preceding batch and the receiving batch according to the material flow direction and time period; Compare the outgoing and incoming quantities of each pairing batch, determine the actual receiving quantity based on the smaller of the two quantities, deduct the actual receiving quantity from the remaining quantities at both ends, and continue pairing unallocated materials. Connect the preceding batches and the receiving batches according to the actual volume received and the material flow direction, and retain the corresponding connections when the batches are split or aggregated to form a direct material chain.
[0010] Optionally, the contact version module specifically includes: Based on the actual coverage area of a single cleaning operation, the carriers that come into contact with agricultural products are divided into contact carrier units; Arrange the times when batches enter and leave the contact carrier unit in chronological order to form a batch occupancy relationship, and connect the contact path according to the actual transfer of the batches; Candidate cleaning boundaries are set at the end of the cleaning operation, and the batch occupancy of contact carrier units before and after the boundary is assigned to different contact versions. A contact version graph is established with the contact carrier unit as the node, the actual contact path as the edge, and the batch occupancy relationship as the node feature. Only the contact versions before and after that do not cross the candidate cleaning boundary are connected to form the parent version relationship and the contact version graph sequence.
[0011] Optionally, the improved EvolveGCN model includes multiple evolutionary graph convolutional units connected in a graph convolutional hierarchy: Each evolutionary graph convolutional unit includes a gated recurrent unit and a graph convolutional unit; The gated recurrent unit includes an update gate and a reset gate, and has candidate hidden states. The hidden state of the gated recurrent unit is the graph convolution weight matrix of the corresponding graph convolution unit.
[0012] Optionally, the evolutionary analysis module specifically includes: Each contact version graph shares the gating parameters of each layer of the gating loop unit, saves the convolution weight matrix of each layer of the graph in each contact version graph, and inputs the node embedding of the current contact version graph into the gating loop unit after summarizing it. Locate the parent version graph of the currently accessed version graph according to the parent version relationship, and use the convolution weight matrix of the graph at the same level as the parent version graph as the previous hidden state of the gated recurrent unit. If there is no parent version graph, use the convolution weight matrix of the corresponding initial graph. The gated loop unit calculates the update gate, reset gate and candidate hidden states based on the summarized node embeddings and the previous hidden state, and generates the convolution weight matrix of the same layer graph of the current contact version graph. When the candidate clean boundary is reached, the hidden state of each layer of the first contact version graph after the boundary is switched to the convolution weight matrix of the corresponding layer's initial graph. When a candidate clean boundary is withdrawn, the hidden state of each layer of the first contact version graph after the boundary is switched to the convolution weight matrix of the same layer of the contact version graph before the boundary. Mark the graph convolution weight matrix generated after the boundary based on the original parent version relationship as invalid. Starting from the first contact version graph after the boundary, select the same layer weight matrix of the parent version graph according to the updated parent version relationship and re-evolve until the current contact version graph or the next confirmed clean boundary. Graph convolution is performed using an effective graph convolution weight matrix. Based on the graph convolution output, batches of shared contact carrier units or continuous contact paths within the same contact version are identified. Candidate clean boundary associated paths are determined as paths to be reviewed, thus forming a contact exposure state.
[0013] Optionally, the sampling optimization module specifically includes: Extract the contact carrier unit along the path to be verified, filter candidate sampling locations based on the installation location and sampling range of the IoT terminal, and record the path to be verified corresponding to each candidate sampling location; The candidate sampling locations and sampling order are encoded as individuals in the snow ablation optimization algorithm population. The fitness of the individuals is calculated using the number of paths to be verified as a positive indicator and the number of sampling locations and the length of the sampling path as negative indicators. Iterate each individual according to the population update method of the snow melting optimization algorithm, select the individual with the best fitness within the single sampling capability of the IoT terminal, and decode to obtain the sampling position and sampling order; The IoT terminal is controlled to perform sampling in the sampling order, and the sampling and detection results are associated with the candidate clean boundaries corresponding to the candidate sampling locations to form clean verification data.
[0014] Optionally, the boundary correction module specifically includes: Cleaning validation data are collected based on the correspondence between sampling locations and candidate cleaning boundaries, and each test result is compared with the pass limit of the corresponding test item. When all test results meet the corresponding pass limits, the candidate clean boundary is confirmed as the confirmed clean boundary, and the disconnection state between the contact versions before and after the boundary is retained; If the test results do not meet the corresponding pass limit, the candidate cleaning boundary is cancelled, the contact versions before and after the boundary are merged, and the parent version relationship between the contact version before the boundary and the first contact version after the boundary is restored. The contact version diagram sequence is updated according to the confirmed or revoked parent version relationship, and the affected contact version diagram is re-evolved by the evolution analysis module to form the corrected contact exposure state.
[0015] Optionally, the dual-chain traceability module specifically includes: Agricultural product batches that share a common contact carrier unit or a continuous contact path are extracted from the corrected contact exposure state and used as the starting batch; Traverse the material flow along the direct material chain to determine the succession relationship of the initial batch and identify subsequent batches; Traverse associated batches along shared contact carrier units or continuous contact paths, stopping at the confirmed cleaning boundary when crossing contact versions; The process continues to traverse the direct material chain and contact path with new batches until no new batches are added. Duplicates are removed and associated contact carrier units are retained to form traceability results.
[0016] Optionally, the management and control module specifically includes: The affected agricultural product batches and associated contact carrier units are extracted from the traceability results. The current circulation link of the batch is determined according to the industrial chain sequence, and the corresponding Internet of Things terminals for the batch and contact carrier unit are identified respectively. Set the circulation status of the affected agricultural product batches to locked, set the available status of the associated contact carrier units to disabled, and generate corresponding status switching instructions. Send a state switching command to the corresponding IoT execution terminal, receive the execution status returned by the terminal, and verify whether the execution status has reached the locked state or the disabled state; Record the target status and execution status of each batch of agricultural products and contact carrier unit to form supply chain management results.
[0017] The beneficial effects of this invention are: This invention collects supply chain data on agricultural products’ production, processing, storage, transportation and sales through IoT terminals, and constructs a direct material chain according to batch succession relationships. At the same time, it establishes a contact version map based on the occupation, transfer and cleaning process of the contact carrier, so that the direct circulation relationship of agricultural products and the potential residue exposure relationship caused by the contact carrier can be synergistically characterized. This overcomes the problem that existing technologies rely solely on batch circulation records for traceability and are prone to missing indirect contact transmission paths, thus improving the completeness of the identification of affected batches.
[0018] This invention improves the EvolveGCN model by convolving the weight matrix according to the parent version relationship evolution graph, truncating the weight inheritance at the candidate cleaning boundary, and restoring the weight matrix before the boundary when the cleaning verification fails or the boundary is withdrawn. This allows the affected contact version to be re-evolved, enabling the contact exposure analysis to be corrected with the cleaning verification results. This avoids using the operation error that fails to meet the cleaning requirements as the propagation termination condition and reduces the possibility of missed detection of contact exposure paths.
[0019] Furthermore, this invention utilizes a snow ablation optimization algorithm to determine the sampling location and sampling order based on the path to be verified, thereby reducing invalid or duplicate sampling while improving the coverage of the path to be verified. By combining the corrected contact exposure status with the direct material chain to form traceability results, and by locking the affected agricultural product batches and discontinuing the use of associated contact carriers through IoT terminals, it achieves closed-loop management from data collection, cleaning verification, dual-chain traceability to circulation control, thereby improving the timeliness and reliability of risk disposal throughout the entire agricultural product industry chain. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the functional module structure of an agricultural product whole industry chain management system based on big data and the Internet of Things proposed in this invention; Figure 2 This is a schematic diagram of the structure of the improved EvolveGCN model, a whole-industry chain management system for agricultural products based on big data and the Internet of Things, proposed in this invention. Figure 3 This is a schematic diagram of the candidate clean boundary weight truncation and re-evolution process of an agricultural product whole industry chain management system based on big data and Internet of Things proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figures 1-3 A comprehensive agricultural product supply chain management system based on big data and the Internet of Things includes: The industry chain data collection module collects agricultural product industry chain data and arranges it chronologically to form an industry chain sequence. The material chain construction module connects batch acceptance relationships based on the industrial chain sequence to form a direct material chain; The contact version module divides contact carrier units according to the industry chain sequence, arranges batch occupancy relationships along the contact path, sets candidate cleaning boundaries according to the cleaning process and establishes parent version relationships to form a contact version diagram sequence. The evolutionary analysis module integrates the contact version graph sequence into the improved EvolveGCN model, convolves the weight matrix according to the parent version relationship evolution graph, truncates the evolution at the candidate clean boundary, and re-evolves the successor weight matrix with the weight matrix before the boundary when the boundary is removed, thus forming the contact exposure state and the path to be reviewed. The sampling optimization module selects and sorts sampling locations along the path to be verified based on the contact exposure status using a snow melting optimization algorithm, controls the sampling of IoT terminals, and generates cleanliness verification data. The boundary correction module confirms or cancels candidate cleaning boundaries based on cleaning validation data, updates the parent version relationship, and feeds back to the evolution analysis module to form a corrected contact exposure status. The dual-chain traceability module traces affected agricultural product batches and associated contact carrier units based on the direct material chain and corrected contact exposure status. It stops contact exposure tracing upon confirming the clean boundary and generates traceability results. The management and control module issues control commands based on the traceability results to block the flow of agricultural products and the reuse of contact carriers within the traceability scope, thus forming the supply chain management results.
[0023] In this embodiment, the industry chain acquisition module specifically includes: The supply chain data acquisition module collects supply chain data through IoT terminals set up in the production, processing, warehousing, transportation and sales links. Batch identification terminals read batch identifiers and supply chain links, weighing terminals record batch transfer in or out quantities, equipment control terminals record the time when batches enter and leave the contact carrier and the contact carrier unit identifier, cleaning control terminals record the start time, end time and coverage area of cleaning operations, and detection terminals record sampling locations, detection items and detection results. Each terminal binds the local recording time with the collected content to form the original supply chain data.
[0024] The time difference between the IoT terminal clock and the system clock is calculated through bidirectional time synchronization. When the system sends a synchronization request, the system sending time is recorded. When the terminal receives the request and returns a response, the terminal receiving time and the terminal sending time are recorded respectively. When the system receives a response, the system receiving time is recorded. The result of subtracting the terminal receiving time from the system sending time and the result of subtracting the terminal sending time from the system receiving time are added together and then halved to obtain the time correction amount for converting the terminal's local time to the system time. The time of correction is obtained by adding the time correction amount to the terminal's recorded time. In one embodiment, the time synchronization period can be 5 minutes. When the absolute value of the time difference exceeds 2 seconds, resynchronization is immediately performed. Data that fails to synchronize twice consecutively enters the time anomaly queue and does not participate in the industry chain sequence arrangement before the time correction is completed. Data that has completed the time correction forms the synchronized industry chain data.
[0025] Synchronous supply chain data is first collected by batch identifiers, then arranged according to the actual supply chain links traversed by the batch. Within the same supply chain link, data is arranged from earliest to latest based on the time of correction. Delayed data is compared with the time of correction and inserted between two adjacent records, and the link order of adjacent records is rechecked. When the same terminal uploads the same event content for the same batch at the same time, it is considered duplicate data, and only the record that passes the verification and is received first is retained. When there is a conflict between the outgoing and receiving records of the same batch, data with confirmation from both the outgoing and receiving terminals is retained first. Data with only single-end confirmation enters the flow exception queue and is not written into the valid time sequence until the record at the other end is completed. The data that has completed the arrangement, insertion, and conflict handling constitutes the supply chain sequence and is provided to the material chain construction module and the contact version module.
[0026] In this embodiment, the material chain construction module specifically includes: The material chain construction module reads batch transfer records and batch receiving records from the industrial chain sequence. Data where the destination link recorded in the transfer record is consistent with the source link recorded in the receiving record are identified as adjacent flow links. The batch transfer time period consists of the time when the quantity of the same batch is first reduced in the transfer link to the time when the quantity is last reduced. The batch receiving time period consists of the time when the quantity of the same batch is first increased in the receiving link to the time when the quantity is last increased. Historical transportation records that have a transfer time, a receiving time, and a corresponding flow direction, and whose receiving time is later than the transfer time, are considered valid historical transportation records. The valid transportation times for the same flow direction are sorted in ascending order, and the sequence number is taken as the upper limit of transportation time, rounded up to 0.95N, where N is the number of valid historical transportation records. If there are no valid historical transportation records, the maximum allowed transportation time registered in the transportation task is read. When the start time of the receiving time period is not earlier than the start time of the corresponding transfer time period and not later than the sum of the end time of the transfer time period and the upper limit of transportation time, the two time periods are identified as being able to connect.
[0027] The preceding batches that can be connected are arranged from earliest to latest according to the end time of the transfer period, and the receiving batches are arranged from earliest to latest according to the start time of the receiving period. First, the batches at the beginning of the two sequences are matched. The transfer amount that has not yet been allocated in the preceding batch is recorded as the remaining transfer amount, and the receiving amount that has not yet obtained a source in the receiving batch is recorded as the remaining receiving amount. The actual amount received is the smaller value between the remaining transfer amount and the remaining receiving amount. Then, the actual amount received is deducted from the two remaining amounts respectively. When the remaining transfer amount is 0, the process switches to the next preceding batch. When the remaining receiving amount is 0, the process switches to the next receiving batch. When both remaining amounts are 0, the process switches at the same time. Data that does not meet the time period connection conditions does not participate in the current pairing and is entered into the flow abnormality record.
[0028] Using agricultural product batches as batch nodes, the actual acceptance quantity formed by each pairing is used as the acceptance quantity of the directed connection, pointing from the preceding batch node to the receiving batch node; when a preceding batch is assigned to multiple receiving batches, multiple outgoing connections are retained; when multiple preceding batches merge into the same receiving batch, multiple incoming connections are retained. Each connection record corresponds to the actual acceptance quantity and flow direction; after deducting all available pairing quantities, data with unallocated quantities and no matching batches are found are retained in the flow anomaly record and not written into valid connections. All valid batch nodes and directed connections constitute a direct material chain and are transmitted to the dual-chain traceability module.
[0029] In this embodiment, the version access module specifically includes: The contact version module divides contact carrier units into continuous contact surfaces that can be completely covered by a single cleaning operation and whose cleaning status can be independently determined by the same set of detection results. When the same cleaning control command is applied to multiple continuous physical sections at the same time and each section uses the same cleaning start time, cleaning end time and detection position, the multiple physical sections are grouped into the same contact carrier unit. When any physical section has independent cleaning control, can be isolated separately or has an independent detection position, the physical section is divided into an independent contact carrier unit. When the cleaning operation only covers part of the contact surface, the edge of the actual area reached by the cleaning medium is used as the unit boundary, and the covered area and the uncovered area are encoded separately. The uncovered area continues to retain the original contact carrier unit's occupancy status.
[0030] Batch occupancy relationships are derived from batch entry and departure events in the supply chain sequence. The earliest correction time when the same batch enters the same contact carrier unit is used as the occupancy start time, and the time of the first corresponding departure event after the entry event is used as the occupancy end time. The start time, end time, batch identifier, and contact carrier unit identifier together constitute a batch occupancy relationship. If no departure event is obtained, the occupancy relationship is marked as unclosed and the current end time of the supply chain sequence is used as the coding cutoff time. After a departure event is obtained, the coding cutoff time is replaced. When the same batch leaves the previous contact carrier unit and enters the only connected next contact carrier unit within the allowable transfer time obtained by dividing the path length by the minimum operating speed of the equipment, a contact path from the previous contact carrier unit to the next contact carrier unit is established. If there are multiple matching next contact carrier units, no valid path is established and the corresponding flow record is transferred to the contact path exception record.
[0031] Candidate cleaning boundaries are determined by the cleaning end time recorded by the cleaning control terminal. There must be no batch occupation between the cleaning start time and the cleaning end time. The cleaning coverage must include all contact surfaces of the corresponding contact carrier unit. When both conditions are met, the contact version before the boundary is closed and the contact version after the boundary is established at the cleaning end time. If there is a lack of cleaning end record, the cleaning coverage is less than the range of the contact carrier unit, or there is batch occupation during cleaning, no candidate cleaning boundary is set and the cleaning record is transferred to the cleaning anomaly record. The first contact version starts from the moment when the contact carrier unit first appears to be occupied by a batch. Subsequent contact versions start from the previous candidate cleaning boundary and end at the next candidate cleaning boundary. Batch occupation that ends before the boundary is written to the pre-boundary version, and batch occupation that starts after the boundary is written to the post-boundary version.
[0032] The contact version graph uses contact carrier units as nodes, and the node arrangement order is determined by the ascending order of the contact carrier unit identifiers. The i-th row and j-th column of the adjacency matrix records the number of batch transfers from the i-th contact carrier unit to the j-th contact carrier unit within the current contact version. Positions where no transfers have occurred are written with 0. In one embodiment, the duration interval of each contact version is divided into 32 time slices. Within each time slice, each node sequentially records an occupancy flag, occupancy duration ratio, normalized entry count, and normalized exit count. The occupancy duration ratio is obtained by dividing the actual occupancy duration within the time slice by the time slice length and is limited to 0 to 1. The entry count and exit count are divided by the maximum count corresponding to the current version, and 0 is written when the maximum count is 0. The values of the 32 time slices are concatenated in chronological order to form a 128-dimensional node feature vector. The batch identifier is also recorded in an occupancy index table, which records the node row number, time slice sequence number, and batch identifier, and is used for model output to retrieve specific batches.
[0033] Each contact version graph records a version identifier, time range, candidate clean boundary identifier, and parent version identifier. Within the same contact path range, the previous contact version graph is searched in chronological order. If the current version does not pass through a candidate clean boundary with the previous version, the previous version identifier is written into the parent version identifier. When the current version is opened by a candidate clean boundary, the parent version identifier is set to null, so that the graph convolution weights before and after the boundary are not directly inherited. The adjacency matrix, node feature matrix, occupancy index table, and version relationship record are collectively encapsulated into a contact version graph. All contact version graphs are arranged according to the start time to form a contact version graph sequence and are passed to the evolution analysis module.
[0034] In this embodiment, the improved EvolveGCN model includes multiple evolutionary graph convolutional units connected in a graph convolutional hierarchy: EvolveGCN-H is used to process continuous graph snapshots. Each graph convolutional layer is configured with a gated recurrent unit. The node embeddings of the current graph snapshot are aggregated and then enter the gated recurrent unit. The convolutional weight matrix of the same layer of the previous graph snapshot is used as the previous hidden state. The gated recurrent unit generates the convolutional weight matrix of the same layer of the current graph snapshot. The graph convolutional unit then uses the weight matrix to update the node embeddings. The original model inherits hidden states continuously along the time sequence of graph snapshots. It cannot distinguish between the continuation of normal versions and the state interruption caused by candidate clean boundaries. It also cannot recover the weight evolution path from the version before the boundary when the clean boundary is removed.
[0035] The improved EvolveGCN model consists of multiple evolutionary graph convolutional units connected sequentially at the graph convolutional level. Each evolutionary graph convolutional unit includes a gated recurrent unit and a graph convolutional unit. The hidden state output of the current layer's gated recurrent unit is connected to the weight input of the current layer's graph convolutional unit, and the node embedding output of the current layer's graph convolutional unit is connected to the node embedding input of the next layer's evolutionary graph convolutional unit. The gated recurrent unit includes an update gate, a reset gate, and candidate hidden states. The update gate controls the retention ratio of the previous hidden state, and the reset gate controls the proportion of the previous hidden state participating in the candidate hidden state calculation. The candidate hidden state carries the weight changes introduced by the current contact version. The current hidden state generated by the gated recurrent unit is directly used as the graph convolutional weight matrix of the current layer.
[0036] The difference between the improved EvolveGCN model and the original EvolveGCN-H is that the gated recurrent unit no longer reads the graph convolution weight matrix of adjacent contact versions at fixed times. Instead, it connects the parent version weight reading interface to the input of the previous hidden state and connects the version-level weight record structure to the weight output of each graph convolution layer. This allows the graph convolution weight matrix generated by each contact version to be saved in correspondence with the contact version identifier and graph convolution level. This change is used to support parent version weight inheritance, stopping inheritance at candidate clean boundaries, and weight reconnection after boundary revocation. The specific weight switching and re-evolution process is executed by the evolutionary analysis module.
[0037] The improved EvolveGCN model receives the node feature matrix and adjacency matrix in the contact version graph. Each row of the node feature matrix corresponds to a contact carrier unit, and each column corresponds to a node feature. The row and column numbers of the adjacency matrix are consistent with the node arrangement order, and the matrix position retains the batch transfer number recorded in the contact version graph. In one embodiment, the node feature matrix can adopt an n×128 32-bit floating-point format, where n is the number of contact carrier units contained in the current contact version. The first evolution graph convolutional unit maps the 128-dimensional node features to 64-dimensional node embeddings, and the second evolution graph convolutional unit maps the 64-dimensional node embeddings to 32-dimensional node embeddings.
[0038] In the first evolution graph convolutional unit, the node summary result, the previous hidden state, and the current hidden state all use a 128×64 matrix. The 128 rows correspond to the first layer input feature channels, and the 64 columns correspond to the first layer output feature channels. The matrix positions store the weights passed from the corresponding input channel to the output channel. In the second evolution graph convolutional unit, the node summary result, the previous hidden state, and the current hidden state all use a 64×32 matrix. The 64 rows correspond to the second layer input feature channels, and the 32 columns correspond to the second layer output feature channels. When the number of nodes in the current contact version is less than the number required for node summarization, 0 is written in the missing position. Changes in the number of nodes only change the number of rows in the node feature matrix and the node embedding matrix, without changing the number of feature channels or the dimension of the graph convolution weight matrix.
[0039] The gated recurrent unit adopts the matrix gating processing disclosed by EvolveGCN-H, mapping the node aggregation result and the previous hidden state to the update gate and reset gate respectively. The gate value is limited to 0 to 1 by the Sigmoid function. The reset gate controls the proportion of the previous hidden state participating in the generation of candidate hidden states. The candidate hidden states are limited to -1 to 1 by the hyperbolic tangent function. The update gate weights the previous hidden state and the candidate hidden state position by position to form the current hidden state. The current hidden state is directly used as the graph convolution weight matrix of the current layer. The graph convolution unit performs node aggregation and feature channel mapping on the adjacency matrix with added self-connections and completed degree normalization. The output of the first layer enters the second layer through the ReLU function. The second layer forms a 32-dimensional final layer node embedding. The gating parameters of the same graph convolutional layer are shared between different contact versions, and different graph convolutional layers use independent parameters.
[0040] The model training data comes from historical supply chain data that has completed batch occupancy verification, contact path confirmation, and cleaning sampling verification. First, the supply chain acquisition module and contact version module are used to generate a continuous contact version map sequence. Then, the node feature matrix, adjacency matrix, version identifier, parent version identifier, and candidate cleaning boundary identifier are used to form the training input. All contact version maps formed in the same production cycle are included in the same data set. The training data is divided according to the collection time. In one implementation, the first 70% is used as the training set, the middle 15% is used as the validation set, and the last 15% is used as the test set to avoid the same contact process entering different data sets at the same time.
[0041] Training labels are determined based on the contact exposure conclusions formed by historical review. When two batches share a contact carrier unit or are connected through a continuous contact path, and there is no confirmed clean boundary within the connection range, and the detection results of the associated sampling location exceed the qualified limit of the corresponding detection item, they are marked as 1. When two batches are connected through a confirmed clean boundary, and all valid detection results associated with the boundary do not exceed the qualified limit of the corresponding detection item, they are marked as 0. Data that only has a path relationship but lacks valid detection results are not directly marked as 0. Data that cannot be classified into the contact version at the detection time, lacks qualified limits for detection items, or has conflicting contact paths are not written into the training labels and are not included in the supervised loss calculation.
[0042] During model training, the last layer node embeddings are combined according to the node pairs specified by the training labels. After normalization, the two node embeddings are multiplied position by position and accumulated. The accumulated result is converted into a contact exposure probability of 0 to 1 by the Sigmoid function. The loss function is the sum of weighted binary cross-entropy and parameter regularization. The weighted binary cross-entropy constrains the contact exposure probability to be close to the corresponding label. The positive label weight is obtained by dividing the number of negative labels by the number of positive labels in the training set. The parameter regularization term is the sum of the squares of the gating parameters and the initial graph convolution weight matrix. In one embodiment, the coefficient of the parameter regularization term can be 0.0001.
[0043] The initial graph convolutional weight matrix, update gate parameters, reset gate parameters, and candidate hidden state parameters of each layer are initialized uniformly using Xavier, and the initial bias value is set to 0. During training, they are updated synchronously through error backpropagation. In one implementation, the optimizer is Adam, the initial learning rate can be 0.001, each batch of input consists of 8 sets of contact version graph sequences, the maximum number of training rounds can be 200 rounds, the gradient norm is limited to within 5 before a single parameter update, and the learning rate is multiplied by 0.5 if the validation set loss does not decrease for 5 consecutive rounds.
[0044] A failure to improve is defined as a decrease in validation set loss relative to the recorded minimum of less than 0.0001. Training is terminated after 15 consecutive rounds of no improvement, and also after reaching the maximum number of training rounds. After training, the gating parameters, initial graph convolution weight matrix, and bias parameters corresponding to the minimum validation set loss are retained. During deployment, the common parameters obtained during training are fixed. The graph convolution weight matrix corresponding to each contact version is generated in real time by the gating loop unit and written into the version-level weight record structure for the evolution analysis module to perform parent version inheritance and clean boundary processing.
[0045] In this embodiment, the evolution analysis module specifically includes: The evolutionary analysis module sequentially reads the version identifier, parent version identifier, candidate clean boundary identifier, node feature matrix, adjacency matrix, and occupancy index table from the contact version graph sequence. Each row of the node feature matrix corresponds to a contact carrier unit. The first evolution graph convolutional unit directly embeds the node feature matrix as the first layer node, and the second evolution graph convolutional unit embeds the first layer graph convolution output as the second layer node. The node row number remains unchanged between layers, so that the last layer node embedding can look up the corresponding contact carrier unit and agricultural product batch through the occupancy index table.
[0046] The improved EvolveGCN model's version-level weight record structure consists of a version index table, a level weight table, a boundary weight cache, a validity flag table, and a re-evolution queue. The version index table records the version identifier, parent version identifier, version start time, and candidate clean boundary identifier. The level weight table records the version identifier, graph convolution level, and corresponding graph convolution weight matrix. The boundary weight cache stores the graph convolution weight matrices of each layer before the candidate clean boundary. The validity flag table records whether each matrix is currently allowed to participate in graph convolution and weight inheritance. The re-evolution queue records the starting version, stopping version, and processing order that need to be recalculated.
[0047] The nodes of the current contact version graph are embedded into the node summarization operator of the corresponding graph convolutional layer. The node summarization operator includes a learnable scoring vector, a node scoring unit, a node selection unit, a weighted arrangement unit, and a matrix transpose unit. The number of elements in the learnable scoring vector is equal to the number of input feature channels in the current layer. The node scoring unit multiplies the value of each channel of each node by the value at the same position in the scoring vector, sums them up, and then divides by the square root of the sum of squares of the elements in the scoring vector to obtain the summarization score of that node. The scoring vector is obtained by model training and is shared between different contact versions.
[0048] The node selection unit sorts the nodes by their total score from largest to smallest. When the scores are the same, the contact carrier unit with the smaller node row number is selected first. The first evolution graph convolution unit selects 64 nodes, and the second evolution graph convolution unit selects 32 nodes. The number of nodes selected is equal to the number of output feature channels of the corresponding graph convolution layer. When the number of nodes in the current version is insufficient to select the required number, a row of nodes with all zeros is added to the end of the selected nodes. Existing nodes are not reused to avoid repeatedly amplifying a single contact carrier unit.
[0049] The weighted sorting unit compresses the sum of scores of selected nodes to -1 to 1 using the hyperbolic tangent function, and then multiplies the compressed scores channel by channel into the corresponding node embedding. The first layer forms a 64×128 weighted node matrix and transposes it into a 128×64 gated input matrix. The second layer forms a 32×64 weighted node matrix and transposes it into a 64×32 gated input matrix. The two gated input matrices maintain the same number of rows and columns as the graph convolution weight matrices of the first and second layers, respectively.
[0050] When the parent version identifier is not empty, the version index table locates the parent version, and the layer weight table reads the effective graph convolution weight matrices of the first and second layers of the parent version respectively, and sends the weight matrix of the same layer into the gated recurrent unit of the current layer as the previous hidden state; when the parent version identifier is empty and the current version is the first version of the contact version graph sequence, the corresponding initial graph convolution weight matrix fixed after the model training is read; when the parent version identifier is empty and the current version is after the candidate clean boundary, the corresponding initial graph convolution weight matrix is also read, so that the weight state before the boundary does not enter the first version after the boundary.
[0051] When the hierarchical weight matrix pointed to by the parent version identifier is missing or marked as invalid, the weight matrix of the adjacent version is not read for replacement. The version hierarchical weight record structure searches forward along the parent version chain for the nearest valid ancestor version to the current version. The contact versions between the ancestor version and the current version are written into the re-evolution queue according to the start time. The missing interval is re-evolutionized before the current version is processed. If there is no valid ancestor version in the parent version chain, the re-evolution starts from the convolutional weight matrix of the corresponding layer's initial graph.
[0052] The gated loop unit performs linear mapping on the gated input matrix and the previous hidden state respectively. The mapping results of the two terms are accumulated position by position with the update gate bias, and then compressed to 0 to 1 by the Sigmoid function to form the update gate. The reset gate is calculated in the same order. The reset gate is multiplied position by position with the previous hidden state. The product is accumulated with the mapping result of the gated input matrix and the candidate state bias after being mapped by the hidden state. Then it is restricted to -1 to 1 by the hyperbolic tangent function to form the candidate hidden state.
[0053] The current hidden state is assigned a retention ratio to the previous hidden state and candidate hidden states position by position by the update gate. The closer the update gate position value is to 0, the more the previous hidden state is retained; the closer it is to 1, the more candidate hidden states are written. The current hidden state after position-by-position weighting is directly used as the convolution weight matrix of the graph in the same layer of the current contact version. Each contact version shares the update gate parameters, reset gate parameters, and candidate hidden state parameters of the same layer. Different layers do not share the gate parameters. The current graph convolution weight matrix is written into the layer weight table and the validity mark is set to valid.
[0054] When the current contact version is the first version after the candidate clean boundary, the version hierarchy weight record structure first writes the effective graph convolution weight matrix of each layer of the contact version before the boundary into the boundary weight cache. The cache record simultaneously writes the candidate clean boundary identifier, the identifier of the version before the boundary, and the graph convolution level. Then, the parent version identifier of the first version after the boundary is kept empty, so that each layer gated recurrent unit generates a new weight branch from the initial graph convolution weight matrix. The weight matrices of each layer generated after the boundary are written into the hierarchy weight table and marked as candidate isolation branches.
[0055] When a candidate clean boundary is confirmed as a confirmed clean boundary, the disconnected state of the parent version before and after the boundary remains unchanged, the candidate isolation branch is converted into a confirmed isolation branch, and each version after the boundary continues to inherit the same layer weight matrix of the parent version in the isolation branch; the confirmed clean boundary blocks the re-evolution queue from continuing to expand outward from the boundary, so that the residual contact state before the boundary cannot re-enter the contact version that has completed effective cleaning.
[0056] When a candidate clean boundary is revoked, the version index table restores the parent version identifier of the first version after the boundary to the version identifier before the boundary. The boundary weight cache reads the convolution weight matrices of each layer graph before the boundary and sends them to the gated loop unit of the first version after the boundary. All weight matrices of each layer in the original candidate isolation branch starting from the first version after the boundary and whose parent version chain passes through that version are marked as invalid. The affected versions are written to the re-evolution queue from earliest to latest according to the start time.
[0057] The re-evolution queue starts processing from the first version after the boundary. Each version first completes the first-layer node summary, reads the weights of the same layer of the parent version, updates the gating, and performs the first-layer graph convolution. Then, the first-layer node embedding is sent to the second layer to complete the same processing. The effective weight matrix regenerated in the current version is written back to the hierarchical weight table and replaces the invalid matrix. The effective weight matrix of each layer in the current version is then used as the previous hidden state of the same layer of the next sub-version until the current contact version is completed or the next confirmed clean boundary is reached.
[0058] When encountering another clean boundary that is still in the candidate state during re-evolution, the state where the parent version identifier of the first version after the boundary is empty is retained. The current re-evolution branch stops before the candidate clean boundary and waits for the boundary correction module to give a confirmation or revocation result before determining whether to continue. When encountering a clean boundary that has been revoked, it continues along the restored parent version relationship. When encountering a confirmed clean boundary, it stops immediately and does not backcalculate the versions after the confirmed boundary.
[0059] The graph convolutional unit reads the effective graph convolutional weight matrix of the corresponding layer of the current contact version, adds 1 to each position on the main diagonal of the adjacency matrix to preserve the state of the contact carrier unit itself, and then calculates the sum of the connection weights of the row where each node is located. The original weight of each connection is divided by the square root of the product of the sum of the rows of the starting node and the sum of the rows of the arriving node to form a normalized adjacency matrix. The normalized adjacency matrix is first multiplied with the node embedding matrix of the current layer to make each node aggregate its own and the features of the adjacent contact carrier units, and then multiplied with the graph convolutional weight matrix of the current layer to complete the feature channel mapping. The output of the first layer is passed through the ReLU function to set the negative value to 0 and then enters the second layer. The second layer uses the same processing to form a 32-dimensional final layer node embedding.
[0060] Nodes in the adjacency matrix that are self-connected but do not have valid contact paths only have their own node features aggregated and no cross-node contact exposure relationships are generated. When the contact path recorded in the adjacency matrix lacks a batch occupancy index, the corresponding edge is removed from the current version of the valid adjacency matrix and transferred to the contact path exception record to avoid connections whose batch source cannot be traced participating in contact exposure identification.
[0061] The contact exposure status is determined by embedding the last layer node into the occupancy index table and looking up the batch occupancy relationship. First, batch pairs that share the same contact carrier unit are selected. Then, batch pairs that are continuously connected along the directed contact path and whose occupancy times are sequential are selected. The node corresponding to each batch is normalized by dividing it by the square root of the sum of the squares of its own channels. Then, the 32 co-located channels of the two normalized nodes are multiplied one by one and accumulated. The accumulated result is converted into a contact exposure association value of 0 to 1 by the Sigmoid function.
[0062] The contact exposure judgment threshold is determined by the validation set during the training phase. The contact exposure association values that are different from each other in the validation set are sorted in ascending order and used as candidate thresholds one by one. The precision and recall corresponding to each candidate threshold are calculated and the harmonic mean of the two is calculated. The candidate threshold with the highest harmonic mean is taken as the deployment threshold. When multiple candidate thresholds have the same highest value, the smaller value is taken to reduce the number of batches that are missed. The deployment threshold is kept fixed before the model parameters are updated. In one implementation, it can be 60%. When the contact exposure association value reaches the deployment threshold, the corresponding batch pair, contact carrier unit and contact path are written into the contact exposure status. When it is lower than the deployment threshold, no valid contact exposure relationship is established.
[0063] When an effective contact-exposure relationship crosses the candidate clean boundary, the contact path from the associated batch before the boundary to the associated batch after the boundary is determined as the path to be reviewed. The path to be reviewed records the starting batch identifier, ending batch identifier, contact carrier unit passed through, contact version identifier, candidate clean boundary identifier, and contact-exposure association value. Effective contact-exposure relationships that do not cross the candidate clean boundary are retained in the contact-exposure state and do not enter the sampling review scope. The contact-exposure state and the path to be reviewed are respectively transmitted to the dual-chain traceability module and the sampling optimization module.
[0064] Compared to the original EvolveGCN-H, the improved EvolveGCN model changes the organizational basis of graph convolution weight evolution from a single temporal adjacency relationship to a contact version parent-child relationship. It also incorporates a version-level weight record structure within the weight recursion that can preserve branch states, sever inheritance sources, undo failed branches, and limit the scope of re-evolution. This makes cleaning events no longer merely external filtering conditions after model output, but directly alter the source of hidden states and the topology of graph convolution weight propagation. This improvement transforms the original model's irreversible linear-time evolution into a versioned weight evolution capable of branching, isolation, reconnection, and local recovery. When cleaning is effective, it blocks the erroneous propagation of residual states before the boundary into nodes after the boundary. When cleaning fails, it restores erroneously severed residual propagation states. Simultaneously, it restricts the recalculation scope to within the version chain affected by boundary changes, thus balancing the continuity of contact exposed states, the authenticity of cleaning boundaries, and model update efficiency.
[0065] In this embodiment, the sampling optimization module specifically includes: The sampling optimization module reads the candidate cleaning boundary identifier, the contact carrier unit passed through, and the contact path from the path to be verified. The IoT terminal installation record provides the terminal location, movable area, sensor sampling radius, and maximum number of samples per round. When the contact carrier unit is located within the movable area of the terminal and the corresponding contact surface enters the sensor sampling radius, the location that the terminal can reach and complete the detection is determined as the candidate sampling location. Each candidate sampling location records the location identifier, the corresponding terminal, the contact carrier unit that can be covered, the path to be verified that can be verified, and the candidate cleaning boundary. When the same location can cover multiple paths to be verified, the identifiers of each path are retained separately.
[0066] The number of candidate sampling positions is denoted as m. Each individual in the snow melting optimization algorithm uses a floating-point vector of length 2m. The first m positions are written with the selection value of the corresponding candidate sampling position, and the next m positions are written with the order value of the corresponding candidate sampling position. Each value is limited to 0 to 1. Candidate sampling positions with a selection value of not less than 0.5 are added to the sampling set of the current individual. When the sampling set is empty, the candidate sampling position with the largest selection value is selected. The positions added to the sampling set are arranged in ascending order of order value. If the order values are the same, they are arranged in ascending order of position identifier. In this way, the continuous vector is converted into sampling positions and sampling order.
[0067] The selection value and order value in the initial population are generated by uniform random numbers between 0 and 1. In one embodiment, the population size can be 30 individuals. When the number of sampled positions after decoding exceeds the maximum number of samples in a single round of the corresponding IoT terminal, the allowed number of positions are retained in descending order of selection value, and the remaining positions are removed from the sampling set. When the sampling path exceeds the allowed movement distance in a single round of the terminal, the position with the smallest selection value is removed starting from the end of the route and the route is recalculated until both the number of samples and the movement distance are within the execution range of the terminal. The path coverage record is not affected if the path to be reviewed corresponding to the removed position can still be covered by other selected positions.
[0068] The number of paths to be reviewed is determined by the number of non-repeating paths to be reviewed that the sampling set can cover, and the path coverage ratio is obtained by dividing this number by the total number of paths to be reviewed; the sampling location ratio is obtained by dividing the number of locations in the sampling set by the sum of the maximum number of samples taken by all IoT terminals in a single round; the sampling path length is obtained by summing the shortest passable distances from the starting position of each terminal to the first sampling position and between adjacent sampling positions, and the path length ratio is obtained by dividing the summed result by the sum of the allowable movement distances of each terminal in a single round.
[0069] Individual fitness is obtained by subtracting the inverse weighted value of the sampling location ratio and the path length ratio from the positive weighted value of the path coverage ratio. In one embodiment, the weight of the path coverage ratio can be 0.6, and the weights of the sampling location ratio and the path length ratio can both be 0.2. The path coverage weight is higher than the other two to prioritize ensuring the verification range of the candidate clean boundary. When the total number of paths to be verified is 0, sampling optimization stops and an empty sampling set is returned. When the sum of the maximum number of samples in a single round is 0 or the sum of the allowed movement distance in a single round is 0, the current sampling task is written into the terminal capability anomaly record and fitness calculation is not performed.
[0070] At the beginning of each iteration, the snow melting optimization algorithm arranges individuals from high to low fitness, takes the three individuals with the highest fitness and the average value of half of the individuals with relatively high fitness to form an elite pool of four members, and calculates the arithmetic mean of the values of each dimension of all individuals to form the population centroid. The population is randomly divided into two subgroups. The first subgroup initially has half the population size and adds one individual in each round, while the second subgroup correspondingly reduces one individual, until all individuals enter the first subgroup.
[0071] The first subgroup randomly selects one elite pool member for each individual, generating a Brownian random vector with a mean of 0 and a variance of 1. The dimensional difference between the current individual and the optimal individual and the dimensional difference between the current individual and the population centroid are combined in a random ratio between 0 and 1, and then multiplied dimension by dimension into the Brownian random vector and superimposed on the selected elite pool member to form the updated individual of the first subgroup. The second subgroup first divides the current round by the maximum number of rounds, takes the negative of the ratio, and performs a natural exponential operation to obtain the temperature decay. Then, it performs a natural exponential operation on the ratio, subtracts 1, divides by the natural constant minus 1, multiplies by 5 / 7, adds 1, and multiplies by 0.35 to obtain the snowmelt density factor. The temperature decay is multiplied by the snowmelt density factor to obtain the snowmelt control amount. The snowmelt control amount is multiplied by the optimal individual and superimposed on the optimal individual difference and the population centroid difference in a random ratio between -1 and 1 to form the updated individual of the second subgroup.
[0072] For updated individuals, dimensions greater than 1 are written back to 1, and dimensions less than 0 are written back to 0. Then, the sample set is decoded, terminal capability constraint is repaired, and fitness is calculated. When the updated individual's fitness is higher than the current best fitness, the best individual is replaced. After each round, the elite pool and population centroid are regenerated. In one implementation, the maximum number of iterations can be 100 rounds. The iteration is stopped early when the increase in the best fitness is less than 0.001 for 10 consecutive rounds.
[0073] When no individual that meets the terminal's capability range is obtained, the sampling optimization module calculates the number of paths to be reviewed that will be newly covered at each candidate sampling location, and divides it by the sum of the increase in the number of samples caused by that location and the increase in the route length. The results are then added to the sampling set one by one from largest to smallest until the upper limit of the number of samples or the travel distance in a single round is reached. When multiple individuals have the same fitness, individuals with fewer sampling locations, shorter sampling path lengths, and smaller location identifiers are selected in sequence to obtain the unique optimal individual.
[0074] After optimal individual decoding, the data is split into corresponding sampling position sequences according to the IoT terminal. Each sampling instruction is written with terminal identifier, sampling position identifier, sampling order, path to be verified identifier, candidate clean boundary identifier, and detection item. The IoT terminal completes sampling according to the sampling order and returns the sampling time, detection result, and execution status. The detection result of successful execution is associated with the path to be verified and the candidate clean boundary covered by the sampling position. Positions that fail to execute or have missing results are not written with valid detection results and are re-entered into the candidate sampling position set. All valid detection results and their corresponding relationships together form clean verification data and are transmitted to the boundary correction module.
[0075] In this embodiment, the boundary correction module specifically includes: The boundary correction module reads the sampling location identifier, candidate clean boundary identifier, detection items, detection results, sampling time, and execution status from the clean validation data. Through the correspondence between the sampling location and the path to be verified saved by the sampling optimization module, the detection results associated with the same candidate clean boundary are grouped into the same boundary validation set. When a sampling location covers multiple paths to be verified, the detection results are associated with the same candidate clean boundary passed by each path, and the detection results are not extended to contact carrier units that have not passed through the coverage area of the sampling location.
[0076] The acceptable limits for each test item are loaded into the system and bound to the test item identifier. Food safety test items adopt the limits specified by the current implementation standard, while the acceptable limits for the cleanliness of the contact carrier are adopted by the test equipment calibrated and confirmed. When there are different agricultural product categories or contact materials for the same test item, the limit that matches the agricultural product category and contact carrier material corresponding to the sampling location is used. The boundary verification set is first arranged from earliest to latest according to the sampling time, and then arranged according to the sampling location identifier and the test item identifier. Each valid test result is compared with the matched acceptable limit. If the test result is not higher than the limit, it is recorded as qualified; if it is higher than the limit, it is recorded as unqualified.
[0077] A valid detection result requires that the IoT terminal execution status is successful, the detection item matches the acceptable limit, and the sampling time is after the formation of the candidate clean boundary and before the next batch enters the corresponding contact carrier unit. When all sampling positions and all detection items associated with the same candidate clean boundary obtain valid results and are all qualified, the candidate clean boundary is updated to a confirmed clean boundary, the disconnection state between the contact version before the boundary and the first contact version after the boundary is retained, and the weight evolution truncation state established by the evolution analysis module at this boundary is retained. When any valid detection result is unqualified, the candidate clean boundary is immediately updated to a withdrawn state, and no longer waits for detection results that have not yet returned in the same set.
[0078] When sampling results are missing, IoT terminal execution fails, the detection item cannot match the qualified limit, or the sampling time exceeds the valid range, the corresponding result will not be included in the qualified judgment. The candidate clean boundary will remain in the candidate state, and the missing sampling location and detection item will be resubmitted to the sampling optimization module. When multiple valid results are returned for the same detection item at the same sampling location, the result with the latest sampling time will be retained. When multiple results have the same sampling time and inconsistent values, the detection item will be marked as a detection conflict and resampled. The candidate clean boundary will not be confirmed before the conflict is resolved.
[0079] After the candidate clean boundary is revoked, the boundary correction module restores the pre-boundary contact version and the first contact version after the boundary to a continuous version relationship, writes the pre-boundary contact version identifier into the parent version identifier of the first contact version after the boundary, and removes the isolation mark between the two versions; the pre-boundary and post-boundary contact versions retain their respective version identifiers and time ranges, do not delete the original version data, and complete the logical merging by restoring the parent version relationship, so that the post-boundary batch occupancy can retake the pre-boundary contact state.
[0080] After the contact version graph sequence completes the update of boundary state and parent version relationship, the boundary correction module transmits the changed candidate clean boundary identifier, the version identifier before the boundary, and the first version identifier after the boundary to the evolution analysis module. If it is confirmed that the clean boundary does not trigger re-evolution outside the boundary, the boundary is revoked starting from the first contact version after the boundary. This version and the sub-versions continuously connected along the restored parent version relationship are identified as the affected range. Re-evolution stops when it reaches the current contact version or the next confirmed clean boundary. The evolution analysis module recalculates the node embedding and contact exposure relationship of the affected version with the updated effective graph convolution weight matrix, replaces the contact exposure state generated by the original candidate isolation branch, forms the corrected contact exposure state, and transmits it to the dual-chain tracing module.
[0081] In this embodiment, the dual-chain traceability module specifically includes: The dual-chain traceability module reads the batch pairs, contact carrier units, contact versions, contact paths, and contact exposure association values recorded in the corrected contact exposure status. It extracts agricultural product batches at both ends of the same valid contact exposure relationship as the starting batch, and retains duplicate batches only once. It establishes a pending set and an accessed set. The pending set stores batches that have not yet been expanded in a first-in-first-out order. The starting batch is written into the pending set first, and the accessed set is written with the corresponding batch identifier when the batch begins to expand. This is used to prevent the same batch from being processed repeatedly due to splitting, aggregating, or reconnecting contact paths.
[0082] Each time, a current batch is read from the beginning of the pending set. In the direct material chain, a directed connection with the current batch as the preceding node is located. The direction of the connection must be consistent with the actual material flow of agricultural products. When the actual acceptance quantity in the connection record is greater than 0, the batch that the connection reaches is determined as the successor batch. When the current batch is split into multiple receiving batches, all successor batches with actual acceptance quantities are included. When multiple preceding batches are merged into the same receiving batch, they are only included if the receiving batch has not yet entered the visited set. Connections with an actual acceptance quantity of 0 or marked as abnormal flow are not included in the traceability.
[0083] The current batch of contact exposure expansion locates the contact carrier unit and contact version it occupies through the occupancy index table. First, it searches for related batches within the same contact carrier unit whose occupancy time is later than the current batch's occupancy time. Then, it searches for related batches within consecutive contact carrier units along the directed contact path in the contact version graph. When adjacent occupancy time periods overlap or the entry time of the later batch is later than the exit time of the previous batch, the propagation direction is retained. If the contact path edge lacks a batch occupancy index or the contact direction cannot be determined, the branch is stopped and a traceability anomaly record is written.
[0084] Before moving from the current contact version to the next contact version, the contact exposure extension reads the boundary status between the two versions. When the boundary status is confirmed as a cleaning boundary, the contact path branch is terminated and batches after the boundary are no longer included in the current branch. When the boundary status is a candidate status or a revocation status, the valid associations already established in the contact exposure status are read and corrected. The batches and contact carrier units corresponding to the candidate status retain the candidate boundary identifier, enabling the management and control module to identify the exposure range that has not yet been cleaned and confirmed.
[0085] New batches discovered in the direct material chain and contact path are first compared with the visited set. Unvisited batches are written to the end of the pending set, and their source batch, source relationship, actual acceptance quantity or contact carrier unit are recorded. Batches that have been visited are not written again. Batches in the pending set are sequentially expanded in the direct material chain and expanded in the contact exposure. Newly discovered batches continue to be processed in the same way until the pending set is empty and no new batches are generated in this round.
[0086] After traceability is completed, the starting batch and all newly added batches are deduplicated to form a set of affected agricultural product batches. The contact carrier units that actually participated in the effective contact exposure expansion during the traceability process are deduplicated to form a set of associated contact carrier units. The source batch, material chain connection, contact path, contact version and boundary status corresponding to each affected batch are retained. The set of affected agricultural product batches, the set of associated contact carrier units and the correspondence between the two together form the traceability result, which is transmitted to the management and control module to determine the control objects that need to be blocked from circulation and stopped from reuse.
[0087] In this embodiment, the management and control module specifically includes: The management and control module reads the affected agricultural product batches and associated contact carrier units from the traceability results, and then extracts the entry, receipt, transfer, transportation handover and circulation completion records of the same batch from the industrial chain sequence. The records are arranged from earliest to latest according to the time of correction. The entry or receipt record with the latest time that is not canceled by a later departure record is taken as the current circulation stage. When the latest record is a transfer record and a receipt record has not yet been obtained, the corresponding transportation task is determined as the current circulation stage. When multiple terminal records conflict with each other, the object holding status query is sent to the relevant terminals. The terminal that returns the holding status is taken as the current control terminal. Before the holding status is determined, the batch is not recorded as controlled as completed.
[0088] The IoT execution terminals corresponding to batches and contact carrier units are determined through a terminal mapping table established when the device is connected. The terminal mapping table records the supply chain links, equipment identifiers, contact carrier unit identifiers, and terminal identifiers. Batches are matched with batch management terminals based on the current circulation link, and contact carrier units are matched with equipment control terminals or carrier management terminals based on the carrier unit identifier. In the batch status record, the circulation status value 0 indicates normal circulation and 1 indicates locking. In the contact carrier status record, the available status value 0 indicates reuse is allowed and 1 indicates deactivation. The management and control module writes the target status of the affected batches to 1, writes the target status of the associated contact carrier units to 1, and generates a status switching instruction containing the control object identifier, target status, target terminal identifier, and the instruction generation time.
[0089] Batch status switching instructions are sent to the batch management terminal corresponding to the current circulation stage, which stops the batch outbound, transfer, or delivery operation. Contact carrier status switching instructions are sent to the corresponding device control terminal or carrier management terminal, which disables the carrier enable permission. After the IoT execution terminal completes the status writing, it returns the controlled object identifier, actual status, and execution completion time. The management control module compares the actual status with the target status for each controlled object. When the actual circulation status of the corresponding batch is 1, the batch control is confirmed to be successful. When the actual usable status of the corresponding contact carrier is 1, the contact carrier control is confirmed to be successful. If the status of any object is inconsistent, only that object is recorded as an execution failure.
[0090] The maximum response time of the IoT execution terminal is written into the terminal correspondence table when the terminal is connected. In one embodiment, the response times of 100 successful commands in the terminal access test can be sorted in ascending order, and the 95th response time is taken and increased by 20% as the maximum response time. If the execution status is not returned after the maximum response time, the execution timeout is confirmed. If the execution fails or the execution timeout occurs, the terminal correspondence table is reread and the status switching command is issued again. If the batch has been transferred to other links in the industrial chain before the command is executed, the industrial chain sequence is reread and the command is issued to the newly matched IoT execution terminal. If the target status is still not reached after the re-execution, the corresponding controlled object is written into the control anomaly record and the target status remains unchanged. The management control module records the target status, actual execution status, execution completion time and anomaly reason of each agricultural product batch and contact carrier unit to form the industrial chain management result.
[0091] Example 1: To verify the feasibility of this invention in practice, it was applied to a fruit and vegetable sorting, processing, and cold chain distribution company. This company has established cleaning, sorting, packaging, temporary storage, and distribution processes. Different batches of agricultural products continuously pass through shared contact carriers such as cleaning tanks, conveyor belts, sorting channels, and turnover containers. The original management system mainly relied on batch inbound and outbound records for traceability and directly used cleaning operation completion records as the termination basis for contact transmission. When the contact carrier was not thoroughly cleaned, batches before and after the boundary might still be indirectly linked through residues. The original system struggled to promptly restore the severed contact relationship, easily missing affected batches. Furthermore, fixed sampling locations suffered from duplicate sampling and insufficient coverage of critical paths.
[0092] In practical applications, IoT terminals with batch identification, weight acquisition, equipment status recording, and cleaning record uploading functions are deployed at each flow stage. Data timing is unified based on the deviation between the terminal clock and the system clock, and a direct material chain is constructed according to the batch output, receiving volume, and flow direction. The cleaning tank section, conveyor belt section, sorting channel, and turnover container, which can be independently covered by a single cleaning operation, are divided into contact carrier units. A contact version graph is established based on batch entry, exit, and transfer records. The improved EvolveGCN model evolves the convolutional weight matrix of each layer graph according to the parent version relationship, and the evolution restarts at the candidate cleaning boundary using the initial weights. The snow melting optimization algorithm determines the sampling position and order based on the number of paths to be verified, the number of sampling locations, and the sampling path length. After completing surface sampling, the IoT terminal uploads the ATP fluorescence detection results. The pass limits for various contact carriers are set at 80–120 RLU according to the enterprise's hygiene control standards. When the test fails, the candidate cleaning boundary is removed, and the subsequent contact version is re-evolved from the weight matrix before the boundary.
[0093] To verify the effectiveness of this invention, 240 consecutive batches, 31 contact carrier units, and 42 cleaning operations were selected as verification objects. In the verification batches that did not affect product safety, food-grade fluorescent tracers were used to simulate contact residues. Manual verification and surface sampling confirmed 30 residue risk events, of which 12 cleaning operations failed to meet the corresponding compliance limits. Using the actual affected batches, contact paths, and cleaning boundary states obtained through manual verification as benchmarks, the method of this invention was compared with traditional batch ledger traceability methods and methods based on direct material chains and fixed cleaning boundaries. The statistical results are shown in Table 1 below.
[0094] Table 1. Comparison of the Comprehensive Effects of Dual-Chain Traceability and Clean Boundary Correction for Agricultural Products
[0095] As can be seen from the data in Table 1 above, the method of the present invention outperforms traditional batch ledger tracing methods and direct material chain and fixed cleaning boundary methods in terms of affected batch recall rate, irrelevant batch false inclusion rate, average tracing time, average number of sampling locations, cleaning failure boundary identification rate, and average control response time. Traditional batch ledger tracing methods mainly rely on batch transfer-in and transfer-out records, making it difficult to identify indirect contact propagation caused by cleaning tanks, conveyor belts, sorting channels, and turnover containers. Its affected batch recall rate is only 76.8%, the irrelevant batch false inclusion rate reaches 23.5%, and the average tracing time is 19.2 minutes, indicating that this method is prone to both missing actually affected batches and including irrelevant batches within the control scope. The direct material chain and fixed cleaning boundary method improves traceability continuity through batch succession relationships, increasing the recall rate to 87.4% and reducing the false inclusion rate to 15.2%. However, because it directly uses the cleaning operation completion record as the basis for propagation termination, the cleaning failure boundary identification rate is only 41.7%. The method of this invention uses direct material chain and contact exposure relationship in synergy for traceability, achieving a recall rate of 95.6% and reducing the false acceptance rate to 8.7%. By using a snow melting optimization algorithm to select sampling locations and sampling order, the average number of sampling locations is reduced from 14.1 to 8.1. By confirming or withdrawing candidate cleaning boundaries through cleaning validation data, the cleaning failure boundary identification rate is increased to 91.7%, and the average traceability time and control response time are shortened to 5.4 min and 3.8 min, respectively. This demonstrates that the present invention can improve traceability integrity while reducing invalid sampling and over-control.
[0096] This embodiment deploys IoT terminals in the production, processing, storage, and distribution of agricultural products to organize batch flow, contact carrier occupancy, cleaning operations, and sampling and testing data in a unified time sequence. A direct material chain is established based on the outflow, inflow, and material flow direction, accurately describing the batch splitting, aggregation, and continuous flow relationships. Simultaneously, contact carriers that can be independently covered by a single cleaning operation are divided into contact carrier units, and a contact version graph is established according to the batch entry, exit, and transfer processes. The improved EvolveGCN model no longer relies solely on the convolutional weight matrix of the evolution graph at adjacent time points, but instead selects the previous hidden state according to the parent version relationship and truncates weight inheritance at candidate cleaning boundaries. When the sampling and testing results are unqualified, the candidate cleaning boundary is removed, and the subsequent contact version is re-evolved using the convolutional weight matrix of the boundary-before graph, allowing the incorrectly severed contact exposure relationship to be restored. Through the above processing, this embodiment can identify potential residual propagation paths outside of direct material flow, and combine the optimized sampling results to actually verify the clean boundary. Finally, the affected batch range is repeatedly expanded along the direct material chain and contact exposure relationship. Then, the IoT terminal locks the relevant batches and disables the associated contact carrier, realizing closed-loop management of data collection, exposure analysis, boundary correction, dual-chain traceability and control execution.
[0097] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A management system for the entire agricultural product industry chain based on big data and the Internet of Things, characterized in that, include: The industry chain data collection module collects agricultural product industry chain data and arranges it chronologically to form an industry chain sequence. The material chain construction module connects batch acceptance relationships based on the industrial chain sequence to form a direct material chain; The contact version module divides contact carrier units according to the industry chain sequence, arranges batch occupancy relationships along the contact path, sets candidate cleaning boundaries according to the cleaning process and establishes parent version relationships to form a contact version diagram sequence. The evolutionary analysis module integrates the contact version graph sequence into the improved EvolveGCN model, convolves the weight matrix according to the parent version relationship evolution graph, truncates the evolution at the candidate clean boundary, and re-evolves the successor weight matrix with the weight matrix before the boundary when the boundary is removed, thus forming the contact exposure state and the path to be reviewed. The sampling optimization module selects and sorts sampling locations along the path to be verified based on the contact exposure status using a snow melting optimization algorithm, controls the sampling of IoT terminals, and generates cleanliness verification data. The boundary correction module confirms or cancels candidate cleaning boundaries based on cleaning validation data, updates the parent version relationship, and feeds back to the evolution analysis module to form a corrected contact exposure status. The dual-chain traceability module traces affected agricultural product batches and associated contact carrier units based on the direct material chain and corrected contact exposure status. It stops contact exposure tracing upon confirming the clean boundary and generates traceability results. The management and control module issues control commands based on the traceability results to block the flow of agricultural products and the reuse of contact carriers within the traceability scope, thus forming the supply chain management results.
2. The agricultural product whole-industry chain management system based on big data and the Internet of Things as described in claim 1, characterized in that, The industry chain acquisition module specifically includes: Data is collected from the agricultural product supply chain through IoT terminals distributed across all stages of the supply chain, forming raw supply chain data. The occurrence time of the original supply chain data is corrected based on the time difference between the IoT terminal clock and the system clock to form synchronized supply chain data. Data from the agricultural product supply chain is collected and synchronized according to the actual sequence of agricultural product batches passing through the supply chain links. Within the same supply chain link, the data is arranged according to the corrected occurrence time, and delayed data is inserted into the corresponding time sequence position to form a supply chain sequence.
3. The agricultural product whole-industry chain management system based on big data and the Internet of Things as described in claim 1, characterized in that, The material chain construction module specifically includes: Extract the batch transfer time and batch receiving time of adjacent circulation links along the industrial chain sequence, and match the preceding batch and the receiving batch according to the material flow direction and time period; Compare the outgoing and incoming quantities of each pairing batch, determine the actual receiving quantity based on the smaller of the two quantities, deduct the actual receiving quantity from the remaining quantities at both ends, and continue pairing unallocated materials. Connect the preceding batches and the receiving batches according to the actual volume received and the material flow direction, and retain the corresponding connections when the batches are split or aggregated to form a direct material chain.
4. The agricultural product whole-industry chain management system based on big data and the Internet of Things as described in claim 1, characterized in that, The contact version module specifically includes: Based on the actual coverage area of a single cleaning operation, the carriers that come into contact with agricultural products are divided into contact carrier units; Arrange the times when batches enter and leave the contact carrier unit in chronological order to form a batch occupancy relationship, and connect the contact path according to the actual transfer of the batches; Candidate cleaning boundaries are set at the end of the cleaning operation, and the batch occupancy of contact carrier units before and after the boundary is assigned to different contact versions. A contact version graph is established with the contact carrier unit as the node, the actual contact path as the edge, and the batch occupancy relationship as the node feature. Only the contact versions before and after that do not cross the candidate cleaning boundary are connected to form the parent version relationship and the contact version graph sequence.
5. The agricultural product whole-industry chain management system based on big data and the Internet of Things as described in claim 1, characterized in that, The improved EvolveGCN model includes multiple evolutionary graph convolutional units connected in a graph convolutional hierarchy: Each evolutionary graph convolutional unit includes a gated recurrent unit and a graph convolutional unit; The gated recurrent unit includes an update gate and a reset gate, and has candidate hidden states. The hidden state of the gated recurrent unit is the graph convolution weight matrix of the corresponding graph convolution unit.
6. The agricultural product whole-industry chain management system based on big data and the Internet of Things according to claim 1, characterized in that, The evolutionary analysis module specifically includes: Each contact version graph shares the gating parameters of each layer of the gating loop unit, saves the convolution weight matrix of each layer of the graph in each contact version graph, and inputs the node embedding of the current contact version graph into the gating loop unit after summarizing it. The parent version graph of the currently accessed version graph is located according to the parent version relationship. The convolution weight matrix of the graph at the same level as the parent version graph is used as the previous hidden state of the gated recurrent unit. When there is no parent version graph, the convolution weight matrix of the corresponding initial graph is used. The gated loop unit calculates the update gate, reset gate and candidate hidden states based on the summarized node embeddings and the previous hidden state, and generates the convolution weight matrix of the same layer graph of the current contact version graph. When the candidate clean boundary is reached, the hidden state of each layer of the first contact version graph after the boundary is switched to the convolution weight matrix of the corresponding layer's initial graph. When a candidate clean boundary is withdrawn, the hidden state of each layer of the first contact version graph after the boundary is switched to the convolution weight matrix of the same layer of the contact version graph before the boundary. Mark the graph convolution weight matrix generated after the boundary based on the original parent version relationship as invalid. Starting from the first contact version graph after the boundary, select the same layer weight matrix of the parent version graph according to the updated parent version relationship and re-evolve until the current contact version graph or the next confirmed clean boundary. Graph convolution is performed using an effective graph convolution weight matrix. Based on the graph convolution output, batches of shared contact carrier units or continuous contact paths within the same contact version are identified. Candidate clean boundary associated paths are determined as paths to be reviewed, thus forming a contact exposure state.
7. The agricultural product whole-industry chain management system based on big data and the Internet of Things as described in claim 1, characterized in that, The sampling optimization module specifically includes: Extract the contact carrier unit along the path to be verified, filter candidate sampling locations based on the installation location and sampling range of the IoT terminal, and record the path to be verified corresponding to each candidate sampling location; The candidate sampling locations and sampling order are encoded as individuals in the snow ablation optimization algorithm population. The fitness of the individuals is calculated using the number of paths to be verified as a positive indicator and the number of sampling locations and the length of the sampling path as negative indicators. Iterate each individual according to the population update method of the snow melting optimization algorithm, select the individual with the best fitness within the single sampling capability of the IoT terminal, and decode to obtain the sampling position and sampling order; The IoT terminal is controlled to perform sampling in the sampling order, and the sampling and detection results are associated with the candidate clean boundaries corresponding to the candidate sampling locations to form clean verification data.
8. The agricultural product whole-industry chain management system based on big data and the Internet of Things according to claim 1, characterized in that, The boundary correction module specifically includes: Cleaning validation data are collected based on the correspondence between sampling locations and candidate cleaning boundaries, and each test result is compared with the pass limit of the corresponding test item. When all test results meet the corresponding pass limits, the candidate clean boundary is confirmed as the confirmed clean boundary, and the disconnection state between the contact versions before and after the boundary is retained; If the test results do not meet the corresponding pass limit, the candidate cleaning boundary is cancelled, the contact versions before and after the boundary are merged, and the parent version relationship between the contact version before the boundary and the first contact version after the boundary is restored. The contact version diagram sequence is updated according to the confirmed or revoked parent version relationship, and the affected contact version diagram is re-evolved by the evolution analysis module to form the corrected contact exposure state.
9. The agricultural product whole-industry chain management system based on big data and the Internet of Things according to claim 1, characterized in that, The dual-chain traceability module specifically includes: Agricultural product batches that share a common contact carrier unit or a continuous contact path are extracted from the corrected contact exposure state and used as the starting batch; Traverse the material flow along the direct material chain to determine the succession relationship of the initial batch and identify subsequent batches; Traverse associated batches along shared contact carrier units or continuous contact paths, stopping at the confirmed cleaning boundary when crossing contact versions; The process continues to traverse the direct material chain and contact path with new batches until no new batches are added. Duplicates are removed and associated contact carrier units are retained to form traceability results.
10. The agricultural product whole-industry chain management system based on big data and the Internet of Things according to claim 1, characterized in that, The management and control module specifically includes: The affected agricultural product batches and associated contact carrier units are extracted from the traceability results. The current circulation link of the batch is determined according to the industrial chain sequence, and the corresponding Internet of Things terminals for the batch and contact carrier unit are determined respectively. Set the circulation status of the affected agricultural product batches to locked, set the available status of the associated contact carrier units to disabled, and generate corresponding status switching instructions. Send a state switching command to the corresponding IoT execution terminal, receive the execution status returned by the terminal, and verify whether the execution status has reached the locked state or the disabled state; Record the target status and execution status of each batch of agricultural products and contact carrier unit to form supply chain management results.