Payment service security protection method and system based on blockchain
By applying blockchain technology in the payment system, establishing distributed nodes, conducting transaction security verification and data sharded encrypted storage, the security problems of the centralized payment system are solved, and the security and stability of payment services and data protection are achieved.
Patent Information
- Application Number
- CN202510445449.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Traditional payment systems rely on centralized servers, which are vulnerable to attacks and data are easily tampered with or deleted, resulting in paralysis of payment services and privacy leakage.
Based on blockchain technology, a distributed node is established by determining deployment strategies, a consensus node is selected for transaction security verification, and the payment data is encrypted and stored in pieces to prevent malicious attacks.
It realizes the safe and stable completion of payment services, prevents data from being maliciously modified or deleted, and ensures transaction security and data privacy.
Smart Images

Figure CN119963191B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of secure payment technologies, and in particular to a blockchain-based payment service security protection method and system. Background Art
[0002] With the acceleration of globalization, the scale of international trade continues to expand, and the demand for payment systems is growing. Traditional payment systems rely on centralized servers to store transaction data. When centralized servers are attacked, the entire payment business will be paralyzed, and transaction data can be easily tampered with or deleted, resulting in privacy leaks.
[0003] Blockchain technology is a decentralized distributed ledger that uses encryption algorithms to ensure data security and immutability. Each block contains a certain number of transaction records and is linked to the previous block through a hash function, forming an ever-expanding chain structure.
[0004] How to apply blockchain to payment services to solve problems existing in traditional payments is a problem that needs to be solved in the payment business. Summary of the Invention
[0005] The present invention provides a payment service security protection method and system based on blockchain, which are used to solve the problems raised in the background technology.
[0006] A payment service security protection method based on blockchain, comprising:
[0007] S1: Determine the deployment strategy for blockchain nodes based on the overall payment business scope, and establish distributed nodes based on the deployment strategy;
[0008] S2: Based on security rules, select a consensus node that meets the current payment business requirements from distributed nodes;
[0009] S3: Perform transaction security verification on the current payment service based on the consensus node, and complete the current payment service after passing the verification;
[0010] S4: Encrypt and store the payment data generated by the current payment business in shards in the storage node.
[0011] Preferably, in S1, based on the overall payment business scope, a deployment strategy for blockchain nodes is determined, and distributed nodes are established based on the deployment strategy, including:
[0012] Based on the overall payment business scope, construct an information matrix of payment services;
[0013] Based on the information matrix and in combination with deployment principles, determine the deployment strategy for blockchain nodes;
[0014] The node positions and node types are determined from the deployment strategy, and distributed nodes are constructed based on the node positions and node types.
[0015] Preferably, in S2, based on security rules, a consensus node that meets the current payment service is selected from distributed nodes, including:
[0016] Obtain publicly available historical transaction information for each node in the distributed nodes;
[0017] Based on historical transaction information, distributed nodes evaluate each other's business capabilities to obtain a capability score for each node;
[0018] Based on security rules, each node in the distributed nodes is rated for trustworthiness to obtain a trust score for each node;
[0019] Based on the current payment business, select a node to be selected from the distributed nodes that meets the regional location distribution;
[0020] Based on the predicted transaction status of the current payment business, determine the capability and trust requirements for the node, and determine the capability weight and trust weight;
[0021] Based on the capability score and capability weight, trust score and trust weight, determine the comprehensive score of the node to be selected, and select the node to be selected with a comprehensive score greater than the preset score as the consensus node;
[0022] Based on the consensus mechanism, the consensus capability of consensus nodes is established.
[0023] Preferably, in S3, the transaction security verification of the current payment service is performed based on the consensus node, including:
[0024] Analyze the current payment business based on the consensus node and obtain the payment operation;
[0025] Verifying the payment operation based on the consensus node to obtain a first consensus result;
[0026] Verifying the identity of the current payment service based on the consensus node to obtain a second consensus result;
[0027] When both the first consensus result and the second consensus result indicate that the verification has been passed, it is determined that the transaction security verification has passed.
[0028] Preferably, in S3, completing the current payment service after verification is passed includes:
[0029] Determine the target node for executing the payment service from the consensus node based on the current payment service;
[0030] The current payment transaction is completed based on the target node.
[0031] Preferably, in S4, the payment data generated by completing the current payment service is encrypted and stored in the storage node in pieces, including:
[0032] Slicing the payment data to obtain multiple data slices;
[0033] Based on the status of the storage node, each data slice is matched with the corresponding storage node to obtain the data allocation result;
[0034] After the data slices are encrypted, the encrypted data are stored in corresponding storage nodes according to the data allocation result.
[0035] Preferably, the information matrix is used in combination with deployment principles to determine a deployment strategy for blockchain nodes, including:
[0036] Obtaining payment service scope information, traffic distribution information, fault frequency distribution information, and attack frequency distribution information from the information matrix;
[0037] Determine the node range and location of selected nodes based on the payment business scope information, and determine the node distribution density within the selected node range based on the traffic distribution information;
[0038] Determining a node selection result according to the node distribution density and the number of node distributions, obtaining an initial distributed node based on the node selection result, and setting a node type in the initial distributed node based on the node information in the initial distributed node;
[0039] determining a failure frequency of each node type based on the failure frequency distribution information, setting a node type weight based on the failure frequency of each node type, determining an increase number of node types based on the node type weight, and adding nodes to the initial distributed node based on the increase number to obtain a first adjusted distributed node;
[0040] Determining a weighted value for node distribution density based on the attack frequency distribution information, determining a target node distribution based on the weighted value, and adding nodes to the first adjusted distributed node based on the target node distribution to obtain a second adjusted distributed node;
[0041] Based on the deployment principle, scoring the second adjusted distributed node to obtain a safe deployment score and a stable deployment score;
[0042] When both the secure deployment score and the stable deployment score meet the preset score requirements, the second method for determining the adjusted distributed nodes is used as the deployment strategy for the blockchain node;
[0043] Otherwise, when the security deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a shard storage rule to clarify the storage node of the payment data. When the stable deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a load balancing rule to clarify the processing order of the distributed node for processing payment business. The method of determining the configured second adjustment distributed node is used as the deployment strategy for the blockchain node.
[0044] Preferably, after encrypting the data slice, storing the encrypted data in the corresponding storage node according to the data allocation result includes:
[0045] Encrypting the data slices based on the encryption algorithm to obtain encrypted data slices and a first encryption key corresponding to the encryption algorithm;
[0046] Based on the data allocation result, establishing a correspondence between the encrypted data slices and the storage nodes, encrypting the correspondence to obtain a second encryption key;
[0047] Dividing the first encryption key to obtain a preset number of initial key fragments having the same amount of data, processing the initial key fragments to obtain a plurality of target key fragments greater than a current preset number, and storing the plurality of target key fragments in different storage nodes respectively;
[0048] The second encryption key is stored in the storage node. When the encrypted data slice is decrypted using the first encryption key, the storage node is triggered to retrieve the second encryption key, and the data slice is restored using the second encryption key to obtain the payment data. If the encrypted data slice cannot be decrypted using the first encryption key, the retrieval of the second encryption key is not triggered.
[0049] Based on the data allocation result, the encrypted data piece is hash-signed and then stored in the corresponding storage node.
[0050] Preferably, the specific process of decrypting the encrypted data slice using the first encryption key is as follows:
[0051] When receiving a payment data retrieval instruction, the retrieval instruction is first verified based on the hash signature. After verification, the target key fragment is obtained from the storage node. When the collected target key fragments are greater than or equal to the preset number, the target key fragment is obtained.
[0052] Combining the obtained target key slices to obtain a first encryption key, decrypting the encrypted data slice using the first encryption key, and obtaining the data slice based on the decryption result;
[0053] When the storage node is triggered to retrieve the second encryption key, the data slices are integrated and restored using the second encryption key to obtain payment data.
[0054] A payment service security protection system based on blockchain, comprising:
[0055] A node establishment module is used to determine a deployment strategy for blockchain nodes based on the overall payment business scope and establish distributed nodes based on the deployment strategy;
[0056] The node consensus module is used to select the consensus node that meets the current payment business from the distributed nodes based on security rules;
[0057] The security verification module is used to perform transaction security verification on the current payment business based on the consensus node, and complete the current payment business after the verification is passed;
[0058] The shard storage module is used to encrypt and store the payment data generated by the current payment business in shards in the storage node.
[0059] Compared with the prior art, the present invention has achieved the following beneficial effects:
[0060] By determining the deployment strategy for blockchain nodes based on the overall payment business scope, and establishing distributed nodes based on the deployment strategy, distributed nodes for payment business are established to ensure the safe and stable completion of payment business. Based on security rules, consensus nodes that meet the current payment business are selected from distributed nodes, and suitable nodes are selected for the current payment business to conduct transactions to ensure transaction security. Transaction security verification is performed on the current payment business based on the consensus node. After the verification is passed, the current payment business is completed. Through transaction security verification, malicious attacks are prevented. The payment data generated by the completion of the current payment business is encrypted and stored in the storage node in shards to ensure the security of the payment data. Through sharded storage, the payment data is effectively prevented from being maliciously modified or deleted.
[0061] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in this application document.
[0062] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 This is a flowchart of a blockchain-based payment service security protection method according to an embodiment of the present invention;
[0065] Figure 2 A flowchart of establishing a distributed node in an embodiment of the present invention;
[0066] Figure 3 This is a structural diagram of a blockchain-based payment service security protection system in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0068] Example 1:
[0069] The embodiment of the present invention provides a payment service security protection method based on blockchain, such as Figure 1 Shown, including:
[0070] S1: Determine the deployment strategy for blockchain nodes based on the overall payment business scope, and establish distributed nodes based on the deployment strategy;
[0071] S2: Based on security rules, select a consensus node that meets the current payment business requirements from distributed nodes;
[0072] S3: Perform transaction security verification on the current payment service based on the consensus node, and complete the current payment service after passing the verification;
[0073] S4: Encrypt and store the payment data generated by the current payment business in shards in the storage node.
[0074] In this embodiment, the overall payment service scope includes a geographical area scope.
[0075] In this embodiment, the deployment strategy for the blockchain nodes is determined based on, for example, the aggregation of business traffic and the frequency of regional attacks.
[0076] In this embodiment, the security rule is, for example, the trust level of each node.
[0077] In this embodiment, transaction security verification includes verification of account balance, transaction amount, abnormal transaction behavior, etc.
[0078] In this embodiment, the payment data includes, for example, the transaction order amount, successful transaction orders, etc.
[0079] The beneficial effects of the above design scheme are: by determining the deployment strategy for blockchain nodes based on the overall payment business scope, and establishing distributed nodes based on the deployment strategy, the distributed node establishment of the payment business is realized, and the safe and stable completion of the payment business is ensured; based on security rules, the consensus node that meets the current payment business is selected from the distributed nodes, and the appropriate node is selected for the current payment business to conduct transactions to ensure transaction security; the current payment business is subject to transaction security verification based on the consensus node, and the current payment business is completed after the verification is passed; through transaction security verification, malicious attacks are prevented, and the payment data generated by the completion of the current payment business is encrypted and stored in the storage node in shards to ensure the security of the payment data. Through shard storage, the payment data is effectively prevented from being maliciously modified or deleted.
[0080] Example 2:
[0081] Based on Example 1, the present invention provides a payment service security protection method based on blockchain, such as Figure 2 As shown, in S1, based on the overall payment business scope, a deployment strategy for blockchain nodes is determined, and distributed nodes are established based on the deployment strategy, including:
[0082] Based on the overall payment business scope, construct an information matrix of payment services;
[0083] Based on the information matrix and in combination with deployment principles, determine the deployment strategy for blockchain nodes;
[0084] The node positions and node types are determined from the deployment strategy, and distributed nodes are constructed based on the node positions and node types.
[0085] In this embodiment, the information matrix is used to represent key information included in the overall payment business scope.
[0086] In this embodiment, the deployment principle is that security performance, stability performance, load balancing, etc. meet preset requirements.
[0087] In this embodiment, node types include master nodes, verification nodes, storage nodes, etc.
[0088] The beneficial effects of the above design scheme are: by constructing an information matrix of payment services based on the overall payment business scope, a clear and effective information basis is provided for node deployment; based on the information matrix and combined with the deployment principles, a deployment strategy for blockchain nodes is determined to ensure that the deployment strategy meets actual needs; the node location and node type are determined from the deployment strategy; distributed nodes are constructed based on the node location and node type, and the establishment of distributed nodes for payment services is realized, thereby ensuring the safe and stable completion of payment services.
[0089] Example 3:
[0090] Based on Example 1, this embodiment of the present invention provides a payment service security protection method based on blockchain. In S2, based on security rules, a consensus node that meets the current payment service is selected from distributed nodes, including:
[0091] Obtain publicly available historical transaction information for each node in the distributed nodes;
[0092] Based on historical transaction information, distributed nodes evaluate each other's business capabilities to obtain a capability score for each node;
[0093] Based on security rules, each node in the distributed nodes is rated for trustworthiness to obtain a trust score for each node;
[0094] Based on the current payment business, select a node to be selected from the distributed nodes that meets the regional location distribution;
[0095] Based on the predicted transaction status of the current payment business, determine the capability and trust requirements for the node, and determine the capability weight and trust weight;
[0096] Based on the capability score and capability weight, trust score and trust weight, determine the comprehensive score of the node to be selected, and select the node to be selected with a comprehensive score greater than the preset score as the consensus node;
[0097] Based on the consensus mechanism, the consensus capability of consensus nodes is established.
[0098] In this embodiment, distributed nodes are allowed to rate each other to ensure fairness and openness of the ratings.
[0099] In this embodiment, the node address location distribution of the nodes to be selected meets the requirements of the current payment service.
[0100] The beneficial effects of the above design scheme are: by determining the comprehensive score value of the node to be selected based on the capability score and capability weight, trust score and trust weight, and selecting the node to be selected with a comprehensive score value greater than the preset score value as the consensus node, based on the consensus mechanism, the consensus capability of the consensus node is established, and consensus is achieved on distributed nodes, providing a basis for the smooth transaction of payment business at the consensus node, selecting suitable nodes for the current payment business to conduct transactions, and ensuring transaction security.
[0101] Example 4:
[0102] Based on Example 1, this embodiment of the present invention provides a payment service security protection method based on blockchain. In S3, transaction security verification of the current payment service is performed based on the consensus node, including:
[0103] Analyze the current payment business based on the consensus node and obtain the payment operation;
[0104] Verifying the payment operation based on the consensus node to obtain a first consensus result;
[0105] Verifying the identity of the current payment service based on the consensus node to obtain a second consensus result;
[0106] When both the first consensus result and the second consensus result indicate that the verification has been passed, it is determined that the transaction security verification has passed.
[0107] The beneficial effects of the above design scheme are: by parsing the current payment business based on the consensus node, the payment operation is obtained, the payment operation is verified based on the consensus node to obtain a first consensus result, the identity of the current payment business is verified based on the consensus node to obtain a second consensus result, when the first consensus result and the second consensus result both indicate that the verification has passed, it is determined that the transaction security verification has passed, and the current payment business is verified from both identity and operation aspects. Through transaction security verification, malicious attacks are prevented and transaction security is guaranteed.
[0108] Example 5:
[0109] Based on Example 4, this embodiment of the present invention provides a payment service security protection method based on blockchain. In S3, the current payment service is completed after verification, including:
[0110] Determine the target node for executing the payment service from the consensus node based on the current payment service;
[0111] The current payment transaction is completed based on the target node.
[0112] The beneficial effect of the above design scheme is: by determining the target node for executing the payment service from the consensus node based on the current payment service, completing the current payment service based on the target node, and realizing the smooth completion of the current payment service in the distributed nodes.
[0113] Example 6:
[0114] Based on Example 1, this embodiment of the present invention provides a payment service security protection method based on blockchain. In S4, the payment data generated by the current payment service is encrypted and stored in the storage node in pieces, including:
[0115] Slicing the payment data to obtain multiple data slices;
[0116] Based on the status of the storage node, each data slice is matched with the corresponding storage node to obtain the data allocation result;
[0117] After the data slices are encrypted, the encrypted data are stored in corresponding storage nodes according to the data allocation result.
[0118] In this embodiment, the state of the storage node is, for example, a full load state.
[0119] The beneficial effects of the above design scheme are: by sharding the payment data to obtain multiple data slices, based on the status of the storage node, matching the corresponding storage node for each data slice to obtain the data allocation result, after encrypting the data slice, the encrypted data is stored in the corresponding storage node according to the data allocation result, ensuring the security of the payment data, and effectively preventing the payment data from being maliciously modified or deleted through sharded storage.
[0120] Example 7:
[0121] Based on Example 2, this embodiment of the present invention provides a payment service security protection method based on blockchain, which determines the deployment strategy for blockchain nodes based on the information matrix and in combination with deployment principles, including:
[0122] Obtaining payment service scope information, traffic distribution information, fault frequency distribution information, and attack frequency distribution information from the information matrix;
[0123] Determine the node range and location of selected nodes based on the payment business scope information, and determine the node distribution density within the selected node range based on the traffic distribution information;
[0124] Determining a node selection result according to the node distribution density and the number of node distributions, obtaining an initial distributed node based on the node selection result, and setting a node type in the initial distributed node based on the node information in the initial distributed node;
[0125] determining a failure frequency of each node type based on the failure frequency distribution information, setting a node type weight based on the failure frequency of each node type, determining an increase number of node types based on the node type weight, and adding nodes to the initial distributed node based on the increase number to obtain a first adjusted distributed node;
[0126] Determining a weighted value for node distribution density based on the attack frequency distribution information, determining a target node distribution based on the weighted value, and adding nodes to the first adjusted distributed node based on the target node distribution to obtain a second adjusted distributed node;
[0127] Based on the deployment principle, scoring the second adjusted distributed node to obtain a safe deployment score and a stable deployment score;
[0128] When both the secure deployment score and the stable deployment score meet the preset score requirements, the second method for determining the adjusted distributed nodes is used as the deployment strategy for the blockchain node;
[0129] Otherwise, when the security deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a shard storage rule to clarify the storage node of the payment data. When the stable deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a load balancing rule to clarify the processing order of the distributed node for processing payment business. The method of determining the configured second adjustment distributed node is used as the deployment strategy for the blockchain node.
[0130] In this embodiment, the shard storage rules are configured such that data on Asian transactions is stored on nodes in China, Japan, and Singapore, while other nodes, such as those in Europe, are prevented from storing payment data.
[0131] In this embodiment, the load balancing rule enables nodes to process payment services more flexibly. Instead of waiting for a single node to process, the payment services are allocated to other identical nodes for processing, thereby improving processing efficiency.
[0132] In this embodiment, the information matrix also includes information on the locations of deployable nodes involved in the business scope.
[0133] In this embodiment, the payment service scope information includes both parties of the payment service, the specific payment type, and the like.
[0134] In this embodiment, the traffic distribution information is the region involved in the payment business. For example, there are more payment businesses in Asia, and the traffic distribution in Asia is dense.
[0135] In this embodiment, the fault frequency distribution information is the frequency of faults occurring in each node during operation, and is related to the characteristics of the node itself.
[0136] In this embodiment, the attack frequency distribution information is the frequency at which the node is attacked by hackers during operation.
[0137] In this embodiment, the attack frequency distribution information ensures the security of node deployment, and the fault frequency distribution information ensures the stability of node deployment.
[0138] In this embodiment, the deployment principle determines the security scoring criteria and the stability scoring criteria.
[0139] In this embodiment, the first adjustment distributed node adds a spare node for the failed node, so that when a failure occurs, the service can be transferred to the spare node in time.
[0140] In this embodiment, the second adjustment distributed node adds a spare node for the node where the attack occurs, so that when a failure occurs, the system can be promptly transferred to the spare node.
[0141] The beneficial effects of the above design scheme are: by selecting and deploying nodes based on payment business scope information, traffic distribution information, fault frequency distribution information and attack frequency distribution information, the practicality of node deployment is guaranteed, and based on the deployment principle, the second adjustment distributed node is scored to obtain a security deployment score value and a stable deployment score value; when the security deployment score value and the stable deployment score value both meet the preset scoring requirements, the method for determining the second adjustment distributed node is used as the deployment strategy for the blockchain node; otherwise, when the security deployment score value does not meet the preset scoring requirements, the second adjustment distributed node is configured with a shard storage rule to clarify the storage node of the payment data; when the stable deployment score value does not meet the preset scoring requirements, the second adjustment distributed node is configured with a load balancing rule to clarify the processing order of the distributed node for processing payment business, and the method for determining the configured second adjustment distributed node is used as the deployment strategy for the blockchain node, thereby ensuring stability and security under the deployment strategy and providing a basis for the efficient and accurate completion of payment business.
[0142] Example 8:
[0143] Based on Example 6, an embodiment of the present invention provides a payment service security protection method based on blockchain, wherein after encrypting the data slice, the encrypted data is stored in the corresponding storage node according to the data distribution result, including:
[0144] Encrypting the data slices based on the encryption algorithm to obtain encrypted data slices and a first encryption key corresponding to the encryption algorithm;
[0145] Based on the data allocation result, establishing a correspondence between the encrypted data slices and the storage nodes, encrypting the correspondence to obtain a second encryption key;
[0146] Dividing the first encryption key to obtain a preset number of initial key fragments having the same amount of data, processing the initial key fragments to obtain a plurality of target key fragments greater than a current preset number, and storing the plurality of target key fragments in different storage nodes respectively;
[0147] The second encryption key is stored in the storage node. When the encrypted data slice is decrypted using the first encryption key, the storage node is triggered to retrieve the second encryption key, and the data slice is restored using the second encryption key to obtain the payment data. If the encrypted data slice cannot be decrypted using the first encryption key, the retrieval of the second encryption key is not triggered.
[0148] Based on the data allocation result, the encrypted data piece is hash-signed and then stored in the corresponding storage node.
[0149] In this embodiment, the encryption algorithm is, for example, a symmetric encryption algorithm or an asymmetric encryption algorithm.
[0150] In this embodiment, the first encryption key is mechanically distributed and stored, thereby ensuring the security of key storage.
[0151] In this embodiment, each data piece is encrypted, so that the payment data cannot be restored even if part of the data is stolen.
[0152] In this embodiment, a correspondence between an encrypted data slice and a storage node is established, the correspondence is encrypted, and a second encryption key is obtained, which provides a basis for recovering the original payment data after obtaining the data slice, and triggers the acquisition of the second encryption key after obtaining the data slice to ensure storage security.
[0153] In this embodiment, the initial key fragment is processed to obtain multiple target key fragments greater than the current preset number, and the multiple target key fragments are respectively stored in different storage nodes, so that the data can be decrypted without obtaining all the target key fragments, avoiding the inability to obtain payment data due to the failure of a single storage node.
[0154] The beneficial effects of the above design scheme are: by encrypting the data slices separately based on the encryption algorithm, encrypted data slices are obtained, and the first encryption key corresponding to the encryption algorithm is obtained; by encrypting each data slice separately, payment data that cannot be restored even if part of the data is stolen is achieved; based on the data distribution result, a correspondence between the encrypted data slices and the storage nodes is established, the correspondence is encrypted to obtain the second encryption key; the first encryption key is divided to obtain a preset number of initial key slices with the same data volume; the initial key slices are processed to obtain multiple target key slices greater than the current preset number; the multiple target key slices are stored in different storage nodes respectively, and now it is not necessary to obtain all the target key slices to achieve data decryption, avoiding the inability to obtain payment data due to the failure of a single storage node; based on the data distribution result, the encrypted data slice is hash-signed and then stored in the corresponding storage node. Through shard storage, the payment data is effectively prevented from being maliciously modified or deleted.
[0155] Example 9:
[0156] Based on Example 8, this embodiment of the present invention provides a payment service security protection method based on blockchain. The specific process of decrypting the encrypted data slice using the first encryption key is as follows:
[0157] When receiving a payment data retrieval instruction, the retrieval instruction is first verified based on the hash signature. After verification, the target key fragment is obtained from the storage node. When the collected target key fragments are greater than or equal to the preset number, the target key fragment is obtained.
[0158] Combining the obtained target key slices to obtain a first encryption key, decrypting the encrypted data slice using the first encryption key, and obtaining the data slice based on the decryption result;
[0159] When the storage node is triggered to retrieve the second encryption key, the data slices are integrated and restored using the second encryption key to obtain payment data.
[0160] The beneficial effects of the above design scheme are: when an instruction to retrieve payment data is received, the retrieval instruction is first verified based on the hash signature. After the verification is passed, the target key slice is obtained from the storage node. When the collected target key slices are greater than or equal to the preset number, the acquisition of the target key slices is completed, the obtained target key slices are combined to obtain the first encryption key, the encrypted data slice is decrypted using the first encryption key, and the data slice is obtained according to the decryption result. When the storage node is triggered to retrieve the second encryption key, the data slice is integrated and restored using the second encryption key to obtain the payment data. Through sharded storage, the payment data can be effectively prevented from being maliciously modified or deleted, and the encryption security is achieved, and the recovery of the payment data is facilitated.
[0161] Example 10:
[0162] The present invention provides a payment service security protection system based on blockchain, such as Figure 3 Shown, including:
[0163] A node establishment module is used to determine a deployment strategy for blockchain nodes based on the overall payment business scope and establish distributed nodes based on the deployment strategy;
[0164] The node consensus module is used to select the consensus node that meets the current payment business from the distributed nodes based on security rules;
[0165] The security verification module is used to perform transaction security verification on the current payment business based on the consensus node, and complete the current payment business after the verification is passed;
[0166] The shard storage module is used to encrypt and store the payment data generated by the current payment business in shards in the storage node.
[0167] In this embodiment, the overall payment service scope includes a geographical area scope.
[0168] In this embodiment, the deployment strategy for the blockchain nodes is determined based on, for example, the aggregation of business traffic and the frequency of regional attacks.
[0169] In this embodiment, the security rule is, for example, the trust level of each node.
[0170] In this embodiment, transaction security verification includes verification of account balance, transaction amount, abnormal transaction behavior, etc.
[0171] In this embodiment, the payment data includes, for example, the transaction order amount, successful transaction orders, etc.
[0172] The beneficial effects of the above design scheme are: by determining the deployment strategy for blockchain nodes based on the overall payment business scope, and establishing distributed nodes based on the deployment strategy, the distributed node establishment of the payment business is realized, and the safe and stable completion of the payment business is ensured; based on security rules, the consensus node that meets the current payment business is selected from the distributed nodes, and the appropriate node is selected for the current payment business to conduct transactions to ensure transaction security; the current payment business is subject to transaction security verification based on the consensus node, and the current payment business is completed after the verification is passed; through transaction security verification, malicious attacks are prevented, and the payment data generated by the completion of the current payment business is encrypted and stored in the storage node in shards to ensure the security of the payment data. Through shard storage, the payment data is effectively prevented from being maliciously modified or deleted.
[0173] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of this application document and its equivalents, the present invention is intended to include these modifications and variations.
Claims
1. A payment service security protection method based on blockchain, characterized in that: include: S1: Determine the deployment strategy for blockchain nodes based on the overall payment business scope, and establish distributed nodes based on the deployment strategy; S2: Based on security rules, select consensus nodes that meet the current payment business requirements from distributed nodes, including: Obtain publicly available historical transaction information for each node in the distributed nodes; Based on historical transaction information, distributed nodes evaluate each other's business capabilities to obtain a capability score for each node; Based on security rules, each node in the distributed nodes is rated for trustworthiness to obtain a trust score for each node; Based on the current payment business, select a node to be selected from the distributed nodes that meets the regional location distribution; Based on the predicted transaction status of the current payment business, determine the capability and trust requirements for the node, and determine the capability weight and trust weight; Based on the capability score and capability weight, trust score and trust weight, determine the comprehensive score of the node to be selected, and select the node to be selected with a comprehensive score greater than the preset score as the consensus node; Based on the consensus mechanism, establish the consensus capability of consensus nodes; S3: Perform transaction security verification on the current payment service based on the consensus node, and complete the current payment service after passing the verification; S4: Encrypt and store the payment data generated by the current payment business in shards in the storage node.
2. A payment service security protection method based on blockchain according to claim 1, characterized in that: In S1, based on the overall payment business scope, a deployment strategy for blockchain nodes is determined, and distributed nodes are established based on the deployment strategy, including: Based on the overall payment business scope, construct an information matrix of payment services; Based on the information matrix and in combination with deployment principles, determine the deployment strategy for blockchain nodes; The node positions and node types are determined from the deployment strategy, and distributed nodes are constructed based on the node positions and node types.
3. A payment service security protection method based on blockchain according to claim 1, characterized in that: In S3, the current payment service is subject to transaction security verification based on the consensus node, including: Analyze the current payment business based on the consensus node and obtain the payment operation; Verifying the payment operation based on the consensus node to obtain a first consensus result; Verifying the identity of the current payment service based on the consensus node to obtain a second consensus result; When both the first consensus result and the second consensus result indicate that the verification has been passed, it is determined that the transaction security verification has passed.
4. A payment service security protection method based on blockchain according to claim 3, characterized in that: In S3, after verification is passed, the current payment service is completed, including: Determine the target node for executing the payment service from the consensus node based on the current payment service; The current payment transaction is completed based on the target node.
5. A payment service security protection method based on blockchain according to claim 1, characterized in that: In S4, the payment data generated by the current payment service is encrypted and stored in the storage node in pieces, including: Slicing the payment data to obtain multiple data slices; Based on the status of the storage node, each data slice is matched with the corresponding storage node to obtain the data allocation result; After the data slices are encrypted, the encrypted data are stored in corresponding storage nodes according to the data allocation result.
6. A payment service security protection method based on blockchain according to claim 2, characterized in that: Determining the deployment strategy for blockchain nodes based on the information matrix and in combination with deployment principles includes: Obtaining payment service scope information, traffic distribution information, fault frequency distribution information, and attack frequency distribution information from the information matrix; Determine the node range and location of selected nodes based on the payment business scope information, and determine the node distribution density within the selected node range based on the traffic distribution information; Determining a node selection result according to the node distribution density and the number of node distributions, obtaining an initial distributed node based on the node selection result, and setting a node type in the initial distributed node based on the node information in the initial distributed node; determining a failure frequency of each node type based on the failure frequency distribution information, setting a node type weight based on the failure frequency of each node type, determining an increase number of node types based on the node type weight, and adding nodes to the initial distributed node based on the increase number to obtain a first adjusted distributed node; Determining a weighted value for node distribution density based on the attack frequency distribution information, determining a target node distribution based on the weighted value, and adding nodes to the first adjusted distributed node based on the target node distribution to obtain a second adjusted distributed node; Based on the deployment principle, scoring the second adjusted distributed node to obtain a safe deployment score and a stable deployment score; When both the secure deployment score and the stable deployment score meet the preset score requirements, the second method for determining the adjusted distributed nodes is used as the deployment strategy for the blockchain node; Otherwise, when the security deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a shard storage rule to clarify the storage node of the payment data. When the stable deployment score value does not meet the preset score requirements, the second adjustment distributed node is configured with a load balancing rule to clarify the processing order of the distributed node for processing payment business. The method of determining the configured second adjustment distributed node is used as the deployment strategy for the blockchain node.
7. A payment service security protection method based on blockchain according to claim 5, characterized in that: After encrypting the data slice, storing the encrypted data in the corresponding storage node according to the data allocation result includes: Encrypting the data slices based on the encryption algorithm to obtain encrypted data slices and a first encryption key corresponding to the encryption algorithm; Based on the data allocation result, establishing a correspondence between the encrypted data slices and the storage nodes, encrypting the correspondence to obtain a second encryption key; Dividing the first encryption key to obtain a preset number of initial key fragments having the same amount of data, processing the initial key fragments to obtain a plurality of target key fragments greater than a current preset number, and storing the plurality of target key fragments in different storage nodes respectively; The second encryption key is stored in the storage node. When the encrypted data slice is decrypted using the first encryption key, the storage node is triggered to retrieve the second encryption key, and the data slice is restored using the second encryption key to obtain the payment data. If the encrypted data slice cannot be decrypted using the first encryption key, the retrieval of the second encryption key is not triggered. Based on the data allocation result, the encrypted data piece is hash-signed and then stored in the corresponding storage node.
8. A payment service security protection method based on blockchain according to claim 7, characterized in that: The specific process of decrypting the encrypted data slice using the first encryption key is as follows: When receiving a payment data retrieval instruction, the retrieval instruction is first verified based on the hash signature. After verification, the target key fragment is obtained from the storage node. When the collected target key fragments are greater than or equal to the preset number, the target key fragment is obtained. Combining the obtained target key slices to obtain a first encryption key, decrypting the encrypted data slice using the first encryption key, and obtaining the data slice based on the decryption result; When the storage node is triggered to retrieve the second encryption key, the data slices are integrated and restored using the second encryption key to obtain payment data.
9. A payment service security protection system based on blockchain, specifically used in the payment service security protection method according to claim 1, characterized in that: include: A node establishment module is used to determine a deployment strategy for blockchain nodes based on the overall payment business scope and establish distributed nodes based on the deployment strategy; The node consensus module is used to select the consensus node that meets the current payment business from the distributed nodes based on security rules; The security verification module is used to perform transaction security verification on the current payment business based on the consensus node, and complete the current payment business after the verification is passed; The shard storage module is used to encrypt and store the payment data generated by the current payment business in shards in the storage node.
Citation Information
Patent Citations
Block chain node verification method based on block chain payment and readable storage medium
CN112884467A
Methods, devices, and systems for secure payments
US20210357915A1