Agricultural supply chain data analysis system and methods

By using knowledge graphs and federated learning in the agricultural supply chain, the challenges of cross-entity data fusion and prediction-decision-making were addressed, enabling high-precision demand forecasting and replenishment decisions, and enhancing the resilience and privacy protection of the supply chain.

CN121071933BActive Publication Date: 2026-03-13YUNNAN YUNCHUANG DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In multi-entity agricultural supply chains, existing technologies struggle to achieve cross-entity data fusion and prediction-decision-making, leading to inaccurate prediction models, delayed replenishment strategies, and potential store stockouts, warehouse backlogs, or cold chain losses. Furthermore, there are risks of data leakage and intellectual property disputes.

Method used

A knowledge graph semantic mapper is used to map encrypted features to a production-inventory-sales ternary framework. Federated learning is used to train a temporal graph neural network to generate global demand forecasts, and deep reinforcement learning is used to generate replenishment plans. Differential privacy and homomorphic encryption are combined for data processing to ensure privacy protection and model updates.

Benefits of technology

It enables secure integration and real-time forecasting of cross-entity data, enhances the resilience and accuracy of the supply chain, ensures the reliability and privacy protection of replenishment decisions, and reduces the risk of supply chain inefficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071933B_ABST
    Figure CN121071933B_ABST
Patent Text Reader

Abstract

This invention discloses an agricultural supply chain data analysis system and method, relating to the field of agricultural data security technology. Each entity first performs differential privacy perturbation and homomorphic encryption on production, inventory, and sales records before uploading them, and the platform constructs a data surface based on this. Then, a knowledge graph semantic mapper is invoked to map the encrypted features to a production-inventory-sales ternary framework and align the time index. On the semantically aligned data stream, a federated learning-trained temporal graph neural network is used to output a global demand forecast with confidence intervals. Based on this forecast, combined with inventory strategies, deep reinforcement learning is used to generate replenishment plans and priority lists for distribution. After execution by the entities, actual sales and other feedback are encrypted and uploaded again. The platform incrementally updates the knowledge graph and fine-tunes the model using meta-learning, while dynamically adjusting the privacy budget to improve supply chain resilience and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural data security technology, specifically to an agricultural supply chain data analysis system and method. Background Technology

[0002] With the rapid development of digital agriculture, cold chain logistics, and omnichannel retail, the supply chain for bulk and fresh commodities such as grains, oils, vegetables, fruits, and livestock from farm to table has been interconnected through IoT sensors, warehouse management systems, third-party logistics platforms, and integrated online and offline sales terminals, forming a real-time data flow covering field sensing, warehouse scheduling, transportation in transit, and retail clearance. However, because the data sources span multiple entities including farmers, processing enterprises, warehouse operators, logistics carriers, and retailers, the recording formats, granularity, and update frequencies are highly heterogeneous. Furthermore, the cross-domain transmission of commercially sensitive data has strict boundaries, leading to current mainstream practices either relying on coarse-grained manual aggregation, which struggles to support high-frequency forecasting and rapid replenishment, or collecting plaintext data through centralized cloud platforms, posing risks of data leakage and intellectual property disputes. Traditional demand forecasting often uses independent time-series models, neglecting the cross-entity inventory-sales coupling relationship; inventory replenishment still primarily relies on static safety stock or simple reorder points, failing to respond promptly to highly volatile and short-shelf-life commodities. Against this backdrop, the industry urgently needs an advanced analytics system that can eliminate data silos, improve prediction accuracy, and meet the requirements of privacy compliance and real-time decision-making.

[0003] Under conditions of multi-entity privacy restrictions, there is a lack of computationally achievable and semantically consistent real-time data fusion and prediction-decision-making mechanisms. Specifically, farmer-side production records, warehouse-side dynamic inventory, logistics-side transit status, and retail-side sales data have long been stored in their own isolated local databases. Even when shared through interfaces, it is difficult to form a unified semantic coordinate system at the platform level due to field naming conflicts, timestamp drift, and permission barriers. Directly uploading plaintext for joint modeling violates data sovereignty and confidentiality agreements. Once demand surges or logistics are disrupted, the platform cannot quickly and comprehensively grasp the true distribution of production, inventory, and sales, leading to inaccurate prediction models, delayed replenishment strategies, and potentially causing store stockouts, warehouse backlogs, or increased cold chain losses, thereby resulting in decreased supply chain efficiency and increased economic losses.

[0004] Solving this problem requires overcoming three major bottlenecks simultaneously: data availability under differential privacy-homomorphic encryption protection, cross-domain semantic mapping driven by knowledge graphs, and efficient training and real-time decision-making of distributed deep models. Existing technologies have not yet provided a complete and practical solution. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] To address the shortcomings of existing technologies, this invention provides an agricultural supply chain data analysis system and method. It invokes a knowledge graph semantic mapper to map encrypted features to a production-inventory-sales ternary framework and aligns them with time indices. On the semantically aligned data stream, federated learning is used to train a temporal graph neural network, outputting a global demand forecast with confidence intervals. Based on this forecast, combined with inventory strategies, deep reinforcement learning is employed to generate replenishment plans and priority lists for distribution. After the main system executes, actual sales and other feedback are encrypted and uploaded again. The platform incrementally updates the knowledge graph and fine-tunes the model using meta-learning, while dynamically adjusting the privacy budget to improve supply chain resilience and accuracy, thereby solving the technical problems described in the background section.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] The agricultural supply chain data analysis method includes: each entity applies differential privacy perturbation to local production records, inventory records, and sales records and homomorphically encrypts them to generate encrypted feature digests, and then uploads the encrypted feature digests to the platform to form a secure data surface;

[0010] The platform invokes a knowledge graph mapper to map the encrypted feature digest to a production-inventory-sales ternary semantic framework, and generates a cross-subject unified time index before outputting a semantically aligned data stream.

[0011] Federated learning is used to train a temporal graph neural network on the semantically aligned data stream, and coherent encryption of local gradients is used to calculate the global final demand prediction value and the corresponding prediction confidence interval.

[0012] Based on the global demand forecast and the forecast confidence interval, and combined with inventory strategy constraints, deep reinforcement learning is used to generate a replenishment plan and a replenishment priority list, which are then distributed to each entity for execution.

[0013] After each entity reports its actual sales and replenishment records, they are uploaded using differential privacy and homomorphic encryption. The platform then re-injects the feedback into the ternary semantic framework and triggers a fine-tuning of the demand prediction model weights to maintain parameter consistency.

[0014] Furthermore, each entity calculates the working condition sensitivity coefficient based on the normalized turnover rate, passenger flow elasticity, and operation frequency, and then determines the Laplace noise scale in conjunction with the preset privacy budget;

[0015] After injecting noise into the production records, inventory records, and sales records respectively, homomorphic encryption is performed to generate encrypted feature digests, thus completing edge-side differential privacy processing and encrypted encapsulation.

[0016] Furthermore, the endpoint routes the encrypted feature digest to the virtual channel by category identifier and sorts it in descending order by generation timestamp. It attaches the main digital signature and hash index to the uploaded message. After the platform verifies the validity of the digital signature, it writes the encrypted feature digest and the hash index into the overall index table of the secure data plane.

[0017] Furthermore, the platform uses the homomorphic polynomial factorization operator to split the encrypted feature summary into encrypted production components, encrypted inventory components, and encrypted sales components. It then calls the concept matching function to anchor the three components to the category nodes of the knowledge graph and generates a structured encrypted tensor through homomorphic external product projection.

[0018] Furthermore, the platform uses a Bayesian filtering joint estimation function to perform network delay and clock drift compensation on the timestamps of each subject. After generating a global time index vector, the structured encrypted tensor is written into the corresponding time slot. If the time slot already has a tensor, homomorphic weighted average fusion is performed according to the weights.

[0019] Furthermore, each subject inputs a local encrypted tensor into a parallel temporal convolution and a graph attention encoder. The convolution is used to extract the temporal trend, and the graph attention is used to distribute the cross-node influence. After concatenating the results to obtain a local implicit embedding matrix, a local encrypted gradient is generated through Monte Carlo reparameterization and differential privacy noise.

[0020] Furthermore, after verifying the legitimacy of digital signatures of many entities, homomorphic summation and homomorphic division are performed on the encryption gradients of each entity to obtain the average encryption gradient. Then, the average plaintext gradient is obtained by decryption in a secure sandbox, and the global parameter matrix is ​​updated with an adaptive learning rate.

[0021] Furthermore, the category risk harmonized demand is calculated according to the confidence level, and then combined with the real-time inventory vector, the target turnover days vector, and the unit change coefficient matrix, the replenishment quantity vector is obtained through element-by-element operation and non-negative truncation, which serves as the benchmark for the reinforcement learning strategy network action.

[0022] Furthermore, the reinforcement learning strategy network constructs a multi-objective reward function based on inventory shortage penalties, slow-moving penalties, and logistics costs. After calculating the action value using a dual network structure, it generates a replenishment priority list by sorting the comprehensive scores of benefit score, risk score, and timeliness score, and embeds a chain hash signature into each replenishment instruction.

[0023] Furthermore, after homomorphically encrypting the actual sales volume, inventory loss, and fulfillment delay, they are merged into a feedback ciphertext tensor according to the product category and time index. The platform performs a homomorphic difference operation on this tensor and the prediction tensor to obtain a difference tensor, and writes the difference tensor into the deviation slot in the ternary semantic framework.

[0024] Furthermore, the local bias loss is calculated based on the differential tensor and the incremental gradient is obtained. The global parameter matrix is ​​then fine-tuned with a few gradients at the meta-learning rate. Subsequently, the privacy budget is dynamically adjusted based on the curvature-weighted information utilization index, and the next round of differential perturbation parameters is simultaneously issued.

[0025] The agricultural supply chain data analysis system includes a privacy upload module, in which each entity applies differential privacy perturbation to local production records, inventory records, and sales records and generates encrypted feature digests using homomorphic encryption, and uploads the encrypted feature digests to the platform to form a secure data surface;

[0026] The semantic alignment module involves the platform calling a knowledge graph mapper to map the encrypted feature digest to a three-element semantic framework of production-inventory-sales, and then generating a cross-subject unified time index before outputting a semantic alignment data stream.

[0027] The federated prediction module trains a temporal graph neural network using federated learning on the semantically aligned data stream and aggregates homomorphic encrypted local gradients to obtain the global final demand prediction value and the corresponding prediction confidence interval.

[0028] The intelligent replenishment module, based on the global demand forecast and the forecast confidence interval, combined with inventory strategy constraints, uses deep reinforcement learning to generate a replenishment quantity plan and a replenishment priority list, and distributes them to each entity for execution.

[0029] The feedback fine-tuning module receives actual sales and replenishment records from each entity, which are then uploaded with differential privacy and homomorphic encryption. The platform re-injects the feedback into the ternary semantic framework and triggers a fine-tuning of the demand prediction model weights to maintain parameter consistency.

[0030] (III) Beneficial Effects

[0031] This invention provides an agricultural supply chain data analysis system and method, which has the following beneficial effects:

[0032] In the secure data layer, the production, inventory, and sales records of farmers, warehouses, and retailers are first differentially perturbed and then homomorphically encrypted. This is supplemented by category-based channel and time-based priority sorting, so that the platform can complete statistics and modeling by only seeing the encrypted text, thus both protecting business secrets and preserving full computability.

[0033] By using a knowledge graph semantic mapper to accurately embed encrypted features into the production-inventory-sales ternary framework, and using a Bayesian clock to synchronously generate a unified time index, heterogeneous ciphertexts from different stages can be concatenated into a global feature tensor in milliseconds, significantly reducing field ambiguity and temporal misalignment, and ensuring the quality and efficiency of subsequent model inputs.

[0034] Federated learning-driven temporal graph neural networks compute privacy gradients locally on each subject, and after secure aggregation on the platform, form a global demand prediction vector and prediction confidence interval. They also output interpretable risk labels with the help of deep evidence mechanisms, which significantly improves the ability to capture cross-category spatiotemporal correlations and the traceability of results compared to traditional independent temporal models.

[0035] The reinforcement learning strategy network uses risk-adjusted replenishment volume as a benchmark, searches for the long-term optimal action in a three-dimensional space of stockout penalty, slow-moving penalty, and logistics cost, outputs a replenishment priority list and binds it to a chain hash signature, so that replenishment decisions can simultaneously satisfy supply stability, inventory health and instruction tamper-proof, and build a new paradigm of highly linked decision-making and execution.

[0036] Incremental graphs write actual sales, losses, and fulfillment delays back into the ternary framework as deviation slots. Meta-learning fine-tunes the global parameter matrix with few gradients and automatically adjusts the privacy budget using curvature-weighted information utilization metrics. This ensures that the model can quickly absorb business dynamics while continuously protecting data privacy, achieving adaptive evolution of prediction, replenishment, and feedback closed loop. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the agricultural supply chain data analysis method of the present invention;

[0038] Figure 2 This is a schematic diagram of the agricultural supply chain data analysis system of the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] Please see Figure 1 This invention provides an agricultural supply chain data analysis method, including:

[0041] In a multi-entity coupled agricultural supply chain, data originates from IoT nodes in the field, passes through farmer management systems and warehousing scheduling platforms, and finally reaches retail sales terminals. Its form and granularity vary depending on the scenario. At the same time, data ownership and compliance boundaries separate these key records on local servers of different organizations, forming silos.

[0042] As prediction accuracy and replenishment efficiency increasingly rely on real-time, fine-grained data fusion, it is crucial to break down data silos while ensuring that the dual demands of all stakeholders regarding trade secrets and regulatory boundaries are not violated. The combined use of differential privacy and homomorphic encryption has proven in recent years to achieve a gradual balance between usability and controllability. However, for true implementation, a chain of processing details needs to be built around noise mechanisms, encrypted operators, index binding, and channel scheduling, and a secure data surface needs to be established for subsequent semantic fusion and model training.

[0043] Step 1: Without disclosing any reversible business details, perform differential perturbation, homomorphic encryption, and index binding on production records, inventory records, and sales records. This enables the platform to obtain a computable but unidentifiable encrypted feature summary, providing a unified and secure data input for subsequent semantic mapping and federated training.

[0044] Traditional approaches either implement coarse-grained aggregation locally, sacrificing the details needed for prediction, or directly upload the full dataset protected by a key, but face a sharp increase in regulatory and trust costs; neither is sustainable in the context of modern agriculture with ever-increasing production intensity. Therefore, differential privacy noise is introduced to disrupt the identifiability of individual records, while homomorphic encryption operators are used to maintain the computability of the digest, thus finding a balance between anonymization and usability.

[0045] First, step 101 completes the differential perturbation and encrypted state digest generation within each entity; then, step 102 uploads the ciphertext via a secure channel and labels each ciphertext with an unforgeable time-series index and hash signature. Since the index and signature are bound to the ciphertext, any subsequent modifications or omissions will be detected by the platform immediately, ensuring data integrity and providing one-to-one anchor points for the next step of the knowledge graph mapper.

[0046] Step 101: End-side differential perturbation and dense-state summary generation:

[0047] If the scale of differential privacy noise is determined solely by a fixed budget, there is a risk of excessive noise or information leakage due to crop seasonality, sales rhythm, and inventory fluctuations. Therefore, a disturbance intensity factor and a condition sensitivity coefficient are first generated based on local operating conditions. This coefficient is jointly determined by the frequency of farmers' operations, warehouse turnover rate, and retail customer flow elasticity; noise parameters are dynamically adjusted based on this to optimize privacy budgets. This synchronizes disturbances with business activity. A local feature matrix is ​​defined. for:

[0048] Among them, the production record matrix Inventory record matrix With sales record matrix After field alignment and numerical normalization, the features are aggregated into the same dimension by the feature generation function, and then Laplacian noise is injected to obtain a noisy feature summary. :

[0049] Where: production record matrix : Record the yield of each crop within a unit of time, and take values. Inventory record matrix : Records the current inventory level of the storage unit, with a value of Sales record matrix Records actual sales volume at the retail level, and sets values ​​accordingly. Local feature matrix The three types of records share a unified feature representation, with dimensions consistent with the work item category;

[0050] Operating condition sensitivity coefficient A positive real number obtained by combining operation frequency, turnover rate, and passenger flow elasticity, within a certain range. ;

[0051] Privacy Budget Differential privacy protection strength control factor, a positive real number; the smaller the value, the stronger the protection; Laplace distribution. Noise distribution with zero mean and scale parameter ; Summary of noise features : The feature matrix after injecting noise, used for subsequent encryption, with the same range as .

[0052] By dynamically adjusting the privacy budget And introduce the operating condition sensitivity coefficient This allows information utilization to change in sync with privacy needs, avoiding information gaps caused by static budgets and preventing data leaks due to budget redundancy during off-peak periods. This is achieved by obtaining a noisy feature summary. Then, the homomorphic encryption operator is called to encrypt it, and the ciphertext digest is output. :

[0053] To ensure the verifiability of the encrypted text's origin during the upload process, the local end generates a digital signature using its private key. :

[0054] Simultaneously calculate the hash index. :

[0055] Finally, a quadruple is formed on this end and enters the queue to be uploaded.

[0056] in, To generate a timestamp; This is a hash operation; Elliptic curve digital signature algorithm can be used;

[0057] Homomorphic encryption operator : An encryption function that preserves the computability of addition and multiplication; public key : A public key (string) issued by the platform or shared by various entities; ciphertext digest : Feature digest of homomorphic encryption, ciphertext field element.

[0058] Private key Each entity holds its own private key (a string); digital signature. : Using the private key to digest the ciphertext The result of the signature is a byte string; the hash index. The hash of the concatenated ciphertext digest and timestamp is a fixed-length string; the timestamp is... : The system time used to generate the ciphertext, in UTC format.

[0059] The homomorphic encryption platform can still perform linear operations on the received ciphertext; the hash index and signature work together to ensure both traceability and tamper prevention, providing a stable anchor point for subsequent time series index generation and semantic mapping.

[0060] Step 102: Secure channel upload and secure data plane construction;

[0061] When a four-tuple enters the message queue via the end-side scheduler, to improve the platform-side concurrent parsing efficiency, the batch tags need to be sorted according to the item category and the most recent timestamp priority strategy. The router first reads the category identifier from the hash index, then assigns it to the corresponding virtual channel, and then sorts it by timestamp. Joining the team from newest to oldest.

[0062] This sorting strategy ensures that encrypted text of the same category can be continuously decrypted on the platform side, reducing the overhead of key cache switching. Routing actions can be formalized as: a secure data plane queue. :

[0063] Wherein: mapping to category tags via hash prefixes. The function sorts the channels in descending order of timestamps. Secure data plane queue Where: Safe Data Plane Queue Category The encrypted text is an ordered collection for batch processing by the platform.

[0064] Category Labels : Derived from a hash prefix mapping, a positive integer; The function that maps hash indexes to category tags. Sorting operations; Sort by timestamp in descending order.

[0065] By using category-based channeling and prioritizing near-time methods, the platform can complete batch operations of the same category with a single key loading, reducing decryption latency and increasing throughput. The platform receives... Then, first verify that the signatory acknowledges the validity of the ciphertext, including:

[0066] ; then using hash index Use the key to digest the ciphertext. Attached to the security data plane master index table And generate a serial number Simultaneously record the uploader's identifier. :

[0067] In the formula: Digital signature verification function; Secure data plane general index table : The mapping structure from hash index to metadata; sequence number : An incrementing number generated internally by the platform; Upload subject identifier : The subject's unique identifier.

[0068] At this point, the platform has obtained encrypted, computable, and traceable data entities, laying the data foundation for semantic mapping in step two. Signature verification eliminates the risk of forgery, and index attachment ensures that all subsequent processing can directly locate the ciphertext through hashing, eliminating the need for repeated scanning and significantly reducing the index complexity of graph mapping and federated training.

[0069] Through the coordinated implementation of steps 101 and 102, this solution completes the transformation from the original business table to a secure data plane. Differential perturbation ensures that a single record cannot be reverse-engineered; homomorphic encryption allows the platform to perform linear operations in the ciphertext domain; the dual mechanism of signature and hashing makes the source, integrity, and order of data verifiable during transmission and storage; and the category-based channel and time-based near-time routing strategy significantly reduces decryption and indexing overhead.

[0070] Security Data Surface General Index Table The encrypted text has been precisely mapped into a unified numbering system, providing a reliable entry point for the knowledge graph semantic mapper in step two, and also preserving computational feasibility for the subsequent collaborative demand prediction model to call homomorphic operations.

[0071] In step one, the secure data plane has been formed into a ciphertext sequence with category-based channels and time proximity priority through differential perturbation and homomorphic encryption, and is included in the overall index table of the secure data plane. Middle record hash index Serial Number Upload main identifier and timestamp However, ciphertext and indexes alone are insufficient to drive subsequent collaborative demand prediction: the prediction model needs to understand which type of business entity these ciphertexts describe, at what time granularity they were generated, and how they interact with different batches of the same category or across entities. Therefore, the platform must, while ensuring the computability of the ciphertext, introduce domain knowledge to accurately semantically align the fields and generate a unified and traceable time-series index for all entities.

[0072] The knowledge graph semantic mapper plays this role—it uses a production-inventory-sales ternary semantic framework as its backbone, ontology reasoning, context embedding, and time synchronization as its core, and ultimately outputs a semantically aligned feature data stream that can be directly consumed by a temporal graph neural network. .

[0073] Step 2: While maintaining the irreversibility of the ciphertext, complete the synchronization of semantic annotation and time indexing of the ciphertext, and output a unified semantic alignment feature data stream. This lays a complete, coherent, and traceable data foundation for collaborative demand forecasting.

[0074] Encryption Feature Digest While fields can directly participate in homomorphic operations, they lose readability in the encrypted state. If used for model training without semantic mapping, the algorithm only obtains a black-box embedding, making it difficult to trace the cause of prediction errors and accepting domain knowledge constraints for correction. Therefore, an intermediary layer is needed that can perform field-concept alignment and output structured feature tensors in the encrypted state. Knowledge graphs provide an explicit structure of domain concepts, attributes, and relationships, while homomorphic operators support linear and polynomial operations on numerical values ​​in the encrypted domain. Combining the two allows for field annotation and tensor concatenation without decryption.

[0075] Meanwhile, timestamps generated by multiple entities suffer from network latency and local clock drift, and must be converted into a unified time index vector using a high-precision synchronization function. Otherwise, the three data points of production, inventory, and sales in the same period will be misaligned, affecting the accuracy of the forecast.

[0076] Step 201: First, read the overall index table of the secure data plane. , digest of encrypted features The encrypted field is split and aligned with the ontology concept; then, the encrypted values ​​are projected onto the concept embedding space through an embedding mapping function to obtain a structured encrypted tensor. Step 202, based on this, calls the time synchronizer to convert the timestamps of each subject into a global index vector. The data is then concatenated in a three-element order of production-inventory-sales to output a semantically aligned feature data stream. .

[0077] Step 201, Dense-state concept mapping and structured tensor generation:

[0078] Ciphertext digest in the secure data plane queue In a homomorphic domain, addition and multiplication are kept closed; therefore, homomorphic polynomial decomposition operators can be used to decompose the polynomials in a predefined field order. Decomposed into ternary components -- encrypted output components Encrypted inventory quantities Encrypted sales volume The formal expression is:

[0079] ;in, Use a ternary field mask; after splitting, use a hash index. In knowledge graph ontology Execute the concept matching function Initially identified as a category concept node .

[0080] Where: encrypted output component Homomorphic domain elements store noisy production data; encrypted inventory components. Homomorphic domain elements store noisy inventory data; encrypted sales components. Homomorphic field elements, storing noisy sales data; ternary field mask. A binary vector of length three, controlling the splitting order and the set of values. .

[0081] Concept matching function : A function that maps hash indices to ontology concept nodes; category concept nodes : Corresponding product categories The node entity.

[0082] By using homomorphic polynomial factorization operators to preserve dense-state operations, decryption can be avoided; initial concept localization provides anchor points for subsequent embedding mappings. To achieve numerical-concept coupling without decryption, homomorphic outer product operators are needed to project ternary components into the concept embedding space. First, the ontology nodes... The graph embedding function maps the data to concept embedding vectors. Then execute

[0083] ; Obtain the encryption feature embedding matrix In the formula: graph embedding vector Real vector, dimension This indicates the topological semantic position and scope of the category concept. Encryption feature embedding matrix Homomorphic matrix, size Each of the three components stores its dense projection in the concept space; the homomorphic outer product operator... Operators that perform numerical-conceptual extrapolation while preserving the dense state.

[0084] Thus, by mapping ternary values ​​into the semantic space through outer product projection, a high-dimensional dense-state coordinate system is established for subsequent unified tensor concatenation. Encrypted features are then embedded into the matrix. Concatenate row vectors and then pass them through a commutative homomorphic permutation operator. Forming a three-dimensional encrypted tensor ,in: Wherein: the first dimension is fixed as The second dimension is the concept embedding dimension. The third dimension is the main serial number. .

[0085] Where: Structured encryption tensor :size Storage categories ternary embedding; commutative homomorphic permutation operator Operators that rearrange matrix dimensions while preserving homomorphism; Indicates output or production volume. Indicates inventory quantity. This represents the sales volume; thus, the sparse and dense text is projected into a structured tensor, preparing the form for time index synchronization and tensor splicing.

[0086] Step 202: Time Index Synchronization and Semantic Alignment Feature Data Stream Output: Multi-Subject Local Timestamps Due to network latency and hardware discrepancies, alignment with the platform's reference clock is required. The offset-jitter joint estimation function is adopted. Calculate the global time index vector: ; Where: network latency Upload latency, real number, in seconds; local clock offset. Time difference with NTP, real number, unit: seconds; global time index vector Aligned integer sequence used for sorting tensors.

[0087] Offset-Jitter Joint Estimation Function First, the round-trip delay of the uploaded packet is measured and half of it is taken as the instantaneous network offset. Then, Kalman filtering is used to continuously estimate the chronic drift of the device clock relative to the platform clock. Each time a data packet is received, the original timestamp is subtracted from the instantaneous network offset and the latest drift estimate to directly obtain a unified time index aligned with the platform clock, thereby eliminating both latency jitter and hardware clock drift.

[0088] Cross-subject time reference alignment is achieved through double-bias reduction, avoiding temporal misalignment. This is based on inserting a structured, encrypted tensor into the three-dimensional time tensor. : If a tensor already exists at the same time index, then a homomorphic weighted average is performed: Where: three-dimensional time tensor :size ; The current uploads are all of the same category. Same time index The newly generated structured encrypted tensor; The globally unified time index corrected by the offset-jitter joint estimation function; time approximation weights. : Real number, range of values The closer the time, the larger it is; homomorphic multiplication : Multiplication symbol for dense fields.

[0089] This ensures that tensors from multiple subjects within the same time slot can be merged without compromising density security. All category tensors are concatenated in ascending order of category labels to form the total feature tensor. : Simultaneously, a chain hash is generated on the platform side. : Using the chained hash as the latest chain port, the final output is... .

[0090] Where: Total characteristic tensor Store the ternary dense tensor of all categories and all time periods for use in step three.

[0091] Chain hash : The segmented hash result of the concatenated tensor sequence, byte string, Corresponding to the previous moment; This represents the total number of product categories currently managed by the platform. : Concatenate according to the third dimension operator, The starting value of the chained hash is a null or all-zero vector used as a sentinel node; The last hash value in the chain hash is used for integrity verification.

[0092] It should be noted that chained hashing ensures that the tensor sequence cannot be inserted or deleted. The total feature tensor serves as the input to federated learning, carrying the unified semantics and temporal coordinates required for subsequent gradient aggregation.

[0093] Step 2 transforms the ciphertext digest in the secure data plane into a semantically aligned feature data stream. In step 201, the operator is decomposed using a homomorphic polynomial. Accurately split the ciphertext fields and use the ontology matching function. With outer product projection operator Complete concept embedding to form a structured encrypted tensor Step 202 then uses the offset-jitter joint estimation function. Achieve global time alignment and integrate multi-agent tensors into a traceable total feature tensor using homomorphic weighting and chained hashing. At this point, the three-dimensional information of production, inventory, and sales is firmly anchored on a unified semantic dimension and a unified time axis, providing a verifiable, complete, computable homomorphic, and interpretable semantic input foundation for the federated learning training of the temporal graph neural network in step three, thus ensuring the reliability and traceability of subsequent global demand forecasting.

[0094] In step two, the platform has output the global feature tensor of the semantic alignment feature data stream. Each entry is arranged using a production-inventory-sales tripartite semantics and indexed by a global time vector. Achieve cross-entity temporal alignment. Meanwhile, chained hashing... This provides an integrity verification entry point for all encrypted tensors, ensuring that any subsequent calculations can be traced back to the specific uploader and time period. Next, the system must transform this high-dimensional encrypted tensor into a statistical signal that can be used for precise demand prediction, without compromising privacy boundaries.

[0095] While traditional centralized models can achieve high accuracy, they violate compliance due to plaintext aggregation; purely distributed models fail to address structural fluctuations due to a lack of global perspective.

[0096] Step 3: Without disclosing any entity's private details, generate a global demand prediction vector by training a time-series graph neural network in a federated manner. and prediction confidence interval This provides the replenishment decision-maker with high-precision input with uncertainty annotation.

[0097] Global feature tensor While possessing semantic consistency across subjects, it is difficult to directly input into deep learning models due to encryption; decrypting locally and then uploading gradients would lead to privacy leaks.

[0098] Step 301, Local Encryption Forward and Monte Carlo Gradient Estimation:

[0099] Each subject first starts from the global feature tensor According to local entity identification Extracting local tensors Within the homomorphic domain, a temporal convolution-graph attention parallel encoder is used. Generate local implicit embedding matrix : Wherein: local tensor Homomorphic tensor, size .

[0100] Adjacency Matrix Dimension , element range .

[0101] Encoder parameter matrix : The set of weights to be trained, initialized randomly.

[0102] Local implicit embedding matrix :size , To hide the dimension.

[0103] Implicit concatenation operator. The temporal convolution-graph attention parallel encoder function name is: first, a one-dimensional temporal convolution is used to extract local trends, then a graph attention network is used to capture the correlation between nodes of the same category, and finally the two features are concatenated in the hidden dimension to output the dense state embedding.

[0104] Adjacency Matrix The edge weights are automatically generated from the knowledge graph to reflect the category-temporal similarity between the subject and similar subjects. Inside the encoder, temporal convolution captures local trends, and the graph attention module adaptively allocates cross-node influence using dense-state weighting. The two are then connected in parallel and concatenated using a homomorphic channel splicing operator. confluence.

[0105] Through temporal-spatial parallel encoding, the model can capture the dynamic coupling between product categories locally, laying the representational foundation for gradient estimation. Due to implicit embedding... The system is still in a dense state, making direct gradient calculation infeasible; the proposed solution employs stochastic feature mapping. The reparameter technique makes the gradient explicit. Let the local prediction vector be... : ;in, For decoders, containing weights to be updated To estimate the gradient, a Gaussian approximation is applied to the output distribution, and a noise vector is introduced. To obtain reparameterized samples : L1 loss for locally reparameterized samples : ; Treatment of updated weights The gradient is calculated using the Monte Carlo average. : The gradient is then multiplied by the differential privacy noise matrix. And use homomorphic encryption operators Encapsulated as an encrypted gradient : In the formula: local prediction vector : Real number vector, length ; The random noise vector, taken from a Gaussian distribution with zero mean and unit variance, is used for reparameterization sampling; the prediction variance vector... : Characterizes the uncertainty at the corresponding time step, a positive real vector of the same length; ,Depend on Random sample prediction constructed with weighted variance term; historical observation vector : Previous window's actual sales volume, a real number vector; Monte Carlo sample size : Positive integer; The public key of the encryption system publicly disclosed by the platform is the public key in the homomorphic encryption algorithm; differential privacy noise matrix. Isomorphic to gradient, element range based on privacy budget; encrypted gradient. : Homomorphic matrix.

[0106] The reparameter technique transforms non-differentiable sampling into differentiable computation; homomorphic encapsulation and differential noise provide dual protection for gradient privacy, preparing for secure aggregation on the platform side.

[0107] Step 302, Safety Gradient Aggregation and Uncertainty Posterior Inference: The platform initiates the safety aggregation protocol. Encrypt gradient sets for all subjects Performing a dense-state summation yields the total encrypted gradient. : ; and based on the number of participating nodes Perform homomorphic division to obtain the average encryption gradient. : Then, the homomorphic decryption operator was used. Decrypt the average gradient in a secure environment to obtain the average plaintext gradient. Global parameter matrix Then, with an adaptive learning rate Perform the update and obtain the global model parameter matrix. : Where: Sum of encryption gradients Homomorphic matrix The number of entities that participated in uploading valid encryption gradients in this round; the average encryption gradient. Homomorphic domain matrix; average plaintext gradient :and Same shape, , Global model parameter matrix before round-fed aggregation; learning rate : No. The learning rate for each training round can be dynamically adjusted using an adaptive algorithm.

[0108] Homomorphic summation and decryption isolation ensure that no single-node gradient can be intercepted by the platform; average updates smooth out individual noise and improve the stability of the global model.

[0109] The updated model for the total feature tensor Perform a global forward pass to obtain the global prediction vector. To provide the uncertainty, a Deep Evidence Network (DEN) is introduced, treating the output as a Dirichlet evidence distribution, to estimate the posterior parameters. : Therefore, the posterior expectation at each time step can be obtained. With posterior variance : In the formula: Dirichlet parameter vector : Positive real vectors, same dimension Deep Evidence Network Based on existing Evidence estimator; posterior expectation Final demand forecast, real vector; posterior variance Prediction uncertainty, a positive real vector; : Vector summation, scalar.

[0110] Dirichlet-EvNet can naturally provide the squeeze-expansion distribution pattern, making replenishment strategies more robust under visible risks.

[0111] Steps 301 and 302 are used to transform the semantically aligned but still dense global feature tensor. This is transformed into detailed demand forecast results and confidence level annotations. Step 301 completes the time-series-graph joint embedding within each entity and generates irreversible encrypted gradients using Monte Carlo reparameter techniques and differential noise; Step 302 then uses a secure aggregation protocol... Summarize gradients and update the global parameter matrix. The global demand prediction vector is obtained by outputting the Dirichlet posterior using a deep evidence network. and prediction confidence interval The result can be directly input into the replenishment decision-maker in step four. Furthermore, because chained hashing and dense gradient aggregation are traceable and verifiable, it lays the foundation for parameter and index consistency for subsequent feedback and model fine-tuning.

[0112] After the first three steps, a global demand prediction vector has been obtained while protecting privacy. and its posterior variance The next key task is to transform this set of demand signals marked with uncertainty into executable replenishment instructions, and accordingly coordinate the order and quantity of resource allocation among farmers, warehouses, and retailers. Unlike traditional single-point reordering, agricultural commodities are characterized by short shelf life, high demand elasticity, and variable logistics routes. Relying solely on static safety stock rules can lead to stockouts during peak seasons and unsold inventory during off-seasons.

[0113] Step 4: Based on the combination of demand mean and confidence interval, a replenishment plan and priority list that conform to the inventory strategy constraints are generated through deep reinforcement learning, and distributed to each entity for execution in a chain signature manner.

[0114] Global demand prediction vector This represents the expected sales volume, while the prediction confidence interval is... This indicates the uncertainty of the prediction; if the posterior variance is ignored... In extreme cases, high-variance categories may still experience stockouts; excessive conservatism, on the other hand, can drive up inventory and write-offs. Therefore, step 401 first uses a combination of Conditional Value at Risk (CVaR-ES) to convert confidence intervals into risk harmonics, then combines this with the inventory baseline to calculate the replenishment quantity. Subsequently, the replenishment quantity is only a static quota; in a dynamic environment, it still needs to be finely arranged based on transportation resources, window periods, and competitive demand. Therefore, step 402 utilizes a deep reinforcement learning strategy network to scan the action space, outputting a multi-category replenishment priority queue with long-term overall returns as the objective, while simultaneously ensuring traceability of execution by binding instructions and predicted batches through chained hashing.

[0115] Step 401, Risk-Harmonized Replenishment Quantity Vector Calculation: To incorporate uncertainty into replenishment decisions, first define the risk-harmonized demand vector. For each category Set the reliability level Take the predicted distribution quantile Combined with expected sales Constructing risk reconciliation demand components : ; where CVaR measures tail risk and ES measures excess loss. To harmonize the weights.

[0116] Risk reconciliation needs Category The risk-adjusted demand is a positive real number.

[0117] Confidence level : Range of values , usually higher .

[0118] Conditional Value at Risk : at confidence level The conditional value of risk for forecasting sales is a positive real number.

[0119] Average surplus : Average excess loss at the same confidence level, a positive real number.

[0120] Harmonic weights : Non-negative real numbers, used to balance tail risk and mean deviation, to predict the average sales volume. The time-series graphical neural network provides the category for the current prediction period. Expected sales volume serves as the input basis for the risk measurement function. By combining CVaR with ES linearly, the model focuses on both extreme tail shortages and the systemic risk caused by mean drift, thereby maintaining a robust supply in highly volatile scenarios.

[0121] Let the current real-time inventory vector be... Target turnover days vector and the unit variation coefficient matrix (Including shelf life, market fluctuations, etc., after comprehensive consideration, the replenishment quantity vector) Take the closed-form solution: ;in Element-wise non-negative truncation; real-time inventory vector : Current available inventory for each product category, a non-negative real number vector; Target turnover days vector : The turnover target set by the strategy, a vector of positive real numbers; a matrix of unit variation coefficients. : Diagonal matrix, elements located at Control the sensitivity of replenishment.

[0122] Replenishment Quantity Vector The calculated quantity to be ordered is a non-negative real number vector. Hadamard element-wise multiplication; : A function that truncates negative values ​​to zero.

[0123] This maps risk-adjusted demand to specific order quantities, while considering existing inventory and turnover targets; unit variation coefficient matrix. Introduce category differences into the same linear framework to form the initial action benchmark for the subsequent strategy network.

[0124] Step 402: Deep reinforcement learning strategy selection and priority assignment, abstracting replenishment decisions into a Markov decision process. .

[0125] State vector Composed of inventory, in-transit quantity, demand forecast, and confidence level; action vector Based on the previous replenishment quantity vector Disturbance is generated.

[0126] The reward function incorporates three factors: stockout penalty. Penalties for unsold goods Logistics costs A dual-network Dueling-DQO architecture is constructed: the main network estimates state values, the dominant network focuses on action discrimination, and then multi-objective weighted summation and normalization are used to obtain a scalar Q-value, i.e. : In the formula: state vector :time The system state, a real vector; the action vector. :time Candidate replenishment actions, real vectors; value function : The network output that estimates the long-term value of a state, estimating the long-term discount benefit derived solely from the state under the current policy; The action value function, also known as the Q-value, is an overall long-term discounted return assessment of actions obtained by combining state value and action advantage after zero equilibrium. It is the direct objective function for strategy optimization; the advantage function... The network output that estimates the relative value of an action, measuring its value relative to the average action. In state Additional value; Variable index symbols represent sets of actions. All candidate actions are traversed one by one during the summation process, including the placeholder actions and the currently evaluated action. Each is independent; discount factor : Value Weighing the short-term and long-term benefits; : Cardinality of the action set, a positive integer.

[0127] By separating state values ​​and action advantages through the Dueling-DQO architecture, learning stability in sparse feedback scenarios is improved; multi-objective rewards take into account three costs, maximizing overall supply chain-level benefits. After training convergence, the policy network outputs the optimal action. For practical deployment, it is also necessary to consider the revenue score. Risk score With timeliness score A comprehensive score is obtained by combining all factors. : According to the overall score Replenishment priority list in descending order And embed a chain hash for each instruction. : The final output is a replenishment instruction package. To each entity.

[0128] in: list The Middle The specific replenishment instruction text or serialized object for each item includes execution information such as category number, order quantity, and deadline; Chain hashing in the 1st The cumulative hash value at the time of the instruction; The starting value for the chained hash; the profit score. Expected profit from action execution, real number; risk score. :based on Estimated inventory risk, real number; time factor : The score for the coupling of logistics window and shelf life, a real number; weight. : Non-negative, indicating priority.

[0129] Replenishment Priority List Category index based on overall score Sorted sequence; chain hash : Creates an immutable verification for the instruction sequence.

[0130] Multi-criteria scoring transforms the implicit Q-values ​​of the policy network into explicit rankings, making it easier for the business side to interpret; chained hashing ensures that instruction execution corresponds one-to-one with the prediction batch, allowing for traceability and supporting accountability at any time.

[0131] Step four involves a three-stage linkage process: risk-adjusted replenishment quantity calculation, reinforcement learning strategy selection, and multi-criteria ranking and distribution, to translate the predicted signal into executable instructions. Step 401 utilizes CVaR-ES to incorporate the prediction confidence interval into demand and solves the replenishment quantity vector in a closed-form manner. and a unit variation coefficient matrix Reflecting category differences; Step 402 uses a Dueling-DQO network in a Markov environment to find long-term optimization actions, then sorts them using a three-part metric of benefit-risk-timeliness, and outputs a replenishment priority list with chained hash signatures. The entire process organically couples statistical risk, inventory targets, and transportation constraints, which not only improves supply flexibility but also makes the decision-making logic transparent and traceable. It provides clear parameters and index interfaces for subsequent sales feedback and model fine-tuning, achieving a high degree of synergistic gain between technical features.

[0132] Replenishment Priority List It has been sent to the three parties of farmers, warehousing, and retail along with the chained hash signature. Each entity completes the actions of warehousing, shelving, and promotion based on this, and continuously generates multi-dimensional feedback such as actual sales data streams, inventory loss trajectories, and logistics fulfillment records during the execution process. If the information that actually occurs cannot be quickly, accurately, and semantically consistently returned to the platform, the prediction-decision system established in the previous four steps will deviate from the actual situation round by round; if the feedback is simply spliced back into the original training set, it is easy for the model to forget rare scenarios, resulting in a decline in robustness.

[0133] Step 5. On the premise of ensuring privacy and consistency, incrementally inject the execution feedback into the knowledge graph and quickly fine-tune the global parameter matrix through meta-learning , while dynamically adjusting the differential privacy budget , so as to maintain the long-term accuracy and stability of the prediction-decision-execution chain.

[0134] Execution feedback naturally has timeliness urgency and multi-source heterogeneity: the farmer side mainly generates three types of indicators: actual output - quality inspection grade - waste ratio; the warehousing side focuses on the time series vector of warehousing batches - temperature control curves - loss rates; the retail side outputs immediate sales volume - promotion amplitude - customer return records. Without unified semantic mapping, cross-subject data will be fragmented again; if the model is fully retrained each time, the training delay will be difficult to meet the business rhythm.

[0135] Step 501. Convergence of multi-channel feedback and incremental injection into the knowledge graph:

[0136] Each entity uses the same differential perturbation - homomorphic encryption strategy as in Step 1 to inject noise into the actual sales vector , loss matrix and fulfillment delay vector ; then enter the secure data plane queue according to the category-based channel and the time-closest-first strategy . After the platform receives the hash index , it performs signature verification and attaches it to the feedback index table , forming a ternary feedback ciphertext tensor , formal confluence: ; where: , homomorphic encryption operator, which takes plaintext data and the platform public key as input and outputs ciphertext that maintains computability; encrypts the data of each feedback path separately in the formula; , the unique identity identifier of the uploading entity, which can correspond to farmer, warehousing, or retail nodes, and is used by the platform to distinguish the data source, is the category index; actual sales vector : homomorphic domain ciphertext vector, with the same dimension as the prediction; loss matrix : homomorphic domain matrix, recording category - batch - loss rate; fulfillment delay vector Homomorphic field vectors, in hours; Feedback index table : A mapping structure from hash to metadata; feedback ciphertext tensor :size This is consistent with the predicted tensor structure.

[0137] : The commutative homomorphic permutation operator rearranges three ciphertext vectors or matrices of the same dimension in a predetermined order of production-inventory-sales and concatenates them into a three-dimensional tensor, while maintaining the homomorphic encryption property.

[0138] Maintaining isomorphism with the prediction tensor allows for direct dense-state differencing in subsequent bias calculations, reducing decryption risks and improving association efficiency. To integrate feedback into the knowledge graph, in the dense-state domain... Apply incremental mapping function Generate difference tensors : Then call the body alignment function. Difference tensors Write the bias slots into the production-inventory-sales ternary semantic framework and hash them. Write to chain hash The final output is an incremental map. .

[0139] Where: Incremental mapping function : A function for computing the feedback-prediction difference in the dense-state domain; difference tensor Homomorphic tensors, with the same size Deviation Groove: A newly created difference field in the ternary framework, used to record real-time deviations; Incremental Plot : Contains only the map fragments updated in this round, for quick reasoning; Element-wise difference operation in the homomorphic field For global time index;

[0140] Through difference tensors The prediction and feedback bias are separated from the bias slots, providing high-density gradient information for subsequent meta-learning fine-tuning, while avoiding a full rewrite of the graph.

[0141] Step 502: Fine-tuning of meta-learning weights and dynamic adjustment of privacy budget:

[0142] Using incremental maps Generate local deviation loss : The platform monitors local deviation losses in a safety sandbox. Homomorphic gradient estimation is performed to obtain the incremental gradient. Meta-learning Fast Adaptation (FAS) is used to update the candidate parameter matrix with few gradient fine-tuning. : Subsequently, a verification batch was used. Test the new weights and calculate the validation loss. ,like: Then, the candidate parameter matrix after minor gradient fine-tuning is accepted. Otherwise, return the result and reduce the learning rate.

[0143] Where: Local deviation loss : Dense-state L1 norm loss.

[0144] Incremental gradient : Isomorphic ; The current parameter matrix of the global model, including all weights and biases of the encoder, decoder and evidence network, is the baseline parameter of each subject that has been synchronized after federated training. The candidate parameter matrix, after minor gradient fine-tuning, is obtained by the incremental bias gradient of this round; it will only be formally replaced with the new global parameters after passing the validation loss test. Meta-learning rate. Positive real numbers, larger than the standard learning rate; validation loss. Plaintext field, calculated after decryption.

[0145] Threshold coefficient : Value The decision was made to update the acceptance criteria; Losses from the previous round of verification.

[0146] Fewer gradient updates reduce computational overhead, and validation thresholds prevent abrupt overfitting. Bias information directly influences parameters, enabling rapid adaptation. As the model converges through each iteration, excessive noise can smooth out incremental information, while insufficient noise can easily leak privacy. An information utilization metric is defined. : If the information utilization rate index threshold This indicates excessive noise; if the information utilization rate index threshold This could lead to leaks; the platform is updating its privacy budget. : And the updated privacy budget Distribute to all entities for use in the next round of differential perturbation.

[0147] Where: Information utilization rate index Real numbers, range Threshold Both satisfy .

[0148] New and old privacy budgets : Positive real number; adjustment coefficient Small positive numbers, generally not exceeding .

[0149] Dynamically adjust the privacy budget by quantifying the proportion of gradient information. It automatically maintains a privacy-availability balance in continuous iterations without human intervention.

[0150] Step 5 completes the full chain closure from execution feedback to model iteration. Step 501 uses the incremental tensor... The bias is precisely injected into the knowledge graph to provide structured error signals for model updates; step 502 first uses a meta-learning fast adaptation strategy to apply the global parameter matrix. Perform minimal gradient fine-tuning to enable the model to absorb the latest business dynamics with minimal computation, and then use information utilization metrics. Adaptive adjustment of privacy budget To maintain the effectiveness and compliance of differential perturbations.

[0151] Please see Figure 2 This invention provides an agricultural supply chain data analysis system, including:

[0152] The privacy upload module allows each entity to apply differential privacy perturbations and homomorphically encrypt local production records, inventory records, and sales records to generate encrypted feature digests, which are then uploaded to the platform to form a secure data surface.

[0153] The semantic alignment module involves the platform calling a knowledge graph mapper to map the encrypted feature digest to a three-element semantic framework of production-inventory-sales, and then generating a cross-subject unified time index before outputting a semantic alignment data stream.

[0154] The federated prediction module trains a temporal graph neural network using federated learning on the semantically aligned data stream and aggregates homomorphic encrypted local gradients to obtain the global final demand prediction value and the corresponding prediction confidence interval.

[0155] The intelligent replenishment module, based on the global demand forecast and the forecast confidence interval, combined with inventory strategy constraints, uses deep reinforcement learning to generate a replenishment quantity plan and a replenishment priority list, and distributes them to each entity for execution.

[0156] The feedback fine-tuning module receives actual sales and replenishment records from each entity, which are then uploaded with differential privacy and homomorphic encryption. The platform re-injects the feedback into the ternary semantic framework and triggers a fine-tuning of the demand prediction model weights to maintain parameter consistency.

[0157] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0158] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0160] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0161] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An agricultural supply chain data analysis method, characterized by: include, Each entity applies differential privacy perturbation and homomorphic encryption to local production records, inventory records, and sales records to generate encrypted feature digests, and uploads the encrypted feature digests to the platform to form a secure data surface; The platform invokes a knowledge graph mapper to map the encrypted feature digest to a production-inventory-sales ternary semantic framework, and generates a cross-subject unified time index before outputting a semantically aligned data stream. Federated learning is used to train a temporal graph neural network on the semantically aligned data stream, and the global demand prediction value and the corresponding prediction confidence interval are obtained by aggregating the local gradients of homomorphic encryption. Local Encryption Forward and Monte Carlo Gradient Estimation: Each agent first obtains data from the global feature tensor. According to local entity identification Extracting local tensors ; Safety gradient aggregation and uncertainty posterior inference: The updated model on the global feature tensor Perform a global forward pass to obtain the global prediction vector. To provide the uncertainty, a deep evidence network is introduced, treating the output as a Dirichlet evidence distribution, to estimate the posterior parameters. : Therefore, the posterior expectation at each time step can be obtained. With posterior variance : In the formula: Dirichlet parameter vector : Positive real vectors, same dimension Deep Evidence Network Based on existing Evidence estimator; posterior expectation Final demand forecast, real vector; posterior variance Prediction uncertainty, a positive real vector; Vector summation, scalar, Based on the global demand forecast and the forecast confidence interval, and combined with inventory strategy constraints, deep reinforcement learning is used to generate a replenishment plan and a replenishment priority list, which are then distributed to each entity for execution. After each entity reports its actual sales and replenishment records, these records are uploaded using differential privacy and homomorphic encryption. The platform then re-injects this feedback into the ternary semantic framework and triggers a fine-tuning of the demand forecasting model's weights to maintain parameter consistency. Specifically, actual sales volume, inventory loss, and fulfillment delays are homomorphically encrypted separately and then merged into a feedback ciphertext tensor based on category and time index. The platform performs a homomorphic difference operation on this tensor and the forecast tensor to obtain a differential tensor, which is then written into the deviation slot in the ternary semantic framework. Based on the differential tensor, the local deviation loss is calculated, and the incremental gradient is obtained. The global parameter matrix is ​​then fine-tuned with a few gradients using the meta-learning rate. Subsequently, the privacy budget is dynamically adjusted based on the curvature-weighted information utilization rate index, and the next round of differential perturbation parameters is simultaneously issued.

2. The agricultural supply chain data analysis method according to claim 1, characterized in that: Each entity calculates the working condition sensitivity coefficient based on the normalized turnover rate, passenger flow elasticity, and operation frequency, and then determines the Laplace noise scale in combination with the preset privacy budget; After injecting noise into the production records, inventory records, and sales records respectively, homomorphic encryption is performed to generate encrypted feature digests, thus completing edge-side differential privacy processing and encrypted encapsulation.

3. The agricultural supply chain data analysis method according to claim 2, characterized in that: On the client side, the encrypted feature digest is routed to the virtual channel by category identifier and sorted in descending order by generation timestamp. The main digital signature and hash index are attached to the uploaded message. After the platform verifies the validity of the digital signature, the encrypted feature digest and the hash index are written into the overall index table of the secure data plane.

4. The agricultural supply chain data analysis method according to claim 3, characterized in that: The platform uses the homomorphic multinomial factorization operator to split the encrypted feature summary into encrypted production components, encrypted inventory components, and encrypted sales components. It calls the concept matching function to anchor the three components to the category nodes of the knowledge graph and generates a structured encrypted tensor through homomorphic external product projection.

5. The agricultural supply chain data analysis method according to claim 4, characterized in that: The platform uses a Bayesian filtering joint estimation function to perform network delay and clock drift compensation on the timestamps of each subject. After generating a global time index vector, the structured encrypted tensor is written into the corresponding time slot. If the time slot already has a tensor, homomorphic weighted average fusion is performed according to the weight.

6. The agricultural supply chain data analysis method according to claim 5, characterized in that: Each subject inputs a local encrypted tensor into a parallel temporal convolution and a graph attention encoder. The convolution extracts the time trend and the graph attention distributes the cross-node influence. After concatenating the results to obtain a local implicit embedding matrix, a local encrypted gradient is generated through Monte Carlo reparameterization and differential privacy noise.

7. The agricultural supply chain data analysis method according to claim 6, characterized in that: After the digital signatures of some subjects are valid, homomorphic summation and homomorphic division are performed on the encryption gradients of each subject to obtain the average encryption gradient. Then, the average plaintext gradient is obtained by decryption in a secure sandbox, and the global parameter matrix is ​​updated with an adaptive learning rate.

8. The agricultural supply chain data analysis method according to claim 7, characterized in that: The category risk harmonized demand is calculated based on the confidence level, and then combined with the real-time inventory vector, the target turnover days vector, and the unit variation coefficient matrix, the replenishment quantity vector is obtained through element-by-element operation and non-negative truncation, which serves as the benchmark for the reinforcement learning strategy network action.

9. The agricultural supply chain data analysis method according to claim 8, characterized in that: The reinforcement learning strategy network constructs a multi-objective reward function based on inventory shortage penalties, slow-moving penalties, and logistics costs. After calculating the action value using a dual network structure, it generates a replenishment priority list by sorting the comprehensive scores of benefit score, risk score, and timeliness score, and embeds a chain hash signature into each replenishment instruction.

10. An agricultural supply chain data analysis system, using the analysis method described in any one of claims 1 to 9, characterized in that: include, The privacy upload module allows each entity to apply differential privacy perturbations and homomorphically encrypt local production records, inventory records, and sales records to generate encrypted feature digests, which are then uploaded to the platform to form a secure data surface. The semantic alignment module involves the platform calling a knowledge graph mapper to map the encrypted feature digest to a three-element semantic framework of production-inventory-sales, and then generating a cross-subject unified time index before outputting a semantic alignment data stream. The federated prediction module trains a temporal graph neural network using federated learning on the semantically aligned data stream and aggregates homomorphic encrypted local gradients to obtain the global final demand prediction value and the corresponding prediction confidence interval. The intelligent replenishment module, based on the global demand forecast and the forecast confidence interval, combined with inventory strategy constraints, uses deep reinforcement learning to generate a replenishment quantity plan and a replenishment priority list, and distributes them to each entity for execution. The feedback fine-tuning module receives actual sales and replenishment records from each entity, which are then uploaded with differential privacy and homomorphic encryption. The platform re-injects the feedback into the ternary semantic framework and triggers a fine-tuning of the demand prediction model weights to maintain parameter consistency.

Citation Information

Patent Citations

  • Simulation system intelligent decision-making method and system based on knowledge graph and federated learning

    CN120087794A

  • Real-time health risk prediction method and system based on dynamic knowledge graph

    CN120280136A