Data trusted processing method and system based on multi-party secure computation and consortium blockchain
By employing a data processing method based on multi-party secure computation and consortium blockchain, the problems of data privacy protection and trusted traceability in cross-linked circulation are solved, achieving data privacy protection and trusted sharing, and ensuring the immutability and traceability of data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING TECH & BUSINESS UNIV
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-02
AI Technical Summary
In cross-process circulation scenarios, existing technologies struggle to achieve reliable traceability and collaborative analysis throughout the entire process while protecting data privacy, resulting in single-point risks, data tampering, and privacy leaks.
By adopting a data processing method based on multi-party secure computation and consortium blockchain, secret shared shares are generated on the embedded edge side, collaborative computation is carried out using a coordinator trusted execution environment, and an anchor data structure is built on the consortium blockchain. Combined with a multi-party secure computation protocol that combines homomorphic encryption and secret sharing, data privacy protection and trusted sharing are achieved.
It enables data privacy protection, immutability, and traceability without exposing the original data, supports trusted collection, storage, and statistical computation across entities, and ensures the correctness and verifiability of the computation process.
Smart Images

Figure CN122137528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of data security and blockchain technology, and specifically discloses a data trust processing method and system based on multi-party secure computation and consortium blockchain. Background Technology
[0002] In cross-stage circulation scenarios such as grain, the data held by various participants is dispersed and sensitive, necessitating end-to-end trusted traceability and collaborative analysis while protecting data privacy. Existing solutions largely rely on centralized storage and computation, which presents issues such as single points of failure, data tampering, and privacy breaches. While traditional blockchains can guarantee the reliability of evidence storage, they struggle to support secure computation of encrypted data and multi-party collaborative analysis. Therefore, how to achieve trusted collection, storage, and statistical computation across entities while ensuring data privacy at each stage has become a pressing technical challenge. Summary of the Invention
[0003] This invention aims to provide a data trust processing method based on multi-party secure computation and consortium blockchain, in order to solve the problem of collaborative computation under the premise of full-process trust traceability, secure storage and privacy protection in cross-stage data circulation without exposing the original data.
[0004] This invention provides a data trust processing method based on multi-party secure computation and consortium blockchain, comprising:
[0005] At the embedded edge, each data holder collects embedded device data for this stage through its own deployed trusted execution environment (TEX), forming a batch view for this stage. Each entity's TEX generates a stage traceability code fragment based on this batch view and generates a secret shared share for the original data indicators. Under the orchestration of the coordinator's TEX deployed by the regulator, each entity's TEX distributes the generated secret shared shares to the protocol participants and collaboratively executes a lightweight multi-party secure computation protocol for edge computing under the orchestration of the coordinator's TEX. After the protocol execution is complete, each entity's TEX reports its stage traceability code fragment and computation result share to the coordinator, which reconstructs and generates a full-process traceability code and batch quality control vector, and encrypts and generates a batch data ciphertext package.
[0006] On the storage and anchoring side, the batch data encrypted package is written into the object storage system and submitted to the content addressing storage system to obtain the content identifier; an on-chain anchor data structure containing the full-process traceability code, encrypted package hash, and content identifier is constructed and submitted to the consortium blockchain network that adopts the batch anchor-oriented Byzantine fault-tolerant consensus protocol for consensus and storage.
[0007] On the server-side computation and sharing side, when an authorization request verified by the consortium blockchain smart contract is initiated, a computation committee is formed by the server nodes closest to the storage location. The computation committee obtains the batch data ciphertext package of the target batch from the object storage and content-addressed storage system, and requests the secret shared share of the original data indicators from the trusted execution environment of the corresponding data holder. The computation committee adopts a multi-party secure computation protocol that supports homomorphic encryption and secret sharing, encodes the obtained secret shared share into homomorphic ciphertext, and performs ciphertext weighted superposition in the homomorphic domain to achieve cross-batch aggregation. Then, the homomorphic result after aggregation is converted back into the form of secret shared share. The decryption committee performs threshold decryption on the aggregated secret shared share and directly outputs the additive secret share of the aggregation result. Finally, the aggregation result is reconstructed in a controlled manner under the access policy constraints, and the proof committee generates a batch zero-knowledge proof that associates the data source and the computation process, and returns the aggregation result and the zero-knowledge proof to the authorization requester.
[0008] This invention provides a data trusted processing system based on multi-party secure computation and consortium blockchain for implementing the above-mentioned method, comprising:
[0009] Multiple edge-side trusted execution environment units are deployed on embedded edge gateways or servers in various stages of planting, purchasing, transportation, and warehousing to collect embedded device data in this stage, generate traceability code fragments and secret shared shares of original data indicators;
[0010] The coordinator trusted execution environment unit is used to receive traceability code fragments from each stage to reconstruct the full-process traceability code, coordinate each edge-side trusted execution environment unit to execute a lightweight multi-party secure computation protocol for edge computing to calculate the batch quality control vector, and reconstruct and encrypt the batch quality control vector to generate a batch data ciphertext package.
[0011] The storage cluster includes an object storage subsystem and a content-addressed storage subsystem, used to store the batch data encrypted packets and provide corresponding object keys and content identifiers;
[0012] The consortium blockchain network consists of multiple consensus nodes that run smart contracts for verifying authorization requests and generating capability tokens, as well as a batch-anchor-oriented Byzantine fault-tolerant consensus protocol for consensus and storage of on-chain anchor data structures containing the full-process traceability code, ciphertext hash, and content identifier.
[0013] The server-side multi-party secure computing cluster consists of multiple server nodes with trusted execution environment capabilities. It is used to form a computing committee, a decryption committee, and a proof committee based on the capability token, and to execute a multi-party secure computing protocol that supports homomorphic encryption and secret sharing to complete the aggregated statistical calculation, controlled reconstruction, and batch generation of zero-knowledge proofs for multiple batches of secret sharing shares.
[0014] The units work together to execute the data trust processing method.
[0015] The beneficial technical effects of the present invention are as follows:
[0016] By leveraging a trusted execution environment and a multi-party secure computation protocol, quality control vector computation with data privacy protection is achieved at the edge. Anchor information is stored through a consortium blockchain to ensure data immutability and traceability. A multi-party secure computation protocol that combines homomorphic encryption and secret sharing enables privacy aggregation and statistics of multiple batches of data on the server side. Zero-knowledge proofs are used to ensure the correctness and verifiability of the computation process, thereby achieving trusted processing and secure sharing of data throughout its entire lifecycle. Attached Figure Description
[0017] Figure 1 This is the overall flowchart of the present invention;
[0018] Figure 2 This invention provides a multi-party secure computation and consortium blockchain collaboration framework.
[0019] Figure 3 This is a flowchart of the reliable edge data collection process for grain traceability in this invention;
[0020] Figure 4 This is a flowchart illustrating the reliable storage process for grain traceability in this invention.
[0021] Figure 5 This is a flowchart illustrating the trusted sharing process for grain traceability in this invention. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0023] like Figure 1 As shown in the embodiments of this application, a method for trusted perception, storage, and sharing of post-harvest grain harvesting, storage, and transportation quality traceability data based on the integration of multi-party secure computation (MPC) and consortium blockchain mainly includes the following steps:
[0024] Step S1: Based on the relevant standards for grain circulation, the traceability granularity is set to product batch. It is agreed that traceability code fragments will be generated for each link of planting, purchasing, transportation and storage and then synthesized into a full-process traceability code. The collaborative architecture of consortium blockchain, multi-party secure computation and zero-knowledge proof and the on-chain and off-chain data structures are designed.
[0025] like Figure 2 As shown, the multi-party secure computation and consortium blockchain collaboration framework of this invention demonstrates the data flow and protocol interaction relationships between the edge side, storage side, and server side.
[0026] Step S2: On the side of each data holder, the trusted acquisition of embedded device data in multiple stages is completed through embedded edge gateways and trusted execution environments. The construction of scenario-based quality control indicators for each TEE (Trusted Execution Environment), generation of stage traceability code fragments, distribution of secret sharing shares, and GEM-MPC protocol (which can be called a lightweight multi-party secure computation protocol for edge computing, used to perform batch quality control computation on the edge gateway side) are completed. The batch quality control result vector and the full-process traceability code are reconstructed in the Orchestrator TEE (Coordinator Trusted Execution Environment) and encapsulated into a data ciphertext package.
[0027] Step S3: The encrypted data packets are stored in layers using the “object storage + IPFS (content-addressed storage system)” approach. The smallest anchor points, such as the encrypted packet hash, content addressing pointer, batch identifier, and traceability code hash, are registered to the consortium blockchain. The anchor block is quickly confirmed and uploaded to the chain through small-scale GABFT (Batch Anchor-oriented Byzantine Fault-tolerant Consensus Protocol) and BLS aggregate signature for batch anchor points.
[0028] Step S4: When an authorized requester, verified by the policy, initiates a query or analysis, a computation, decryption, and proof committee is formed by the server node near the storage location. Through the entire process of "smart contract authorization → multi-committee collaboration → hybrid domain aggregation → batch zero-knowledge proof → controlled delivery", multiple batches of ciphertext are aggregated based on a multi-party secure computation protocol that supports homomorphic encryption and secret sharing (hereinafter referred to as the GHS-MPC protocol). Only the aggregation results are reconstructed in a controlled manner. Privacy is protected by token constraints, mask isolation, and proof verification. Zero-knowledge proofs are returned to achieve trusted sharing without exposing plaintext.
[0029] In one embodiment, step S1 above: Based on grain circulation-related standards, the traceability granularity is set to product batch; traceability code fragments are generated for each stage of planting, purchasing, transportation, and storage, and these fragments are synthesized into a full-process traceability code; a collaborative architecture of consortium blockchain, multi-party secure computation, and zero-knowledge proof, as well as on-chain and off-chain data structures, are designed, specifically including:
[0030] Step S11: During the system initialization phase, based on relevant standards for grain storage and distribution, the traceability granularity is set to product batch, and a unique batch identifier is assigned to each batch of grain. For planting entities, purchasing entities, transportation entities, and warehousing entities, respective traceability code encoding functions are agreed upon for each stage. This function is used to map batch identifiers, embedded data digests, and process metadata to process traceability code fragments, satisfying... ,in as the main body In batch traceability code fragment, as the main body In batch Embedded data digest, as the main body The configuration parameters of the process, The coding function is pre-defined and publicly verifiable, ensuring the deterministic and verifiable nature of the generation process for traceability code fragments. For the four main entities involved in planting, purchasing, transportation, and warehousing, corresponding codes are obtained... , , , Full-process traceability code Generated by concatenating the batch identifier and the above-mentioned process segments using an anti-collision hash function:
[0031] (1)
[0032] in, This is the full-process traceability code for the kth batch of grain. For cryptographic concatenated hashing performed within the main TEE, each hash step is bound to the TEE metric value of the preceding stage data. This is the standard batch identifier for the k-th batch. , , , These are traceability code fragments for each stage of planting, purchasing, transportation, and warehousing, among which, " " indicates a field concatenation operation. It serves as a unified master index throughout the entire process from batch generation, including embedded data acquisition, multi-party secure computation, encrypted encapsulation, and on-chain anchor registration.
[0033] Step S12: At the collaborative technology stack level, it is pre-determined that the blockchain layer adopts the Hyperledger Fabric consortium blockchain and the GABFT Byzantine Fault-Tolerant Consensus Protocol for batch anchors; the edge side adopts the GEM-MPC protocol based on Trusted Execution Environment (TEE) for batch quality control computation; the server side adopts the GHS-MPC protocol based on homomorphic encryption and secret sharing for aggregation statistical analysis; the proof layer adopts a zero-knowledge proof scheme based on the RLWE hypothesis; the storage layer adopts a layered storage mode of object storage and IPFS content-addressed storage; and the signature layer adopts BLS aggregated signature compression committee multi-node signature; at the same time, the on-chain anchor structure is pre-defined. Off-chain data encrypted packet structure Access strategy structure Identity mapping structure It is used to unify the field format and relationships of on-chain and off-chain data.
[0034] Step S13: At the node role and division of labor level, it is agreed that each business entity deploys its own embedded edge gateway or edge server to access embedded devices on its own side, collect business data, and build local batch views; the supervisor deploys the Orchestrator TEE, which is used in the edge-side GEM-MPC protocol to maintain batch binding relationships and orchestrate the execution of the GEM-MPC protocol to generate batch data encrypted packets; several servers or cloud nodes with TEE capabilities serve as server-side MPC computing nodes, which are used in the S4 stage to perform aggregate statistical analysis, threshold decryption, and zero-knowledge proof generation based on the GHS-MPC protocol, and elect coordination nodes for task scheduling and committee formation.
[0035] Step S14: Regarding the batch data encapsulation format, when the Orchestrator TEE internally completes the scene-specific deviation vector for batch k... Structured risk vector With full-process traceability code After reconstruction, , A context vector is formed by combining the environment summary, time window, algorithm version number, etc. ,in As a primary consistency indicator across multiple stages, it supports subsequent flexible statistical analysis. This serves as the specific conclusion vector for this quality control process. A symmetric key is then used. Encrypt it to generate a batch data ciphertext package. ,make The relationship shown in the formula is satisfied: in, For batch k, the data is encrypted. It is a symmetric encryption algorithm based on AEAD. Let k be the symmetric encryption key for batch k. The context vector for batch k includes at least... , Environmental summary; Orchestrator TEE Calculate hash fingerprint This serves as the input for step S3, hierarchical storage and anchor point registration.
[0036] In one embodiment, step S2 above: GEM-MPC batch quality control on the embedded edge gateway side is used to complete the trusted acquisition of embedded data in multiple stages, the construction of scenario-based deviation indicators, the generation of traceability code fragments, the distribution of secret sharing shares, and GEM-MPC collaborative batch quality control operations on the side of each data holder through the embedded edge gateway and the local TEE, and generate a data ciphertext package with traceability code in the Orchestrator TEE. .
[0037] like Figure 3 As shown in the flowchart, the grain traceability edge trusted data collection process of this invention illustrates the entire process from device access and data view construction to the generation and distribution of secret shared shares.
[0038] Step S21: The consortium blockchain verifies and authorizes the organizational certificates, business roles, and data processing scope submitted by the planting, purchasing, transportation, and warehousing entities, registers organizational identifiers and role information, and each entity deploys its own embedded edge gateway or embedded edge server. The regulator deploys the Orchestrator TEE. Each TEE registers its measurement fingerprint and public key with the consortium blockchain through remote proof. The Orchestrator TEE establishes an encrypted session channel based on AEAD with each entity's TEE through key negotiation based on the registration information. All subsequent secret shares, control instructions, batch binding information, and traceability code fragments are transmitted in this encrypted channel to ensure that the traceability code encoding function agreed upon in Step S11 is followed. The generated It will not be tampered with or leaked during transmission.
[0039] Step S22: In each batch In the business process, the farmer-side embedded edge gateway connects to weighbridges, harvesting time tracking devices, field temperature and humidity probes, RFID batch tags, and field quality rapid testing instruments. The buyer-side embedded edge gateway connects to the buyer's weighbridge, timestamp device, temporary storage area temperature and humidity sensor, serial number tagging device, and buyer quality testing instrument. The transportation-side embedded edge gateway connects to vehicle load-bearing weighing equipment, vehicle GPS module, cargo compartment temperature probe, transport tag identification device, and fuel consumption and mileage metering device. The warehouse-side Warehouse TEE connects to the warehouse weighing equipment, warehouse temperature and humidity sensor, warehouse RFID reader, and warehouse power metering device. The main body's TEE receives real-time data output from the above embedded devices within a trusted execution environment, aligns the data related to batch k by timestamp, and categorizes it by device type to form the main body's batch view. , which can be represented as , Indexing records within a batch The set of device acquisition tasks for subject i in batch k. For timestamps, For weighing data, This is a temperature and humidity sampling vector. For quality inspection results, These are energy consumption or mileage sampling values, obtained by analyzing... Each field in the process undergoes identity verification, unit unification, range checking, and time window alignment to obtain a structured batch view of the main entity. The view fields must include at least the delivery weight, warehouse weight, timestamp sequence, temperature and humidity sequence, cargo ownership identifier, quality inspection results, and energy consumption and mileage data. Simultaneously, the traceability code encoding function agreed upon in step S11 is used. ,from Extract timestamp sequences, spatial locations, device identifiers, and key business fields to construct embedded data digests. ,Will , Metadata for process configuration enter Calculate the subject in batch Link traceability code fragment , satisfy and through an encrypted session channel and its The binding relationship is reported to the Orchestrator TEE.
[0040] Step S23: Each subject's TEE is based on its own subject's batch view. Extract the original embedded data metrics and analyze each metric component. The original embedded data secret share share is generated using the Shamir secret sharing scheme. For data metrics... Construct a random polynomial:
[0041] (2)
[0042] in, This indicates that the main TEE is the batch. The The secret sharing polynomial function generated by the data indicators, z is used to map different participating nodes in the secret sharing protocol, and t is the reconstruction threshold value of secret sharing; This refers to the random coefficients generated within the main TEE based on a hardware-based true random number source, used to ensure the unpredictability of secret shares generated by different entities; raw data. Extracted from the main batch view, and has undergone preprocessing such as identity verification, unit unification, and scope check.
[0043] At the publicly available value points pre-defined by the system Calculate the share The share vector that forms this indicator component Each entity's TEE distributes the share to other entity TEEs participating in the GEM-MPC protocol through an encrypted session channel, based on the target node identifier, and records the original embedded data secret share and share index in the secure storage area of the local TEE. (Including batch ID, indicator identifier, share hash, target node list, etc.), forming the original share index set. Each entity's TEE will report to the Orchestrator TEE through an encrypted session channel.
[0044] Step S24: Under the coordination of Orchestrator TEE, each participating node executes the GEM-MPC protocol based on the received secret share to complete batch quality control calculations in the secret sharing domain. The protocol execution is divided into offline and online phases.
[0045] During the offline phase, Orchestrator TEE pre-generates multiple sets of Beaver triples within its trusted execution environment. Each set of triples satisfies ,in, For triplet indexes. The system indexes each... Maintenance reuse count Integrity Flags Set the maximum number of reuses. Only when and This means that only triplets that have not experienced MAC check failures in the past are allowed to participate in multiplication gate calculations in the new batch of circuits. Update after use. This "index + reuse count + integrity flag" structure extends the traditional one-time Beaver triplet into a controllable reuse resource pool. The Beaver triplet reuse mechanism can reduce the offline computing overhead of embedded TEE by an order of magnitude, adapting to the computing power level of mainstream edge gateways.
[0046] During the online phase, when batch processing is required... Calculate arbitrary secret input and When multiplying, each participating node It holds the corresponding secret share within its TEE , and the share of the triplet , , Locally calculated difference share and After coordination by Orchestrator TEE, a summation operation within the secret shared domain is performed on the difference share to obtain the global shared difference. and The broadcast is then sent to all nodes, and each node calculates its share of the product result within its TEE according to the Beaver multiplication rule. Make the global product satisfy .
[0047] Subsequently, each node performs combination operations on relevant fields in the secret shared domain to construct a batch. Scene deviation vector:
[0048] (3)
[0049] in, Let k be the scenario-based deviation vector for batch k. Weight consistency deviation can be calculated by accumulating weight differences across stages, and must meet the following requirements. The sum of the original delivery weights of farmers after harvest and during the purchasing process can be expressed as: The sum of the weights recorded in transportation delivery and warehouse outbound records; The time continuity deviation of the timestamp intervals in each stage is obtained by comparing the time interval with a preset reasonable range; The deviation between the temperature and humidity sequences in the field, during temporary storage after acquisition, in transport vehicles, and inside warehouses is obtained by aggregating the deviations of multiple temperature and humidity sequences. Discrepancies in the consistency of ownership transfer between RFID batch codes, shipping consignment numbers, and warehouse entry / exit records; The aggregated bias is the difference between the results of rapid field testing and the quality testing results during acquisition and storage. To address the discrepancies between transportation energy consumption and mileage, and between warehousing electricity metering data and preset energy consumption models, a unified vector model is established. Six types of cross-subject, consistency-oriented quality control deviations in Chinese coding.
[0050] For batch Scene deviation vector By combining the secret share of each subject's indicator vector, Orchestrator TEE stacks the deviation vectors of the four subjects—planting, purchasing, transportation, and warehousing—into a combined vector according to the link sequence. Each participating node Holding the corresponding secret share Within their respective TEEs Perform matrix multiplication to calculate the secret shares of longitudinal cumulative deviation and lateral breakpoint deviation. and ,in A weighted matrix for the main dimensions. This is the difference matrix between adjacent stages. Subsequently, absolute value and threshold operations are performed within the secret shared domain using multiplication and comparison gates based on Beaver triples, ultimately forming a structured risk vector. The secret share set, such that the global structured risk vector satisfies:
[0051] (4)
[0052] in, To perform absolute value calculations based on components, This represents the longitudinal cumulative bias weight matrix, whose non-zero elements are derived at the hardware level from the batch data digest and access policy root hash within the main TEE. The two matrices are used to isolate the horizontal breakpoint deviation, with different isolation coefficients for different dependency types. Different weights are assigned to different risk dimensions. Represented by the scene deviation vector s k A combined vector generated by stacking links in sequence; and These represent the weighted matrix based on the subject's reputation value and the difference matrix between adjacent links, respectively; the subject-dimensional weighted matrix. The weights are linked to the entity's reputation score and the accuracy of historical data; the difference matrix between adjacent links A time decay factor is introduced into the calculation, meaning the impact of long-term data deviations on current risks decreases over time. This formula maps both "vertical cumulative deviation" and "lateral breakpoint deviation" into a unified risk space, thus ensuring batch-level risk mitigation. The risk state is encoded algebraically as a vector with direction and magnitude. Structured risk vector. After the calculations are completed in the secret shared domain and the MAC verification passes, each entity TEE receives a share of the final calculated results regarding the quality risk of this batch, as well as a share of the calculated results regarding the full-process traceability code fragments. After the GEM-MPC protocol is executed, each participating TEE will... and Fragments Send to Orchestrator TEE.
[0053] Step S25: The Orchestrator TEE collects no less than the threshold After obtaining the effective share, the plaintext vector is reconstructed using Lagrange interpolation within its trusted execution environment. , and And perform consistency verification: Verification Check whether the logical relationships between the components conform to the preset quality control rules, and verify them. Whether by The hash is obtained through a predetermined matrix transformation. If verification fails, an alarm is triggered and the abnormal event is recorded to the consortium blockchain; if it passes, subsequent encapsulation steps continue. Orchestrator TEE calculates the original share index hash. , and , , Metadata such as environment summary, time window, and algorithm version number are assembled into a context vector. And using a symmetric key right Encrypt the data to generate a batch of encrypted data packets. Simultaneously calculate the ciphertext hash This serves as the basis for subsequent S3 anchor point registration and S4 aggregation calculation.
[0054] In one embodiment, step S3 above involves using "object storage + IPFS" to perform layered storage of the encrypted data packet generated in step S2, registering the encrypted packet hash, CID, batch identifier, and other minimum anchor points to the consortium blockchain, and rapidly reaching consensus within a small committee and uploading it to the blockchain through the batch-anchor-oriented Byzantine Fault-Tolerant Consensus Protocol GABFT, while simultaneously binding access policies. .
[0055] like Figure 4 As shown in the flowchart of the trusted storage process for grain traceability of the present invention, it illustrates the entire process from writing encrypted packets to object storage, content addressing storage to on-chain anchor construction and consensus on-chain.
[0056] Step S31: After completing the batch data ciphertext packet encapsulation described in step S25, the Orchestrator TEE will encapsulate the data ciphertext packet for each batch k. As hot data, it is written to object storage and assigned an object key. and establish in object storage The key-value mapping relationship is used to record batch-related metadata in the metadata area of the object storage. , At least including , Fields such as warehouse location, warehouse number, business time window, algorithm version number, and data category label, among which... The encrypted packet hash fingerprint generated in step S25 is used for subsequent consistency verification with the on-chain anchor. Batch symmetric key Instead of persisting the data to object storage, it is only retained in the corresponding TEE or dedicated key management module, placing "data availability" and "key control" in different security domains. To enhance availability and tamper resistance in cross-node scenarios, after writing to object storage, the system synchronously... Write to IPFS or an equivalent content-addressed storage system, and IPFS will target it. Calculate content identifier ,satisfy The relationship, among which, This refers to data objects stored in the InterPlanetary File System (IPS), which are addressed by content identifiers and established in off-chain indexes. The mapping enables the server side or regulator to quickly locate the relevant encrypted data based on batch dimension conditions after obtaining legal authorization, forming a triple index structure of "object key - content identifier - traceability code", which provides addressable encrypted input for the server-side MPC in step S4.
[0057] Step S32: On the consortium blockchain side, construct the minimum on-chain anchor data structure for each batch k. , At least include a traceability code , , Access policy identifier Algorithm version number and submission timestamp Fields such as these can be represented as:
[0058] (5)
[0059] in, Indicates batch The full-process traceability code The hash fingerprint of the batch data ciphertext packet is represented by a dual-algorithm hash of "SHA-256 + SM3". This represents the content identifier of the encrypted packet in IPFS. This represents the on-chain access policy identifier. This policy is not a static ACL, but rather a dynamically generated capability token root hash reference by the smart contract. Indicates the version number of the cryptographic protocol. This indicates the anchor submission timestamp, which is provided by the Orchestrator TEE's built-in trusted clock.
[0060] Anchor point commit node will As the transaction payload is submitted to the consensus committee using the GABFT protocol, the consensus committee aggregates the hash sequences of several batches of anchor points in this round of consensus and calculates the block root hash. Each consensus node uses its own private key. right Perform a signature to obtain a single-node signature. The aggregation node calls the BLS signature aggregation operator to aggregate at least a threshold number of single-node signatures to obtain the aggregated signature. and will and It is written to the consortium blockchain ledger along with the block header. Any subsequent authorized node can recalculate it. and the records on the chain A comparison is performed to verify the consistency between the encrypted packets in off-chain object storage and IPFS and the on-chain anchors. In China, through The original share index can be queried in conjunction with it. The storage location and access identifier are used to locate the original data share stored in each subject's TEE.
[0061] In one embodiment, step S4 above: When the authorized requester, after policy verification, initiates a query or analysis, a computation, decryption, and proof committee is formed by the server node near the storage location. Through the entire process of "smart contract authorization → multi-committee collaboration → hybrid domain aggregation → batch zero-knowledge proof → controllable delivery", multiple batches of ciphertext are aggregated based on the GHS-MPC protocol. Only the aggregation results are reconstructed in a controlled manner. Privacy is protected by token constraints, mask isolation, and proof verification. Zero-knowledge proof is returned with the result, realizing trusted sharing without exposing plaintext.
[0062] like Figure 5 As shown in the flowchart, the trusted sharing process for grain traceability of this invention illustrates the entire process from smart contract authorization and multi-committee collaborative computing to batch zero-knowledge proof generation and result delivery.
[0063] Step S41: When regulatory authorities, financial institutions, or other authorized entities initiate data query or statistical analysis requests through the unified service portal, the request is first submitted to the access control smart contract on the consortium blockchain. The smart contract then uses the access policy data structure pre-registered on the chain. Identity mapping data structure The system verifies the requesting entity's on-chain identity, public key, business role, purpose tag, target batch range, intended access metric granularity, and result purpose item by item. Requests involving highly sensitive batches, cross-entity aggregation, or exceeding regular threshold ranges trigger a multi-party joint authorization process. After authorization is granted, the access control smart contract generates capability tokens. , Chinese encoding target batch set Statistical indicator template Privacy parameters Allowable result accuracy constraints The capability token, which includes the available combinations of cryptographic operators and computational constraints such as task validity period, serves as the unique task description for the GHS-MPC committee on the server side to perform collaborative computations. This ensures that all subsequent computations have verifiable scope constraints in the policy space. Subsequently, the server node listens for this event and elects a coordinating node for this task. The primary responsibility of the coordinating node is to obtain and verify the validity of this on-chain token.
[0064] Step S42: Upon receiving Subsequently, the coordinating node selects several server nodes from the list of compliant nodes registered on the blockchain (possessing certificate authentication, key escrow, and audit records) that are close to the object storage and IPFS locations to form a collaboration committee for this task. From this committee, some nodes are designated as the computation committee, decryption committee, and proof committee. Once the committee is formed, the coordinating node will issue authorization tokens. The keys are distributed to each committee. Subsequently, each node negotiates the vector homomorphic encryption public key used in this task via an encrypted channel. Threshold decryption parameters and secret sharing parameters form a cryptographic environment supporting the GHS-MPC protocol based on a hybrid of homomorphic encryption and secret sharing. For batch arrays and node sets that will be used repeatedly, the compute nodes pre-compute and cache the corresponding Lagrange coefficient vectors. This preprocessing stage moves the calculation of interpolation coefficients, which needs to be addressed in subsequent cross-batch aggregations, to this preprocessing stage, allowing the GHS-MPC circuit in the online stage to directly reuse the cached data. The hybrid computing model of "multiple batches and multiple indicators" reduces a large amount of repetitive linear algebra overhead.
[0065] Step S43: Each computing node based on target batch set And the batch content pointers recorded on the consortium blockchain Retrieve encrypted data packets for the target batch from object storage and IPFS Each computing node Extract the context vector of this batch after performing the unsealing operation. and from the context vector The original share index hash set is obtained by parsing. The decryption key for the encrypted data packet is provided by a key encapsulation material constrained by an on-chain authorization token. Specifically, the data provider (or its TEE) encapsulates a symmetric key into the public key set of the task computation committee and distributes it. Computation nodes only need to verify the key. Only after that can it be unlocked and obtained. and Subsequently, each computing node initiates a request for the original embedded data secret sharing share to the Trusted Execution Environment (TEE) of the corresponding data subject through an encrypted session channel, and submits... and task authorization token Verification information.
[0066] To avoid any computing node accumulating reconfigurable information in a single batch or across batches, the The set of computation committee nodes containing this task and share distribution mapping This is used to specify each record (or each indicator vector component) in a batch. The share distribution mapping should be directed to which computing node each share should be sent. This share distribution mapping satisfies that any node receives only its corresponding share, which is insufficient to reconstruct the original value independently, and is expressed in the following form: ,in, This indicates the record index (or indicator vector component index). Indicates the share number and the corresponding calculation node. .
[0067] After obtaining their corresponding secret share vector, each computing node organizes it into a secret-shared input matrix according to the index dimension. To perform subsequent aggregation in the ciphertext domain, the computing committee executes a "share-to-homomorphic ciphertext conversion protocol": each computing node first uses the negotiated vector homomorphic encryption public key. pk HE Encode the original share into a vector ciphertext. ,in Represents a computing node In batch The next holding A share vector is generated. Furthermore, each computing node is superimposed with a pseudo-random mask determined by the task seed and node identity, ensuring the uniqueness of ciphertext from the same batch across different tasks.
[0068] Based on this, the computing committee, within the homomorphic encryption domain, according to Indicator templates defined in With batch weight Weighted summation is performed on the ciphertexts of multiple batches, and each computing node obtains its local aggregated ciphertext: , This represents the weighting coefficient corresponding to batch k. This represents the homomorphic ciphertext representing the original share of batch k held by the computing node, making... It corresponds to a linear combination of multiple batches in the numerical dimension, but still maintains a single vector form in the ciphertext structure, which facilitates the subsequent unified decryption-re-sharing operation.
[0069] To proceed to the multi-party computation phase without exposing the plaintext, the decryption committee decrypts the aggregated ciphertext submitted by each node. Perform threshold decryption. A specific variant of the threshold decryption protocol is used here, which directly outputs the aggregated result in the final step of decryption. The secret share of addition No need to fully reconstruct the plaintext in the memory of any node. Specifically, the agreement ensures that the final share will meet the following requirements: Among them, the former share Generated from a secure random source within the protocol, the final version is determined by the protocol logic as follows: After decryption, each computing node obtains the corresponding... No single node holds complete Each node obtains Then, a secondary mask related to this task is locally overlaid. The new share is represented as: Each node is based on Task seeds and node identities are generated locally. And ensured according to predefined rules: Thus, it still satisfies the algebraic structure. However, the share observed by any node is a task-specific random vector. Subsequently, the GHS-MPC circuit performs operations within the secret shared domain... Perform vectorized statistical calculations.
[0070] The computation process is based on a hybrid architecture of homomorphic encryption and secret sharing: for addition, scalar multiplication, and linear transformations, each node directly performs calculations by locally superimposing or multiplying the shares by public coefficients; for multiplication operations, a pre-generated Beaver triplet share is used to execute an interaction protocol, achieving privacy-preserving computation of the multiplication gate by reconstructing the public difference and locally combining shares. For nonlinear statistics such as variance, quantiles, and scoring functions, a piecewise polynomial of public coefficients is used for approximation, calculating higher-order shares by repeatedly calling the multiplication gate, and then obtaining the share of the function value by locally linearly combining coefficients. The threshold decryption protocol directly outputs the additive secret share in the final step of decryption. This enables a natural transition from the homomorphic encryption domain to the secret sharing domain. All subsequent computations are performed within the secret sharing domain and do not return to the homomorphic encryption domain. Intermediate results are always maintained in a task-specific mask share format.
[0071] Through pre-calculated Lagrange coefficients The shared use of cached triples can significantly reduce interaction overhead during the online phase. This hybrid computing pipeline combines the batch computing capabilities of homomorphic encryption with the flexible interaction capabilities of secret sharing, meeting the complex statistical needs of multiple batches and multiple indicators while ensuring end-to-end computational privacy and protocol efficiency.
[0072] Step S44: After the secret-state aggregation and secret shared domain operations are completed, the decryption committee performs controlled reconstruction of the secret shared share representation of the final output vector, under the premise of satisfying the threshold conditions and access policy constraints, to obtain the aggregation result vector. The proof node constructs a vector-based batch zero-knowledge proof circuit, structuring multi-batch, multi-dimensional aggregation constraints into a set of verifiable relations.
[0073] (6)
[0074] in, This indicates the GHS-MPC statistical circuit executed in the secret shared domain; This represents the final secret-shared component generated by a computing node when processing batch k, after homomorphic domain aggregation, threshold decryption, and superposition of a secondary mask on its original secret share. It is generated by superposition of the additive secret share and the secondary mask. The mask is determined by the task seed and the node identity, representing the task masked share from each batch and each computing node. It supports custom statistical rules, dynamically adjusting statistical dimensions based on the authorization scope in the capability token. It verifies constraints such as the correctness of the explicitly encoded data source, mask consistency, computational correctness, and non-reconstruction of intermediate plaintext within the proof circuit, ensuring... Indeed, it is based on the original share index corresponding to the on-chain anchor. The identified subject-side share is generated through the protocol process, and the task mask satisfies... and The seeds are consistent, all operations performed in the secret shared domain conform to the predetermined GHS-MPC circuit, and no node performs reconstruction on single batches or intermediate results, nor writes intermediate plaintext to persistent storage. The proof node introduces a homomorphic commitment operator based on a lattice-hard problem, applying it to the hash set of the original share index. The identity identifier, task mask seed, node set, and task parameters of each data subject TEE. Generate commitments:
[0075] ;
[0076] This represents the set of hash values for the original secret share indices of each batch in the target batch set associated with the computation task. This represents a unique sequence of TEE hardware identifiers for all data holders and nodes involved in data collection and computation. seed mask This represents a task-specific mask seed derived from the authorization token. Used to ensure the randomness of the computation process and the isolation of tasks. This represents the set of node members elected through consortium blockchain consensus for the computation committee, decryption committee, and proof committee. It also represents the task metadata, including at least statistical metric templates, privacy budget parameters, and the version number of the computation circuit. Finally, it generates zero-knowledge proofs. , used to prove Indeed, the original data share corresponding to the index set in the commitment is transmitted via the specified... The circuit was correctly calculated within the secret shared domain, and the entire process remained within the protocol flow. This batch zero-knowledge proof merges the three constraints of correct data source, correct calculation process, and correct output into a verifiable instance, facilitating audits of the entire computation chain by regulators or other verifiers without accessing the underlying plaintext data.
[0077] Step S45: Each member of the calculation committee summarizes the aggregation results. Single-node signing is performed by the aggregation node (either the coordinating node or elected by the computation committee) using the BLS signature aggregation operator to calculate the aggregate signature. The result digest, zero-knowledge proof, and aggregate signature are then written to the verification log or the on-chain anchor extension field, forming an auditable result record. This is based on the access policy data structure. ,right Granularity-based trimming and anonymization of indicator dimensions, time dimensions, and subject dimensions are performed as needed. Only authorized statistical indicators and traceability-related fields that have been hashed or encrypted are returned to the requesting party. This allows regulators and authorized entities to complete result verification and business decisions without accessing the underlying plaintext data and single-batch plaintext results. Thus, the entire batch traceability and quality control link is closed under the collaborative framework of "embedded edge - server-side MPC - consortium blockchain".
[0078] This invention provides a data trusted processing system based on multi-party secure computation and consortium blockchain for implementing the above-mentioned method, comprising:
[0079] Multiple edge-side trusted execution environment units are deployed on embedded edge gateways or servers in various stages of planting, purchasing, transportation, and warehousing to collect embedded device data in this stage, generate traceability code fragments and secret shared shares of original data indicators;
[0080] The coordinator trusted execution environment unit is used to receive traceability code fragments from each stage to reconstruct the full-process traceability code, coordinate each edge-side trusted execution environment unit to execute a lightweight multi-party secure computation protocol for edge computing to calculate the batch quality control vector, and reconstruct and encrypt the batch quality control vector to generate a batch data ciphertext package.
[0081] The storage cluster includes an object storage subsystem and a content-addressed storage subsystem, used to store the batch data encrypted packets and provide corresponding object keys and content identifiers;
[0082] The consortium blockchain network consists of multiple consensus nodes that run smart contracts for verifying authorization requests and generating capability tokens, as well as a batch-anchor-oriented Byzantine fault-tolerant consensus protocol for consensus and storage of on-chain anchor data structures containing the full-process traceability code, ciphertext hash, and content identifier.
[0083] The server-side multi-party secure computing cluster consists of multiple server nodes with trusted execution environment capabilities. It is used to form a computing committee, a decryption committee, and a proof committee based on the capability token, and to execute a multi-party secure computing protocol that supports homomorphic encryption and secret sharing to complete the aggregated statistical calculation, controlled reconstruction, and batch generation of zero-knowledge proofs for multiple batches of secret sharing shares.
[0084] The units work together to execute the data trust processing method.
[0085] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data trust processing method based on multi-party secure computation and consortium blockchain, characterized in that, include: At the embedded edge, each data holder collects embedded device data in this stage through its own deployed trusted execution environment, forming a batch view for this stage; Each entity's trusted execution environment generates a process traceability code fragment based on the batch view of this process and generates a secret shared share for the original data indicators. Under the orchestration of the coordinator's trusted execution environment deployed by the regulator, each entity's trusted execution environment distributes the generated secret shared share to the protocol participants and collaboratively executes a lightweight multi-party secure computation protocol for edge computing under the orchestration of the coordinator's trusted execution environment. After the protocol is executed, each entity's trusted execution environment reports the process traceability code fragment and the computation result share to the coordinator, which reconstructs and generates a full-process traceability code and batch quality control vector, and encrypts and generates a batch data ciphertext package. On the storage and anchoring side, the batch data encrypted package is written into the object storage system and submitted to the content addressing storage system to obtain the content identifier; an on-chain anchor data structure containing the full-process traceability code, encrypted package hash, and content identifier is constructed and submitted to the consortium blockchain network that adopts the batch anchor-oriented Byzantine fault-tolerant consensus protocol for consensus and storage. On the server-side computing and sharing side, when an authorization request verified by the consortium blockchain smart contract is initiated, a computing committee is formed by the server nodes in the nearest storage location; The Computation Committee obtains the batch data ciphertext package of the target batch from the object storage and content-addressed storage system, and requests the secret-shared share of the original data indicators from the trusted execution environment of the corresponding data holder. The Computation Committee adopts a multi-party secure computation protocol that supports homomorphic encryption and secret sharing, encodes the obtained secret-shared share into homomorphic ciphertext, and performs ciphertext weighted superposition in the homomorphic domain to achieve cross-batch aggregation. Then, the homomorphic result after aggregation is converted back into the form of secret-shared share. The Decryption Committee performs threshold decryption on the aggregated secret-shared share and directly outputs the additive secret share of the aggregation result. Finally, the aggregation result is reconstructed in a controlled manner under the constraints of the access policy, and the Proof Committee generates a batch zero-knowledge proof that associates the data source and the computation process. The aggregation result and the zero-knowledge proof are returned to the authorization requester.
2. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, In the lightweight multi-party secure computation protocol for edge computing, a controllable reuse pool of multiplication triples is used to perform secure multiplication computation within the secret shared domain. An index is assigned to each multiplication triple, and the reuse count and integrity flag are recorded. The multiplication triple is used for circuit computation in a new batch only when the reuse count is less than a preset threshold and the integrity flag indicates that the historical verification was successful.
3. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, The execution process of the multi-party secure computation protocol supporting homomorphic encryption and secret sharing includes: each computation committee node uses the negotiated homomorphic encryption public key to encode the obtained secret sharing share into homomorphic ciphertext; multiple batches of homomorphic ciphertext are weighted and superimposed within the homomorphic encryption domain to obtain local aggregated ciphertext; the decryption committee executes a threshold decryption protocol on the local aggregated ciphertext, which directly outputs the additive secret share of the aggregation result to each computation node in the final step, without completely reconstructing the plaintext aggregation result; each computation node superimposes a task-specific mask generated by the current task seed onto the obtained additive secret share to form a masked share; subsequent statistical calculations are all completed within the secret sharing domain of the masked share.
4. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, Constructing the on-chain anchor data structure includes: writing the batch data encrypted package into object storage to obtain the object key; submitting the same batch data encrypted package to the content addressing storage system to obtain the content identifier; the on-chain anchor data structure includes at least the full-process traceability code, the encrypted package hash generated by the double hash algorithm, the content identifier, the access policy identifier, and the submission timestamp.
5. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, The method for generating the full-process traceability code includes: assigning a unique batch identifier to each batch of grain products; the trusted execution environments for planting, purchasing, transportation, and storage processes mapping the batch identifier, the embedded data digest of the current process, and the metadata of the process into traceability code fragments according to predefined process coding functions; the coordinator trusted execution environment collecting traceability code fragments from each process, concatenating them with the batch identifier, and then calculating the full-process traceability code using an anti-collision hash function.
6. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, The calculation of batch quality control vector share in the secret shared domain includes: each subject's trusted execution environment extracts weight, timestamp sequence, temperature and humidity sequence, ownership identifier, quality inspection results, and energy consumption data indicators based on the batch view of this stage; under the coordination of the coordinator's trusted execution environment, each participating node calculates cross-stage weight consistency deviation, time continuity deviation, temperature and humidity link deviation, ownership transfer consistency deviation, quality difference aggregation deviation, and energy consumption rationality deviation in the secret shared domain based on the secret shared share, forming a scenario-based deviation vector; then, through a preset weighting matrix and difference matrix, the scenario-based deviation vector is converted into a structured risk vector in the secret shared domain.
7. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, The generation of the batch zero-knowledge proofs includes: the proof committee generating input commitments based on the homomorphic commitment operator of the lattice hard problem for all original share index hash sets associated with this computation task, the identity identifiers of the trusted execution environments of each data subject, the task mask seed, and the task parameters; and constructing a zero-knowledge proof circuit to prove that the aggregated output result is correctly calculated by the original data share corresponding to the input commitment through the multi-party secure computation protocol that supports a hybrid of homomorphic encryption and secret sharing, and that no intermediate plaintext result is reconstructed during the computation process.
8. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, The consensus and storage process using the batch-oriented Byzantine fault-tolerant consensus protocol includes: the consensus committee aggregating the hash sequences of one or more batches of on-chain anchor data structures to generate the block root hash; each consensus node signing the block root hash using its own private key, and the aggregation node aggregating the signatures of a single node that reach a threshold number; and writing the block root hash and the aggregated signature into the consortium blockchain ledger.
9. The data trust processing method based on multi-party secure computation and consortium blockchain according to claim 1, characterized in that, After the authorization request verified by the consortium blockchain smart contract is approved, a capability token is generated. The capability token is encoded with a target batch set, statistical indicator template, privacy budget parameters, result accuracy constraints, and task validity period, which are used to constrain the execution scope of the server-side multi-party secure computation protocol.
10. A data trusted processing system based on multi-party secure computation and consortium blockchain for implementing the method of any one of claims 1 to 9, characterized in that, include: Multiple edge-side trusted execution environment units are deployed on embedded edge gateways or servers in various stages of planting, purchasing, transportation, and warehousing to collect embedded device data in this stage, generate traceability code fragments and secret shared shares of original data indicators; The coordinator trusted execution environment unit is used to receive traceability code fragments from each stage to reconstruct the full-process traceability code, coordinate each edge-side trusted execution environment unit to execute a lightweight multi-party secure computation protocol for edge computing to calculate the batch quality control vector, and reconstruct and encrypt the batch quality control vector to generate a batch data ciphertext package. The storage cluster includes an object storage subsystem and a content-addressed storage subsystem, used to store the batch data encrypted packets and provide corresponding object keys and content identifiers; The consortium blockchain network consists of multiple consensus nodes that run smart contracts for verifying authorization requests and generating capability tokens, as well as a batch-anchor-oriented Byzantine fault-tolerant consensus protocol for consensus and storage of on-chain anchor data structures containing the full-process traceability code, ciphertext hash, and content identifier. The server-side multi-party secure computing cluster consists of multiple server nodes with trusted execution environment capabilities. It is used to form a computing committee, a decryption committee, and a proof committee based on the capability token, and to execute a multi-party secure computing protocol that supports homomorphic encryption and secret sharing to complete the aggregated statistical calculation, controlled reconstruction, and batch generation of zero-knowledge proofs for multiple batches of secret sharing shares. The units operate in concert to perform the data trust processing method as described in claim 1.