A blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism
By adopting a multi-level belief Byzantine consensus mechanism and smart contracts in the living payment system, the problems of cumbersome payment processes, low security and insufficient information transparency in the existing payment system are solved, achieving a safer, more transparent and efficient payment experience. .
Patent Information
- Application Number
- CN202410373523.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-03-29
AI Technical Summary
The existing living payment system has problems such as cumbersome payment process, low security, insufficient information transparency and cross-platform incompatibility, which affects the user experience.
Adopt a blockchain life document payment method based on a multi-level trust Byzantine consensus mechanism, generate master keys and certificates through elliptic curve digital signature algorithms, and combine smart contracts and side chain anchoring mechanisms to achieve automated payment and real-time verification to ensure data integrity Security and transparency.
It improves the security and transparency of the payment system, reduces payment costs, simplifies the payment process, enhances users' trust in the payment system, and reduces the risk of single points of failure in the system.
Smart Images

Figure CN118154177B
Abstract
Description
Technical Field
[0001] The present invention relates to the payment and life bill payment application field of blockchain technology, and specifically to a blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism. Background Art
[0002] The market demand for life payment is diversified, and users are eager for a convenient, transparent and secure payment experience. However, users are still facing some problems in life payment. Users often fail to pay bills in time due to negligence or forgetfulness, resulting in service interruption or overdue fees. Information about bill details, fee changes, etc. may not be transparent enough, and users find it difficult to obtain clear information. There may be risks in payment security. Some payment platforms may have security loopholes, making users' personal information or payment information vulnerable to attack and theft. Sometimes payment may take a long time to process, resulting in bills not being settled in time, affecting users' credit records or service use. In addition, if users need to make payments on different payment platforms, they may encounter cross-platform incompatibility issues, which increases the complexity of management and use. In general, traditional life payment solutions have problems such as cumbersome payment processes, long payment cycles, low payment security, and the need to remember a large amount of account information. These problems combined may affect users' payment experience.
[0003] The current receipt payment system in the industry usually uses mobile payment applications and third-party payment platforms. Mobile payment applications complete payment functions through users' mobile phones or other mobile devices, relying on payment channels such as bank cards, Alipay, and WeChat to realize fund circulation. The third-party payment platform serves as an intermediary platform connecting merchants and users, providing payment interfaces, bill management and other services. However, this system has the hidden dangers of man-in-the-middle attacks in the payment process, the risk of personal information leakage, the opacity of the payment process, and the cumbersome payment process.
[0004] Blockchain technology is a reliable, tamper-proof, jointly maintained anonymous database that solves the problems of the current bill payment system through its decentralization, distributed storage, encryption security and smart contracts. It provides a more secure, transparent and efficient payment solution, ensuring the security and transparency of the payment process by recording all transaction information on an unalterable blockchain. Smart contracts can automatically execute the payment process, simplify the payment process and reduce payment costs. The decentralized nature of blockchain reduces the possibility of single point failures and improves the robustness and stability of the payment system.
[0005] The consensus algorithm is the core of blockchain technology, which can ensure that all nodes reach consensus on transactions and status updates, prevent double payments and resist malicious attacks. PoW (proof of work algorithm), PoS (professional proof algorithm), DPoS (trusted fair proof algorithm), BFT (Byzantine fault tolerance algorithm), PBFT (practical Byzantine fault tolerance algorithm) and other consensus mechanisms have been proposed for blockchain. Different consensus algorithms have different computational costs, information security and consensus efficiency. Practical Byzantine Fault Tolerance is a classic distributed system consistency algorithm, which is now widely used in alliance blockchains. The present invention proposes a blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism. Summary of the invention
[0006] In order to solve the shortcomings of the prior art, the present invention proposes a blockchain life receipt payment method based on a multi-level trusted Byzantine consensus mechanism, which is used to solve at least one technical problem in the background technology.
[0007] The present invention relates to a blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism, which is characterized by comprising the following steps.
[0008] Deploy life bill payment on a blockchain based on a multi-level trusted Byzantine consensus mechanism for bill management and automated payment. Users, regulators, third-party payment platforms and service providers serve as blockchain network nodes.
[0009] The elliptic curve digital signature algorithm generates a master key and certificate for the user, which is used to create bills and store data. Bill payment requires the user's private key signature, and the blockchain node verifies the digital signature based on the user's digital certificate.
[0010] The user's life bill is deployed on the smart contract, combining users, regulatory agencies, third-party payment platforms and related service providers to create a smart contract with multi-party constraints;
[0011] Based on the sidechain anchoring mechanism, a policy state sidechain is established, and smart contracts are deployed to the sidechain network for real-time verification. The sidechain execution rules include a multi-level trusted Byzantine consensus mechanism with users, third-party payment platforms and related service providers as verification nodes.
[0012] The multi-level trusted Byzantine consensus mechanism combines the confidence dynamic grouping algorithm with the longest chain election algorithm to improve the Byzantine consensus. It implements confidence grouping through node evaluation selection, elects a leader in each group based on the longest chain, implements multi-group collaboration and dynamic updates;
[0013] This approach provides a blockchain-based policy verification service, enabling third-party access control through smart contracts and zero-knowledge proofs on the blockchain.
[0014] Preferably, the smart contract method on the blockchain includes:
[0015] The service provider deploys the bill to the smart contract, verifies that the policy information matches the generated unique hash value, and then publishes the smart contract through the blockchain. The smart contract is called to start data storage and query operations. The smart contract will record all operations on the data, including storage, modification, and query, in the time log to ensure the authenticity and traceability of the data.
[0016] Service providers need to obtain authorization from users to modify the terms or information on user bills, and only make changes within a pre-agreed designated area. At the same time, the time log in the smart contract records the data modification to achieve traceability and transparency of data modification;
[0017] As a preferred approach, real-time verification strategies on blockchain include:
[0018] Establish a policy state sidechain to achieve real-time verification and deploy smart contracts to the sidechain network, where the sidechain execution rules include a multi-level trusted Byzantine consensus mechanism with users, third-party payment platforms, service providers and regulators as verification nodes;
[0019] Service providers use users on the main chain as side chains to establish bill status channels, specifically recording real-time changes in bill status, and achieve real-time tracking and recording of bill status;
[0020] Regulators run dedicated regulatory smart contracts to track specific regulatory policy data on the side chain in real time around the clock. Once a user or service provider modifies the policy, the smart contract will automatically synchronize the new status to the regulatory node.
[0021] As a preferred method, the multi-level trusted Byzantine consensus mechanism on the blockchain includes:
[0022] Based on the Byzantine fault tolerance algorithm, combined with the confidence dynamic grouping algorithm and the longest chain election algorithm;
[0023] Divide blockchain nodes into consensus nodes, application nodes, and candidate nodes to improve consensus efficiency;
[0024] Consensus nodes store all the data of the blockchain and reach consensus on transactions, and are deployed at top-ranked large service providers and regulators;
[0025] Application nodes are deployed at each service provider and do not participate in consensus, but only synchronize and verify data;
[0026] When a new round of consensus begins, the candidate node replaces the node that participated in the previous round of consensus, and its role changes from candidate node to consensus node, thus realizing dynamic authorization of node participation in consensus.
[0027] The election of candidate nodes adopts the longest chain election rule. At the beginning of each round of consensus, the leader node is elected based on the latest local node and the block height, and the leader node with the largest height is selected. The election of honest nodes as leaders avoids the interference of Byzantine nodes and combines a dynamic node list to replace the consensus nodes participating in the previous round.
[0028] The confidence algorithm of the multi-level trusted Byzantine consensus mechanism is mainly implemented by evaluating and selecting proxy nodes. When entering the view replacement mechanism, each group node will perform proxy node evaluation on other nodes. The nodes in each group can evaluate one node in the group and multicast the evaluation to all other nodes in the group. Over a period of time, all nodes will collect the evaluation results of other nodes. The evaluation conclusion of one node is the evaluation result of all nodes in the group. The statistical formula is as follows:
[0029]
[0030] In the above formula, is the evaluation result of node i, n is the number of nodes in the group participating in the evaluation, k is the number of nodes in the group participating in the evaluation, is the reliability of node k, It is the evaluation of node k on node i. The evaluation is divided into "appropriate", "inappropriate" and "none", and the corresponding values are 1, -1 and 0 respectively. The node with the highest evaluation result becomes the proxy node.
[0031] Preferably, the third-party access control method on the blockchain includes:
[0032] A third party can connect to the blockchain as a lightweight node, interact with the blockchain through an interface, directly query the policy transaction records on the blockchain, and verify the existence and validity of the policy and the digital signature in the transaction;
[0033] Third parties implement access control through encryption technologies such as smart contracts and zero-knowledge proofs on blockchain;
[0034] After the user selects the policy and disclosure content, the data is encrypted and sent to the verification server through smart contracts using technologies such as zero-knowledge proof;
[0035] The third party verifies the authenticity and validity of the data through the transaction verification ID obtained by the smart contract;
[0036] The third party queries the policy transaction records on the blockchain through the platform interface and interacts with the verification server to obtain encrypted data;
[0037] After obtaining the data, the third party will return the verification results to the policyholder and the insurance company. The verification results include information such as the validity, integrity, and access records of the data.
[0038] Users and service providers can audit third-party access records to ensure that their behavior complies with regulations and protects user privacy and data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flowchart of blockchain digital identity authentication and side chain smart contract deployment of the present invention;
[0040] Figure 2 It is a flow chart of the automatic payment method of the present invention;
[0041] Figure 3 This is a flow chart of the multi-level trusted Byzantine consensus mechanism of the present invention. DETAILED DESCRIPTION
[0042] The present application is further described below in conjunction with the accompanying drawings.
[0043] The present invention provides an embodiment:
[0044] like Figure 1 The blockchain digital identity authentication and side chain smart contract deployment described in the present invention have the following specific steps:
[0045] Step 1: User completes identity verification
[0046] Step 2: The elliptic curve digital signature algorithm generates a master key and certificate for the user
[0047] Use the elliptic curve digital signature algorithm to generate a pair of public and private keys (U_PK, U_SK) and a public key certificate U_Cert for the user; use a one-way hash algorithm to calculate a string from the user's public key as the user's account address U_address, where the private key known to the user corresponds to the password of the traditional authentication system;
[0048] Send the public key U_PK, private key U_SK, digital certificate U_Cert and account address U_address to the user through a secure channel to form the user's registration information {U_PK, U_SK, U_Cert, U_Address};
[0049] Step 3: Store user information as structured data fields and record them in a linked list
[0050] The user's life receipt data is stored as structured data fields and recorded in a linked list in sequence. Each node contains a structured data field of a receipt. Through the link relationship of the linked list, it can be accessed and traced in chronological order.
[0051] Step 4: Pack the data into a new block, and the consensus mechanism ensures that the new block is added to the chain
[0052] Step 5: Create smart contracts with users, regulators, third-party payment platforms and related service providers
[0053] The service provider deploys the billing information to the smart contract, which contains user information, time logs, automatic payment rules, digital signature records, review trigger mechanisms, etc.
[0054] During the bill deployment process, the smart contract must verify whether the policy information matches the generated unique hash value to ensure the integrity and consistency of the bill information. After the verification is passed, the smart contract will be published through the blockchain network;
[0055] Step 6: Deploy the smart contract to the sidechain
[0056] Deploy the written smart contract to the side chain and ensure that the contract can be executed correctly, verifying the consistency and security of the smart contract in the side chain and the main chain data.
[0057] like Figure 2 The specific steps of the automatic payment method described in this embodiment are as follows:
[0058] Users set up automatic payment rules, which trigger automatic payment conditions on specific dates or when a specific consumption amount is reached;
[0059] When the automatic payment conditions are triggered, the smart contract automatically triggers a review to ensure the legality and accuracy of the payment conditions;
[0060] Dynamically matching applicable payment terms based on user-set rules, the smart contract calls the API of the relevant service provider to verify the validity of the relevant document information;
[0061] After the information is verified, the smart contract automatically generates a bill, which contains the details of the fees to be paid and related information. The service provider creates a bill for the user on the blockchain. The platform has the private key and writes the life bill and related information into the user's account with the user's public key as the recipient;
[0062] Service providers, users, regulators, and third-party payment platforms digitally sign transaction documents to ensure that all parties agree to the bill content and payment matters. The transaction includes relevant information such as the payment recipient address and payment amount. The blockchain node verifies the validity of the transaction digital signature based on the user's digital certificate.
[0063] The user pays the generated bill. After the payment is completed, the bill takes effect, the payment is transferred, and the relevant records are permanently stored on the blockchain for subsequent auditing and tracing.
[0064] like Figure 2 The hierarchical trusted Byzantine consensus mechanism described in this embodiment has the following specific steps:
[0065] Step 1: Confidence grouping formation
[0066] This step includes process C01, which groups the nodes in the network into small groups according to the confidence dynamic grouping algorithm, so that the nodes in each group have similar confidence, ensuring that the nodes in each group have similar behavior and performance during the consensus process;
[0067] Step 2: Group leader election
[0068] This step includes process C02, in each group, a node is selected as the leader node through the longest chain election algorithm. This node will be responsible for leading the consensus process and proposing new blocks;
[0069] Leader nodes from different groups can collaborate with each other to reach consensus through messaging and negotiation, thus ensuring the consistency and security of the entire network;
[0070] Step 3: Node consensus
[0071] This step includes processes C03, C04, C05, C06, C07, and C08, and specifically includes the following contents:
[0072] Process C03: The client sends a transaction request to the consensus network
[0073] Client c sends <REQUEST, m, c, t> to the first-layer proxy to request the consortium chain to execute the request, where REQUEST represents the message sent by the client, m is a specific message, c is the client address, and t is a timestamp;
[0074] When a client sends a request message to the consortium chain, it only sends messages to x representative nodes, where x represents the number of data packets preset in the model. If the total number of consensus nodes in the blockchain system is less than or equal to the number of data packets x, there is no need to search for proxy nodes in layers;
[0075] Process C04: Proxy node broadcasts client request
[0076] The proxy node will send messages to all nodes except the region<PRE-PREPARE,v,n,d,m,p> , where PRE-PREPARE represents the information sent by the client, v is the current view number, n is the sequence number of the request message, d is the hash (data summary) of m, m is the content of the message requested by the client, p is the proxy node, and replica i confirms the hash data and the proxy node data and then accepts the message;
[0077] Process C05, send a preparation message and write to the log
[0078] All nodes in the region receive the pre-prepared message multicast by the proxy node<PRE-PREPARE,v,n,d,m,p> and performs a check verification, then each node will go to all other nodes in the package, the node sends a ready message<PREPARE,v,n,d,i> It enters the prepare phase and writes the prepare message to its local message log, where PREPARE represents the information sent by the client, v is the current view number, n is the sequence number of the request message, d is the hash (data digest) of m, and i is the sequence number of the node;
[0079] Process C06, node i checks to be true and receives 2f+1 messages
[0080] Node i sends to other group nodes<COMMIT,v,n,d,i,p> , where COMMIT represents the information sent by node i, v is the current view number, n is the sequence number of the request message, d is the hash (data digest) of m, i is the sequence number of the node, p is the proxy node, the commit area (v, n, d, i, p) of group node i is checked to be true, and i has received 2f+1 identical confirmation messages including itself;
[0081] Process C07: The replica node writes the confirmation message to the log
[0082] If the confirmation conditions are met, the replica node writes a confirmation message in the message log;
[0083] Process C08: All nodes in the data packet return the voting results in the data packet to the proxy node, and the proxy node sends the consensus results of the nodes in the area to the client.
[0084] All nodes in the data packet return the internal voting results of the data packet to the proxy node, and the proxy node sends the consensus results of the nodes in the area to the client. The client can determine whether it has received the consensus result based on whether the total number of received REPLY messages is greater than f+1;
[0085] The client assigns weights to different confidence groups based on the different confidence groups represented by different proxy nodes, and assigns lower weights to low-confidence groups. Reliable groups can be assigned higher weights, and finally a consistency result based on confidence is calculated;
[0086] Step 4: The client confirms whether to accept the consensus
[0087] This step includes process C09. If the client accepts the consensus, it goes to step 5. If the client does not accept the consensus, it goes to step 3.
[0088] Step 5: Update confidence and regroup
[0089] This step includes process C10, which dynamically updates the confidence according to the behavior and performance of the nodes and regroups them according to the new situation to maintain the stability and reliability of the system.
[0090] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0091] Compared with the prior art, the present invention has at least the following beneficial effects:
[0092] Enhanced security: The Byzantine consensus mechanism can effectively deal with malicious behavior and network attacks of nodes, ensuring the security of transactions;
[0093] Trust building: A multi-level trust mechanism can be built on different levels of trust, including trust between nodes and trust in the system as a whole, thereby increasing users’ trust in the life bill payment system;
[0094] Decentralized features: The decentralized nature of blockchain technology ensures the distribution and censorship resistance of the life bill payment system. There is no single central control agency, which reduces system risks.
[0095] Transparency and traceability: Transaction records on the blockchain cannot be tampered with, and every participant can view and verify the transaction, which helps prevent fraud.
[0096] Through the above description, the technicians clearly understand that the present invention is implemented by combining software with necessary general hardware platforms. Based on this understanding, the key technical parts of the present invention can be embodied in the form of software products and stored in various storage media, such as ROM / RAM, disks, optical disks, etc. The software includes a series of instructions that enable a computer device (such as a personal computer, server or network device, etc.) to execute the methods of various embodiments or partial embodiments of the present invention.
[0097] The above disclosures are only several specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be thought of by a person skilled in the art should fall within the protection scope of the present invention. The above serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the implementation scenarios.
Claims
1. A blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism, used for bill management and to help automate bill payment. It is characterized in that The following steps are involved: A. Users, regulators, third-party payment platforms and service providers become blockchain network nodes after completing digital identity verification; B. Elliptic curve digital signature algorithm generates master keys and certificates for users, which are used to create bills and store data. Bill payment requires the user's private key signature, and the blockchain node verifies the validity of the digital signature based on the user's digital certificate. C. Create smart contracts with multi-party constraints by combining users, regulators, third-party payment platforms and service providers; D. Based on the sidechain anchoring mechanism, a policy state sidechain is established, and smart contracts are deployed to the sidechain network for real-time verification. The sidechain execution rules include a multi-level trusted Byzantine consensus mechanism with users, third-party payment platforms and service providers as verification nodes; E. Multi-level Confidence Byzantine Consensus Mechanism Based on the Byzantine consensus mechanism, it combines the confidence dynamic grouping algorithm with the longest chain election algorithm, realizes confidence grouping through node evaluation selection, elects a leader in each group based on the longest chain, implements multi-group collaboration and dynamic updates; F. This method provides blockchain-based policy verification services and implements third-party access control through smart contracts and zero-knowledge proofs on the blockchain; This method adopts the Byzantine consensus mechanism based on multi-level confidence, combining the confidence dynamic grouping algorithm with the longest chain election algorithm in the Byzantine fault tolerance algorithm. The process includes: Process 1: Confidence group formation According to the confidence dynamic grouping algorithm, the nodes in the network are grouped, and the nodes in each group have similar confidence, ensuring that the nodes in each group have similar behavior and performance during the consensus process; Process 2: Group leader election In each group, a node is selected as the leader node through the longest chain election algorithm. This node will be responsible for leading the consensus process and proposing new blocks. Process 3: Multi-group collaboration Leader nodes from different groups collaborate with each other to reach consensus through messaging and negotiation, ensuring the consistency and security of the entire network; Process 4: Dynamic Update During the consensus process, the confidence is dynamically updated based on the behavior and performance of the nodes, and they are regrouped according to new situations to maintain the stability and reliability of the system; The multi-level trusted Byzantine consensus mechanism divides blockchain nodes into consensus nodes, application nodes, and candidate nodes to improve consensus efficiency; Consensus nodes store all blockchain data and reach transaction consensus, and are deployed at large service providers and regulators; application nodes are deployed at each service provider, do not participate in consensus, and only synchronize and verify data; When a new round of consensus begins, the candidate node replaces the node that participated in the previous round of consensus, and its role changes from candidate node to consensus node, thus realizing dynamic authorization of node participation in consensus. The election of candidate nodes adopts the longest chain election rule. At the beginning of each round of consensus, the leader node is elected based on the latest local node and the block height, and the leader node with the largest height is selected. The election of honest nodes as leaders avoids the interference of Byzantine nodes and combines a dynamic node list to replace the consensus nodes participating in the previous round. The confidence algorithm of the multi-level trusted Byzantine consensus mechanism is implemented by evaluating and selecting proxy nodes. When entering the view replacement mechanism, each group node will perform proxy node evaluation on other nodes. The nodes in each group can evaluate one node in the group and broadcast the evaluation results to all other nodes in the group. Over a period of time, all nodes will collect the evaluation results of other nodes. The evaluation conclusion of one node is the evaluation result of all nodes in the group. The statistical formula is as follows: In the above formula, Result i is the evaluation result of node i, n is the number of nodes participating in the evaluation in the group, k is the number of nodes in the group participating in the evaluation, Conf i is the reliability of node i, Conf k is the reliability of node k, Rate k It is the evaluation of node k on node i. The evaluation results are divided into "appropriate", "inappropriate" and "none", and the corresponding values are 1, -1 and 0 respectively. The node with the highest evaluation result becomes the proxy node.
2. According to the blockchain life bill payment method based on the multi-level trusted Byzantine consensus mechanism of claim 1, It is characterized in that include: After verifying the user's identity, the elliptic curve digital signature algorithm is run to generate the master key and public parameters. A pair of public and private keys (U_PK, U_SK) and a public key certificate U_Cert are generated for the user. A one-way hash algorithm is used to calculate a string from the user's public key as the user's account address U_address. The private key known to the user corresponds to the password of the traditional authentication system. The public key U_PK, private key U_SK, digital certificate U_Cert and account address U_address are then sent to the user through a secure channel. The user's registration information is represented as {U_PK, U_SK, U_Cert, U_Address}.
3. According to the blockchain life bill payment method based on the multi-level trusted Byzantine consensus mechanism of claim 1, It is characterized in that include: The service provider creates a bill for the user on the blockchain and writes the life bill and related information into the user's account with the user's public key as the recipient. The platform owns the private key, and the user's life bill data is stored as a structured data field and recorded in a linked list in sequence; Transactions on the blockchain are controlled and traced back to specific users. Automatic payment requires the user's private key to sign the transaction, and the blockchain node verifies the digital signature based on the user's digital certificate. Users set automatic payment rules. On a specific date or when a specific consumption amount is reached, the smart contract automatically triggers a review, matches the payment terms, and calls the service provider's API to verify the document information. After approval, the smart contract will automatically generate a document bill. The bill will take effect on the chain after being digitally signed by all parties, realizing automatic digital life document payment. Throughout the process, the blockchain encryption mechanism protects user privacy and data security.
4. According to the blockchain life bill payment method based on the multi-level trusted Byzantine consensus mechanism of claim 1, It is characterized in that include: The service provider deploys the bill to the smart contract, verifies that the policy information matches the generated unique hash value, and then publishes the smart contract through the blockchain. The smart contract is called to start data storage and query, and the data is authentic and traceable. When a service provider modifies the terms or information of a user's bill, it must obtain the user's authorization and can only make changes within a pre-agreed designated area, and add a time log to the smart contract to record the modification data.
5. According to the blockchain life bill payment method based on the multi-level trusted Byzantine consensus mechanism of claim 1, It is characterized in that include: This method establishes a policy state side chain to achieve real-time verification and deploys smart contracts to the side chain network, where the side chain execution rules include a multi-level trusted Byzantine consensus mechanism with users, third-party payment platforms, service providers and regulators as verification nodes; Service providers use users on the main chain as side chains to establish billing status channels, specifically recording real-time changes in billing status; Regulators run dedicated regulatory smart contracts to track specific regulatory policy data on the side chain in real time around the clock. Once a user or service provider modifies the policy, the smart contract will automatically synchronize the new status to the regulatory node.
6. According to the blockchain life bill payment method based on the multi-level trusted Byzantine consensus mechanism of claim 1 or claim 4, It is characterized in that include: The confidence-based dynamic grouping Byzantine fault-tolerant consensus mechanism includes the following steps: Step 1: Request The client sends a transaction request to the consensus network. Client c sends <REQUEST, m, c, t> to the first-layer proxy to request the consortium chain to execute the request, where REQUEST represents the message sent by the client, m is a specific message, c is the client address, and t is a timestamp; When the client sends a request message to the consortium chain, it only sends messages to x representative nodes, where x represents the number of data packets preset in the model. If the total number of consensus nodes in the blockchain system is less than or equal to the number of data packets x, there is no need to search for proxy nodes in layers; Step 2: Pre-preparation The proxy node will send messages to all nodes except the region<PRE-PREPARE,v,n,d,m,p> , where PRE-PREPARE represents the information sent by the client, v is the current view number, n is the sequence number of the request message, d is the hash of m, that is, the data summary, m is the content of the message requested by the client, p is the proxy node, and the replica node i confirms the hash data and the proxy node data and accepts the message; Step 3: Preparation All nodes in the region receive the pre-prepared message broadcast by the proxy node<PRE-PPREPARE,v,n,d,m,p> And check and verify, then each node forwards the message to all other nodes in the area, and the node sends a preparation message<PREPARE,v,n,d,i> It enters the preparation phase and writes the preparation message to its local message log, where PREPARE represents the information sent by the client, v is the current view number, n is the sequence number of the request message, d is the hash of m, that is, the data summary, and i is the sequence number of the node; Step 4: Submit At the beginning of the confirmation phase, node i sends a<COMMIT,v,n,d,i,p> , where COMMIT represents the information sent by node i, v is the current view number, n is the sequence number of the request message, d is the hash of m, that is, the data summary, i is the sequence number of the node, and p is the proxy node. When the commit area (v, n, d, i, p) of group node i is checked to be true, and node i has received 2f+1 identical confirmation messages including itself, the confirmation condition is met. At this time, replica node i writes a confirmation message in the message log; Step 5: Reply All nodes in the data packet return the internal voting results of the data packet to the proxy node. The proxy node sends the node consensus results in the area to the client. The client determines whether it has received the consensus result based on whether the total number of received REPLY messages is greater than f+1. Due to the existence of the grouping and confidence model, a large number of nodes do not need to send reply messages to the client at this stage. The client can assign weights to different confidence groups based on the different confidence groups represented by different proxy nodes, and assign lower weights to low-confidence groups, while reliable groups are given higher weights. Finally, the consistency result based on confidence is calculated. The client and the entire blockchain obtain the consensus result with higher confidence and obtain the next round of consensus.
7. According to claim 1, a blockchain life bill payment method based on a multi-level trusted Byzantine consensus mechanism provides a policy verification service based on blockchain, and realizes third-party access control through smart contracts and zero-knowledge proof on blockchain. It is characterized in that include: The third party connects to the blockchain as a lightweight node, interacts with the blockchain through an interface, directly queries the policy transaction records on the blockchain, and verifies the existence and validity of the policy and the digital signature in the transaction; The third party implements access control through smart contracts and zero-knowledge proof encryption technology on the blockchain. The user selects the policy and disclosure content, encrypts the data through the smart contract, and sends the encrypted data to the verification server. After the third party obtains the transaction verification ID, it queries the blockchain and server through the platform interface and provides the verification result. Users and service providers review third-party access records to ensure that their behavior complies with regulations and protects user privacy and data security.
