Task processing result determination method and device based on block chain, equipment and medium

By using blockchain sharding technology, the blockchain-based task processing result determination method is used to obtain candidate processing results of each sub-chain and select reliable nodes, the problems of cross-shaft transaction consistency and security are solved, and the system security of blockchain shard transactions is improved.

CN120013536APending Publication Date: 2025-05-16SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510107218.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

Blockchain sharding technology faces the challenges of cross-chip communication complexity, security and decentralization, dynamic sharding and load balancing, and data consistency. In particular, how to ensure the consistency of cross-chip transactions and states and ensure system security is an urgent problem.

Method used

A blockchain-based task processing result determination method is provided. By obtaining the candidate processing results of each sub-chain deployed by the target blockchain for the task to be processed, and selecting the target node from each candidate node based on the reliability parameters of the candidate nodes deployed by the sub-chain, and finally determining the target processing results of the task to be processed based on the target nodes and candidate processing results of the target blockchain.

Benefits of technology

By improving the reliability of the target nodes and enhancing the accuracy of task processing results, the system security of blockchain shard transactions is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013536A_ABST
    Figure CN120013536A_ABST
Patent Text Reader

Abstract

The invention relates to a task processing result determination method and device based on a block chain, equipment and a medium. The method comprises the steps of obtaining candidate processing results of sub-chains deployed by a target block chain for a to-be-processed task; wherein the to-be-processed task comprises at least two to-be-processed sub-tasks, and different sub-chains are responsible for processing different to-be-processed sub-tasks; the candidate processing result corresponding to any sub-chain is a task processing result of the to-be-processed sub-task processed by the corresponding sub-chain; and for any sub-chain, according to the reliability parameter of the at least one candidate node deployed by the sub-chain, selecting a target node from the at least one candidate node, and determining a target processing result corresponding to the to-be-processed task according to each target node corresponding to the target block chain and each candidate processing result. By adopting the method, the system security of sub-transactions can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a method, device, equipment and medium for determining task processing results based on blockchain. Background Art

[0002] Blockchain sharding technology is a key solution to improve the scalability of blockchain. By splitting the blockchain into multiple sub-chains (also called different shards), each sub-chain is only responsible for part of the transactions and data processing, which can enhance the overall throughput and performance.

[0003] However, blockchain sharding technology also faces challenges such as cross-shard communication complexity, security and decentralization, dynamic sharding and load balancing, and data consistency. Therefore, how to ensure cross-shard transactions and states are consistent and ensure system security is an urgent problem that needs to be solved. Summary of the invention

[0004] Based on this, it is necessary to provide a blockchain-based task processing result determination method, device, equipment and medium that can improve the system security of blockchain sharding transactions in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides a method for determining task processing results based on blockchain, comprising:

[0006] Obtain candidate processing results for pending tasks of each subchain deployed by the target blockchain; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0007] For any subchain, a target node is selected from at least one candidate node according to the reliability parameter of at least one candidate node deployed by the subchain;

[0008] According to the target nodes corresponding to the target blockchain and the candidate processing results, the target processing result corresponding to the task to be processed is determined.

[0009] In one embodiment, for any candidate node, the reliability parameter is determined in the following manner:

[0010] Obtain the historical processing results of candidate nodes for different historical tasks;

[0011] According to the importance data of each historical task and the corresponding historical processing results, the reliability parameters of the candidate nodes are determined.

[0012] In one embodiment, selecting a target node from at least one candidate node according to a reliability parameter of at least one candidate node deployed by the subchain includes:

[0013] Determine the size relationship between the reliability parameters of different candidate nodes deployed by the subchain;

[0014] The candidate node corresponding to the target reliability parameter is used as the target node; wherein the target reliability parameter is greater than other reliability parameters.

[0015] In one embodiment, obtaining candidate processing results of each subchain deployed by the target blockchain for the task to be processed includes:

[0016] For any subchain in the target blockchain, obtain the intermediate processing results of the corresponding subtasks to be processed by each candidate node deployed by the subchain;

[0017] According to the intermediate processing result corresponding to at least one candidate node deployed by the sub-chain, the candidate processing result of the sub-chain for the sub-task to be processed is determined.

[0018] In one embodiment, determining the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result includes:

[0019] According to each target node, determine the main chain in the target blockchain;

[0020] Based on the main chain consensus technology, the target processing result corresponding to the task to be processed is determined according to each candidate processing result.

[0021] In one embodiment, after determining the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result, the method further includes:

[0022] The target processing results corresponding to the tasks to be processed are broadcast to each candidate node in the target blockchain.

[0023] In a second aspect, the present application also provides a task processing result determination device based on blockchain, comprising:

[0024] An acquisition module is used to obtain candidate processing results of each subchain deployed by the target blockchain for the pending task; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0025] A selection module, configured to select a target node from at least one candidate node for any subchain according to a reliability parameter of at least one candidate node deployed by the subchain;

[0026] The determination module is used to determine the target processing result corresponding to the task to be processed according to the target nodes corresponding to the target blockchain and the candidate processing results.

[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0028] Obtain candidate processing results for pending tasks of each subchain deployed by the target blockchain; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0029] For any subchain, a target node is selected from at least one candidate node according to the reliability parameter of at least one candidate node deployed by the subchain;

[0030] According to the target nodes corresponding to the target blockchain and the candidate processing results, the target processing result corresponding to the task to be processed is determined.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0032] Obtain candidate processing results for pending tasks of each subchain deployed by the target blockchain; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0033] For any subchain, a target node is selected from at least one candidate node according to the reliability parameter of at least one candidate node deployed by the subchain;

[0034] According to the target nodes corresponding to the target blockchain and the candidate processing results, the target processing result corresponding to the task to be processed is determined.

[0035] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0036] Obtain candidate processing results for pending tasks of each subchain deployed by the target blockchain; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0037] For any subchain, a target node is selected from at least one candidate node according to the reliability parameter of at least one candidate node deployed by the subchain;

[0038] According to the target nodes corresponding to the target blockchain and the candidate processing results, the target processing result corresponding to the task to be processed is determined.

[0039] The above-mentioned method, device, equipment and medium for determining task processing results based on blockchain obtains candidate processing results of each subchain deployed by the target blockchain for the task to be processed, and selects a target node from at least one candidate node corresponding to each subchain according to the reliability parameter of at least one candidate node deployed by each subchain, and further determines the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result. In the above process, in the process of determining the target node, taking into account the reliability parameter of at least one candidate node deployed by each subchain, the determined target node can be made more reliable, thereby improving the accuracy of the entire task processing result, so as to improve the system security of blockchain sharding transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of a method for determining a task processing result based on blockchain in one embodiment;

[0042] Figure 2 A schematic flow chart of a reliability parameter determination step in one embodiment;

[0043] Figure 3 A schematic diagram of a flow chart of a step of determining a candidate processing result in one embodiment;

[0044] Figure 4 A schematic diagram of a process flow of a target processing result determination step in one embodiment;

[0045] Figure 5It is a structural block diagram of a device for determining a task processing result based on blockchain in one embodiment;

[0046] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] In one embodiment, Figure 1 As shown, a method for determining task processing results based on blockchain is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0049] S110, obtaining candidate processing results of each subchain deployed by the target blockchain for the task to be processed.

[0050] There are multiple subchains deployed in the target blockchain, and each subchain is deployed with multiple nodes. When processing the pending tasks, the minimum execution subject is the different nodes of each subchain in the target blockchain. The pending tasks include at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing.

[0051] The pending task may be a task that needs to be processed currently, for example, a transaction proposal. In this embodiment, the pending task is input into the target blockchain for processing. In the process of the target blockchain processing the pending task, each pending subtask in the pending task may be extracted, and each pending subtask is input into the corresponding subchain, and each node in the corresponding subchain processes the pending subtask.

[0052] Optionally, in this embodiment, for any sub-chain, the results obtained after each node therein processes the sub-task to be processed can be obtained and used as candidate processing results corresponding to the sub-chain.

[0053] Optionally, in this embodiment, for any sub-chain, the results obtained by each node after processing the subtask to be processed can be obtained, and each result can be processed by sub-chain consensus to obtain a unique processing result, and the unique result can be used as the candidate processing result corresponding to the sub-chain.

[0054] S120, for any subchain, selecting a target node from at least one candidate node according to a reliability parameter of at least one candidate node deployed by the subchain.

[0055] Among them, the reliability parameter is used to characterize the credibility of the corresponding candidate node. Exemplarily, the reliability parameters of different candidate nodes can be determined by manual experience or through a large number of experiments. This application does not impose any limitation on the method of determining the reliability parameters of different candidate nodes.

[0056] For example, the magnitude relationship between the reliability parameters of different candidate nodes deployed by the subchain can be determined; the candidate node corresponding to the target reliability parameter is used as the target node; wherein the target reliability parameter is greater than other reliability parameters. For example, the reliability parameters of different candidate nodes can be sorted, and the candidate node with a higher reliability parameter, such as the highest, is used as the target node.

[0057] S130, determining the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result.

[0058] Exemplarily, in this embodiment, the node identifier of each target node corresponding to the target blockchain and each candidate processing result can be input into a pre-trained result determination model to obtain the target processing result corresponding to the task to be processed.

[0059] Furthermore, the target processing result corresponding to the task to be processed is broadcast to each candidate node in the target blockchain to ensure that the processing results obtained by each candidate node in the target blockchain are unified.

[0060] In the above-mentioned method for determining task processing results based on blockchain, by obtaining the candidate processing results of each subchain deployed by the target blockchain for the task to be processed, and according to the reliability parameters of at least one candidate node deployed by each subchain, the target node is selected from at least one candidate node corresponding to each subchain, and further according to each target node corresponding to the target blockchain and each candidate processing result, the target processing result corresponding to the task to be processed is determined. In the above process, in the process of determining the target node, considering the reliability parameters of at least one candidate node deployed by each subchain, the determined target node can be made more reliable, thereby improving the accuracy of the entire task processing result, so as to improve the system security of blockchain sharding transactions.

[0061] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, a method for determining the reliability parameter of each candidate node is provided.

[0062] See also Figure 2The reliability parameter determination steps shown include:

[0063] S210, obtaining historical processing results of candidate nodes for different historical tasks.

[0064] Among them, the historical tasks are tasks that have been processed and completed within the historical period. Different historical tasks correspond to different historical processing results. Usually, different historical tasks are associated and stored with the corresponding historical processing results.

[0065] Exemplarily, in this embodiment, historical processing results of candidate nodes for different historical tasks may be obtained from a database.

[0066] S220, determining the reliability parameters of the candidate nodes according to the importance data of each historical task and the corresponding historical processing results.

[0067] Different historical tasks correspond to different importance data, and the importance data is used to represent the importance of the historical tasks.

[0068] Exemplarily, in this embodiment, the importance data of each historical task corresponding to the candidate node and the corresponding historical processing results can be input into a pre-trained parameter determination model to obtain the reliability parameter of the corresponding candidate node.

[0069] Exemplarily, in this embodiment, different historical tasks correspond to different scores. For any candidate node, the reliability parameter of the candidate node is determined according to the score of the historical task corresponding to the candidate processing node.

[0070] In the above embodiment, a specific method for determining the reliability parameter of the candidate node is provided, so that the technical solution provided by the present application is more complete.

[0071] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the process of obtaining the candidate processing results of each subchain deployed by the target blockchain for the task to be processed is refined.

[0072] See also Figure 3 The candidate processing result determination step shown includes:

[0073] S310, for any sub-chain in the target blockchain, obtain the intermediate processing results obtained by each candidate node deployed by the sub-chain for processing the corresponding sub-task to be processed.

[0074] Specifically, in this embodiment, different candidate nodes correspond to different intermediate processing results. After each candidate node processes the corresponding subtask to be processed, it outputs the corresponding intermediate processing result.

[0075] S320, determining a candidate processing result of the subchain for the subtask to be processed according to an intermediate processing result corresponding to at least one candidate node deployed by the subchain.

[0076] Specifically, based on the sub-chain consensus technology, the candidate processing results of the corresponding sub-chain for the sub-task to be processed are selected from each intermediate processing result.

[0077] For any subchain, the subchain runs PACE* to reach consensus on transactions within the shard. This technical solution (PACE*) improves the RABA submodule (Pillar) of the PACE framework. The improvements include two aspects: (1) adding elections to RABA to reduce the number of RABA executions, which is reduced from O(n) to O(k). (2) introducing independent interests to RABA, which reduces the number of RABA execution rounds from 4 to 3.

[0078] The execution process of the PACE* framework is as follows, which consists of data-RBC, CE, RABA and index-RBC. Lines 01-03 represent the broadcast transaction proposal (pending task), ensuring that all correct nodes can receive consistent proposals. Lines 04-09 represent the index of the broadcast node, where the CE in line 04 is the committee election algorithm, which is used to randomly select k nodes. The algorithm is introduced in the "Subchain Election" section. Lines 11-22 represent the RABA module executed by the PACE* algorithm, which is used to ensure that all correct nodes in the subchain agree on the index.

[0079] Let represent n instances of a reliable broadcast protocol, where P j Yes RBC j Sender, RABA j Indicates the corresponding committee member P j RABA example.

[0080] 01, initialize e←0{epoch number}, the committee member set CMIS is empty;

[0081] 02, once m is selected from the buffer pool i ;

[0082] 03, r-broadcast([e,i],m i ) from RBC i data-RBC;

[0083] 04, call the committee election protocol CE(r);

[0084] 05, Wait until the committee: {P j1, P j2,...., P jk}←CE(r);

[0085] 06, CMIS←{j1,j2,...,j k};

[0086] 07, if P i ∈ Committee, then;

[0087] 08, wait until r-delivern−f messages {m1,m2,···,m n-f}, from different RBC instances;

[0088] 09. Let S i ={i1,i2,···,i n-f};

[0089] 10, r-broadcast([e,i],S i )For RBC i ▷index-RBC;

[0090] 11. Once r-deliver([e,j],Sj) comes from committee member Pj, and |Si|=nf is executed;

[0091] 12. If RABAi has not started yet;

[0092] 13. propose([e,j],1) from RABA j ;

[0093] 14, otherwise;

[0094] 15. repropose([e,j],1) from RABA j ;

[0095] 16. Once nf RBC instances (Index, S j );

[0096] 17. If the RABA instance has not been developed and sent;

[0097] 18, propose([e,j],0);

[0098] 19, once it is decided that ([e,j],V) for any value S for all k RABA instances;

[0099] 20, for x: x∈CMIS execution;

[0100] 21, if ABAx outputs 1, then;

[0101] 22. Wait for index message: (Index, Sx)←RBCx;

[0102] 23, S←S∪Sx;

[0103] 24, e←e+1.

[0104] In the above embodiment, a specific method of subchain consensus is given, which can add elections to RABA to reduce the number of RABA executions, and the number of RABA executions is reduced from O(n) to O(k). (2) Independent interests are introduced to RABA, reducing the number of RABA execution rounds from 4 to 3.

[0105] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the process of determining the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result is refined.

[0106] See also Figure 4 The target processing result determination step shown includes:

[0107] S410, determining the main chain in the target blockchain according to each target node;

[0108] Specifically, in this embodiment, each target node is used as a node in the target blockchain, and a main chain in the target blockchain is formed based on each target node.

[0109] It is understandable that the nodes of the main chain are generated by each shard executing the election algorithm. After reaching consensus within each subchain, these results will be further consensus-processed on the main chain, ultimately ensuring that the results on the main chain are consistent. The optimized PACE* algorithm is also running on the main chain.

[0110] S420, based on the main chain consensus technology, determine the target processing result corresponding to the task to be processed according to each candidate processing result.

[0111] In the above embodiment, a specific method for determining the target processing result corresponding to the task to be processed is given, and the data is made more unified through the main chain consensus, thereby improving the security of the system.

[0112] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the method for determining task processing results based on blockchain provided by the present application is introduced in detail.

[0113] Specifically, the method for determining task processing results based on blockchain includes:

[0114] S510, for any subchain in the target blockchain, obtaining the intermediate processing results obtained by each candidate node deployed by the subchain for processing the corresponding subtask to be processed;

[0115] S520, determining a candidate processing result of the subchain for the subtask to be processed according to an intermediate processing result corresponding to at least one candidate node deployed by the subchain;

[0116] The pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and

[0117] S530, for any subchain, determining a magnitude relationship between reliability parameters of different candidate nodes deployed by the subchain;

[0118] S540, taking the candidate node corresponding to the target reliability parameter as the target node;

[0119] Among them, the target reliability parameter is greater than other reliability parameters;

[0120] Among them, for any candidate node, the reliability parameter is determined in the following manner: obtaining the historical processing results of the candidate node for different historical tasks; determining the reliability parameter of the candidate node according to the importance data of each historical task and the corresponding historical processing results;

[0121] Specifically, in the Bumblebee protocol, the subchain election phase is one of the key links to improve the security and efficiency of the protocol. This phase mainly conducts node elections in each subchain to select nodes with higher credibility to participate in the consensus process of the main chain phase, thereby reducing the number of executions of the consensus protocol. The subchain election steps are as follows:

[0122] (1) Point reputation initialization

[0123] When the protocol is initialized, an initial reputation value is assigned to each node. The reputation value can be assigned based on historical behavior, computing power, network stability, etc. The initial value in this paper is set to 0.5.

[0124] (2) Election Algorithm CE

[0125] Each subchain conducts elections based on the reputation of the nodes, and selects several nodes with higher reputation as representatives to participate in the subsequent consensus stage. The election rules can be based on weighted voting or other forms of reputation scoring mechanisms. This paper adopts the weighted voting method: nodes vote for each other, and the voting weight of each node is equal to its reputation value. Based on the voting results, several nodes with the highest number of votes are selected to participate in the consensus.

[0126] (3) Credit value update

[0127] After each round of consensus, the reputation of the node is updated based on its performance during the consensus process. Nodes that perform well will receive reputation rewards, while nodes that perform poorly or are detected to have malicious behavior will receive reputation penalties. The reputation value update mechanism can use an improved logistic regression function to adjust the node's reputation value, thereby dynamically reflecting the node's actual performance.

[0128] (4) Announcement of election results

[0129] After the election is completed, the election results will be propagated within the subchain through the reliable broadcast (RBC) mechanism to ensure that all correct nodes can receive the election results and recognize the elected node representatives.

[0130] This article defines node behaviors into the following three categories:

[0131] good: Normal election, select the node with the greatest reputation as the main chain node.

[0132] bad: malicious election, selecting nodes with low credibility as main chain nodes.

[0133] offline: Offline, not participating in the election process.

[0134] Since the conventional logistic regression function is prone to reputation concentration and "long-range attack" problems, an improved logistic regression model is proposed as follows:

[0135] ;

[0136] In the formula, Indicates whether candidate node i is maliciously elected in the x-th round of consensus, 1 for malicious, otherwise 0; n represents the current consensus round number; u represents whether candidate node i participates in the election normally in the x-th round of consensus, 1 for normal, otherwise 0; v represents the penalty weight for malicious voting, which can be set based on user needs.

[0137] S550, determining the main chain in the target blockchain according to each target node;

[0138] S560, based on the main chain consensus technology, determine the target processing result corresponding to the task to be processed according to each candidate processing result;

[0139] S570, broadcast the target processing result corresponding to the task to be processed to each candidate node in the target blockchain.

[0140] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0141] Based on the same inventive concept, the embodiment of the present application also provides a task processing result determination device based on blockchain for implementing the task processing result determination method based on blockchain involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more embodiments of the task processing result determination device based on blockchain provided below can refer to the limitations of the task processing result determination method based on blockchain above, and will not be repeated here.

[0142] In an exemplary embodiment, Figure 5 As shown, a task processing result determination device based on blockchain is provided, including: an acquisition module 510, a selection module 520 and a determination module 530, wherein:

[0143] The acquisition module 510 is used to obtain candidate processing results of each subchain deployed by the target blockchain for the pending task; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and,

[0144] A selection module 520, configured to select a target node from at least one candidate node for any subchain according to a reliability parameter of at least one candidate node deployed by the subchain;

[0145] Among them, for any candidate node, the reliability parameter is determined in the following manner: obtaining the historical processing results of the candidate node for different historical tasks; determining the reliability parameter of the candidate node according to the importance data of each historical task and the corresponding historical processing results;

[0146] The determination module 530 is used to determine the target processing result corresponding to the task to be processed according to the target nodes corresponding to the target blockchain and the candidate processing results.

[0147] In one embodiment, the selection module 520 includes a first determination unit for determining the size relationship between the reliability parameters of different candidate nodes deployed by the sub-chain; a second determination unit for taking the candidate node corresponding to the target reliability parameter as the target node; wherein the target reliability parameter is greater than other reliability parameters.

[0148] In one embodiment, the acquisition module 510 includes an acquisition unit for acquiring, for any sub-chain in the target blockchain, the intermediate processing results obtained by each candidate node deployed by the sub-chain for processing the corresponding sub-task to be processed; and a third determination unit for determining the candidate processing results of the sub-chain for the sub-task to be processed based on the intermediate processing result corresponding to at least one candidate node deployed by the sub-chain.

[0149] In one embodiment, the determination module 530 includes a fourth determination unit, which is used to determine the main chain in the target blockchain according to each target node; and a fifth determination unit, which is used to determine the target processing result corresponding to the task to be processed according to each candidate processing result based on the main chain consensus technology.

[0150] In one embodiment, the task processing result determination device based on blockchain also includes a broadcast module, which is used to broadcast the target processing result corresponding to the task to be processed to each candidate node in the target blockchain.

[0151] Each module in the above-mentioned task processing result determination device based on blockchain can be implemented in whole or in part by software, hardware and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0152] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for determining a task processing result based on blockchain is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0153] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0154] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0155] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0156] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0159] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining task processing results based on blockchain, characterized in that: The method comprises: Obtain candidate processing results for the pending tasks of each subchain deployed by the target blockchain; wherein the pending tasks include at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and, For any subchain, according to the reliability parameter of at least one candidate node deployed by the subchain, select a target node from the at least one candidate node; According to each of the target nodes corresponding to the target blockchain and each of the candidate processing results, the target processing result corresponding to the task to be processed is determined.

2. The method according to claim 1, characterized in that: For any candidate node, the reliability parameter is determined in the following manner: Obtaining historical processing results of the candidate node for different historical tasks; The reliability parameters of the candidate nodes are determined according to the importance data of each of the historical tasks and the corresponding historical processing results.

3. The method according to claim 1, characterized in that The selecting a target node from the at least one candidate node according to the reliability parameter of the at least one candidate node deployed by the subchain includes: Determine the magnitude relationship between reliability parameters of different candidate nodes deployed by the subchain; The candidate node corresponding to the target reliability parameter is used as the target node; wherein the target reliability parameter is greater than other reliability parameters.

4. The method according to any one of claims 1 to 3, characterized in that The obtaining of candidate processing results of each subchain deployed by the target blockchain for the task to be processed includes: For any subchain in the target blockchain, obtain the intermediate processing results of the corresponding subtasks to be processed by each candidate node deployed by the subchain; According to the intermediate processing result corresponding to at least one candidate node deployed by the sub-chain, a candidate processing result of the sub-chain for the sub-task to be processed is determined.

5. The method according to any one of claims 1 to 3, characterized in that: The determining, according to each of the target nodes corresponding to the target blockchain and each of the candidate processing results, the target processing result corresponding to the task to be processed includes: Determine the main chain in the target blockchain according to each target node; Based on the main chain consensus technology, the target processing result corresponding to the task to be processed is determined according to each of the candidate processing results.

6. The method according to any one of claims 1 to 3, characterized in that After determining the target processing result corresponding to the task to be processed according to each of the target nodes corresponding to the target blockchain and each of the candidate processing results, the method further includes: The target processing result corresponding to the task to be processed is broadcast to each candidate node in the target blockchain.

7. A task processing result determination device based on blockchain, characterized in that: The device comprises: An acquisition module is used to obtain candidate processing results of each subchain deployed by the target blockchain for the pending task; wherein the pending task includes at least two pending subtasks, and different subchains are responsible for processing different pending subtasks; the candidate processing result corresponding to any subchain is the task processing result of the pending subtask that the corresponding subchain is responsible for processing; and, A selection module, configured to select a target node from at least one candidate node deployed by any subchain according to a reliability parameter of at least one candidate node deployed by the subchain; A determination module is used to determine the target processing result corresponding to the task to be processed according to each target node corresponding to the target blockchain and each candidate processing result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.