A secure payment method and system

By compressing and storing blockchain data into compressed blocks of a compressed chain in the form of addresses, the performance issues faced by blockchain data increments are solved, enabling efficient decentralized transactions, payments, and authentication, improving computational efficiency and reliability, and ensuring the trustworthiness and traceability of transactions.

CN113569287BActive Publication Date: 2026-05-26JINGDEZHIHUI (BEIJING) BUSINESS MANAGEMENT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINGDEZHIHUI (BEIJING) BUSINESS MANAGEMENT CO LTD
Filing Date
2021-07-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing blockchain technology faces performance issues as data volume increases, including slow authentication speed, low system efficiency, and a lack of effective trust mechanisms.

Method used

By compressing and storing the blockchain into compressed blocks of a compressed chain in the form of addresses, the system efficiency is improved by using a compressed chain approach. The leaf blocks point to the parent hash of the compressed blocks. After each payment, the total payment amount in the leaf blocks is updated, and the block hash in the compressed blocks is updated. During authentication, the total payment amount information in the leaf blocks is accessed directly.

Benefits of technology

It solves the problem of slow authentication speed faced by blockchain data increments, realizes decentralized transaction, payment and authentication methods, improves computing efficiency and reliability, ensures the trustworthiness and traceability of transactions, and saves computing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569287B_ABST
    Figure CN113569287B_ABST
Patent Text Reader

Abstract

This invention provides a secure payment method and system. By compressing and storing the blockchain in compressed blocks of a compressed chain using addresses, the system efficiency is improved through the compressed chain approach. The leaf blocks point to the parent hash of the compressed block. After each payment, the total payment amount in the leaf block is updated, and the block hash in the compressed block is updated. During authentication, the total payment amount information in the leaf block is directly accessed. Due to the short length and small byte size of the compressed chain, access speed is fast. This invention solves the performance and trust issues of slow authentication speed after blockchain data increments. This invention achieves a decentralized transaction, payment, and authentication method, ensuring transaction reliability and traceability, improving computational efficiency and reliability, and saving computation time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of big data applications, and in particular to a secure payment method and system. Background Technology

[0002] The authentication, payment, and transaction processes rely on a unified central database, and the data may be tampered with during storage, transmission, and display. The product tracking system is still manually operated in many stages, and information providers can selectively shield themselves from basic information that is unfavorable to them. Authentication depends on the strength of the central agency's regulatory measures, and the system has room for human manipulation, without effective constraints on the regulator's power.

[0003] In existing technologies, blockchain technology can solve the trust problem relatively well. However, as blockchain data increases, it faces performance issues. In the past, blockchain technology made judgments by traversing transaction records when conducting payment authentication. As the number of transactions increases, the blockchain will grow indefinitely, the authentication speed will become slower and slower, and the system efficiency will be low. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a secure payment method and system. By compressing and storing blockchain data in compressed blocks of a compressed chain in the form of addresses, the system efficiency is improved through the compressed chain approach. At the same time, blockchain technology effectively solves the trust problem, improves computational efficiency and reliability, and saves computation time.

[0005] To achieve the above objectives, the present invention provides a secure payment method:

[0006] The method includes: sending a user registration application to a smart contract module, the smart contract module generating a unique hash address for identity identification, the smart contract module sending the registration information to a cloud computing data platform, verifying the registration information through each node of the cloud computing data platform, saving it to the blockchain in a transaction manner, broadcasting the update of the blockchain and compressed chain to each cloud computing data platform after the transaction information is saved, and returning a successful user registration message; after a user initiates a modification request, the smart contract module receives the modification request and sends the modification information to the cloud computing data platform, the modification information is verified through each node of the cloud computing data platform, saved to the blockchain in a transaction manner, broadcasting the update of the blockchain and compressed chain to each cloud computing data platform, and returning a successful modification message to the user.

[0007] Upon initiating a transfer transaction request, the smart contract module receives the request and sends it to the cloud computing data platform. The calculation module verifies the transaction, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is encrypted and saved to the new block, and the total amount is calculated and saved to the leaf block in the compressed chain. The address of the new block is updated to the compressed block, and the data is stored in the compressed chain database. After the transaction is successful, the smart contract module broadcasts to each cloud computing data platform to update the blockchain and compressed chain. The smart contract module sends a transaction success message to the cloud computing data platform of the transaction requester and updates the blockchain hash address and currency hash address.

[0008] A fee request is initiated. After receiving the fee request, the smart contract module sends it to the cloud computing data platform. The computing module reviews the fee, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The fee information is encrypted and saved in the new block. The smart contract module broadcasts the request to each cloud computing data platform to update the blockchain and the compressed chain. The smart contract module sends payment information to the account being charged and updates the blockchain hash address.

[0009] Upon receiving a payment request, the smart contract module sends it to the cloud computing data platform. The computing module verifies the payment information. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is encrypted and saved to the new block. Each sub-block points to the hash address of its parent block. All blocks are interconnected to form a blockchain ledger. After calculating the total amount, the total amount information is saved to a leaf block in the compressed chain. The address of the new block is updated to the compressed block. The compressed chain compresses the blockchain through the construction of compressed blocks and leaf blocks. After each payment by the user, the payment information in the leaf block is updated, the compressed block address points to the address of the new block in the blockchain, and the data is stored in the compressed chain database. The smart contract module broadcasts the update to each cloud computing data platform to update the blockchain and the compressed chain. Each cloud computing data platform confirms the payment information. If more than a preset threshold percentage of cloud computing data platforms oppose the payment, the transaction is invalid; otherwise, it is valid. The smart contract module sends a payment success message to the cloud computing data platform that made the payment request and updates the blockchain hash address and the currency hash address.

[0010] Furthermore, the secure payment method also includes authentication. Ordinary users or administrator users send authentication requests. The smart contract module receives the authentication requests and sends a query request to the cloud computing platform based on the hash address in the authentication request. The computing module receives the query request and queries the corresponding total amount information in the compressed chain based on the hash address in the request. The smart contract receives the authenticated total amount information and returns it to the user.

[0011] Furthermore, the secure payment method also includes real-time monitoring of the blockchain and the compressed chain to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the blockchain payment ledger information pointed to by the compressed block.

[0012] In addition, the present invention also provides a secure payment system:

[0013] The system includes a client, a smart contract module, and a cloud computing data platform. The client includes a registration / modification module, a blockchain bill verification module, a transaction payment module, and a proof module. The registration / modification module is used for user registration and account information modification, classifying users into ordinary users and administrator users with different roles and permissions. The blockchain bill verification module verifies blockchain bill information. When a user initiates a bill verification request, ordinary users can query their own transaction and payment blockchain ledger information, while administrators can query user payment-related blockchain bill information. The transaction payment module enables users of different roles to perform transaction and payment functions. The proof module authenticates user payment information. The smart contract module implements the business functions for interaction between the client and the cloud computing data platform, synchronizing various function algorithms through the cloud computing data platform to achieve querying, payment, and transactions. The cloud computing data platform includes a blockchain module, a compressed chain module, a computing module, and a communication module, used to implement the blockchain and compressed chain business logic.

[0014] Furthermore, the registration and modification module for user registration and account information modification specifically works as follows: A user registration application is sent to the smart contract module, which generates a unique hash address to identify the user. The smart contract module then sends the registration information to the cloud computing data platform. The registration information is verified by each node of the cloud computing data platform and saved to the blockchain as a transaction. After the transaction information is saved, the module broadcasts updates to the blockchain and compressed blockchain across all cloud computing data platforms and returns a successful registration message to the user. When a user initiates a modification request, the smart contract module receives the request and sends the modification information to the cloud computing data platform. The modification information is verified by each node of the cloud computing data platform and saved to the blockchain as a transaction. The module then broadcasts updates to the blockchain and compressed blockchain across all cloud computing data platforms and returns a successful modification message to the user.

[0015] Furthermore, the transaction and payment module implements transaction and payment functions as follows: A regular user initiates a transfer transaction request with other regular users or administrators. The smart contract module receives the request and sends it to the cloud computing data platform. The calculation module verifies the transaction. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain, the transaction information is saved to the new block, the total amount is calculated and saved to the leaf block in the compressed chain, the new block address is updated in the compressed block, and the data is stored in the compressed chain database. After a successful transaction, the smart contract module broadcasts to each cloud computing data platform to update the blockchain and compressed chain. The smart contract module sends a transaction success message to the cloud computing data platform that initiated the transaction and updates the blockchain hash address and currency hash address. When an administrator initiates a fee request, the smart contract module receives the request and sends it to the cloud computing data platform. The calculation module reviews the fee request, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain, and the fee information is saved. The transaction information is stored in the new block. The smart contract module broadcasts this information to various cloud computing data platforms to update the blockchain and compressed chain. The smart contract module sends payment information to the account being charged and updates the blockchain hash address. When a user initiates a payment request with the administrator, the smart contract module receives the request and sends it to the cloud computing data platform. The calculation module verifies the payment information. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is saved in the new block, and the total amount is calculated and saved to the leaf block in the compressed chain. The address of the new block is updated in the compressed block, and the data is stored in the compressed chain database. The smart contract module broadcasts this information to various cloud computing data platforms to update the blockchain and compressed chain. Each cloud computing data platform confirms the payment information. If more than a preset threshold percentage of cloud computing data platforms oppose the transaction, it is invalid; otherwise, it is valid. The smart contract module sends payment success information to the cloud computing data platform that made the payment request and updates the blockchain hash address and currency hash address.

[0016] Furthermore, the smart contract module implements the business functions of interaction between the client and the cloud computing data platform as follows: The smart contract module receives user registration and account information modification requests. Upon receiving a registration request, it generates a unique hash address to identify the user and sends the registration information to the cloud computing data platform. After successful registration, it broadcasts updates to the blockchain and compressed chain across all cloud computing data platforms and returns a successful registration message to the user. Upon receiving a modification request, it determines whether modification is permissible and sends the modified information to the cloud computing data platform. After successful modification, it broadcasts updates to the blockchain and compressed chain across all cloud computing data platforms and returns a successful modification message to the user. The smart contract module receives blockchain bill verification request information, determines whether the verification request is approved, and then... The request uses a hash address to query block and compressed block information in the blockchain and compressed chain of the cloud computing data platform, and returns the query information to the user. The smart contract module receives transaction and payment request information, verifies whether the request is valid, determines whether the request type is a transaction or payment, and sends the request information to the cloud computing data platform according to the request type. It receives transaction and payment success information, broadcasts it to each cloud computing data platform to update the blockchain and compressed chain, sends transaction success information to both parties, and updates the blockchain hash address and currency hash address of both parties. The smart contract module receives authentication requests and sends a query request to the cloud computing data platform according to the hash address in the request. The smart contract module receives the authenticated total amount information and returns it to the user.

[0017] Furthermore, the implementation of the blockchain and compressed chain business logic specifically involves: the blockchain module implementing a distributed ledger database function; each block includes block height, block hash, version number, block summary, parent block hash, timestamp, and transaction tree; each transaction includes transaction ID, transaction type, transaction amount, account information, previous transaction ID, and detailed information; when a transaction occurs, each transaction information is encrypted and saved to the blockchain; each sub-block points to the parent block hash address; all blocks are interconnected to form a blockchain data ledger; the compressed chain module is a compressed chain storage database used to store compressed chain information; the compressed chain is constructed using compressed blocks and leaf blocks. To compress the blockchain, after each user payment, the leaf block payment information is updated, and the compressed block address points to the new block address in the blockchain. After receiving smart contract transaction and payment requests, the calculation module verifies the transactions and payments, calculates the payment amount based on user information, and generates a new block in the blockchain. The calculation module also receives user payment request information, queries the corresponding total amount information in the compressed chain based on the hash address in the request, and returns the information to the smart contract module. The communication module enables network communication between the blockchain and the compressed chain, and between the cloud computing data platform and the smart contract module, and is responsible for scheduling between the smart contract module and the cloud computing data platform.

[0018] Furthermore, the computing module monitors the blockchain and the compressed chain in real time to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the blockchain payment ledger information pointed to by the compressed block.

[0019] In addition, the present invention provides a computer-readable storage medium on which a program for performing the above-described method is stored, wherein the program is executed to achieve secure payment.

[0020] This invention provides a secure payment method and system. By compressing and storing the blockchain in compressed blocks of a compressed chain using addresses, the system efficiency is improved through the compressed chain approach. The leaf blocks point to the parent hash of the compressed block. After each payment, the total payment amount in the leaf block is updated, and the block hash in the compressed block is updated. During authentication, the total payment amount information in the leaf block is directly accessed. Due to the short length and small byte size of the compressed chain, access speed is fast. This invention solves the performance and trust issues of slow authentication speed after blockchain data increments. This invention achieves a decentralized transaction, payment, and authentication method, ensuring transaction reliability and traceability, improving computational efficiency and reliability, and saving computation time. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a structural block diagram of the secure payment system of the present invention;

[0023] Figure 2 This is a schematic diagram of the blockchain for the secure payment system of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] This invention addresses the performance issues faced by blockchain as data volume increases by proposing a compressed chain and its architecture. Previously, blockchain technology relied on traversing transaction records for payment authentication. As the number of transactions increases, the blockchain grows indefinitely, slowing down authentication. The compressed chain and its architecture solve this problem by compressing and storing the blockchain data into compressed blocks within the compressed chain. Leaf blocks point to the parent hash of the compressed block. After each payment, the total payment amount in the leaf block is updated, and the block hash in the compressed block is also updated. Authentication directly accesses the total payment amount information in the leaf block. Due to the short length and small byte size of the compressed chain, access is fast. Furthermore, the fact that the compressed chain points to the blockchain solves the trust issue.

[0026] Specifically, this invention provides a secure payment method:

[0027] The method includes: sending a user registration application to a smart contract module, the smart contract module generating a unique hash address for identity identification, the smart contract module sending the registration information to a cloud computing data platform, verifying the registration information through each node of the cloud computing data platform, saving it to the blockchain in a transaction manner, broadcasting the update of the blockchain and compressed chain to each cloud computing data platform after the transaction information is saved, and returning a successful user registration message; after a user initiates a modification request, the smart contract module receives the modification request and sends the modification information to the cloud computing data platform, the modification information is verified through each node of the cloud computing data platform, saved to the blockchain in a transaction manner, broadcasting the update of the blockchain and compressed chain to each cloud computing data platform, and returning a successful modification message to the user.

[0028] Upon receiving a transfer transaction request, the smart contract module sends the request to the cloud computing data platform. The calculation module verifies the transaction, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is encrypted and saved to the new block, and the total amount is calculated and saved to the leaf block in the compressed chain. The address of the new block is updated to the compressed block, and the data is stored in the compressed chain database. After the transaction is successful, the smart contract module broadcasts the update to each cloud computing data platform to update the blockchain and the compressed chain. Each cloud computing data platform confirms the transaction information. If more than a preset threshold percentage of cloud computing data platforms oppose the transaction, the transaction is invalid; otherwise, it is valid. The smart contract module sends a transaction success message to the cloud computing data platform that requested the transaction and updates the blockchain hash address and the currency hash address.

[0029] A fee request is initiated. After receiving the fee request, the smart contract module sends it to the cloud computing data platform. The computing module reviews the fee, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The fee information is encrypted and saved in the new block. The smart contract module broadcasts the request to each cloud computing data platform to update the blockchain and the compressed chain. The smart contract module sends payment information to the account being charged and updates the blockchain hash address.

[0030] Upon receiving a payment request, the smart contract module sends it to the cloud computing data platform. The calculation module verifies the payment information. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is encrypted and saved to the new block. Each sub-block points to the hash address of its parent block. All blocks are interconnected to form a blockchain ledger. After calculating the total amount, the total amount information is saved to a leaf block in the compressed chain. The address of the new block is updated to the compressed block. The compressed chain compresses the blockchain through the construction of compressed blocks and leaf blocks. After each payment by the user, the payment information in the leaf block is updated, and the compressed block address points to the address of the new block in the blockchain. The data is stored in the compressed chain database. The smart contract module broadcasts the update to each cloud computing data platform to update the blockchain and the compressed chain. Each cloud computing data platform confirms the payment information. If more than a preset threshold percentage of cloud computing data platforms oppose the payment, the transaction is invalid; otherwise, it is valid. The smart contract module sends a payment success message to the cloud computing data platform that made the payment request and updates the blockchain hash address and the currency hash address. The specific algorithm is as follows:

[0031] BlockHeight is the block height, BlockHash is the block hash, BlockSum is the block summary, BlockTimeStamp is the block timestamp, BlockVersion is the version number, FatherBlockHash is the parent block hash, TreeRoot is the transaction tree root, Transaction is the transaction tree, BlockHash() is the hash generation method, and ArrayList is the block height. <transactiontree>() represents the transaction tree modeling method, BaseHashMap() represents the hash map generation method, and CreateBlock() represents the block creation method. The block creation method is as follows:

[0032]

[0033] After a transaction occurs on a certain cloud computing data platform, the transaction information is broadcast to all cloud computing data platforms via a contract. Each cloud computing data platform verifies the transaction information in its blockchain and sends feedback information. The blockchain smart contract uses an improved fault-tolerant Byzantine consensus algorithm. Assuming the transaction originated from the i-th cloud computing data platform, there are n cloud computing data platforms in the blockchain, and the message queue is... When x = 1 This indicates a message, when x = 2. Indicates the message status, when x = 3. This indicates the number of message sending failures; when x = 4... This represents the number of times a message received no response. Each message has four states: sent, unsent, Agree, and Opposition. The algorithm determines the number of times each of these four states occurs in the message queue by iterating through the message queue. The number of message sending failures across n cloud data platforms is counted as Failure, the number of no responses as Noresponse, the number of Agreements as A, and the number of Oppositions as OP. According to the improved Byzantine algorithm, when the number of sending failures (Failure) < [(n-2) / 3] and the number of Oppositions (OP) < [(n-Failure) / 2], each cloud data platform acknowledges the transaction information, the smart contract returns a successful transaction message, and updates the blockchain and compressed chain information of each cloud data platform.

[0034]

[0035]

[0036] The secure payment method also includes authentication. Ordinary users or administrators send authentication requests. The smart contract module receives the authentication requests and sends a query request to the cloud computing platform based on the hash address in the authentication request. The computing module receives the query request and queries the corresponding total amount information in the compressed chain based on the hash address in the request. The smart contract receives the authenticated total amount information and returns it to the user.

[0037] The secure payment method also includes real-time monitoring of the blockchain and the compressed chain to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the payment ledger information of the blockchain pointed to by the compressed block.

[0038] Furthermore, this invention also provides a secure payment system, comprising: a client, a smart contract module, and a cloud computing data platform; the client includes a registration and modification module, a blockchain bill verification module, a transaction payment module, and a proof module; the registration and modification module is used for user registration and modification of account information, classifying users into ordinary users and administrator users with different roles and permissions; the blockchain bill verification module is used to verify blockchain bill information; when a user initiates a bill verification request, according to the user role, ordinary users can query their own transaction and payment blockchain ledger information, while administrators can query user payment-related blockchain bill information; the transaction payment module is used for users of different roles to implement transaction and payment functions; the proof module is used to authenticate user payment information; the smart contract module implements the business functions of interaction between the client and the cloud computing data platform, synchronizing various function algorithms through the cloud computing data platform to realize query, payment, and transaction; the cloud computing data platform includes a blockchain module, a compressed chain module, a computing module, and a communication module, used to implement the business logic of the blockchain and compressed chain.

[0039] The registration and modification module is used for user registration and account information modification. Users are divided into ordinary users and administrator users with different permissions. User registration requests are sent to the smart contract module, which generates a unique hash address for identity verification. The smart contract module then sends the registration information to the cloud computing data platform. The registration information is verified by each node of the cloud computing data platform and saved to the blockchain as a transaction. After the transaction information is saved, it is broadcast to all cloud computing data platforms to update the blockchain and compressed blockchain, and returns a successful registration message to the user. When a user initiates a modification request, the smart contract module receives the request and sends the modified information to the cloud computing data platform. The modified information is verified by each node of the cloud computing data platform and saved to the blockchain as a transaction. It is broadcast to all cloud computing data platforms to update the blockchain and compressed blockchain, and returns a successful modification message to the user.

[0040] The blockchain bill verification module is used to verify blockchain bill information. Users can initiate a bill verification request. Depending on the user's role, ordinary users can query their own transaction and payment blockchain ledger information, while administrators can query user payment-related blockchain bill information.

[0041] The transaction payment module is used by users of various roles to implement transaction and payment functions. When a regular user initiates a transfer request with other regular users or administrators, the smart contract receives the request and sends it to the cloud computing data platform. The platform's calculation module verifies the transaction, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is saved in the new block, and the total amount is calculated and saved to a leaf block in the compressed chain. The new block address is updated in the compressed block, and the data is stored in the compressed chain database. After a successful transaction, the smart contract broadcasts the update to each cloud computing data platform, updating the blockchain and compressed chain. The smart contract module sends a transaction success message to both parties and updates their blockchain hash addresses and currency hash addresses. Similarly, when an administrator initiates a payment request, the smart contract receives the request and sends it to the cloud computing data platform. The platform's calculation module reviews the payment request, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The payment information is saved in the new block, and the smart contract broadcasts the update to each cloud computing data platform, updating the blockchain and compressed chain. The smart contract sends payment information to the account being charged and updates its blockchain hash address. Users can initiate payment requests with administrators. Upon receiving the request, the smart contract sends it to the cloud computing data platform. The platform's computing module verifies the payment information. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is saved in the new block, and the total amount is calculated and saved to a leaf block in the compressed chain. The new block address is updated in the compressed block, and the data is stored in the compressed chain database. The smart contract broadcasts this information to all cloud computing data platforms to update the blockchain and compressed chain. After a successful transaction, the smart contract sends payment success information to both parties and updates their blockchain hash addresses and currency hash addresses. The specific algorithm is as follows:

[0042] BlockHeight is the block height, BlockHash is the block hash, BlockSum is the block summary, BlockTimeStamp is the block timestamp, BlockVersion is the version number, FatherBlockHash is the parent block hash, TreeRoot is the transaction tree root, Transaction is the transaction tree, BlockHash() is the hash generation method, and ArrayList is the block height. <transactiontree>() represents the transaction tree modeling method, BaseHashMap() represents the hash map generation method, and CreateBlock() represents the block creation method. The block creation method is as follows:

[0043]

[0044]

[0045] After a transaction occurs on a certain cloud computing data platform, the transaction information is broadcast to all cloud computing data platforms via a contract. Each cloud computing data platform verifies the transaction information in its blockchain and sends feedback information. The blockchain smart contract uses an improved fault-tolerant Byzantine consensus algorithm. Assuming the transaction originated from the i-th cloud computing data platform, there are n cloud computing data platforms in the blockchain, and the message queue is... When x = 1 This indicates a message, when x = 2. Indicates the message status, when x = 3. This indicates the number of message sending failures; when x = 4... This represents the number of times a message received no response. Each message has four states: sent, unsent, Agree, and Opposition. The algorithm determines the number of times each of these four states occurs in the message queue by iterating through the message queue. The number of message sending failures across n cloud data platforms is counted as Failure, the number of no responses as Noresponse, the number of Agreements as A, and the number of Oppositions as OP. According to the improved Byzantine algorithm, when the number of sending failures (Failure) < [(n-2) / 3] and the number of Oppositions (OP) < [(n-Failure) / 2], each cloud data platform acknowledges the transaction information, the smart contract returns a successful transaction message, and updates the blockchain and compressed chain information of each cloud data platform.

[0046]

[0047]

[0048]

[0049] The verification module is used to authenticate user payment information. Ordinary users or administrators send authentication requests. The smart contract receives the authentication requests and sends a query request to the cloud computing platform based on the hash address in the request. The cloud computing platform's computing module receives the query request and queries the corresponding total amount information in the compressed chain based on the hash address in the request. The smart contract receives the authenticated total amount information and returns it to the user.

[0050] The smart contract module enables business functions for interaction between the client and the cloud computing data platform. It synchronizes various function algorithms through the cloud computing platform to achieve functions such as querying, payment, and transactions. Specific functions are as follows:

[0051] The smart contract module receives user registration and account information modification requests. Upon receiving a registration request, it generates a unique hash address for identity verification and sends the registration information to the cloud computing data platform. After successful registration, it broadcasts updates to the blockchain and compressed chain across all cloud computing data platforms and returns a registration success message to the user. Upon receiving a modification request, it determines whether modification is permissible and sends the modified information to the cloud computing data platform. After successful modification, it broadcasts updates to the blockchain and compressed chain across all cloud computing data platforms and returns a modification success message to the user.

[0052] The smart contract module receives blockchain bill verification request information, determines whether the verification request is approved, queries the blockchain and compressed block information in the cloud computing data platform blockchain and compressed chain based on the hash address in the request, and returns the query information to the user.

[0053] The smart contract module receives transaction and payment request information. After receiving the request, it reviews whether the request is valid and determines whether the request type is a transaction or payment. Based on the request type, it sends the request information to the cloud computing data platform. It receives transaction and payment success information and broadcasts it to each cloud computing data platform to update the blockchain and compressed chain to send transaction success information to both parties, and updates the blockchain hash address and currency hash address of both parties.

[0054] The smart contract receives the authentication request and sends a query request to the cloud computing platform based on the hash address in the request. The smart contract receives the authenticated total amount information and returns it to the user.

[0055] The cloud computing data platform is responsible for the implementation of the blockchain and compressed chain, specifically as follows: The blockchain module implements the distributed ledger database function, solving the problem of mutual trust between mutually distrustful parties in a peer-to-peer network. Each block includes block height, block hash, version number, block summary, parent block hash, timestamp, and transaction tree. Each transaction includes transaction ID, transaction type, transaction amount, account information, previous transaction ID, and detailed information. When a transaction occurs, each transaction information is encrypted and saved to the blockchain. Each sub-block points to the parent block hash address, and all blocks are interconnected to form the blockchain data ledger.

[0056] The compressed chain serves as a database for storing compressed chain information. It compresses the blockchain using compressed blocks and leaf blocks. After each user payment, the leaf block payment information is updated, and the compressed block address points to the new block address in the blockchain.

[0057] After receiving smart contract transaction and payment requests, the calculation module verifies the transactions and payments, calculates the payment amount based on user information, and generates a new block in the blockchain. The calculation module also receives user payment information requests, queries the corresponding total amount information in the compressed chain based on the hash address in the request, and returns the information to the smart contract module. The calculation module monitors the blockchain and the compressed chain in real time to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the payment ledger information on the blockchain pointed to by the compressed block.

[0058] The communication module enables network communication between the blockchain and the compressed chain, and between the cloud computing platform and the smart contract, and is responsible for scheduling the smart contract and the cloud computing platform.

[0059] This invention provides a secure payment method and system. By compressing and storing the blockchain in compressed blocks of a compressed chain using addresses, the system efficiency is improved through the compressed chain approach. The leaf blocks point to the parent hash of the compressed block. After each payment, the total payment amount in the leaf block is updated, and the block hash in the compressed block is updated. During authentication, the total payment amount information in the leaf block is directly accessed. Due to the short length and small byte size of the compressed chain, access speed is fast. This invention solves the performance and trust issues of slow authentication speed after blockchain data increments. This invention achieves a decentralized transaction, payment, and authentication method, ensuring transaction reliability and traceability, improving computational efficiency and reliability, and saving computation time.

[0060] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.< / transactiontree> < / transactiontree>

Claims

1. A secure payment method, characterized by, The method includes: sending a user registration application to a smart contract module; initiating a payment request, whereby the smart contract module receives the payment request and sends it to a cloud computing data platform; the computing module reviews the payment, and after verification by each node of the cloud computing data platform, a new block is generated in the blockchain; the payment information is encrypted and saved in the new block; the smart contract module broadcasts the update to each cloud computing data platform, updating the blockchain and compressed chain; the smart contract module sends payment information to the account being charged and updates the blockchain hash address; and initiating a payment request, whereby the smart contract module receives the request and sends it to the cloud computing data platform. The platform's computing module verifies payment information. After verification by each node of the cloud computing data platform, a new block is generated in the blockchain. The transaction information is encrypted and saved to the new block. Each sub-block points to the hash address of its parent block. All blocks are interconnected to form a blockchain data ledger. After calculating the total amount, the total amount information is saved to the leaf blocks in the compressed chain, and the address of the new block is updated in the compressed block. Specifically, the blockchain is compressed and stored in the compressed block of the compressed chain in the form of addresses. The leaf blocks point to the parent hash of the compressed block. After each payment, the total payment amount in the leaf blocks is updated, and the block hash in the compressed block is updated. The specific implementation of the blockchain and compressed chain business logic is as follows: when a transaction occurs, each transaction information is encrypted and saved to the blockchain. Each sub-block points to the hash address of the parent block. All blocks are interconnected to form a blockchain data ledger. The compressed chain module is a database for storing compressed chain information. The compressed chain compresses the blockchain by constructing compressed blocks and leaf blocks. After each payment by the user, the payment information in the leaf block is updated, and the compressed block address points to the new block address in the blockchain. Specifically, after a transaction occurs on a cloud computing data platform, the transaction information is broadcast to all cloud computing data platforms via a contract. Each cloud computing data platform then stores the transaction information in its blockchain and sends feedback information. The platform that initiated the transaction is the i-th cloud computing data platform. There are n cloud computing data platforms in the blockchain, and the message queue is... When x=1 This indicates a message, when x=2. Indicates the message status, when x=3. This indicates the number of message sending failures; when x=4... This represents the number of times a message received no response. Each message has four states: sent, unsent, Agree, and Opposition. The algorithm determines the number of times each of these four states occurs in the message queue by iterating through the message queue. The number of message sending failures across n cloud data platforms is counted as Failure, the number of no responses as Noresponse, the number of Agreements as A, and the number of OPs as OP. When the number of sending failures (Failure) < [(n-2) / 3] and the number of OPs (OP) < [(n-Failure) / 2], each cloud data platform acknowledges the transaction information, the smart contract returns a successful transaction message, and updates the blockchain and compressed chain information of each cloud data platform.

2. The secure payment method according to claim 1, characterized in that, The smart contract module generates a unique hash address to identify the user's identity. The smart contract module sends the registration information to the cloud computing data platform. The registration information is verified by each node of the cloud computing data platform and saved to the blockchain in the form of a transaction. After the transaction information is saved, the cloud computing data platform is broadcast to update the blockchain and the compressed chain, and the user registration success information is returned. After a user initiates a modification request, the smart contract module receives the request and sends the modification information to the cloud computing data platform. The modification information is verified by each node of the cloud computing data platform, saved to the blockchain in the form of a transaction, and broadcast to each cloud computing data platform to update the blockchain and compressed chain, and then returns a message to the user indicating that the modification was successful.

3. The secure payment method according to claim 1, characterized in that, The secure payment method also includes real-time monitoring of the blockchain and the compressed chain to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the payment ledger information of the blockchain pointed to by the compressed block.

4. A secure payment system, characterized in that, The system includes a client, a smart contract module, and a cloud computing data platform. The client includes a registration and modification module, a blockchain bill verification module, a transaction payment module, and a proof module. The registration and modification module is used for user registration and modification of account information, and users are divided into ordinary users and administrator users with different roles and permissions. The blockchain bill verification module is used to verify blockchain bill information. When a user initiates a bill verification request, according to the user's role, ordinary users can query their own transaction and payment blockchain ledger information, while administrators can query user payment-related blockchain bill information. The transaction and payment module is used by users of various roles to perform transaction and payment functions; the authentication module is used to authenticate user payment information. The smart contract module enables the client to interact with the cloud computing data platform, and realizes query, payment, and transaction through the synchronization of various function algorithms by the cloud computing data platform. The cloud computing data platform includes a blockchain module, a compression chain module, a computing module, and a communication module, which are used to implement the business logic of the blockchain and compression chain. In this process, the blockchain is compressed and stored in the compressed block of the compressed chain in the form of addresses. The leaf block points to the parent hash of the compressed block. After each payment, the total payment amount in the leaf block is updated, and the block hash in the compressed block is updated. The specific implementation of the blockchain and compressed chain business logic is as follows: when a transaction occurs, each transaction information is encrypted and saved to the blockchain. Each sub-block points to the hash address of the parent block. All blocks are interconnected to form a blockchain data ledger. The compressed chain module is a database for storing compressed chain information. The compressed chain compresses the blockchain by constructing compressed blocks and leaf blocks. After each payment by the user, the payment information in the leaf block is updated, and the compressed block address points to the new block address in the blockchain. Specifically, after a transaction occurs on a cloud computing data platform, the transaction information is broadcast to all cloud computing data platforms via a contract. Each cloud computing data platform then stores the transaction information in its blockchain and sends feedback information. The platform that initiated the transaction is the i-th cloud computing data platform. There are n cloud computing data platforms in the blockchain, and the message queue is... When x=1 This indicates a message, when x=2. Indicates the message status, when x=3. This indicates the number of message sending failures; when x=4... This represents the number of times a message received no response. Each message has four states: sent, unsent, Agree, and Opposition. The algorithm determines the number of times each of these four states occurs in the message queue by iterating through the message queue. The number of message sending failures across n cloud data platforms is counted as Failure, the number of no responses as Noresponse, the number of Agreements as A, and the number of OPs as OP. When the number of sending failures (Failure) < [(n-2) / 3] and the number of OPs (OP) < [(n-Failure) / 2], each cloud data platform acknowledges the transaction information, the smart contract returns a successful transaction message, and updates the blockchain and compressed chain information of each cloud data platform.

5. The secure payment system according to claim 4, characterized in that, The registration and modification module is used for user registration and modification of account information. Specifically, the user registration application is sent to the smart contract module, which generates a unique hash address to identify the user's identity. The smart contract module sends the registration information to the cloud computing data platform, verifies the registration information through each node of the cloud computing data platform, and saves it to the blockchain in the form of a transaction. After the transaction information is saved, the system broadcasts the updates to the blockchain and compressed blockchain to each cloud computing data platform and returns a successful user registration message. After a user initiates a modification request, the smart contract module receives the request and sends the modification information to the cloud computing data platform. The modification information is verified by each node of the cloud computing data platform, saved to the blockchain in the form of a transaction, and broadcast to each cloud computing data platform to update the blockchain and compressed chain, and then returns a message to the user indicating that the modification was successful.

6. The secure payment system according to claim 4, characterized in that, The transaction and payment module implements transaction and payment functions, specifically enabling ordinary users to initiate transfer transaction requests with other ordinary users and administrators.

7. The secure payment system according to claim 4, characterized in that, The smart contract module implements the business function of interaction between the client and the cloud computing data platform as follows: the smart contract module receives user registration and account information modification requests, generates a unique hash address to identify the user after receiving the registration request, sends the registration information to the cloud computing data platform, broadcasts the update of the blockchain and compressed chain to each cloud computing data platform after successful registration, and returns the user registration success information.

8. The secure payment system according to claim 4, characterized in that, The computing module monitors the blockchain and the compressed chain in real time to ensure that the total amount information corresponding to the leaf block of the compressed block in the compressed chain is consistent with the blockchain payment ledger information pointed to by the compressed block.

9. A computer-readable storage medium storing a program that performs the method of any one of claims 1-3, wherein performing the program enables secure payment.