Method for storing payment data based on block chain technology
By using the SDK interface to connect with the blockchain in the application client, decentralized storage of data is solved, and the risk that data may be subject to internal or external attacks in the prior art is solved, and the security and immutability of data are achieved.
Patent Information
- Application Number
- CN202510448846.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Existing methods of storing payment data based on blockchain technology rely on access control and encryption techniques to protect data, but may still be at risk of internal or external attacks.
Decentralized storage of data is achieved by connecting with the blockchain using the SDK interface in the application client. Specific steps include connection between the customer input module and the blockchain, membership verification, endorsement node verification, transaction packaging and sorting, block generation and submission, ensuring the security and immutability of data.
Decentralized design is realized, reducing the risk of single point of failure, using encryption technology to ensure data security, providing transparency and traceability, ensuring data immutability, and building trust through consensus mechanisms to avoid dependence on individual entities.
Smart Images

Figure CN119941247A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology data storage, and in particular to a method for storing payment data based on blockchain technology, which stores payment transaction data through blockchain technology. Background Art
[0002] At present, data storage generally adopts centralized relational database systems. Through standard interfaces such as ODBC (Open Database Connectivity) and JDBC (Java Database Connectivity), the system submits the generated data to the relational database for storage and retrieves the required information from it. This storage method has become a traditional solution widely adopted by the industry because of its maturity and stability. However, this centralized data management method has certain limitations, especially in terms of data security. Since the data is highly concentrated in the hands of the platform, if the platform fails to abide by the principle of confidentiality, there is a possibility of tampering with the data, which will undoubtedly pose a threat to the interests of users. Blockchain technology provides a decentralized data storage solution. This technology ensures the immutability of data through distributed ledgers, which significantly improves data security. In the blockchain system, data is not controlled by a single central entity, but is maintained by multiple nodes in the network, which effectively prevents the risk of data being maliciously tampered with. This decentralized storage method provides new ideas and solutions for protecting user privacy and data security. Summary of the invention
[0003] In view of the problems existing in the existing method of storing payment data based on blockchain technology, the present invention is proposed.
[0004] Therefore, the problem to be solved by the present invention is that currently data storage relies on access control and encryption technology to protect data, but may still be subject to internal or external attacks.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for storing payment data based on blockchain technology, comprising: In the application client, the customer input module is connected to the blockchain through the SDK interface; The client input module sends a first connection signal to the blockchain through the SDK interface, and the membership verification module of the blockchain verifies the first connection signal. If the verification is successful, the first signal information is stored in the blockchain; The client input module sends the second connection signal to the blockchain through the SDK interface. The endorsement node module of the blockchain verifies the execution authority of the second connection signal. If the execution authority meets the transaction requirements, the endorsement node signs the second connection signal to form a third connection signal and returns it to the client input module. After receiving the third connection signal, the customer input module performs content judgment and the number judgment of the third connection signal. The customer input module packages and signs the third connection signal to form a fourth connection signal and sends it to the sorting module of the blockchain. The sorting module uses the blockchain transaction sorting mechanism to sort and transmit the signal; After receiving the fourth connection signal, the sorting module generates a genesis block according to the block generation strategy, puts one or more fourth connection signal transaction packaging clusters into the genesis block, generates a new block, and sends it to the submission module, which performs data storage and transaction data update.
[0006] As a preferred solution of the method for storing payment data based on blockchain technology of the present invention, wherein in the customer input module, the customer input module is connected to the blockchain through the SDK interface, including: The customer input module writes payment data into the blockchain through the SDK interface, and only implements two interfaces: writing and reading. When the user completes the payment, the writing interface is called to save the data into the blockchain and the first connection signal is input; when querying the user's personal payment record, the reading interface is called to obtain personal data from the blockchain; In the first connection signal verification phase, the client input module calls the member service through the SDK to register and obtain an identity certificate.
[0007] As a preferred solution of the method for storing payment data based on blockchain technology described in the present invention, the blockchain sorting module adopts Kafka mode, which is composed of ZooKeeper, Kafka and Orderer, and Org and Peer are added to realize the blockchain alliance chain network; The blockchain alliance consists of 3 ZooKeepers, 4 Kafkas and 3 Orderers, plus 1 Org and 3 Peers to realize the blockchain alliance chain network.
[0008] As a preferred solution of the method for storing payment data based on blockchain technology of the present invention, the customer input module performs content judgment and third connection signal quantity judgment after receiving the third connection signal, including: Determine whether the proposal results are consistent and whether they are executed in accordance with the specified endorsement policy. If no endorsement equal to the reserved quantity is received, the processing is terminated; otherwise, the customer input module packages the data into a transaction and signs it.
[0009] As a preferred solution of the method for storing payment data based on blockchain technology of the present invention, the customer input module is divided into a first operation mode and a second operation mode through the operation connection relationship between the SDK and the blockchain module, wherein the first operation mode is when the environment is started, the process is: Start blockchain operation, start sorting nodes, start nodes, create channels on blockchain, add nodes to channels, install smart contracts, and the environment startup process ends; The second operation mode is when the transaction is submitted, including: The customer input module initiates a transaction and submits it to the SDK interface. The SDK interface submits the transaction information to the endorsement node, which forwards it to the sorting node. The sorting node sorts the data and sends it to the transaction block. The transaction block packages the data and submits it to the ledger for storage.
[0010] As a preferred solution of the method for storing payment data based on blockchain technology described in the present invention, the characteristics of the blockchain transaction sorting mechanism include a multi-dimensional sorting function based on dynamic convolution reputation points: Where Ψ is the transaction Tx k The final sorting weight, t0 is the system initialization time, t c is the current timestamp, λ is the time decay coefficient (λ∈(0,1]), ρ k is the normalized value of the transaction amount, R n(τ) is the reputation function of node n at time τ, m is the total number of candidate nodes, v j is the verification pass rate of node j, η j is the network delay of node j, σ j is the encryption strength coefficient, ε is a small amount to prevent division by zero, Φ(θ j ) is the resource load vector of node j, P is the standard distribution of transaction characteristics, Q k Tx k The actual distribution of , α is the KL divergence adjustment factor, s k is the transaction security level, H(x) is the Heaviside step function, V(x) is the verification efficiency function, and D KL is the Kullback-Leibler divergence, F(x) is the security enhancement function, Ψ∈[0,1], when Ψ>0.7, the transaction enters the priority packaging queue, Ψ∈(0.3,0.7) enters the regular queue, and Ψ<0.3 requires re-verification.
[0011] As a preferred solution of the method for storing payment data based on blockchain technology described in the present invention, the execution process of the smart contract includes: The program client passes the identity information to the identity authentication module in the blockchain; The identity authentication module defines the user's identity ID, order ID, payment platform transaction ID, purchased product, transaction amount and transaction time variables, and outputs them in args bytes; Determine the args byte length: If the length is not 6, it will prompt that there is a problem with the number of parameters and end the contract execution phase; if the args byte length is 6, call the Init function, define the pay structure and call the PutState function, and enter the return err function phase; Determine the number of returned err functions: If the number of returned err functions is not empty, it is judged as an error message and the contract execution phase ends; if the returned err function is empty, the Success function is called to end the contract execution phase.
[0012] As a preferred solution of the method for storing payment data based on blockchain technology of the present invention, after receiving the third connection signal, the customer input module determines whether the proposal result is consistent and whether it is executed with reference to the specified endorsement policy; if no endorsement equal to the reserved quantity is received, the processing is terminated; otherwise, the customer input module packages the data together to form a transaction and signs it, and sends it to the sorting module; After receiving the new block formed by the fourth connection signal group, the submission module will verify each transaction in the block to check whether the input and output on which the transaction depends are consistent with the current state of the blockchain. After completion, the block will be appended to the local blockchain, the latest values of all keys will be modified, and the obtained data will be stored.
[0013] The present invention provides the following technical solution: an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement an AI-based method for identifying illegal business system data operation behaviors.
[0014] The present invention provides the following technical solution: an electronic device, comprising: A computer-readable storage medium stores executable instructions, which, when executed by a processor, enable the processor to implement an AI-based method for identifying illegal data operation behaviors in a business system.
[0015] The beneficial effects of the present invention are: 1. Decentralized design: With decentralized design, data is distributed across multiple nodes in the network, reducing the risk of single point failure.
[0016] 2. Data security: Encryption technology is used to ensure that data cannot be tampered with, and each data block is linked to the previous block through a hash value, which enhances data security.
[0017] 3. Transparency and traceability: All transactions are transparent and can be verified by all participants in the network, providing a high degree of traceability.
[0018] 4. Immutability: Once the data is written, it is almost impossible to modify or delete it, ensuring the immutability of the data.
[0019] 5. Trust mechanism: Trust is established through a consensus mechanism, without the need to trust a single entity. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a method flow logic diagram of the method for storing payment data based on blockchain technology in Example 1; Figure 2 This is a flowchart of executing a smart contract for the method for storing payment data based on blockchain technology in Example 1; Figure 3 A query smart contract diagram for the method for storing payment data based on blockchain technology in Example 1; Figure 4 This is a system architecture diagram of the block storage module of the method for storing payment data based on blockchain technology in Example 1. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0022] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0024] Example 1 Reference Figures 1 to 4 , which is the first embodiment of the present application, and which provides a method for storing payment data based on blockchain technology, comprising: like Figure 1 As shown, in the application client, the customer input module is connected to the blockchain through the SDK interface; The client input module sends a first connection signal to the blockchain through the SDK interface, and the membership verification module of the blockchain verifies the first connection signal. If the verification is successful, the first signal information is stored in the blockchain; The client input module sends the second connection signal to the blockchain through the SDK interface. The endorsement node module of the blockchain verifies the execution authority of the second connection signal. If the execution authority meets the transaction requirements, the endorsement node signs the second connection signal to form a third connection signal and returns it to the client input module. After receiving the third connection signal, the client input module performs content judgment and the number judgment of the third connection signal. The client input module packages and signs the third connection signal to form a fourth connection signal and sends it to the sorting module of the blockchain; After receiving the fourth connection signal, the sorting module generates a genesis block according to the block generation strategy, puts one or more fourth connection signal transaction packaging clusters into the genesis block, generates a new block, and sends it to the submission module, which performs data storage and transaction data update.
[0025] The customer input module writes payment data into the blockchain through the SDK interface, and only implements two interfaces: write and read. When the user completes the payment, the write interface is called to save the data to the blockchain; when querying the user's personal payment record, the read interface is called to obtain personal data from the blockchain.
[0026] According to the characteristics of the blockchain transaction sorting mechanism, a multi-dimensional sorting function based on dynamic convolution reputation points is designed: The characters are explained as follows: Ψ is the transaction Tx k The final sorting weight, t0 is the system initialization time, t c is the current timestamp, λ is the time decay coefficient (λ∈(0,1]), ρ k is the normalized value of the transaction amount, R n(τ) is the reputation function of node n at time τ, m is the total number of candidate nodes, v j is the verification pass rate of node j, η j is the network delay of node j, σ j is the encryption strength coefficient, ε is a small amount to prevent division by zero (ε=1e-8), Φ(θ j ) is the resource load vector of node j, P is the standard distribution of transaction characteristics, Q k Tx k The actual distribution of , α is the KL divergence adjustment factor (α ≥ 1), s k is the transaction security level, H(x) is the Heaviside step function, V(x) is the verification efficiency function, and D KL is the Kullback-Leibler divergence, F(x) is the security enhancement function, Ψ∈[0,1], when Ψ>0.7, the transaction enters the priority packaging queue, Ψ∈(0.3,0.7) enters the regular queue, and Ψ<0.3 requires re-verification.
[0027] Function definition: Reputation function: in , is the reputation weight coefficient, N valid is the number of historical valid verifications, N invalid It is an invalid record; Verify the performance function: Where Γ is the gamma function, ψ is the digamma function, and k is the derivative order security enhancement function; Where ζ is the Riemann zeta function and p is the encryption protocol level; Ψ∈[0,1], when Ψ>0.7, the transaction enters the priority packaging queue, Ψ∈(0.3,0.7) enters the regular queue, and Ψ<0.3 requires re-verification; the numerator integral term controls the transaction time value, the denominator differential term evaluates the node verification capability, and the KL divergence term ensures the compliance of transaction characteristics.
[0028] Innovative features: The time decay integral is coupled with the logarithmic function of the amount to construct a transaction time value model; The second-order partial derivative is introduced to describe the marginal effect change of node verification capability; The gamma function series expansion is used to quantify the impact of network delay on verification performance; Design a security enhancement function containing Zeta function to achieve nonlinear amplification of encryption strength; Abnormal transactions are controlled through the composite structure of KL divergence and exponential decay function.
[0029] Example: When ρ_k=0.8 of a transaction Tx_k, R_n(t) is integrated to get 1.2, KL divergence=0.05, security level s_k=3, node η_j=80ms, σ_j=2, then Ψ=0.83>0.7 is obtained, and it is packaged first.
[0030] The above formula realizes quantitative decision-making of transaction sorting through 17 dynamic parameters, 5 special functions and 3-layer operation structure.
[0031] Range description: Ψ∈[0,1], when Ψ>0.7, the transaction enters the priority packaging queue, Ψ∈(0.3,0.7) enters the regular queue, and Ψ<0.3 requires re-verification; the numerator integral term controls the transaction timeliness value, the denominator differential term evaluates the node verification capability, and the KL divergence term ensures the compliance of transaction characteristics.
[0032] This application uses 4 Kafka and 3 Zookeeper configurations, mainly based on the following core reasons: Zookeeper node number design (3 nodes) Fault tolerance and consensus mechanism: Zookeeper uses the ZAB protocol (a Paxos-like distributed consensus algorithm), which requires that most nodes in the cluster survive in order to elect and provide services normally. A cluster of three nodes allows a maximum of one node failure, while two nodes cannot tolerate any single point of failure. This design ensures the stability of metadata management, such as Kafka's partition leader election and Broker health status monitoring.
[0033] Avoid split-brain problems: odd-numbered nodes can avoid "dual-master" conflicts when the network is partitioned; when a network partition occurs, three nodes can quickly determine the valid cluster through a voting mechanism, while even-numbered nodes may fail to reach a majority, causing service stagnation.
[0034] Kafka node number design (4 nodes) Crash tolerance and partition replication: Kafka ensures data reliability through the replication mechanism. Assume that the number of partition replicas for each Topic is set to 3 (default value), and a 4-node cluster allows one node to fail at the same time without affecting the service. For example, each partition has 1 Leader (handling reads and writes) and 2 Followers (synchronizing data). When the Leader fails, Zookeeper will elect a new Leader from the Followers.
[0035] Support high throughput and load balancing: The sorting service (Orderer) relies on Kafka to implement transaction sorting; the 4-node cluster can disperse the transaction processing pressure, combined with the multi-partition design (such as each Channel corresponds to a partition) to improve the overall throughput.
[0036] Scalability and production environment recommendations: In actual deployment, the Kafka cluster needs to reserve redundant nodes to deal with sudden traffic or hardware failures. Four nodes provide higher scalability than three nodes, while meeting the stability requirements of the production environment.
[0037] The core logic of the collaboration between the two: Zookeeper manages Kafka metadata: Zookeeper records Kafka Broker registration, partition leader information, consumer offset, etc. Kafka relies on Zookeeper to achieve dynamic load balancing and fault recovery.
[0038] Sorting service architecture: Each Kafka node corresponds to a sorting node (OSN), which synchronizes transaction batches and block generation status through Zookeeper to ensure consistent transaction order across the entire network.
[0039] In the first connection signal verification phase, the client input module calls the member service through the SDK to register and obtain the identity certificate.
[0040] Blockchain sorting adopts Kafka method, which consists of ZooKeeper, Kafka and Orderer, plus Org and Peer to realize the blockchain alliance chain network.
[0041] After receiving the information returned by the endorsement node, the client input module determines whether the proposal result is consistent and whether it is executed in accordance with the specified endorsement policy. If no endorsement equal to the reserved quantity is received, the processing is terminated; otherwise, the client input module packages the data into a transaction and signs it.
[0042] The creation process of the genesis block is: Set the maximum capacity of the block; Write Kafka-related information into the network’s genesis block; The maximum block size is set by setting the value of Orderer.AbsoluteMaxBytes in the configtx.yaml file. The unit of the value is bytes. The maximum block size does not include the size of the block header information. The generation of the genesis block requires configuring Kafka-related information in the configtx.yaml file, setting Orderer.OrdererType to kafka, setting Orderer.Kafka.Brokers to the node IP address and port in the Kafka cluster, and configuring the Kafka cluster.
[0043] The way to configure the Kafka cluster is: Set unclean.leader.election.enable to false; Set min.insync.replicas to M. When data is committed, at least M replicas will be written. The range of custom values is 1 <M<N; Setting default.replication.factor to N means that each channel on the Kafka node stores N copies of data, and the value range is 1 <K; Set the message.max.bytes value, which is smaller than the socket.request.max.bytes value; Set the replica.fetch.max.bytes value to the maximum number of bytes of messages to be fetched for each channel; Set log.retention.ms to -1 to disable time-based log retention. M, N, and K are all numbers. K is the total number of Kafka clusters, and the custom value is the number of Kafka clusters mobilized in this run.
[0044] The client input module is divided into the first operation mode and the second operation mode through the operation connection relationship between the SDK and the blockchain module, wherein the first operation mode is when the environment is started, the process is: Start blockchain operation, start sorting nodes, start nodes, create channels on blockchain, add nodes to channels, install smart contracts, and the environment startup process ends; The second operation mode is when the transaction is submitted, the process is: The customer input module initiates a transaction and submits it to the SDK interface. The SDK interface submits the transaction information to the endorsement node, which forwards it to the sorting node. The sorting node sorts the data and sends it to the transaction block. The transaction block packages the data and submits it to the ledger for storage.
[0045] After receiving the third connection signal, the customer input module determines whether the proposal results are consistent and whether they are executed in accordance with the specified endorsement policy. If no endorsement equal to the reserved quantity is received, the processing is terminated; otherwise, the customer input module packages the data together into a transaction, signs it, and sends it to the sorting module.
[0046] After receiving the new block formed by the fourth connection signal group, the submission module will verify each transaction in the block to check whether the input and output that the transaction depends on are consistent with the current state of the blockchain. After completion, the block will be appended to the local blockchain, and the latest values of all keys will be modified to store the obtained data.
[0047] One execution process of smart contracts is recording, in which the execution of smart contract process Figure 2 As shown: The customer input module passes the identity information to the identity authentication module in the blockchain; the identity authentication module defines the user's identity ID, order ID, payment platform transaction ID, purchased product, transaction amount and transaction time variables, and outputs them in args bytes; Determine the args byte length: If the length is not 6, it will prompt that there is a problem with the number of parameters and end the contract execution phase; if the args byte length is 6, call the Init function, define the pay structure and call the PutState function, and enter the return err function phase; Determine the number of returned err functions: If the number of returned err functions is not empty, it is judged as an error message and the contract execution phase ends; if the returned err function is empty, the Success function is called to end the contract execution phase.
[0048] Among them, the smart contract query process is as follows Figure 3 As shown: The client input module passes the contract query information to the identity authentication module in the blockchain; The identity authentication module defines the user ID; Determine the length of args under the ID: If the length of args is not 1, it will prompt that the number of parameters is wrong and end the contract query process; if the length of args is 1, define the queryString function, call the getQueryResultQueryString function, and enter the return err function stage; Determine the number of returned err functions: If the number of returned err functions is not empty, it is judged as an error message and the contract execution phase ends; if the returned err function is empty, the Success function is called to end the contract execution phase.
[0049] Among them, a Kafka processing process is as follows: 1) Transaction 1 (TX1) already exists in sorting service (OSN) 1 and is sent to the Kafka cluster; 2) The client submits transaction 2 (TX2) to the sorting service (OSN) 1 through the Brocadcast (gRPC broadcast) interface, and then sends it to the Kafka cluster; 3) The client submits transaction 3 (TX3) to the sorting service (OSN) 0 through the Brocadcast interface, and then sends it to the Kafka cluster; 4) The Kafka cluster saves the three transactions in sequence from No. 3 to No. 5 according to the transaction submission time; 5) The client sends a distribution request through the (gRPC distribution) Deliver interface and obtains block 4 (Block 4) that stores transactions 1, 2, and 3 from the sorting service (OSN) 2. This completes the example process.
[0050] This method uses three ZooKeepers, as follows: A blockchain operation mode, which includes two modules: REST SDK and blockchain alliance chain network, where Figure 4This is a system architecture diagram of a block storage module. It uses the FabricClientRest project of the spring boot framework and provides external access through the JDK 1.8 environment. Spring boot itself has Tomcat embedded in it, so it can provide Web access services without installing Tomcat.
[0051] The blockchain alliance chain network sorting adopts Kafka method, which consists of 3 ZooKeepers, 4 Kafkas and 3 Orderers, plus 1 Org and 3 Peers to realize the blockchain alliance chain network. It can be deployed with 7 servers to provide a high-availability, secure and tamper-proof blockchain network.
[0052] Example 2 The second embodiment of the present invention is different from the first embodiment in that: 1. Experimental preparation and implementation process 1. Experimental Preparation The test scenario is set as a blockchain transaction system of a cross-border payment platform, which is used to process cross-border transfer requests initiated by users. The customer input module integrates the SDK interface and connects to the private blockchain network, which includes 10 verification nodes, 5 endorsement nodes and 3 sorting nodes. The test data includes 2,000 real transaction records, covering normal transfers, large transactions (single transaction > US$100,000) and cross-chain transactions. The blockchain network adopts the PBFT consensus algorithm, the transaction verification threshold is 3 endorsement signatures, and the block generation interval is set to 2 seconds.
[0053] 2. Implementation process (1) Membership Verification: The client sends the first connection signal containing the digital certificate through the SDK, and the blockchain membership verification module performs the following operations: Verify the legitimacy of the certificate authority (CA); Check the certificate validity period and scope of authority; Write the verified signal into the blockchain for evidence storage.
[0054] (2) Endorsement authority verification: The client sends the second connection signal (including transaction details), and the endorsement node module performs the following operations: Verify the account balance and authority of the transaction initiator; Simulate and execute transaction logic (such as exchange rate conversion); Generate a third connection signal with node signature (including transaction hash and timestamp).
[0055] (3) Transaction packaging and sorting: After the client collects at least 3 third connection signals, it performs the following operations: Verify signature consistency and transaction hash integrity; Pack multiple transactions into a fourth connection signal (single package ≤ 50 transactions); Submit to the sorting module for timestamp sorting.
[0056] (4) Block generation and submission: The sorting module generates blocks every 2 seconds; Generate block bodies in the order in which transactions are received; Calculate the Merkle tree root hash and generate the block header; The block is broadcast to all nodes in the network through the submission module.
[0057] (5) Dynamic load processing: When the transaction concurrency exceeds the threshold (1,000 transactions per second), the system automatically starts the following mechanisms: Add temporary sorting nodes to share the load; Enable transaction sharding (≤ 200 transactions per shard); Optimize the endorsement node task allocation strategy.
[0058] 2. Test data recording The following are six test data record tables showing the performance of the system in different scenarios: Table 1: Performance data for normal transaction scenarios Table 2: High concurrency scenario performance data Table 3: Cross-chain transaction scenario performance data Table 4: Malicious attack test data Table 5: Dynamic node expansion test data Table 6: Comparison data of traditional blockchain systems 3. Tabular Data Analysis 1. Performance comparison analysis Throughput: In normal transaction scenarios, the average throughput of the system of the present invention is 480 TPS (Table 1), while the traditional system is only 180 TPS (Table 6), an increase of 166%. In high-concurrency scenarios, the throughput of the present invention reaches 3200 TPS (Table 2), an increase of 237% over the 950 TPS (Table 6) of the traditional system.
[0059] Security: In the malicious attack test, the double-spending attack interception rate was 100% (Table 4), significantly higher than the typical defense level of traditional systems (usually <90%). The cross-chain transaction consistency reached 99.5% (Table 3), which is better than the 97% benchmark value of the mainstream cross-chain solution.
[0060] Dynamic scalability: After adding three new nodes, the throughput increased by 48% (Table 5), and the load balancing degree reached 95%, indicating that the system has outstanding elastic scalability.
[0061] 2. Analysis of technical advantages Hierarchical verification mechanism: Membership verification is separated from endorsement authority (Table 1 verification takes 120ms vs. 300ms in traditional systems), reducing single point bottlenecks.
[0062] Dynamic load sharding: The transaction failure rate in high-concurrency scenarios is only 1.5% (Table 2), which is 82% lower than the 8.7% of the traditional system (Table 6), reflecting the effectiveness of the sharding strategy.
[0063] Real-time attack defense: It takes 80ms to identify abnormal transactions (Table 4), which is 6 times faster than the traditional solution based on batch detection (usually >500ms).
[0064] 3. Summary of advantages Efficiency breakthrough: By optimizing the sorting module and parallel endorsement mechanism, the block confirmation time is shortened to 2.1 seconds (Table 1), which is 285 times faster than the traditional PoW chain (such as Bitcoin's 10 minutes).
[0065] Security enhancement: Multi-signature endorsement and real-time tampering detection (Table 4) are used to achieve a security score of 9.8 / 10 for key transactions (Table 1), meeting financial-grade security requirements.
[0066] Elastic architecture: Dynamic node expansion enables the system to maintain 99.5% stability when the load surges (Table 5), avoiding the avalanche performance degradation of traditional blockchains.
[0067] Conclusion: The layered verification mechanism and dynamic expansion strategy of the present invention have achieved significant breakthroughs in throughput, security and elasticity, providing a feasible technical solution for high-value blockchain applications.
[0068] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for storing payment data based on blockchain technology, characterized in that: include: The customer input module in the application client is connected to the blockchain through the SDK interface; The client input module sends a first connection signal to the blockchain through the SDK interface, and the membership verification module of the blockchain verifies the first connection signal. If the verification is successful, the first signal information is stored in the blockchain; The client input module sends the second connection signal to the blockchain through the SDK interface. The endorsement node module of the blockchain verifies the execution authority of the second connection signal. If the execution authority meets the transaction requirements, the endorsement node module signs the second connection signal to form a third connection signal and returns it to the client input module. After receiving the third connection signal, the customer input module performs content judgment and the number judgment of the third connection signal. The customer input module packages and signs the third connection signal to form a fourth connection signal and sends it to the sorting module of the blockchain. The sorting module uses the blockchain transaction sorting mechanism to sort and transmit the signal; After receiving the fourth connection signal, the sorting module generates a genesis block according to the block generation strategy, puts one or more fourth connection signal transaction packaging clusters into the genesis block, generates a new block, and sends it to the submission module, which performs data storage and transaction data update.
2. The method for storing payment data based on blockchain technology as claimed in claim 1, characterized in that: The client input module in the application client is connected to the blockchain through the SDK interface, including: The customer input module writes payment data into the blockchain through the SDK interface, and only implements two interfaces: writing and reading. When the user completes the payment, the writing interface is called to save the data into the blockchain and the first connection signal is input. When querying the user's personal payment record, the reading interface is called to obtain personal data from the blockchain. In the first connection signal verification phase, the client input module calls the member service through the SDK to register and obtain an identity certificate.
3. The method for storing payment data based on blockchain technology as claimed in claim 1 or 2, characterized in that: The sorting module adopts Kafka mode, which is composed of ZooKeeper, Kafka and Orderer, plus Org and Peer to realize the blockchain alliance chain network; The blockchain alliance consists of 3 ZooKeepers, 4 Kafkas and 3 Orderers, plus 1 Org and 3 Peers to realize the blockchain alliance chain network.
4. The method for storing payment data based on blockchain technology as claimed in claim 3, characterized in that: After receiving the third connection signal, the client input module performs content determination and third connection signal quantity determination, including: After receiving the third connection signal, the customer input module performs content judgment and quantity judgment of the third connection signal to determine whether the proposal result is consistent and whether it is executed in accordance with the specified endorsement policy. If no endorsement equal to the reserved quantity is received, the processing is terminated; otherwise, the customer input module packages the data into a transaction and signs it.
5. The method for storing payment data based on blockchain technology as described in any one of claims 1, 2 and 4, characterized in that: The client input module is divided into a first operation mode and a second operation mode through the operation connection relationship between the SDK and the blockchain module, wherein the first operation mode is when the environment is started, and the process includes: Start blockchain operation, start sorting nodes, start nodes, create channels on blockchain, add nodes to channels, install smart contracts, and the environment startup process ends; The second operation mode is when the transaction is submitted, including: The customer input module initiates a transaction and submits it to the SDK interface. The SDK interface submits the transaction information to the endorsement node, which forwards it to the sorting node. The sorting node sorts the data and sends it to the transaction block. The transaction block packages the data and submits it to the ledger for storage.
6. The method for storing payment data based on blockchain technology as claimed in claim 5, characterized in that: The characteristics of the blockchain transaction sorting mechanism include a multi-dimensional sorting function based on dynamic convolution reputation points: Where Ψ is the transaction Tx k The final sorting weight, t0 is the system initialization time, t c is the current timestamp, λ is the time decay coefficient (λ∈(0,1]), ρ k is the normalized value of the transaction amount, R n(τ) is the reputation function of node n at time τ, m is the total number of candidate nodes, v j is the verification pass rate of node j, η j is the network delay of node j, σ j is the encryption strength coefficient, ε is a small amount to prevent division by zero, Φ(θ j ) is the resource load vector of node j, P is the standard distribution of transaction characteristics, Q k Tx k The actual distribution of , α is the KL divergence adjustment factor, s k is the transaction security level, H(x) is the Heaviside step function, V(x) is the verification efficiency function, and D KL is the Kullback-Leibler divergence, F(x) is the security enhancement function, Ψ∈[0,1], when Ψ>0.7, the transaction enters the priority packaging queue, Ψ∈(0.3,0.7) enters the regular queue, and Ψ<0.3 requires re-verification.
7. The method for storing payment data based on blockchain technology as claimed in claim 6, characterized in that: The execution process of the smart contract includes: The program client passes the identity information to the identity authentication module in the blockchain; The identity authentication module defines the user's identity ID, order ID, payment platform transaction ID, purchased product, transaction amount and transaction time variables, and outputs them in args bytes; Determine the byte length of args: If the length is not 6, it will prompt that there is a problem with the number of parameters and end the contract execution phase; if the byte length of args is 6, call the Init function, define the pay structure and call the PutState function, and enter the return err function phase; Determine the number of returned err functions: If the number of returned err functions is not empty, it is judged as an error message and the contract execution phase ends; if the returned err function is empty, the Success function is called to end the contract execution phase.
8. The method for storing payment data based on blockchain technology as claimed in claim 6, characterized in that: After receiving the third connection signal, the client input module determines whether the proposal results are consistent and whether they are executed with reference to the specified endorsement policy; if no endorsement equal to the reserved quantity is received, the processing is terminated; Otherwise, the client input module packages the data together into a transaction, signs it, and sends it to the sorting module; After receiving the new block formed by the fourth connection signal group, the submission module will verify each transaction in the block to check whether the input and output on which the transaction depends are consistent with the current state of the blockchain. After completion, the block will be appended to the local blockchain, the latest values of all keys will be modified, and the obtained data will be stored.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Alliance chain based on improved Kafka consensus mechanism and transaction method
CN110766551A
Transaction processing method of block chain network and block chain network
CN111047319A
Data processing method and device based on blockchain, equipment and storage medium
CN111314172A
Transaction method based on block chain
CN113327165A
PBFT consensus method based on weight random election and grouping reputation
CN117896116A
Cited By
Department data resource scheduling management method and system
CN120561973A
A department data resource scheduling management method and system
CN120561973B