A supply chain database management method, system and medium
Patent Information
- Application Number
- CN202611104299.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]现有供应链数据库管理方式通常依赖中心化数据库或明文增量同步机制,各主体需要将本地数据库变更数据直接上传至中心平台,由中心平台统一进行更新和协调,在数据规模较小、主体数量较少时能够满足基本管理需求,但在多主体、高频变更和跨区域协同场景下,容易产生同步链路负载过高、上传窗口阻塞、迟到数据难以及时处理以及不同节点数据版本不一致的问题
(1)本发明能够降低重复字段、低价值变更字段和冗余同步记录的传输比例,使不同主体之间的数据库同步过程更适合高频、小批量、多节点并发更新的供应链业务场景。
Smart Images

Figure CN122904337A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of supply chain data technology, and in particular to a supply chain database management method, system, and medium. Background Technology
[0002] As supply chain operations evolve from single-enterprise internal management to collaborative management involving multiple entities such as suppliers, manufacturers, warehouse providers, logistics providers, and sellers, supply chain databases need to frequently synchronize order, inventory, logistics, batch traceability, and settlement change data among different entities.
[0003] Existing supply chain database management methods typically rely on centralized databases or plaintext incremental synchronization mechanisms. Each entity needs to directly upload changes to its local database to the central platform, which then performs unified updates and coordination. This can meet basic management needs when the data scale is small and the number of entities is limited. However, in scenarios involving multiple entities, high-frequency changes, and cross-regional collaboration, problems such as excessive load on the synchronization link, blocked upload windows, difficulty in processing late data in a timely manner, and inconsistent data versions at different nodes can easily arise.
[0004] Existing database synchronization methods do not adequately protect the privacy of supply chain participants. Sensitive data such as order quantity, inventory changes, transaction frequency, and logistics status are easily correlated and analyzed during transmission and aggregation, leading to the leakage of enterprise business information. Although existing encrypted synchronization schemes can improve data transmission security, they often struggle to simultaneously address encrypted data aggregation, synchronization node selection, bandwidth adaptive processing, and multi-round iterative feedback. This results in defects such as low encrypted processing efficiency, insufficient aggregation consistency, and imperfect delayed encrypted processing mechanisms in the cross-entity synchronization process of supply chain databases. Summary of the Invention
[0005] One objective of this invention is to propose a supply chain database management method that makes the database synchronization process between different entities more suitable for supply chain business scenarios involving high frequency, small batches, and multi-node concurrent updates.
[0006] A supply chain database management method according to an embodiment of the present invention includes: The original change data of the supply chain database is collected and the main update vector is calculated. The main update vector is then sparsified, quantized and batch-packaged according to an adaptive multi-scale coding strategy to form a multi-scale packaged update vector. The improved CKKS homomorphic encryption method is used to encrypt the multi-scale packaged update vector to generate the main encrypted incremental update ciphertext, and the supply chain database nodes hold the threshold key share. A supply chain synchronization node election model is constructed, the supply chain database nodes are grouped for privacy awareness, and synchronization nodes are elected. The main body encrypted incremental update ciphertext is uploaded to the synchronization node within the group through a multi-hop secure database synchronization link. The synchronization node maintains the upload window and receives the main body encrypted incremental update ciphertext. The synchronization node performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregated ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregated ciphertext according to the gating threshold. At the end of the merge window, the synchronization node repackages the supply chain aggregated ciphertext to form the synchronization node aggregated ciphertext, and uploads it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. The relay node performs bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio to generate multi-hop inter-layer ciphertext in the supply chain, and applies a dual-window asynchronous aggregation mechanism to process late-updated ciphertext during the upload process. The supply chain coordination server decrypts and aggregates encrypted text at the threshold, corrects and generates a global update, and sends feedback parameters to each supply chain database node to drive a new round of iteration, completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
[0007] Optionally, the step of sparsifying, quantizing, and batch-packing the main update vector according to an adaptive multi-scale coding strategy includes: Collect the original change data set from the supply chain database; Feature extraction or local model iteration is performed on the original change data set of the supply chain database to generate the main update vector; For each component of the main update vector, calculate the component importance index. When the absolute value of the component importance index is greater than or equal to the sparsification threshold, retain the corresponding component; otherwise, set the component to zero to form the main local incremental update vector. For each component in the local incremental update vector of the subject, an integer fixed-point quantization vector is obtained based on the current quantization step size of the supply chain database node; The fixed-point quantization vectors are batch-packaged according to the predetermined packaging granularity, and an index mapping is established between the packaged vectors and the node numbers of the supply chain database to obtain multi-scale packaged update vectors.
[0008] Optionally, the improved CKKS homomorphic encryption method includes: For the nth supply chain database node, the component order of the multi-scale packaged update vector is scrambled according to the privacy-aware slot position scrambling matrix to obtain the scrambled packaged vector. Construct the polynomial ring required for improved CKKS homomorphic encryption for each nth supply chain database node; Calculate the energy normalization index and privacy identifiability index based on the current remaining energy and privacy identifiability of the nth supply chain database node, and calculate the coding scale; The scrambled packaged vector of the nth supply chain database node is CKKS encoded, and the integer approximation is mapped to the slot of the polynomial ring using the encoding scale to generate the plaintext polynomial. An improved CKKS homomorphic encryption public key is used to encrypt the plaintext polynomial of the nth supply chain database node to generate the main body encrypted incremental update ciphertext; In the supply chain database node, the metadata triple is bound to the main encrypted incremental update ciphertext of the nth supply chain database node to form the metadata triple of the nth supply chain database node. Each supply chain database node holds a threshold key share, and a unique correspondence is established between the threshold key share and the supply chain database node number.
[0009] Optionally, the construction of the supply chain synchronization node election model includes: Each supply chain database node is assigned a multi-objective synchronization node election factor, including energy normalization index, link quality index, topology betweenness index, and privacy identifiability index, and the factors are weighted and summed to obtain a unified synchronization node evaluation function. The candidate node set for each group is compared according to the unified synchronization node evaluation function score, and the supply chain database node with the highest score within the receiving window is selected as the synchronization node for the current group. Each supply chain database node uploads the main encrypted incremental update ciphertext to its corresponding synchronization node using secure database synchronization communication within its group; Each synchronization node maintains an upload window to receive the main encrypted incremental update ciphertext uploaded by all member supply chain database nodes in its group, forming an upload set. During the upload process, the synchronization node timestamps the reception of each ciphertext record and calculates the upload delay. The ciphertexts in the upload set are sorted according to the reception timestamp. If the upload delay exceeds the maximum tolerable delay, the ciphertext is marked as late. Each synchronization node maintains a ciphertext status table, which records whether each member supply chain database node in the group has submitted ciphertext within the current upload window.
[0010] Optionally, the step of triggering a lightweight gated bootstrapping operation on the aggregated ciphertext of the supply chain according to a gate threshold includes: The encoding scale of all subject-specific incremental update ciphertexts in the uploaded set is uniformly processed, and the encoding scale with the smallest value among all encoding scales is selected as the target aggregation scale for this aggregation operation. For other ciphertexts with inconsistent encoding scales, homomorphic scaling and normalization processing is performed before aggregation. If the encoding scale of the ciphertext uploaded by a certain supply chain database node is larger than the target aggregation scale, the ciphertext is scaled. Homomorphic vector addition is performed on the main encrypted incremental update ciphertexts for all coding scales that have been unified to generate supply chain aggregate ciphertexts. Calculate the remaining noise budget of the current aggregated ciphertext and compare it with the system-set gating bootstrap threshold. If the remaining noise budget is less than the gating bootstrap threshold, a lightweight gating bootstrap operation is automatically triggered. When the bootstrap operation is triggered, the CKKS bootstrap process is executed on the aggregated ciphertext to obtain the refreshed supply chain aggregated ciphertext. If the bootstrapping operation is not triggered, the aggregated ciphertext is directly used as the dense-state aggregated output of the current group, and the aggregated ciphertext is bound to its aggregate scale, packing granularity and slot position scrambled matrix triplet to obtain the output structure of this aggregation.
[0011] Optionally, the synchronization node repackages the supply chain aggregate ciphertext at the end of the merge window, including: At the end of the merge window, each synchronization node repackages the supply chain aggregate ciphertext generated in its group. The encrypted data generated after repackaging is called the synchronization node aggregate ciphertext. The total number of slots in the ciphertext after repackaging is obtained by dividing the total number of slots in the ciphertext before repackaging by the repackaging factor and rounding the result up. Generate a repackaged metadata quadruple and bind the corresponding quadruple to the synchronization node's aggregated ciphertext to form the ciphertext package uploaded by the synchronization node. The synchronization node determines the target node for uploading the database synchronization link based on the current communication level. The synchronization node estimates the total amount of data and the required transmission time of the ciphertext to be uploaded based on the current link bandwidth budget and encoding scale. If the estimated transmission time is greater than the maximum transmission delay allowed by the link, the synchronization node automatically reduces the repackaging factor or adopts a polling delay sending mechanism. Under the condition of meeting the bandwidth and latency requirements, the synchronization node sends the uploaded encrypted packet to the upstream node through the multi-hop routing protocol, and records the upload timestamp, the number of hops traversed in the upload path and the acknowledgment response information for this upload. If the upstream node is a regional database node or a master database node, the node performs relay-level repackaging and aggregation of the received encrypted packets uploaded by multiple synchronization nodes to form a new relay-layer encrypted aggregated encrypted packet.
[0012] Optionally, the step of applying a dual-window asynchronous aggregation mechanism to process late-arriving encrypted state updates during the upload process includes: The relay node measures the instantaneous bandwidth budget and signal-to-noise ratio of the current uplink, and obtains the available load capacity by multiplying the bandwidth budget by the bandwidth efficiency function calculated based on the signal-to-noise ratio. For each received and uploaded encrypted packet, the relay node calculates the bandwidth adaptive repackaging factor; The relay node performs bandwidth adaptive repackaging of the aggregated ciphertext of each synchronization node in the ciphertext modulus field to obtain the repacked relay layer encrypted aggregated ciphertext. When the merge window of the relay node is closed, homomorphic vector addition is performed on the relay layer encrypted aggregate ciphertext that has been received and repackaged in the current upload window to generate the supply chain multi-hop inter-layer ciphertext. The relay node marks any uploaded encrypted packets that arrive after the upload window closes as late uploaded encrypted packets and moves them into the next upload window for further processing. The criterion for determining whether a encrypted packet is uploaded late is whether the difference between the received timestamp and the generated timestamp of the uploaded encrypted packet is greater than the maximum late threshold set by the system.
[0013] Optionally, the supply chain coordination server-side threshold decryption of aggregated ciphertext includes: The supply chain coordination server, in conjunction with multiple trusted entities, uses a threshold key system to perform threshold decryption on the ciphertext across multiple hops in the supply chain, obtaining the plaintext aggregation vector. Based on a non-independent, identically distributed deviation correction strategy, it generates a global model update vector. The supply chain coordination server adjusts the quantization step size and encoding scale for the next round based on decoding errors and communication quality feedback through a dynamic quantization step size feedback strategy, generating supply chain coordination server feedback control parameters. The supply chain coordination server then sends the global model update vector and the supply chain coordination server feedback control parameters to the synchronization node, which in turn forwards them to the supply chain database node. The supply chain database node updates its end-side encoding parameters based on the supply chain coordination server feedback control parameters and enters the next round of end-side local model iteration.
[0014] A supply chain database management system, comprising: The acquisition module is used to collect the original change data of the supply chain database and calculate the main update vector. The main update vector is processed according to the adaptive multi-scale coding strategy to form a multi-scale packaged update vector. The encryption module is used to encrypt the multi-scale packing update vector based on the improved CKKS homomorphic encryption method to generate the main encrypted incremental update ciphertext. The grouping module is used to build a supply chain synchronization node election model, perform privacy-aware grouping of supply chain database nodes, elect synchronization nodes, and upload the main encrypted incremental update ciphertext to the synchronization node within the group through a multi-hop secure database synchronization link. The aggregation module is used to enable the synchronization node to maintain the upload window and receive the main encrypted incremental update ciphertext. It performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregate ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregate ciphertext according to the gating threshold. The upload module is used to enable the synchronization node to repackage the supply chain aggregated ciphertext at the end of the merge window, forming the synchronization node aggregated ciphertext, and upload it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. The relay module enables relay nodes to perform bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio, generating multi-hop inter-layer ciphertext in the supply chain. The coordination module is used to enable the supply chain coordination server to decrypt and aggregate encrypted text at the threshold, correct and generate a global update, and send feedback parameters to each supply chain database node to drive a new round of iteration, thereby completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
[0015] A readable storage medium, characterized in that a program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, the steps of the method of the present invention are implemented.
[0016] The beneficial effects of this invention are: (1) The present invention can reduce the transmission ratio of duplicate fields, low-value change fields and redundant synchronization records, making the database synchronization process between different entities more suitable for supply chain business scenarios with high frequency, small batch and multi-node concurrent updates.
[0017] (2) This invention improves the CKKS homomorphic encryption method, the privacy-aware slot position scrambling matrix, and the homomorphic vector addition processing of the supply chain aggregated ciphertext. This enables multi-entity supply chain databases to complete ciphertext incremental aggregation without exposing the original change data of the entities. This solves the problem that sensitive business data in traditional supply chain database synchronization is easily correlated and analyzed by the central platform or intermediate nodes. It allows information such as changes in order quantity, inventory change trends, logistics status increments, and business update intensity to participate in aggregation in ciphertext form, reducing the possibility of intermediate synchronization nodes obtaining details of business changes of a single entity. At the same time, the supply chain aggregated ciphertext triggers a lightweight gated bootstrap operation according to the gate threshold. When the noise budget is insufficient, the CKKS bootstrap process is executed on the aggregated ciphertext to avoid the continuous accumulation of noise in the ciphertext after multiple rounds of homomorphic addition, which leads to an increase in decryption error. This improves the sustainable iteration capability of the ciphertext incremental synchronization process and the stability of the aggregation result.
[0018] (3) This invention marks the late-uploaded encrypted packet as a dual-window asynchronous aggregation mechanism and moves it to the next round of upload window for continued processing, avoiding the blockage of the entire round of synchronization by the late update of a single supply chain database node. This mechanism enables multi-entity supply chain databases to continuously complete encrypted incremental synchronization under asynchronous upload, link fluctuations and changes in the load of group nodes, and adjusts the next round of quantization step size and encoding scale through the feedback control parameters of the supply chain coordination server, forming an iterative synchronization parameter feedback closed loop. Attached Figure Description
[0019] 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 flowchart of a supply chain database management method proposed in this invention; Figure 2 This is a diagram showing the topology and synchronization link of the multi-entity supply chain database nodes in Embodiment 4 of a supply chain database management method, system and medium proposed in this invention. Detailed Implementation
[0020] Example 1: Reference Figure 1 A supply chain database management method, comprising: The original change data of the supply chain database is collected and the main update vector is calculated. The main update vector is then sparsified, quantized and batch-packaged according to an adaptive multi-scale coding strategy to form a multi-scale packaged update vector. In this embodiment, the main update vector is sparsified, quantized, and batch-packed according to an adaptive multi-scale coding strategy, including: Collect the original change data set from the supply chain database; Feature extraction or local model iteration is performed on the original change data set of the supply chain database to generate the main update vector; The main update vector is an array of floating-point values trained by the supply chain database nodes based on local data.
[0021] For each component of the main update vector, calculate the component importance index. When the absolute value of the component importance index is greater than or equal to the sparsification threshold, retain the corresponding component; otherwise, set the component to zero to form the main local incremental update vector. The component importance index is the importance assessment value of the component, and the importance index of each component is compared with the sparsity threshold adaptively set by the supply chain database node. The value of the unretained component in the main local incremental update vector is zero, and the value of the retained component is the same as the original floating-point component.
[0022] For each component in the local incremental update vector of the subject, an integer fixed-point quantization vector is obtained based on the current quantization step size of the supply chain database node; In Example 1, for each component in the local incremental update vector of the subject, the quotient obtained by dividing the value of the component by the quantization step size of the current quantization step size of the supply chain database node is rounded to obtain an integer fixed-point quantization component. Each integer fixed-point quantization component represents the dimensionless integer approximation value of the original floating-point component under the current quantization precision. All fixed-point quantization components together form a fixed-point quantization vector.
[0023] The fixed-point quantization vectors are batch-packaged according to the predetermined packaging granularity, and an index mapping is established between the packaged vectors and the node numbers of the supply chain database to obtain multi-scale packaged update vectors.
[0024] The batch packaging method combines several consecutive fixed-point quantized components into a group. Each group is linearly weighted and accumulated to form a batch packaged component. The weights in the linear weighted accumulation are set according to the CKKS encoding polynomial basis. Each batch packaged component can carry the information of multiple original fixed-point quantized components at the same time.
[0025] ; in, This indicates the packaging granularity selected by the nth supply chain database node, and represents the number of quantized components packaged in each batch. Let represent the packaging vector of the nth supply chain database node, and let represent the component combination after batch packaging. This represents the i-th batch packaging unit. The total number of components in the main update vector is equal to the total number of parameters for each node participating in the federated update. This represents the j-th quantized component packaged in the i-th packaging unit of the n-th supply chain database node. Indicates the polynomial base used in CKKS encoding. This indicates the total number of packaged units generated after batch packaging. This represents the function for rounding up.
[0026] The multi-scale packing update vector is formed by combining the packing vector of each supply chain database node with its corresponding supply chain database node number.
[0027] The improved CKKS homomorphic encryption method is used to encrypt the multi-scale packaged update vector to generate the main encrypted incremental update ciphertext, and the supply chain database nodes hold the threshold key share. In this embodiment, the CKKS homomorphic encryption method is improved, including: For the nth supply chain database node, the component order of the multi-scale packaged update vector is scrambled according to the privacy-aware slot position scrambling matrix to obtain the scrambled packaged vector. The multi-scale packing update vector of the nth supply chain database node is used as the local encrypted upload content of the nth supply chain database node in this round, and the number of components corresponds one-to-one with the packing granularity adopted by the nth supply chain database node; the privacy-aware slot position scrambling matrix is a binary permutation matrix containing only 0 or 1, and its order is equal to the total number of components of the multi-scale packing update vector of the nth supply chain database node. Each component of the scrambled packing vector corresponds uniquely to the component of the original packing vector.
[0028] Construct the polynomial ring required for improved CKKS homomorphic encryption for each nth supply chain database node; The modulus in the polynomial ring is equal to the product of all moduli in the ciphertext modulus chain adaptively set by the node, and the order of the polynomial is consistent with the total number of components generated after the multi-scale packing update vector of the nth supply chain database node is batch packed.
[0029] ; in, Indicates the first The improved CKKS homomorphic cryptographic polynomial ring used by each supply chain database node is represented as a modular polynomial. The polynomial ring is the underlying algebraic structure for both CKKS ciphertext and plaintext. Modulus The set of integers is the range of values for the coefficients of the polynomial. Indicates the first The ciphertext modulus chain selected by each supply chain database node is the product of all hierarchical small moduli, used to control the value range and security of the ciphertext. Indicates the first The first encrypted modular chain of the supply chain database node A small module, Indicates the first The order of the polynomial module of each supply chain database node controls the highest degree of the CKKS polynomial ring. Represents a polynomial variable. Represents the polynomial variable X Power of 1.
[0030] Calculate the energy normalization index and privacy identifiability index based on the current remaining energy and privacy identifiability of the nth supply chain database node, and calculate the coding scale; ; in, Indicates the first The encoding scale of each node in the supply chain database directly determines the proportional relationship between the unencrypted value and the coefficients of the plaintext polynomial. Indicates the system's reference scale. Indicates the first Energy normalization index of each supply chain database node Indicates the first The privacy identifiability metric for each node in the supply chain database indicates the degree of risk that the node may be analyzed or identified externally. This represents the adjustment coefficient.
[0031] The scrambled packaged vector of the nth supply chain database node is CKKS encoded, and the integer approximation is mapped to the slot of the polynomial ring using the encoding scale to generate the plaintext polynomial. In Example 1, each integer approximation value in the scrambled packaged vector is numerically scaled according to the encoding scale set by the supply chain database node. Each integer approximation value multiplied by the encoding scale is used as a slot coefficient of the polynomial ring and filled into the polynomial plaintext. All components are filled into all available slots of the polynomial ring one by one according to the scrambling order after batch packaging. Unoccupied slots are set to zero to obtain the plaintext polynomial. The value of each slot is equal to the product of the integer approximation value corresponding to the slot and the encoding scale. The slot order maintains a one-to-one correspondence with the order of the components of the scrambled packaged vector.
[0032] An improved CKKS homomorphic encryption public key is used to encrypt the plaintext polynomial of the nth supply chain database node to generate the main body encrypted incremental update ciphertext;
[0033] in, For the first The CKKS encrypted update ciphertext generated by each supply chain database node consists of two parts: the main component and the auxiliary component of the ciphertext. Indicates the first Each supply chain database node improves the master component of the CKKS homomorphic encryption public key. Indicates the first Each supply chain database node improves the auxiliary component of the CKKS homomorphic encryption public key. Indicates the first The temporary random polynomial selected by each supply chain database node in this encryption operation provides semantic security. Indicates the first The introduction of a noise polynomial in the encryption operation of each supply chain database node enhances security. Indicates the first The plaintext polynomial obtained by CKKS encoding of each supply chain database node contains information about the scrambled packaged vectors, with slots corresponding to the original data.
[0034] In the supply chain database node, the metadata triple is bound to the main encrypted incremental update ciphertext of the nth supply chain database node to form the metadata triple of the nth supply chain database node. The metadata triple of the nth supply chain database node includes the encoding scale of the nth supply chain database node, the packaging granularity of the nth supply chain database node, and the slot position scrambling matrix of the nth supply chain database node. The three correspond one-to-one with the main encrypted incremental update ciphertext of the nth supply chain database node.
[0035] Each supply chain database node holds a threshold key share, and a unique correspondence is established between the threshold key share and the supply chain database node number.
[0036] The threshold key adopts a threshold system design with a threshold of t. In the federated aggregation decryption stage, the threshold key share of any t supply chain database nodes can uniquely recover the global decryption key. The structure and semantics of the threshold key share correspond one-to-one with the supply chain database node number.
[0037] A supply chain synchronization node election model is constructed, the supply chain database nodes are grouped for privacy awareness, and synchronization nodes are elected. The main body encrypted incremental update ciphertext is uploaded to the synchronization node within the group through a multi-hop secure database synchronization link. The synchronization node maintains the upload window and receives the main body encrypted incremental update ciphertext. In this embodiment, the construction of the supply chain synchronization node election model includes: Each supply chain database node is assigned a multi-objective synchronization node election factor, including energy normalization index, link quality index, topology betweenness index, and privacy identifiability index, and the factors are weighted and summed to obtain a unified synchronization node evaluation function. Set an energy normalization index for the supply chain database nodes to represent the proportion of the current remaining energy of the supply chain database nodes to their maximum power.
[0038] Set link quality indicators for supply chain database nodes.
[0039] A topological betweenness index is set for each node in the supply chain database to represent the criticality of information propagation within the current topology. The topological betweenness index is obtained by normalizing the betweenness centrality of the supply chain database node in the grouped subgraph.
[0040] Set a privacy identifiability index for supply chain database nodes to represent the probability that supply chain database nodes can be identified by traffic analysis, spectrum fingerprinting, or side-channel monitoring. The higher the privacy identifiability index value, the higher the privacy risk.
[0041] The unified synchronous node evaluation function is used to assign a comprehensive score to each supply chain database node.
[0042] The candidate node set for each group is compared according to the unified synchronization node evaluation function score, and the supply chain database node with the highest score within the receiving window is selected as the synchronization node for the current group. The node number of the synchronized supply chain database is the supply chain database node number with the highest score in the unified synchronization node evaluation function within the group.
[0043] Each supply chain database node uploads the main encrypted incremental update ciphertext to its corresponding synchronization node using secure database synchronization communication within its group; The upload path is dynamically selected through a multi-hop self-organizing routing protocol. When selecting the next hop neighbor node for each hop, the remaining energy of the current node and the link stability are taken into account. The path selection cost function is weighted according to the principle that the lower the remaining energy and the worse the link quality, the higher the cost. The neighbor node with the smallest path selection cost function value is selected as the next hop node.
[0044] Each synchronization node maintains an upload window to receive the main encrypted incremental update ciphertext uploaded by all member supply chain database nodes in its group, forming an upload set. The upload window is opened and closed based on a fixed time window or automatically closed after a certain number of packets are reached. When the upload window is closed, an intra-group aggregation is automatically triggered. Each uploaded encrypted message received by the synchronization node is stored together with its supply chain database node number and metadata triple. All triples form an upload set.
[0045] During the upload process, the synchronization node timestamps the reception of each ciphertext record and calculates the upload delay. The ciphertexts in the upload set are sorted according to the reception timestamp. If the upload delay exceeds the maximum tolerable delay, the ciphertext is marked as late. The upload delay is equal to the timestamp of the encrypted message received minus the time the encrypted message was generated.
[0046] Each synchronization node maintains a ciphertext status table, which records whether each member supply chain database node in the group has submitted ciphertext within the current upload window.
[0047] The encrypted status table is used to identify offline nodes, duplicate submission nodes, and late nodes, and to filter abnormal communication behavior before window aggregation.
[0048] The synchronization node performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregated ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregated ciphertext according to the gating threshold. In this embodiment, triggering a lightweight gating bootstrapping operation on the aggregated ciphertext of the supply chain according to a gating threshold includes: The encoding scale of all subject-specific incremental update ciphertexts in the uploaded set is uniformly processed, and the encoding scale with the smallest value among all encoding scales is selected as the target aggregation scale for this aggregation operation. For other ciphertexts with inconsistent encoding scales, homomorphic scaling and normalization processing is performed before aggregation. If the encoding scale of the ciphertext uploaded by a certain supply chain database node is larger than the target aggregation scale, the ciphertext is scaled. The scaling operation on the ciphertext specifically involves dividing the two components of the ciphertext by the ratio of the node encoding scale to the target aggregation scale. All scaling operations are performed within the ciphertext modulus domain, ensuring that the ciphertext values and structure are aligned with the values of the CKKS homomorphic addition.
[0049] Homomorphic vector addition is performed on the main encrypted incremental update ciphertexts for all coding scales that have been unified to generate supply chain aggregate ciphertexts. In Example 1, each main body encrypted incremental update ciphertext contains a main component and an auxiliary component. The aggregation process involves adding the main components of all main body encrypted incremental update ciphertexts in the uploaded set to obtain the main component of the aggregated ciphertext, and then adding the auxiliary components of all main body encrypted incremental update ciphertexts to obtain the auxiliary component of the aggregated ciphertext. The supply chain aggregated ciphertext is composed of the above main component and auxiliary component. The main component is used to carry the summation information of the encrypted states uploaded by all nodes, and the auxiliary component is used to ensure that the ciphertext structure of the homomorphic encryption operation remains consistent. The encoding scale, packaging structure and slot order of the aggregation result are consistent with the normalized member node ciphertext.
[0050] Calculate the remaining noise budget of the current aggregated ciphertext and compare it with the system-set gating bootstrap threshold. If the remaining noise budget is less than the gating bootstrap threshold, a lightweight gating bootstrap operation is automatically triggered. In Example 1, the noise budget remainder of the current aggregated ciphertext is calculated by the synchronization node based on the modulus chain length of the improved CKKS homomorphic encryption system, the encoding scale of the current aggregated ciphertext, the noise level of the ciphertext before aggregation, and the accumulated number of homomorphic operation rounds. The noise normalization level of the principal and auxiliary components of the aggregated ciphertext is calculated respectively, and the maximum number of homomorphic operation rounds that the aggregated ciphertext can support is obtained. The maximum number of operation rounds is multiplied by the noise growth unit consumed in each operation, and the remaining noise space is the noise budget remainder of the current aggregated ciphertext.
[0051] The gating bootstrap threshold is a safety redundancy limit set by the system based on its tolerance to ciphertext noise.
[0052] When the bootstrap operation is triggered, the CKKS bootstrap process is executed on the aggregated ciphertext to obtain the refreshed supply chain aggregated ciphertext. The refreshed supply chain aggregate ciphertext is completely consistent with the original ciphertext in terms of encoding structure, packaging format and slot order, but the noise budget is restored to the maximum limit set by the system, which can meet the noise security requirements of hierarchical transmission and homomorphic operation.
[0053] If the bootstrapping operation is not triggered, the aggregated ciphertext is directly used as the dense-state aggregated output of the current group, and the aggregated ciphertext is bound to its aggregate scale, packing granularity and slot position scrambled matrix triplet to obtain the output structure of this aggregation.
[0054] At the end of the merge window, the synchronization node repackages the supply chain aggregated ciphertext to form the synchronization node aggregated ciphertext, and uploads it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. In this embodiment, the synchronization node repackages the supply chain aggregated ciphertext at the end of the merging window, including: At the end of the merge window, each synchronization node repackages the supply chain aggregate ciphertext generated in its group. The encrypted data generated after repackaging is called the synchronization node aggregate ciphertext. Repackaging refers to merging several consecutive original slot components in the supply chain aggregate ciphertext of the current synchronization node into a new slot component. The specific number of components to be merged is determined by the repackaging factor. The repackaging operation is completed in the ciphertext modulus field and does not change the encoding scale of the aggregate ciphertext.
[0055] The total number of slots in the ciphertext after repackaging is obtained by dividing the total number of slots in the ciphertext before repackaging by the repackaging factor and rounding the result up. The purpose of the repackaging operation is to reduce redundancy in the physical transmission of each new slot, while ensuring that all original information is completely preserved.
[0056] Generate a repackaged metadata quadruple and bind the corresponding quadruple to the synchronization node's aggregated ciphertext to form the ciphertext package uploaded by the synchronization node. The repackaged metadata quadruple includes the encoding scale of the aggregated ciphertext, the actual packing granularity used after repackaging, the slot position scrambling matrix used after repackaging, and the repackaging factor. The repackaged metadata quadruple, together with the aggregated ciphertext of the synchronization node, is uploaded as a ciphertext package by the synchronization node.
[0057] The synchronization node determines the target node for uploading the database synchronization link based on the current communication level. The synchronization node estimates the total amount of data and the required transmission time of the ciphertext to be uploaded based on the current link bandwidth budget and encoding scale. If the estimated transmission time is greater than the maximum transmission delay allowed by the link, the synchronization node automatically reduces the repackaging factor or adopts a polling delay sending mechanism. The target nodes for uploading data in the database synchronization link include regional database nodes, master database nodes, or supply chain coordination server nodes; the amount of data uploaded in encrypted form is determined by the total number of slots in the encrypted form, the bit width required for each encrypted component, and the current link bandwidth budget.
[0058] ; in, This indicates the total number of slots for the ciphertext after repackaging. This represents the bit width of each ciphertext coefficient.
[0059] Under the condition of meeting the bandwidth and latency requirements, the synchronization node sends the uploaded encrypted packet to the upstream node through the multi-hop routing protocol, and records the upload timestamp, the number of hops traversed in the upload path and the acknowledgment response information for this upload. All upload path metadata is written to the local synchronization node status log table.
[0060] If the upstream node is a regional database node or a master database node, the node performs relay-level repackaging and aggregation of the received encrypted packets uploaded by multiple synchronization nodes to form a new relay-layer encrypted aggregated encrypted packet.
[0061] Relay-level repackaging aggregation refers to aggregating multiple synchronous node ciphertexts through homomorphic addition to form a new relay-layer encrypted aggregated ciphertext. The encoding scale and packaging granularity of the relay-layer encrypted aggregated ciphertext are dynamically adapted by the relay-layer link state, and the structure and parameters of the uploaded ciphertext packets generated by the relay layer are consistent with those of the synchronous node uploaded ciphertext packets.
[0062] The relay node performs bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio to generate multi-hop inter-layer ciphertext in the supply chain, and applies a dual-window asynchronous aggregation mechanism to process late-updated ciphertext during the upload process. In this embodiment, a dual-window asynchronous aggregation mechanism is applied during the upload process to handle late-updated encrypted text, including: The relay node measures the instantaneous bandwidth budget and signal-to-noise ratio of the current uplink, and obtains the available load capacity by multiplying the bandwidth budget by the bandwidth efficiency function calculated based on the signal-to-noise ratio. For each received and uploaded encrypted packet, the relay node calculates the bandwidth adaptive repackaging factor; ; in, For available load capacity, This represents the total number of slots for the repackaged ciphertext. To preset the duration of a single frame upload slot, The bandwidth-adaptive repackaging factor determines the new merging granularity of the packet when it is repackaged at the relay node.
[0063] The relay node performs bandwidth adaptive repackaging of the aggregated ciphertext of each synchronization node in the ciphertext modulus field to obtain the repacked relay layer encrypted aggregated ciphertext. After repackaging, the total number of slots is equal to the original total number of slots divided by the repackaging factor and rounded up. After repackaging, the encoding scale and slot position scrambling matrix of the relay layer dense-state aggregated ciphertext are consistent with the original ciphertext.
[0064] When the merge window of the relay node is closed, homomorphic vector addition is performed on the relay layer encrypted aggregate ciphertext that has been received and repackaged in the current upload window to generate the supply chain multi-hop inter-layer ciphertext. In Example 1, the main components of each repackaged encrypted aggregated ciphertext in the uploaded ciphertext packet set are added together to obtain the main component of the supply chain multi-hop inter-layer ciphertext; the auxiliary components of each repackaged encrypted aggregated ciphertext in the uploaded ciphertext packet set are added together to obtain the auxiliary component of the supply chain multi-hop inter-layer ciphertext; the supply chain multi-hop inter-layer ciphertext is composed of the main component and the auxiliary component. The main component carries the summation information of the repackaged encrypted main components of all uploaded packets, and the auxiliary component maintains the same homomorphic encryption structure. The output supply chain multi-hop inter-layer ciphertext has the same encoding scale, packaging structure and slot position scrambling matrix as all repackaged encrypted aggregated ciphertexts participating in the aggregation, and the encoding scale with the smallest value among all uploaded packets is used as the unified encoding scale of this aggregated ciphertext.
[0065] The relay node marks any uploaded encrypted packets that arrive after the upload window closes as late uploaded encrypted packets and moves them into the next upload window for further processing. The criterion for determining whether a encrypted packet is uploaded late is whether the difference between the received timestamp and the generated timestamp of the uploaded encrypted packet is greater than the maximum late threshold set by the system.
[0066] A relay node upload packet is generated, which includes the ciphertext of the supply chain multi-hop inter-layer, the encoding scale, the final packing granularity of the multi-hop inter-layer, the unified slot position scrambling matrix, and the maximum value among all bandwidth adaptive repackaging factors. The final packing granularity of the multi-hop inter-layer is the maximum value among the products of the actual packing granularity of all downstream synchronization nodes and the repackaging factor. The unified slot position scrambling matrix is obtained by recursively synthesizing the downstream matrix. The relay node upload packet, together with its routing metadata, is uploaded to the regional database node, the main database node, or the supply chain coordination server node through the synchronization link of the upper-level database, completing one iteration of the multi-hop inter-layer dense aggregation and dual-window asynchronous aggregation process.
[0067] The supply chain coordination server decrypts and aggregates encrypted text at the threshold, corrects and generates a global update, and sends feedback parameters to each supply chain database node to drive a new round of iteration, completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
[0068] In this embodiment, the supply chain coordination server-side threshold decryption of aggregated ciphertext includes: The supply chain coordination server, in conjunction with multiple trusted entities, uses a threshold key system to perform threshold decryption on the ciphertext across multiple hops in the supply chain, obtaining the plaintext aggregation vector. Based on a non-independent, identically distributed deviation correction strategy, it generates a global model update vector. The supply chain coordination server adjusts the quantization step size and encoding scale for the next round based on decoding errors and communication quality feedback through a dynamic quantization step size feedback strategy, generating supply chain coordination server feedback control parameters. The supply chain coordination server then sends the global model update vector and the supply chain coordination server feedback control parameters to the synchronization node, which in turn forwards them to the supply chain database node. The supply chain database node updates its end-side encoding parameters based on the supply chain coordination server feedback control parameters and enters the next round of end-side local model iteration.
[0069] Example 2: A supply chain database management system, comprising: The acquisition module is used to collect the original change data of the supply chain database and calculate the main update vector. The main update vector is processed according to the adaptive multi-scale coding strategy to form a multi-scale packaged update vector. The encryption module is used to encrypt the multi-scale packing update vector based on the improved CKKS homomorphic encryption method to generate the main encrypted incremental update ciphertext. The grouping module is used to build a supply chain synchronization node election model, perform privacy-aware grouping of supply chain database nodes, elect synchronization nodes, and upload the main encrypted incremental update ciphertext to the synchronization node within the group through a multi-hop secure database synchronization link. The aggregation module is used to enable the synchronization node to maintain the upload window and receive the main encrypted incremental update ciphertext. It performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregate ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregate ciphertext according to the gating threshold. The upload module is used to enable the synchronization node to repackage the supply chain aggregated ciphertext at the end of the merge window, forming the synchronization node aggregated ciphertext, and upload it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. The relay module enables relay nodes to perform bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio, generating multi-hop inter-layer ciphertext in the supply chain. The coordination module is used to enable the supply chain coordination server to decrypt and aggregate encrypted text at the threshold, correct and generate a global update, and send feedback parameters to each supply chain database node to drive a new round of iteration, thereby completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
[0070] Example 3: This example provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0071] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof, or any other form of computer-readable storage medium in the art.
[0072] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside within an application-specific integrated circuit (ASIC). In embodiments of the invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device.
[0073] Example 4: Reference Figure 2 The implementers applied this invention to a supply chain database collaboration scenario involving component suppliers, assembly entities, warehousing entities, logistics entities, and sales entities. Each entity maintains an independent local database containing order change tables, inventory change tables, batch traceability tables, logistics status tables, and settlement status tables. Entities do not wish to directly disclose their order quantities, inventory balances, outbound frequency, and settlement progress, but they need to maintain data consistency between the main database and each local database within a short synchronization cycle. The traditional approach is for each entity to upload its local incremental data to the central database in plaintext packets, which are then merged uniformly. However, during continuous business testing, the implementers found that when inventory deductions, order locks, and logistics status changes simultaneously at high frequencies, the central database's receiving queue frequently experiences backlogs. Delayed uploads from some logistics entities can also cause entire synchronization cycles to wait, resulting in a short-term discrepancy between the inventory displayed on the sales end and the actual inventory on the warehousing end.
[0074] During a continuous synchronization test cycle, the implementer connected to nine supply chain database nodes, designated N01 to N09. Before the test began, the implementer used seven historical synchronization batches as training samples, each containing approximately 15,000 to 22,000 original database change data entries. The training samples included 58,620 order change data entries, 78,940 inventory change data entries, 36,710 logistics status change data entries, 24,880 batch traceability change data entries, and 15,960 settlement status change data entries. Based on these training samples, the system statistically analyzed the change frequency, field repetition rate, and post-synchronization error of different fields, determining the default dimension of the main update vector to be 2048, the sparsity threshold for inventory nodes to be 0.0008, the sparsity threshold for order nodes to be 0.001, the sparsity threshold for logistics nodes to be 0.0012, the default quantization step size to be 0.0005, and the default packaging granularity to be 8.
[0075] In the training samples, a set of real-world replay data demonstrated the congestion problem inherent in traditional methods. Node N03 generated 214 order lock records within a certain synchronization batch, one of which had an anonymized order number "OD-5A92," corresponding to the material batch "BT-37K," with a locked quantity of 960 units. Node N06 subsequently generated 184 inventory freeze records, with the same batch of "BT-37K" also having a frozen quantity of 960 units. Node N09 generated 73 logistics task status change records, with the corresponding transportation status for this batch changing from "pending loading" to "scheduled." In the traditional method, these three types of plaintext records would form upload packets of 2.84MB, 3.17MB, and 1.09MB respectively, requiring the central database to wait for all three to arrive before merging the order, inventory, and logistics status. Historical replays showed that node N09's logistics upload packet was delayed by 236 seconds due to link congestion, causing a delay in updating the inventory status of this batch in the sales database. During this period, the sales end still displayed 960 units of available inventory. After using the method of this invention, the aforementioned order, inventory, and logistics changes are first mapped into main update vectors, where N03 forms a 2048-dimensional main update vector, retaining 613 valid components; N06 forms a 2048-dimensional main update vector, retaining 746 valid components; and N09 forms a 2048-dimensional main update vector, retaining 392 valid components. After sparsification, quantization, and batch packaging, the three form multi-scale packaged update vectors of 317KB, 386KB, and 204KB, respectively.
[0076] In the actual test batch, a total of 30,800 original database change records were generated across the nine supply chain database nodes. Node N01 generated 3020 raw material arrival records, with an original data size of 5.8MB; Node N02 generated 3348 component quality inspection and warehousing confirmation records, with an original data size of 6.1MB; Node N03 generated 4286 order lock and order release records, with an original data size of 9.4MB; Node N04 generated 2675 assembly task status change records, with an original data size of 4.9MB; Node N05 generated 2942 production scheduling and material occupancy records, with an original data size of 5.3MB; Node N06 generated 7315 inventory warehousing, outbound, frozen, and transfer records, with an original data size of 15.7MB; Node N07 generated 2419 batch traceability status change records, with an original data size of 4.6MB; Node N08 generated 1905 settlement and reconciliation status change records, with an original data size of 3.8MB; Node N09 generated 2890 logistics status change records, with an original data size of 5.1MB. Traditional methods require uploading a total of 60.7MB of plaintext incremental data. Using the method of this invention, each node first collects the original change data from the supply chain database and calculates the main update vector. Taking node N06 as an example, its inventory records contain a large number of duplicate storage location scan fields and status-maintaining fields. After calculating the component importance index, the system found that only 758 out of 2048 components had an absolute value greater than or equal to 0.0008, while the remaining 1290 components were set to zero, forming the main local incremental update vector. Subsequently, node N06 generates an integer fixed-point quantization vector based on a quantization step size of 0.0005, and forms 256 packaging units with a packaging granularity of 8, resulting in a multi-scale packaged update vector. The data volume is reduced from 15.7MB to 1.42MB.
[0077] During the encryption phase, node N06 scrambles the component order of the multi-scale packaged update vector according to the privacy-aware slot position scrambling matrix. Before scrambling, the components of inventory deduction, inventory freeze, and storage location change are distributed adjacently in the vector, posing a risk that intermediate nodes may infer the business status based on the slot order. After scrambling, the component order is rearranged into a slot arrangement that cannot directly correspond to business fields. Node N06 has an energy normalization index of 0.82, a privacy identifiability index of 0.27, and a calculated encoding scale of 0.00051. After completing CKKS encoding, node N06 generates the main encrypted incremental update ciphertext, which is 468KB in size, and binds the encoding scale, packaging granularity, and slot position scrambling matrix as metadata triples. The ciphertext size of the main body encrypted incremental update generated by node N01 is 336KB, the ciphertext size of the main body encrypted incremental update generated by node N02 is 352KB, the ciphertext size of the main body encrypted incremental update generated by node N03 is 391KB, the ciphertext size of the main body encrypted incremental update generated by node N04 is 301KB, the ciphertext size of the main body encrypted incremental update generated by node N05 is 318KB, the ciphertext size of the main body encrypted incremental update generated by node N07 is 279KB, the ciphertext size of the main body encrypted incremental update generated by node N08 is 226KB, and the ciphertext size of the main body encrypted incremental update generated by node N09 is 248KB. The total size of the main body encrypted incremental update ciphertext generated by the 9 nodes is 2919KB.
[0078] During the intra-group synchronization process, the system uses a privacy target cluster model to perform privacy-aware grouping of the nine supply chain database nodes. Nodes N01, N02, and N03 are assigned to the first group. Node N03 has a link quality index of 0.89, a topology betweenness index of 0.83, an energy normalization index of 0.80, a privacy identifiability index of 0.24, and a unified synchronization node evaluation function score of 0.806, which is higher than that of node N01 (0.752) and node N02 (0.779). Therefore, node N03 is selected as the synchronization node of the first group. Nodes N04, N05, and N06 are assigned to the second group. Node N06 has a link quality index of 0.91, a topology betweenness index of 0.86, an energy normalization index of 0.82, a privacy identifiability index of 0.27, and a unified synchronization node evaluation function score of 0.807, which is higher than that of node N04 (0.782) and node N05 (0.761). Therefore, node N06 is selected as the synchronization node for the second group. Nodes N07, N08, and N09 are assigned to the third group. Node N09 has a link quality index of 0.88, a topology betweenness index of 0.81, an energy normalization index of 0.78, a privacy identifiability index of 0.25, and a unified synchronization node evaluation function score of 0.794, which is higher than that of node N07 (0.736) and node N08 (0.748). Therefore, node N09 is selected as the synchronization node for the third group. The synchronization node receives the incremental update ciphertext of the main body within the group and records the receipt timestamp. During testing, the upload delay for node N01 was 42 seconds, for node N02 it was 57 seconds, for node N03 it was 61 seconds, for node N04 it was 48 seconds, for node N05 it was 66 seconds, for node N06 it was 58 seconds, for node N07 it was 73 seconds, and for node N08 it was 81 seconds. The ciphertext packet generated by node N09 arrived 236 seconds late, exceeding the maximum tolerable delay of 180 seconds. It was marked as late ciphertext and moved to the next upload window. Traditional methods, in the same data replay, cause an overall synchronization delay of 236 seconds due to waiting for the logistics packet from node N09. The method of this invention, however, has the synchronization node first aggregate the arrived ciphertext, and the ciphertext that has not yet arrived proceeds to the next round for processing, without blocking the generation of aggregated ciphertext in the current round of supply chain.
[0079] The synchronization node performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window. In the group containing node N06, the encoding scales of the three arrived ciphertexts are 0.00051, 0.00053, and 0.00049, respectively. The system selects 0.00049 as the target aggregation scale and performs homomorphic scaling and normalization on the other ciphertexts. After completing the homomorphic vector addition, the supply chain aggregated ciphertext is generated, with a size of 512KB. At this time, the system calculates that the noise budget remaining amount of the aggregated ciphertext is 16.2 bits, which is less than the gating bootstrap threshold of 18 bits. Therefore, a lightweight gating bootstrap operation is triggered, and the noise budget of the refreshed supply chain aggregated ciphertext is restored to 30.4 bits. The noise budget remaining amount of the group containing node N03 is 21.6 bits. Bootstrap is not triggered, and it is directly used as the encrypted aggregation output of the current cluster. Since node N09's own uploaded ciphertext packet was marked as late, this round first performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertexts already arrived at nodes N07 and N08 to generate the supply chain aggregated ciphertext for the third group. Then, node N09's late ciphertext is moved to the next round's upload window for further processing. This gating process ensures that only aggregated ciphertexts with insufficient noise budget enter the bootstrapping process, avoiding the additional computational overhead caused by fixed bootstrapping of all ciphertexts.
[0080] At the end of the merging window, the synchronization nodes repackage the supply chain aggregated ciphertext. Before repackaging, the total number of slots in the supply chain aggregated ciphertext of node N06 was 512, with a repackaging factor of 2. After repackaging, the total number of slots was 256, and the synchronization node aggregated ciphertext decreased from 512KB to 286KB. The supply chain aggregated ciphertext of node N03 decreased from 438KB to 249KB. The supply chain aggregated ciphertext of node N09, after excluding late ciphertext in this round, decreased from 312KB to 178KB. The relay node then measured the instantaneous uplink bandwidth budget as 2.1Mbps, the signal-to-noise ratio as 16.8dB, and calculated the available load capacity as 1.36MB based on the bandwidth efficiency function. For the received synchronization node aggregated ciphertext, the relay node calculated the bandwidth adaptive repackaging factor and performed repackaging and homomorphic vector addition within the ciphertext modulus domain, ultimately generating a 516KB supply chain multi-hop inter-layer ciphertext. The supply chain coordination server performs threshold decryption on the ciphertext across multiple hops in the supply chain, obtaining the plaintext aggregation vector for the supply chain coordination server. Based on decoding errors and communication quality feedback, it adjusts the quantization step size and encoding scale for the next round. In this round, the average decoding error for inventory components is 0.00021, and the average decoding error for order components is 0.00018, both below the acceptable error range corresponding to a quantization step size of 0.0005. The system maintains the quantization step size for order nodes unchanged, while adjusting the quantization step size for logistics nodes with larger link fluctuations from 0.0005 to 0.0006 for the next round.
[0081] Under the same data playback conditions, the implementer compared the traditional method with the method of this invention. The traditional method directly uploads plaintext incremental packets, with a total data upload volume of 60.7MB across 9 nodes. The average synchronization completion time is 184 seconds, and the maximum synchronization completion time is 412 seconds. Late data caused one complete blockage. Intermediate nodes can see all order quantities, inventory quantities, and logistics status fields. Using the method of this invention, the total encrypted incremental update data uploaded by the 9 nodes is 2919KB. After repackaging by the synchronization nodes and relay nodes, the final encrypted data volume entering the supply chain coordination server is 516KB. The average synchronization completion time is 46 seconds, and the maximum synchronization completion time is 97 seconds. There is one late encrypted packet upload, but it does not cause a complete blockage. The traditional method recorded 986 discrepancies between the available inventory in the sales database and the actual inventory in the warehouse database during the test batch, with the longest duration being 412 seconds. In the method of this invention, there were 141 discrepancies, with the longest duration being 97 seconds, and late encrypted packets were restored to consistency after being incorporated into the next upload window. The peak number of messages received by the central database queue in the traditional method was 9142, while the peak number of aggregated encrypted packets received by the supply chain coordination server in the method of this invention was 7.
[0082] The above description is only a preferred embodiment 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 supply chain database management method, characterized in that, include: The original change data of the supply chain database is collected and the main update vector is calculated. The main update vector is processed according to the adaptive multi-scale coding strategy to form a multi-scale packaged update vector. The improved CKKS homomorphic encryption method is used to encrypt the multi-scale packing update vector to generate the main body encrypted incremental update ciphertext. A supply chain synchronization node election model is constructed, the supply chain database nodes are grouped for privacy awareness, and synchronization nodes are elected. The main body encrypted incremental update ciphertext is uploaded to the synchronization node within the group through a multi-hop secure database synchronization link. The synchronization node maintains the upload window and receives the main body encrypted incremental update ciphertext. The synchronization node performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregated ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregated ciphertext according to the gating threshold. At the end of the merge window, the synchronization node repackages the supply chain aggregated ciphertext to form the synchronization node aggregated ciphertext, and uploads it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. The relay node performs bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio to generate multi-hop inter-layer ciphertext in the supply chain. The supply chain coordination server decrypts and aggregates encrypted text at the threshold, corrects and generates a global update, and sends feedback parameters to each supply chain database node to drive a new round of iteration, completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
2. The supply chain database management method according to claim 1, characterized in that, The process of sparsifying, quantizing, and batch-packing the main update vector according to an adaptive multi-scale coding strategy includes: Collect the original change data set from the supply chain database; Feature extraction or local model iteration is performed on the original change data set of the supply chain database to generate the main update vector; For each component of the main update vector, calculate the component importance index. When the absolute value of the component importance index is greater than or equal to the sparsification threshold, retain the corresponding component; otherwise, set the component to zero to form the main local incremental update vector. For each component in the local incremental update vector of the subject, an integer fixed-point quantization vector is obtained based on the current quantization step size of the supply chain database node; The fixed-point quantization vectors are batch-packaged according to the predetermined packaging granularity, and an index mapping is established between the packaged vectors and the node numbers of the supply chain database to obtain multi-scale packaged update vectors.
3. The supply chain database management method according to claim 1, characterized in that, The improved CKKS homomorphic encryption method includes: For the nth supply chain database node, the component order of the multi-scale packaged update vector is scrambled according to the privacy-aware slot position scrambling matrix to obtain the scrambled packaged vector. Construct the polynomial ring required for improved CKKS homomorphic encryption for each nth supply chain database node; Calculate the energy normalization index and privacy identifiability index based on the current remaining energy and privacy identifiability of the nth supply chain database node, and calculate the coding scale; The scrambled packaged vector of the nth supply chain database node is CKKS encoded, and the integer approximation is mapped to the slot of the polynomial ring using the encoding scale to generate the plaintext polynomial. An improved CKKS homomorphic encryption public key is used to encrypt the plaintext polynomial of the nth supply chain database node to generate the main body encrypted incremental update ciphertext; In the supply chain database node, the metadata triple is bound to the main encrypted incremental update ciphertext of the nth supply chain database node to form the metadata triple of the nth supply chain database node.
4. The supply chain database management method according to claim 1, characterized in that, The construction of the supply chain synchronization node election model includes: Each supply chain database node is assigned a multi-objective synchronization node election factor, including energy normalization index, link quality index, topology betweenness index, and privacy identifiability index, and the factors are weighted and summed to obtain a unified synchronization node evaluation function. The candidate node set for each group is compared according to the unified synchronization node evaluation function score, and the supply chain database node with the highest score is selected as the synchronization node for the current group within the receiving window; Each supply chain database node uploads the main encrypted incremental update ciphertext to its corresponding synchronization node using secure database synchronization communication within its group; Each synchronization node maintains an upload window to receive the main encrypted incremental update ciphertext uploaded by all member supply chain database nodes in its group, forming an upload set. During the upload process, the synchronization node timestamps the reception of each ciphertext record and calculates the upload delay. The ciphertexts in the upload set are sorted according to the reception timestamp. If the upload delay exceeds the maximum tolerable delay, the ciphertext is marked as late. Each synchronization node maintains a ciphertext status table, which records whether each member supply chain database node in the group has submitted ciphertext within the current upload window.
5. A supply chain database management method according to claim 1, characterized in that, The method of triggering a lightweight gated bootstrapping operation on the aggregated ciphertext of the supply chain according to a gated threshold includes: The encoding scale of all subject-specific incremental update ciphertexts in the uploaded set is uniformly processed, and the encoding scale with the smallest value among all encoding scales is selected as the target aggregation scale for this aggregation operation. For other ciphertexts with inconsistent encoding scales, homomorphic scaling and normalization processing is performed before aggregation. If the encoding scale of the ciphertext uploaded by a certain supply chain database node is larger than the target aggregation scale, the ciphertext is scaled. Homomorphic vector addition is performed on the main encrypted incremental update ciphertexts for all coding scales that have been unified to generate supply chain aggregate ciphertexts. Calculate the remaining noise budget of the current aggregated ciphertext and compare it with the system-set gating bootstrap threshold. If the remaining noise budget is less than the gating bootstrap threshold, a lightweight gating bootstrap operation is automatically triggered. When the bootstrap operation is triggered, the CKKS bootstrap process is executed on the aggregated ciphertext to obtain the refreshed supply chain aggregated ciphertext. If the bootstrapping operation is not triggered, the aggregated ciphertext is directly used as the dense-state aggregated output of the current group, and the aggregated ciphertext is bound to its aggregate scale, packing granularity and slot position scrambled matrix triplet to obtain the output structure of this aggregation.
6. The supply chain database management method according to claim 1, characterized in that, The synchronization node repackages the supply chain aggregate ciphertext at the end of the merge window, including: At the end of the merge window, each synchronization node repackages the supply chain aggregate ciphertext generated in its group. The encrypted data generated after repackaging is called the synchronization node aggregate ciphertext. The total number of slots in the ciphertext after repackaging is obtained by dividing the total number of slots in the ciphertext before repackaging by the repackaging factor and rounding the result up. Generate a repackaged metadata quadruple and bind the corresponding quadruple to the synchronization node's aggregated ciphertext to form the ciphertext package uploaded by the synchronization node. The synchronization node determines the target node for uploading the database synchronization link based on the current communication level. The synchronization node estimates the total amount of data and the required transmission time of the ciphertext to be uploaded based on the current link bandwidth budget and encoding scale. If the estimated transmission time is greater than the maximum transmission delay allowed by the link, the synchronization node automatically reduces the repackaging factor or adopts a polling delay sending mechanism. Under the condition of meeting the bandwidth and latency requirements, the synchronization node sends the uploaded encrypted packet to the upstream node through the multi-hop routing protocol, and records the upload timestamp, the number of hops traversed in the upload path and the acknowledgment response information for this upload. If the upstream node is a regional database node or a master database node, the node performs relay-level repackaging and aggregation of the received encrypted packets uploaded by multiple synchronization nodes to form a new relay-layer encrypted aggregated encrypted packet.
7. A supply chain database management method according to claim 1, characterized in that, The process of applying a dual-window asynchronous aggregation mechanism to handle late-updated encrypted text during the upload process includes: The relay node measures the instantaneous bandwidth budget and signal-to-noise ratio of the current uplink, and obtains the available load capacity by multiplying the bandwidth budget by the bandwidth efficiency function calculated based on the signal-to-noise ratio. For each received and uploaded encrypted packet, the relay node calculates the bandwidth adaptive repackaging factor; The relay node performs bandwidth adaptive repackaging of the aggregated ciphertext of each synchronization node in the ciphertext modulus field to obtain the repacked relay layer encrypted aggregated ciphertext. When the merge window of the relay node is closed, homomorphic vector addition is performed on the relay layer encrypted aggregate ciphertext that has been received and repackaged in the current upload window to generate the supply chain multi-hop inter-layer ciphertext. The relay node marks any uploaded encrypted packets that arrive after the upload window closes as late uploaded encrypted packets and moves them into the next upload window for further processing. The criterion for determining whether a encrypted packet is uploaded late is whether the difference between the received timestamp and the generated timestamp of the uploaded encrypted packet is greater than the maximum late threshold set by the system.
8. A supply chain database management method according to claim 1, characterized in that, The supply chain coordination server-side threshold decryption aggregate ciphertext includes: The supply chain coordination server, in conjunction with multiple trusted entities, uses a threshold key system to perform threshold decryption on the ciphertext across multiple hops in the supply chain, obtaining the plaintext aggregation vector. Based on a non-independent, identically distributed deviation correction strategy, it generates a global model update vector. The supply chain coordination server adjusts the quantization step size and encoding scale for the next round based on decoding errors and communication quality feedback through a dynamic quantization step size feedback strategy, generating supply chain coordination server feedback control parameters. The supply chain coordination server then sends the global model update vector and the supply chain coordination server feedback control parameters to the synchronization node, which in turn forwards them to the supply chain database node. The supply chain database node updates its end-side encoding parameters based on the supply chain coordination server feedback control parameters and enters the next round of end-side local model iteration.
9. A supply chain database management system, used to execute the supply chain database management method according to any one of claims 1-8, characterized in that, include: The acquisition module is used to collect the original change data of the supply chain database and calculate the main update vector. The main update vector is processed according to the adaptive multi-scale coding strategy to form a multi-scale packaged update vector. The encryption module is used to encrypt the multi-scale packing update vector based on the improved CKKS homomorphic encryption method to generate the main encrypted incremental update ciphertext. The grouping module is used to build a supply chain synchronization node election model, perform privacy-aware grouping of supply chain database nodes, elect synchronization nodes, and upload the main encrypted incremental update ciphertext to the synchronization node within the group through a multi-hop secure database synchronization link. The aggregation module is used to enable the synchronization node to maintain the upload window and receive the main encrypted incremental update ciphertext. It performs homomorphic vector addition and scalar normalization on the main encrypted incremental update ciphertext in the upload window to generate the supply chain aggregate ciphertext, and triggers a lightweight gating bootstrap operation on the supply chain aggregate ciphertext according to the gating threshold. The upload module is used to enable the synchronization node to repackage the supply chain aggregated ciphertext at the end of the merge window, forming the synchronization node aggregated ciphertext, and upload it layer by layer through the supply chain regional database, the master database, or the supply chain coordination server. The relay module enables relay nodes to perform bandwidth adaptive repackaging and homomorphic vector addition on the aggregated ciphertext of the synchronization node according to the link rate and signal-to-noise ratio, generating multi-hop inter-layer ciphertext in the supply chain. The coordination module is used to enable the supply chain coordination server to decrypt and aggregate encrypted text at the threshold, correct and generate a global update, and send feedback parameters to each supply chain database node to drive a new round of iteration, thereby completing the encrypted incremental synchronization and consistency management of multi-entity supply chain databases.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-8.