+

CN120317872A - Sharing economy account reconciliation method based on blockchain - Google Patents

Sharing economy account reconciliation method based on blockchain

Info

Publication number
CN120317872A
CN120317872A CN202510756935.0A CN202510756935A CN120317872A CN 120317872 A CN120317872 A CN 120317872A CN 202510756935 A CN202510756935 A CN 202510756935A CN 120317872 A CN120317872 A CN 120317872A
Authority
CN
China
Prior art keywords
account
transaction
blockchain
chain
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510756935.0A
Other languages
Chinese (zh)
Inventor
杨峰
马一超
张玉晖
赵亮
刘培德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University of Finance and Economics
Original Assignee
Shandong University of Finance and Economics
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University of Finance and Economics filed Critical Shandong University of Finance and Economics
Priority to CN202510756935.0A priority Critical patent/CN120317872A/en
Publication of CN120317872A publication Critical patent/CN120317872A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本发明提供基于区块链的共享经济分账对账方法,涉及区块链和物联网技术领域,其方法包括:在区块链平台上构建联盟链,并通过智能合约定义业务逻辑和规则,可以确保信息的一致性和安全性。基于智能芯片,以用于数据能够自动上链,通过零知识证明技术则用于验证链上链下数据的一致性,保护隐私。通过这种方式,消费订单金额可以自动划分到相关主体的银行账户,并生成账户余额,实现账本的同步。定期核验交易,处理异常,确保智能分账和对账的准确性。如果预设主体发生变更,可以通过更新智能合约来适应变化,提高灵活性。此外,引入TCC分布式事务管理方案和共识机制,有助于提高分账和对账的效率,保持系统的稳定性和可靠性。

The present invention provides a shared economy account splitting and reconciliation method based on blockchain, which relates to the technical field of blockchain and the Internet of Things. The method includes: building an alliance chain on a blockchain platform, and defining business logic and rules through smart contracts to ensure the consistency and security of information. Based on a smart chip, the data can be automatically uploaded to the chain, and the zero-knowledge proof technology is used to verify the consistency of the data on and off the chain to protect privacy. In this way, the amount of the consumption order can be automatically divided into the bank account of the relevant subject, and the account balance is generated to achieve the synchronization of the account book. Regularly verify transactions, handle exceptions, and ensure the accuracy of intelligent account splitting and reconciliation. If the preset subject changes, the smart contract can be updated to adapt to the change and improve flexibility. In addition, the introduction of the TCC distributed transaction management solution and consensus mechanism will help improve the efficiency of account splitting and reconciliation and maintain the stability and reliability of the system.

Description

Block chain-based shared economic account separating and checking method
Technical Field
The invention belongs to the technical field of blockchains and the Internet of things, and particularly relates to a sharing economic account-dividing and checking method based on blockchains.
Background
Shared economies, also known as collaborative consumption or shared economies, are an economic model that allows individuals and businesses to share, exchange, and rent goods, services, data, and other resources through an online platform. Such modes typically rely on technology, particularly the mobile internet and social networks, to facilitate efficient allocation and utilization of resources. The core concept of the sharing economy is to maximize the utilization efficiency of resources, reduce waste and create value for participants, and the sharing economy has wide application in various fields including transportation, accommodation, finance, life service and the like.
The sharing economy breaks through the traditional ownership concept, emphasizes the importance of the usage rights, and enables users to enjoy more resources and services at lower cost. However, as the economies of sharing continue to evolve, new problems and challenges also emerge.
Because of the numerous participants in the shared economy, including resource providers, platform operators, service consumers, etc., each transaction involves the benefit distribution of multiple parties, and the rapid growth of the shared economy platform brings about the user rights and interests protection problems of personal information security, deposit risks, social benefits, etc. The supervision lag of the shared economic platform, legal blind areas, imperfection of personal credit system and the like, the relationship among different stakeholders is complex, and the benefit distribution and responsibility definition become difficult; the traditional reconciliation system mainly relies on a centralized database and a manual processing mode, so that transparency and credibility of transaction data are difficult to guarantee, financial risks and management cost are increased, and therefore, the invention provides a block chain-based sharing economic reconciliation method.
Disclosure of Invention
The invention aims to provide a block chain-based sharing economic account-dividing and checking method, which can ensure transparency and credibility of transaction data and reduce financial risk and management cost.
The technical scheme adopted by the invention is as follows:
the shared economic account-dividing and checking method based on the blockchain is characterized by comprising the following steps of:
Step 1, constructing a alliance chain on a blockchain platform and setting a central account, wherein the alliance chain respectively builds nodes by a plurality of preset subjects to form account relations between the central account and the plurality of preset subjects, setting corresponding alliance chain rules based on the account relations, and introducing a consensus mechanism on the basis of the alliance chain, wherein the consensus mechanism adopts a PoS+ PBFT algorithm and is used for maintaining the data consistency of all nodes of the blockchain;
step 2, defining business logic and rules between the central account and a plurality of preset subjects, and signing contracts in a blockchain platform in the form of intelligent contracts;
Step 3, the preset main body uploads the acquired data to the blockchain platform through an intelligent chip through a data acquisition module of the preset main body to acquire a consumption order on the blockchain platform;
Step 4, the blockchain platform divides the amount of the consumption order into corresponding bank accounts of the preset main body under the blockchain platform, generates transaction receipt on the chain of the blockchain platform, and generates account balance of corresponding quantity;
Step 5, submitting corresponding rendering orders on the chain by the preset main body according to account balances, conducting transaction rendering by a plurality of preset main bodies according to a blockchain platform, and completing bank transfer in response to the central account under the blockchain, wherein the blockchain platform realizes verification of two rendering records on the blockchain platform and under the blockchain platform based on a zero knowledge proof algorithm;
Step 6, after the verification in the step 5 is successful, destroying the balance of the account, and finally completing intelligent account separation and account checking;
And 7, if the preset main body is changed, returning to the step 2 again, redefining service logic and rules, and re-signing a new contract in the form of an intelligent contract in the blockchain platform.
Preferably, in the step1, the plurality of preset subjects include a shared device producer, a shared device consumer, a site provider, a platform operator and a financial institution;
The servers of the shared equipment producer, the shared equipment consumer and the site provider are respectively used as core nodes on the blockchain to form a core node set of shared economy;
The consensus mechanism adopts a strategy of combining a pos+ PBFT algorithm, particularly a dynamic random weighted PoS algorithm, with a Bayesian fault tolerance PBFT algorithm.
Preferably, in the step 1, in the process that the consensus mechanism adapts to the variation of the preset main body and the variation of the network topology by using a pos+ PBFT algorithm, the blockchain platform screens part of the preset main body as a candidate verifier according to account balance, time, liveness and reputation value held by the preset main body as a node;
the dynamic random weighting pos algorithm comprises the following specific steps:
the candidate verifiers are differentiated into groups, nodes with different account balance holding amounts in each group are randomly weighted, weighted scores of each node are ordered, cumulative probability is distributed to each node, and final verifiers are determined by generating random numbers, wherein a dynamic random weighting formula meets the following relation:
;
in the formula, Representing the weighted score of the node(s),The weight coefficients of each factor are represented separately,Representing the account balance held by the node,Indicating the time of the node's hold,Indicating the liveness of the node,Representing a reputation score of a node;
Presetting a fixed period, re-acquiring a verifier after each period is finished, and setting a cooling period for nodes of the verifier.
Preferably, the Bayesian fault tolerance PBFT algorithm comprises three stages, namely, a preparation stage, a submitting stage and a submitting stage, wherein the Bayesian fault tolerance comprises three stages, the preparation stage comprises the steps that a master node creates a transaction proposal according to a received transaction request and broadcasts the transaction proposal to all verifier nodes, the preparation stage comprises the steps that all verifier nodes verify the transaction in the proposal after receiving the proposal of the master node, respond to the verification, the alternative nodes sign the proposal and broadcast the proposal to other nodes, and the submitting stage comprises the steps of when the alternative nodes receive enough signature acknowledgements of other nodes, namely, the proposal is agreed, writing the transaction records into respective local account books by all nodes, broadcasting acknowledgement messages and ending the round of consensus;
In each round of consensus, one node of a plurality of verifiers is selected in turn as a master node according to a preset sequence, and the main responsibility of the master node comprises collecting transactions in a network and packing the transactions into new blocks, broadcasting the new blocks to other verifiers for verification, serving as an initiator responsible for starting each stage, advancing and coordinating the consensus process, and triggering a standby node mechanism by a blockchain platform if the master node fails to complete the main responsibility in the consensus process, and selecting the new master node to continue the round of consensus.
Preferably, the intelligent contract in the step 2 comprises contract signing, account dividing proportion setting, order processing mechanism and contract updating mechanism;
The structure of the order data of the intelligent contract is stored in the form of a byte sequence, wherein the byte sequence is [ state, amount, account dividing proportion, date, equipment ID, first merchant, second merchant, third merchant, expansion and check bit ], and the length of the order data is 32 bytes.
Preferably, in the step 4, in the process of generating account balances of corresponding numbers on the blockchain, the account balances are specifically distributed according to a distribution proportion set in the intelligent contract, and transferred into accounts corresponding to the blockchain of the preset main body, and transaction receipt is generated;
The transaction receipt information comprises a transaction hash, a transaction state, a block hash and a block number, a contract address, a log, a transaction receipt information and a transaction receipt information, wherein the transaction hash is used as a unique identifier of a transaction;
The account balance is generated through multiparty signature confirmation, and an asymmetric encryption algorithm and a distributed account book technology are used in the transfer process, so that the preset main body can receive the account balance of the due share.
Preferably, in the step 5, the specific steps of implementing reconciliation and synchronization of two presentment records on and under the blockchain platform by the blockchain platform based on the zero knowledge proof algorithm are as follows:
step a, acquiring a present order generated on a chain, wherein the present order comprises an order amount, an acceptance account, an order ID and an on-chain transaction hash;
step b, completing the off-chain bank transfer by the central account, and generating transfer information, wherein the transfer information comprises transfer amount, a transfer receiving account, transfer ID and off-chain transfer hash;
And c, generating random challenges by the intelligent contracts on the chain, sending the random challenges to the central account, generating responses by the central account according to bank transfer data, carrying out response verification on the basis of a zero knowledge proof algorithm on the chain, and confirming that the order is completed on the chain after the verification is successful.
Preferably, the blockchain platform respectively acquires the transaction receipt between the central account and the preset main body according to a preset time period, and carries out audit, and in the process of carrying out transaction audit verification, a real-time transaction receipt verification monitoring system is specifically built, abnormal orders are acquired and processed, and the account balance is used for tracing, so that tracing and audit are completed.
Preferably, in the step 5, in the transaction presenting process of each preset main body according to the blockchain platform, a tcc transaction management unit is specifically constructed, and the tcc transaction management module includes a Try unit, a Confirm unit and a cancer unit;
Firstly, starting a Try unit, wherein a user applies for presenting, and four branch transactions are generated, namely checking bill consistency, determining the available state of a collection account, reserving balance on a destroying chain of an intelligent contract, and reserving a presented amount by a bank;
If all branch transactions of the Try unit are successfully executed, starting to execute a Confirm unit, wherein the Confirm unit destroys the balance on the chain and transfers money to the bank, and triggering contracts after the bank transfer action destroys the balance on the chain through the Event;
and if any branch transaction in the Try unit executes errors, triggering the cancer unit, rolling back all branch transactions, and reserving resources for release.
Preferably, in the step 6, the account balance is introduced into a multi-step verification mechanism when the balance on the chain is processed, presented and destroyed, and the account balance is not regenerated after being destroyed;
the verification mechanism comprises identity verification, transaction execution and log record;
the authentication is before any lift-off and on-chain balance destruction operations begin;
The transaction verification comprises balance verification and transaction examination, wherein the balance verification comprises the steps of obtaining the current balance of a preset main body on a blockchain and comparing the current balance with a request for providing the cash amount, the transaction examination comprises the step of examining and confirming the transaction according to a device provider, and the verification transaction parameters comprise a receiver bank account and a transfer cash amount.
The invention has the technical effects that:
According to the invention, a PoS+ PBFT consensus mechanism is realized for the transfer of accounts under the chain and the balance on the chain through the intelligent contract, a preset consensus protocol can be automatically executed, and the consensus result is recorded on the chain without manual intervention, so that the running efficiency and accuracy of the system are greatly improved, the possibility of human errors is reduced, and the high efficiency of the account dividing and checking process is ensured.
According to the invention, by introducing the TCC distributed transaction management scheme and the consensus mechanism, the system can improve the accounting efficiency, thereby accurately separating accounts, and can cope with the change of the participants and the change of the network topology structure, and the stability and the reliability of the system are maintained. This provides higher extensibility and adaptability for the shared economic platform, and can support a wider business scenario and more participants.
The invention stores the structure of the order data of the intelligent contract in the form of byte sequence, wherein the byte sequence is [ state, amount, account dividing proportion, date, equipment ID, first merchant, second merchant, third merchant, expansion and check bit ], the length of the order data is 32 bytes, the bit number occupied by each byte is [8 bits, 24 bits, 8 bits, 32 bits, 16 bits, 80 bits and 8 bits ], and the bit numbers occupied by each byte are multiples of 8 bits, so that the updated bill data is 240 bits in total and is smaller than the bit number of one storage tank, and the data is ensured to be effectively compressed in 32 bytes. Compactly compressing order information in a single storage tank simplifies the data reading and processing flow. Compared with the complex operation of multi-slot scattered storage, the system can complete the inquiry and processing of order data only by reading once. This improves query efficiency, reduces delays, and is particularly noticeable when large amounts of order data are read and processed frequently.
According to the invention, the blockchain platform realizes account checking and synchronization of two presentation records accounts on the blockchain platform and under the blockchain platform based on a zero knowledge proof algorithm. The block chain application scene is innovatively provided, all transaction data are recorded and stored on the decentralized distributed account book, the transaction data are non-tamper-proof, the integrity and the safety of the data are ensured, the tracing and auditing efficiency is improved, and the risks of data tampering and information leakage in a traditional system are eliminated.
Drawings
FIG. 1 is a system block diagram of a blockchain-based shared economic ledger method of the present invention;
FIG. 2 is a schematic diagram of a configuration of a consumer order in a blockchain-based shared economic accounting method of the present invention.
Detailed Description
The present invention will be specifically described with reference to examples below in order to make the objects and advantages of the present invention more apparent. It should be understood that the following text is intended to describe only one or more specific embodiments of the invention and does not limit the scope of the invention strictly as claimed.
As shown in fig. 1, the blockchain-based shared economic ledger method includes the following steps:
Step 1, constructing a alliance chain on a blockchain platform, setting a central account, respectively building nodes by the alliance chain through a plurality of preset subjects to form account relations between the central account and the plurality of preset subjects, setting corresponding alliance chain rules based on the account relations, and introducing a consensus mechanism on the basis of the alliance chain, wherein the consensus mechanism adopts a PoS+ PBFT algorithm and is used for maintaining data consistency of all nodes of the blockchain;
in step 1 of the present embodiment, the plurality of preset principals include a shared device producer, a shared device consumer, a site provider, a platform operator, and a financial institution;
Servers of a shared equipment producer, a shared equipment consumer and a site provider are respectively used as core nodes on a blockchain to form a core node set of shared economy;
further illustratively, the central account includes, but is not limited to, adjusting account balances, deploying smart contracts, and permissions as device producer accounts.
The federation chain rules include, but are not limited to, rules for decision making mechanisms, membership, roles and responsibilities, joining and exiting processes, consensus mechanisms, intelligent contract management, dispute resolution mechanisms, security and privacy policies, incentive mechanisms, transparency and auditing, technical governance, business management, and risk management.
Further, the invention sets an administrator role in the blockchain platform, and the responsible content comprises the online of new equipment in the system, the management of account information of equipment providers and participants, and the signing and updating of equipment contracts.
Further, a federated chain is a form of blockchain that is commonly participated in management by multiple organizations or organizations, each organization or organization managing one or more nodes whose data only allows for reading, writing and sending by different organizations within the system. This blockchain consensus process is controlled by preselected nodes, and therefore is also referred to as a license chain (PermissionedBlockchain). The alliance chain is characterized by partial decentralization, strong controllability, no default disclosure of data and high transaction speed. The system requires the participating main body to authenticate through a safe identity verifier when the node is established, thereby determining the legitimacy of the node and the safety of the system, and introducing a consensus mechanism on the basis of a alliance chain to cope with the change of the participating side and the change of a network topological structure. The consensus mechanism adopts a strategy of combining PoS+ PBFT algorithm, particularly dynamic random weighted PoS with Bayesian fault tolerance PBFT, and in the invention, a practical Bayesian fault tolerance consensus algorithm (PBFT) is introduced for ensuring the stability and the safety of a blockchain network, PBFT is suitable for a smaller-scale alliance chain network, and can efficiently process the consensus process under the condition of certain trust among nodes.
In the step 1, in the process that the consensus mechanism adapts to the variation of a preset main body and the variation of a network topology structure by adopting a PoS+ PBFT algorithm, the blockchain platform screens part of the preset main body as a candidate verifier according to account balance, time, liveness and reputation value held by the preset main body as a node;
the dynamic random weighted PoS algorithm (DWR-PoS) comprises the following specific steps:
the candidate verifiers are differentiated into groups, nodes with different account balance holding amounts in each group are randomly weighted, weighted scores of each node are ordered, cumulative probability is distributed to each node, and final verifiers are determined by generating random numbers, wherein a dynamic random weighting formula meets the following relation:
;
in the formula, Representing the weighted score of the node(s),The weight coefficients of each factor are represented separately,Representing the account balance held by the node,Indicating the time of the node's hold,Indicating the liveness of the node,Representing a reputation score of a node;
Presetting a fixed period, re-acquiring a verifier after each period is finished, and setting a cooling period for nodes of the verifier.
Preferably, the Bayesian fault tolerance PBFT algorithm comprises three stages, namely, using the Bayesian fault tolerance, wherein a preparation stage comprises the steps of creating a transaction proposal by a master node according to a received transaction request and broadcasting the transaction proposal to all verifier nodes, the preparation stage comprises the steps of verifying the transaction in the proposal by all verifier nodes after receiving the proposal of the master node, signing the proposal by an alternative node and broadcasting the proposal to other nodes in response to the verification passing, and the submission stage comprises the steps of writing the transaction record into respective local account books by all nodes when the alternative node receives enough signature confirmation of the other nodes, namely, achieving consensus for the proposal, broadcasting a confirmation message and ending the round of consensus;
In each round of consensus, one node of a plurality of verifiers is selected in turn as a master node according to a preset sequence, and the main responsibility of the master node comprises collecting transactions in a network and packing the transactions into new blocks, broadcasting the new blocks to other verifiers for verification, serving as an initiator responsible for starting each stage, advancing and coordinating the consensus process, and triggering a standby node mechanism by a blockchain platform if the master node fails to complete the main responsibility in the consensus process, and selecting the new master node to continue the round of consensus.
In each round of formula, one node in the verifier pool is selected in turn as a master node according to a preset sequence, and the master node has the main roles of collecting transactions in a network, packaging the transactions into new blocks, broadcasting the new blocks to other verifiers for verification, and serving as an initiator responsible for starting each stage to advance and coordinate formula processes.
Further described, in response to the primary node failing to complete primary responsibility in the consensus process, the system triggers a standby node mechanism to select a new primary node to continue the round of consensus.
Further, the Bayesian fault tolerance formula algorithm has fault tolerance limitation including tolerance of preset number of malicious nodes, and ensuring that the system can normally operate if three times of preset number plus 1 verifier node are provided in the system.
Step 2, defining business logic and rules between the central account and a plurality of preset subjects, and signing contracts in a block chain platform in the form of intelligent contracts;
the intelligent contract in the step 2 comprises the steps of signing the contract, setting the account dividing proportion, an order processing mechanism and a contract updating mechanism so as to improve the flexibility and adaptability of the contract, responding to the contract change, determining that the benefits of all preset main bodies are not damaged, and providing a clear communication mechanism so as to ensure smooth transition;
The structure of the order data of the intelligent contract is stored in the form of a byte sequence, wherein the byte sequence is [ state, amount, account dividing proportion, date, equipment ID, first merchant, second merchant, third merchant, expansion and check bit ], and 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, 16 bits, 80 bits, 8 bits ], and the number of bits occupied by each byte is multiple of 8 bits, so that the total number of bits of updated bill data is 240 bits, which is smaller than the number of bits of a storage tank, and the effective compression of the data in 32 bytes is ensured.
Referring to FIG. 2, specifically, the structure of order data for a received consumption order is shown.
It should be noted that the form of the consumption order in the blockchain system is defined asAnd inquiring according to the date.
Contract content includes, but is not limited to, billing proportion, contract validation date, order processing mechanism, contract update mechanism, and the like.
It can be appreciated that the preset body contracts with each device through an intelligent contract, and the intelligent contract has high flexibility and expandability and can be adjusted according to the needs of the participants. When the contract is changed, the contract version and the contract update date are automatically updated. The benefits of all the participants are not damaged, and a clear communication and transition mechanism is provided through intelligent contracts, so that the stable operation of the system is ensured.
Further, the efficiency of the revenue generated by the sharing equipment in the process of account separation and checking among the participating principals is improved, and the problems of mutual trust and safety in the process of account separation and checking are solved through the mode of two sets of accounts on line and off line. The decentralization, non-tampering and transparency of the blockchain ensure the safe storage and the credible reconciliation of the transaction data of the sharing device. The automatic execution of the intelligent contract improves the efficiency and accuracy of the accounting and settlement, and meanwhile, the efficient exception handling and traceability of the blockchain ensures the stability of the system and the fair benefits of the participants. The characteristics make this system be superior to traditional account checking mode in sharing economy obviously, have promoted holistic security, transparency and trust.
Step 3, the preset main body uploads the acquired data to the blockchain platform through the intelligent chip through the data acquisition module of the preset main body to acquire a consumption order on the blockchain platform;
Step 4, the blockchain platform divides the amount of the consumption order into corresponding bank accounts of a preset main body under the blockchain platform, generates transaction receipts on the chain of the blockchain platform, and generates account balances with corresponding quantity;
In the step 4, in the process of generating account balances of corresponding quantity on the blockchain, the specific account balances are subjected to account dividing according to the account dividing proportion set in the intelligent contract, transferred into accounts corresponding to the preset main body blockchain, and transaction receipt is generated;
The transaction receipt information comprises a transaction hash, a transaction state, a block hash and a block number, a contract address, a log and a transaction receipt information, wherein the transaction hash is used as a unique identifier of a transaction;
The account balance is generated through multiparty signature confirmation, and in the transfer process, an asymmetric encryption algorithm and a distributed account book technology are used to ensure transaction privacy and non-falsifiability so as to ensure that all the account balances which enable a preset main body to timely and accurately receive the corresponding shares.
Further, after account separation, the preset main body submits the account balance, the submitted orders are submitted on the chain, at the moment, two orders exist on the chain, one is a consumption order produced by equipment, the other is the submitted order of the preset main body, the submitted orders are checked based on zero knowledge proof, and in the checking process, if an abnormal order appears, the abnormal order is audited and traced by an under-chain auditor. And the specific tracing process is like distributed tcc transaction management in the step 7, which is beneficial to tracing abnormal orders.
In this embodiment, the distributed ledger technique applied is the basis of a blockchain for recording and managing all transaction data. Asymmetric encryption algorithm, wherein asymmetric encryption uses a pair of keys, a public key and a private key, to encrypt and decrypt data and a hash algorithm. Asymmetric encryption in account balance transfers, a user signs a transaction using a private key, which can be verified with a corresponding public key, thereby ensuring legitimacy 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, is irreversible, and can perform data integrity verification. During the transfer, a hash value of the transaction data is stored on the blockchain. All transaction data in a block is hashed to generate a hash value (Merkle root) and stored in the block header. If there is any tampering with the transaction data, the hash value will change, so that tampering is easily detected.
Further, the distributed ledger technique is commonly maintained by a plurality of nodes, each node in the blockchain network maintaining a complete ledger copy. Each block in the blockchain contains the hash value of the previous block, which forms an indivisible chain. Any block of data falsification can cause chain breakage and cannot pass consensus verification. By the distributed ledger technique, transaction data is distributed across multiple nodes, ensuring transparency and non-tamper resistance of the transaction records, while ensuring data consistency.
Step 5, submitting corresponding rendering orders on the chain by the preset main body according to account balances, conducting transaction rendering by a plurality of preset main bodies according to a blockchain platform, and completing bank transfer in response to the central account under the blockchain, wherein the blockchain platform realizes verification of two rendering records on the blockchain platform and under the blockchain platform based on a zero knowledge proof algorithm;
Further illustratively, zero-knowledge proof (Zero-KnowledgeProof, ZKP), which is a cryptographic technique, is employed in this embodiment to allow one party to prove to another party that a statement is correct without providing any information other than the statement's correctness. This technique can prove the correctness of a certain problem without revealing a specific secret, and thus has an important value in terms of privacy protection.
Further, the zero knowledge proof obtains the hash value of the order data based on the chain through the central account, the central account transfers accounts, and obtains the hash value of the transfer data based on the bank transfer data under the chain, so as to obtain the encryption data.
In this embodiment, the hash values on the chain and the hash values off the chain are generated by using the SHA-256 hash algorithm, and it is to be noted that 16-system numbers of 32 bytes of the hash values on the chain and the hash values off the chain are converted into decimal numbers, so that large prime numbers and generating elements are further obtained, and the mutual quality is guaranteed.
Specifically, the encrypted data satisfies the following relation:
P=gs-modG;
Where P represents encrypted data, G s represents a private key that generates the power of the element G, and modG represents the operation of modulo G.
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.
Specifically, the temporary value satisfies the following relation:
R=grmodG;
Where R represents a temporary value, g r represents a random number R to be the power of the generator g, and modG represents a modulo operation.
A random challenge c is generated on the chain, and a corresponding challenge is generated under the chain, so that a response result z is obtained.
Specifically, the response results satisfy the following relation:
z=(r+c*s)mod(G-1);
Where z represents the response, r represents a random number, c represents a random challenge, s represents a private key, mod (G-1) represents performing a modulo G-1 operation.
And (3) carrying out verification on the chain, wherein the verification meets the following relation:
gz-modG=(R*Pc)modG;
Where G z denotes a response result of the power of the generator G, modG denotes an operation of the line mode G, R denotes a temporary value, P c denotes a random challenge of the power of the encrypted data P, and modG denotes an operation of the line mode.
Further, the correctness of the calculation under the verification chain in the zero knowledge proof is calculated by power operation, and the detailed calculation process is a well-known technology in the art and will not be described in detail.
In response to the equation being established, the in-chain transfer data is consistent with the in-chain transaction receipt data, and the order verification is passed, otherwise, the data is inconsistent, and the order verification fails.
The consistency of the data is verified only on the chain through zero knowledge proof, the actual bank transfer is not displayed on the chain, meanwhile, the verification process prevents tampering of the data under the chain, random numbers are generated on the chain, counterfeit data cannot be prepared in advance, the safety of the data is improved, complex calculation is performed under the chain, verification of the data is only performed on the chain, data calculation and storage are reduced, and response rate is improved.
Further, after the zero knowledge proof is finished, the online and offline withdrawal actions are consistent, a complete withdrawal process is obtained, and if the zero knowledge proof verification passes, the account balance of the central account on the chain is destroyed, and the withdrawal order mark is finished.
In the transaction extraction process of each preset main body according to the blockchain platform, a tcc transaction management unit is specifically constructed, and the tcc transaction management module comprises a Try unit, a Confirm unit and a cancer unit;
Firstly, starting a Try unit, wherein a user applies for presenting, and four branch transactions are generated, namely checking bill consistency, determining the available state of a collection account, reserving balance on a destroying chain of an intelligent contract, and reserving a presented amount by a bank;
If all branch transactions of the Try unit are successfully executed, the Confirm unit starts to be executed, balance and bank transfer on a destroying chain are carried out by the Confirm unit, and after balance on the destroying chain is destroyed by the bank transfer action, contracts are triggered to be realized by an Event;
and if any branch transaction in the Try unit executes errors, triggering the cancer unit, rolling back all branch transactions, and reserving resources for release.
Specifically, the distributed transaction management scheme is implemented as follows:
Trial phase (TryPhase):
When a user initiates a presentation request, the system first enters the try phase. The blockchain platform performs the following operations:
(1) Checking whether the balance of the user account is sufficient, and ensuring the validity of the present amount.
(2) And locking the balance on the chains of the corresponding quantity in the user account, and preventing the repeated withdrawal or double payment.
(3) Funds are reserved in the under-chain financial system to ensure that the under-chain funds are sufficient to support the cash-out operation.
(4) A temporary pick-up order is generated and the current system state is recorded for status confirmation or rollback in a later stage.
Confirmation phase (ConfirmPhase):
If all operations of the try phase are successfully completed, the system enters the confirm phase to formally execute the presenting operation. The specific operation comprises the following steps:
(1) Destroying the balance on the chain locked before, reducing the balance quantity on the chain in the user account, and updating the account record on the chain.
(2) Triggering bank transfer operation, and transferring the reserved cash withdrawal funds into a bank account appointed by a user.
(3) Transaction credentials are generated and stored in the system for subsequent auditing and auditing use.
(4) And the consistency of the chain upper account book and the chain lower account book is ensured, and the synchronization of the chain upper account book and the chain lower account book is realized.
Cancel stage (CANCELPHASE):
if any operation of the try phase fails, or the user cancels the request for proposal before the confirm phase, the system enters the cancel phase, and all operations before the cancel are cancelled, and the specific operations comprise:
(1) And unlocking the balance lock on the chain, and recovering the balance quantity on the chain in the user account to the original state.
(2) And canceling the reserved funds of the bank and releasing the corresponding amount in the under-chain financial system.
(3) Deleting the temporarily generated rendering order, and rolling back the system state to the state before the rendering request, so as to ensure the consistency of the system data.
(4) The recovery of the user account and the system account is ensured, and any inconsistency or data loss is prevented.
Step 6, after the verification in the step 5 is successful, destroying the balance of the account, and finally completing intelligent account separation and account checking;
in the step 6, introducing a multi-step verification mechanism to ensure the legality of operation when the account balance is processed to present and destroy the balance on the chain, wherein the account balance is not regenerated after being destroyed at the same time, so as to ensure the stability of the account balance supply;
The verification mechanism comprises identity verification, transaction execution and log record;
Authentication is before any presentment and on-chain balance destruction operations begin to ensure that an authorized user can initiate presentment operations;
The transaction verification comprises balance verification and transaction examination, wherein the balance verification comprises the steps of obtaining the current balance of a preset main body on a blockchain and comparing the current balance with a request for the withdrawal amount to ensure that the balance of a user is enough to cover the operation, the transaction examination comprises the step of examining and confirming the transaction according to a device provider, and the transaction examination comprises the step of verifying transaction parameters including a receiver bank account and a transfer amount.
The method comprises the steps of generating a cash-making order in a checking system, specifically, enabling current cash-making order state information to be transferred, simultaneously sending tokens corresponding to cash-making quantity to a blockchain account of a central account holder, enabling a central account holder login system to receive the cash-making order sent by the cash-making side to be transferred, enabling the balance of the tokens of the blockchain account to be correspondingly increased, enabling the central account holder to transfer a bank account of the cash-making side within a set time, enabling the central account holder to upload a transfer certificate in the system after the transfer is completed, enabling the current cash-making order state to be changed into 'to be confirmed', enabling the checking system to automatically apply a zero knowledge proof algorithm to check whether the bank information is consistent with the information of the cash-making order in the system, enabling the cash-making side to check the certificate in the system after the transfer certificate is uploaded and the system checking is passed, enabling the cash-making side to check the cash-making side to click a 'cash-made' button, enabling the cash-making order to be marked as 'finished' after the cash-making button is clicked, enabling the balance of the tokens corresponding to the cash-making account in the blockchain account of the central account holder to be destroyed after the cash-making side is completed, enabling the balance of the account-making quantity of the tokens corresponding to be transferred and enabling the cash-making quantity to be consistently not consistent.
And 7, if the preset main body is changed, returning to the step 2 again, redefining service logic and rules, and re-signing a new contract in the form of an intelligent contract in the blockchain platform.
According to the invention, the blockchain platform respectively acquires the transaction receipt between the central account and the preset main body according to the preset time period, and carries out audit, and in the process of carrying out transaction audit verification, a real-time transaction receipt verification monitoring system is specifically built, abnormal orders are acquired and processed, and the account balance is used for tracing and auditing, so that tracing and auditing are completed.
In the invention, the transaction receipt of the central account and the transaction receipt of the preset main body are respectively acquired according to the preset time period, and in the process of transaction verification, a real-time transaction receipt verification monitoring system is specifically established, abnormal orders are acquired and processed, account balance is used for tracing, and the integrity of related metadata and event records on a regional chain is required to be ensured so as to support completion of tracing and auditing.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention. Structures, devices and methods of operation not specifically described and illustrated herein, unless otherwise indicated and limited, are implemented according to conventional means in the art.

Claims (10)

1. The shared economic account-dividing and checking method based on the blockchain is characterized by comprising the following steps of:
Step 1, constructing a alliance chain on a blockchain platform and setting a central account, wherein the alliance chain respectively builds nodes by a plurality of preset subjects to form account relations between the central account and the plurality of preset subjects, setting corresponding alliance chain rules based on the account relations, and introducing a consensus mechanism on the basis of the alliance chain, wherein the consensus mechanism adopts a PoS+ PBFT algorithm and is used for maintaining the data consistency of all nodes of the blockchain;
step 2, defining business logic and rules between the central account and a plurality of preset subjects, and signing contracts in a blockchain platform in the form of intelligent contracts;
Step 3, the preset main body uploads the acquired data to the blockchain platform through an intelligent chip through a data acquisition module of the preset main body to acquire a consumption order on the blockchain platform;
Step 4, the blockchain platform divides the amount of the consumption order into corresponding bank accounts of the preset main body under the blockchain platform, generates transaction receipt on the chain of the blockchain platform, and generates account balance of corresponding quantity;
Step 5, submitting corresponding rendering orders on the chain by the preset main body according to account balances, conducting transaction rendering by a plurality of preset main bodies according to a blockchain platform, and completing bank transfer in response to the central account under the blockchain, wherein the blockchain platform realizes verification of two rendering records on the blockchain platform and under the blockchain platform based on a zero knowledge proof algorithm;
Step 6, after the verification in the step 5 is successful, destroying the balance of the account, and finally completing intelligent account separation and account checking;
And 7, if the preset main body is changed, returning to the step 2 again, redefining service logic and rules, and re-signing a new contract in the form of an intelligent contract in the blockchain platform.
2. The method for checking out the blockchain-based shared economic ledger of claim 1, wherein in the step 1, the plurality of preset subjects include a shared device producer, a shared device consumer, a site provider, a platform operator and a financial institution;
The servers of the shared equipment producer, the shared equipment consumer and the site provider are respectively used as core nodes on the blockchain to form a core node set of shared economy;
The consensus mechanism adopts a strategy of combining a pos+ PBFT algorithm, particularly a dynamic random weighted PoS algorithm, with a Bayesian fault tolerance PBFT algorithm.
3. The method for sharing and economic accounting according to claim 2, wherein in the step 1, the consensus mechanism uses pos+ PBFT algorithm to adapt to the variation of the preset body and the variation of the network topology, and the blockchain platform screens part of the preset body as a candidate verifier according to account balance, time, liveness and reputation value held by the preset body as a node;
the dynamic random weighting pos algorithm comprises the following specific steps:
the candidate verifiers are differentiated into groups, nodes with different account balance holding amounts in each group are randomly weighted, weighted scores of each node are ordered, cumulative probability is distributed to each node, and final verifiers are determined by generating random numbers, wherein a dynamic random weighting formula meets the following relation:
;
in the formula, Representing the weighted score of the node(s),The weight coefficients of each factor are represented separately,Representing the account balance held by the node,Indicating the time of the node's hold,Indicating the liveness of the node,Representing a reputation score of a node;
Presetting a fixed period, re-acquiring a verifier after each period is finished, and setting a cooling period for nodes of the verifier.
4. The blockchain-based shared economic ledger method is characterized in that the blockchain-based shared economic ledger method comprises the specific steps of using a Bayesian fault tolerance PBFT algorithm, wherein the Bayesian fault tolerance comprises three stages, namely, a preparation stage, a candidate node, a submitting stage and a submitting stage, wherein the main node creates a transaction proposal according to a received transaction request and broadcasts the transaction proposal to all verifier nodes, the preparation stage, the all verifier nodes verify the transaction in the proposal after receiving the proposal of the main node, signature and broadcast the proposal to other nodes by the candidate node in response to the verification passing, and the submitting stage, when the candidate node receives a sufficient number of signature acknowledgements of the other nodes, namely, the proposal is agreed, writes transaction records of all nodes into respective local ledgers, broadcasts acknowledgement messages and ends the round of consensus;
In each round of consensus, one node of a plurality of verifiers is selected in turn as a master node according to a preset sequence, and the main responsibility of the master node comprises collecting transactions in a network and packing the transactions into new blocks, broadcasting the new blocks to other verifiers for verification, serving as an initiator responsible for starting each stage, advancing and coordinating the consensus process, and triggering a standby node mechanism by a blockchain platform if the master node fails to complete the main responsibility in the consensus process, and selecting the new master node to continue the round of consensus.
5. The method for checking the shared economic ledger based on blockchain as set forth in claim 1, wherein the intelligent contracts in step 2 include contracting, setting a ledger ratio, an order processing mechanism and a contract updating mechanism;
The structure of the order data of the intelligent contract is stored in the form of a byte sequence, wherein the byte sequence is [ state, amount, account dividing proportion, date, equipment ID, first merchant, second merchant, third merchant, expansion and check bit ], and the length of the order data is 32 bytes.
6. The method for sharing and economic accounting according to claim 1, wherein in the step 4, in the process of generating account balances with corresponding quantity on the blockchain, the account balances are specifically checked according to the account checking proportion set in the intelligent contract, transferred into the account corresponding to the preset main body blockchain, and transaction receipt is generated;
The transaction receipt information comprises a transaction hash, a transaction state, a block hash and a block number, a contract address, a log, a transaction receipt information and a transaction receipt information, wherein the transaction hash is used as a unique identifier of a transaction;
The account balance is generated through multiparty signature confirmation, and an asymmetric encryption algorithm and a distributed account book technology are used in the transfer process, so that the preset main body can receive the account balance of the due share.
7. The method for reconciliation of the shared economic ledger based on blockchain of claim 1, wherein in step 5, the blockchain platform realizes the reconciliation and synchronization of two presentation records ledgers on and under the blockchain platform based on a zero knowledge proof algorithm as follows:
step a, acquiring a present order generated on a chain, wherein the present order comprises an order amount, an acceptance account, an order ID and an on-chain transaction hash;
step b, completing the off-chain bank transfer by the central account, and generating transfer information, wherein the transfer information comprises transfer amount, a transfer receiving account, transfer ID and off-chain transfer hash;
And c, generating random challenges by the intelligent contracts on the chain, sending the random challenges to the central account, generating responses by the central account according to bank transfer data, carrying out response verification on the basis of a zero knowledge proof algorithm on the chain, and confirming that the order is completed on the chain after the verification is successful.
8. The method for reconciliation of the economic share account based on blockchain as set forth in claim 1, wherein the blockchain platform obtains and audits the transaction receipt between the central account and the preset body according to a preset time period.
9. The method for sharing and economic accounting according to claim 1, wherein in the step 5, each preset body specifically builds a tcc transaction management unit in the transaction presentation process according to a blockchain platform, and the tcc transaction management module comprises a Try unit, a Confirm unit and a cancer unit;
Firstly, starting a Try unit, wherein a user applies for presenting, and four branch transactions are generated, namely checking bill consistency, determining the available state of a collection account, reserving balance on a destroying chain of an intelligent contract, and reserving a presented amount by a bank;
If all branch transactions of the Try unit are successfully executed, starting to execute a Confirm unit, wherein the Confirm unit destroys the balance on the chain and transfers money to the bank, and triggering contracts after the bank transfer action destroys the balance on the chain through the Event;
and if any branch transaction in the Try unit executes errors, triggering the cancer unit, rolling back all branch transactions, and reserving resources for release.
10. The method for reconciliation of the shared economic ledger based on blockchain of claim 1, wherein in step 6, the account balance is processed to present and destroy the balance on the chain, a multi-step verification mechanism is introduced, and the account balance is not regenerated after being destroyed;
the verification mechanism comprises identity verification, transaction execution and log record;
the authentication is before any lift-off and on-chain balance destruction operations begin;
The transaction verification comprises balance verification and transaction examination, wherein the balance verification comprises the steps of obtaining the current balance of a preset main body on a blockchain and comparing the current balance with a request for providing the cash amount, the transaction examination comprises the step of examining and confirming the transaction according to a device provider, and the verification transaction parameters comprise a receiver bank account and a transfer cash amount.
CN202510756935.0A 2025-06-09 2025-06-09 Sharing economy account reconciliation method based on blockchain Pending CN120317872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510756935.0A CN120317872A (en) 2025-06-09 2025-06-09 Sharing economy account reconciliation method based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510756935.0A CN120317872A (en) 2025-06-09 2025-06-09 Sharing economy account reconciliation method based on blockchain

Publications (1)

Publication Number Publication Date
CN120317872A true CN120317872A (en) 2025-07-15

Family

ID=96333488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510756935.0A Pending CN120317872A (en) 2025-06-09 2025-06-09 Sharing economy account reconciliation method based on blockchain

Country Status (1)

Country Link
CN (1) CN120317872A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694669A (en) * 2018-07-18 2018-10-23 矩阵元技术(深圳)有限公司 A kind of block chain intelligence contract implementation method and device
CN108876572A (en) * 2018-05-29 2018-11-23 阿里巴巴集团控股有限公司 The account checking method and device, electronic equipment of block chain transaction
CN109493062A (en) * 2018-12-29 2019-03-19 中国科学院合肥物质科学研究院 A kind of block chain common recognition method proved based on prestige equity
CN110009493A (en) * 2019-03-13 2019-07-12 浙江大学 Alliance Chain Course Token Settlement Method and System Applied to Educational Resource Transactions
CN114936852A (en) * 2022-05-23 2022-08-23 东南大学 Zero-knowledge proof-based alliance chain account model privacy token transaction method
CN115271696A (en) * 2022-07-11 2022-11-01 上海柚子工道物联技术有限公司 Alliance chain-based account splitting method and device and electronic equipment
CN115293901A (en) * 2022-08-15 2022-11-04 中国工商银行股份有限公司 Block chain capacity expansion method and device
CN116739577A (en) * 2023-06-14 2023-09-12 中国工商银行股份有限公司 Cross-border payroll processing method and device based on alliance chain

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876572A (en) * 2018-05-29 2018-11-23 阿里巴巴集团控股有限公司 The account checking method and device, electronic equipment of block chain transaction
CN108694669A (en) * 2018-07-18 2018-10-23 矩阵元技术(深圳)有限公司 A kind of block chain intelligence contract implementation method and device
CN109493062A (en) * 2018-12-29 2019-03-19 中国科学院合肥物质科学研究院 A kind of block chain common recognition method proved based on prestige equity
CN110009493A (en) * 2019-03-13 2019-07-12 浙江大学 Alliance Chain Course Token Settlement Method and System Applied to Educational Resource Transactions
CN114936852A (en) * 2022-05-23 2022-08-23 东南大学 Zero-knowledge proof-based alliance chain account model privacy token transaction method
CN115271696A (en) * 2022-07-11 2022-11-01 上海柚子工道物联技术有限公司 Alliance chain-based account splitting method and device and electronic equipment
CN115293901A (en) * 2022-08-15 2022-11-04 中国工商银行股份有限公司 Block chain capacity expansion method and device
CN116739577A (en) * 2023-06-14 2023-09-12 中国工商银行股份有限公司 Cross-border payroll processing method and device based on alliance chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李发根等: "现代密码学理论", 30 November 2022, 国防工业出版社, pages: 154 - 156 *
罗世刚等: "区块链技术-在分布式电源领域的应用研究", 31 October 2021, 兰州大学出版社, pages: 38 *

Similar Documents

Publication Publication Date Title
CN109377198B (en) Signing system based on multi-party consensus of alliance chain
CN109314636B (en) Cryptographic method and system for secure extraction of data from blockchains
CN109741068B (en) Online banking cross-row signing method, device and system
CN114329529A (en) Asset data management method and system based on block chain
CN113439281A (en) Digital legal currency
CN110572262A (en) Block chain alliance chain construction method, device and system
CN107070938A (en) Data access control system based on block chain
CN113065961A (en) A power block chain data management system
WO2021008453A1 (en) Method and system for offline blockchain transaction based on identifier authentication
CN112801778B (en) Alliance type bad asset block chain system
CN113360861B (en) Mortgage loan oriented decentralized identity method based on repeater cross-chain
CN108898495A (en) A kind of finance and money management confirmation of responsibility method based on block chain
CN111523892B (en) A method and device for cross-chain transaction of blockchain
WO2018088475A1 (en) Electronic authentication method and program
CN108876669A (en) Course notarization system and method applied to multi-platform shared education resources
CN115688191A (en) Block chain-based electronic signature system and method
CN114240614B (en) Financial business testing method and device based on blockchain, and electronic equipment
CN114266069A (en) House transaction electronic data sharing system and method based on block chain technology
CN113409154A (en) Credible storage-based liability insurance processing method and system
DE102022107718A1 (en) Issuing a digital credential for an entity
CN112669037A (en) Block chain construction method based on copyright transaction, copyright transaction system and method
CN109146684B (en) Decentralized transaction verification method
CN114565485A (en) Labor contract management method and system based on block chain ipfs storage
US20240249275A1 (en) Group signatures for a smart wallet on a blockchain platform
CN115705601A (en) Data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载