Data processing method and device based on block chain network, medium and equipment
By not broadcasting the original transaction text in the proposal stage of the BFT-SMaRt algorithm, but generating and broadcasting transaction proposals, the problems of concentrated message broadcast pressure and unbalanced load are solved, and the algorithm performance is improved and delay is reduced.
Patent Information
- Application Number
- CN202311423517.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
The BFT-SMaRt algorithm needs to broadcast a batch of original transaction texts during the proposal stage, resulting in concentrated message broadcast pressure and unbalanced load, resulting in performance bottlenecks.
In the proposal stage, the leader node does not need to broadcast a batch of original transaction texts, but the leader node receives confirmation messages of transaction information sent by the client and the replica node, generates a transaction proposal, and broadcasts the proposal to the replica node.
It reduces the amount of messages broadcast by the leader node, solves the problems of concentrated message broadcast pressure and unbalanced load, improves the performance of the BFT-SMaRt algorithm, and reduces resource waste and consensus delay.
Smart Images

Figure CN119917585A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain technology, and in particular to a data processing method based on a blockchain network, a data processing device based on a blockchain network, a computer-readable storage medium, and an electronic device. Background Art
[0002] Blockchain technology is a fusion of a series of technologies, one of the core technologies of which is the consensus algorithm. The consensus algorithm can be understood as a series of processes and rules generated to implement a distributed consistency protocol. When different nodes negotiate and interact according to this set of rules, they can reach a consistent decision on one or some issues, thereby achieving consistency among different nodes in the distributed system.
[0003] The BFT-SMaRt algorithm is a commonly used consensus algorithm. The existing BFT-SMaRt algorithm consensus process is mainly divided into three stages: Propose, Write, and Accept. In the Propose stage, the leader node is required to broadcast a batch of transaction originals. Compared with the latter stages, the amount of broadcast messages is large, and there are problems such as concentrated message broadcast pressure and unbalanced load, which causes the performance bottleneck of the BFT-SMaRt algorithm.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a data processing method based on a blockchain network, a data processing device based on a blockchain network, a computer-readable storage medium and an electronic device, which do not need to broadcast a batch of transaction originals in the proposal stage, solve the problems of concentrated pressure and load imbalance in message broadcasting, and improve the performance of the BFT-SMaRt algorithm.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a data processing method based on a blockchain network is provided, wherein the blockchain network includes a leader node and multiple replica nodes, and the method is executed by the leader node, including: receiving at least one transaction information sent by a client; receiving a confirmation message of the transaction information sent by each of the replica nodes; wherein the confirmation message of the transaction information is a confirmation message generated by the replica node after receiving the transaction information sent by the client; generating a transaction proposal based on the at least one transaction information and the confirmation message of the transaction information sent by each of the replica nodes; and broadcasting the transaction proposal to the multiple replica nodes to start a consensus processing process for the transaction proposal.
[0008] In an optional embodiment of the present disclosure, a transaction proposal is generated based on the at least one transaction information and confirmation messages of the transaction information sent by each of the replica nodes, including: determining the number of confirmation messages of each of the transaction information based on the confirmation messages of the transaction information sent by each of the replica nodes; selecting target transaction information from the at least one transaction information based on the number of confirmation messages of each of the transaction information; and generating the transaction proposal based on an identifier of the target transaction information.
[0009] In an optional embodiment of the present disclosure, broadcasting the transaction proposal to the multiple replica nodes includes: determining the number of confirmation messages of the target transaction information; if the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold, obtaining a confirmation set of the target transaction information, the confirmation set of the target transaction information including the replica nodes corresponding to the confirmation messages of the target transaction information; broadcasting the transaction proposal and the confirmation set of the target transaction information to the multiple replica nodes.
[0010] In an optional embodiment of the present disclosure, the leader node includes a transaction pool, and the transaction pool of the leader node is used to store the identifier of each transaction information, the transaction original text of each transaction information, the number of confirmation messages of each transaction information, and the transaction timestamp of each transaction information.
[0011] According to another aspect of the present disclosure, a data processing method based on a blockchain network is provided, characterized in that the blockchain network includes a leader node and multiple replica nodes, and the method is executed by the replica node, including: after receiving the transaction information sent by the client, generating a confirmation message of the received transaction information, and sending the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal according to the confirmation message of the transaction information sent by each of the replica nodes; receiving the transaction proposal broadcasted by the leader node to start a consensus processing process for the transaction proposal.
[0012] In an optional embodiment of the present disclosure, after receiving the transaction proposal broadcast by the leader node, the method further includes: obtaining an identifier of the target transaction information in the transaction proposal; querying the transaction text of the target transaction information from the transaction pool of the replica node based on the identifier of the target transaction information; if the query fails, initiating an inquiry process to obtain the transaction text of the target transaction information.
[0013] In an optional embodiment of the present disclosure, the initiation of the inquiry process to obtain the transaction text of the target transaction information includes: issuing a request to other replica nodes to obtain the transaction text of the target transaction information, and the other replica nodes are nodes other than the replica node among the multiple replica nodes; and receiving the transaction text of the target transaction information returned by the other replica nodes.
[0014] In an optional embodiment of the present disclosure, the initiation of the inquiry process to obtain the transaction text of the target transaction information includes: if a preset condition is met, obtaining a confirmation set of the target transaction information, the confirmation set of the target transaction information including a replica node corresponding to a confirmation message of the target transaction information; determining a replica node that owns the transaction text of the target transaction information based on the confirmation set of the target transaction information; issuing a request to the determined replica node to obtain the transaction text of the target transaction information, and receiving the transaction text of the target transaction information returned by the determined replica node.
[0015] In an optional embodiment of the present disclosure, the satisfying of the preset conditions includes at least one of the following: the leader node broadcasts a confirmation set of the target transaction information; the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold; the network environment does not meet the preset network environment requirements.
[0016] In an optional embodiment of the present disclosure, the replica node includes a transaction pool, and the transaction pool of the replica node is used to store the identifier of the received transaction information, the transaction original text of the received transaction information, and the transaction timestamp of the received transaction information.
[0017] According to another aspect of the present disclosure, a data processing device based on a blockchain network is provided, wherein the blockchain network includes a leader node and multiple replica nodes, and the device is applied to the leader node, including: a transaction information receiving module, used to receive at least one transaction information sent by a client; a confirmation message receiving module, used to receive a confirmation message of the transaction information sent by each of the replica nodes; wherein the confirmation message of the transaction information is a confirmation message generated by the replica node after receiving the transaction information sent by the client; a transaction proposal generating module, used to generate a transaction proposal according to the at least one transaction information and the confirmation message of the transaction information sent by each of the replica nodes; and a transaction proposal broadcasting module, used to broadcast the transaction proposal to the multiple replica nodes to start a consensus processing process for the transaction proposal.
[0018] According to another aspect of the present disclosure, there is provided a data processing device based on a blockchain network, wherein the blockchain network includes a leader node and multiple replica nodes, and the device is applied to the replica nodes, including: a confirmation message sending module, for generating a confirmation message of the received transaction information after receiving the transaction information sent by the client, and sending the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal according to the confirmation message of the transaction information sent by each of the replica nodes; a transaction proposal receiving module, for receiving the transaction proposal broadcasted by the leader node, so as to start a consensus processing process for the transaction proposal.
[0019] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned data processing method based on the blockchain network is implemented.
[0020] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned blockchain network-based data processing method by executing the executable instructions.
[0021] In the data processing method based on the blockchain network of the disclosed embodiment, the client sends transaction information to the leader node and multiple replica nodes. After receiving the transaction information sent by the client, each replica node generates a confirmation message of the transaction information, and sends the confirmation message of the transaction information to the leader node. Then the leader node generates a transaction proposal based on the transaction information sent by the client and the confirmation message of the transaction information sent by each replica node, and broadcasts the transaction proposal to each replica node, thereby starting the consensus processing process for the transaction proposal. On the one hand, the transaction proposal is generated based on the confirmation message of the transaction information, so the leader node does not need to broadcast a batch of transaction originals in the proposal stage, reducing the amount of messages broadcast by the leader node, solving the problems of concentrated message broadcasting pressure and unbalanced load, improving the performance of the BFT-SMaRt algorithm, and not changing the main consensus process of the BFT-SMaRt algorithm, which can ensure the security of the consensus; on the other hand, since the leader node does not need to broadcast a batch of transaction originals in the proposal stage, it can reduce resource waste and consensus delay.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0024] Figure 1 A schematic diagram of the structure of a blockchain network is shown;
[0025] Figure 2 A schematic diagram of the process of the existing BFT-SMaRt consensus algorithm is shown;
[0026] Figure 3 A schematic diagram showing an exemplary system structure of a data processing method based on a blockchain network to which an embodiment of the present application can be applied;
[0027] Figure 4 A flowchart of a data processing method based on a blockchain network according to an embodiment of the present application is shown;
[0028] Figure 5 A flowchart of a data processing method based on a blockchain network according to another embodiment of the present application is shown;
[0029] Figure 6A schematic diagram of the process of the BFT-SMaRt consensus algorithm according to an embodiment of the present application is shown;
[0030] Figure 7 A block diagram of a data processing device based on a blockchain network according to an embodiment of the present application is shown;
[0031] Figure 8 A block diagram of a data processing device based on a blockchain network according to another embodiment of the present application is shown;
[0032] Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0033] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein.
[0035] The following example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0036] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0037] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0038] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks (i.e. blocks) generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0039] The blockchain is jointly maintained by the nodes in the blockchain network. Figure 1 A schematic diagram of the structure of a blockchain network is shown. Figure 1 The blockchain network shown may include multiple nodes 101, and the multiple nodes 101 may be various clients forming the blockchain network. Each node 101 may receive input information when performing normal work, and maintain the shared data in the blockchain network based on the received input information. In order to ensure the information intercommunication within the blockchain network, there may be an information connection between each node in the blockchain network, and information can be transmitted between nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to the consensus algorithm, and store the input information as shared data, so that the data stored on all nodes in the blockchain network are consistent.
[0040] Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. A node identifier list can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. The node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node.
[0041] Each node in the blockchain network can be a server or a terminal device. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal device can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. Each node can be directly or indirectly connected by wired or wireless communication, and this application does not limit this.
[0042] One of the core technologies of blockchain technology is consensus algorithm, which can be understood as a series of processes and rules generated to implement distributed consistency protocols. When different nodes negotiate and interact according to this set of rules, they can always reach a consistent decision on one or some issues, thereby achieving consistency among different nodes in the distributed system. The nodes that need to reach consensus in the blockchain network can be called consensus nodes.
[0043] The BFT-SMaRt algorithm is implemented based on the Java language and is a commonly used consensus algorithm. Figure 2 The process diagram of the existing BFT-SMaRt consensus algorithm is shown. Figure 2 As shown in the figure, the consensus nodes include the leader node and three replica nodes (Node1, Node2 and Node3). The existing BFT-SMaRt consensus process is mainly divided into three stages: Propose, Write and Accept. The client sends transactions to the leader node, Node1, Node2 and Node3; in the Propose stage, the leader node broadcasts a batch of transaction originals, that is, the leader node sorts the transactions sent by the client, and then issues proposals to Node1, Node2 and Node3; in the Write and Accept stages, all nodes broadcast confirmation messages.
[0044] It can be seen that in the Propose phase, the replica node needs to wait for the leader node to broadcast, and the leader node broadcasts the original transaction text. Therefore, compared with the later stages, the node broadcasts a large amount of messages, resulting in concentrated message broadcast pressure and unbalanced load, thus causing the performance bottleneck of the BFT-SMaRt algorithm. In addition, the client has sent transactions to all consensus nodes, and during the consensus process, the leader node also broadcasts the sorted transactions to all replica nodes, which causes a waste of resources and increases the delay of consensus.
[0045] Based on the problems existing in the related technology, the technical solution of the embodiment of the present application proposes a data processing solution based on the blockchain network. In the proposal stage, the leader node does not need to broadcast a batch of transaction originals, which solves the problems of concentrated pressure and unbalanced load of message broadcasting, improves the performance of the BFT-SMaRt algorithm, and can also reduce resource waste and consensus delay.
[0046] Specifically, in an application scenario of the present application, if Figure 3 As shown, it mainly includes a client 301 and a blockchain platform 302. Among them, the client 301 can generate transaction information for chaining, and the blockchain platform 302 can be a platform built based on the blockchain network. Figure 3 In the example, the blockchain nodes in the blockchain platform 302 may include a leader node 3021 and a replica node 3022.
[0047] The leader node 3021 and the replica node 3022 can receive at least one transaction information sent by the client 301. After receiving the transaction information sent by the client, the replica node 3022 generates a confirmation message of the transaction information, and then sends the confirmation message of the transaction information to the leader node 3021. The leader node 3021 can receive the confirmation message of the transaction information sent by each replica node 3022, and then generate a transaction proposal in combination with at least one transaction information. The transaction proposal can include the identifier of the transaction information selected by the leader node 3021 from the at least one transaction information, and does not include the transaction original text of the selected transaction information. Then, the leader node 3021 broadcasts the transaction proposal to the replica node 3022, so that the consensus processing process of the transaction proposal can be started, that is, the consensus processing of the transaction proposal can be performed in the blockchain platform 302. During the consensus processing process, each node can obtain the transaction execution result data generated by the consensus processing of the transaction proposal, such as the write set and the transaction execution result set.
[0048] In order to enable ordinary people in the art to better understand the technical solution of the present disclosure, the data processing solution based on the blockchain network of the embodiment of the present disclosure will be described in more detail below with reference to the accompanying drawings and embodiments.
[0049] Figure 4 It is a flow chart of a data processing method based on a blockchain network according to an exemplary embodiment. The blockchain network includes a leader node and multiple replica nodes, and the leader node and the replica node are nodes that need to reach a consensus. In the BFT-SMaRt algorithm, at least four nodes are required to reach a consensus, that is, the leader node and at least three replica nodes are required to reach a consensus, so the number of replica nodes is not less than three.
[0050] Figure 4The method shown is executed by a leader node and specifically includes the following steps.
[0051] Step S410: receiving at least one transaction information sent by the client.
[0052] The client sends at least one transaction information to a node in the blockchain network, so in this step, the leader node receives at least one transaction information sent by the client. It should be noted that the transaction information can be sent by one client or by multiple clients.
[0053] In the disclosed embodiment, the leader node can maintain a local transaction pool, and the transaction pool of the leader node stores the identifier of each transaction information, the transaction original text of each transaction information, and the transaction timestamp of each transaction information. That is, after the leader node receives the transaction information sent by the client, it stores the identifier, transaction original text and transaction timestamp of the transaction information in the local transaction pool. Among them, the identifier of the transaction information can be understood as a unique transaction identifier assigned to each transaction, such as a transaction hash value as the transaction identifier.
[0054] Step S420: Receive confirmation messages of transaction information sent by each replica node.
[0055] The transaction information confirmation message is a confirmation message generated after the replica node receives the transaction information sent by the client.
[0056] After receiving the transaction information sent by the client, the replica node can generate a confirmation message of the transaction information, and then send the confirmation message of the transaction information to the leader node, that is, the leader node can receive the confirmation messages of the transaction information sent by each replica node.
[0057] For example, the replica nodes include Node1, Node2, and Node3, and the client sends 10 transaction information to the leader node, Node1, Node2, and Node3. When Node1 receives transaction information A among the 10 transaction information, it generates a confirmation message of transaction information A and then sends it to the leader node. After receiving the confirmation message of transaction information A sent by Node1, the leader node confirms that Node1 has received transaction information A. It can be seen that the leader node can receive confirmation messages of received transaction information sent by Node1, Node2, and Node3.
[0058] In the disclosed embodiment, the transaction pool of the leader node may also store confirmation messages of each transaction information, such as the number of confirmation messages of each transaction information. The subsequent leader node may query the confirmation messages of each transaction information from the local transaction pool, and then generate a transaction proposal based on the confirmation messages of each transaction information. Taking Table 1 as an example, the transaction pool of the leader node stores the transaction ID, transaction original text, and transaction timestamp of transaction A, transaction B, transaction C, and transaction D.
[0059] Table 1 Transaction pool of leader node
[0060] Transaction ID Transaction original Number of confirmed messages Transaction timestamp <![CDATA[ID A ]]> <![CDATA[Tx A ]]> 2 <![CDATA[timestap A ]]> <![CDATA[ID B ]]> <![CDATA[Tx B ]]> 3 <![CDATA[timestap B ]]> <![CDATA[ID C ]]> <![CDATA[Tx C ]]> 2 <![CDATA[timestap C ]]> <![CDATA[ID D ]]> <![CDATA[Tx D ]]> 4 <![CDATA[Timestap D ]]>
[0061] Step S430: Generate a transaction proposal based on at least one transaction information and a confirmation message of the transaction information sent by each replica node.
[0062] In this step, the leader node can generate a transaction proposal based on at least one transaction information sent by the client and the confirmation message of the transaction information sent by each replica node. The transaction proposal can be understood as a series of transactions that have been sorted and generated by the leader node. In other words, the leader node sorts the transactions that need to be processed by consensus and then generates a transaction proposal.
[0063] Step S440: Broadcast the transaction proposal to multiple replica nodes to start the consensus processing of the transaction proposal.
[0064] In this step, the leader node broadcasts the transaction proposal to each replica node, so that after each replica node receives the transaction proposal, it can start the consensus processing process of the transaction proposal.
[0065] The specific implementation of the consensus processing process can be as follows: after each replica node receives a transaction proposal, it obtains all the transaction originals in the transaction proposal; then, each node in the blockchain network (including the leader node and the replica node, that is, the node that needs to reach a consensus) sends a write message to other nodes, and at the same time, each node can receive the write message sent by other nodes, that is, each node collects messages in the write (Write) phase; after each node receives 2f+1 (f is the number of Byzantine nodes that can be tolerated) write messages, it performs ledger preprocessing. When the preprocessing results of at least 2f+1 nodes are consistent, each node can broadcast a message accepting the proposal to other nodes, that is, each node sends an acceptance (Accept) message in the acceptance (Accept) phase; after receiving the acceptance proposal message from at least 2f+1 nodes, it formally determines that the proposal is effective, writes the proposal to the ledger, and feeds back the proposal execution result to the client.
[0066] In the data processing method based on the blockchain network of the disclosed embodiment, the client sends transaction information to the leader node and multiple replica nodes. After receiving the transaction information sent by the client, each replica node generates a confirmation message of the transaction information, and sends the confirmation message of the transaction information to the leader node. Then the leader node generates a transaction proposal based on the transaction information sent by the client and the confirmation message of the transaction information sent by each replica node, and broadcasts the transaction proposal to each replica node, thereby starting the consensus processing process for the transaction proposal. On the one hand, the transaction proposal is generated based on the confirmation message of the transaction information, so the leader node does not need to broadcast a batch of transaction originals in the proposal stage, reducing the amount of messages broadcast by the leader node, solving the problems of concentrated message broadcasting pressure and unbalanced load, improving the performance of the BFT-SMaRt algorithm, and not changing the main consensus process of the BFT-SMaRt algorithm, which can ensure the security of the consensus; on the other hand, since the leader node does not need to broadcast a batch of transaction originals in the proposal stage, it can reduce resource waste and consensus delay.
[0067] In an optional embodiment of the present disclosure, generating a transaction proposal based on at least one transaction information and confirmation messages of the transaction information sent by each replica node may further include: determining the number of confirmation messages of each transaction information based on the confirmation messages of the transaction information sent by each replica node; selecting target transaction information from at least one transaction information based on the number of confirmation messages of each transaction information; and generating a transaction proposal based on an identifier of the target transaction information.
[0068] After the leader node receives the confirmation messages of the transaction information sent by each replica node, it counts the number of confirmation messages for each transaction information, and then selects the target transaction information from at least one transaction information based on the number of confirmation messages for each transaction information, packages the identifiers of the target transaction information, and generates a transaction proposal.
[0069] In the disclosed embodiment, the leader node may select a transaction with a large number of confirmation messages as the target transaction information. For example, if the number of target transaction information is set to 5, the leader node sorts the transaction information according to the number of confirmation messages and selects the first 5 transaction information as the target transaction information. For another example, if a quantity threshold is set, if the number of confirmation messages of a certain transaction information is greater than the set quantity threshold, the leader node selects the transaction information as the target transaction information.
[0070] In addition to selecting the target transaction information based on the number of confirmation messages of the transaction information, the target transaction information can also be selected based on other parameters. For example, if a transaction information needs to be processed urgently, the client can add a specific identifier to the transaction information, so that the leader node can preferentially select the transaction information as the target transaction information after receiving the transaction information sent by the client and the confirmation message of the transaction information sent by the replica node. For another example, the leader node can obtain the transaction type of each transaction information, and then generate a transaction proposal based on the confirmation message of the transaction information in transactions of the same transaction type.
[0071] In the existing BFT-SMaRt algorithm, in the proposal phase, the leader node must broadcast the sorted transactions to all replica nodes, that is, the leader node broadcasts the original transaction text to each replica node, which causes the problem of concentrated message broadcast pressure and unbalanced load, resulting in a performance bottleneck for the algorithm. In the disclosed embodiment, in the proposal phase, the leader node selects the target transaction information based on the number of confirmation messages of the transaction information, and then packages the identifier of the target transaction information to generate a transaction proposal, and broadcasts the transaction proposal to the replica nodes. It can be seen that what the leader node broadcasts is not the original transaction text, but the transaction proposal generated based on the identifier of the transaction information. Therefore, the broadcast message capacity is small, which solves the problem of concentrated message broadcast pressure and unbalanced load, and improves the performance bottleneck of the algorithm.
[0072] In an optional embodiment of the present disclosure, broadcasting a transaction proposal to multiple replica nodes may further include: determining the number of confirmation messages of the target transaction information; if the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold, obtaining a confirmation set of the target transaction information, the confirmation set of the target transaction information including the replica nodes corresponding to the confirmation messages of the target transaction information; broadcasting the transaction proposal and the confirmation set of the target transaction information to the multiple replica nodes.
[0073] When the leader node broadcasts a transaction proposal, the leader node can also decide whether to broadcast the confirmation set of the target transaction information according to the number of confirmation messages of the target transaction information in the transaction proposal. The confirmation set of the transaction information includes the replica node corresponding to the confirmation message of the transaction information. For example, the replica node Node1 receives the transaction information A sent by the client, can generate a confirmation message of the transaction information A, and send the confirmation message of the transaction information A to the leader node, then the replica node Node1 can be queried from the confirmation set of the transaction information A.
[0074] Specifically, a message quantity threshold t may be pre-set. If the number of confirmation messages of a transaction in the transaction pool maintained by the leader node is greater than the message quantity threshold t, the leader node will not include the confirmation set of the transaction when broadcasting the transaction proposal containing the transaction; conversely, if the number of confirmation messages of a transaction in the transaction pool maintained by the leader node is less than or equal to the message quantity threshold t, the leader node will include the confirmation set of the transaction when broadcasting the transaction proposal containing the transaction.
[0075] In the disclosed embodiment, after the leader node broadcasts the transaction proposal to each replica node, each replica node receives the transaction proposal and then queries whether the transaction text in the transaction proposal is missing, that is, whether the transaction text of each target transaction information in the transaction proposal exists locally at the node. If missing, it is necessary to ask other nodes for the transaction text. When the number of confirmation messages for a transaction is large (e.g., greater than the message number threshold t), it means that most replica nodes have the transaction text, and the node that lacks the transaction text can easily query the node that has the transaction text by random query; and when the number of confirmation messages for a transaction is small (e.g., less than or equal to the message number threshold t), it means that only a small number of replica nodes have the transaction text. At this time, the node that lacks the transaction may need multiple rounds of inquiries to find the transaction text, but if the leader node broadcasts the confirmation set of the transaction information, the replica node that has the transaction text can be determined based on the confirmation set of the transaction information, so that the node that has the transaction text can be directly queried.
[0076] If the leader node broadcasts the confirmation set of transaction information for all transactions in the transaction proposal, the capacity of the broadcast message will increase, resulting in additional broadcast costs; if the confirmation set of transaction information is not broadcast for all transactions in the transaction proposal, the transaction query efficiency will be reduced. In the disclosed embodiment, the leader node decides whether to broadcast the confirmation set of transaction information when broadcasting the proposal based on the number of confirmation messages of the transaction information, which can reduce the capacity of the broadcast message and the additional broadcast cost, improve the query efficiency of the transaction original text, and reduce the delay of the consensus processing process.
[0077] Figure 5 The present invention is a flowchart of a data processing method based on a blockchain network according to another exemplary embodiment. The blockchain network includes a leader node and multiple replica nodes, and the leader node and the replica nodes are nodes that need to reach a consensus.
[0078] Figure 5 The method shown is executed by a replica node and specifically includes the following steps.
[0079] Step S510: After receiving the transaction information sent by the client, generate a confirmation message of the received transaction information, and send the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal according to the confirmation messages of the transaction information sent by each replica node.
[0080] In this step, after receiving the transaction information sent by the client, the replica node can generate a confirmation message of the transaction information and send the confirmation message of the transaction information to the leader node. In this way, the leader node can receive the confirmation message of the transaction information sent by each replica node, and generate a transaction proposal in combination with at least one transaction information sent by the client, and then broadcast the transaction proposal to each replica node. The process of the leader node generating a transaction proposal has been described above, and will not be repeated here.
[0081] In the disclosed embodiment, the replica node may maintain a local transaction pool, and the transaction pool of the replica node stores the identifier of the received transaction information, the transaction original text of the received transaction information, and the transaction timestamp of the received transaction information. That is, after receiving the transaction information sent by the client, the replica node stores the identifier, the transaction original text, and the transaction timestamp of the transaction information in the local transaction pool.
[0082] Step S520: Receive the transaction proposal broadcast by the leader node to start the consensus processing of the transaction proposal.
[0083] In this step, the replica node receives the transaction proposal broadcast by the leader node, and then starts the consensus process of the transaction proposal. The specific implementation of the consensus process has been described in detail above, so it will not be repeated here.
[0084] In an optional embodiment of the present disclosure, after receiving the transaction proposal broadcast by the leader node, the data processing method based on the blockchain network may also include: obtaining an identifier of the target transaction information in the transaction proposal; querying the transaction text of the target transaction information from the transaction pool of the replica node based on the identifier of the target transaction information; if the query fails, initiating an inquiry process to obtain the transaction text of the target transaction information.
[0085] After receiving the transaction proposal, the replica node can obtain the identifier of the target transaction information in the transaction proposal, and then query the local transaction pool it maintains based on the identifier of the target transaction information to determine whether the transaction original of the target transaction information exists in the local transaction pool it maintains. If it exists, the transaction original of the target transaction information is obtained and filled in the transaction proposal for subsequent consensus processing; if it does not exist, the query process is initiated to obtain the transaction original of the target transaction information, and the transaction original of the target transaction information can be specifically requested from other replica nodes.
[0086] It should be noted that the replica nodes can also request the transaction text of the target transaction information from the leader node. Considering that if all replica nodes that are missing the transaction text request the transaction text from the leader node, it will lead to performance degradation, the preferred solution is to request the transaction text of the target transaction information from other replica nodes.
[0087] In an optional embodiment of the present disclosure, initiating an inquiry process to obtain the transaction text of the target transaction information may include: issuing a request to other replica nodes to obtain the transaction text of the target transaction information, where the other replica nodes are nodes other than the replica nodes among multiple replica nodes; and receiving the transaction text of the target transaction information returned by the other replica nodes.
[0088] The replica node queries the local transaction pool it maintains based on the identifier of the target transaction information in the transaction proposal. If the transaction text of the target transaction information is not found, it randomly sends a request to other nodes to obtain the transaction text of the target transaction information. After receiving the request, other nodes query whether the transaction text of the target transaction information exists in the local transaction pool they maintain. If it exists, the transaction text of the target transaction information can be returned to the replica node that sent the request; if it does not exist, the result of the request failure can be returned to the replica node that sent the request, and then the replica node can continue to ask for the transaction text of the target transaction information.
[0089] In the disclosed embodiment, when a replica node is missing the transaction text in a transaction proposal, it can randomly request the missing transaction text from other replica nodes without the need for additional data.
[0090] In an optional embodiment of the present disclosure, initiating an inquiry process to obtain a transaction text of target transaction information may include: obtaining a confirmation set of the target transaction information, the confirmation set of the target transaction information including a replica node corresponding to a confirmation message of the target transaction information; determining a replica node that has a transaction text of the target transaction information based on the confirmation set of the target transaction information; sending a request to the determined replica node to obtain the transaction text of the target transaction information, and receiving the transaction text of the target transaction information returned by the determined replica node.
[0091] The replica node searches the local transaction pool it maintains based on the identifier of the target transaction information in the transaction proposal. If the transaction text of the target transaction information is not found, it can determine whether the preset conditions are met. If the preset conditions are met, the confirmation set of the target transaction information can be obtained. The confirmation set of the target transaction information includes the replica node corresponding to the confirmation message of the target transaction information. Therefore, the replica node that owns the transaction text of the target transaction information can be determined based on the confirmation set of the target transaction message. In this way, the replica node can directly send a request to obtain the transaction text to the replica node that owns the transaction text of the target transaction information.
[0092] Furthermore, satisfying the preset conditions may include at least one of the following: the leader node broadcasts a confirmation set of the target transaction information; the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold; the network environment does not meet the preset network environment requirements.
[0093] If the leader node broadcasts the confirmation set of the target transaction information in the transaction proposal when broadcasting the transaction proposal, the replica node can obtain the confirmation set of the transaction information.
[0094] If the number of confirmation messages of the target transaction information in the transaction proposal is less than or equal to the preset message number threshold, it means that only a small number of replica nodes have the transaction original of the target transaction information. In this case, if the replica nodes know which replica nodes have the transaction original of the target transaction information, they can directly send the transaction original of all the target transaction information to these replica nodes.
[0095] If the network environment does not meet the preset network environment requirements, it means that the current network environment is poor. In this case, if the replica node that lacks the transaction text in the transaction proposal randomly asks other replica nodes for the transaction text, it will cause a long time to fail to obtain the required transaction text. Therefore, the replica node can first obtain the confirmation set of the target transaction information in the transaction proposal, and then determine the replica node that has the transaction text based on the confirmation set, and then directly ask the replica node that has the transaction text for the transaction text.
[0096] In the disclosed embodiment, when a replica node lacks the transaction text in a transaction proposal, the replica node that owns the transaction text can be obtained based on the confirmation set of the transaction information, and the replica node that owns the transaction text can be directly requested. This can speed up the acquisition of the transaction text and avoid a large number of nodes asking the same node for the transaction text.
[0097] Figure 6 A schematic diagram of the process of the BFT-SMaRt consensus algorithm according to an embodiment of the present application is shown. Figure 6 In the consensus algorithm, the consensus nodes may include the leader node and the replica nodes Node1, Node2, and Node3. The specific process of the consensus algorithm may include:
[0098] Step 1: The client sends transaction information including the transaction text to the leader node and replica nodes Node1, Node2, and Node3.
[0099] Step 2: After receiving the transaction information from the client, the replica nodes Node1, Node2, and Node3 send a confirmation message (Ack message) of receiving the transaction information to the leader node. Figure 6 The Ack phase of Phase 1 is shown below.
[0100] The BFT-SMaRt algorithm provided in the embodiment of the present application adds an Ack phase, but the Ack message of this phase is parallel to the subsequent consensus phase, so there is actually no increase in the process.
[0101] Step 3: The leader node selects the target transaction information in the local transaction pool it maintains based on the number of confirmation messages, such as giving priority to transaction information with a large number of confirmation messages, packages the identifiers of the selected transaction information into a transaction proposal, and broadcasts the transaction proposal to the replica nodes Node1, Node2, and Node3. Figure 6 The Propose phase of Phase 1 is shown below.
[0102] In the existing BFT-SMaRt algorithm, the leader node broadcasts the sorted transaction original text in the Propose phase. However, in the BFT-SMaRt algorithm of the embodiment of the present application, the leader node broadcasts the transaction proposal in the Propose phase, and the transaction proposal is generated by the identifier of the packaged transaction information, so the amount of messages broadcast by the leader node is greatly reduced.
[0103] Step 4: Each replica node searches for the transaction text of the target transaction information from the local transaction pool it maintains according to the transaction identifier of the target transaction information in the transaction proposal, fills the transaction proposal, and enters the Write phase. If the corresponding transaction text does not exist in the local transaction pool maintained by the replica node, the query process is initiated to obtain the transaction text. Figure 6 The Write phase of Phase 2 is shown below.
[0104] Step 5: All nodes wait to collect all transaction texts in the transaction proposal and collect Write phase messages. After completion, each node sends an Accept message and enters Phase 3. Figure 6 This is shown in the Accept phase of Phase 3.
[0105] Step 6: After consensus is completed, each node returns the consensus result to the client.
[0106] In step 3, the leader node can choose whether to include a confirmation set of certain transaction information in the transaction proposal when broadcasting the transaction proposal.
[0107] When the leader node broadcasts a transaction proposal, the leader node decides whether to include its confirmation set based on the number of confirmation messages of the transaction information. The confirmation set can be formed in the form of a threshold signature of the node receiving the message. Specifically, a message number threshold t can be set in advance. If the number of confirmation messages of a transaction in the transaction pool maintained by the leader node is greater than the message number threshold t, the leader node does not include the confirmation set of the transaction when broadcasting the transaction proposal containing the transaction; conversely, if the number of confirmation messages of a transaction in the transaction pool maintained by the leader node is less than or equal to the message number threshold t, the leader node includes the confirmation set of the transaction when broadcasting the transaction proposal containing the transaction.
[0108] In step 4, after receiving the transaction proposal sent by the leader node, if the replica node finds that the original transaction text of the transaction information in the transaction proposal does not exist in the transaction pool maintained by the replica node, it can start the inquiry process to ask other nodes for it. The specific method is as follows:
[0109] Method 1) Randomly ask other nodes for the missing transaction text. This method does not require additional data and is suitable for situations with good network environment or when there are many confirmation messages of transaction information in the transaction proposal.
[0110] Method 2) Based on the confirmation set of missing transaction information, ask the node that has the original transaction text for it. This method needs to be based on the confirmation set of transaction information, which is suitable for situations where the network environment is poor or the number of confirmation messages of transaction information in the transaction proposal is small.
[0111] The replica node can use method 1) or method 2) in an adaptive manner to obtain the missing transaction text. In addition, the replica node can also choose method 1) or method 2 based on whether the leader node broadcasts the confirmation set of the transaction information when broadcasting the transaction proposal. For example, when the leader node broadcasts the confirmation set of a transaction information in the transaction proposal, the replica node that lacks the transaction text of the transaction information can choose method 2) to obtain the transaction text, that is, determine the node that has the transaction text of the transaction information based on the confirmation set of the transaction information, and directly ask the node that has the transaction text for the transaction text.
[0112] Figure 7 A block diagram of a data processing device based on a blockchain network according to an embodiment of the present application is shown. Figure 7 The data processing device based on the blockchain network shown is applied to the leader node, including: a transaction information receiving module 710, a confirmation message receiving module 720, a transaction proposal generating module 730 and a transaction proposal broadcasting module 740.
[0113] Among them, the transaction information receiving module 710 can be used to: receive at least one transaction information sent by the client; the confirmation message receiving module 720 can be used to: receive the confirmation message of the transaction information sent by each replica node, and the confirmation message of the transaction information is a confirmation message generated after the replica node receives the transaction information sent by the client; the transaction proposal generating module 730 can be used to: generate a transaction proposal according to at least one transaction information and the confirmation message of the transaction information sent by each replica node; the transaction proposal broadcasting module 740 can be used to: broadcast the transaction proposal to multiple replica nodes to start the consensus processing process of the transaction proposal.
[0114] In an optional embodiment of the present disclosure, the transaction proposal generation module 730 may also be used to: determine the number of confirmation messages for each transaction information based on the confirmation messages of the transaction information sent by each replica node; select target transaction information from at least one transaction information based on the number of confirmation messages for each transaction information; and generate a transaction proposal based on the identifier of the target transaction information.
[0115] In an optional embodiment of the present disclosure, the transaction proposal broadcast module 740 may also be used to: determine the number of confirmation messages of the target transaction information; if the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold, obtain a confirmation set of the target transaction information, the confirmation set of the target transaction information including the replica nodes corresponding to the confirmation messages of the target transaction information; broadcast the transaction proposal and the confirmation set of the target transaction information to multiple replica nodes.
[0116] In an optional embodiment of the present disclosure, the leader node includes a transaction pool, and the transaction pool of the leader node is used to store the identifier of each transaction information, the transaction original text of each transaction information, the number of confirmation messages of each transaction information, and the transaction timestamp of each transaction information.
[0117] Figure 8 A block diagram of a data processing device based on a blockchain network according to another embodiment of the present application is shown. Figure 8 The blockchain network-based data processing device 800 shown is applied to a replica node, and includes: a confirmation message sending module 810 and a transaction proposal receiving module 820.
[0118] Among them, the confirmation message sending module 810 can be used to: after receiving the transaction information sent by the client, generate a confirmation message of the received transaction information, and send the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts the transaction proposal according to the confirmation message of the transaction information sent by each replica node; the transaction proposal receiving module 820 can be used to: receive the transaction proposal broadcast by the leader node to start the consensus processing process of the transaction proposal.
[0119] In an optional embodiment of the present disclosure, the data processing device 800 based on the blockchain network also includes a transaction text acquisition module 830, which can be used to: obtain the identifier of the target transaction information in the transaction proposal; query the transaction text of the target transaction information from the transaction pool of the replica node according to the identifier of the target transaction information; if the query fails, start the query process to obtain the transaction text of the target transaction information.
[0120] In an optional embodiment of the present disclosure, the transaction text acquisition module 830 can also be used to: send a request to other replica nodes to obtain the transaction text of the target transaction information, and the other replica nodes are nodes other than the replica nodes among multiple replica nodes; receive the transaction text of the target transaction information returned by the other replica nodes.
[0121] In an optional embodiment of the present disclosure, the transaction text acquisition module 830 can also be used to: if a preset condition is met, obtain a confirmation set of the target transaction information, the confirmation set of the target transaction information including the replica node corresponding to the confirmation message of the target transaction information; determine the replica node that has the transaction text of the target transaction information based on the confirmation set of the target transaction information; send a request to the determined replica node to obtain the transaction text of the target transaction information, and receive the transaction text of the target transaction information returned by the determined replica node.
[0122] In an optional embodiment of the present disclosure, satisfying the preset conditions includes at least one of the following: the leader node broadcasts a confirmation set of the target transaction information; the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold; the network environment does not meet the preset network environment requirements.
[0123] In an optional embodiment of the present disclosure, the replica node includes a transaction pool, and the transaction pool of the replica node is used to store the identifier of the received transaction information, the transaction original text of the received transaction information, and the transaction timestamp of the received transaction information.
[0124] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0125] Fig. 9 The structure block diagram of the electronic device according to the embodiment of the present application is shown. Fig. 9 hereinafter describes an electronic device 900 according to such an embodiment of the present disclosure. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0126] like Fig. 9As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
[0127] The storage unit stores program codes, and the program codes can be executed by the processing unit 910, so that the processing unit 910 executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 910 is a leader node in a blockchain network, and can perform the following steps: step S410, receiving at least one transaction information sent by a client; step S420, receiving a confirmation message of the transaction information sent by each replica node, wherein the confirmation message of the transaction information is a confirmation message generated by the replica node after receiving the transaction information sent by the client; step S430, generating a transaction proposal based on at least one transaction information and the confirmation message of the transaction information sent by each replica node; step S440, broadcasting the transaction proposal to multiple replica nodes to start the consensus processing process for the transaction proposal. For another example, the processing unit 910 is a replica node in the blockchain network and can perform the following steps: Step S510, after receiving the transaction information sent by the client, generate a confirmation message of the received transaction information, and send the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal based on the confirmation messages of the transaction information sent by each replica node; Step S520, receive the transaction proposal broadcast by the leader node to start the consensus processing process for the transaction proposal.
[0128] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 921 and a cache storage unit 922 , and may further include a read-only storage unit (ROM) 923 .
[0129] The storage unit 920 may also include a program / utility 924 having a set (at least one) of program modules 925, such program modules 925 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0130] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0131] The electronic device 900 may also communicate with one or more external devices 970 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0132] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0133] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of the device to complete the above method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0134] In an exemplary embodiment, a computer program product is also provided, including a computer program and instructions. When the computer program and the instructions are executed by a processor, the online file processing method in the above embodiment is implemented.
[0135] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0136] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method based on a blockchain network, characterized in that: The blockchain network includes a leader node and a plurality of replica nodes, and the method is performed by the leader node, including: receiving at least one transaction information sent by a client; Receiving a confirmation message of the transaction information sent by each of the replica nodes; wherein the confirmation message of the transaction information is a confirmation message generated by the replica node after receiving the transaction information sent by the client; Generate a transaction proposal according to the at least one transaction information and a confirmation message of the transaction information sent by each of the replica nodes; Broadcast the transaction proposal to the multiple replica nodes to start a consensus processing process for the transaction proposal.
2. The method according to claim 1, characterized in that The generating a transaction proposal according to the at least one transaction information and a confirmation message of the transaction information sent by each of the replica nodes comprises: Determine the number of confirmation messages for each of the transaction information according to the confirmation messages for the transaction information sent by each of the replica nodes; selecting target transaction information from the at least one transaction information according to the number of confirmation messages of each of the transaction information; The transaction proposal is generated according to the identifier of the target transaction information.
3. The method according to claim 2, characterized in that The broadcasting the transaction proposal to the multiple replica nodes includes: Determine the number of confirmation messages of the target transaction information; If the number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold, obtaining a confirmation set of the target transaction information, wherein the confirmation set of the target transaction information includes a replica node corresponding to the confirmation message of the target transaction information; Broadcast the transaction proposal and a confirmation set of the target transaction information to the multiple replica nodes.
4. The method according to any one of claims 1 to 3, characterized in that: The leader node includes a transaction pool, and the transaction pool of the leader node is used to store the identifier of each transaction information, the transaction original text of each transaction information, the number of confirmation messages of each transaction information, and the transaction timestamp of each transaction information.
5. A data processing method based on a blockchain network, characterized in that: The blockchain network includes a leader node and a plurality of replica nodes, and the method is performed by the replica nodes, including: After receiving the transaction information sent by the client, generate a confirmation message of the received transaction information, and send the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal according to the confirmation messages of the transaction information sent by each of the replica nodes; Receive the transaction proposal broadcast by the leader node to start a consensus processing process for the transaction proposal.
6. The method according to claim 5, characterized in that After receiving the transaction proposal broadcast by the leader node, the method further includes: Obtaining an identifier of target transaction information in the transaction proposal; According to the identifier of the target transaction information, query the transaction original text of the target transaction information from the transaction pool of the replica node; If the query fails, the query process is initiated to obtain the original transaction text of the target transaction information.
7. The method according to claim 6, characterized in that The initiating inquiry process to obtain the original transaction text of the target transaction information includes: Sending a request to other replica nodes to obtain the transaction original text of the target transaction information, wherein the other replica nodes are nodes other than the replica node among the multiple replica nodes; Receive the transaction original text of the target transaction information returned by the other replica nodes.
8. The method according to claim 6, characterized in that The initiating inquiry process to obtain the original transaction text of the target transaction information includes: If the preset condition is met, obtaining a confirmation set of the target transaction information, wherein the confirmation set of the target transaction information includes a replica node corresponding to a confirmation message of the target transaction information; Determine, according to the confirmation set of the target transaction information, a replica node that has the original transaction text of the target transaction information; A request for obtaining a transaction text of the target transaction information is sent to the determined replica node, and the transaction text of the target transaction information returned by the determined replica node is received.
9. The method according to claim 8, characterized in that The preset conditions are met, including at least one of the following: The leader node broadcasts a confirmation set of the target transaction information; The number of confirmation messages of the target transaction information is less than or equal to a preset message number threshold; The network environment does not meet the preset network environment requirements.
10. The method according to any one of claims 5 to 9, characterized in that: The replica node includes a transaction pool, and the transaction pool of the replica node is used to store an identifier of received transaction information, a transaction original text of the received transaction information, and a transaction timestamp of the received transaction information.
11. A data processing device based on a blockchain network, characterized in that: The blockchain network includes a leader node and a plurality of replica nodes, and the device is applied to the leader node, including: A transaction information receiving module, used to receive at least one transaction information sent by a client; A confirmation message receiving module, used to receive a confirmation message of the transaction information sent by each replica node; wherein the confirmation message of the transaction information is a confirmation message generated by the replica node after receiving the transaction information sent by the client; A transaction proposal generation module, configured to generate a transaction proposal according to the at least one transaction information and a confirmation message of the transaction information sent by each of the replica nodes; The transaction proposal broadcasting module is used to broadcast the transaction proposal to the multiple replica nodes to start the consensus processing process of the transaction proposal.
12. A data processing device based on a blockchain network, characterized in that: The blockchain network includes a leader node and a plurality of replica nodes, and the device is applied to the replica nodes, including: A confirmation message sending module, configured to generate a confirmation message of the received transaction information after receiving the transaction information sent by the client, and send the confirmation message of the transaction information to the leader node, so that the leader node generates and broadcasts a transaction proposal according to the confirmation messages of the transaction information sent by each of the replica nodes; The transaction proposal receiving module is used to receive the transaction proposal broadcast by the leader node to start the consensus processing process of the transaction proposal.
13. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the data processing method based on a blockchain network as described in any one of claims 1 to 4 is implemented, or the data processing method based on a blockchain network as described in any one of claims 5 to 10 is implemented.
14. An electronic device, characterized in that: include: processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the data processing method based on the blockchain network as described in any one of claims 1 to 4, or execute the data processing method based on the blockchain network as described in any one of claims 5 to 10, by executing the executable instructions.