Medical data security outsourcing calculation method and application system based on block chain
Through blockchain technology and the two-layer verification mechanism and random matrix encryption of the Bitcoin network, the insufficient computing power and privacy exposure of medical devices in large-scale data processing are solved, and efficient, secure and fair medical data outsourcing calculations are achieved. .
Patent Information
- Application Number
- CN202410854015.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, medical equipment may encounter insufficient computing power when processing large-scale data, which affects the efficiency and accuracy of solving optimization problems. The outsourcing computing solution fails to effectively protect the privacy information in medical data, and there is fraud. Risk leads to unfair payment behavior.
Adopt blockchain-based medical data security outsourcing calculation method to realize a two-layer verification mechanism through the Bitcoin network and a collection of validators to ensure the correctness of the calculation results and the fairness of payments, use random matrix encryption technology to protect data privacy, and use The Bitcoin blockchain system carries out fair payment protocols.
It improves the computing efficiency and accuracy of medical equipment under large-scale data, protects the private information of medical data, reduces the risk of fraud, and achieves fair payment behavior.
Smart Images

Figure CN119293806A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical data privacy protection, and in particular to a blockchain-based medical data security outsourcing calculation method and application system. Background Art
[0002] With the development of the medical Internet of Things, a large amount of valuable medical data has been generated. Researchers use medical data to model medical resource allocation, clinical pathway mining, patient health diagnosis and other issues as optimization problems to solve and obtain the best decision. With the rise of cloud computing, outsourced computing allows large-scale computing tasks to be outsourced to cloud servers on demand and paid the corresponding fees. Therefore, the accuracy of the cloud server's direct solution calculation of the encrypted optimization problem and the returned result becomes an important indicator for considering the system security performance.
[0003] Chinese patent publication number: CN116776389A, discloses a medical industry data security supervision system based on blockchain, wherein the server includes: a data acquisition module, used to acquire medical data stored in various medical institutions, upload the medical data to the blockchain for storage, and mark the medical institution from which the medical data comes as the data owner; a data subject module, used to identify the medical data to obtain the data subject of the medical data; an identity authentication module, used to acquire the access request of the client of the data subject, and when the access request of the data subject is acquired, authenticate the identity information of the data subject; a data feedback module, used to retrieve the medical data of the data subject from the blockchain according to the data subject corresponding to the identity information after the identity authentication is passed, and feedback to the client.
[0004] However, there are still the following problems in the prior art:
[0005] 1. In the existing technology, medical equipment may encounter the problem of insufficient computing power when processing large-scale data, which will affect the efficiency and accuracy of solving optimization problems;
[0006] 2. In the existing technology, based on the fact that medical data contains a large amount of private information, the outsourced computing solution represents the LP problem as a set of matrices and uses random matrices to encrypt the LP problem, thus hiding the information of the matrix element values. However, it does not take into account that the position of the matrix elements will expose private information.
[0007] 3. In the prior art, under the premise that the user is trustworthy, considering that the cloud server may return false calculation results, a solution is adopted in which the user himself completes the result verification. This does not take into account the possibility that the user may commit fraud, that is, after obtaining the correct result, he may claim that the result is wrong. The verification result with fraud risk will cause unfair payment behavior. Summary of the invention
[0008] To this end, the present invention provides a blockchain-based medical data security outsourcing calculation method and application system to overcome the problem in the prior art that medical equipment may have insufficient computing power when processing large-scale data, affecting the efficiency and accuracy of solving optimization problems, and at the same time, the privacy information in the medical data is exposed and there is a risk of fraud, resulting in unfair payment behavior.
[0009] To achieve the above objectives, the present invention provides a blockchain-based medical data security outsourcing calculation method, which includes:
[0010] Step S1, initializing the system before processing the LP problem Φ, the initialization includes:
[0011] Cloud service providers CSP and IoT medical devices PP that lack computing power join the Bitcoin network through local Bitcoin clients;
[0012] The resulting validator set RV, which consists of several validators, joins the network as a Bitcoin node;
[0013] Step S2: PP encrypts the LP problem Φ and sends the encrypted LP problem Φ k To CSP, PP generates a question summary transaction and anchors it to the blockchain;
[0014] Step S3, CSP confirms the encrypted LP problem Φ k The integrity of the PP and the prepayment compensation transaction are generated, and the PP generates a service fee transaction to prepay the service fee to the CSP;
[0015] Step S4, CSP solves the encrypted LP problem Φ k , to obtain the optimization result and the proof of the correctness of the result, send the optimization result and the proof of the correctness of the result to PP, and generate the optimization result summary transaction T solution And anchor it to the blockchain;
[0016] Step S5, based on the PP first verifying the correctness of the result of the LP problem, if the PP feedbacks that the result is wrong, the RV will receive an arbitration request from the PP, and verify the optimization result again, determine the final result based on the corresponding verification result, and obtain the corresponding fees of the PP and the CSP based on the final result;
[0017] Step S6: If the result fed back by PP is correct, PP decrypts the encrypted LP problem Φ k The best result.
[0018] Furthermore, in step S1, the algorithm for processing the LP problem Φ includes:
[0019] PP, CSP, and RV run the ECDSA signature generation algorithm, and given the input of the security parameter ε, output a pair of ECDSA public and private key pairs;
[0020] PP runs the key generation algorithm, given the input of security parameter ε, and outputs the key K used to encrypt the LP problem;
[0021] PP runs the LP problem encryption algorithm, inputting the one-time key K, the LP problem Φ and the PP private key sk PP , output encryption LP problem Φ K and a single Bitcoin transaction T with the problem summary problem ;
[0022] CSP runs the compensation payment algorithm and inputs the encrypted LP problem Φ K and CSP private key sk CSP , output a single Bitcoin transaction T with a lock time compensation as advance compensation;
[0023] PP runs the service fee payment algorithm and enters the PP private key sk pp , output a single Bitcoin transaction T with a lock time fee , to prepay the service fee;
[0024] CSP runs the solution algorithm and inputs the encrypted LP problem Φ K and CSP key sk CSP , optimization result y, result label S, proof Γ and Bitcoin transaction T with optimization result summary solution ,in,
[0025] If S = -1, it indicates an infeasible situation;
[0026] If S = 0, it means the unbounded situation;
[0027] If S = 1, it means that the optimization result y is the encrypted LP problem Φ K The optimal solution of
[0028] PP or RV runs a two-level verification algorithm, given a single optimization result y and a proof Γ, where
[0029] If the proof Γ passes the verification, then the verification result V=1 is output;
[0030] If the proof Γ fails the verification, the verification result V=0 is output;
[0031] PP runs the problem decryption algorithm, inputting the optimization result y, the result label S and the key K, where
[0032] If S = 1, then output the optimal solution of the LP problem Φ;
[0033] If S≠1, PP does not execute the decryption algorithm.
[0034] Furthermore, in the step S2, the process of the PP encrypting the LP problem Φ includes the PP converting the optimization problem existing in the PP into the LP problem Φ;
[0035] PP calls the function KeyGen() to generate a one-time key to encrypt the LP problem Φ;
[0036] PP calls the function LPEnc() to transform the LP problem Φ into an encrypted LP problem Φ K , and generate a problem summary transaction.
[0037] Furthermore, in step S3, the process of generating the prepayment compensation transaction and the PP prepaying the service fee to the CSP by generating the service fee transaction includes:
[0038] Prepaid Compensation Transaction: CSP Receives Encrypted LP ProblemΦ K and user ID problem After that, the function CPay() is called to pay the prepaid compensation, and the CSP tests the encrypted LP problem Φ K The effectiveness of calculating the encryption LP problem Φ K The hash summary H'(Φ K ) and use the user ID problem Search for Bitcoin transactions with problem summary on Bitcoin platform T problem The hash summary H(Φ K ),
[0039] If H'(Φ K )=H(Φ K ), then the encrypted LP problem Φ K Valid, CSP creates compensation transaction T compensation ;
[0040] Prepaid service fee: PP receives compensation transaction T compensation User ID compensation Then, call the EPay() function to pay the service fee.
[0041] PP searches for the user ID of the compensation transaction on the Bitcoin platform compensation Verify compensation transaction T compensation Validity,
[0042] If the compensating transaction T compensation If valid, PP uses the private key sk PP Signing service fee transaction T fee , and, anchor it on the Bitcoin network;
[0043] If the service fee transaction T fee If the verification is successful, the Bitcoin platform will transfer the service fee to T fee User ID fee Return to PP, PP will send the user ID fee Sent to CSP.
[0044] Furthermore, in step S4, the encrypted LP problem solution includes an optimal solution, an infeasible solution, and an unbounded solution.
[0045] If the encrypted LP problem Φ K If there is an optimal solution, the LP optimizer returns the result label S=1 and the optimization result y;
[0046] If the encrypted LP problem Φ K If there is no optimal solution, the LP optimizer returns a result label S=-1 to indicate an infeasible solution, or the LP optimizer returns a result label S=0 to indicate an unbounded solution.
[0047] Furthermore, in step S4, the optimization result summary transaction T is generated. solution The process includes,
[0048] CSP uses the hash function H() to generate the optimization result y and the summary H(y,Γ) of the proof Γ, and creates a Summary of optimization results for trade T solution .
[0049] Furthermore, in step S4, the process of obtaining the verification result includes:
[0050] PP calls the function Verify() to verify the correctness of the optimization result y and the proof Γ, including the first level verification and the second level verification, where:
[0051] The first layer of verification includes: PP calculates the hash summary H'(y,Γ) and uses the optimized result summary transaction T solution ID solution The hash summary H(y,Γ) searched on the Bitcoin platform,
[0052] If H'(y,Γ)=H(y,Γ), it means that the optimization result y and the proof Γ are valid.
[0053] PP performs the first level of verification, checking the correctness of the optimization result y based on the proof Γ.
[0054] Among them, PP must be in T fee The optimization result y is verified within the lock time t2, otherwise, the default optimization result y is correct after t2.
[0055] The second layer of verification includes: being executed by the verifier in RV when PP initiates the second verification request. Before the second layer of verification, PP creates a single multi-signature transaction T claim ,
[0056] Multi-signature transaction T claim As RV's consensus proof of the correctness of the optimization result y and the solution's result label S, the verifier executes the same verification strategy to verify the result.
[0057] If the verifier v i If the optimization result y or result label S does not meet the verification condition, then the verification unit v i Use its private key Sign multi-signature transaction T claim To support compensation for PP, where i∈(1,2,3,...,n), n represents the number of validators supporting compensation for PP;
[0058] If the verifier v i Determine that the optimization result y or the result label S meets the verification condition, then v i Will refuse to sign multi-signature transaction T claim ,
[0059] If there are more than m validators providing their private keys, where m∈(1,2,3,...,n) and Then the function Verify() returns the consensus result V=0;
[0060] If there are no more than m validators v i If the private key is provided, the function Verify() returns the consensus result V=1.
[0061] Furthermore, in step S5, the specific verification algorithm selected based on different situations of the encrypted LP problem solution includes:
[0062] If the result label S = 1, the optimization result y is Φ K The optimal solution of , proves that Γ=(s, t), then PP will check the correctness of the optimization result y returned by CSP through the first verification algorithm;
[0063] If S = -1, it means the encrypted LP problem Φ K Infeasible, prove Γ=(z,y), then PP calls the second verification algorithm to check the result returned by CSP;
[0064] If S = 0, it means the encrypted LP problem Φ K Unbounded, prove Γ=(z,s,t), then PP calls the third verification algorithm to check the result returned by CSP.
[0065] Furthermore, in step S5, the final result is determined according to the corresponding verification result.
[0066] If the first-layer verification proves that the optimization result y or the result label S is correct, or, after the lock time t2, the PP no longer requests the second-layer verification, or, the second-layer verification reaches a consensus, then the optimization result y or the result label S is considered correct, and the verification result V = 1;
[0067] If the first-level verification proves that the optimization result y or the result label S is incorrect, and the second-level verification reaches a consensus, the verification result V=0.
[0068] Furthermore, an application system for applying a blockchain-based medical data security outsourcing calculation method is also provided, which is characterized by comprising:
[0069] one or more processors;
[0070] Memory;
[0071] and one or more programs,
[0072] The one or more programs are configured to be executed by one or more processors, the memory includes a storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, it can be used to execute a blockchain-based medical data security outsourcing computing method.
[0073] Compared with the prior art, the present invention first initializes the system, the problem provider PP encrypts the LP problem and sends it to the cloud service provider CSP, and at the same time PP generates a problem summary transaction and anchors it to the blockchain, CSP confirms the integrity of the encrypted LP problem and generates an advance payment compensation transaction, PP generates a service fee transaction to prepay the service fee to CSP, CSP solves the encrypted LP problem to obtain the optimization result and sends it to PP, generates an optimization result summary transaction and anchors it to the blockchain, PP and the verifier set RV perform double-layer verification on the result, and PP completes the decryption step according to the verification result. The present invention implements a double-layer verification mechanism and a fair payment protocol based on blockchain technology, and provides a safe, reliable and efficient outsourced computing system for solving LP problems under large-scale data for medical equipment.
[0074] In particular, the present invention helps medical devices calculate large-scale optimization problems by outsourcing computing, transferring the high computing costs to the cloud server, and the medical devices themselves only need to pay the relevant service fees. For example, a health detection bracelet can quickly obtain the corresponding optimal decision to assist detection and diagnosis through outsourced computing of optimization problems, and for large-scale medical resource allocation problems, medical devices can obtain the optimal decision for resource allocation through outsourced computing, thereby alleviating the inability of medical devices to solve optimization problems under large-scale data, avoiding the exposure of privacy information, and reducing the possibility of unfair payment behavior caused by fraud risks.
[0075] In particular, the present invention transforms the optimization problem into a linear programming problem represented by vectors and matrices through an efficient and computable privacy protection method, and utilizes secure linear matrix transformation technology to protect the information of medical data. In actual situations, the outsourced computing solution represents the LP problem as a set of vectors / matrices, and uses a random matrix to encrypt the LP problem, thereby realizing information hiding of the matrix element values, but does not consider that the matrix element positions will expose privacy information. The present application encrypts the LP problem from two perspectives: the element value and position information of the problem matrix, thereby realizing information hiding of the element values in the matrix optimization problem and the element positions in the matrix, so as to protect the optimization problem information from being leaked, thereby alleviating the inability of medical equipment to solve optimization problems under large-scale data, avoiding the exposure of privacy information, and reducing the possibility of unfair payment behavior caused by fraud risks.
[0076] In particular, the present invention uses a low-cost two-layer verification mechanism, in which the medical device and the verifier node perform two verifications to obtain a credible consensus verification result. In actual situations, the existing verification scheme only considers that the cloud server will return false calculation results, and assumes that the user itself is credible, so the method of completing the result verification by the user himself is adopted. This method does not take into account that the user may also have fraudulent behavior, that is, after obtaining the correct result, he may claim that the result is wrong. The double-layer verification mechanism adopted in this application can not only prevent the cloud server from returning false calculation results, but also prevent the medical device from returning false verification results. It is suitable for the mutual distrust model between the cloud server and the Internet of Things device, thereby alleviating the inability of medical devices to solve optimization problems under large-scale data, avoiding the exposure of privacy information, and reducing the possibility of unfair payment behavior caused by fraud risks.
[0077] In particular, the present invention combines the proposed verification mechanism with the Bitcoin blockchain system through a fair payment protocol that does not require the participation of a trusted third party. In actual situations, the verification results based on the above-mentioned fraud risk will cause unfair payment behavior. This application is based on duality theory and blockchain technology to ensure payment fairness between cloud servers and medical devices, thereby alleviating the inability of medical devices to solve optimization problems under large-scale data, avoiding the exposure of privacy information, and reducing the possibility of unfair payment behavior due to fraud risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A schematic diagram of the steps of a blockchain-based medical data security outsourcing calculation method according to an embodiment of the invention;
[0079] Figure 2 This is a schematic diagram of the stages of a blockchain-based medical data security outsourcing application system according to an embodiment of the invention;
[0080] Figure 3 This is a flowchart of a blockchain-based medical data security outsourcing application system according to an embodiment of the invention. DETAILED DESCRIPTION
[0081] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0082] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0083] See also Figures 1 to 3 As shown, Figure 1 This is a schematic diagram of the steps of the blockchain-based medical data security outsourcing calculation method according to an embodiment of the invention. Figure 2 This is a schematic diagram of the stages of the blockchain-based medical data security outsourcing application system according to an embodiment of the invention. Figure 3 The flowchart of the medical data security outsourcing application system based on blockchain in the embodiment of the invention is as follows: The medical data security outsourcing calculation method based on blockchain in the embodiment of the invention includes:
[0084] Step S1, initializing the system before processing the LP problem Φ, the initialization includes:
[0085] Cloud service providers CSP and IoT medical devices PP that lack computing power join the Bitcoin network through local Bitcoin clients;
[0086] The resulting validator set RV, which consists of several validators, joins the network as a Bitcoin node;
[0087] Step S2: PP encrypts the LP problem Φ and sends the encrypted LP problem Φ k To CSP, PP generates a question summary transaction and anchors it to the blockchain;
[0088] Step S3, CSP confirms the encrypted LP problem Φ k The integrity of the PP and the prepayment compensation transaction are generated, and the PP generates a service fee transaction to prepay the service fee to the CSP;
[0089] Step S4, CSP solves the encrypted LP problem Φ k , to obtain the optimization result and the proof of the correctness of the result, send the optimization result and the proof of the correctness of the result to PP, and generate the optimization result summary transaction T solution And anchor it to the blockchain;
[0090] Step S5, based on the PP first verifying the correctness of the result of the LP problem, if the PP feedbacks that the result is wrong, the RV will receive an arbitration request from the PP, and verify the optimization result again, determine the final result based on the corresponding verification result, and obtain the corresponding fees of the PP and the CSP based on the final result;
[0091] Step S6: If the result fed back by PP is correct, PP decrypts the encrypted LP problem Φ k The best result.
[0092] Specifically, in step S1, the algorithm for processing the LP problem Φ includes:
[0093] The ECDSA signature generation algorithm run by PP, CSP, and RV is expressed as follows:
[0094] SignGen(1 ε )→(pk,sk)
[0095] Among them, given the input of security parameter ε, a pair of ECDSA public and private key pairs (pk, sk) are output;
[0096] The key generation algorithm run by PP is expressed as follows,
[0097] KeyGen(1 ε )→(K)
[0098] Among them, given the input of security parameter ε, the output is the key K used to encrypt the LP problem;
[0099] The encryption algorithm for the LP problem run by PP is expressed as follows:
[0100] LPEnc(K,Φ,sk PP )→(Φ K ,T problem )
[0101] Among them, input the one-time key K, LP problem Φ and private key sk PP , output encryption LP problem Φ K and a single Bitcoin transaction T with the problem summary problem ;
[0102] The compensation payment algorithm run by CSP is expressed as follows,
[0103] CPay(Φ K ,sk CSP )→(T compensation )
[0104] Among them, the input encryption LP problem Φ K and CSP's private key sk CSP , output a single Bitcoin transaction T with a lock time compensation as advance compensation;
[0105] The service fee payment algorithm operated by PP is expressed as follows:
[0106] EPay(sk PP )→(T fee )
[0107] Among them, enter the private key sk pp , output a single Bitcoin transaction T with a lock time fee , to prepay the service fee;
[0108] The solution algorithm run by CSP is expressed as follows,
[0109] LPSolve(Φ K ,sk CSP )→(y,S,Γ,T solution )
[0110] Among them, the input encryption LP problem Φ K and key sk CSP , output optimization result y, result label S, proof Γ and Bitcoin transaction T with optimization result summary solution ,in,
[0111] If S = -1, it indicates an infeasible situation;
[0112] If S = 0, it means the unbounded situation;
[0113] If S = 1, it means that the optimization result y is the encrypted LP problem Φ K The optimal solution of .
[0114] The two-tier verification algorithm run by PP or RV is expressed as follows,
[0115] Verify(y,Γ)→(V)
[0116] Where, given a single optimization result y and proof Γ, where,
[0117] If the proof Γ passes the verification, then the verification result V=1 is output;
[0118] If the proof Γ fails the verification, the verification result V=0 is output;
[0119] The problem decryption algorithm run by PP is expressed as follows,
[0120] ResultDec(y,S,K)→(x)
[0121] Among them, the input optimization result y, result label S and key K, among which,
[0122] If S = 1, then output the optimal solution of the LP problem Φ;
[0123] If S≠1, PP does not execute the decryption algorithm.
[0124] Specifically, in step S1, the cloud service provider CSP uses powerful computing capabilities and optimizers to solve outsourcing problems and earn rewards.
[0125] Specifically, in step S1, the IoT medical device PP lacking computing power is the problem provider, which needs to solve a large-scale medical optimization problem and requests the CSP in a pay-per-use manner, while taking on the task of first verifying the optimization results returned by the CSP.
[0126] Specifically, in step S1, the result verifier set RV composed of several verifiers performs secondary arbitration on the controversial optimization verification results.
[0127] Specifically, in step S1, the initialization includes:
[0128] Generate a signature key. PP, CSP, and RV call the function SignGen() to generate a pair of ECDSA keys (pk, sk). The private key sk is stored locally to unlock the Bitcoin wallet and sign Bitcoin transactions. The public key pk is published to generate currency account addresses and verify the signature of Bitcoin transactions.
[0129] The Bitcoin network is established. PP, CSP, and RV join the Bitcoin network as peer nodes. Each node informs other nodes in the scheme of its currency account address. PP and CSP agree on the cost of outsourced computing, including the service fee paid by PP and the compensation fee paid by CSP.
[0130] Specifically, in step S2, the blockchain technology is introduced as a means to reduce security risks, and is integrated into the data storage system. Data access rights are strictly controlled through a consensus mechanism, while data tampering is prevented. In addition, the blockchain-based consensus mechanism can achieve decentralized and trusted verification of cloud server computing results, providing an infrastructure for building fair medical payment. This is an existing technology and will not be elaborated on.
[0131] Specifically, in step S2, the PP encrypts the LP problem Φ including:
[0132] PP transforms the optimization problem existing in PP into LP problem Φ;
[0133] PP calls the function KeyGen() to generate a one-time key to encrypt the LP problem Φ;
[0134] PP calls the function LPEnc() to transform the LP problem Φ into an encrypted LP problem Φ K , and generate a problem summary transaction.
[0135] PP transforms the LP problem into a linear programming LP problem Φ = (A, B, b, c) according to formula (1);
[0136] Minimize c T x subject to Ax=b,x≥0. (1)
[0137] In formula (1),
[0138] c T x represents the linear function of the decision variable, c T represents an n-dimensional non-negative row vector, Ax=b represents the feasible region of the LP problem, A represents an m×n non-negative matrix, B represents an m×n identity matrix, b represents an m-dimensional non-negative column vector, x represents an n-dimensional non-negative decision variable column vector, and c represents an n-dimensional non-negative column vector;
[0139] PP calls the function KeyGen() to generate a one-time key K = (α, M, P, Q, r, L) to encrypt the LP problem Φ;
[0140] Among them, α represents a random real positive value, M represents an n×n random non-singular matrix, P represents an m×m random diagonal matrix and each diagonal element has the same random value, Q represents an m×m random diagonal matrix and each diagonal element satisfies the uniform distribution on (-β, β), where β is a real positive value, r represents an n×1 random vector and each element satisfies the uniform distribution on (0,2β), and L represents an m×m random perturbation matrix.
[0141] PP calls the function LPEnc() to transform the LP problem Φ into an encrypted LP problem Φ K , and generate the problem summary transaction T problem ,in,
[0142] Hiding the target function information: mapping x to y = M -1 (x+r), and PP stores the parameters (M, r) to restore the original optimization result, as shown below:
[0143] Minimize c T My-c T r,(2)
[0144] At the same time, according to formula (3), based on the random real positive number α, the original optimal value of the objective function is hidden.
[0145] Minimizeαc T My=c' T y, (3)
[0146] Where c' = αM T c,
[0147] Hiding equality constraint information: Based on the random matrix P and the random matrix Q according to formula (4), the secret information stored in A and b is hidden.
[0148] A 1 =PQA,b 1 =PQb, (4)
[0149] At the same time, A is readjusted according to formula (5) based on an m×m random perturbation matrix L 1 and b 1 The row order,
[0150] A 2 =LA 1 ,b 2 =Lb 1 , (5)
[0151] Among them, A 2 and b 2 Can hide A 1 and b 1 location,
[0152] According to formula (6), the optimization result y with equality constraints is transformed:
[0153] A 2 (My-r)=b 2 →LPQAMy=LPQ(b+Ar), (6)
[0154] Hide inequality constraint information: If the inequality constraint Bx ≥ 0, then find the matrix N that satisfies the following conditions,
[0155]
[0156] Where N is an m×m random matrix,
[0157] According to the inequality constrained by formula (8),
[0158] B'y≥0, (8)
[0159] Among them, the privacy protection matrix B'=BM+NA',
[0160] According to formula (9), we can get the encrypted LP problem Φ K =(A',B',b',c'),
[0161] Minimize c' T ysubjecttoA'y=b',B'y≥0. (9)
[0162] The problem summary transaction T is generated problem The process includes,
[0163] PP generates a hash summary H(Φ) based on the SHA-256 hash function H() K ), and create a Summary of Issues Transaction T problem ,
[0164] T problem =(H(Φ K ),PP,0). (10)
[0165] PP uses PP private key sk PP Sign the issue summary transaction T problem , and the problem summary transaction T problem Anchored on the Bitcoin network;
[0166] Received issue summary transaction T problem After that, the Bitcoin miner node will check the problem summary transaction T problemIf it is valid, the miner node will send the problem summary transaction T problem It is packaged into a block with other transactions, and the block is uploaded to the blockchain after the blockchain nodes reach a consensus. The Bitcoin platform will issue a summary transaction T problem ID problem Returning to PP, PP will encrypt the LP problem Φ K and ID problem Sent to CSP.
[0167] Specifically, in step S3, the process of generating the prepayment compensation transaction and the PP prepaying the service fee to the CSP by generating the service fee transaction includes:
[0168] Prepaid Compensation Transaction: CSP Receives Encrypted LP ProblemΦ K and ID problem After that, the function CPay() is called to pay the prepaid compensation, and the CSP tests the encrypted LP problem Φ K The effectiveness of calculating the encryption LP problem Φ K The hash summary H'(Φ K ) and use ID problem Search for Bitcoin transactions with problem summary on Bitcoin platform T problem The hash summary H(Φ K ),
[0169] If H'(Φ K )=H(Φ K ), then the encrypted LP problem Φ K Valid, CSP creates a compensation transaction T as follows compensation ;
[0170] T compensation =(PP,CSP,RV,t1,t2,d0) (11)
[0171] Among them, t1 represents the lock time, t2 represents the lock time, and d0 represents the compensation.
[0172] If we solve the encrypted LP problem Φ K , and obtains the correct optimization result, then CSP can unlock the transaction and reclaim it after time t1 ends. Otherwise, PP can unlock the compensation transaction T through RV’s multi-signature compensation , and then, compensation is obtained before time t2,
[0173] Set t1 to be longer than t2 so that PP and RV can perform the verification process. CSP uses the private key sk CSP Sign the compensation transaction T compensation , and anchored on the Bitcoin network, if the compensation transaction T compensationIf the verification is successful, the Bitcoin platform will compensate the transaction T compensation User ID compensation Return to CSP, which then sends it to PP;
[0174] Prepaid service fee: PP receives compensation transaction T compensation User ID compensation Then, call the EPay() function to pay the service fee.
[0175] PP searches for the user ID of the compensation transaction on the Bitcoin platform compensation Verify compensation transaction T compensation Validity,
[0176] If the compensating transaction T compensation If valid, PP uses the private key sk PP Signing service fee transaction T fee , and, anchor it on the Bitcoin network;
[0177] If the service fee transaction T fee If the verification is successful, the Bitcoin platform will transfer the service fee to T fee ID fee Return to PP, PP will send ID fee Sent to CSP, where:
[0178] T fee =(PP,t2,d1). (12)
[0179] Among them, d1 represents the service fee. After the lock time t2, CSP can unlock T fee to receive service fees.
[0180] Specifically, in step S4, the solution process of the encrypted LP problem includes: CSP receives the service fee transaction T fee User ID fee When calling the function LPSolve(), CSP passes the user ID fee Search for service fee transactions on the Bitcoin platform T fee , verify its validity, if the service fee transaction T fee If valid, CSP calls the LP optimizer to solve the encrypted LP problem Φ K .
[0181] Specifically, in step S4, the encrypted LP problem solution includes an optimal solution, an infeasible solution, and an unbounded solution.
[0182] If the encrypted LP problem Φ K If there is an optimal solution, the LP optimizer returns the result label S = 1 and the optimization result y. If the encrypted LP problem ΦK If there is no optimal solution, the LP optimizer returns a result label S=-1 to indicate an infeasible solution, or the LP optimizer returns a result label S=0 to indicate an unbounded solution.
[0183] Specifically, determine the encrypted LP problem Φ K The process of solving the situation includes,
[0184] Optimal case: Encrypted LP problem Φ K The dual problem of is shown in formula (13):
[0185] Maximize b' T s subject to A' T s+B' T t=c',t≥0. (13)
[0186] Among them, s represents an m×1 vector, t represents an m×1 vector,
[0187] Construct the verification condition according to the first verification algorithm, as follows:
[0188] c' T y=b' T s,A'y=b',B'y≥0,A' T s+B' T t=c',t≥0,
[0189] Based on the above conditions, the optimization result y is the encrypted LP problem Φ K The feasible solution of (s, t) is the encrypted LP problem Φ K A feasible solution to the dual problem, CSP needs to solve the encrypted LP problem Φ shown in the first verification algorithm K The dual problem of , and returns a feasible solution (s, t) as part of the proof of Γ;
[0190] Infeasible situation: If the encrypted LP problem Φ K If it is not feasible, the LP optimizer cannot return any optimization results. According to the second verification algorithm, the artificial variable z is used to construct the auxiliary problem, as shown in the following formula:
[0191] Minimize z subjectto-Iz≤A'y-b≤Iz,
[0192] B'y≥-Iz
[0193] Where I represents an m×1 vector whose elements are all 1.
[0194] If and only if the encrypted LP problem Φ K When there is no solution, z is 0. Therefore, when the CSP feedback encryption LP problem Φ KWhen it is not feasible, CSP needs to solve the auxiliary problem of the second verification algorithm and return (z,y) as part of the proof Γ;
[0195] Unbounded case: The encrypted LP problem Φ K The objective function value of is infinite. The dual problem constructs an auxiliary problem according to the third verification algorithm, as shown in the following formula:
[0196] Minimize z subject to - Iz≤A' T s+B' T t-c'≤Iz,
[0197] t≥-Iz
[0198] Where I represents an n×1 vector whose elements are all 1.
[0199] If and only if z ≥ 0, the encrypted LP problem Φ K The dual problem of has no solution, so when CSP is called the encrypted LP problem Φ K When unbounded, CSP needs to solve the auxiliary problem shown in formula (16) and return (z, s, t) as part of the proof Γ.
[0200] Specifically, in step S4, the optimization result summary transaction T is generated. solution The process includes,
[0201] CSP uses the hash function H() to generate the optimization result y and the summary H(y,Γ) of the proof Γ, and,
[0202] Create a Summary of optimization results for trade T solution , as follows:
[0203] T solution =(H(y,Γ),CSP,0).
[0204] CSP uses its private key sk CSP Sign optimization result summary transaction T solution And anchor it on the Bitcoin network, receive the optimization result summary transaction T solution After that, the Bitcoin miner node will verify the optimization result summary transaction T solution The validity of the transaction is optimized and packaged into a single block, resulting in the summary transaction T solution After being uploaded to the blockchain, the Bitcoin platform will submit a summary of the optimization results to T solution User ID solution Returning to CSP, CSP will optimize the result y, the result label S, the proof Γ, and the ID solution Send to PP or RV.
[0205] Specifically, in step S4, the process of obtaining the verification result includes:
[0206] PP calls the function Verify() to verify the correctness of the optimization result y and the proof Γ, including the first level verification and the second level verification, where:
[0207] If the optimization result y is verified to be incorrect, PP will request RV to perform a second verification. RV performs the second layer of verification and reaches a consensus on the correctness of the optimization result y. Finally, fair payment is performed according to the consensus result.
[0208] First-level verification: PP calculates the hash summary H'(y,Γ) and uses the optimized result to summarize the transaction T solution User ID solution The hash summary H(y,Γ) searched on the Bitcoin platform,
[0209] If H'(y,Γ)=H(y,Γ), it means that the optimization result y and the proof Γ are valid.
[0210] PP performs the first level of verification, checking the correctness of the optimization result y based on the proof Γ.
[0211] Among them, PP must be in the service fee transaction T fee Verify y within the lock time t2, otherwise, it is assumed that y is correct after t2.
[0212] If the optimization result y is verified to be incorrect, PP will request RV to perform a second verification. RV will perform the second layer of verification and reach a consensus on the correctness of the optimization result y. Fair payment will be performed based on the consensus result.
[0213] Second layer of verification: performed by the verifier in RV when PP initiates the second verification request. Before the second layer of verification, PP creates a multi-signature transaction T claim ,
[0214] Multi-signature transaction T claim As RV's consensus proof of the correctness of the optimization result y and the solution's result label S, the verifier executes the same verification strategy to verify the result.
[0215] If the verifier v i If the optimization result y or the result label S does not meet the verification conditions, then the verifier v i Use its private key Sign multiple front transactions T claim To support compensation for PP, where i∈(1,2,3,...,n), n represents the number of verifiers supporting compensation for PP) otherwise, the verifier v iWill refuse to sign multi-signature transaction T claim ;
[0216] If there are more than m validators providing their private keys, where m∈(1,2,3,...,n) and Then the function Verify() returns the consensus result V=0;
[0217] If there are no more than m validators v i If the private key is provided, the function Verify() returns the consensus result V=1.
[0218] Specifically, in step S5, the specific verification algorithm selected based on different situations of the encrypted LP problem solution includes:
[0219] Optimal case: If the result label S = 1, then the optimization result y is the encrypted LP problem Φ K The optimal solution of , prove Γ=(s,t),
[0220] PP will check the correctness of the optimization result y returned by CSP through the first verification algorithm;
[0221] Infeasible case: If S = -1, it means the encrypted LP problem Φ K Not feasible, prove Γ=(z,y),
[0222] PP calls the second verification algorithm to check the result returned by CSP;
[0223] Unbounded case: If S = 0, then it means the encrypted LP problem Φ K Unbounded, prove Γ=(z,s,t),
[0224] PP calls the third verification algorithm to check the result returned by CSP.
[0225] If the first level of verification performed by PP proves that the optimization result y or the result label S is correct, the function Verify() returns the verification result V=1;
[0226] If the first level verification performed by PP proves that the optimization result y or the result label S is incorrect, PP requests RV to start the second level verification.
[0227] Specifically, in step S5, the final result is determined according to the corresponding verification result.
[0228] If the first-layer verification proves that the optimization result y or result label S is correct, or, after the lock time t2, PP no longer requests the second-layer verification, or, the second-layer verification reaches a consensus, then the optimization result y or result label S is considered correct, and the verification result V = 1;
[0229] In this case, the following fair payment will be implemented: PP and CSP sign Transaction T charge , CSP will unlock the Transaction T charge ,get
[0230] If the first-level verification proves that the optimization result y or the structure label S is incorrect, and the second-level verification reaches the same consensus, then the verification result V = 0.
[0231] In this case, the following fair payment will be performed: CSP's private key sk CSP And the verifier v in ∑1 i Private key Sign multi-signature transaction T claim PP will multi-signature transaction T claim Unlock to get compensation After the lock time t2, CSP will unlock the Transaction T charge , to receive service fee Since d0>d1, the difference d0-d1 will be paid to PP as actual compensation.
[0232] Specifically, in step S6, the optimal result of the encrypted LP problem is decrypted.
[0233] If the consensus of the verification result is V=1 and the optimization result y is the optimal solution, PP calls the function ResultDec() to obtain the optimal solution of the LP problem Φ, where the decryption algorithm is x=My-r,
[0234] If the consensus of the verification result is V=1 and the optimization result y is not the optimal solution, then the LP problem Φ has no optimal solution.
[0235] Specifically, an application system for applying a blockchain-based medical data security outsourcing calculation method is also provided, which is characterized by including:
[0236] one or more processors;
[0237] Memory;
[0238] and one or more programs,
[0239] The one or more programs are configured to be executed by one or more processors, the memory includes a storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, it can be used to execute a blockchain-based medical data security outsourcing computing method.
[0240] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A medical data security outsourcing calculation method based on blockchain, characterized in that: include: Step S1, initializing the system before processing the LP problem Φ, the initialization includes: Cloud service providers CSP and IoT medical devices PP that lack computing power join the Bitcoin network through local Bitcoin clients; The resulting validator set RV, which consists of several validators, joins the network as a Bitcoin node; Step S2: PP encrypts the LP problem Φ and sends the encrypted LP problem Φ k To CSP, PP generates a question summary transaction and anchors it to the blockchain; Step S3, CSP confirms the encrypted LP problem Φ k The integrity of the PP and the prepayment compensation transaction are generated, and the PP generates a service fee transaction to prepay the service fee to the CSP; Step S4, CSP solves the encrypted LP problem Φ k , to obtain the optimization result and the proof of the correctness of the result, send the optimization result and the proof of the correctness of the result to PP, and generate the optimization result summary transaction T solution And anchor it to the blockchain; Step S5, based on the PP first verifying the correctness of the result of the LP problem, if the PP feedbacks that the result is wrong, the RV will receive an arbitration request from the PP, and verify the optimization result again, determine the final result based on the corresponding verification result, and obtain the corresponding fees of the PP and the CSP based on the final result; Step S6: If the result fed back by PP is correct, PP decrypts the encrypted LP problem Φ k The best result.
2. According to the blockchain-based medical data security outsourcing calculation method of claim 1, it is characterized in that: In step S1, the algorithm for processing the LP problem Φ includes: PP, CSP, and RV run the ECDSA signature generation algorithm, and given the input of the security parameter ε, output a pair of ECDSA public and private key pairs; PP runs the key generation algorithm, given the input of security parameter ε, and outputs the key K used to encrypt the LP problem; PP runs the LP problem encryption algorithm, inputting the one-time key K, the LP problem Φ and the PP private key sk PP , output encryption LP problem Φ K and a single Bitcoin transaction T with the problem summary problem ; CSP runs the compensation payment algorithm and inputs the encrypted LP problem Φ K and CSP private key sk CSP , output a single Bitcoin transaction T with a lock time compensation as advance compensation; PP runs the service fee payment algorithm and enters the PP private key sk pp , output a single Bitcoin transaction T with a lock time fee , to prepay the service fee; CSP runs the solution algorithm and inputs the encrypted LP problem Φ K and CSP key sk CSP , optimization result y, result label S, proof Γ and Bitcoin transaction T with optimization result summary solution ,in, If S = -1, it indicates an infeasible situation; If S = 0, it means the unbounded situation; If S = 1, it means that the optimization result y is the encrypted LP problem Φ K The optimal solution of PP or RV runs a two-layer verification algorithm, given the optimization result y and the proof Γ, where If the proof Γ passes the verification, then the verification result V=1 is output; If the proof Γ fails the verification, the verification result V=0 is output; PP runs the problem decryption algorithm, inputting the optimization result y, the result label S and the key K, where If S = 1, then output the optimal solution of the LP problem Φ; If S≠1, PP does not execute the decryption algorithm.
3. According to the blockchain-based medical data security outsourcing calculation method of claim 1, it is characterized in that: In step S2, the PP encrypts the LP problem Φ, including: PP transforms the optimization problem existing in PP into LP problem Φ; PP calls the function KeyGen() to generate a one-time key to encrypt the LP problem Φ; PP calls the function LPEnc() to transform the LP problem Φ into an encrypted LP problem Φ K , and generate a problem summary transaction.
4. The blockchain-based medical data security outsourcing calculation method according to claim 2 is characterized in that: In step S3, the process of generating the prepayment compensation transaction and the PP prepaying the service fee to the CSP by generating the service fee transaction includes: Prepaid Compensation Transaction: CSP Receives Encrypted LP ProblemΦ K and user ID problem After that, the function CPay() is called to pay the prepaid compensation, and the CSP tests the encrypted LP problem Φ K The effectiveness of calculating the encryption LP problem Φ K The hash summary H'(Φ K ) and use the user ID problem Search for Bitcoin transactions with problem summary on Bitcoin platform T problem The hash summary H(Φ K ), If H'(Φ K )=H(Φ K ), then the encrypted LP problem Φ K Valid, CSP creates compensation transaction T compensation ; Prepaid service fee: PP receives compensation transaction T compensation User ID compensation Then, call the EPay() function to pay the service fee. PP searches for the user ID of the compensation transaction on the Bitcoin platform compensation Verify compensation transaction T compensation Validity, If the compensating transaction T compensation If valid, PP uses the private key sk PP Signing service fee transaction T fee , and, anchor it on the Bitcoin network; If the service fee transaction T fee If the verification is successful, the Bitcoin platform will transfer the service fee to T fee User ID fee Return to PP, PP will send the user ID fee Sent to CSP.
5. The blockchain-based medical data security outsourcing calculation method according to claim 3 is characterized in that: In step S4, the encrypted LP problem solution includes an optimal solution, an infeasible solution, and an unbounded solution. If the encrypted LP problem Φ K If there is an optimal solution, the LP optimizer returns the result label S=1 and the optimization result y; If the encrypted LP problem Φ K If there is no optimal solution, the LP optimizer returns a result label S=-1 to indicate an infeasible solution, or the LP optimizer returns a result label S=0 to indicate an unbounded solution.
6. The blockchain-based medical data security outsourcing calculation method according to claim 3 is characterized in that: In step S4, the optimization result summary transaction T is generated. solution The process includes, CSP uses the hash function H() to generate the optimization result y and the summary H(y,Γ) of the proof Γ, and creates a Summary of optimization results for trade T solution .
7. The blockchain-based medical data security outsourcing calculation method according to claim 2 is characterized in that: In step S4, the process of obtaining the verification result includes: PP calls the function Verify() to verify the correctness of the optimization result y and the proof Γ, including the first level verification and the second level verification, where: The first layer of verification includes: PP calculates the hash summary H'(y,Γ) and uses the optimized result summary transaction T solution User ID solution The hash summary H(y,Γ) searched on the Bitcoin platform, If H'(y,Γ)=H(y,Γ), it means that the optimization result y and the proof Γ are valid. PP performs the first level of verification, checking the correctness of the optimization result y based on the proof Γ. Among them, PP must be in T fee The optimization result y is verified within the lock time t2, otherwise, the default optimization result y is correct after t2. The second layer of verification includes: being executed by the verifier in RV when PP initiates the second verification request. Before the second layer of verification, PP creates a single multi-signature transaction T claim , Multi-signature transaction T claim As RV's consensus proof of the correctness of the optimization result y and the solution's result label S, the verifier executes the same verification strategy to verify the result. If the verifier v i If the optimization result y or result label S does not meet the verification condition, then the verification unit v i Use its private key Sign multi-signature transaction T claim To support compensation for PP, where i∈(1,2,3,...,n), n represents the number of validators supporting compensation for PP; If the verifier v i Determine that the optimization result y or the result label S meets the verification condition, then v i Will refuse to sign multi-signature transaction T claim , If there are more than m validators v i Provide its private key, where m∈(1,2,3,...,n) and Then the function Verify() returns the consensus result V=0; If no more than m validators provide their private keys, the function Verify() returns the consensus result V=1.
8. The blockchain-based medical data security outsourcing calculation method according to claim 5 is characterized in that: In step S5, the specific verification algorithm selected based on different situations of the encrypted LP problem solution includes: If the result label S = 1, the optimization result y is Φ K The optimal solution of , proves that Γ=(s, t), then PP will check the correctness of the optimization result y returned by CSP through the first verification algorithm; If S = -1, it means the encrypted LP problem Φ K Infeasible, prove Γ=(z,y), then PP calls the second verification algorithm to check the result returned by CSP; If S = 0, it means the encrypted LP problem Φ K Unbounded, prove Γ=(z,s,t), then PP calls the third verification algorithm to check the result returned by CSP.
9. The blockchain-based medical data security outsourcing calculation method according to claim 7 is characterized in that: In step S5, the final result is determined according to the corresponding verification result. If the first-layer verification proves that the optimization result y or the result label S is correct, or, after the lock time t2, the PP no longer requests the second-layer verification, or the second-layer verification reaches a consensus, then the optimization result y or the result label S is considered correct, and the verification result V = 1; If the first-level verification proves that the optimization result y or the result label S is incorrect, and the second-level verification reaches a consensus, the verification result V=0.
10. An application system for the blockchain-based medical data security outsourcing calculation method according to any one of claims 1 to 9, characterized in that: include: one or more processors; Memory; and one or more programs, The one or more programs are configured to be executed by one or more processors, the memory includes a storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, it can be used to execute a blockchain-based medical data security outsourcing computing method.
Citation Information
Patent Citations
Medical industry data security supervision system based on block chain
CN116776389A