A data privacy protection method based on multi-party secure computation and blockchain
By combining multi-party secure computation and blockchain technology, and employing Kronecker perturbation coding, SHA-256 hashing, and the Soft-DTW algorithm, an access behavior graph and a low-dimensional embedding space are constructed. This solves the problems of low computational efficiency and inadequate privacy protection in cross-institutional data sharing, achieving efficient, secure, and transparent privacy protection in data computation.
Patent Information
- Application Number
- CN202511309034.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing technologies struggle to improve computational efficiency and accuracy while ensuring data privacy in cross-institutional or cross-domain data sharing and collaborative computing. Furthermore, blockchain technology carries the risk of privacy leaks during efficient storage and computation processes.
By combining multi-party secure computation and blockchain technology, and employing Kronecker perturbation coding, SHA-256 hashing, Soft-DTW similarity computation, and graph embedding methods, the blockchain ensures the transparency and immutability of task execution, monitors access behavior in real time and performs anomaly detection, and constructs an access behavior graph and a low-dimensional embedding space to achieve traceability and legality verification of data computation.
It improves the efficiency and privacy protection of data computing, ensures the security and trustworthiness of the data computing process, can detect abnormal behavior in a timely manner, prevents malicious access, enhances the traceability and transparency of data, and solves the problems of low privacy protection efficiency and difficulty in behavior tracing in existing technologies.
Smart Images

Figure CN121118110B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data privacy protection, and particularly relates to a data privacy protection method based on multi-party secure computation and a blockchain. BACKGROUND
[0002] With the increasingly serious problem of data privacy protection, especially in cross-institutional or cross-domain data sharing and joint computing, how to perform efficient multi-party computation under the premise of ensuring data privacy has become an important research direction. Traditional privacy protection technologies, such as data encryption, anonymization and differential privacy, although can effectively protect the privacy of data, have many limitations in practical application. First, traditional encryption technology usually needs to encrypt and decrypt a large amount of data, which in the case of large data and complex computation, is easy to cause performance bottleneck. Second, although the anonymization method can hide the identity information of the user, it often reduces the utility of the data, especially in the case of requiring accurate data analysis and processing, anonymization may cause loss of information. Differential privacy technology can maintain the utility of data to some extent, but still faces the trade-off problem between privacy leakage and data accuracy. Therefore, how to protect data privacy while improving the efficiency and accuracy of data computation has become a difficulty in current technology.
[0003] With the development of blockchain technology and multi-party secure computation (MPC) technology, new solutions have begun to be proposed. As a distributed ledger technology, blockchain can provide decentralized trust assurance and tamper-proof records, thereby providing a new trusted framework for multi-party computation. Data storage and task management on the blockchain not only ensures the transparency of the computing task, but also effectively prevents data tampering and malicious behavior. However, although the blockchain technology has advantages in data protection, it still has some problems, especially in the privacy protection of efficient storage and computation. The data records on the blockchain are tamper-proof, which ensures the security of the data, but if there is no appropriate privacy protection mechanism, the data on the blockchain may still face the risk of leakage.
[0004] Therefore, how to provide a data privacy protection method based on multi-party secure computation and a blockchain is a problem that those skilled in the art need to solve. SUMMARY
[0005] One purpose of the present application is to provide a data privacy protection method based on multi-party secure computation and blockchain, which combines multi-party secure computation and blockchain technology, improves data privacy protection and computing efficiency through Kronecker perturbation coding, SHA-256 hashing, Soft-DTW similarity calculation and graph embedding method, ensures the transparency and tamper resistance of task execution through blockchain, monitors access behavior in real time and detects abnormalities. The access behavior graph and low-dimensional embedding space constructed realize the traceability and legality verification of data calculation, solve the problems of low privacy protection efficiency and difficult behavior tracing in the prior art, and have significant innovation and practical application value.
[0006] According to the data privacy protection method based on multi-party secure computation and blockchain, the method comprises the following steps:
[0007] Step one: a multi-party secure computation task request is created by a task initiator, and is distributed to each participant node through a task record module;
[0008] Step two: each participant performs Kronecker perturbation coding on local original data based on task initialization information, and performs hash processing through a SHA-256 hash algorithm to generate a perturbation hash value;
[0009] Step three: each access behavior of each participant during task execution is recorded to generate an access behavior trajectory sequence;
[0010] Step four: the Soft-DTW distance between the currently generated access behavior trajectory sequence and the historical access trajectory sequence stored on the blockchain is calculated, and an access behavior graph is constructed;
[0011] Step five: an adjacency matrix and a Laplacian matrix are constructed based on the access behavior graph, and eigenvalue decomposition is performed to obtain a low-dimensional access embedding vector;
[0012] Step six: the Euclidean distance between the currently generated access embedding vector and each legal access embedding vector in a legal access embedding vector set is calculated as a similarity value, and if the similarity value is lower than a preset legal access threshold, the access request is aborted and an access exception record is generated;
[0013] Step seven: if the access embedding vector is legal, a result digest is generated and written into the task record module to form a verifiable and traceable privacy protection data calculation record.
[0014] Optionally, the step one is specifically:
[0015] The creating step of the multi-party secure computation task request created by the task initiator comprises:
[0016] constructing a data computing target configuration file, the data computing target configuration file including an input data type, an input data structure specification, an output result format requirement, and an intermediate computing state control parameter;
[0017] generating a unique task number based on the data computing target configuration file, and assigning an identity to each preset participant, the identity corresponding to a unique blockchain account address and a communication public key;
[0018] setting a Kronecker perturbation parameter set, the Kronecker perturbation parameter set including a submatrix dimension required for Kronecker expansion, a perturbation strength control factor, and a perturbation scope identifier;
[0019] constructing a task initialization data structure from the data computing target configuration file, the task number, the participant identity set, the Kronecker perturbation parameter set, and the communication public key of each participant;
[0020] a task initiator writes the task initialization data structure to a preset task record module through a blockchain data writing interface, the task record module being maintained by all participant nodes, used for completing on-chain registration and distribution of task information, the participant nodes being each participant, and the distribution being synchronously distributing the task initialization information to all participant nodes.
[0021] Optionally, the step two specifically includes:
[0022] Each participant determines the type and dimension of local raw data according to the Kronecker perturbation parameter set in the task initialization information, the local raw data being actual business data held by the participant, including structured data, unstructured text data, image data, and time series data.
[0023] missing value filling and normalization processing are performed on different types of data in the local raw data to generate raw data of a unified structure, and the raw data is stored in a matrix form to form a local raw data matrix.
[0024] The data matrix is divided into a plurality of submatrices according to the row and column numbers of the local raw data matrix, the dimension of each submatrix being determined by the submatrix dimension in the Kronecker perturbation parameter set.
[0025] Each divided submatrix is reorganized by Kronecker product to generate a Kronecker product structure, the Kronecker product structure being a structured low-rank matrix.
[0026] Each participant performs perturbation processing on the generated Kronecker product structure, the perturbation processing being injecting Gaussian noise into each element of the low-rank matrix, the Gaussian noise having a mean of 0 and a variance determined by a perturbation strength control factor and a perturbation scope identifier, to generate a perturbed matrix;
[0027] The perturbed matrix is expanded by row to generate a perturbation vector;
[0028] Each value of the perturbation vector and the corresponding calculation target configuration file, task number, participant identity set, and communication public key of each participant are spliced in a fixed order to form a continuous byte stream;
[0029] A unique perturbation hash value is generated based on the byte stream through SHA-256 hashing algorithm, and the hashing processing step specifically includes:
[0030] The input byte stream is divided into multiple data block sequences of 512 bits in size, and if the length of the byte stream is not a multiple of 512 bits, the byte stream is padded with zeros to a multiple of 512 bits;
[0031] The data block sequence is divided into 8 independent data blocks, and 8 intermediate storage variables are set for each data block, the initial value of the variable being a pre-set fixed integer value;
[0032] For each data block, the first 32-bit segment is extracted as an initial data segment, and 64 data segments are expanded based on the initial data segment, each data segment having a length of 32 bits;
[0033] The 64 data segments expanded for each data block are each subjected to an AND operation with the corresponding intermediate variable value;
[0034] The current intermediate variable value finally obtained for each data block is added to the corresponding initial data segment as the output value after processing of the corresponding data block is completed;
[0035] The 8 32-bit output values obtained from the 8 independent data blocks are spliced in order to obtain a final digest value having a length of 256 bits;
[0036] The final digest value is converted to hexadecimal representation to generate a unique perturbation hash value;
[0037] Each participant constructs the generated perturbation vector and perturbation hash value into a data input structure, and writes it to the task input area under the corresponding task number through a blockchain data writing interface to form traceable task data records.
[0038] Optionally, the step three specifically includes:
[0039] Each participant records each data access behavior, the access behavior including a disturbance hash value, an access time, and an access identity which is an identity of the participant corresponding to the access request;
[0040] The various access behavior information is sorted in time sequence to generate an access behavior trajectory sequence, the access behavior trajectory sequence being composed of a plurality of time-ordered access behavior vectors corresponding to each access behavior of the participants;
[0041] The access trajectory sequence is written in time sequence on the blockchain through a blockchain data writing interface into a task record module of the corresponding task.
[0042] Optionally, the step four is specifically:
[0043] The Soft-DTW distance between each access behavior vector in the currently generated access behavior trajectory sequence and each access behavior vector in the historical access trajectory sequence stored on the blockchain;
[0044] The Soft-DTW distances between each access behavior vector are averaged to obtain the Soft-DTW distance between the current access behavior trajectory sequence and any historical access behavior trajectory sequence;
[0045] If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access behavior trajectory sequence is lower than a preset threshold, it is determined that the current access behavior is a path repeated access, and there is a malicious access risk, and the execution of the current task is suspended;
[0046] If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access behavior trajectory sequence is greater than the preset threshold, the Soft-DTW path judgment result is legal, and an access behavior graph is constructed based on the current access behavior trajectory sequence, the nodes in the access behavior graph representing an access behavior, and each edge representing a time sequence relationship between two access behaviors.
[0047] Optionally, the step five is specifically:
[0048] Based on the access behavior graph, an adjacency matrix is constructed, the step of constructing the adjacency matrix being:
[0049] If two nodes in the access behavior graph are connected by an edge, the element value in the corresponding adjacency matrix is 1;
[0050] If two nodes in the access behavior graph are not connected by an edge, the element value in the corresponding adjacency matrix is 0;
[0051] A Laplacian matrix of the access behavior graph is constructed based on an adjacency matrix, the Laplacian matrix being a difference between a degree matrix of nodes and the adjacency matrix, the degree of the nodes being a number of connections of each node;
[0052] Eigenvalue decomposition is performed on the Laplacian matrix, and the first k eigenvalues and eigenvectors are selected as low-dimensional access embedding vectors, the k being a dimension of an embedding space.
[0053] Optionally, the step six is specifically:
[0054] The current generated access embedding vector is compared with a set of legal access embedding vectors stored in the blockchain, the set of legal access embedding vectors being defined and stored by a task initiator at task initialization and containing legal embedding representations of all historical access behaviors;
[0055] The comparison is to calculate Euclidean distances between the current generated access embedding vector and each legal access embedding vector in the set of legal access embedding vectors as similarity values:
[0056] If the calculated similarity values are all lower than a preset legal access threshold, it is determined that the current access behavior does not conform to a legal access rule, belongs to an illegal or abnormal access request, and the access request is aborted;
[0057] An access exception record is generated and written into an audit area in the blockchain, the exception record being all information of the abnormal access behavior, including an access time, an identity of a participant, a requested task number, a current access embedding vector and a maximum similarity value with a legal access embedding vector.
[0058] Optionally, the step seven is specifically:
[0059] If the calculated similarity values exist and are higher than the preset legal access threshold, it is determined that the current access behavior conforms to the legal access rule, and the current access embedding vector is recorded;
[0060] Each item of data generated in the current access embedding vector calculation process is packaged to obtain a result digest, the each item of data including a corresponding perturbation vector, a perturbation hash value, an access behavior trajectory sequence and an access embedding vector;
[0061] The result digest is written into a task record module through a blockchain data writing interface, to form verifiable, traceable and privacy-protected data calculation records.
[0062] The present application has the following beneficial effects:
[0063] By the data privacy protection method based on multi-party secure computation and blockchain provided by the present application, we solve a plurality of problems existing in the prior art. The existing multi-party computation and privacy protection scheme usually faces problems such as low computational efficiency, imperfect privacy protection mechanism, difficulty in data verification and behavior traceability, etc. In contrast, by adopting the Kronecker perturbation encoding technology and SHA-256 hash algorithm, the present application can provide effective privacy protection during data computation, while realizing transparent recording and non-tamperability of data through blockchain technology, ensuring the security and credibility of the data computation process. By introducing the Soft-DTW algorithm, the similarity of the access behavior and historical behavior of the participants can be effectively evaluated, ensuring the timely discovery and processing of abnormal behavior during task execution, preventing malicious access and identity spoofing. More importantly, by constructing an access behavior graph and using graph embedding technology for low-dimensional space mapping, the access path and computation task of the data are more controllable under the premise of privacy protection, and more accurate and transparent audit information can be provided in the subsequent verification process. By combining these technologies and methods, the present application not only improves the computational efficiency, but also enhances the traceability and transparency of data privacy protection, ensuring data protection and legality verification in the multi-party secure computation environment, and has significant innovation and practical application value. BRIEF DESCRIPTION OF DRAWINGS
[0064] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, illustrate the present application together with the embodiments thereof, and explain the present application, and do not constitute a limitation of the present application. In the drawings:
[0065] Fig. 1 The overall flowchart of the data privacy protection method based on multi-party secure computation and blockchain provided by the present application;
[0066] Fig. 2 The perturbation hash value generation process chart of the data privacy protection method based on multi-party secure computation and blockchain provided by the present application;
[0067] Fig. 3 The Soft-DTW path judgment and behavior verification flowchart of the data privacy protection method based on multi-party secure computation and blockchain provided by the present application. DETAILED DESCRIPTION
[0068] The present application will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, and only illustrate the basic structure of the present application in a schematic manner, and therefore only show the components related to the present application.
[0069] REFERENCE Figs. 1-3 A data privacy protection method based on multi-party secure computation and blockchain, comprising the following steps:
[0070] Step one: Create a multi-party secure computing task request by the task initiator, and distribute it to each participant node through the task record module;
[0071] Step two: Each participant encodes the local raw data based on the task initialization information, and generates a disturbance hash value through SHA-256 hashing algorithm;
[0072] Step three: Record each participant's access behavior during the task execution, and generate an access behavior trajectory sequence;
[0073] Step four: Calculate the Soft-DTW distance between the current generated access behavior trajectory sequence and the historical access trajectory sequence stored on the blockchain, and construct an access behavior graph;
[0074] Step five: Based on the access behavior graph, construct an adjacency matrix and a Laplacian matrix, and perform eigenvalue decomposition to obtain a low-dimensional access embedding vector;
[0075] Step six: Calculate the Euclidean distance between the current generated access embedding vector and each legal access embedding vector in the legal access embedding vector set as the similarity value, if the similarity value is lower than the preset legal access threshold, then abort the access request and generate an access anomaly record;
[0076] Step seven: If the access embedding vector is legal, generate a result summary and write it to the task record module to form a verifiable, traceable privacy protection data calculation record.
[0077] This step provides a data privacy protection method combining multi-party secure computing and blockchain. Through Kronecker disturbance encoding and SHA-256 hashing algorithm, data privacy is ensured, and through blockchain technology, the transparency and tamper resistance of task execution are guaranteed. The Soft-DTW algorithm is used for similarity calculation of access behavior, effectively monitoring illegal access behavior and aborting the task when an abnormal situation occurs, generating an access anomaly record. By constructing an access behavior graph and a low-dimensional embedding vector, not only the security of the data calculation process is guaranteed, but also the data verification and behavior tracing ability is improved, realizing the organic combination of privacy protection and calculation transparency.
[0078] In this embodiment, the step one is specifically:
[0079] The creation step of creating a multi-party secure computing task request by the task initiator includes:
[0080] A data calculation target configuration file is constructed, which includes input data type, input data structure specification, output result format requirement and intermediate calculation state control parameter;
[0081] generate a unique task number based on the data calculation target profile, and assign an identity to each preset participant, which corresponds to a unique blockchain account address and a communication public key;
[0082] Set a set of Kronecker perturbation parameters, including the submatrix dimension required for Kronecker expansion, the perturbation strength control factor, and the perturbation scope identifier;
[0083] The data calculation target profile, the task number, the set of participant identity, the set of Kronecker perturbation parameters, and the communication public key of each participant are collectively constructed into a task initialization data structure;
[0084] The task initiator writes the task initialization data structure into the preset task record module through the blockchain data writing interface, the task record module is maintained by all participating nodes, which are used to complete the on-chain registration and distribution of task information, and the distribution is to synchronize and distribute the task initialization information to all participating nodes.
[0085] This step introduces a set of Kronecker perturbation parameters and blockchain identity in the task initialization stage by combining multi-party secure computation and blockchain technology, providing an efficient and secure framework for task distribution and execution. By constructing a data calculation target profile, generating a unique task number, and assigning an identity, it ensures that each participant can clearly define their role and authority in the data calculation process while protecting the privacy of the data. The introduction of Kronecker perturbation and perturbation parameter control factor enhances the privacy protection of the calculation result, and the task record module of the blockchain realizes the non-tamperability and transparent distribution of the task information. This method can improve data security, calculation compliance, and transparency, prevent malicious operations, and ensure the reliable execution of multi-party computation process.
[0086] In this embodiment, step two is specifically:
[0087] Each participant determines the type and dimension of the local raw data based on the set of Kronecker perturbation parameters in the task initialization information, the local raw data being the actual business data held by the participant, including structured data, unstructured text data, image data, and time series data;
[0088] The different types of data in the local raw data are respectively filled with missing values and normalized to generate raw data with a unified structure, and are stored in matrix form to form a local raw data matrix;
[0089] According to the number of rows and columns of the local original data matrix, the data matrix is divided into a plurality of sub-matrices, and the dimension of each sub-matrix is determined by the sub-matrix dimension in the Kronecker perturbation parameter set;
[0090] Each sub-matrix after division is reorganized by Kronecker product to generate a Kronecker product structure, which is a structured low-rank matrix;
[0091] Each participant performs perturbation processing on the generated Kronecker product structure, which is to inject Gaussian noise into each element of the low-rank matrix, and the mean of the Gaussian noise is 0, and the variance is determined by the perturbation strength control factor and the perturbation scope identifier. The injection of noise enhances the privacy protection of data while ensuring that the statistical characteristics of the data are not destroyed, and generates a perturbed matrix;
[0092] The perturbed matrix is expanded by row to generate a perturbation vector;
[0093] Each value of the perturbation vector and the corresponding calculation target configuration file, task number, participant identity set, and each participant communication public key are spliced into a continuous byte stream in a fixed order;
[0094] Based on the byte stream, a unique perturbation hash value is generated by SHA-256 hash processing, and the hash processing steps specifically include:
[0095] The input byte stream is divided into a plurality of data block sequences of 512 bits in size, and if the length of the byte stream is not a multiple of 512 bits, the byte stream is padded with zeros to a multiple of 512 bits;
[0096] The data block sequence is divided into 8 independent data blocks, and 8 intermediate storage variables are set for each data block, and the initial value of the variable is a pre-set fixed integer value;
[0097] For each data block, the first 32-bit segment is extracted as the initial data segment, and 64 data segments are expanded based on the initial data segment, each with a length of 32 bits;
[0098] The 64 data segments expanded for each data block are each ANDed with the corresponding intermediate variable value;
[0099] The current intermediate variable value obtained by each data block is added to the corresponding initial data segment as the output value after the corresponding data block processing is completed;
[0100] The 8 32-bit output values obtained by the 8 independent data blocks are spliced in order to obtain a final digest value with a length of 256 bits;
[0101] The final abstract value is converted into hexadecimal representation to generate a unique perturbation hash value;
[0102] Each participant constructs the generated perturbation vector and perturbation hash value into a data input structure and writes it to the task input area under the corresponding task number through the blockchain data write interface, forming a traceable task data record.
[0103] This step introduces Kronecker perturbation coding and SHA-256 hash algorithm in data privacy protection by combining multi-party secure computing and blockchain technology. Based on task initialization information, each participant fills in missing values and normalizes the business data held locally to ensure data consistency and effectiveness. After restructuring the data with Kronecker product structure, a low-rank matrix is generated and perturbed by Gaussian noise to enhance data privacy. In this process, the generation of perturbation vector and perturbation hash value ensures the data's non-tamperability and verifiability. Finally, the generated perturbation vector and hash value are written into the task record module through the blockchain, ensuring the traceability, transparency and security of the task data. The present application improves the data privacy protection capability while ensuring compliance and audit capability in the process of multi-party computing.
[0104] In this embodiment, step three is specifically:
[0105] Each participant records each data access behavior, including the perturbation hash value, access time, and access identity, which is the identity of the participant initiating the access request;
[0106] Each access behavior information is sorted in chronological order to generate an access behavior trajectory sequence, which is composed of multiple access behavior vectors sorted by time, and each access behavior vector corresponds to an access behavior of each participant;
[0107] The access trajectory sequence is written in chronological order on the blockchain through the blockchain data write interface and written into the task record module of the corresponding task.
[0108] The step ensures data access transparency and traceability in multi-party computation by recording each data access behavior of each participant. By sorting the access behavior trajectories in chronological order, the behavior history of each participant during task execution can be effectively displayed, and the behavior trajectories are written in chronological order to the blockchain. This not only enhances the security of data access, but also ensures the tamper-proofing and auditing ability of access behavior, making the entire computing process more transparent and compliant. Through the task recording module of the blockchain, all access behaviors can be permanently stored and verified at any time, thereby ensuring privacy protection and legal review during data processing.
[0109] In the embodiment, the step four is specifically:
[0110] The Soft-DTW distance between each access behavior vector in the currently generated access behavior trajectory sequence and each access behavior vector in the historical access trajectory sequence stored on the blockchain is calculated by the participant;
[0111] The Soft-DTW distances between each access behavior vector are averaged and weighted to obtain the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence;
[0112] If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence is lower than a preset threshold, it is determined that the current access behavior is a path repeated access, there is a risk of malicious access, and the execution of the current task is suspended;
[0113] If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence is greater than the preset threshold, the Soft-DTW path judgment result is legal, and an access behavior graph is constructed based on the current access behavior trajectory sequence, wherein the nodes in the access behavior graph represent an access behavior, and each edge represents the time sequence relationship between two access behaviors.
[0114] The step provides an effective way to judge the legality of access behavior by calculating the Soft-DTW distance between the currently generated access behavior trajectory sequence and the historical access trajectory sequence stored on the blockchain. Specifically, the participant averages and weights the Soft-DTW distance between each access behavior vector to obtain the overall similarity measure between the current access behavior trajectory sequence and the historical access trajectory sequence. By constructing an access behavior graph, the access behavior of each participant can be further analyzed and verified to ensure privacy protection and data security during computation.
[0115] In the embodiment, the step five is specifically:
[0116] Based on the access behavior graph, an adjacency matrix is constructed, and the step of constructing the adjacency matrix is:
[0117] If there is an edge connection between two nodes in the access behavior graph, the element value in the corresponding adjacency matrix is 1;
[0118] If there is no edge connection between two nodes in the access behavior graph, the element value in the corresponding adjacency matrix is 0;
[0119] Based on the adjacency matrix, a Laplacian matrix of the access behavior graph is constructed, and the Laplacian matrix is the difference between the degree matrix of the node and the adjacency matrix, and the degree of the node is the number of connections of each node;
[0120] The Laplacian matrix is subjected to eigenvalue decomposition, and the first k eigenvalues and eigenvectors are selected as low-dimensional access embedding vectors, and k is the dimension of the embedding space.
[0121] This step constructs an adjacency matrix and calculates a Laplacian matrix, and uses the Laplacian matrix for eigenvalue decomposition, and selects the first k eigenvalues and corresponding eigenvectors as low-dimensional access embedding vectors. This process not only effectively extracts the structural information in the access behavior graph, but also ensures that the low-dimensional embedding vectors can retain the main features of the graph, thereby providing effective support for subsequent legality verification and task execution.
[0122] In this embodiment, the step six is specifically:
[0123] The current generated access embedding vector is compared with a set of legal access embedding vectors stored in the blockchain, and the set of legal access embedding vectors is defined and stored by the task initiator at the task initialization, and contains the legal embedding representation of all historical access behaviors;
[0124] The comparison is to calculate the Euclidean distance between the current generated access embedding vector and each legal access embedding vector in the set of legal access embedding vectors as a similarity value:
[0125] If the calculated similarity value is lower than the preset legal access threshold, it is determined that the current access behavior does not comply with the legal access rule, and belongs to illegal or abnormal access request, and the access request is terminated;
[0126] An access exception record is generated and written into an audit area in the blockchain, ensuring that all abnormal access behaviors are stored in the blockchain in a traceable and tamper-proof manner, and the exception record is all information of the abnormal access behavior, including access time, participant identity, requested task number, current access embedding vector and maximum similarity value with legal access embedding vector.
[0127] The step provides an efficient access behavior legality verification mechanism by comparing the currently generated access embedding vector with the set of legal access embedding vectors stored in the blockchain. If all the calculated similarity values are lower than the preset legal access threshold, the current access behavior is determined to be illegal or abnormal, and the access request is terminated to prevent potential malicious behavior or data leakage. At the same time, an access exception record is generated, which records the detailed information of the abnormal access behavior and is written into the audit area in the blockchain, ensuring the transparency and traceability of the access behavior, and the data is tamper-proof, ensuring the compliance and security of the task execution process.
[0128] In the embodiment, the step seven is specifically:
[0129] If the calculated similarity value is higher than the preset legal access threshold, it is determined that the current access behavior meets the legal access rules, and the current access embedding vector is recorded.
[0130] Packing each item of data generated in the current access embedding vector calculation process to obtain a result digest, the data including the corresponding perturbation vector, perturbation hash value, access behavior trajectory sequence and access embedding vector.
[0131] Write the result digest into the task record module through the blockchain data writing interface to form a verifiable and traceable privacy protection data calculation record.
[0132] This step generates a result digest after legal access verification to ensure the transparency and traceability of data calculation. This process ensures that only legal access behavior can enter subsequent data calculation. The result digest is packed and generated, and can be used as a complete record of task calculation results, and is written into the task record module. Not only improves the privacy protection ability of data, but also enhances the transparency and data security of task execution, ensuring that each operation in multi-party secure calculation can be audited and verified.
[0133] Example 1:
[0134] In order to verify the feasibility of the application in the implementation, the application is applied to a certain medical data sharing project. At present, the multi-party data cooperation in the medical industry faces the risk of patient privacy leakage, especially when multiple hospitals or medical institutions jointly conduct data analysis, how to ensure the data privacy of the participating parties while ensuring the transparency and compliance of the calculation process has become a problem to be solved. The scheme of the application provides a novel solution, which effectively solves the problems of data privacy protection, calculation efficiency and legality verification by combining multi-party secure calculation (MPC) and blockchain technology.
[0135] In this project, three hospitals jointly cooperate to train a disease prediction model using each other's patient data. Each hospital provides its own patient data, but since the data contains sensitive information such as patient medical records, diagnosis results, etc., sharing these data alone may lead to privacy leakage. Therefore, hospitals hope to share information and jointly train the model in a secure computing environment without leaking patient data. The method of the invention can exactly meet this demand.
[0136] In this scenario, first, a multi-party secure computing task request is created by the task initiator (such as the project leader), and the task is to jointly train a disease prediction model. The task number and the identity of each participant are also defined with the task request. When the task request is initialized, all participants receive the task initialization information, which includes a set of Kronecker perturbation parameters. According to these parameters, each hospital preprocesses its local raw patient data, divides the data into sub-matrices, and reorganizes them through Kronecker product to form a Kronecker product structure. To ensure data privacy, each hospital injects Gaussian noise into the structure to form a perturbed data matrix.
[0137] Next, the hospital expands the generated perturbed data into a perturbed vector and generates a unique perturbed hash value based on this vector and the task number, hospital identity, etc. The perturbed vector and the perturbed hash value are packaged into a data input structure and uploaded to the task record module on the blockchain through the block link interface. This process ensures that all data inputs are securely stored and recorded on the blockchain and cannot be tampered with or forged.
[0138] In the multi-party secure computing process, each hospital uses its own perturbed data vector as a computing input, combines the historical access trajectory information on the blockchain, and calculates the similarity between the current access trajectory and the historical trajectory using the Soft-DTW algorithm. If the similarity of a hospital's access behavior to the historical behavior is below a preset threshold, the hospital's access behavior will be judged as repeated access, which may pose a security risk, and the task execution will be suspended. Otherwise, if the similarity value meets the legal access requirements, the hospital's access behavior will be allowed and the computing task will continue.
[0139] As the computation progresses, hospitals gradually build an access behavior graph and perform eigenvalue decomposition based on the adjacency matrix and Laplacian matrix of the graph to obtain low-dimensional access embedding vectors. Through these low-dimensional vectors, the access patterns and behavior characteristics of each hospital can be effectively represented, providing a basis for subsequent legality verification and data computation.
[0140] During the task execution process, each hospital continuously records its access behavior each time, and generates an access behavior trajectory sequence according to the time sequence of all access behaviors. All access behavior data are synchronized to the blockchain in real time to ensure that each operation step has a traceable record. Once the task is completed, all hospitals jointly generate a result summary, and the summary is written to the task record module through the blockchain to form a transparent, verifiable and tamper-proof data calculation record.
[0141] In order to verify the effectiveness of the scheme of the present application, we collected comparative data in terms of calculation time, data privacy protection effect and calculation compliance before and after data calculation.
[0142] Table 1 Comparison of experimental data
[0143]
[0144]
[0145] As can be seen from Table 1, compared with the traditional method, the method of the present application has significant advantages in data privacy protection, calculation transparency and compliance verification. Especially in the recording of data access behavior and the control of data privacy leakage risk, the present application greatly reduces the risk of privacy leakage through the combination of blockchain and MPC, and ensures the traceability of the calculation process through transparent blockchain records. The calculation time is also relatively shortened, indicating that through the efficient MPC protocol and perturbation encoding method, the calculation efficiency can be improved under the premise of ensuring privacy. The present application can effectively solve the problem of data privacy protection in a multi-party cooperation environment, and through the combination of blockchain and MPC, the transparency and security of the data calculation process are improved, which has a wide application prospect.
[0146] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can make equivalent replacement or change according to the technical solution and inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for data privacy protection based on multi-party secure computation and blockchain, characterized in that, Comprise the following steps: Step one: create a multi-party secure computing task request by the task initiator, and distribute it to each participant node through the task record module; Step two: each participant encodes the local raw data based on the task initialization information, and generates a disturbance hash value by hashing it with the SHA-256 algorithm; Step three: record each participant's access behavior during the task execution, and generate an access behavior trajectory sequence; Step four: calculate the Soft-DTW distance between the current generated access behavior trajectory sequence and the historical access trajectory sequence stored on the blockchain, and construct an access behavior graph; Step five: based on the access behavior graph, construct an adjacency matrix and a Laplacian matrix, and perform eigenvalue decomposition to obtain a low-dimensional access embedding vector; Step six: calculate the Euclidean distance between the current generated access embedding vector and each legal access embedding vector in the legal access embedding vector set as the similarity value, if the similarity value is lower than the preset legal access threshold, then abort the access request and generate an access exception record; Step seven: if the access embedding vector is legal, generate a result summary and write it to the task record module to form a verifiable, traceable privacy protection data calculation record.
2. The method of claim 1, wherein, The step one is specifically: The creation step of creating a multi-party secure computing task request by the task initiator comprises: Construct a data calculation target configuration file, which includes input data type, input data structure specification, output result format requirement and intermediate calculation state control parameter; Generate a unique task number based on the data calculation target configuration file, and assign an identity to each preset participant, which corresponds to a unique blockchain account address and a communication public key; Set a Kronecker disturbance parameter set, which includes the submatrix dimension required for Kronecker expansion, the disturbance strength control factor and the disturbance scope identifier; The data calculation target configuration file, task number, participant identity set, Kronecker disturbance parameter set and participant communication public key are jointly constructed as a task initialization data structure; The task initiator writes the task initialization data structure to the preset task record module through the blockchain data writing interface, which is maintained by all participant nodes for on-chain registration and distribution of task information, and the participant nodes are each participant, and the distribution is to synchronize the task initialization information to all participant nodes.
3. The method of claim 1, wherein, The step two is specifically: Each participant determines the type and dimension of the local raw data according to the Kronecker disturbance parameter set in the task initialization information, the local raw data being the actual business data held by the participant, including structured data, unstructured text data, image data and time series data; The missing values in the local raw data of different types are filled and normalized respectively to generate uniform structure raw data, which is stored in matrix form to form a local raw data matrix; According to the number of rows and columns of the local original data matrix, the data matrix is divided into multiple sub-matrices, and the dimension of each sub-matrix is determined by the sub-matrix dimension in the Kronecker perturbation parameter set; Each sub-matrix after division is reorganized by Kronecker product to generate a Kronecker product structure, which is a structured low-rank matrix; Each participant performs perturbation processing on the generated Kronecker product structure, which is to inject Gaussian noise into each element of the low-rank matrix, and the mean of the Gaussian noise is 0, and the variance is determined by the perturbation intensity control factor and the perturbation scope identifier, to generate a perturbed matrix; The perturbed matrix is expanded by row to generate a perturbation vector; Each value of the perturbation vector and the corresponding calculation target configuration file, task number, participant identity set, and each participant communication public key are concatenated in a fixed order to form a continuous byte stream; Based on the byte stream, a unique perturbation hash value is generated by SHA-256 hash processing, and the hash processing steps specifically include: The input byte stream is divided into multiple data block sequences of 512 bits in size, and if the length of the byte stream is not a multiple of 512 bits, the byte stream is padded with zeros to a multiple of 512 bits; The data block sequence is divided into 8 independent data blocks, and 8 intermediate storage variables are set for each data block, with the initial value of the variable being a pre-set fixed integer value; For each data block, the first 32-bit segment is extracted as the initial data segment, and 64 data segments are expanded based on the initial data segment, each with a length of 32 bits; The 64 data segments expanded for each data block are each ANDed with the corresponding intermediate variable value; The current intermediate variable value obtained for each data block is added to the corresponding initial data segment as the output value after processing of the corresponding data block is completed; The 8 32-bit output values obtained from the 8 independent data blocks are concatenated in order to obtain a final digest value with a length of 256 bits; The final digest value is converted to hexadecimal representation to generate a unique perturbation hash value; Each participant constructs the generated perturbation vector and perturbation hash value into a data input structure and writes it to the task input area under the corresponding task number through the blockchain data write interface to form traceable task data records.
4. The method of claim 1, wherein, The step three is specifically: Each participant records each data access behavior, and the access behavior includes the perturbation hash value, the access time, and the access identity, which is the identity of the participant initiating the access request; The access behavior information is sorted in time order to generate an access behavior trajectory sequence, which is composed of multiple time-ordered access behavior vectors, and each access behavior vector corresponds to an access behavior of each participant; The access trajectory sequence is written in time order in the task record module of the corresponding task on the blockchain through the blockchain data write interface.
5. The method of claim 1, wherein, The step four is specifically: The Soft-DTW distance between each access behavior vector in the current generated access behavior trajectory sequence and each access behavior vector in the historical access trajectory sequence stored on the blockchain is calculated by the participant; The Soft-DTW distance between each access behavior vector is averaged to obtain the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence; If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence is lower than the preset threshold, it is determined that the current access behavior is a path repeated access, there is a malicious access risk, and the execution of the current task is suspended; If the Soft-DTW distance between the current access behavior trajectory sequence and any historical access trajectory sequence is greater than the preset threshold, the Soft-DTW path judgment result is legal, and an access behavior graph is constructed based on the current access behavior trajectory sequence, wherein the nodes in the access behavior graph represent an access behavior, and each edge represents the time sequence relationship between two access behaviors.
6. The method of claim 1, wherein, The step five is specifically: Based on the access behavior graph, an adjacency matrix is constructed, and the step of constructing the adjacency matrix is: If there is an edge connection between two nodes in the access behavior graph, the element value in the corresponding adjacency matrix is 1; If there is no edge connection between two nodes in the access behavior graph, the element value in the corresponding adjacency matrix is 0; Based on the adjacency matrix, a Laplacian matrix of the access behavior graph is constructed, and the Laplacian matrix is the difference between the degree matrix of the node and the adjacency matrix, wherein the degree of the node is the number of connections of each node; The Laplacian matrix is subjected to eigenvalue decomposition, and the first k eigenvalues and eigenvectors are selected as low-dimensional access embedding vectors, wherein k is the dimension of the embedding space.
7. The method of claim 1, wherein, The step six is specifically: The current generated access embedding vector is compared with a set of legal access embedding vectors stored in the blockchain, and the set of legal access embedding vectors is defined and stored by the task initiator at the task initialization, and contains the legal embedding representation of all historical access behaviors; The comparison is to calculate the Euclidean distance between the current generated access embedding vector and each legal access embedding vector in the set of legal access embedding vectors as a similarity value: If the calculated similarity value is lower than the preset legal access threshold, it is determined that the current access behavior does not comply with the legal access rule, and belongs to illegal or abnormal access request, and the access request is terminated; An access exception record is generated and written into an audit area in the blockchain, and the exception record is all information of the abnormal access behavior, including access time, participant identity, requested task number, current access embedding vector and maximum similarity value with the legal access embedding vector. 8.The method of claim 1, wherein, The step seven is specifically: If the calculated similarity value is higher than the preset legal access threshold, it is determined that the current access behavior complies with the legal access rule, and the current access embedding vector is recorded; The data generated in the current access embedding vector calculation process is packaged to obtain a result digest, and the data includes the corresponding perturbation vector, perturbation hash value, access behavior trajectory sequence and access embedding vector; The result summary is written into the task record module through the blockchain data writing interface, forming a verifiable, traceable and privacy-protected data calculation record.
Citation Information
Patent Citations
Transaction trajectory processing method
CN119203254A
Data security and privacy management method and system based on block chain technology
CN120234830A