Blockchain-based bill cosigning method, device and system
By using witness and authentication layer nodes in the blockchain network to perform consistency verification and authentication operations on the countersigned information, the problem of low efficiency in sequential countersigning by multiple countersigning parties is solved, and efficient countersigning by multiple countersigning parties at the same time is realized.
Patent Information
- Application Number
- CN202310447189.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-04-24
AI Technical Summary
In existing technologies, multiple parties can only sign off sequentially, resulting in low efficiency when multiple parties are involved.
The witness layer nodes in the blockchain network perform consistency verification on the countersigned information. When the consistency verification is successful, the countersigned information is sent to the authentication layer nodes to generate authentication information. When the authentication layer nodes receive a dispute evidence request, they perform authentication operations and synchronize the results to all nodes in the blockchain network.
It improves the efficiency and reliability of bill countersigning, enabling multiple parties to countersign simultaneously.
Smart Images

Figure CN116668073B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and can also be used in the financial field, specifically to a blockchain-based bill signing method, device, and system. Background Technology
[0002] With the development of computer information technology, online co-signing technology has become increasingly mature. Online co-signing technology allows co-signing parties to complete the process anytime, anywhere using their respective terminal devices, eliminating the need for face-to-face co-signing at a designated location, thus providing convenience for the co-signing parties.
[0003] In existing technologies, a one-to-one countersigning model is typically adopted between the contracting party and the countersigning party. When there are multiple countersigning parties, the next countersigning party can only countersign after the previous countersigning party has completed the countersigning.
[0004] Because existing technologies allow multiple parties to sign off sequentially rather than simultaneously, the efficiency of signing off is low when multiple parties are involved. Summary of the Invention
[0005] To address the problems in the existing technology, this application provides a blockchain-based method, apparatus, and system for bill countersigning, which can effectively improve the efficiency and reliability of bill countersigning.
[0006] To solve at least one of the above problems, this application provides the following technical solution:
[0007] Firstly, this application provides a blockchain-based method for countersigning invoices, applied to witness layer nodes in a blockchain network, the method comprising:
[0008] Receive the signing information sent by the signing participants' nodes and perform consistency verification on the signing information;
[0009] When the consistency verification result is passed, the countersigning information and the passing result of the consistency verification are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the passing result of the consistency verification and store it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs an authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0010] Furthermore, the consistency verification of the countersigned information includes:
[0011] Determine whether the content contained in the countersigning information is consistent with the content contained in the countersigning information of other corresponding countersigning participants in the blockchain network;
[0012] If yes, the consistency verification of the countersigned information is deemed to have passed; otherwise, the consistency verification of the countersigned information is deemed to have failed.
[0013] Secondly, this application provides a blockchain-based method for countersigning invoices, applied to authentication layer nodes in a blockchain network, the method comprising:
[0014] The system receives a dispute evidence submission request sent by a participating node in the joint signing process. Based on the node identifier of the participating node in the dispute evidence submission request, the system determines the corresponding authentication layer node and the authentication information stored locally by the authentication layer node. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating node and performing a consistency verification on the joint signing information. When the consistency verification result is passed, the system generates the joint signing information and the passing result of the consistency verification.
[0015] The authentication process is performed based on the evidence presented in the dispute's request for evidence and the locally stored authentication information. The authentication results are then synchronized to all nodes in the blockchain network.
[0016] Furthermore, synchronizing the authentication operation result to all nodes in the blockchain network includes:
[0017] The authentication operation result is sent to a designated aggregation layer node, so that after receiving authentication operation results from authentication layer nodes exceeding a certain percentage threshold, the aggregation layer node synchronizes the authentication operation result to all nodes in the blockchain network.
[0018] Furthermore, the blockchain network also includes a division-of-labor layer node, which is used to determine the node type of a new node joining the current blockchain, the method of which includes:
[0019] Receive an allocation request from a new node joining the current blockchain, and generate a random number based on the allocation request;
[0020] The new node's node type in the blockchain network is determined based on the result of the integrated calculation, which is based on the random number and the number of nodes in the division of labor layer.
[0021] Furthermore, the step of receiving the node list synchronization message request sent by the new node joining the current blockchain also includes:
[0022] When a node list synchronization message request is received from a new node joining the current blockchain, it is determined whether a node joining process already exists.
[0023] If so, an interrupt message is returned to the new node, so that the new node performs an interrupt operation after receiving the interrupt message, and resends the node list synchronization message request after waiting for a set period of time.
[0024] Further, generating a random number based on the allocation request includes:
[0025] Determine the respective proportions of the division-of-service layer nodes, witness layer nodes, and authentication layer nodes in the blockchain network;
[0026] A random number is determined based on the respective proportions of the division of labor layer nodes, witness layer nodes, and authentication layer nodes.
[0027] Further, determining the node type of the new node in the blockchain network based on the result of the integrated calculation includes:
[0028] The integration threshold is determined based on the node identifiers of the participating nodes and the sum of the distribution ratios of witness layer nodes and authentication layer nodes in the blockchain network.
[0029] The node type of the new node in the blockchain network is determined based on the numerical comparison between the integration threshold and the integration calculation result.
[0030] Further, before receiving the allocation request sent by the new node joining the current blockchain, the process includes:
[0031] Receive a node list synchronization message request sent by a new node joining the current blockchain, and return the node list and hierarchical information to the new node according to the node list synchronization message request.
[0032] Thirdly, this application provides a blockchain-based bill countersigning device, comprising:
[0033] The consistency verification module is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information.
[0034] The verification result sending module is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the consistency verification result is passed. This allows the authentication layer node to generate authentication information based on the countersigning information and the passing result of the consistency verification and store it locally. When the authentication layer node receives a dispute evidence submission request sent by a countersigning participant node, it performs an authentication operation based on the evidence submission content in the dispute evidence submission request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0035] Furthermore, the consistency verification module includes:
[0036] The content consistency judgment unit is used to determine whether the content contained in the countersigning information is consistent with the content contained in the countersigning information of other corresponding countersigning participants in the blockchain network.
[0037] The verification result unit is used to determine that the consistency verification of the countersigned information is passed if the result is yes, otherwise the consistency verification of the countersigned information is failed.
[0038] Fourthly, this application provides a blockchain-based bill countersigning device, comprising:
[0039] The evidence submission request receiving module is used to receive dispute evidence submission requests sent by participating nodes in the joint signing process. Based on the node identifier of the participating node in the dispute evidence submission request, the module determines the corresponding authentication layer node and the authentication information stored locally by the authentication layer node. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating nodes and performing consistency verification on the joint signing information. When the consistency verification result is passed, the module is generated from the joint signing information and the passing result of the consistency verification.
[0040] The authentication module is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network.
[0041] Furthermore, the authentication module includes:
[0042] The aggregation and statistics unit is used to send the authentication operation results to a designated aggregation layer node, so that after receiving authentication operation results from authentication layer nodes exceeding a certain proportion threshold, the aggregation layer node will synchronize the authentication operation results to all nodes in the blockchain network.
[0043] Fifthly, this application provides a blockchain-based bill countersigning device, comprising:
[0044] The allocation request receiving module is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request.
[0045] The node type determination module is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
[0046] Furthermore, the allocation request receiving module includes:
[0047] The node judgment unit is used to determine whether a node joining process already exists when a node list synchronization message request is received from a new node joining the current blockchain.
[0048] An interrupt operation unit is configured to return an interrupt message to the new node if the condition is met, so that the new node performs an interrupt operation upon receiving the interrupt message and resends the node list synchronization message request after waiting for a set time period.
[0049] Furthermore, the allocation request receiving module also includes:
[0050] The node proportion determination unit is used to determine the respective proportions of the division layer nodes, witness layer nodes, and authentication layer nodes in the blockchain network.
[0051] The random number generation unit is used to determine a random number based on the respective proportions of the division layer nodes, witness layer nodes, and authentication layer nodes.
[0052] Furthermore, the node type determination module includes:
[0053] The integration threshold determination unit is used to determine the integration threshold based on the node identifiers of the participating nodes and the sum of the allocation ratios of witness layer nodes and authentication layer nodes in the blockchain network.
[0054] The node type determination unit is used to determine the node type of the new node in the blockchain network based on the numerical comparison relationship between the integration threshold and the integration calculation result.
[0055] Furthermore, the allocation request receiving module also includes:
[0056] The message synchronization unit is used to receive node list synchronization message requests sent by new nodes joining the current blockchain, and return node list and hierarchical information to the new nodes according to the node list synchronization message requests.
[0057] Sixthly, this application provides a blockchain-based bill countersigning system, including witness layer nodes, authentication layer nodes, and division of labor layer nodes in the blockchain network;
[0058] The witness layer nodes include:
[0059] The consistency verification module is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information.
[0060] The verification result sending module is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the result of the consistency verification is passing.
[0061] The authentication layer nodes include:
[0062] The evidence submission request receiving module is used to receive dispute evidence submission requests sent by the participating nodes in the dispute evidence submission request, and determine the corresponding authentication layer node and the authentication information stored locally by the authentication layer node based on the node identifier of the participating node in the dispute evidence submission request.
[0063] The authentication module is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network.
[0064] The division of labor layer nodes include:
[0065] The allocation request receiving module is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request.
[0066] The node type determination module is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
[0067] In a seventh aspect, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the blockchain-based bill countersigning method.
[0068] Eighthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the blockchain-based bill countersigning method.
[0069] Ninthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the blockchain-based bill countersigning method.
[0070] As can be seen from the above technical solution, this application provides a blockchain-based bill countersigning method, apparatus, and system. It receives countersigning information sent by participating nodes and performs consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. The authentication layer node then generates authentication information based on the countersigning information and the successful consistency verification result and stores it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request from a participating node, it performs authentication based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning. Attached Figure Description
[0071] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 This is one of the flowcharts illustrating the blockchain-based bill countersigning method in this application embodiment;
[0073] Figure 2 This is the second flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0074] Figure 3 This is the third flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0075] Figure 4 This is the fourth flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0076] Figure 5 This is the fifth flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0077] Figure 6 This is the sixth flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0078] Figure 7 This is the seventh flowchart illustrating the blockchain-based bill countersigning method in this application embodiment;
[0079] Figure 8 This is one of the structural diagrams of the blockchain-based bill countersigning device in the embodiments of this application;
[0080] Figure 9 This is the second structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0081] Figure 10 This is the third structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0082] Figure 11 This is the fourth structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0083] Figure 12 This is the fifth structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0084] Figure 13This is the sixth structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0085] Figure 14 This is the seventh structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0086] Figure 15 This is the eighth structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0087] Figure 16 This is the ninth structural diagram of the blockchain-based bill countersigning device in the embodiments of this application;
[0088] Figure 17 This is a schematic diagram of a blockchain-based bill countersigning system as described in this application embodiment;
[0089] Figure 18 This is a schematic diagram of the structure of the electronic device in the embodiments of this application. Detailed Implementation
[0090] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0091] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0092] In view of the problems existing in the prior art, this application provides a blockchain-based bill countersigning method, apparatus and system. The method involves receiving countersigning information sent by participating nodes and performing consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. The authentication layer node then generates authentication information based on the countersigning information and the successful consistency verification result and stores it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request from a participating node, it performs authentication based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0093] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning method, applied to witness layer nodes in a blockchain network. (See also...) Figure 1 The blockchain-based bill countersigning method specifically includes the following:
[0094] Step S101: Receive the signing information sent by the participating nodes and perform consistency verification on the signing information.
[0095] Optionally, in this application, when a node initiates a multi-party signing, each participating node sends the signing information stored in its own node (including but not limited to: the IDs of each participating node, the complete information of the signing ticket, the signing content of each node, and the signing time of each node) to all witness layer nodes.
[0096] Optionally, in this application, each witness layer node compares the received countersigning information to ensure that:
[0097] (1) Receive the countersigning information messages of all participating countersigning nodes listed in the countersigning information message.
[0098] (2) All received countersigning information messages are consistent.
[0099] Step S102: When the consistency verification result is passed, the countersigning information and the consistency verification result are sent to the corresponding authentication layer node in the blockchain, so that the authentication layer node generates authentication information based on the countersigning information and the consistency verification result and stores it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0100] Optionally, in this application, if the comparison is successful, each witness layer node will send the complete countersigning information message received, along with the comparison result, to the corresponding authentication layer node.
[0101] Specifically, the calculation is based on the node information stored on the local node, using the following formula:
[0102]
[0103] Where, N a Given the current authentication layer's r value, find the r calculated when assigning nodes and the r calculated here. l The same node transmits information; if the comparison fails, the authentication is rejected.
[0104] Optionally, in this application, the authentication layer stores the received results locally (in case of different situations, the majority result shall prevail).
[0105] As described above, the blockchain-based bill countersigning method provided in this application can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0106] In one embodiment of the blockchain-based bill countersigning method of this application, see [link to relevant documentation]. Figure 2 The above step S101 may also specifically include the following:
[0107] Step S201: Determine whether the content contained in the countersigning information is consistent with the content contained in the countersigning information of other corresponding countersigning participants in the blockchain network.
[0108] Step S202: If yes, the consistency verification of the countersigned information is determined to be passed; otherwise, the consistency verification of the countersigned information is determined to be failed.
[0109] Optionally, in this application, when a node initiates a multi-party signing, each participating node sends the signing information stored in its own node (including but not limited to: the IDs of each participating node, the complete information of the signing ticket, the signing content of each node, and the signing time of each node) to all witness layer nodes.
[0110] Optionally, in this application, each witness layer node compares the received countersigning information to ensure that:
[0111] (1) Receive the countersigning information messages of all participating countersigning nodes listed in the countersigning information message.
[0112] (2) All received countersigning information messages are consistent.
[0113] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning method, applied to the authentication layer node in a blockchain network. See [link to relevant documentation]. Figure 3 The blockchain-based bill countersigning method specifically includes the following:
[0114] Step S301: Receive a dispute evidence submission request sent by a participating node in the joint signing process. Determine the corresponding authentication layer node and the authentication information stored locally by the authentication layer node based on the node identifier of the participating node in the dispute evidence submission request. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating node and performing a consistency verification on the joint signing information. When the consistency verification result is passed, it is generated from the joint signing information and the passing result of the consistency verification.
[0115] Optionally, in this application, in the event of a dispute, the parties providing evidence shall calculate the corresponding authentication layer node based on the IDs of the participating parties they propose, and obtain the stored countersigning information and authentication information from the corresponding authentication layer; if not found, they shall request the information from all authentication nodes.
[0116] Step S302: Perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and synchronize the authentication operation results to all nodes in the blockchain network.
[0117] Optionally, in this application, each authentication layer node receiving the request independently determines the dispute outcome based on its stored information and returns a result message. (The determination method involves checking whether the evidence presented by both parties in the dispute (a fixed-format message) is consistent with the information stored by the current authentication layer node. The message feedback result has two possibilities: consistent with the evidence presented by one party, or inconsistent with the evidence presented by both parties, and includes the content stored by the authentication layer within the message.) Simultaneously, each authentication layer node receiving the request sends the authentication result message to the aggregation layer node. The formula for calculating the aggregation layer node ID is:
[0118]
[0119] Among them, Nh k It is the kth aggregation layer node (there are multiple aggregation layer nodes; the exact number is determined when the blockchain is established. It can be a fixed value or a variable value calculated based on a fixed formula and the number of blockchain nodes; this scheme uses a fixed value, 3); N i N is the ID of the i-th authentication layer node that receives the request; a and N b These are the authentication layer numbers of both parties providing evidence (in scenarios involving three or more parties, include all of them); m k N is the offset of the k-th summary layer node; t It represents the total number of nodes.
[0120] Specifically, the results of the authentication layer nodes that exceed a certain proportion (currently, more than two-thirds is used in practice, but 100% can be required for higher standards) and are more numerous are taken as the standard for each aggregation layer. (Normally, it is sufficient to exceed a certain proportion, although this is almost impossible; however, there may be cases where one party deliberately makes fewer requests and some authentication layer nodes report incorrect results, so the party with more results is required to be valid.)
[0121] For example, if party A requests 12 nodes, 10 will respond "A's evidence is correct" and 2 will respond "B's evidence is correct," while party B requests 3 nodes, 1 will respond "A's evidence is correct" and 2 will respond "B's evidence is correct." Since both sides have more than two-thirds of the nodes, the one with more responses (i.e., 10 nodes responding "A's evidence is correct") will be used, and the result formula will be sent to all nodes on the blockchain (including both parties to the dispute). If none of the final results exceed the preset proportion, only the result formulas of each authentication layer will be sent to all nodes on the blockchain (including both parties to the dispute), without any ruling, and the parties to the evidence will communicate independently. If there are inconsistencies in the results of the various aggregation layers, the ruling result with more than half of the nodes responding will prevail.
[0122] As described above, the blockchain-based bill countersigning method provided in this application can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0123] In one embodiment of the blockchain-based bill countersigning method of this application, step S202 may further include the following:
[0124] The authentication operation result is sent to a designated aggregation layer node, so that after receiving authentication operation results from authentication layer nodes exceeding a certain percentage threshold, the aggregation layer node synchronizes the authentication operation result to all nodes in the blockchain network.
[0125] Optionally, in this application, each authentication layer node receiving the request independently determines the dispute outcome based on its stored information and returns a result message. (The determination method involves checking whether the evidence presented by both parties in the dispute (a fixed-format message) is consistent with the information stored by the current authentication layer node. The message feedback result has two possibilities: consistent with the evidence presented by one party, or inconsistent with the evidence presented by both parties, and includes the content stored by the authentication layer within the message.) Simultaneously, each authentication layer node receiving the request sends the authentication result message to the aggregation layer node. The formula for calculating the aggregation layer node ID is:
[0126]
[0127] Among them, Nh k It is the kth aggregation layer node (there are multiple aggregation layer nodes; the exact number is determined when the blockchain is established. It can be a fixed value or a variable value calculated based on a fixed formula and the number of blockchain nodes; this scheme uses a fixed value, 3); N i N is the ID of the i-th authentication layer node that receives the request; a and N b These are the authentication layer numbers of both parties providing evidence (in scenarios involving three or more parties, include all of them); m k It is the offset of the k-th summary layer node; N t It represents the total number of nodes.
[0128] Specifically, the results of the authentication layer nodes that exceed a certain proportion (currently, more than two-thirds is used in practice, but 100% can be required for higher standards) and are more numerous are taken as the standard for each aggregation layer. (Normally, it is sufficient to exceed a certain proportion, although this is almost impossible; however, there may be cases where one party deliberately makes fewer requests and some authentication layer nodes report incorrect results, so the party with more results is required to be valid.)
[0129] For example, if party A requests 12 nodes, 10 will respond "A's evidence is correct" and 2 will respond "B's evidence is correct," while party B requests 3 nodes, 1 will respond "A's evidence is correct" and 2 will respond "B's evidence is correct." Since both sides have more than two-thirds of the nodes, the one with more responses (i.e., 10 nodes responding "A's evidence is correct") will be used, and the result formula will be sent to all nodes on the blockchain (including both parties to the dispute). If none of the final results exceed the preset proportion, only the result formulas of each authentication layer will be sent to all nodes on the blockchain (including both parties to the dispute), without any ruling, and the parties to the evidence will communicate independently. If there are inconsistencies in the results of the various aggregation layers, the ruling result with more than half of the nodes responding will prevail.
[0130] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning method, applied to a sub-layer node in a blockchain network. The sub-layer node is used to determine the node type of new nodes joining the current blockchain. (See also...) Figure 4 The blockchain-based bill countersigning method specifically includes the following:
[0131] Step S401: Receive an allocation request sent by a new node joining the current blockchain, and generate a random number based on the allocation request.
[0132] Optionally, in this application, the new node sends a node list synchronization message request to all nodes. All nodes that receive the request return the node list and the hierarchical information corresponding to each node. In case of discrepancies, a majority vote shall prevail. (The division of labor layer needs to additionally determine whether any node is currently joining the process. If so, it should instead send an interrupt message stating "processing the joining process of other nodes". The new node should interrupt processing as soon as it receives an interrupt message and retry later.)
[0133] The new node sends an allocation request to all sub-layer nodes. After receiving the request, each sub-layer generates a random number x. (x is an integer, and its value range is preset manually. The preset logic is as follows: first, determine the ratio of the three layers of nodes, for example, set it to 1:3:5 (sub-layer: witness: authentication. Generally, authentication is needed more than witnessing more than sub-layer. Sub-layer naturally does not need to be too much. Witnessing work is particularly common. Authentication does not need to be done in most cases. Considering efficiency, witnessing can be relatively less. At the same time, this ratio does not need to be reduced to the minimum. 2:6:10 is also acceptable.) Then the value range is [0, 1+3+5-1]).
[0134] Step S402: Perform an integrated calculation based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculation.
[0135] Optionally, in this application, each sub-layer node sends an integration calculation to all other sub-layer nodes based on its own recorded node list. The calculation formula is as follows:
[0136]
[0137] Where n is the number of nodes in the division of labor layer, x i The random number x is generated by the i-th division layer node. a The result value is randomly assigned.
[0138] Specifically, the results of the integrated calculation are based on a 2 / 3 majority, and the allocation of responsibilities is determined by this result (as an example: if the result range is [0, 1+3+5-1], and the ratio is 1:3:5, the first number 0 corresponds to the division of labor layer corresponding to ratio 1, and 1 to 8 correspond to the witness layer and the authentication layer).
[0139] Specifically, if assigned to the witness layer or the authentication layer, it needs to be based on x a The calculation determines which cases should serve as the authentication layer and which should serve as the witness layer, as detailed below:
[0140]
[0141] Where, N i is the ID of the i-th participating node, and l is the sum of the allocation ratios of the witness layer and the authentication layer.
[0142] The calculated r determines whether it is a witness layer or a certification layer (for example, if witness:certification = 3:5, then r = 0 / 1 / 2 is used as a witness layer, and r = 3 / 4 / 5 / 6 / 7 is used as a certification layer).
[0143] Optionally, each witness layer will assign result information (which layer the new node belongs to, and the calculated x). a The information is distributed to other nodes. The nodes that receive the information (including other witness layers) take the result that is received by more than half of the nodes as the standard and record it locally.
[0144] As described above, the blockchain-based bill countersigning method provided in this application can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0145] In one embodiment of the blockchain-based bill countersigning method of this application, see [link to relevant documentation]. Figure 5 The above step S401 may also specifically include the following:
[0146] Step S501: When a node list synchronization message request is received from a new node joining the current blockchain, determine whether a node joining process already exists.
[0147] Step S502: If yes, then return an interrupt message to the new node so that the new node performs an interrupt operation after receiving the interrupt message, and resends the node list synchronization message request after waiting for a set period of time.
[0148] Optionally, in this application, the new node sends a node list synchronization message request to all nodes. All nodes that receive the request return the node list and the hierarchical information corresponding to each node. In case of discrepancies, a majority vote shall prevail. (The division of labor layer needs to additionally determine whether any node is currently joining the process. If so, it should instead send an interrupt message stating "processing the joining process of other nodes". The new node should interrupt processing as soon as it receives an interrupt message and retry later.)
[0149] In one embodiment of the blockchain-based bill countersigning method of this application, see [link to relevant documentation]. Figure 6 The above step S401 may also specifically include the following:
[0150] Step S601: Determine the respective proportions of the subcontracting layer nodes, witness layer nodes, and authentication layer nodes in the blockchain network.
[0151] Step S602: Determine a random number based on the respective proportions of the division of labor layer nodes, witness layer nodes, and authentication layer nodes.
[0152] Optionally, the new node sends an allocation request to all sub-layer nodes. After receiving the request, each sub-layer generates a random number x. (x is an integer, and its value range is preset manually. The preset logic is as follows: first, determine the ratio of the three layers of nodes, for example, set it to 1:3:5 (sub-layer: witness: authentication. Generally, authentication is needed more than witnessing more than sub-layer. Sub-layer naturally does not need to be too much. Witnessing work is particularly common. Authentication does not need to be done in most cases. Considering efficiency, witnessing can be relatively less. At the same time, this ratio does not need to be reduced to the minimum. 2:6:10 is also acceptable.) Then the value range is [0, 1+3+5-1]).
[0153] In one embodiment of the blockchain-based bill countersigning method of this application, see [link to relevant documentation]. Figure 7 The above step S402 may also specifically include the following:
[0154] Step S701: Determine the integration threshold based on the node identifiers of the participating nodes and the sum of the allocation ratios of witness layer nodes and authentication layer nodes in the blockchain network.
[0155] Step S702: Determine the node type of the new node in the blockchain network based on the numerical comparison between the integration threshold and the integration calculation result.
[0156] Optionally, in this application, each subdivision layer node sends an integration calculation to all other subdivision layer nodes based on its own recorded node list. The calculation formula is as follows:
[0157]
[0158] Where n is the number of nodes in the division of labor layer, x i The random number x is generated by the i-th division layer node. a The result value is randomly assigned.
[0159] Specifically, the results of the integrated calculation are based on a 2 / 3 majority, and the allocation of responsibilities is determined by this result (as an example: if the result range is [0, 1+3+5-1], and the ratio is 1:3:5, the first number 0 corresponds to the division of labor layer corresponding to ratio 1, and 1 to 8 correspond to the witness layer and the authentication layer).
[0160] Specifically, if assigned to the witness layer or the authentication layer, it needs to be based on x a The calculation determines which cases should serve as the authentication layer and which should serve as the witness layer, as detailed below:
[0161]
[0162] Where, N i is the ID of the i-th participating node, and l is the sum of the allocation ratios of the witness layer and the authentication layer.
[0163] The calculated r determines whether it is a witness layer or a certification layer (for example, if witness:certification = 3:5, then r = 0 / 1 / 2 is used as a witness layer, and r = 3 / 4 / 5 / 6 / 7 is used as a certification layer).
[0164] Optionally, each witness layer will assign result information (which layer the new node belongs to, and the calculated x). a The information is distributed to other nodes. The nodes that receive the information (including other witness layers) take the result that is received by more than half of the nodes as the standard and record it locally.
[0165] In one embodiment of the blockchain-based bill countersigning method of this application, the following may be included before step S401:
[0166] Receive a node list synchronization message request sent by a new node joining the current blockchain, and return the node list and hierarchical information to the new node according to the node list synchronization message request.
[0167] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning device for implementing all or part of the aforementioned blockchain-based bill countersigning method. See [link to embodiment]. Figure 8 The blockchain-based ticket countersigning device specifically includes the following components:
[0168] The consistency verification module 10 is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information.
[0169] The verification result sending module 20 is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the result of the consistency verification is passing. This allows the authentication layer node to generate authentication information based on the countersigning information and the passing result of the consistency verification and store it locally. When the authentication layer node receives a dispute evidence submission request sent by a countersigning participant node, it performs an authentication operation based on the evidence submission content in the dispute evidence submission request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0170] As described above, the blockchain-based bill countersigning device provided in this application embodiment can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0171] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 9 The consistency verification module 10 includes:
[0172] The content consistency judgment unit 11 is used to determine whether the content contained in the countersigning information is consistent with the content contained in the countersigning information of the corresponding other countersigning participants.
[0173] The verification result unit 12 is used to determine that the consistency verification of the countersigning information is passed if the result is yes, otherwise the consistency verification of the countersigning information is failed.
[0174] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning device for implementing all or part of the aforementioned blockchain-based bill countersigning method. See [link to embodiment]. Figure 10 The blockchain-based ticket countersigning device specifically includes the following components:
[0175] The evidence submission request receiving module 30 is used to receive dispute evidence submission requests sent by participating nodes in the joint signing process. Based on the node identifier of the participating node in the dispute evidence submission request, the module determines the corresponding authentication layer node and the authentication information stored locally by the authentication layer node. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating nodes and performing consistency verification on the joint signing information. When the consistency verification result is passed, the module is generated from the joint signing information and the passing result of the consistency verification.
[0176] The authentication module 40 is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network.
[0177] As described above, the blockchain-based bill countersigning device provided in this application embodiment can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0178] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 11 The authentication module 40 includes:
[0179] The summary statistics unit 41 is used to send the authentication operation results to a set summary layer node, so that after the summary layer node receives the authentication operation results sent by the authentication layer node exceeding the proportion threshold, it will synchronize the authentication operation results to all nodes in the blockchain network.
[0180] To effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of a blockchain-based bill countersigning device for implementing all or part of the aforementioned blockchain-based bill countersigning method. See [link to embodiment]. Figure 12 The blockchain-based ticket countersigning device specifically includes the following components:
[0181] The allocation request receiving module 50 is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request.
[0182] The node type determination module 60 is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
[0183] As described above, the blockchain-based bill countersigning device provided in this application embodiment can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0184] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 13 The allocation request receiving module 50 includes:
[0185] The node judgment unit 51 is used to determine whether a node joining process already exists when it receives a node list synchronization message request sent by a new node joining the current blockchain.
[0186] The interrupt operation unit 52 is used to return an interrupt message to the new node if the condition is met, so that the new node performs an interrupt operation after receiving the interrupt message and resends the node list synchronization message request after waiting for a set time period.
[0187] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 14 The allocation request receiving module 50 includes:
[0188] The node proportion determination unit 53 is used to determine the respective proportions of the division layer nodes, witness layer nodes, and authentication layer nodes in the blockchain network.
[0189] The random number generation unit 54 is used to determine a random number based on the respective proportions of the division layer nodes, witness layer nodes, and authentication layer nodes.
[0190] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 15 The node type determination module 60 includes:
[0191] The integration threshold determination unit 61 is used to determine the integration threshold based on the node identifiers of the participating nodes and the sum of the allocation ratios of witness layer nodes and authentication layer nodes in the blockchain network.
[0192] The node type determination unit 62 is used to determine the node type of the new node in the blockchain network based on the numerical comparison relationship between the integration threshold and the integration calculation result.
[0193] In one embodiment of the blockchain-based ticket countersigning device of this application, see [link to relevant documentation]. Figure 16 The allocation request receiving module 50 further includes:
[0194] The message synchronization unit 55 is used to receive a node list synchronization message request sent by a new node joining the current blockchain, and return a node list and hierarchical information to the new node according to the node list synchronization message request.
[0195] To further illustrate this solution, this application also provides a specific application example of a system that uses the aforementioned blockchain-based bill countersigning device to implement the blockchain-based bill countersigning method. See [link to relevant documentation]. Figure 17 Specifically, it includes the following: witness layer nodes, authentication layer nodes, and division of labor layer nodes in the blockchain network.
[0196] The witness layer nodes include:
[0197] The consistency verification module 10 is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information.
[0198] The verification result sending module 20 is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the result of the consistency verification is passing.
[0199] The authentication layer nodes include:
[0200] The evidence submission request receiving module 30 is used to receive dispute evidence submission requests sent by the participating nodes in the dispute evidence submission request, and determine the corresponding authentication layer node and the authentication information stored locally by the authentication layer node based on the node identifier of the participating node in the dispute evidence submission request.
[0201] The authentication module 40 is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network.
[0202] The division of labor layer nodes include:
[0203] The allocation request receiving module 50 is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request.
[0204] The node type determination module 60 is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
[0205] As described above, the blockchain-based bill countersigning system provided in this application can receive countersigning information sent by participating nodes and perform consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, synchronizing the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0206] From a hardware perspective, in order to effectively improve the efficiency and reliability of bill countersigning, this application provides an embodiment of an electronic device for implementing all or part of the aforementioned blockchain-based bill countersigning method. The electronic device specifically includes the following components:
[0207] The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the blockchain-based bill countersigning device and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the blockchain-based bill countersigning method and the blockchain-based bill countersigning device in the embodiments, the content of which is incorporated herein, and repeated details will not be described again.
[0208] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.
[0209] In practical applications, the blockchain-based bill countersigning method can be partially executed on the electronic device side as described above, or all operations can be completed on the client device. The choice can be made based on the processing power of the client device and the limitations of the user scenario. This application does not impose any limitations on this. If all operations are completed on the client device, the client device may further include a processor.
[0210] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.
[0211] Figure 18 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 18 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 18 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.
[0212] In one embodiment, the blockchain-based bill countersigning method can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0213] Step S101: Receive the signing information sent by the participating nodes and perform consistency verification on the signing information.
[0214] Step S102: When the consistency verification result is passed, the countersigning information and the consistency verification result are sent to the corresponding authentication layer node in the blockchain, so that the authentication layer node generates authentication information based on the countersigning information and the consistency verification result and stores it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0215] As described above, the electronic device provided in this application embodiment receives countersigning information sent by participating nodes and performs consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence submission content in the dispute evidence submission request and the locally stored authentication information. The authentication operation result is then synchronized to all nodes in the blockchain network, thereby effectively improving the efficiency and reliability of bill countersigning.
[0216] In another embodiment, the blockchain-based bill countersigning device can be configured separately from the central processing unit 9100. For example, the blockchain-based bill countersigning device can be configured as a chip connected to the central processing unit 9100, and the blockchain-based bill countersigning method function can be implemented through the control of the central processing unit.
[0217] like Figure 18 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 18 All components shown; in addition, the electronic device 9600 may also include Figure 18 For components not shown, please refer to existing technologies.
[0218] like Figure 18 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.
[0219] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.
[0220] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.
[0221] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.
[0222] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0223] The communication module 9110 is a transmitter / receiver 9110 that transmits and receives signals via the antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in a conventional mobile communication terminal.
[0224] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.
[0225] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the blockchain-based bill countersigning method with a server or client as the execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the blockchain-based bill countersigning method with a server or client as the execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:
[0226] Step S101: Receive the signing information sent by the participating nodes and perform consistency verification on the signing information.
[0227] Step S102: When the consistency verification result is passed, the countersigning information and the consistency verification result are sent to the corresponding authentication layer node in the blockchain, so that the authentication layer node generates authentication information based on the countersigning information and the consistency verification result and stores it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0228] As described above, the computer-readable storage medium provided in this application embodiment receives countersigning information sent by participating nodes and performs consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence submission content in the dispute evidence submission request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0229] Embodiments of this application also provide a computer program product capable of implementing all steps of the blockchain-based bill countersigning method in the above embodiments, where the execution subject is a server or client. When executed by a processor, this computer program / instruction implements the steps of the blockchain-based bill countersigning method. For example, the computer program / instruction implements the following steps:
[0230] Step S101: Receive the signing information sent by the participating nodes and perform consistency verification on the signing information.
[0231] Step S102: When the consistency verification result is passed, the countersigning information and the consistency verification result are sent to the corresponding authentication layer node in the blockchain, so that the authentication layer node generates authentication information based on the countersigning information and the consistency verification result and stores it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network.
[0232] As described above, the computer program product provided in this application embodiment receives countersigning information sent by participating nodes and performs consistency verification on the countersigning information. When the consistency verification result is successful, the countersigning information and the successful consistency verification result are sent to the corresponding authentication layer node in the blockchain. This allows the authentication layer node to generate authentication information based on the countersigning information and the successful consistency verification result and store it locally. Furthermore, when the authentication layer node receives a dispute evidence submission request sent by a participating node, it performs authentication operations based on the evidence content in the dispute evidence submission request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network. This effectively improves the efficiency and reliability of bill countersigning.
[0233] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0234] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0235] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0236] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0237] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A blockchain-based method for countersigning invoices, characterized in that, The method, applied to witness layer nodes in a blockchain network, includes: Receive the signing information sent by the signing participants' nodes and perform consistency verification on the signing information; When the consistency verification result is passed, the countersigning information and the consistency verification result are sent to the corresponding authentication layer node in the blockchain, so that the authentication layer node generates authentication information based on the countersigning information and the consistency verification result and stores it locally. When the authentication layer node receives a dispute evidence request sent by a countersigning participant node, it performs an authentication operation based on the evidence content in the dispute evidence request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network. The blockchain network also includes sub-layer nodes, which are used to determine the node type of new nodes joining the current blockchain, through methods including: Receive an allocation request from a new node joining the current blockchain, and generate a random number based on the allocation request; The new node's node type in the blockchain network is determined based on the result of the integrated calculation, which is based on the random number and the number of nodes in the division of labor layer.
2. The blockchain-based bill countersigning method according to claim 1, characterized in that, The consistency verification of the countersigned information includes: Determine whether the content contained in the countersigning information is consistent with the content contained in the countersigning information of other corresponding countersigning participants in the blockchain network; If yes, the consistency verification of the countersigned information is deemed to have passed; otherwise, the consistency verification of the countersigned information is deemed to have failed.
3. The blockchain-based bill countersigning method according to claim 1, characterized in that, The blockchain network also includes an authentication layer node, and the method includes: The system receives a dispute evidence submission request sent by a participating node in the joint signing process. Based on the node identifier of the participating node in the dispute evidence submission request, the system determines the corresponding authentication layer node and the authentication information stored locally by the authentication layer node. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating node and performing a consistency verification on the joint signing information. When the consistency verification result is passed, the system generates the joint signing information and the passing result of the consistency verification. The authentication process is performed based on the evidence presented in the dispute's request for evidence and the locally stored authentication information. The authentication results are then synchronized to all nodes in the blockchain network.
4. The blockchain-based bill countersigning method according to claim 3, characterized in that, The step of synchronizing the authentication operation result to all nodes in the blockchain network includes: The authentication operation result is sent to a designated aggregation layer node, so that after receiving authentication operation results from authentication layer nodes exceeding a certain percentage threshold, the aggregation layer node synchronizes the authentication operation result to all nodes in the blockchain network.
5. The blockchain-based bill countersigning method according to claim 1, characterized in that, The method further includes: When a node list synchronization message request is received from a new node joining the current blockchain, it is determined whether a node joining process already exists. If so, an interrupt message is returned to the new node, so that the new node performs an interrupt operation after receiving the interrupt message, and resends the node list synchronization message request after waiting for a set period of time.
6. The blockchain-based bill countersigning method according to claim 1, characterized in that, The step of generating a random number according to the allocation request includes: Determine the respective proportions of the division-of-service layer nodes, witness layer nodes, and authentication layer nodes in the blockchain network; A random number is determined based on the respective proportions of the division of labor layer nodes, witness layer nodes, and authentication layer nodes.
7. The blockchain-based bill countersigning method according to claim 1, characterized in that, Determining the node type of the new node in the blockchain network based on the results of the integrated calculation includes: The integration threshold is determined based on the node identifiers of the participating nodes and the sum of the distribution ratios of witness layer nodes and authentication layer nodes in the blockchain network. The node type of the new node in the blockchain network is determined based on the numerical comparison between the integration threshold and the integration calculation result.
8. The blockchain-based bill countersigning method according to claim 1, characterized in that, Before receiving the allocation request sent by the new node joining the current blockchain, the process includes: Receive a node list synchronization message request sent by a new node joining the current blockchain, and return the node list and hierarchical information to the new node according to the node list synchronization message request.
9. A blockchain-based invoice countersigning device, characterized in that, include: The consistency verification module is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information. The verification result sending module is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the result of the consistency verification is passing. This allows the authentication layer node to generate authentication information based on the countersigning information and the passing result of the consistency verification and store it locally. When the authentication layer node receives a dispute evidence submission request sent by a countersigning participant node, it performs an authentication operation based on the evidence submission content in the dispute evidence submission request and the locally stored authentication information, and synchronizes the authentication operation result to all nodes in the blockchain network. The device further includes: The allocation request receiving module is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request. The node type determination module is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
10. The blockchain-based ticket countersigning device according to claim 9, characterized in that, The device further includes: The evidence submission request receiving module is used to receive dispute evidence submission requests sent by participating nodes in the joint signing process. Based on the node identifier of the participating node in the dispute evidence submission request, the module determines the corresponding authentication layer node and the authentication information stored locally by the authentication layer node. The locally stored authentication information is generated by the witness layer node in the blockchain network receiving the joint signing information sent by the participating nodes and performing consistency verification on the joint signing information. When the consistency verification result is passed, the module is generated from the joint signing information and the passing result of the consistency verification. The authentication module is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network.
11. A blockchain-based invoice countersigning system, characterized in that, This includes witness layer nodes, authentication layer nodes, and division of labor layer nodes in the blockchain network; The witness layer nodes include: The consistency verification module is used to receive the signing information sent by the signing participants and to perform consistency verification on the signing information. The verification result sending module is used to send the countersigning information and the passing result of the consistency verification to the corresponding authentication layer node in the blockchain when the result of the consistency verification is passing. The authentication layer nodes include: The evidence submission request receiving module is used to receive dispute evidence submission requests sent by the participating nodes in the dispute evidence submission request, and determine the corresponding authentication layer node and the authentication information stored locally by the authentication layer node based on the node identifier of the participating node in the dispute evidence submission request. The authentication module is used to perform authentication operations based on the evidence content in the dispute evidence request and the authentication information stored locally, and to synchronize the authentication operation results to all nodes in the blockchain network. The division of labor layer nodes include: The allocation request receiving module is used to receive allocation requests sent by new nodes joining the current blockchain and generate a random number based on the allocation request. The node type determination module is used to perform integrated calculations based on the random number and the number of nodes in the division of labor layer, and determine the node type of the new node in the blockchain network based on the result of the integrated calculations.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the blockchain-based bill countersigning method according to any one of claims 1 to 8.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the blockchain-based bill countersigning method as described in any one of claims 1 to 8.
14. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the blockchain-based bill countersigning method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Blockchain-based electronic contract evidence storage method
CN110287732A
Systems and methods for storing contract information on multiple blockchain ledgers
US20200151842A1