Block chain-based shared economic separate account checking method
The blockchain-based accounting method addresses transparency and trust issues in shared economy platforms by using an alliance chain with PoS+PBFT consensus and smart contracts, improving efficiency and reducing financial risks.
Patent Information
- Application Number
- CN202510756935.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-15
AI Technical Summary
The transparency and credibility of transaction data in the sharing economy platform are difficult to guarantee, and the financial risks and management costs are high. The data opacity and untrustworthy caused by the traditional reconciliation system's reliance on centralized databases.
The sharing economy account reconciliation method based on blockchain is adopted. By building a consortium chain on the blockchain platform, introducing a PoS+PBFT consensus mechanism, signing contracts using smart contracts, and uploading data through smart chips, the data is realized decentralized storage and immutability, and verification and synchronization are combined with zero-knowledge proof algorithm.
It improves the transparency and credibility of transaction data, reduces financial risks and management costs, improves system operation efficiency and accuracy, supports the scalability of more participants and business scenarios, and ensures the security and integrity of data.
Smart Images

Figure CN120317872A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of blockchain and Internet of Things, and particularly relates to a method for sharing economy ledger reconciliation based on blockchain. Background Technique
[0002] The sharing economy, also known as collaborative consumption or sharing economy, is an economic model that allows individuals and enterprises to share, exchange, and lease goods, services, data, and other resources through online platforms. This model usually relies on technologies, especially mobile Internet and social networks, to promote the effective allocation and utilization of resources. The core concept of the sharing economy is to maximize the use efficiency of resources, reduce waste, and create value for participants; the sharing economy has been widely applied in multiple fields, including transportation, accommodation, finance, and life services.
[0003] The sharing economy breaks the traditional concept of ownership and emphasizes the importance of the right of use, enabling users to enjoy more resources and services at a lower cost. However, with the continuous development of the sharing economy, some new problems and challenges have gradually emerged.
[0004] Since there are many participants in the sharing economy, including resource providers, platform operators, service consumers, etc., each transaction involves the interest distribution of multiple parties; the rapid growth of sharing economy platforms has brought issues such as personal information security, deposit risks, and protection of user rights and interests such as social welfare. The sharing economy platform has lagging supervision, legal blind spots, and imperfect personal credit systems. The relationships between these different stakeholders are complex, and it has become difficult to define interest distribution and responsibilities; traditional reconciliation systems mainly rely on centralized databases and manual processing methods, which makes it difficult to guarantee the transparency and credibility of transaction data, increasing financial risks and management costs. Therefore, the present invention proposes a method for sharing economy ledger reconciliation based on blockchain. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for sharing economy ledger reconciliation based on blockchain, which can guarantee the transparency and credibility of transaction data and reduce financial risks and management costs.
[0006] The technical solution adopted by the present invention is specifically as follows: A method for sharing economy ledger reconciliation based on blockchain, characterized by including the following steps: Step 1: Build a consortium chain on the blockchain platform and set a central account. The consortium chain respectively establishes nodes with a number of preset entities to form an account relationship between the central account and the number of preset entities, and sets corresponding consortium chain rules based on the account relationship. On the basis of the consortium chain, a consensus mechanism is introduced, and the consensus mechanism adopts the PoS+PBFT algorithm. The consensus mechanism is used to maintain the data consistency of each node of the blockchain; Step 2: Define business logics and rules between the central account and a number of the preset entities, and sign a contract in the form of a smart contract within the blockchain platform; Step 3: The preset entity uploads the collected data to the blockchain platform through an intelligent chip via its own data collection module, and obtains consumption orders on the blockchain platform; Step 4: The blockchain platform divides the amount of the consumption order into the bank accounts of the corresponding preset entities under the blockchain platform, generates a transaction receipt on the chain of the blockchain platform, and simultaneously generates corresponding account balances; Step 5: The preset entity submits a corresponding cash withdrawal order on the chain according to the account balance. A number of the preset entities conduct transaction cash withdrawals according to the blockchain platform. In response to the completion of bank transfer by the central account under the blockchain, the blockchain platform verifies two cash withdrawal records on and under the blockchain platform based on the zero-knowledge proof algorithm; Step 6: After the verification in Step 5 is successful, the account balance is destroyed, and finally intelligent profit sharing and reconciliation are completed; Step 7: If the preset entity changes, return to Step 2, redefine business logics and rules, and re-sign a new contract in the form of a smart contract within the blockchain platform.
[0007] Preferably, in Step 1, a number of the preset entities include: a shared device manufacturer, a shared device user, a venue provider, a platform operator, and a financial institution; The servers of the shared device manufacturer, the shared device user, and the venue provider respectively serve as core nodes on the blockchain, forming a core node set of the sharing economy; The consensus mechanism adopts the PoS+PBFT algorithm, specifically a strategy that combines the dynamically random weighted pos algorithm and the Byzantine fault-tolerant PBFT algorithm.
[0008] Preferably, in Step 1, during the process of the consensus mechanism adopting the PoS+PBFT algorithm to adapt to the changes of the preset entity and the network topology structure, the blockchain platform screens out some preset entities as candidate verifiers according to the account balance, time, activity, and reputation value held by the preset entity serving as a node; The specific steps of the dynamically random weighted pos algorithm are as follows: Divide the candidate verifiers into groups. Nodes with different account balance holdings are in each group. Random weighting is performed within the group. The weighted scores of each node are sorted, cumulative probabilities are assigned to each node, and the final verifier is determined by generating a random number. The dynamically random weighted formula satisfies the following relational expression: ; In the formula, represents the weighted score of the node, respectively represent the weight coefficients of each factor, represents the account balance held by the node, represents the time held by the node, represents the activity of the node, represents the credit score of the node; Preset a fixed period, re-obtain verifiers after the end of each period, and set a cooling period for the nodes of the verifiers.
[0009] Preferably, the specific steps of using the Byzantine fault tolerance PBFT algorithm are as follows: Using Byzantine fault tolerance includes three stages. Among them, in the pre-preparation stage: the primary node creates a transaction proposal based on the received transaction requests and broadcasts the transaction proposal to all verifier nodes; in the preparation stage: after all verifier nodes receive the proposal from the primary node, they verify the transactions in the proposal. In response to passing the verification, the alternative nodes will sign the proposal and broadcast it to other nodes; in the commit stage: when the alternative nodes receive a sufficient number of signature confirmations from other nodes, that is, the proposal reaches a consensus, all nodes will write the transaction record into their respective local ledgers and broadcast a confirmation message to end this round of consensus; Among them, in each round of consensus, one node among several verifiers is selected as the primary node in a predetermined order. The main responsibilities of the primary node include: collecting transactions in the network and packing them into new blocks, broadcasting the new blocks to other verifiers for verification; as the initiator responsible for starting each stage, promoting and coordinating the consensus process; if the primary node fails to complete its main responsibilities during the consensus process, the blockchain platform triggers the standby node mechanism to select a new primary node to continue this round of consensus.
[0010] Preferably, the smart contract in step 2 includes: signing a contract, setting a profit sharing ratio, an order processing mechanism, and a contract update mechanism; The order data of the smart contract is stored in the form of a byte sequence, and the byte sequence is: [status, amount, profit sharing ratio, date, device ID, merchant one, merchant two, merchant three, extension, check bit], and the length of the order data is 32 bytes.
[0011] Preferably, in step 4, during the process of generating corresponding amounts of account balances on the blockchain, specifically, the account balances are divided according to the profit sharing ratio set in the smart contract, transferred to the accounts of the corresponding preset main body blockchains, and a transaction receipt is generated; The transaction receipt information includes: Transaction hash: serving as the unique identifier of the transaction; Transaction status: indicating whether the transaction is successful; Block hash and block number: indicating the block in which the transaction is included; Contract address: if it is a contract creation transaction, it will include the address of the new contract; Log: recording the events triggered by the contract, including on-chain balance transfer information; Generating the account balance requires multi-signature confirmation. During the transfer process, asymmetric encryption algorithms and distributed ledger technologies are used to enable the preset entity to receive the due share of the account balance.
[0012] Preferably, in step 5, the specific steps for the blockchain platform to reconcile and synchronize the two cash withdrawal record ledgers on and off the blockchain platform based on the zero-knowledge proof algorithm are as follows: Step a: Obtain the cash withdrawal order generated on the chain. The cash withdrawal order includes: order amount, receiving account, order ID, and on-chain transaction hash; Step b: The central account completes the off-chain bank transfer and generates transfer information. The transfer information includes: transfer amount, transfer receiving account, transfer ID, and off-chain transfer hash; Step c: The on-chain smart contract generates a random challenge and sends it to the central account. The central account generates a response based on the bank transfer data, and then the on-chain response is verified based on the zero-knowledge proof algorithm. After successful verification, the order is confirmed on the chain.
[0013] Preferably, the blockchain platform obtains the transaction receipts between the central account and the preset entity at preset time intervals and conducts audits. During the process of transaction audit verification, a real-time transaction receipt verification monitoring system is specifically established to obtain and process abnormal orders, and the account balance is used for traceability to complete tracing and auditing.
[0014] Preferably, in step 5, when each preset entity conducts a transaction cash withdrawal according to the blockchain platform, a TCC transaction management unit is specifically constructed. The TCC transaction management module includes a Try unit, a Confirm unit, and a Cancel unit; First, start the Try unit: The user applies for a cash withdrawal, generating four branch transactions: checking the bill consistency, determining the available status of the receiving account, the smart contract reserves to destroy the on-chain balance, and the bank reserves the cash withdrawal amount; If all branch transactions of the Try unit are successfully executed, start executing the Confirm unit. The Confirm unit will destroy the on-chain balance and conduct a bank transfer. The bank transfer action is triggered by the contract through Event after the on-chain balance is destroyed; If any one of the branch transactions in the Try unit fails to execute, trigger the Cancel unit to roll back all branch transactions and release the reserved resources.
[0015] Preferably, in step 6, when processing cash withdrawals and destroying the on-chain balance, a multi-step verification mechanism is introduced for the account balance, and the account balance cannot be regenerated after being destroyed. The verification mechanism includes: identity verification, transaction verification, transaction execution, and logging. The identity verification is performed before any cash withdrawal and on-chain balance destruction operation starts. The transaction verification includes balance verification and transaction review. The balance verification includes: obtaining the current balance of a preset entity on the blockchain and comparing it with the requested cash withdrawal amount. The transaction review includes: reviewing and confirming the transaction according to the device provider, and verifying the transaction parameters. The verification of the transaction parameters includes: the recipient's bank account and the transfer amount.
[0016] The technical effects achieved by the present invention are as follows: In the present invention, through the smart contract, the PoS+PBFT consensus mechanism is implemented for off-chain transfers and on-chain balances, which can automatically execute the preset consensus protocol and record the consensus result on the chain without manual intervention. This not only greatly improves the operation efficiency and accuracy of the system, but also reduces the possibility of human errors and ensures the efficiency of the account splitting and reconciliation processes.
[0017] In the present invention, by introducing the TCC distributed transaction management scheme and the consensus mechanism, the system can improve the reconciliation efficiency to accurately meet the requirement of account splitting, and at the same time can cope with changes in participating parties and network topologies, maintaining the stability and reliability of the system. This provides higher scalability and adaptability for the sharing economy platform, and can support a wider range of business scenarios and more participating parties.
[0018] In the present invention, the structure of the order data of the smart contract is stored in the form of a byte sequence. The byte sequence is: [status, amount, splitting ratio, date, device ID, merchant 1, merchant 2, merchant 3, extension, check bit]. Among them, the length of the order data is 32 bytes; the number of bits occupied by each byte is: [8 bits, 24 bits, 8 bits, 32 bits, 32 bits, 16 bits, 16 bits, 16 bits, 80 bits, 8 bits], and the number of bits occupied by each is a multiple of 8 bits, so that the total number of bits of the updated bill data is 240 bits, which is less than the number of bits of a storage slot, ensuring that the data is effectively compressed within 32 bytes. Compactly compressing the order information in a single storage slot simplifies the data reading and processing process. Compared with the complex operations of multi-slot decentralized storage, the system only needs to read once to complete the query and processing of the order data. This improves the query efficiency and reduces the latency, especially when frequently reading and processing a large amount of order data.
[0019] In the present invention, the blockchain platform realizes the reconciliation and synchronization of two cash withdrawal record ledgers, one on the blockchain platform and the other off the blockchain platform, based on the zero-knowledge proof algorithm. An innovative blockchain application scenario is proposed, where all transaction data is recorded and stored on a decentralized distributed ledger, with immutability, ensuring data integrity and security, and improving the efficiency of traceability and auditing, eliminating the risks of data tampering and information leakage in traditional systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a system block diagram of the method for sharing economy profit distribution and reconciliation based on blockchain in the present invention; Figure 2 is a schematic diagram of the consumption order structure setting in the method for sharing economy bookkeeping based on blockchain in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] In order to make the objectives and advantages of the present invention clearer, the present invention will be specifically described below in conjunction with embodiments. It should be understood that the following text is only used to describe one or several specific implementation manners of the present invention, and does not strictly limit the scope of protection of the specific requests of the present invention.
[0022] As Figure 1 shown, the method for sharing economy profit distribution and reconciliation based on blockchain includes the following steps: Step 1: Build a consortium chain on the blockchain platform and set a central account. The consortium chain respectively establishes nodes with a number of preset entities, forms an account relationship between the central account and the number of preset entities, and sets corresponding consortium chain rules based on the account relationship. On the basis of the consortium chain, a consensus mechanism is introduced, and the consensus mechanism adopts the PoS+PBFT algorithm. The consensus mechanism is used to maintain data consistency among the various nodes of the blockchain; In step 1 of this embodiment, the number of preset entities includes: shared equipment manufacturers, shared equipment users, venue providers, platform operators, and financial institutions; The servers of the shared equipment manufacturers, shared equipment users, and venue providers respectively serve as core nodes on the blockchain, forming a core node set of the sharing economy; Further explanation, the central account includes but is not limited to the authority to adjust the account balance, deploy smart contracts, and serve as the account of the equipment manufacturer.
[0023] Among them, the consortium chain rules include but are not limited to: decision-making mechanisms, membership qualifications, roles and responsibilities, joining and exiting processes, consensus mechanisms, smart contract management, dispute resolution mechanisms, security and privacy policies, incentive mechanisms, transparency and auditing, technical governance, business management, and risk management rules.
[0024] Further explanation: In the present invention, an administrator role is set up on the blockchain platform, and the responsibilities thereof include: the online of new devices in the system, the management of account information of device providers and participants, and the signing and updating of device contracts.
[0025] Furthermore, the consortium blockchain is a form of blockchain, which is jointly managed by multiple organizations or institutions. Each organization or institution manages one or more nodes, and its data is only allowed to be read, written, and sent by different institutions within the system. The consensus process of this blockchain is controlled by preselected nodes, so it is also called a permissioned blockchain. The characteristics of the consortium blockchain are partial decentralization, strong controllability, data not being publicly available by default, and relatively fast transaction speed. Among them, the multiple preset entities include but are not limited to: shared device providers, venue providers, shared device manufacturers, etc.; when establishing nodes, the system requires the participating entities to be authenticated through a secure identity verification mechanism to determine the legitimacy of the nodes and the security of the system. On the basis of the consortium blockchain, a consensus mechanism is introduced to cope with changes in participants and network topologies. The consensus mechanism adopts the PoS+PBFT algorithm, specifically a strategy that combines dynamically weighted random PoS with the Byzantine Fault Tolerance PBFT; in the present invention, to ensure the stability and security of the blockchain network, the Practical Byzantine Fault Tolerance Consensus Algorithm (PBFT) is introduced; PBFT is applicable to relatively small-scale consortium blockchain networks and can efficiently process the consensus process when there is a certain level of trust among nodes.
[0026] In step 1, during the process of the consensus mechanism adopting the PoS+PBFT algorithm to adapt to changes in preset entities and network topologies, the blockchain platform selects some preset entities as candidate verifiers based on the account balances, time, activity levels, and reputation values held by the preset entities acting as nodes; The specific steps of the dynamically weighted random PoS algorithm (DWR-PoS) are as follows: Group the candidate verifiers. For nodes with different account balance holdings in each group, perform random weighting within the group, sort the weighted scores of each node, assign cumulative probabilities to each node, and determine the final verifier by generating a random number. The dynamically weighted random formula satisfies the following relationship: ; In the formula, represents the weighted score of the node, respectively represent the weight coefficients of each factor, represents the account balance held by the node, represents the time held by the node, represents the activity level of the node, represents the reputation score of the node; A preset fixed period is set. After each period ends, the verifier is retrieved again, and a cooling period is set for the nodes of the verifier.
[0027] Preferably, the specific steps of using the Byzantine Fault Tolerance PBFT algorithm are as follows: Using Byzantine Fault Tolerance includes three stages. Among them, the pre-preparation stage: The primary node creates a transaction proposal based on the received transaction requests and broadcasts the transaction proposal to all verifier nodes; The preparation stage: After all verifier nodes receive the proposal from the primary node, they verify the transactions in the proposal. In response to successful verification, the candidate nodes will sign the proposal and broadcast it to other nodes; The commit stage: When the candidate nodes receive a sufficient number of signature confirmations from other nodes, that is, the proposal reaches a consensus. All nodes will write the transaction record into their respective local ledgers and broadcast a confirmation message to end this round of consensus. Among them, in each round of consensus, a node among several verifiers is selected as the primary node in a predetermined order. The main responsibilities of the primary node include: Collecting transactions in the network and packaging them into new blocks, broadcasting the new blocks to other verifiers for verification; As the initiator responsible for starting each stage, promoting and coordinating the consensus process; If the primary node fails to complete its main responsibilities during the consensus process, the blockchain platform triggers the standby node mechanism to select a new primary node to continue this round of consensus.
[0028] Among them, in each round of the formula, a node in the verifier pool is selected as the primary node in a predetermined order. The main responsibilities of the primary node include: Collecting transactions in the network and packaging them into new blocks, broadcasting the new blocks to other verifiers for verification; As the initiator responsible for starting each stage, promoting and coordinating the formula process.
[0029] Further explanation, in response to the primary node failing to complete its main responsibilities during the consensus process, the system triggers the standby node mechanism to select a new primary node to continue this round of consensus.
[0030] Even further explanation, the fault tolerance limit in the Byzantine Fault Tolerance formula algorithm includes: Tolerating a preset number of malicious nodes, and at the same time ensuring that there are three times the preset number plus 1 verifier nodes in the system, then the system can operate normally.
[0031] Step 2: Define business logics and rules between the central account and several preset entities, and sign contracts in the form of smart contracts within the blockchain platform. The smart contract in Step 2 includes: Signing contracts, setting profit sharing ratios, order processing mechanisms, and contract update mechanisms to enhance the flexibility and adaptability of the contracts; In response to contract changes, it is used to ensure that the interests of all preset entities are not damaged and provide a clear communication mechanism to ensure a smooth transition. The structure of the order data of the smart contract is stored in the form of a byte sequence, and the byte sequence is: [status, amount, revenue sharing ratio, date, device ID, merchant one, merchant two, merchant three, extension, check bit]. The length of the order data is 32 bytes.
[0032] The number of bits occupied by each byte is: [8 bits, 24 bits, 8 bits, 32 bits, 32 bits, 16 bits, 16 bits, 16 bits, 80 bits, 8 bits]. The number of bits occupied by each is a multiple of 8 bits, so that the total number of bits of the updated bill data is 240 bits, which is less than the number of bits of a storage slot, ensuring that the data is effectively compressed within 32 bytes.
[0033] Refer to Figure 2 , specifically, it is the structural form of the order data of the received consumption order.
[0034] It should be noted that the consumption order form in the blockchain system is defined as , and queries are made according to the date.
[0035] The contract content includes but is not limited to: revenue sharing ratio, contract effective date, order processing mechanism, contract update mechanism and other information.
[0036] It can be understood that the preset entity signs a contract for each device through the smart contract. The smart contract has high flexibility and scalability and can be adjusted according to the needs of the participating parties. When the contract is changed, the contract version and contract update date will be automatically updated. It is necessary to ensure that the interests of all participating parties are not damaged, and a clear communication and transition mechanism is provided through the smart contract to ensure the stable operation of the system.
[0037] Furthermore, it improves the efficiency of the revenue sharing and reconciliation process among the participating entities generated by the shared devices, and solves the issues of mutual trust and security in the revenue sharing and reconciliation process through the online and offline ledger methods. The decentralization, immutability and transparency of the blockchain ensure the secure storage and reliable reconciliation of the transaction data of the shared devices. The automated execution of the smart contract improves the efficiency and accuracy of revenue sharing and settlement. At the same time, the high-efficiency exception handling and traceability capabilities of the blockchain guarantee the stability of the system and the fair interests of the participating parties. These features make this system significantly superior to the traditional reconciliation methods in the sharing economy, enhancing the overall security, transparency and trust.
[0038] Step 3: The preset entity uploads the collected data to the blockchain platform through the smart chip via its own data collection module to obtain the consumption orders on the blockchain platform; Step 4: The blockchain platform divides the amount of the consumption order into the bank accounts of the corresponding preset entities under the blockchain platform, generates a transaction receipt on the chain of the blockchain platform, and simultaneously generates the corresponding account balances; In step 4, during the process of generating corresponding amounts of account balances on the blockchain, the specific account balances are divided according to the profit sharing ratio set in the smart contract, transferred to the accounts of the corresponding preset entity blockchains, and a transaction receipt is generated. The transaction receipt information includes: Transaction hash: As the unique identifier of the transaction; Transaction status: Indicates whether the transaction is successful; Block hash and block number: Indicates the block in which the transaction is included; Contract address: If it is a contract creation transaction, it will include the address of the new contract; Log: Records the events triggered by the contract, including the on-chain balance transfer information. Generating the account balances requires multi-party signature confirmation. During the transfer process, asymmetric encryption algorithms and distributed ledger technology are used to ensure transaction privacy and immutability, so as to ensure that all preset entities can receive their due shares of account balances in a timely and accurate manner.
[0039] Further explanation, after profit sharing, the preset entity withdraws the account balance and submits a withdrawal order on the chain. At this time, there are two orders on the chain, one is the consumption order for equipment production and the other is the withdrawal order of the preset entity. The withdrawal order is verified based on zero-knowledge proof. During the verification process, if there is an abnormal order, the abnormal order is audited and traced by off-chain auditors. The specific tracing process is like the distributed tcc transaction management in step 7, which is conducive to tracing abnormal orders.
[0040] In this embodiment, the applied distributed ledger technology is the basis of the blockchain and is used to record and manage all transaction data. Among them, asymmetric encryption algorithm: Asymmetric encryption uses a pair of keys - public key and private key - to encrypt and decrypt data as well as the hash algorithm. In the transfer of account balances, the user uses the private key to sign the transaction, and this signature can be verified with the corresponding public key, thus ensuring the legality and non-repudiation of the transaction. Since the public key is public, anyone can verify the signature, but only the person holding the private key can generate a valid signature, which ensures the privacy and security of the transaction. The hash algorithm is SHA-256, which is irreversible and can be used for data integrity verification. During the transfer process, the hash value of the transaction data is stored on the blockchain. All transaction data in a block generates a hash value (Merkle root) through the hash algorithm and is stored in the block header. If any transaction data is tampered with, the hash value will change, thus easily detecting the tampering behavior.
[0041] Furthermore, the distributed ledger technology is jointly maintained by multiple nodes, and each node in the blockchain network stores a complete copy of the ledger. Each block in the blockchain contains the hash value of the previous block, forming an indivisible chain. Tampering with the data of any block will cause the chain to break and cannot pass the consensus verification. Through the distributed ledger technology, the transaction data is distributed on multiple nodes, ensuring the transparency and immutability of the transaction records, while ensuring data consistency.
[0042] Step 5: The preset entity submits a corresponding cash withdrawal order on the chain according to the account balance. A number of the preset entities conduct transaction cash withdrawals according to the blockchain platform. In response to the completion of bank transfer by the central account under the blockchain, the blockchain platform verifies the two cash withdrawal records on the blockchain platform and under the blockchain platform based on the zero-knowledge proof algorithm; Further explanation, in this embodiment, zero-knowledge proof (Zero-Knowledge Proof, ZKP) is adopted, which is a cryptographic technology that allows one party to prove to another party that a certain statement is correct without providing any information other than the correctness of the statement. This technology can prove the correctness of a certain problem without revealing the specific secret, so it has important value in privacy protection.
[0043] Furthermore, the zero-knowledge proof obtains the hash value of the order data on the chain through the central account. The central account conducts a transfer. Based on the bank transfer data under the chain, the hash value of the transfer data is obtained under the chain to obtain the encrypted data.
[0044] Among them, in this embodiment, the SHA-256 hash algorithm is used to generate the hash values on the chain and under the chain. It should be noted that the hash values on the chain and under the chain are converted from 32-byte hexadecimal numbers to decimal numbers. Further, a large prime number and a generator are obtained to ensure co-prime with.
[0045] Specifically, the encrypted data satisfies the following relational expression: P = g s -modG; In the formula, P represents the encrypted data, g s represents the private key of the power of the generator g, and modG represents the operation of modulo G.
[0046] At the same time, a random number r is generated under the chain, and a temporary value R is generated based on the random number.
[0047] Specifically, the temporary value satisfies the following relational expression: R = g r modG; In the formula, R represents the temporary value, g rThe random number r represents the power of the generator g, and modG represents the modulo operation.
[0048] Generate a random challenge c on the chain, respond to the corresponding challenge off-chain, and obtain the response result z.
[0049] Specifically, the response result satisfies the following relational expression: z = (r + c * s) mod (G - 1); In the formula, z represents the response result, r represents the random number, c represents the random challenge, s represents the private key, and mod(G - 1) represents the modulo G - 1 operation.
[0050] Perform verification on the chain, and the verification satisfies the following relational expression: g z - modG = (R * P c ) modG; In the formula, g z represents the response result of the power of the generator g, modG represents the modulo G operation, R represents the temporary value, and P c represents the random challenge of the power of the encrypted data P, and modG represents the modulo operation.
[0051] Furthermore, in the zero-knowledge proof, the correctness of the off-chain calculation is deduced through the power operation. The detailed deduction process is well-known technology in the field and will not be described in detail.
[0052] In response to the equality, the off-chain transfer data is consistent with the on-chain transaction receipt data, and the order verification is passed. Otherwise, the data is inconsistent and the order verification fails.
[0053] Through the zero-knowledge proof, only the data consistency is verified on the chain, and the actual bank transfer is not displayed on the chain. At the same time, the verification process prevents the tampering of off-chain data. Random numbers are generated on the chain, and it is impossible to prepare forged data in advance, improving the data security. Complex calculations are performed off-chain, and only data verification is performed on the chain, reducing data calculation and storage, and improving the response rate.
[0054] Furthermore, after completing the above zero-knowledge proof, it is proved that the online and offline withdrawal actions are consistent, and a complete withdrawal process is obtained. In response to the successful verification of the zero-knowledge proof, the central account on the chain destroys the account balance, and the withdrawal order is marked as completed.
[0055] During the transaction withdrawal process by each preset entity according to the blockchain platform, specifically, a TCC transaction management unit is constructed. The TCC transaction management module includes a Try unit, a Confirm unit, and a Cancel unit; First, start the Try unit: When a user applies for a cash withdrawal, four branch transactions are generated: checking the bill consistency, determining the available status of the receiving account, the smart contract reserves and destroys the on-chain balance, and the bank reserves the cash withdrawal amount; If all branch transactions of the Try unit are successfully executed, start executing the Confirm unit. The Confirm unit will destroy the on-chain balance and initiate a bank transfer. The bank transfer action is triggered by the contract through an Event after destroying the on-chain balance; If any one of the branch transactions in the Try unit fails, trigger the Cancel unit to roll back all branch transactions and release the reserved resources.
[0056] Specifically, the specific implementation method of the distributed transaction management solution is as follows: Try Phase: When a user initiates a cash withdrawal request, the system first enters the Try phase. The blockchain platform performs the following operations: (1) Check whether the balance of the user's account is sufficient to ensure the legality of the cash withdrawal amount.
[0057] (2) Lock the corresponding amount of on-chain balance in the user's account to prevent duplicate cash withdrawals or double spending.
[0058] (3) Reserve the cash withdrawal funds in the off-chain financial system to ensure that the off-chain funds are sufficient to support this cash withdrawal operation.
[0059] (4) Generate a temporary cash withdrawal order and record the current system status for status confirmation or rollback in subsequent phases.
[0060] Confirm Phase: If all operations in the Try phase are successfully completed, the system will enter the Confirm phase to officially execute the cash withdrawal operation. The specific operations include: (1) Destroy the previously locked on-chain balance, reduce the on-chain balance amount in the user's account, and update the on-chain ledger record.
[0061] (2) Trigger a bank transfer operation to transfer the reserved cash withdrawal funds to the bank account specified by the user.
[0062] (3) Generate and save a transaction voucher in the system for subsequent review and auditing.
[0063] (4) Ensure the consistency between the on-chain ledger and the off-chain ledger and achieve their synchronization.
[0064] Cancel Phase: If any operation during the attempt phase fails, or the user cancels the withdrawal request before the confirmation phase, the system will enter the cancellation phase and revoke all previous operations. The specific operations include: (1) Release the lock on the on-chain balance and restore the on-chain balance amount in the user's account to its original state.
[0065] (2) Cancel the funds reserved by the bank and release the corresponding amount in the off-chain financial system.
[0066] (3) Delete the temporarily generated withdrawal order and roll back the system status to the state before the withdrawal request to ensure the consistency of system data.
[0067] (4) Ensure the restoration of the user account and system accounts to prevent any inconsistencies or data loss.
[0068] Step 6: After the verification in Step 5 is successful, the account balance will be destroyed, and finally, intelligent profit sharing and reconciliation will be completed; In Step 6, when processing withdrawals and destroying the on-chain balance, a multi-step verification mechanism is introduced to ensure the legality of the operation. Among them, after the account balance is destroyed, it cannot be regenerated to ensure the stability of the account balance supply; The verification mechanism includes: identity verification, transaction verification, transaction execution, and logging; Identity verification is carried out before any withdrawal and on-chain balance destruction operation to ensure that authorized users can initiate withdrawal operations; Transaction verification includes balance verification and transaction review. Balance verification includes: obtaining the current balance of a preset entity on the blockchain and comparing it with the requested withdrawal amount to ensure that the user's balance is sufficient to cover this operation; Transaction review includes: reviewing and confirming the transaction according to the device provider, and verifying the transaction parameters. Verifying the transaction parameters includes: the recipient's bank account and the transfer amount.
[0069] A withdrawal order is generated in the reconciliation system. Specifically, the current status information of the withdrawal order is pending transfer, and at the same time, tokens corresponding to the withdrawal quantity are sent to the blockchain account of the central account holder. When the central account holder logs in to the system, they will receive that the status of the withdrawal order sent by the withdrawer is transfer, and the token balance in their blockchain account will increase correspondingly. Within the specified time, the central account holder makes a bank transfer for this withdrawal order. After the transfer is completed, the central account holder uploads the transfer voucher in the system. After the transfer voucher is uploaded, the current status of this withdrawal order becomes "pending confirmation", and the reconciliation system will automatically apply the zero-knowledge proof algorithm to verify whether the bank transfer information is consistent with the withdrawal order information in the system. After the central account holder completes the upload of the transfer voucher and the system verification passes, the withdrawer can view the transfer voucher in the system and click the "Received" button. After the withdrawer clicks the "Received" button, this withdrawal order will be marked as "completed", and the token balance corresponding to the quantity of this withdrawal order in the blockchain account of the central account holder will be deducted and destroyed. The token quantity in the reconciliation system is always consistent with the amount of money that has not been divided.
[0070] Step 7: If the preset entity changes, return to Step 2, redefine the business logic and rules, and re-sign a new contract in the form of a smart contract within the blockchain platform.
[0071] In the present invention, the blockchain platform obtains the transaction receipts between the central account and the preset entity at preset time intervals and conducts an audit. During the process of auditing and verifying the transactions, specifically, a real-time transaction receipt verification monitoring system is established, abnormal orders are obtained and processed, and the account balance is used for traceability to complete the tracing and auditing.
[0072] Specifically, in the present invention, when obtaining the transaction receipts between the central account and the preset entity at preset time intervals and conducting transaction verification, specifically, a real-time transaction receipt verification monitoring system is established, abnormal orders are obtained and processed, and the account balance is used for traceability. It is necessary to ensure the integrity of relevant metadata and event records on the blockchain to support the completion of tracing and auditing.
[0073] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. The structures, devices, and operation methods not specifically described and explained in the present invention are implemented according to the conventional means in the art without special explanation and limitation.
Claims
1. A blockchain-based shared economy revenue sharing and reconciliation method, characterized in that: It includes the following steps: Step 1: Build a consortium chain on the blockchain platform and set up a central account. The consortium chain establishes nodes with several preset entities respectively, constituting the account relationship between the central account and several preset entities, and setting corresponding consortium chain rules based on the account relationship. On the basis of the consortium chain, introduce a consensus mechanism, and the consensus mechanism adopts the PoS+PBFT algorithm, which is used to maintain the data consistency of each node of the blockchain; Step 2: Define business logics and rules between the central account and several preset entities, and sign contracts in the form of smart contracts within the blockchain platform; Step 3: The preset entity uploads the collected data to the blockchain platform through a smart chip via its own data collection module to obtain consumption orders on the blockchain platform; Step 4: The blockchain platform divides the amount of the consumption order into the bank accounts of the corresponding preset entities under the blockchain platform, generates a transaction receipt on the chain of the blockchain platform, and simultaneously generates the corresponding number of account balances; Step 5: The preset entity submits a corresponding cash withdrawal order on the chain according to the account balance. Several preset entities conduct transaction cash withdrawals according to the blockchain platform. In response to the completion of bank transfer by the central account under the blockchain, the blockchain platform verifies the two cash withdrawal records on and under the blockchain platform based on the zero-knowledge proof algorithm; Step 6: After the verification in Step 5 is successful, the account balance will be destroyed, and finally intelligent profit sharing and reconciliation are completed; Step 7: If the preset entity changes, return to Step 2, redefine business logics and rules, and re-sign a new contract in the form of a smart contract within the blockchain platform.
2. The blockchain-based shared economy profit sharing and reconciliation method according to claim 1, characterized in that: In Step 1, several preset entities include: shared device manufacturers, shared device users, venue providers, platform operators, and financial institutions; The servers of the shared device manufacturers, shared device users, and venue providers respectively serve as core nodes on the blockchain, forming a core node set of the sharing economy; The specific implementation of the consensus mechanism adopting the PoS+PBFT algorithm is a strategy of combining the dynamic random weighted pos algorithm and the Byzantine fault-tolerant PBFT algorithm; 3. The method for sharing economy account division and reconciliation based on blockchain according to claim 2, characterized in that: In Step 1, in the process of the consensus mechanism adopting the PoS+PBFT algorithm to adapt to the changes of the preset entity and the network topology structure, the blockchain platform screens some preset entities as candidate verifiers according to the account balance, time, activity, and reputation value held by the preset entity as a node; The specific steps of the dynamic random weighted pos algorithm are as follows: Group the candidate verifiers. Each group has nodes with different account balance holdings. Randomly weight within the group, sort the weighted scores of each node, assign cumulative probabilities to each node, and determine the final verifier by generating a random number. The dynamic random weighted formula satisfies the following relationship: ; Wherein, represents the weighted score of the node, respectively represent the weight coefficients of each factor, represents the account balance held by the node, represents the time held by the node, represents the activity of the node, represents the credit score of the node; Set a preset fixed period, re-obtain verifiers after the end of each period, and set a cooling period for the nodes of the verifiers.
4. The method for sharing economy revenue sharing and reconciliation based on blockchain according to claim 2, characterized in that: The specific steps of using the Byzantine Fault Tolerant PBFT algorithm are as follows: Using Byzantine Fault Tolerance includes three phases. Among them, in the pre-prepare phase: The primary node creates a transaction proposal based on the received transaction requests and broadcasts the transaction proposal to all validator nodes; In the prepare phase: After all validator nodes receive the proposal from the primary node, they verify the transactions in the proposal. In response to successful verification, the candidate nodes sign the proposal and broadcast it to other nodes; In the commit phase: When the candidate nodes receive a sufficient number of signature confirmations from other nodes, that is, consensus is reached on the proposal. All node transaction records are written into their respective local ledgers, and a confirmation message is broadcast to end this round of consensus; Among them, in each round of consensus, one node among several validators is selected as the primary node in a predetermined order. The main responsibilities of the primary node include: Collecting transactions in the network and packaging them into new blocks, broadcasting the new blocks to other validators for verification; As the initiator responsible for starting each phase, promoting and coordinating the consensus process; If the primary node fails to complete its main responsibilities during the consensus process, the blockchain platform triggers the standby node mechanism to select a new primary node to continue this round of consensus.
5. The method for sharing economy account splitting and reconciliation based on blockchain according to claim 1, characterized in that: The smart contract in step 2 includes: Signing a contract, setting the profit sharing ratio, order processing mechanism, and contract update mechanism; The structure of the order data of the smart contract is stored in the form of a byte sequence. The byte sequence is: [status, amount, profit sharing ratio, date, device ID, merchant 1, merchant 2, merchant 3, extension, check bit]. The length of the order data is 32 bytes.
6. The method for sharing economy revenue sharing and reconciliation based on blockchain according to claim 1, characterized in that: In step 4, during the process of generating corresponding account balances on the blockchain, specifically, the account balances are divided according to the profit sharing ratio set in the smart contract and transferred to the accounts of the corresponding preset entities on the blockchain, and a transaction receipt is generated; The transaction receipt information includes: Transaction hash: As the unique identifier of the transaction; Transaction status: Indicating whether the transaction is successful; Block hash and block number: Indicating the block in which the transaction is included; Contract address: If it is a contract creation transaction, it will include the address of the new contract; Log: Recording the events triggered by the contract, including on-chain balance transfer information; Generating the account balances requires multi-signature confirmation. During the transfer process, asymmetric encryption algorithms and distributed ledger technologies are used to enable the preset entities to receive their due shares of the account balances.
7. The method for sharing economy profit distribution and reconciliation based on blockchain according to claim 1, wherein: In step 5, the specific steps for the blockchain platform to implement the reconciliation and synchronization of the two withdrawal record ledgers on and off the blockchain based on the zero-knowledge proof algorithm are as follows: Step a: Obtain the withdrawal orders generated on the chain. The withdrawal orders include: Order amount, receiving account, order ID, on-chain transaction hash; Step b: The central account completes the off-chain bank transfer and generates transfer information. The transfer information includes: Transfer amount, transfer receiving account, transfer ID, off-chain transfer hash; Step c: The on-chain smart contract generates a random challenge and sends it to the central account. The central account generates a response based on the bank transfer data, and then the on-chain verification is performed based on the zero-knowledge proof algorithm. After successful verification, the on-chain confirms that the order is completed.
8. The method for sharing economy account splitting and reconciliation based on blockchain according to claim 1, characterized in that: The blockchain platform obtains the transaction receipts between the central account and the preset entity at preset time intervals respectively and conducts audits.
9. The method for sharing economy account splitting and reconciliation based on blockchain according to claim 1, characterized in that: In step 5, when each preset entity conducts a transaction withdrawal according to the blockchain platform, a TCC transaction management unit is specifically constructed. The TCC transaction management module includes a Try unit, a Confirm unit, and a Cancel unit. First, start the Try unit: When a user applies for a withdrawal, four sub-transactions are generated: checking the bill consistency, determining the available status of the receiving account, the smart contract reserves to destroy the on-chain balance, and the bank reserves the withdrawal amount. If all sub-transactions of the Try unit are executed successfully, start executing the Confirm unit. The Confirm unit will destroy the on-chain balance and conduct a bank transfer. The bank transfer action triggers the contract to be realized through an Event after destroying the on-chain balance. If any sub-transaction in the Try unit executes incorrectly, trigger the Cancel unit to roll back all sub-transactions and release the reserved resources.
10. The method for sharing economy account sharing and reconciliation based on blockchain according to claim 1, characterized in that: In step 6, when processing the withdrawal and destroying the on-chain balance of the account balance, a multi-step verification mechanism is introduced, and the account balance cannot be regenerated after being destroyed. The verification mechanism includes: identity verification, transaction verification, transaction execution, and logging. The identity verification is before the start of any withdrawal and on-chain balance destruction operation. The transaction verification includes balance verification and transaction review. The balance verification includes: obtaining the current balance of the preset entity on the blockchain and comparing it with the requested withdrawal amount. The transaction review includes: reviewing and confirming the transaction according to the device provider and verifying the transaction parameters. The verification of the transaction parameters includes: the receiving bank account and the transfer amount.
Citation Information
Patent Citations
Implementation method and device for blockchain smart contract
CN108694669A
Account checking method and apparatus for block chain transaction, and electronic device
CN108876572A
Block chain consensus method based on reputation right and interest proof
CN109493062A
Alliance chain course pass settlement method and system applied to education resource transaction
CN110009493A
A privacy token transaction method based on a consortium blockchain account model using zero-knowledge proofs
CN114936852A
Cited By
Intelligent contract-driven APP automatic accounting system and method
CN121280021A
Product distribution profit sharing automatic control system based on intelligent contract
CN121351128A
Block chain technology-based different-industry alliance right and interest management method and system
CN122114930A