Digital currency transaction security protection method based on block chain
By introducing game theory models, reward and punishment mechanisms, zero-knowledge proofs and decentralized identity authentication into the digital currency trading system, the data processing speed and security of the trading system are solved, and an efficient and secure trading environment is achieved.
Patent Information
- Application Number
- CN202510351566.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing digital currency trading systems have problems with data processing speed, security and identity authentication, including transaction congestion, delay, static risk assessment, single point of failure and data breach risks.
The node strategy model based on game theory, reward and punishment mechanism, zero-knowledge proof, Shannon entropy anomaly detection, Shamir secret sharing technology and multi-signature mechanism are adopted, combined with human-machine interface optimization, dynamic scheduling, real-time risk assessment and decentralized identity authentication of off-chain transactions and on-chain settlement are realized.
It improves data processing speed, realizes dynamic risk assessment and privacy protection of identity information, reduces the risk of transaction delays and single point of failure, and enhances the flexibility and security of the system.
Smart Images

Figure CN120297973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital currency transaction security, and specifically to a method for protecting the security of digital currency transactions based on blockchain. Background Art
[0002] At present, most digital currency transactions rely on blockchain technology to achieve the immutability and public verification of transaction records. Existing solutions usually only adopt on-chain settlement methods, with fixed data packaging and on-chain verification processes, lacking a flexible scheduling mechanism. As a result, the processing speed of transaction data is slow, congestion is likely to occur during high concurrency, and the verification delay problem is obvious. The integration of off-chain transaction processing and on-chain settlement in the existing technology is reduced, and it is impossible to fully balance efficiency and security, and the phenomenon of insufficient system response is likely to occur.
[0003] Traditional systems mainly rely on static rules in risk assessment and lack dynamic learning capabilities. The existing technology does not introduce artificial intelligence or machine learning means and cannot capture abnormal dynamics in transaction behaviors in real time. As a result, when the system faces a complex and changeable market environment, the early warning response is slow, and the security protection measures cannot take effect in time, and thus sudden risks cannot be effectively prevented.
[0004] At the same time, identity authentication generally adopts a centralized solution, and all user information is centrally stored in a single authentication center. There are potential security hazards, and single-point failures and data leakage risks are likely to occur. The existing technology fails to make full use of decentralized authentication means and cannot achieve privacy protection and anti-tampering verification of identity information, resulting in user data being in a high-risk state for a long time.
[0005] Therefore, those skilled in the art provide a method for protecting the security of digital currency transactions based on blockchain to solve the above-mentioned problems. Summary of the Invention
[0006] In view of the deficiencies of the existing technology, the present invention provides a method for protecting the security of digital currency transactions based on blockchain to solve the problems raised in the above background art.
[0007] To achieve the above objectives, the present invention is realized through the following technical solutions: A method for protecting the security of digital currency transactions based on blockchain, including:
[0008] Step 1, establishing a node strategy model based on game theory to determine the initial strategy of the node;
[0009] Step 2, relying on Step 1 to set up a reward and punishment mechanism to correct the node utility and incentivize the node behavior;
[0010] Step 3, relying on Step 2 to package off-chain transaction data, calculate the data hash and generate a zero-knowledge proof;
[0011] Step 4: Rely on Step 3 to implement on-chain verification by linking zero-knowledge proof and data hash to the chain;
[0012] Step 5: Rely on Step 4 to build an anomaly detection model, calculate the uniformity of transaction data using Shannon entropy, and set a threshold to determine the anomaly status;
[0013] Step 6: Rely on Step 5 to use Shamir secret sharing technology combined with a multi-signature mechanism to split and verify user identity information;
[0014] Step 7: Rely on Step 6 to optimize the human-machine interface design and provide real-time monitoring feedback.
[0015] Preferably, in Step 1, further including establishing a node strategy model based on game theory to determine the initial node strategy:
[0016] Step 1.1: Determine the node set: N = {v1, v2, v3},
[0017] where N is the set of all nodes in the network, v1 is the first node parameter symbol, v2 is the second node parameter symbol, and v3 is the third node parameter symbol;
[0018] Step 1.2: Establish the utility function of each node:
[0019] E x = α x ·β x - γ x ·δ x ,
[0020] where E x is the utility function of node x, α x is the node security revenue parameter, β x is the transaction success probability, γ x is the risk loss coefficient, δ x is the potential risk value and x is the node index;
[0021] Step 1.3: Calculate the conditions for the optimal strategy of each node to be satisfied:
[0022]
[0023] where E y is the utility function of node y, is the node optimal strategy parameter symbol, is the parameter of the strategy set of other nodes, θ y is any alternative strategy and y is the node index.
[0024] Preferably, in Step 2, further including setting a reward and punishment mechanism depending on Step 1 to correct the node utility and incentivize node behavior:
[0025] Step 2.1, Set up the reward mechanism: Set the reward parameters for nodes when following the protocol. The formula is as follows:
[0026] R x = α x ·β x ,
[0027] where R x is the reward obtained by node x for following the protocol, α x is the node security benefit parameter, and β x is the probability of successful transaction;
[0028] Step 2.2, Set up the penalty mechanism: Set the penalty parameters for nodes when not following the protocol. The formula is as follows:
[0029] P x = γ x ·δ x ,
[0030] where P x is the penalty faced by node x when not following the protocol, γ x is the risk loss coefficient, and δ x is the potential risk value;
[0031] Step 2.3, Modify the node utility function: On the basis of the reward and penalty mechanism, modify the node utility function. The formula is as follows: E′ x = E x + R x - P x ,
[0032] where E′ x is the value of the modified utility function, E x is the utility function of node x, R x is the reward obtained by node x for following the protocol, and P x is the penalty faced by node x when not following the protocol.
[0033] Preferably, in step 3, depending on step 2 to package off-chain transaction data to calculate the data hash and generate a zero-knowledge proof further includes:
[0034] Step 3.1, Package off-chain transaction data: Package off-chain transaction data and define the transaction data set:
[0035] T = {t1, t2, t3, …, t n},
[0036] where T is the off-chain transaction data set, t1 is the first transaction data, t2 is the second transaction data, t3 is the third transaction data, tn is the nth transaction data;
[0037] Step 3.2, calculate the data hash: Calculate the hash value for the packaged off-chain transaction data, and use the hash function H(·) to generate the unique identifier of the data. The formula is as follows:
[0038] H(T) = H(t1||t2||…||t n )
[0039] where H(T) is the hash value of the transaction data set T, and t1, t2, …, t n are off-chain transaction data, || is the concatenation operation,
[0040] H(·) is the hash function, which is used to convert the transaction data into a hash value of a fixed length;
[0041] Step 3.3, generate a zero-knowledge proof: Use the zero-knowledge proof to generate the verification information of the data hash. The formula is as follows: ZK(H(T)),
[0042] where ZK(H(T)) is the generated zero-knowledge proof, and H(T) is the hash value of the off-chain transaction data set T.
[0043] Preferably, in the said step 4, depending on step 3 to upload the zero-knowledge proof and the data hash to the chain for on-chain verification further includes:
[0044] Step 4.1, construct verification data to define verification data:
[0045] V = φ·ZK(H(T)) + ψ·H(T),
[0046] where V is the on-chain verification data, φ is the zero-knowledge proof weighting parameter, ψ is the data hash weighting parameter, ZK(H(T)) is the generated zero-knowledge proof, and H(T) is the hash value of the off-chain transaction data set T;
[0047] Step 4.2, upload the verification data to define the on-chain storage record:
[0048] S = f(V, τ),
[0049] where S is the verification record stored on the blockchain, f(·) is the on-chain verification submission function, V is the on-chain verification data, and τ is the blockchain timestamp;
[0050] Step 4.3, perform on-chain verification to calculate the verification result using the on-chain record:
[0051] Ω = k(V) - μ(τ),
[0052] Among them, Ω is the verification result on the chain, k(V) is the processing function based on the verification data V on the chain, and μ(τ) is the verification function based on the blockchain timestamp τ.
[0053] When Ω ≥ 0, it indicates that the data legality is confirmed.
[0054] Preferably, in step 5, relying on step 4 to construct an anomaly detection model, using Shannon entropy to calculate the transaction data uniformity and setting a threshold to determine the anomaly status further includes:
[0055] Step 5.1, calculate the formula for defining the entropy value of transaction data uniformity:
[0056]
[0057] Among them, ε is the entropy value of transaction data uniformity in the verification record stored on the chain, and λ q is the probability of transaction data appearing in the q-th interval, and Q is the total number of intervals;
[0058] Step 5.2, set the formula for defining the anomaly status determination threshold:
[0059] Δ = ε - η,
[0060] Among them, Δ is the difference between the transaction data uniformity and the preset threshold, and η is the preset anomaly detection threshold;
[0061] Step 5.3, determine the anomaly status definition formula:
[0062] E = {1, Δ ≥ 0}, E = {0, Δ < 0},
[0063] Among them, E is the anomaly detection result. A value of 1 indicates that the transaction data is in a normal state, and a value of 0 indicates that the transaction data is in an abnormal state.
[0064] Preferably, in step 6, relying on step 5, using the Shamir secret sharing technology combined with the multi-signature mechanism to split and verify the user identity information further includes:
[0065] Step 6.1, split the user identity information to construct a polynomial formula:
[0066]
[0067] Among them, Υ is the user identity information, ρ represents the split threshold, P(z) is the split polynomial, and ξ i is a randomly selected split coefficient, and z is the split position parameter;
[0068] Step 6.2, the multi-signature mechanism aggregates the split shares to construct a signature formula:
[0069]
[0070] Among them, M is the result of multi-signature aggregation, and ω j is the weight of the split share signature, and S j is the j-th split result, and σ is the total number of splits;
[0071] Step 6.3, restore the user identity information and construct the Lagrange interpolation formula:
[0072]
[0073] Among them, Υ ′ is the restored user identity information, Ω j is the Lagrange interpolation coefficient, S j is the j-th split result, and σ is the total number of splits.
[0074] Preferably, in step 7, depending on step 6 to optimize the human-machine interface design to provide real-time monitoring feedback further includes:
[0075] Step 7.1, construct the real-time monitoring feedback index definition formula:
[0076]
[0077] Among them, Θ is the real-time monitoring feedback index, α is the weight coefficient of the on-chain storage record, is the new feedback data obtained after processing, β is the weight coefficient of the anomaly detection result, is the output of the anomaly status determination formula, γ is the weight coefficient of the multi-signature aggregation result, is the aggregation after splitting and verification, δ is the weight coefficient of the user identity recovery information, is the Lagrange interpolation recovery;
[0078] Step 7.2, update the human-machine interface display status and construct the feedback mapping formula:
[0079] Λ ′ = g(Θ,k ′ ),
[0080] Among them, Λ ′ is the updated human-machine interface display status, g(·) is the feedback mapping function, Θ is the real-time monitoring feedback index, k ′ is the parameter reflecting the current system time status;
[0081] Step 7.3, execute the feedback control strategy and construct the control signal formula:
[0082] Ψ ′ = h(Λ ′ ,μ ′ ),
[0083] where, Ψ ′ is the feedback control signal, μ ′ is a parameter reflecting the operator's intervention and regulation requirements, h(·) is a feedback control function for generating a final control signal based on the updated human-machine interface display state Λ ′ and the operation intervention control parameter μ ′
[0084] A terminal device, the terminal device includes a processing unit, a storage unit, a communication unit and a display unit, wherein, the processing unit is configured to execute program code, and construct, design a reward and punishment mechanism, pack off-chain data, calculate data hash, generate zero-knowledge proof, verify on-chain, detect anomalies, segment and verify user identity information, and construct real-time monitoring feedback according to the node policy model in the blockchain-based digital currency transaction security protection method, and generate the human-machine interface display state and feedback control signal of the terminal device according to the real-time monitoring feedback index, feedback mapping and feedback control function constructed in steps 7.1 to 7.3, so as to realize the digital currency transaction security protection function.
[0085] A storage medium, the storage medium stores program code, the program code is executed by a processing unit on a terminal device, and the program code causes the terminal device to run according to the steps of constructing a node policy model, designing a reward and punishment mechanism, packing off-chain data, calculating data hash, generating zero-knowledge proof, verifying on-chain, detecting anomalies, segmenting and verifying user identity information, and constructing real-time monitoring feedback in the blockchain-based digital currency transaction security protection method, and generate a feedback control signal according to the real-time monitoring feedback index, feedback mapping function and feedback control function constructed in steps 7.1 to 7.3, so as to realize the digital currency transaction security protection function.
[0086] The present invention provides a blockchain-based digital currency transaction security protection method. It has the following beneficial effects:
[0087] 1. The present invention adopts an innovative improvement technical solution of off-chain transaction and on-chain settlement in reverse, realizes the improvement of data processing speed and reliable on-chain verification, and solves the problems of serious transaction congestion and delay compared with the single on-chain settlement scheme in the prior art.
[0088] 2. The present invention adopts an innovative improvement technical solution of combining AI and machine learning in reverse, realizes dynamic risk assessment and adaptive security protection, and solves the problems of insensitive early warning and insufficient ability to cope with sudden risks compared with the scheme relying on static rules in the prior art.
[0089] 3. The present invention adopts a reverse innovation improvement technical solution for decentralized identity authentication to achieve privacy protection and anti-tampering verification of identity information. Compared with the centralized authentication solution in the prior art, it solves the problems of data leakage and single-point failure risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0091] To enable those skilled in the art to understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0092] The present invention will be described in detail below with reference to the accompanying drawings:
[0093] Embodiment:
[0094] Please refer to the attached Figure 1 , the embodiment of the present invention provides a method for protecting the security of digital currency transactions based on blockchain, including:
[0095] Step 1, establish a node strategy model based on game theory to determine the initial strategies of nodes;
[0096] Step 1.1, determine the node set: N = {v1, v2, v3},
[0097] where N is the set of all nodes in the network, v1 is the first node parameter symbol, v2 is the second node parameter symbol, and v3 is the third node parameter symbol;
[0098] Step 1.2, establish the utility function of each node:
[0099] E x = α x ·β x - γ x ·δ x ,
[0100] where E x is the utility function of node x, α x is the node security revenue parameter, β x is the transaction success probability, γ x is the risk loss coefficient, δ x is the potential risk value and x is the node index;
[0101] Step 1.3, calculate the conditions for the optimal strategies of each node to be satisfied:
[0102]
[0103] Among them, E y is the utility function of node y, is the symbol of the optimal strategy parameter of the node, is the parameter of the strategy set of other nodes, θ y is any alternative strategy and y is the node index;
[0104] Step 2: Depending on Step 1, set up a reward and punishment mechanism to correct the node utility and motivate the node behavior;
[0105] Step 2.1: Set up a reward mechanism: Set the reward parameter when the node follows the protocol. The formula is as follows:
[0106] R x = α x ·β x ,
[0107] Among them, R x is the reward obtained by node x for following the protocol, α x is the node security income parameter, β x is the probability of successful transaction;
[0108] Step 2.2: Set up a punishment mechanism: Set the punishment parameter when the node does not follow the protocol. The formula is as follows:
[0109] P x = γ x ·δ x ,
[0110] Among them, P x is the punishment faced by node x when it does not follow the protocol, γ x is the risk loss coefficient, δ x is the potential risk value;
[0111] Step 2.3: Correct the node utility function: On the basis of the reward and punishment mechanism, correct the node utility function. The formula is as follows: E′ x = E x + R x - P x ,
[0112] Among them, E′ x is the value of the corrected utility function, E x is the utility function of node x, R x is the reward obtained by node x for following the protocol, P x is the punishment faced by node x when it does not follow the protocol;
[0113] Step 3: Calculate the data hash and generate a zero-knowledge proof based on the off-chain transaction data packaged in Step 2;
[0114] Step 3.1: Package the off-chain transaction data: Package the off-chain transaction data and define the transaction data set:
[0115] T = {t1, t2, t3, …, t n},
[0116] where T is the off-chain transaction data set, t1 is the first transaction data, t2 is the second transaction data, t3 is the third transaction data, and t n is the nth transaction data;
[0117] Step 3.2: Calculate the data hash: Calculate the hash value of the packaged off-chain transaction data and use the hash function H(·) to generate the unique identifier of the data. The formula is as follows:
[0118] H(T) = H(t1 || t2 || … || t n ),
[0119] where H(T) is the hash value of the transaction data set T, t1, t2, …, t n are the off-chain transaction data, || is the concatenation operation,
[0120] and H(·) is the hash function used to convert the transaction data into a hash value of a fixed length;
[0121] Step 3.3: Generate a zero-knowledge proof: Use the zero-knowledge proof to generate the verification information of the data hash. The formula is as follows: ZK(H(T)),
[0122] where ZK(H(T)) is the generated zero-knowledge proof and H(T) is the hash value of the off-chain transaction data set T;
[0123] Step 4: Implement on-chain verification by uploading the zero-knowledge proof and the data hash to the chain based on Step 3;
[0124] Step 4.1: Construct verification data and define the verification data:
[0125] V = φ · ZK(H(T)) + ψ · H(T),
[0126] where V is the on-chain verification data, φ is the zero-knowledge proof weighting parameter, ψ is the data hash weighting parameter, ZK(H(T)) is the generated zero-knowledge proof, and H(T) is the hash value of the off-chain transaction data set T;
[0127] Step 4.2: Upload the verification data to the chain and define the on-chain storage record:
[0128] S = f(V, τ),
[0129] Among them, S is the verification record stored on the blockchain, f(·) is the on-chain verification submission function, V is the on-chain verification data, and τ is the blockchain timestamp;
[0130] Step 4.3, perform on-chain verification and calculate the verification result using the on-chain record:
[0131] Ω = k(V) - μ(τ),
[0132] Among them, Ω is the on-chain verification result, k(V) is the processing function based on the on-chain verification data V, and μ(τ) is the verification function based on the blockchain timestamp τ.
[0133] When Ω ≥ 0, it indicates that the data legality is confirmed;
[0134] Step 5, rely on Step 4 to construct an anomaly detection model, calculate the uniformity of transaction data using Shannon entropy, and set a threshold to determine the anomaly status;
[0135] Step 5.1, calculate the entropy value formula for the uniformity of transaction data:
[0136]
[0137] Among them, ε is the entropy value of the transaction data uniformity in the on-chain stored verification record, λ q The probability of transaction data appearing in the q-th interval, and Q is the total number of intervals;
[0138] Step 5.2, set the formula for the anomaly status determination threshold:
[0139] Δ = ε - η,
[0140] Among them, Δ is the difference between the transaction data uniformity and the preset threshold, and η is the preset anomaly detection threshold;
[0141] Step 5.3, determine the anomaly status and define the formula:
[0142] E = {1, Δ ≥ 0}, E = {0, Δ < 0},
[0143] Among them, E is the anomaly detection result. A value of 1 indicates that the transaction data is in a normal state, and a value of 0 indicates that the transaction data is in an abnormal state;
[0144] Step 6, rely on Step 5 to use the Shamir secret sharing technology combined with the multi-signature mechanism to split and verify the user identity information;
[0145] Step 6.1, split the user identity information and construct a polynomial formula:
[0146]
[0147] Among them, Υ is the user identity information, ρ represents the segmentation threshold, P(z) is the segmentation polynomial, and ξ i is a randomly selected segmentation coefficient, and z is the segmentation position parameter;
[0148] Step 6.2, the multi-signature mechanism aggregates the segmentation shares to construct a signature formula:
[0149]
[0150] Among them, M is the multi-signature aggregation result, ω j is the signature weight of the segmentation share, S j is the j-th segmentation result, and σ is the total number of segments;
[0151] Step 6.3, restore the user identity information to construct a Lagrange interpolation formula:
[0152]
[0153] Among them, Υ ′ is the restored user identity information, Ω j is the Lagrange interpolation coefficient, S j is the j-th segmentation result, and σ is the total number of segments;
[0154] Step 7, rely on Step 6 to optimize the human-machine interface design to provide real-time monitoring feedback;
[0155] Step 7.1, construct a real-time monitoring feedback index definition formula:
[0156]
[0157] Among them, Θ is the real-time monitoring feedback index, α is the weight coefficient of the on-chain storage record, is the newly obtained feedback data after processing, β is the weight coefficient of the anomaly detection result, is the output of the anomaly status determination formula, γ is the weight coefficient of the multi-signature aggregation result, is the aggregation after segmentation and verification, δ is the weight coefficient of the user identity recovery information, is the Lagrange interpolation recovery;
[0158] Step 7.2, update the human-machine interface display status to construct a feedback mapping formula:
[0159] Λ ′ = g(Θ,k ′ ),
[0160] Among them, Λ ′ is the updated human-machine interface display status, g(·) is the feedback mapping function, Θ is the real-time monitoring feedback index, and k ′ is a parameter reflecting the current system time status;
[0161] Step 7.3, execute the feedback control strategy to construct the control signal formula:
[0162] Ψ ′ = h(Λ ′ , μ ′ ),
[0163] where Ψ ′ is the feedback control signal, μ ′ is a parameter reflecting the requirements of the operator's intervention and regulation, h(·) is the feedback control function, which is used to generate the final control signal according to the updated display state Λ ′ of the human-machine interface and the operation intervention control parameter μ ′ .
[0164] Step 1, establish a node strategy model based on game theory, and use game theory to accurately set the initial node strategy to lay a safety foundation. Avoid a single fixed strategy and enhance the system robustness; Step 2, set up a reward and punishment mechanism to correct the node utility, and regulate the node behavior through rewards and punishments. Encourage compliance and suppress violations. Improve the synergy of the network; Step 3, perform off-chain data packaging, data hash calculation and zero-knowledge proof generation. Data packaging improves efficiency, and hash operation ensures the unique identification of data. Zero-knowledge proof ensures accurate verification while protecting privacy; Step 4, upload the zero-knowledge proof and data hash to the chain to achieve on-chain verification. On-chain verification utilizes the immutable feature of the blockchain. It is transparent and reliable, ensuring the authenticity and security of data; Step 5, construct an anomaly detection model to calculate the uniformity of transaction data using Shannon entropy. The Shannon entropy method monitors the status of transaction data in real time. Set a threshold to quickly detect anomalies and reduce potential risks; Step 6, adopt the Shamir secret sharing and multi-signature mechanism for user identity segmentation and verification. Secret sharing disperses the identity information for storage, and multi-signature ensures the verification process. Prevent single-point failures and reduce the risk of data leakage; Step 7, optimize the human-machine interface design to provide real-time monitoring feedback. Intuitive feedback helps the operator promptly grasp the system status. Interface optimization makes monitoring simple and operation flexible.
[0165] In summary, the steps of the present invention are closely linked to construct a complete set of safe and efficient digital currency trading protection solutions, improve the data processing speed, and achieve real-time risk warning and accurate identity authentication.
[0166] A terminal device, which includes a processing unit, a storage unit, a communication unit, and a display unit. Among them, the processing unit is configured to execute program code, and construct according to the node strategy model, reward and punishment mechanism design, off-chain data packaging, data hash calculation, zero-knowledge proof generation, on-chain verification, anomaly detection, user identity information segmentation and verification, and real-time monitoring feedback construction in the digital currency transaction security protection method based on blockchain. And generate the human-machine interface display status and feedback control signal of the terminal device according to the real-time monitoring feedback metrics, feedback mapping, and feedback control function constructed in steps 7.1 to 7.3, so as to realize the digital currency transaction security protection function.
[0167] The terminal device of the present invention adopts an integrated node strategy model and a reward and punishment mechanism, which can flexibly adjust the behaviors of each node, achieving the effects of risk control and network collaborative optimization. Compared with the technical solutions with traditional single fixed strategies, dynamic regulation significantly reduces the risk of node out-of-control and security vulnerabilities.
[0168] The terminal device of the present invention integrates off-chain data packaging, data hash calculation, and zero-knowledge proof generation technologies to ensure data privacy and authenticity, and speeds up data processing. Compared with the existing solutions that completely rely on on-chain data verification, it effectively alleviates the problems of transaction delay and information leakage.
[0169] The terminal device of the present invention constructs a human-machine interface by using real-time monitoring feedback metrics, feedback mapping, and control functions to achieve intuitive and secure status display and control. Compared with the traditional solutions with single and slow-responsive interface feedback, it can quickly detect anomalies and take measures in a timely manner.
[0170] A storage medium stores program code, and the program code is executed by the processing unit on the terminal device. The program code enables the terminal device to run according to each step of the node strategy model construction, reward and punishment mechanism design, off-chain data packaging, data hash calculation, zero-knowledge proof generation, on-chain verification, anomaly detection, user identity information segmentation and verification, and real-time monitoring feedback construction in the digital currency transaction security protection method based on blockchain. And generate a feedback control signal according to the real-time monitoring feedback metrics, feedback mapping function, and feedback control function constructed in steps 7.1 to 7.3, so as to realize the digital currency transaction security protection function.
[0171] The storage medium of the present invention provides the required program code, which can run efficiently on the processing unit of the terminal device. By executing each step in the digital currency transaction security protection method based on blockchain, it ensures the comprehensive security protection of digital currency transactions. Compared with the traditional way of storing data or programs separately, it greatly improves the execution efficiency and data processing ability.
[0172] By storing the program code, the storage medium can ensure the seamless execution of all steps, ensuring that each link is carried out efficiently according to the predetermined plan. Compared with the existing decentralized processing solutions, the centralized storage method improves the simplicity and stability of operations.
[0173] The program code stored in the storage medium supports the processing of transaction data and includes the construction and control of real-time monitoring feedback. By generating feedback control signals, the terminal device can react according to the changes in real-time data and take security measures in a timely manner, greatly enhancing the instant response ability of digital currency transactions. Compared with the traditional lagging feedback mechanism, it can quickly and accurately respond to abnormal transaction situations.
[0174] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made in these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for protecting the security of digital currency transactions based on blockchain, characterized in that, Including: Step 1: Establish a node strategy model based on game theory to determine the initial node strategies; Step 2: Rely on Step 1 to set up a reward and punishment mechanism to modify node utilities and incentivize node behaviors; Step 3: Rely on Step 2 to package off-chain transaction data, calculate the data hash, and generate a zero-knowledge proof; Step 4: Rely on Step 3 to upload the zero-knowledge proof and data hash to the blockchain for on-chain verification; Step 5: Rely on Step 4 to construct an anomaly detection model, calculate the uniformity of transaction data using Shannon entropy, set a threshold, and determine the anomaly status; Step 6: Rely on Step 5 to use the Shamir secret sharing technique combined with a multi-signature mechanism to split and verify user identity information; Step 7: Rely on Step 6 to optimize the human-machine interface design and provide real-time monitoring feedback.
2. A method for protecting the security of digital currency transactions based on blockchain according to claim 1, characterized in that, In Step 1, establishing a node strategy model based on game theory to determine the initial node strategies further includes: Step 1.1: Determine the node set: N = {v1, v2, v3}, where N is the set of all nodes in the network, v1 is the first node parameter symbol, v2 is the second node parameter symbol, and v3 is the third node parameter symbol; Step 1.2: Establish the utility function for each node: E x = α x · β x - γ x · δ x , Among them, E x is the utility function of node x, α x is the node security revenue parameter, β x is the transaction success probability, γ x is the risk loss coefficient, δ x is the potential risk value and x is the node index; Step 1.3: Calculate the conditions that the optimal strategy of each node satisfies: Among them, E y is the utility function of node y, is the symbol of the optimal strategy parameter of the node, is the parameter of the strategy set of other nodes, θ y is any alternative strategy and y is the node index.
3. A method for securing digital currency transactions based on blockchain according to claim 1, characterized in that, In Step 2, relying on Step 1 to set up a reward and punishment mechanism to modify node utilities and incentivize node behaviors further includes: Step 2.1: Set up a reward mechanism: Set the reward parameter when a node follows the protocol. The formula is as follows: R x =α x ·β x , Among them, R x is the reward obtained by node x by following the protocol, α x is the node security benefit parameter, β x is the transaction success probability; Step 2.2: Set up a punishment mechanism: Set the punishment parameter when a node does not comply with the protocol. The formula is as follows: P x = γ x · δ x , Among them, P x is the penalty faced by node x when it fails to comply with the protocol, and γ x is the risk loss coefficient, and δ x is the potential risk value; Step 2.3, modify the node utility function: Based on the reward and punishment mechanism, modify the utility function of the node, and the formula is as follows: E′ x = E x + R x - P x , Among them, E' x is the corrected utility function value, E x is the utility function of node x, R x is the reward obtained by node x by complying with the protocol, P x is the penalty faced by node x when it does not comply with the protocol.
4. A method for securing digital currency transactions based on blockchain according to claim 1, characterized in that, In Step 3, relying on Step 2 to package off-chain transaction data, calculate the data hash, and generate a zero-knowledge proof further includes: Step 3.1: Package off-chain transaction data: Package off-chain transaction data and define the transaction data set: T = {t1, t2, t3, …, t n}, Among them, T is the set of off-chain transaction data, t1 is the first transaction data, t2 is the second transaction data, t3 is the third transaction data, and t n is the nth transaction data; Step 3.2: Calculate the data hash: Calculate the hash value of the packaged off-chain transaction data, and use the hash function H(·) to generate the unique identifier of the data. The formula is as follows: H(T) = H(t1||t2||…||t n ), Among them, H(T) is the hash value of the transaction data set T, and t1, t2, …, t n are off-chain transaction data, and || is the concatenation operation. H(·) is the hash function, which is used to convert transaction data into a hash value of a fixed length; Step 3.3: Generate a zero-knowledge proof: Use the zero-knowledge proof to generate the verification information of the data hash. The formula is as follows: ZK(H(T)), where ZK(H(T)) is the generated zero-knowledge proof, and H(T) is the hash value of the off-chain transaction data set T.
5. A method for protecting the security of digital currency transactions based on blockchain according to claim 1, characterized in that, In Step 4, relying on Step 3 to upload the zero-knowledge proof and data hash to the blockchain for on-chain verification further includes: Step 4.1: Construct verification data and define the verification data: V = φ·ZK(H(T)) + ψ·H(T), where V is the on-chain verification data, φ is the zero-knowledge proof weighting parameter, ψ is the data hash weighting parameter, ZK(H(T)) is the generated zero-knowledge proof, and H(T) is the hash value of the off-chain transaction data set T; Step 4.2: Upload the verification data and define the on-chain storage record: S = f(V, τ), where S is the verification record stored on the blockchain, f(·) is the on-chain verification submission function, V is the on-chain verification data, and τ is the blockchain timestamp; Step 4.3: Conduct on-chain verification and calculate the verification result using the on-chain record: Ω = k(V) - μ(τ), Among them, Ω is the on-chain verification result, k(V) is the processing function based on the on-chain verification data V, and μ(τ) is the verification function based on the blockchain timestamp τ. When Ω≥0, it indicates that the data legality is confirmed.
6. A method for protecting the security of digital currency transactions based on blockchain according to claim 1, characterized in that, In the said step 5, depending on step 4 to construct an anomaly detection model, using Shannon entropy to calculate the transaction data uniformity and setting a threshold to determine the anomaly state further includes: Step 5.1, calculating the formula for defining the entropy value of transaction data uniformity: where ε is the entropy value of the transaction data uniformity in the verification records stored on the chain, and λ q is the occurrence probability of the transaction data in the q-th interval, and Q is the total number of intervals; Step 5.2, setting the formula for defining the threshold for determining the anomaly state: Δ = ε - η, where Δ is the difference between the transaction data uniformity and the preset threshold, and η is the preset anomaly detection threshold; Step 5.3, determining the formula for the anomaly state: E = {1, Δ≥0}, E = {0, Δ<0}, where E is the anomaly detection result, with a value of 1 indicating that the transaction data is in a normal state, and a value of 0 indicating that the transaction data is in an abnormal state.
7. A method for protecting the security of digital currency transactions based on blockchain according to claim 1, characterized in that, In the said step 6, depending on step 5, using the Shamir secret sharing technology combined with the multi-signature mechanism to split and verify the user identity information further includes: Step 6.1, splitting the user identity information to construct a polynomial formula: Among them, Υ is the user identity information, ρ represents the segmentation threshold, P(z) is the segmentation polynomial, and ξ i is a randomly selected segmentation coefficient, and z is the segmentation position parameter; Step 6.2, using the multi-signature mechanism to aggregate the split shares to construct a signature formula: Among them, M is the result of multi-signature aggregation, ω j is the split share signature weight, S j is the j-th split result, and σ is the total number of splits; Step 6.3, restoring the user identity information to construct a Lagrange interpolation formula: Among them, Υ ′ is to restore the user identity information, Ω j is the Lagrange interpolation coefficient, S j is the j-th segmentation result, and σ is the total number of segments.
8. A method for protecting the security of digital currency transactions based on blockchain according to claim 1, characterized in that, In the said step 7, depending on step 6, optimizing the human-computer interface design to provide real-time monitoring feedback further includes: Step 7.1, constructing the formula for defining the real-time monitoring feedback index: Among them, Θ is the real-time monitoring feedback index, α is the weight coefficient of the on-chain storage record, is the new feedback data obtained after processing, β is the weight coefficient of the anomaly detection result, is the output of the formula for determining the abnormal state, γ is the weight coefficient of the multi-signature aggregation result, is the aggregation after segmentation and verification, δ is the weight coefficient of the user identity recovery information, is the Lagrange interpolation recovery; Step 7.2, updating the display state of the human-computer interface to construct a feedback mapping formula: Λ ′ = g(Θ, k ′ ) Among them, Λ ′ is the updated human-machine interface display state, g(·) is the feedback mapping function, Θ is the real-time monitoring feedback index, and k ′ is a parameter reflecting the current system time state; Step 7.3, executing the feedback control strategy to construct a control signal formula: Ψ ′ = h(Λ ′ , μ ′ ), where, Ψ ′ is the feedback control signal, μ ′ is the parameter reflecting the operator's intervention regulation requirement, h(·) is the feedback control function, which is used to generate the final control signal according to the updated human-machine interface display state Λ ′ and the operation intervention control parameter μ ′ 9. A terminal device, characterized in that, The terminal device includes a processing unit, a storage unit, a communication unit, and a display unit. Among them, the processing unit is configured to execute program code, and construct a node policy model, a reward and punishment mechanism design, off-chain data packaging, data hash calculation, zero-knowledge proof generation, on-chain verification, anomaly detection, user identity information splitting and verification, and real-time monitoring feedback construction according to the method for protecting the security of digital currency transactions based on blockchain described in claims 1 to 8. And generate the display state of the human-computer interface of the terminal device and the feedback control signal according to the real-time monitoring feedback index, feedback mapping, and feedback control function constructed in steps 7.1 to 7.3, so as to realize the function of protecting the security of digital currency transactions.
10. A storage medium, characterized in that, The storage medium stores program code, and the program code is executed by the processing unit on the terminal device. The program code enables the terminal device to run according to the steps of constructing a node policy model, a reward and punishment mechanism design, off-chain data packaging, data hash calculation, zero-knowledge proof generation, on-chain verification, anomaly detection, user identity information splitting and verification, and real-time monitoring feedback construction described in claims 1 to 8 of the method for protecting the security of digital currency transactions based on blockchain, and generate a feedback control signal according to the real-time monitoring feedback index, feedback mapping function, and feedback control function constructed in steps 7.1 to 7.3, so as to realize the function of protecting the security of digital currency transactions.