Business Data Processing Method, Apparatus and Computer Readable Storage Medium

By dividing multiple consensus node groups in the blockchain distributed processing system and adopting multiple consensus operation mechanisms, the problems of insufficient fault tolerance and attack resistance of the consensus mechanism in the existing technology are solved, and higher system security, reliability and consensus efficiency are achieved.

CN116232744BActive Publication Date: 2025-06-13CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310261340.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2025-06-13
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

The fault tolerance and attack resistance of the consensus mechanism in the existing blockchain technology are weak, resulting in insufficient security and reliability of the system, and inflexible configuration of the number of nodes, affecting consensus efficiency.

Method used

By dividing multiple consensus node groups in the blockchain distributed processing system, each group includes one primary node and multiple secondary nodes, and using multiple consensus operation mechanisms, including the first consensus, the second consensus and the third consensus, to improve the security and reliability of the system and make the number of nodes more flexible.

Benefits of technology

It improves the attack resistance and fault tolerance of the data processing system, enhances the security and reliability of the system, and makes the configuration of the consensus structure more flexible, improving the overall consensus efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116232744B_ABST
    Figure CN116232744B_ABST
Patent Text Reader

Abstract

The present application provides a business data processing method, apparatus, and computer-readable storage medium, which are applied to the field of blockchain technology. Based on the above method, it is possible to first transform the consensus structure in the blockchain-based data processing system, divide at least a first number of consensus node groups participating in the consensus operation in the data processing system, and make each consensus node include at least a second number of nodes including a primary node and multiple secondary nodes; the client terminal and the above data processing system then perform multiple consensus operations through multiple data interactions based on the preset consensus rules improved based on the above consensus structure, and perform corresponding target business data processing when it is determined that the multiple consensus passes in sequence. Thereby, it is possible to better protect the security and reliability of the data processing system and improve the system's anti-attack ability; at the same time, it is also possible to make the configuration of the consensus structure in the data processing system relatively more flexible and improve the overall consensus efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of blockchain technology, and particularly relates to a method and apparatus for processing business data and a computer-readable storage medium. Background Art

[0002] In the field of blockchain technology, in order to ensure the consistency and security of business data processing, a consensus mechanism is often adopted to implement specific business data processing.

[0003] However, based on the existing consensus methods, when the system specifically processes business data, the fault tolerance is relatively poor and the anti-attack ability is relatively weak, resulting in the overall security and reliability of the system not meeting the increasingly high business requirements. At the same time, based on the existing consensus methods (such as POS, DPOS, etc.), it is often impossible to flexibly configure and adjust the number of nodes in the system, resulting in a relatively cumbersome system operation and a relatively low consensus efficiency, which will in turn affect the overall business data processing efficiency of the system. Especially when the scale of the system is large, the above problems will be more obvious.

[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] This application provides a method and apparatus for processing business data and a computer-readable storage medium, which can better protect the security and reliability of the data processing system and improve the anti-attack ability of the system. At the same time, it can also make the configuration of the consensus structure in the data processing system relatively more flexible and improve the overall consensus efficiency of the system.

[0006] This application provides a method for processing business data, which is applied to a client terminal. The method includes:

[0007] Sending a first detection message to a data processing system; wherein, the data processing system is a distributed processing system based on blockchain, the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, and each consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the client terminal;

[0008] Receiving and counting the number of first consensus result messages received within a first duration;

[0009] Detecting whether the number of first consensus result messages is greater than a preset number threshold;

[0010] When it is determined that the number of first consensus result messages is greater than a preset number threshold, send a target service data processing request to the data processing system; wherein, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in the consensus node group to which they belong according to a preset consensus rule; the first type of primary nodes perform a third consensus operation on the target service data processing request with other first type of primary nodes according to a preset consensus rule; wherein, the first type of primary nodes are the primary nodes in the consensus node group that have passed the second consensus on the target service data processing request.

[0011] Receive the second consensus result message fed back by the first type of primary nodes; wherein, when the third consensus of the first type of consensus nodes on the target service data processing request passes, the first type of consensus nodes feed back the second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request and perform corresponding target service data processing.

[0012] In one embodiment, before sending the first detection message to the data processing system, the method further includes:

[0013] Send a second detection message to each node in the data processing system; wherein, the second detection message is used to detect the node status of each node in the data processing system; each node in the data processing system responds to the second detection message and feeds back the current status information.

[0014] Receive and determine whether the current state of the data processing system meets the service data processing conditions according to the current state information of the nodes in the data processing system.

[0015] In one embodiment, the current state information includes at least one of the following: the total number of nodes, the number of online nodes, the node identifier of the node, the node group identifier of the consensus node group to which the node belongs, and the communication status parameter of the node.

[0016] In one embodiment, after receiving and determining whether the current state of the data processing system meets the service data processing conditions according to the current state information of the nodes in the data processing system, the method further includes:

[0017] When it is determined that the current state of the data processing system does not meet the service data processing conditions, after an interval of a second duration, re-send the second detection message to each node in the data processing system.

[0018] In one embodiment, the first detection message further carries association information of the target service data processing request; wherein, the association information includes at least one of the following: the operation type of the data processing operation related to the target service data processing request, the data type of the target service data targeted by the target service data processing request, and the user identification related to the target service data processing request.

[0019] In one embodiment, the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, including:

[0020] The primary nodes of the multiple consensus node groups respectively generate first confirmation information for the first detection message according to the preset consensus rule, and send the first confirmation information to the primary nodes of other consensus node groups;

[0021] The primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than a preset first ratio threshold;

[0022] When the primary node of the consensus node group determines that the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than the preset first ratio threshold, it determines that the first consensus on the first detection message passes.

[0023] In one embodiment, the data processing system further includes a monitoring node;

[0024] Correspondingly, after determining that the first consensus on the first detection message passes, the method further includes:

[0025] The monitoring node collects and determines the normal primary nodes and abnormal primary nodes among the primary nodes according to the first confirmation information sent by the primary nodes of the consensus node groups;

[0026] According to a preset reward rule, increase the reward data of the normal primary nodes and decrease the reward data of the abnormal primary nodes.

[0027] In one embodiment, after the primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than a preset first ratio threshold, the method further includes:

[0028] When the primary node of the consensus node group determines that the ratio of the number of the received first confirmation information to the number of the consensus node groups is less than or equal to the preset first ratio threshold, it generates a primary node anomaly prompt information and sends the primary node anomaly prompt information to the monitoring node;

[0029] The monitoring node responds to the master node abnormality prompt information, and determines the abnormal master node and the abnormal consensus node group to which the abnormal master node belongs according to the number of first confirmation information sent by the master nodes of the multiple consensus node groups;

[0030] The monitoring node sends a re-election master node instruction to the abnormal consensus node group; wherein the nodes in the abnormal consensus node group respond to the re-election master node instruction, and re-elect and determine the master node of the consensus node group according to the preset consensus rules.

[0031] In one embodiment, the master node and the slave node in each consensus node group respectively perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to a preset consensus rule, including:

[0032] The master node and the slave node in the consensus node group verify the target business data processing request in the consensus node group to which they belong according to the preset consensus rules, and if the verification is successful, generate and send verification success information to other nodes in the consensus node group;

[0033] The secondary node in the consensus node group sends second confirmation information to the primary node in the consensus node group to which it belongs, when determining that the ratio of the number of received verification pass information to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold;

[0034] The master node in the consensus node group counts and detects whether the ratio of the number of received second confirmation information to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold;

[0035] The master node in the consensus node group determines that the second consensus of the consensus node group on the target business data processing request is passed when it is determined that the ratio of the number of second confirmation information received to the number of nodes in the consensus node group is greater than a preset second ratio threshold.

[0036] In one embodiment, after the master node in the consensus node group counts and detects whether the ratio of the number of received second confirmation information to the number of nodes in the consensus node group is greater than a preset second ratio threshold, the method further includes:

[0037] The master node in the consensus node group detects whether there are faulty nodes in the consensus node group to which it belongs, and / or whether there are abnormal nodes in the consensus node group to which it belongs whose reward data does not meet the requirements, when determining that the ratio of the number of received second confirmation information to the number of nodes in the consensus node group to which it belongs is less than or equal to a preset second ratio threshold;

[0038] In the case that there are faulty nodes and / or abnormal nodes in the determined consensus node group, the primary node calls the standby nodes in the data processing system to replace the faulty nodes and / or abnormal nodes.

[0039] In one embodiment, the first type of primary node performs a third consensus operation on the target service data processing request according to a preset consensus rule with other first type of primary nodes, including:

[0040] The first type of primary node generates and sends third confirmation information to other primary nodes according to the preset consensus rule;

[0041] The first type of primary node counts and detects whether the ratio of the number of received third confirmation information to the number of consensus node groups is greater than a preset third ratio threshold;

[0042] When the first type of primary node determines that the ratio of the number of received third confirmation information to the number of consensus node groups is greater than the preset third ratio threshold, it determines that the third consensus on the target service data processing request passes.

[0043] This application also provides a service data processing method, which is applied to the primary node in the data processing system. The data processing system is a blockchain-based distributed processing system, and the data processing system includes at least a first number of consensus node groups. The consensus node group includes at least a second number of nodes. The consensus node group includes a primary node and multiple secondary nodes. The method includes:

[0044] Receiving a first detection message sent by the client terminal;

[0045] Performing a first consensus operation on the first detection message with other primary nodes according to a preset consensus rule;

[0046] When it is determined that the first consensus on the first detection message passes, sending a first consensus result message to the client terminal;

[0047] And receiving a target service data processing request sent by the client terminal based on the first consensus result message, and performing a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule;

[0048] When it is determined that the second consensus on the target service data processing request passes, performing a third consensus operation on the target service data processing request according to a preset consensus rule with other first type of primary nodes; where the first type of primary node is the primary node in the consensus node group that passes the second consensus on the target service data processing request;

[0049] When it is determined that the third consensus on the target service data processing request has passed, a second consensus result message is fed back to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0050] This application also provides a service data processing device, which is applied to a client terminal. The device includes:

[0051] A first sending module, configured to send a first detection message to the data processing system; wherein, the data processing system is a blockchain-based distributed system, the data processing system includes at least a first number of consensus node groups, the consensus node group includes at least a second number of nodes, and the consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message has passed, a first consensus result message is fed back to the client terminal respectively;

[0052] A first receiving module, configured to receive and count the number of first consensus result messages received within a first duration;

[0053] A detection module, configured to detect whether the number of first consensus result messages is greater than a preset number threshold;

[0054] A second sending module, configured to send a target service data processing request to the data processing system when it is determined that the number of first consensus result messages is greater than a preset number threshold; wherein, the primary nodes and secondary nodes in each consensus node group perform a second consensus operation on the target service data processing request in their respective consensus node groups according to a preset consensus rule; the primary nodes of the first type perform a third consensus operation on the target service data processing request with other primary nodes of the first type according to a preset consensus rule; wherein, the primary nodes of the first type are the primary nodes in the consensus node groups that have passed the second consensus on the target service data processing request;

[0055] A second receiving module, configured to receive the second consensus result message fed back by the primary nodes of the first type; wherein, when the third consensus on the target service data processing request by the first type of consensus nodes has passed, the first type of consensus nodes feed back the second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0056] The present application also provides a service data processing device, which is applied to a master node in a data processing system. The data processing system is a distributed processing system based on a blockchain. The data processing system includes at least a first number of consensus node groups. Each consensus node group includes at least a second number of nodes. Each consensus node group includes a master node and multiple slave nodes. The device includes:

[0057] A receiving module, configured to receive a first detection message sent by a client terminal;

[0058] A first consensus module, configured to perform a first consensus operation on the first detection message with other master nodes according to a preset consensus rule;

[0059] A first sending module, configured to send a first consensus result message to the client terminal when it is determined that the first consensus of the first detection message passes;

[0060] A second consensus module, configured to receive a target service data processing request sent by the client terminal based on the first consensus result message, and perform a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule;

[0061] A third consensus module, configured to perform a third consensus operation on the target service data processing request with other first-class master nodes according to a preset consensus rule when it is determined that the second consensus of the target service data processing request passes. The first-class master nodes are the master nodes in the consensus node groups where the second consensus of the target service data processing request passes;

[0062] A second sending module, configured to feedback a second consensus result message to the client terminal when it is determined that the third consensus of the target service data processing request passes. Nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0063] The present application also provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, relevant steps of the service data processing method are implemented.

[0064] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, relevant steps of the service data processing method are implemented.

[0065] Based on the business data processing method, device and computer-readable storage medium provided by the present application, before specific implementation, at least a first data amount of consensus node groups can be divided in the data processing system based on the effective non-faulty nodes in the data processing system as the transformed consensus structure; wherein each consensus node group includes at least a second number of nodes, and each consensus node group includes a master node and multiple slave nodes; in specific implementation, when the client needs to request the data processing system to process the target business data, a first detection message can be sent to the data processing system first; the master nodes of the multiple consensus node groups first perform a first consensus operation on the first detection message according to a preset consensus operation, and when it is determined that the first consensus on the first detection message is passed, it is determined that the consensus master node of the current data processing system meets the consensus reliability requirements, and the current data processing system also supports the processing of the target business data; when it is determined that the first consensus on the first detection message is passed, the master node feeds back a first consensus result message to the client terminal; the client terminal counts and calculates the result according to the first consensus operation. When the number of first consensus result messages received within a period of time determines that the consensus master node of the current data processing system does meet the consensus reliability requirements, a target business data processing request is sent to the data processing system; the master node and the slave node in each consensus node group can first perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to the preset consensus rules; when it is determined that the second consensus of the target business data processing request is passed by the consensus node group to which they belong, the master node, as a first-class master node, performs a third consensus operation on the target business data with other first-class consensus nodes according to the preset consensus rules; when it is determined that the third consensus on the target business data is passed, the first-class master node feeds back the second consensus result message to the client terminal, and the nodes in the data processing system respond to the target business data processing request to perform corresponding target business data processing; at the same time, the client terminal can determine that the second consensus is passed according to the second consensus result message fed back by the received first-class master node, and perform the requested target business data processing normally. Based on the above method, the consensus structure in the blockchain-based data processing system is first transformed to divide at least the first number of consensus node groups participating in the consensus operation in the data processing system, and each consensus node includes a main node and multiple sub-nodes, including at least the second number of nodes; the client terminal and the above data processing system then perform multiple consensus operations through multiple data interactions based on the preset consensus rules obtained by the above consensus structure improvement, and perform corresponding target business data processing when it is determined that multiple consensuses are passed in sequence. Thereby, the security and reliability of the data processing system can be better protected, the system's anti-attack capability can be improved, and the system has better fault tolerance; at the same time, the configuration of the consensus structure in the data processing system can be made relatively more flexible and diverse, and for large-scale data processing systems, the overall consensus efficiency of the system can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] To more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings in the following description are only some embodiments described in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0067] Figure 1 is a schematic flowchart of a service data processing method provided by an embodiment of this specification;

[0068] Figure 2 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0069] Figure 3 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0070] Figure 4 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0071] Figure 5 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0072] Figure 6 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0073] Figure 7 is a schematic diagram of an embodiment of applying the service data processing method provided by an embodiment of this specification in a scenario example;

[0074] Figure 8 is a schematic flowchart of a service data processing method provided by another embodiment of this specification;

[0075] Figure 9 is a schematic diagram of the structural composition of a server provided by an embodiment of this specification;

[0076] Figure 10 is a schematic diagram of the structural composition of a service data processing device provided by an embodiment of this specification;

[0077] Figure 11 is a schematic diagram of the structural composition of a service data processing device provided by another embodiment of this specification. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0078] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0079] It should be noted that the user-related information data involved in this application are obtained and used with the user's knowledge and consent, and the acquisition, storage, use, and processing of the above information data are in compliance with the relevant provisions of national laws and regulations.

[0080] See also Figure 1 As shown, the embodiment of this specification provides a business data processing method, wherein the method is specifically applied to the client terminal side. When implemented specifically, the method may include the following contents:

[0081] S101: Sending a first detection message to a data processing system; wherein the data processing system is a distributed processing system based on blockchain, the data processing system includes at least a first number of consensus node groups, the consensus node groups include at least a second number of nodes, the consensus node groups include a master node and multiple slave nodes; the master nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when determining that the first consensus on the first detection message is passed, respectively feedback a first consensus result message to the client terminal;

[0082] S102: Receive and count the number of first consensus result messages received within a first period of time;

[0083] S103: Detect whether the number of first consensus result messages is greater than a preset number threshold;

[0084] S104: When it is determined that the number of first consensus result messages is greater than a preset number threshold, a target business data processing request is sent to the data processing system; wherein the master node and the slave node in each consensus node group respectively perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to the preset consensus rule; the first-class master node performs a third consensus operation on the target business data processing request with other first-class master nodes according to the preset consensus rule; wherein the first-class master node is a master node in the consensus node group that passes the second consensus on the target business data processing request;

[0085] S105: Receive the second consensus result message fed back by the first type of primary node; wherein, when the third consensus on the target service data processing request passes among the first type of consensus nodes, the first type of consensus nodes feed back the second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request and perform corresponding target service data processing.

[0086] In some embodiments, the above nodes (or consensus nodes) can be specifically understood as node servers. For details, please refer to Figure 2 as shown.

[0087] Among them, the above node server can specifically include a background server applied to one side of the data processing system, which can implement functions such as data transmission and data processing. Specifically, the node server can be, for example, an electronic device with data operation, storage functions, and network interaction functions. Or, the node server can also be a software program running in the electronic device, providing support for data processing, storage, and network interaction. In this embodiment, the number of servers included in the node server is not specifically limited. The node server can specifically be one server, or several servers, or a server cluster formed by several servers.

[0088] The above data processing system can be specifically understood as a distributed processing system based on blockchain technology.

[0089] Specifically, the above data processing system specifically includes a modified consensus structure, which at least includes the first number of consensus node groups. For details, please refer to Figure 3 as shown. For example, consensus node group 1, consensus node group 2... consensus node group 5. Among them, each consensus node group contains at least the second number of nodes (or consensus nodes). For example, node 1, node 2... node 4. Further, each consensus node group contains at least one primary node (which can be denoted as the Leader node, or consensus primary node) and multiple secondary nodes (or consensus secondary nodes).

[0090] Specifically, for details, please refer to Figure 3 as shown. Inside the consensus node group, the nodes are connected pairwise. Outside the consensus node group, between different consensus node groups, they are connected pairwise through the primary nodes.

[0091] Among them, the above modified consensus structure can be specifically obtained by improving the design in combination with the idea of the Byzantine Fault Tolerance Algorithm (PBFT).

[0092] The above Byzantine fault tolerance algorithm is specifically a fault tolerance consensus algorithm for the Byzantine problem, which generally aims to reach a consensus in the case of reliable communication but possible node failures. In the PBFT algorithm, at most one-third of the total number of system nodes can tolerate Byzantine nodes' "betrayal", that is, if more than two-thirds of the nodes are normal, the entire system can work properly. Specifically, the above PBFT algorithm can use related technologies such as cryptography (for example, RSA signature algorithm, message authentication code, and digest) to ensure that the message cannot be tampered with or damaged during the process. In addition, based on the above PBFT algorithm, the data processing system and data processing process can have a relatively high fault tolerance rate. For example, the fault tolerance rate can reach (n - 1) / 3, where n is the number of nodes participating in the consensus operation. However, based on the above PBFT algorithm, when 1 / 3 or more of the nodes are abnormal or faulty, the overall system will not be able to continue working properly, and its security and reliability are relatively poor.

[0093] Specifically in the improvement, combining the PBFT algorithm idea, in order to make the data processing system have a relatively high fault tolerance rate, and at the same time to ensure that the above data processing system itself has good security and reliability, first in terms of structure, the consensus structure of the data processing system can be divided into multiple different consensus node groups, and each consensus node group contains a primary node and multiple secondary nodes. Based on the above transformed consensus structure, in terms of the processing flow, based on the improved consensus rules, by performing consensus operations within the consensus node groups respectively and between the consensus node groups based on the primary node, multiple consensus operations can be realized. Thus, it can be ensured that when the data processing system runs, while having good security, reliability, and anti-attack ability, it also has a relatively high fault tolerance rate.

[0094] Furthermore, the above first quantity can specifically be set as an integer greater than or equal to 4; the above second quantity can specifically be set as an integer greater than or equal to 4. Correspondingly, the total number of nodes included in the above data processing system is greater than or equal to 16. This can ensure that based on the transformed consensus structure, the consensus operation can be carried out more reliably and stably and has a relatively high fault tolerance rate.

[0095] In addition, the above data processing system also includes standby nodes. Among them, the standby nodes can specifically be understood as the consensus nodes in the data processing system that are not divided into the existing consensus node groups.

[0096] Before the specific implementation, the data processing system containing the improved consensus structure can be generated in the following way.

[0097] First, according to the volume of business data processed by the data processing system and the security requirements for business data processing, the number of groups of consensus node groups (e.g., it can be N) and the number of nodes included in each consensus node group (e.g., it can be M) can be determined. Among them, the number of groups of consensus node groups is greater than or equal to the first quantity, and the number of nodes included in the consensus node group is greater than or equal to the second quantity. And the above data information is configured into the blockchain network initialization file related to the data processing system. In addition, according to specific situations and processing requirements, an upper limit value for the number of nodes in each consensus node group can also be configured in the above blockchain network initialization file.

[0098] Next, when initializing the data processing system, according to the data information in the blockchain network initialization file, corresponding random numbers can be generated for each node respectively. Then, by using the random number of the node to perform a remainder operation on the number of groups of consensus node groups, the node group identifier (e.g., the group number of the consensus node group) of the consensus node group matched by the node is determined, that is, the node is divided into the matched consensus node group. For the consensus node group whose number of included nodes has reached the upper limit value, it will no longer participate in the subsequent division. In the above manner, the node group identifiers of the consensus node groups matched by each node can be determined respectively. It should be noted that in the data processing system, it is allowed that some nodes do not match a consensus node group, and such nodes do not directly participate in the consensus operation and can be used as standby nodes.

[0099] Then, during initialization, according to the node group identifier of the consensus node group matched by each node, in the shortest node network path manner, the nodes with the same node group identifier of the matched consensus node group are connected together as closely as possible in the shortest routing way to form multiple consensus node groups.

[0100] Furthermore, one of the nodes is elected by the nodes within the consensus node group to be the primary node, and the remaining nodes are the secondary nodes. Specifically, for example, the primary node 1-1 in consensus node group 1, the primary node 2-1 in consensus node group 2... the primary node 5-1 in consensus node group 5.

[0101] Specifically, within each consensus node group, each node can perform elections and consensus according to the PBFT algorithm to jointly determine the primary node and secondary nodes in the affiliated consensus node group.

[0102] Subsequently, if there are new nodes to join the data processing system, the new nodes can be first connected to the data processing system as standby nodes.

[0103] In addition, monitoring nodes can also be set in the above data processing system.

[0104] During specific implementation, the monitoring node can monitor the performance of each node in the consensus structure during each consensus operation, and allocate corresponding reward data (or points) to each node according to the performance of each node. For nodes whose performance does not meet the requirements, the corresponding reward data is deducted for punishment. Furthermore, the data processing system can accurately identify and determine the abnormal nodes (e.g., malicious nodes) and / or faulty nodes in the consensus structure based on the cumulative reward data of each node; and promptly remove the above nodes from the consensus structure, and introduce the corresponding number of standby nodes for supplementary replacement. Thus, the configuration of the consensus structure in the data processing system can be made relatively more flexible and simple.

[0105] Specifically, the above client terminal can include a front-end applied to the user side that can implement functions such as data collection and data transmission. Specifically, the client terminal can be, for example, an electronic device such as a desktop computer, a tablet computer, a laptop computer, a mobile phone, etc. Or, the client terminal can also be a software application that can run on the above electronic devices. For example, it can be a certain client APP running on a mobile phone, etc.

[0106] Refer to Figure 2 As shown, when a user needs to process target business data through the data processing system, the user can first use the client terminal to connect to the data processing system and initiate a target business data processing request to the data processing system; then interact with the data processing system through the client terminal to safely and efficiently complete the required target business data processing based on the consensus mechanism.

[0107] Among them, according to the specific business scenario, the above target business data processing can specifically be querying target account data, or canceling target bills, or writing target consumption records, etc.

[0108] In some embodiments, specifically, for example, the above target business data can be resource data (such as funds, assets, etc.) stored in the blockchain for implementing specific job projects (such as construction project, software development project, etc.). Correspondingly, the nodes participating in the consensus operation in the above consensus structure can specifically be the node servers of the auditing parties responsible for auditing the usage of resource data based on relevant protocol contracts. Among them, the above auditing parties can specifically be resource providers, resource regulatory agencies, etc., such as banks, suppliers, etc. The above client terminal can specifically be the client terminal of the project implementer (such as the construction party, the contracting party, etc.) that needs to retrieve and use relevant resource data.

[0109] When the project implementer needs to retrieve and use relevant resource data to implement a specific operation project, the client terminal can be used to send a target business data processing request for retrieving and using resource data to the above data processing system. Correspondingly, the consensus nodes in the data processing system can perform multiple consensus operations through multiple data interactions according to the business data processing method provided in this application and the preset consensus rules; only when it is determined that the multiple consensuses pass in sequence will it be finally determined that the consensus on the target business data processing request passes, and in response to the target business data processing request, the corresponding resource data will be allocated to the project implementer for specific project operations; at the same time, a record will also be stored in the blockchain for subsequent backtracking and querying.

[0110] In some embodiments, the above first detection message can be specifically understood as a message information mainly used to detect whether the consensus master node in the current data processing system meets the reliability requirements.

[0111] Furthermore, the above first detection message can also carry the associated information of the target business data processing request; wherein, the associated information can specifically include at least one of the following: the operation type of the data processing operation related to the target business data processing request, the data type of the target business data targeted by the target business data processing request, the user identifier related to the target business data processing request, etc.

[0112] It should be noted that the above-listed associated information is only an illustrative explanation. In specific implementation, according to the specific application scenario and processing requirements, the above associated information can also include other information related to the target business data processing request. This specification does not make any limitations in this regard.

[0113] Among them, the operation type can specifically include any one of the following listed: writing data, querying information, verifying information, updating documents, deleting documents, etc.

[0114] Correspondingly, based on the associated information carried in the above first detection message, it is also possible to preliminarily detect whether the nodes in the current data processing system can support the completion of the target business data processing required by the user.

[0115] The above preset consensus rules can be specifically understood as a consensus rule based on the improvement of the PBFT algorithm and matching the consensus structure after the transformation of the data processing system, which supports a multiple consensus mechanism.

[0116] In specific implementation, the message header of the above first detection message can contain a first type identifier corresponding to the first detection message. After receiving the message sent by the client terminal, the data processing system identifies the first detection message according to the first type identifier in the message header and distributes the first detection message to the master nodes of each consensus node group in each consensus structure.

[0117] After receiving the first detection message, the primary nodes of each consensus node group can perform a first consensus operation on the first detection message with other primary nodes according to the preset consensus rules. When it is determined that the first consensus on the first detection message passes, the primary node feeds back a first consensus result message to the client terminal.

[0118] In some embodiments, referring to Figure 4 as shown, the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to the preset consensus rules. The specific implementation may include:

[0119] S1: The primary nodes of the multiple consensus node groups respectively generate first confirmation information for the first detection message according to the preset consensus rules, and send the first confirmation information to the primary nodes of other consensus node groups;

[0120] S2: The primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than a preset first ratio threshold;

[0121] S3: When the primary node of the consensus node group determines that the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than the preset first ratio threshold, it determines that the first consensus on the first detection message passes.

[0122] Specifically, each primary node can verify according to the data information included in the received first detection message, and generate first confirmation information when the verification passes. Among them, the preset first ratio threshold can specifically be 2 / 3.

[0123] In some embodiments, referring to Figure 5 as shown, the data processing system may further specifically include monitoring nodes;

[0124] Correspondingly, after it is determined that the first consensus on the first detection message passes, when the method is specifically implemented, the following content may further be included:

[0125] S1: The monitoring node collects and determines the normal primary nodes and abnormal primary nodes among the primary nodes according to the first confirmation information sent by the primary nodes of the consensus node group;

[0126] S2: According to the preset reward rules, increase the reward data of the normal primary nodes and reduce the reward data of the abnormal primary nodes.

[0127] During specific implementation, when the monitoring node detects that the first confirmation information sent by a certain primary node is different from that sent by most other primary nodes, or the difference value is greater than a preset difference threshold, it can determine that the primary node is an abnormal primary node or a malicious primary node. And reduce the cumulative reward data of the abnormal primary node and impose targeted penalties.

[0128] In addition, when the monitoring node detects that the number of first confirmation information sent by a certain primary node is 0, or less than a preset lower limit value, it can determine that the primary node is a faulty primary node. Similarly, the cumulative reward data of the faulty primary node can also be reduced.

[0129] The monitoring node can determine the other primary nodes among the primary nodes except the abnormal primary nodes and the faulty primary nodes as normal primary nodes, and increase the cumulative reward data of the normal primary nodes and impose targeted rewards.

[0130] Based on the above embodiments, the data processing system can accurately monitor the specific performance of each primary node during the first consensus operation through the monitoring node, and allocate or deduct the corresponding reward data according to the performance of each primary node.

[0131] In some embodiments, after the primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of first confirmation information received to the number of consensus node groups is greater than a preset first ratio threshold, when the method is specifically implemented, the following content may further be included:

[0132] S1: When the primary node of the consensus node group determines that the ratio of the number of first confirmation information received to the number of consensus node groups is less than or equal to the preset first ratio threshold, generate a primary node abnormality prompt message and send the primary node abnormality prompt message to the monitoring node;

[0133] S2: The monitoring node responds to the primary node abnormality prompt message, and determines the abnormal primary node and the abnormal consensus node group to which the abnormal primary node belongs according to the number of first confirmation information sent by the primary nodes of the multiple consensus node groups;

[0134] S3: The monitoring node sends a reselect primary node instruction to the abnormal consensus node group; wherein, the nodes in the abnormal consensus node group respond to the reselect primary node instruction and re-elect and determine the primary node of the consensus node group according to the preset consensus rules.

[0135] During specific implementation, the nodes in the abnormal consensus node group can respond to the re-election master node instruction, query the cumulative reward data of each node according to the preset consensus rules, determine the node with the highest cumulative reward data as the candidate master node, generate voting information about the candidate master node, and send the voting information to other nodes. At the same time, receive the voting information sent by other nodes. The nodes in the abnormal consensus node group can determine the candidate master node with the highest number of votes as the re-elected master node according to the received voting information, perform consensus on the master node, and replace the master node in the abnormal consensus node group with the re-elected master node.

[0136] After the abnormal consensus node group re-elects and determines the master node of the consensus node group, the master node of the data processing system can re-perform the first consensus operation on the first detection message.

[0137] In some embodiments, during specific implementation, for the abnormal master node (or faulty master node) in the abnormal consensus node group, the monitoring node can also detect whether the cumulative reward data of the abnormal master node is less than the preset reward data lower limit value. When it is determined that the cumulative reward data of the abnormal master node is less than the preset reward data lower limit value, it can be determined that the abnormal master node is completely unable to participate in the consensus operation normally. At this time, the abnormal master node can be directly removed from the consensus node group to which it belongs, and the node with the highest cumulative reward data in the data processing system or the standby node with the longest cumulative duration in the standby state can be preferentially selected and added to the consensus node grouping to participate in the subsequent master node election and consensus.

[0138] When it is determined that the cumulative reward data of the abnormal master node is greater than the preset reward data lower limit value, the monitoring node may not directly remove the abnormal master node. The nodes in the abnormal consensus node group can re-elect and consensus a new master node based on the remaining nodes except the abnormal master node.

[0139] After determining the new master node, the new master node and other slave nodes can also perform a consensus operation within the consensus node group on whether to remove the previous abnormal master node and add a standby node.

[0140] In some embodiments, before sending the first detection message to the data processing system, when the method is specifically implemented, the following content may further be included:

[0141] S1: Send a second detection message to each node in the data processing system; wherein, the second detection message is used to detect the node status of each node in the data processing system; each node in the data processing system responds to the second detection message and feeds back the current status information;

[0142] S2: Receive and determine, based on the current status information of the nodes in the data processing system, whether the current status of the data processing system meets the business data processing conditions.

[0143] Among them, the above second detection message can be specifically used to detect the basic current status information of each node in the data processing system.

[0144] Specifically, the current status information may include at least one of the following: the total number of nodes, the number of online nodes, the node identifier of the node, the node group identifier of the consensus node group to which the node belongs, the communication status parameter of the node, etc.

[0145] Of course, the above-listed current status information is only an illustrative description. In specific implementation, according to the specific business processing scenario and processing requirements, the above current status information may also include other types of status information such as whether the nodes have been combined into a consensus node group, the latest geographical location of the nodes, the network congestion situation of the nodes, the latest block height packed by the nodes, the identity ID of the nodes, etc. This specification does not make any limitations in this regard.

[0146] Based on the above embodiments, before specific implementation, the client terminal can send a second detection message to obtain and detect, based on the node status of each node in the data processing system, whether the current status of the data processing system meets the business data processing conditions. Only when it is determined that the conditions are met will the first detection message be sent for subsequent data processing, thereby further ensuring the stability and reliability of subsequent target business data processing.

[0147] In some embodiments, after receiving and determining, based on the current status information of the nodes in the data processing system, whether the current status of the data processing system meets the business data processing conditions, when the method is specifically implemented, it may further include the following: when it is determined that the current status of the data processing system does not meet the business data processing conditions, after an interval of a second duration, the second detection message is resent to each node in the data processing system. Only when it is determined that the current status of the data processing system meets the business data processing conditions will the client terminal send the first detection message to the data processing system.

[0148] In some embodiments, the above data processing system may specifically be further provided with a timer for monitoring and prompting the first duration and / or the second duration. Among them, the specific values of the above first duration and second duration can be obtained by clustering based on the historical processing records of a large amount of historical business data for the historical normal data processing system.

[0149] In some embodiments, refer to Figure 6As shown, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in the consensus node group to which they belong according to the preset consensus rules. Specifically, the following may be included in the implementation:

[0150] S1: The primary node and secondary node in the consensus node group verify the target service data processing request in the consensus node group to which they belong according to the preset consensus rules. When it is determined that the verification is passed, a verification passed message is generated and sent to other nodes in the consensus node group;

[0151] S2: When the secondary node in the consensus node group determines that the ratio of the number of received verification passed messages to the number of nodes in the consensus node group to which it belongs is greater than the preset second ratio threshold, a second confirmation message is sent to the primary node in the consensus node group to which it belongs;

[0152] S3: The primary node in the consensus node group counts and detects whether the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than the preset second ratio threshold;

[0153] S4: The primary node in the consensus node group, when it is determined that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than the preset second ratio threshold, determines that the second consensus of the consensus node group to which it belongs on the target service data processing request passes.

[0154] Among them, the preset second ratio threshold may specifically be 2 / 3.

[0155] Specifically in the implementation, within the consensus node group, each node can verify data information such as whether the target service data processing request has been tampered with, whether the target service data processing request complies with the specifications, and whether the execution of the target service data processing request has the corresponding permissions. When the verification is passed, a verification passed message is sent to other nodes in the same consensus node group.

[0156] When the primary node determines that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than the preset second ratio threshold, it determines that the second consensus of the consensus node group to which it belongs on the target service data processing request passes, and completes the first - layer consensus operation on the target service data processing request within the consensus node group.

[0157] When it is determined that the second consensus of the consensus node group to which it belongs on the target service data processing request passes, the primary node of this consensus node group can be used as the first - type primary node and continue to perform the second - layer consensus operation on the target service data processing request outside the consensus node group, between different consensus node groups.

[0158] In some embodiments, when the ratio of the number of the received second confirmation messages counted and detected by the primary node in the consensus node group to the number of nodes in the consensus node group to which it belongs is less than or equal to a preset second ratio threshold, it is determined that the second consensus of the consensus node group for the target service data processing request fails. At this time, the primary node of this consensus node group will not be able to participate in the subsequent second-round consensus for the target service data processing request as a type-1 node.

[0159] In some embodiments, refer to Figure 7 As shown, after the primary node in the consensus node group counts and detects whether the ratio of the number of the received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, when the method is specifically implemented, the following content may further be included:

[0160] S1: When the primary node in the consensus node group determines that the ratio of the number of the received second confirmation messages to the number of nodes in the consensus node group to which it belongs is less than or equal to a preset second ratio threshold, it detects whether there are faulty nodes in the consensus node group to which it belongs, and / or whether there are abnormal nodes in the consensus node group to which it belongs whose reward data does not meet the requirements;

[0161] S2: When it is determined that there are faulty nodes and / or abnormal nodes in the consensus node group to which it belongs, the primary node calls the standby nodes in the data processing system to replace the faulty nodes and / or abnormal nodes.

[0162] Specifically in implementation, the primary node can determine whether there are faulty nodes by obtaining and based on the second confirmation messages sent by the nodes in the consensus node group; the primary node can determine whether there are abnormal nodes by detecting the cumulative reward data of the nodes.

[0163] Based on the above embodiments, the abnormal nodes and / or faulty nodes in the consensus node group can be accurately discovered and identified by the primary nodes in each consensus node group, and the standby nodes can be called in a timely and flexible manner to replace the abnormal nodes and / or faulty nodes, so as to ensure the overall stability and reliability of the data processing system.

[0164] In some embodiments, for the abnormal nodes (including: primary nodes and secondary nodes) removed from the consensus node grouping, the data processing system can reset the cumulative reward data of this abnormal node to 0, mark this abnormal node as a standby node, and initialize the cumulative duration in the standby state to 0 and then start timing.

[0165] For a faulty node removed from the consensus node group, the data processing system can perform further and more refined fault analysis on the faulty node, and perform targeted fault repair on the node according to the fault analysis result. After determining that the faulty node is successfully repaired, the node is reconnected to the data processing system as a standby node.

[0166] In some embodiments, the above-mentioned first type of primary node performs a third consensus operation on the target service data processing request according to a preset consensus rule. Specifically, when implemented, it may include the following:

[0167] S1: The first type of primary node generates and sends third confirmation information to other primary nodes according to the preset consensus rule;

[0168] S2: The first type of primary node counts and detects whether the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than a preset third ratio threshold;

[0169] S3: When the first type of primary node determines that the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than the preset third ratio threshold, it determines that the third consensus on the target service data processing request passes.

[0170] Among them, the preset third ratio threshold can specifically be 2 / 3. The second consensus result message may specifically also carry a request identifier of the target service data processing request, for example, the request serial number of the target service data processing request, the sequence number of the target service data processing request, etc.

[0171] Based on the above embodiments, the first type of primary node can perform a second-level consensus on the target service data processing request between different consensus node groups outside the consensus node group according to the preset consensus rule.

[0172] In some embodiments, when the first type of primary node determines that the third consensus passes, it can respectively send a second consensus result message to the client terminal; correspondingly, after receiving the second consensus result message, the client terminal can determine that the data processing system passes the consensus on the target service data processing request.

[0173] In addition, the first type of primary node can also broadcast the second consensus result message to the data processing system. After receiving the above second consensus result message, the nodes in the data processing system can determine the target service data processing request passed by the data processing system according to the request identifier of the target service data processing request in the second consensus result message; and then can perform corresponding target service data processing according to the target service data processing request; and write the processing record and processing result of the target service data processing into the blockchain.

[0174] The client terminal can obtain the processing result of the target service data processing by querying the blockchain; it can also obtain and backtrack the target service data processing according to the processing record of the target service data processing by querying the blockchain.

[0175] In some embodiments, when the first type of primary node determines that the ratio of the number of the received third confirmation messages to the number of groups of consensus nodes is less than or equal to a preset third ratio threshold, it can determine that the third consensus on the target service data processing request fails. At this time, the first type of primary node can separately send a failure prompt to the client terminal.

[0176] As can be seen from the above, based on the business data processing method provided in the embodiment of this specification, before specific implementation, at least the first data amount consensus node groups can be divided in the data processing system based on the valid nodes in the data processing system; wherein each consensus node group includes at least the second number of nodes, and each consensus node group includes a master node and multiple slave nodes. In specific implementation, when the client needs to request the data processing system to process the target business data, it can first send a first detection message to the data processing system; the master node of multiple consensus node groups first performs a first consensus operation on the first detection message according to the preset consensus operation, and when it is determined that the first consensus of the first detection message is passed, it is determined that the consensus master node of the current data processing system meets the consensus reliability requirements, and the current data processing system also supports the processing of target business data; when it is determined that the first consensus of the first detection message is passed, the master node feeds back the first consensus result message to the client terminal; the client terminal counts and determines that the consensus master node of the current data processing system does meet the consensus reliability requirements based on the number of first consensus result messages received within the first time period, and sends a target business data processing request to the data processing system. ; The master node and the slave node in each consensus node group can first perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to the preset consensus rules; when it is determined that the second consensus on the target business data processing request is passed by the consensus node group to which they belong, the master node, as a first-class master node, performs a third consensus operation on the target business data with other first-class consensus nodes according to the preset consensus rules; when it is determined that the third consensus on the target business data is passed, the first-class master node feeds back a second consensus result message to the client terminal, and the nodes in the data processing system respond to the target business data processing request to perform corresponding target business data processing; at the same time, the client terminal can determine that the second consensus is passed based on the second consensus result message fed back by the received first-class master node, and perform the requested target business data processing normally. By first transforming the consensus structure in the blockchain-based data processing system, at least the first number of consensus node groups participating in the consensus operation are divided in the data processing system, and each consensus node includes a main node and multiple sub-nodes, including at least the second number of nodes; the client terminal and the above-mentioned data processing system then perform multiple consensus operations through multiple data interactions based on the preset consensus rules obtained by the above-mentioned consensus structure improvement, and perform corresponding target business data processing when it is determined that multiple consensuses are passed in sequence. Thereby, the security and reliability of the data processing system can be better protected, the anti-attack capability can be improved, and it has better fault tolerance; at the same time, it can also make the configuration of the consensus structure in the data processing system relatively more flexible, and for large-scale data processing systems, it can effectively improve the overall consensus efficiency of the system.

[0177] See alsoFigure 8 As shown, an embodiment of this specification also provides a method for processing service data. Specifically, this method is applied to the master node side in a data processing system. The data processing system is a distributed processing system based on a blockchain. The data processing system includes at least a first number of consensus node groups. Each consensus node group includes at least a second number of nodes. Each consensus node group includes a master node and multiple slave nodes. When this method is specifically implemented, it may include the following:

[0178] S801: Receive a first detection message sent by a client terminal;

[0179] S802: According to a preset consensus rule, perform a first consensus operation on the first detection message with other master nodes;

[0180] S803: When it is determined that the first consensus on the first detection message passes, send a first consensus result message to the client terminal;

[0181] S804: And receive a target service data processing request sent by the client terminal based on the first consensus result message, and perform a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule;

[0182] S805: When it is determined that the second consensus on the target service data processing request passes, perform a third consensus operation on the target service data processing request with other first - type master nodes according to a preset consensus rule; where the first - type master nodes are the master nodes in the consensus node groups for which the second consensus on the target service data processing request passes;

[0183] S806: When it is determined that the third consensus on the target service data processing request passes, feedback a second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0184] An embodiment of this specification further provides a client terminal, including a processor and a memory for storing executable instructions of the processor. When specifically implemented, the processor may execute the following steps according to the instructions: sending a first detection message to a data processing system; wherein, the data processing system is a distributed processing system based on a blockchain, and the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, and each consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the client terminal; receiving and counting the number of first consensus result messages received within a first duration; detecting whether the number of first consensus result messages is greater than a preset number threshold; when it is determined that the number of first consensus result messages is greater than the preset number threshold, sending a target service data processing request to the data processing system; wherein, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in their respective consensus node groups according to a preset consensus rule; the primary nodes of the first type perform a third consensus operation on the target service data processing request with other primary nodes of the first type according to a preset consensus rule; wherein, the primary nodes of the first type are the primary nodes in the consensus node groups where the second consensus on the target service data processing request passes; receiving a second consensus result message feedback by the primary nodes of the first type; wherein, when the third consensus on the target service data processing request by the first type of consensus nodes passes, the first type of consensus nodes feedback a second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0185] Referring to Figure 9 As shown, an embodiment of this specification further provides a specific server. Wherein, the server includes a network communication port 901, a processor 902, and a memory 903. The above structures are connected by internal cables so that each structure can perform specific data interaction.

[0186] Wherein, the network communication port 901 may specifically be used to receive the first detection message sent by the client terminal;

[0187] The processor 902 may specifically be used to perform a first consensus operation on the first detection message with other primary nodes according to a preset consensus rule; when it is determined that the first consensus on the first detection message passes, send a first consensus result message to the client terminal.

[0188] In addition, the network communication port 901 can specifically be further configured to receive a target service data processing request sent by a client terminal based on a first consensus result message, and perform a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule;

[0189] The processor 902 can specifically be further configured to, when it is determined that the second consensus on the target service data processing request passes, perform a third consensus operation on the target service data processing request with other first-type master nodes according to a preset consensus rule; wherein, the first-type master nodes are the master nodes in the consensus node group that have passed the second consensus on the target service data processing request; when it is determined that the third consensus on the target service data processing request passes, feedback a second consensus result message to the client terminal; and the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0190] The memory 903 can specifically be used to store corresponding instruction programs.

[0191] In this embodiment, the network communication port 901 can be bound to different communication protocols, so as to send or receive different data. For example, the network communication port can be a port responsible for web data communication, or a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0192] In this embodiment, the processor 902 can be implemented in any suitable manner. For example, the processor can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not make any limitations.

[0193] In this embodiment, the memory 903 can include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit without a physical form but having a storage function is also called a memory, such as a RAM, a FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.

[0194] The embodiments of this specification also provide a computer-readable storage medium based on the above business data processing method. The computer-readable storage medium stores computer program instructions, which when executed, implement the following: sending a first detection message to a data processing system; wherein the data processing system is a blockchain-based distributed processing system, and the data processing system includes at least a first number of consensus node groups. Each consensus node group includes at least a second number of nodes, and each consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, they respectively feedback a first consensus result message to the client terminal; receiving and counting the number of first consensus result messages received within a first duration; detecting whether the number of first consensus result messages is greater than a preset number threshold; when it is determined that the number of first consensus result messages is greater than the preset number threshold, sending a target business data processing request to the data processing system; wherein the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target business data processing request in their respective consensus node groups according to the preset consensus rule; the primary nodes of the first type perform a third consensus operation on the target business data processing request with other primary nodes of the first type according to the preset consensus rule; wherein the primary nodes of the first type are the primary nodes in the consensus node groups that have passed the second consensus on the target business data processing request; receiving the second consensus result messages feedback by the primary nodes of the first type; wherein when the third consensus on the target business data processing request by the first type of consensus nodes passes, the first type of consensus nodes feedback the second consensus result messages to the client terminal; the nodes in the data processing system respond to the target business data processing request to perform corresponding target business data processing.

[0195] In this embodiment, the above storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk drive (HDD), or a memory card. The memory can be used to store computer program instructions. The network communication unit can be set according to the standards specified by the communication protocol and is used for the interface of network connection communication.

[0196] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained by comparison with other embodiments and will not be elaborated here.

[0197] The embodiments of this specification also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the following steps are implemented: sending a first detection message to a data processing system; wherein, the data processing system is a blockchain-based distributed processing system, the data processing system includes at least a first number of consensus node groups, the consensus node group includes at least a second number of nodes, and the consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the client terminal; receiving and counting the number of first consensus result messages received within a first duration; detecting whether the number of first consensus result messages is greater than a preset number threshold; when it is determined that the number of first consensus result messages is greater than the preset number threshold, sending a target service data processing request to the data processing system; wherein, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in the consensus node group to which they belong according to a preset consensus rule; the primary nodes of the first type perform a third consensus operation on the target service data processing request with other primary nodes of the first type according to a preset consensus rule; wherein, the primary nodes of the first type are the primary nodes in the consensus node groups that have passed the second consensus on the target service data processing request; receiving a second consensus result message feedback by the primary nodes of the first type; wherein, when the third consensus on the target service data processing request by the first type of consensus nodes passes, the first type of consensus nodes feedback a second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

[0198] Refer to Figure 10 As shown, at the software level, the embodiments of this specification also provide a service data processing device, which may specifically include the following structural modules:

[0199] A first sending module 1001, which may specifically be used to send a first detection message to a data processing system; wherein, the data processing system is a blockchain-based distributed system, the data processing system includes at least a first number of consensus node groups, the consensus node group includes at least a second number of nodes, and the consensus node group includes a primary node and multiple secondary nodes; the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the client terminal;

[0200] A first receiving module 1002, which may specifically be used to receive and count the number of first consensus result messages received within a first duration;

[0201] The detection module 1003 may be specifically used to detect whether the number of first consensus result messages is greater than a preset number threshold;

[0202] The second sending module 1004 can be specifically used to send a target business data processing request to the data processing system when it is determined that the number of first consensus result messages is greater than a preset number threshold; wherein the master node and the slave node in each consensus node group respectively perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to the preset consensus rule; the first-class master node performs a third consensus operation on the target business data processing request with other first-class master nodes according to the preset consensus rule; wherein the first-class master node is a master node in the consensus node group that passes the second consensus on the target business data processing request;

[0203] The second receiving module 1005 can be specifically used to receive the second consensus result message fed back by the first type of master node; wherein, when the third consensus of the first type of consensus node on the target business data processing request is passed, the first type of consensus node feeds back the second consensus result message to the client terminal; the nodes in the data processing system respond to the target business data processing request to perform corresponding target business data processing.

[0204] In some embodiments, before sending a first detection message to a data processing system, the device can also be used to send a second detection message to each node in the data processing system when it is implemented; wherein the second detection message is used to detect the node status of each node in the data processing system; each node in the data processing system responds to the second detection message and feeds back current status information; receives and determines whether the current status of the data processing system meets the business data processing conditions based on the current status information of the nodes in the data processing system.

[0205] In some embodiments, the current status information may specifically include at least one of the following: the total number of nodes, the number of online nodes, the node identification of the node, the node group identification of the consensus node group to which the node belongs, the communication status parameters of the node, etc.

[0206] In some embodiments, after receiving and determining whether the current state of the data processing system meets the business data processing conditions based on the current state information of the nodes in the data processing system, the device, when implemented, can also be used to resend a second detection message to each node in the data processing system after a second time interval when it is determined that the current state of the data processing system does not meet the business data processing conditions.

[0207] In some embodiments, the first detection message may specifically further carry association information of the target service data processing request; wherein, the association information may specifically include at least one of the following: the operation type of the data processing operation related to the target service data processing request, the data type of the target service data targeted by the target service data processing request, the user identifier related to the target service data processing request, etc.

[0208] In some embodiments, the primary nodes of the multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, which may specifically include: the primary nodes of the multiple consensus node groups respectively generate first confirmation information for the first detection message according to the preset consensus rule, and send the first confirmation information to the primary nodes of other consensus node groups; the primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than a preset first ratio threshold; the primary node of the consensus node group determines that the first consensus on the first detection message passes when it is determined that the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than the preset first ratio threshold.

[0209] In some embodiments, the data processing system may specifically further include a monitoring node; correspondingly, after it is determined that the first consensus on the first detection message passes, when the device is specifically implemented, it may also be used for the monitoring node to collect and determine the normal primary nodes and abnormal primary nodes among the primary nodes according to the first confirmation information sent by the primary nodes of the consensus node groups; according to a preset reward rule, increase the reward data of the normal primary nodes and reduce the reward data of the abnormal primary nodes.

[0210] In some embodiments, after the primary nodes of the multiple consensus node groups respectively count and detect whether the ratio of the number of the received first confirmation information to the number of the consensus node groups is greater than a preset first ratio threshold, when the device is specifically implemented, it may also be used for the primary node of the consensus node group to generate a primary node exception prompt message when it is determined that the ratio of the number of the received first confirmation information to the number of the consensus node groups is less than or equal to the preset first ratio threshold, and send the primary node exception prompt message to the monitoring node; the monitoring node responds to the primary node exception prompt message and determines the abnormal primary nodes and the abnormal consensus node groups to which the abnormal primary nodes belong according to the sending quantity of the first confirmation information of the primary nodes of the multiple consensus node groups; the monitoring node sends a reselect primary node instruction to the abnormal consensus node group; wherein, the nodes in the abnormal consensus node group respond to the reselect primary node instruction and re-elect and determine the primary node of the consensus node group according to the preset consensus rule.

[0211] In some embodiments, the primary node and the secondary node in each consensus node group respectively perform a second consensus operation on the target service data processing request in the consensus node group to which they belong according to a preset consensus rule. Specifically, it may include: The primary node and the secondary node in the consensus node group verify the target service data processing request in the consensus node group to which they belong according to the preset consensus rule. When it is determined that the verification is passed, a verification passed message is generated and sent to other nodes in the consensus node group; when the secondary node in the consensus node group determines that the ratio of the number of received verification passed messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, a second confirmation message is sent to the primary node in the consensus node group to which it belongs; the primary node in the consensus node group counts and detects whether the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold; the primary node in the consensus node group, when it is determined that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, determines that the second consensus of the consensus node group on the target service data processing request is passed.

[0212] In some embodiments, after the primary node in the consensus node group counts and detects whether the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, when the device is specifically implemented, it may further include: When the primary node in the consensus node group determines that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is less than or equal to the preset second ratio threshold, it detects whether there are faulty nodes in the consensus node group to which it belongs, and / or whether there are abnormal nodes in the consensus node group to which the reward data does not meet the requirements; when it is determined that there are faulty nodes and / or abnormal nodes in the consensus node group to which it belongs, the primary node calls the standby nodes in the data processing system to replace the faulty nodes and / or abnormal nodes.

[0213] In some embodiments, the first type of primary node performs a third consensus operation on the target service data processing request with other first type of primary nodes according to a preset consensus rule. Specifically, when implemented, it may include: The first type of primary node generates and sends a third confirmation message to other primary nodes according to the preset consensus rule; the first type of primary node counts and detects whether the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than a preset third ratio threshold; the first type of primary node, when it is determined that the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than a preset third ratio threshold, determines that the third consensus on the target service data processing request is passed.

[0214] See Figure 11As shown in the figure, this specification also provides another business data processing device, which is applied to the master node in a data processing system. The data processing system is a distributed processing system based on a blockchain. The data processing system includes at least a first number of consensus node groups. Each consensus node group includes at least a second number of nodes. Each consensus node group includes a master node and multiple slave nodes. Specifically, the device may include:

[0215] A receiving module 1101, which may specifically be used to receive a first detection message sent by a client terminal;

[0216] A first consensus module 1102, which may specifically be used to perform a first consensus operation on the first detection message with other master nodes according to a preset consensus rule;

[0217] A first sending module 1103, which may specifically be used to send a first consensus result message to the client terminal when it is determined that the first consensus on the first detection message passes;

[0218] A second consensus module 1104, which may specifically be used to receive a target business data processing request sent by the client terminal based on the first consensus result message, and perform a second consensus operation on the target business data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule;

[0219] A third consensus module 1105, which may specifically be used to perform a third consensus operation on the target business data processing request with other first-type master nodes according to a preset consensus rule when it is determined that the second consensus on the target business data processing request passes; where the first-type master nodes are the master nodes in the consensus node groups that pass the second consensus on the target business data processing request;

[0220] A second sending module 1106, which may specifically be used to feedback a second consensus result message to the client terminal when it is determined that the third consensus on the target business data processing request passes; the nodes in the data processing system respond to the target business data processing request to perform corresponding target business data processing.

[0221] It should be noted that the units, devices, modules, etc. illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. For the convenience of description, when describing the above devices, they are divided into various modules according to functions for separate description. Of course, when implementing this specification, the functions of each module can be implemented in the same or multiple software and / or hardware, or the modules implementing the same function can be realized by the combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical or other forms.

[0222] As can be seen from the above, based on the service data processing device provided in the embodiments of this specification, first, by reforming the consensus structure in the blockchain-based data processing system, at least the first number of consensus node groups participating in the consensus operation are divided in the data processing system, and each consensus node includes a primary node and multiple secondary nodes, and at least includes the second number of nodes; the client terminal and the above data processing system then perform multiple consensus operations through multiple data interactions based on the preset consensus rules improved based on the above consensus structure, and perform corresponding target service data processing when it is determined that the multiple consensuses pass in sequence. Thereby, it can better protect the security and reliability of the data processing system, improve the anti-attack ability, and have better fault tolerance; at the same time, it can also make the configuration of the consensus structure in the data processing system relatively more flexible, and can effectively improve the overall consensus efficiency of the system for a relatively large-scale data processing system.

[0223] Although this specification provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way among many execution orders of steps and does not represent the only execution order. When the actual device or client product is executed, it may be executed in the order of the method shown in the embodiments or the drawings or executed in parallel (for example, in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment). The terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, product or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, product or device. Without further limitation, there is no exclusion of additional identical or equivalent elements in the process, method, product or device comprising the said elements. The terms such as first, second, etc. are used to denote names and do not denote any particular order.

[0224] Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps so that the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same function. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or the structures within the hardware component.

[0225] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media including storage devices.

[0226] As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of this specification can essentially be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of this specification.

[0227] The various embodiments in this specification are described in a progressive manner. For the same or similar parts between the various embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on.

[0228] Although this specification is depicted through embodiments, those of ordinary skill in the art know that this specification has many variations and changes without departing from the spirit of this specification. It is hoped that the appended claims will cover these variations and changes without departing from the spirit of this specification.

Claims

1. A method for processing service data, characterized in that, applied to a customer terminal, the method includes: sending a first detection message to a data processing system; wherein, the data processing system is a distributed processing system based on a blockchain, the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, each consensus node group includes a primary node and multiple secondary nodes; the primary nodes of multiple consensus node groups perform a first consensus operation on the first detection message according to a preset consensus rule, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the customer terminal; receiving and counting the number of first consensus result messages received within a first duration; detecting whether the number of first consensus result messages is greater than a preset number threshold; when it is determined that the number of first consensus result messages is greater than the preset number threshold, sending a target service data processing request to the data processing system; wherein, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in their respective consensus node groups according to a preset consensus rule; the primary nodes of the first type perform a third consensus operation on the target service data processing request with other primary nodes of the first type according to a preset consensus rule; wherein, the primary nodes of the first type are the primary nodes in the consensus node groups that have passed the second consensus on the target service data processing request; receiving a second consensus result message fed back by the primary nodes of the first type; wherein, when the third consensus on the target service data processing request by the primary nodes of the first type passes, the primary nodes of the first type feed back a second consensus result message to the customer terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

2. The method according to claim 1, characterized in that, before sending the first detection message to the data processing system, the method further includes: sending a second detection message to each node in the data processing system; wherein, the second detection message is used to detect the node status of each node in the data processing system; each node in the data processing system responds to the second detection message and feeds back current status information; receiving and determining whether the current state of the data processing system meets the service data processing conditions according to the current status information of the nodes in the data processing system.

3. The method according to claim 2, characterized in that, the current status information includes at least one of the following: the total number of nodes, the number of online nodes, the node identifier of the node, the node group identifier of the consensus node group to which the node belongs, the communication status parameter of the node.

4. The method according to claim 2, characterized in that, after receiving and determining whether the current state of the data processing system meets the service data processing conditions according to the current status information of the nodes in the data processing system, the method further includes: when it is determined that the current state of the data processing system does not meet the service data processing conditions, after an interval of a second duration, resending the second detection message to each node in the data processing system.

5. The method according to claim 1, It is characterized in that The first detection message also carries associated information of the target business data processing request; wherein the associated information includes at least one of the following: the operation type of the data processing operation related to the target business data processing request, the data type of the target business data targeted by the target business data processing request, and the user identifier related to the target business data processing request.

6. The method according to claim 1, It is characterized in that The master node of the plurality of consensus node groups performs a first consensus operation on the first detection message according to a preset consensus rule, including: The master nodes of the plurality of consensus node groups respectively generate first confirmation information for the first detection message according to a preset consensus rule, and send the first confirmation information to the master nodes of other consensus node groups; The master nodes of the plurality of consensus node groups respectively count and detect whether the ratio of the number of received first confirmation information to the number of consensus node groups is greater than a preset first ratio threshold; The master node of the consensus node group determines that the first consensus on the first detection message is passed when it is determined that the ratio of the number of received first confirmation information to the number of consensus node groups is greater than a preset first ratio threshold.

7. The method according to claim 6, It is characterized in that The data processing system also includes a monitoring node; Accordingly, after determining that the first consensus on the first detection message is passed, the method further includes: The monitoring node collects and determines the normal master nodes and abnormal master nodes among the master nodes according to the first confirmation information sent by the master node of the consensus node group; According to the preset reward rules, the reward data of normal master nodes is increased, and the reward data of abnormal master nodes is reduced.

8. The method according to claim 6, It is characterized in that After the master nodes of the plurality of consensus node groups respectively count and detect whether the ratio of the number of received first confirmation information to the number of consensus node groups is greater than a preset first ratio threshold, the method further includes: The master node of the consensus node group generates master node abnormality prompt information when determining that the ratio of the number of received first confirmation information to the number of consensus node groups is less than or equal to a preset first ratio threshold, and sends the master node abnormality prompt information to the monitoring node; The monitoring node responds to the master node abnormality prompt information, and determines the abnormal master node and the abnormal consensus node group to which the abnormal master node belongs according to the number of first confirmation information sent by the master nodes of the multiple consensus node groups; The monitoring node sends a re-election master node instruction to the abnormal consensus node group; wherein the nodes in the abnormal consensus node group respond to the re-election master node instruction, and re-elect and determine the master node of the consensus node group according to the preset consensus rules.

9. The method according to claim 1, It is characterized in that The master node and the slave node in each consensus node group respectively perform a second consensus operation on the target business data processing request in the consensus node group to which they belong according to the preset consensus rule, including: The primary node and the secondary nodes in the consensus node group verify the target service data processing request according to a preset consensus rule. When it is determined that the verification is passed, a verification passed message is generated and sent to other nodes in the consensus node group; When the secondary nodes in the consensus node group determine that the ratio of the number of received verification passed messages to the number of nodes in the consensus node group to which they belong is greater than a preset second ratio threshold, a second confirmation message is sent to the primary node in the consensus node group to which they belong; The primary node in the consensus node group counts and detects whether the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold; When the primary node in the consensus node group determines that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, it is determined that the second consensus of the consensus node group on the target service data processing request is passed.

10. The method according to claim 9, wherein, after the primary node in the consensus node group counts and detects whether the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is greater than a preset second ratio threshold, the method further includes: when the primary node in the consensus node group determines that the ratio of the number of received second confirmation messages to the number of nodes in the consensus node group to which it belongs is less than or equal to the preset second ratio threshold, it detects whether there are faulty nodes in the consensus node group to which it belongs, and / or whether there are abnormal nodes in the consensus node group to which the reward data does not meet the requirements; when it is determined that there are faulty nodes and / or abnormal nodes in the consensus node group to which it belongs, the primary node calls the standby nodes in the data processing system to replace the faulty nodes and / or abnormal nodes.

11. The method according to claim 9, wherein, The first type of primary nodes perform a third consensus operation on the target service data processing request according to a preset consensus rule with other first type of primary nodes, including: The first type of primary nodes generate and send a third confirmation message to other primary nodes according to a preset consensus rule; The first type of primary nodes count and detect whether the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than a preset third ratio threshold; When the first type of primary nodes determine that the ratio of the number of received third confirmation messages to the number of consensus node groups is greater than a preset third ratio threshold, it is determined that the third consensus on the target service data processing request is passed.

12. A service data processing method, wherein, applied to the primary node in a data processing system, wherein the data processing system is a blockchain-based distributed processing system, the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, each consensus node group includes a primary node and multiple secondary nodes, and the method includes: Receiving a first detection message sent by a client terminal; Perform a first consensus operation on the first detection message with other primary nodes according to preset consensus rules; When it is determined that the first consensus on the first detection message passes, send a first consensus result message to the client terminal; And, receive a target service data processing request sent by the client terminal when it is determined that the number of first consensus result messages is greater than a preset number threshold, and perform a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to the preset consensus rules; When it is determined that the second consensus on the target service data processing request passes, perform a third consensus operation on the target service data processing request with other first-type primary nodes according to the preset consensus rules; wherein, the first-type primary nodes are the primary nodes in the consensus node group that have passed the second consensus on the target service data processing request; When it is determined that the third consensus on the target service data processing request passes, feedback a second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

13. A service data processing device, Characterized in that, Applied to a client terminal, the device includes: A first sending module, configured to send a first detection message to the data processing system; wherein, the data processing system is a blockchain-based distributed system, the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, and each consensus node group includes a primary node and multiple secondary nodes; the primary nodes of multiple consensus node groups perform a first consensus operation on the first detection message according to preset consensus rules, and when it is determined that the first consensus on the first detection message passes, respectively feedback a first consensus result message to the client terminal; A first receiving module, configured to receive and count the number of first consensus result messages received within a first duration; A detection module, configured to detect whether the number of first consensus result messages is greater than a preset number threshold; A second sending module, configured to send a target service data processing request to the data processing system when it is determined that the number of first consensus result messages is greater than a preset number threshold; wherein, the primary nodes and secondary nodes in each consensus node group respectively perform a second consensus operation on the target service data processing request in the consensus node group to which they belong according to the preset consensus rules; the first-type primary nodes perform a third consensus operation on the target service data processing request with other first-type primary nodes according to the preset consensus rules; wherein, the first-type primary nodes are the primary nodes in the consensus node group that have passed the second consensus on the target service data processing request; A second receiving module, configured to receive the second consensus result message fed back by the first-type primary nodes; wherein, when the third consensus on the target service data processing request by the first-type primary nodes passes, the first-type primary nodes feedback the second consensus result message to the client terminal; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

14. A service data processing device, Characterized in that, Applied to the master node in a data processing system, where the data processing system is a blockchain-based distributed processing system, the data processing system includes at least a first number of consensus node groups, each consensus node group includes at least a second number of nodes, each consensus node group includes a master node and multiple slave nodes, and the apparatus includes: A receiving module, configured to receive a first detection message sent by a client terminal; A first consensus module, configured to perform a first consensus operation on the first detection message with other master nodes according to a preset consensus rule; A first sending module, configured to send a first consensus result message to the client terminal when it is determined that the first consensus of the first detection message passes; A second consensus module, configured to receive a target service data processing request sent by the client terminal when it is determined that the number of first consensus result messages is greater than a preset number threshold, and perform a second consensus operation on the target service data processing request with other nodes in the consensus node group to which it belongs according to a preset consensus rule; A third consensus module, configured to perform a third consensus operation on the target service data processing request with other first-type master nodes according to a preset consensus rule when it is determined that the second consensus of the target service data processing request passes; where the first-type master nodes are the master nodes in the consensus node groups that have passed the second consensus of the target service data processing request; A second sending module, configured to feedback a second consensus result message to the client terminal when it is determined that the third consensus of the target service data processing request passes; the nodes in the data processing system respond to the target service data processing request to perform corresponding target service data processing.

15. A computer-readable storage medium, characterized in that, it stores computer instructions, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 or 12 are implemented.

16. A computer program product, characterized in that, it includes a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 or 12 are implemented.

Citation Information

Patent Citations

  • Consensus method, device and system based on blockchain system

    CN110474986A

  • Medical data storage method and system based on alliance chain

    CN113889203A