Blockchain-based secure computing method, apparatus, and device, and storage medium

By adopting a blockchain-based security computing method in the blockchain, cloud data is allocated to block nodes and adjacent block nodes for edge computing, the problem of poor security in blockchain edge computing is solved, and data processing efficiency and security are improved.

WO2025124051A1PCT designated stage expired Publication Date: 2025-06-19GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/131681
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-11
Filing Date
2024-11-13
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

In the edge computing of blockchain, the existing technology has poor security problems, resulting in reduced data processing efficiency and security.

Method used

By introducing a blockchain-based security computing method in the blockchain, the data computing request initiated by the block node is used to obtain cloud data, and allocate it to the block node and adjacent block nodes for edge computing, and finally synchronize the calculation results to the blockchain.

Benefits of technology

It improves the data processing efficiency and security of blockchain, reduces the burden on blockchain, and enhances the processing capabilities of edge nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131681_19062025_PF_FP_ABST
    Figure CN2024131681_19062025_PF_FP_ABST
Patent Text Reader

Abstract

A blockchain-based secure computing method, apparatus, and device, and a storage medium. The method comprises: acquiring cloud data on the basis of a data computing request initiated by a block node (S10); determining, on the basis of the block node, adjacent block nodes adjacent to the block node (S20); allocating the cloud data to the block node and the adjacent block nodes, so that the block node and the adjacent block nodes perform edge computing on the cloud data to obtain computing results (S30); and synchronizing the computing results to the blockchain, to update data of the blockchain (S40).
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain-based secure computing method, device, equipment, and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 11, 2023, with application number 202311685704.2, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of blockchain technology, and for example, to a blockchain-based secure computing method, apparatus, device, and storage medium. Background Art

[0003] In the edge computing of blockchain, security issues of blockchain edge computing are usually caused due to its own poor scalability. The current method is to disperse security policies and permissions to each node to avoid centralized control or data disorder due to single point failure. At the same time, encryption algorithms are used in the data transmission process. With the introduction of communication encryption algorithms, the edge nodes in the blockchain need to decrypt the data before processing it, which increases the data processing cost and the burden on the nodes, thereby reducing the data processing efficiency and security of the blockchain.

[0004] Summary of the Invention

[0005] The present application provides a blockchain-based secure computing method, apparatus, device, and storage medium, which can solve the problem of poor security when performing edge computing in blockchain in related technologies.

[0006] This application provides a secure computing method based on blockchain, the method comprising:

[0007] Obtain cloud data based on data calculation requests initiated by block nodes;

[0008] Determining, based on the block node, an adjacent block node adjacent to the block node;

[0009] Determining the total number of the block nodes and the adjacent block nodes;

[0010] Dividing the cloud data into cloud data blocks that are equal to the total number, and causing the block node and the adjacent block nodes to respectively perform calculations on the cloud data blocks allocated to them, to obtain a plurality of local calculation results that are equal to the total number, wherein each block node is allocated one cloud data block;

[0011] Aggregating the multiple local calculation results to obtain a calculation result of the cloud data;

[0012] The calculation results are synchronized to the blockchain to update the data of the blockchain.

[0013] In some embodiments, determining, based on the block node, a neighboring block node adjacent to the block node includes:

[0014] Obtaining a node topology diagram of the blockchain;

[0015] Determine the position of the block node in the node topology graph;

[0016] Determine the position of the block node directly connected to the block node according to the position of the block node in the node topology map;

[0017] Calculate the inter-node distance based on the position of the block node in the node topology map and the position of the block node directly connected to the block node;

[0018] The adjacent block nodes are determined according to the inter-node distances.

[0019] In some embodiments, dividing the cloud data into cloud data blocks that are consistent with the total number, and causing the block node and the adjacent block node to respectively perform calculations on the cloud data blocks allocated to them, to obtain multiple local calculation results that are consistent with the total number, includes:

[0020] determining a computing service type based on the cloud data;

[0021] Determining the number of the computing service type, and comparing the number of the computing service type with the total number;

[0022] In response to the number of the calculated service types being less than the total number, determining a difference between the total number and the number of the calculated service types, and determining a target group according to the difference;

[0023] Determine the data volume corresponding to the computing business type, and evenly divide the data of the computing business type with a larger data volume than other computing business types into the target group according to the target group, so that the block node and the adjacent block node respectively calculate the cloud data blocks allocated to them, and obtain multiple local calculation results consistent with the total number.

[0024] In some embodiments, obtaining cloud data according to a data calculation request initiated by a block node includes:

[0025] Locating the target block node storing the target cloud data according to the data calculation request of the block node;

[0026] Obtaining target cloud data from the target block node according to the data calculation request;

[0027] Homomorphically encrypt the target cloud data to obtain the cloud data.

[0028] In some embodiments, before synchronizing the calculation result to the blockchain and updating the data on the blockchain, the method further includes:

[0029] Receiving block synchronization information from the block node;

[0030] Sending status confirmation information to all block nodes in the blockchain according to the block synchronization information, causing all block nodes to broadcast their own status information and output broadcast status information; receiving blockchain status information processed by all block nodes according to the broadcast status information;

[0031] The blockchain status information is broadcasted on the blockchain, so that all the block nodes compare the blockchain status information with the status information of all the block nodes, and in response to the blockchain status information being inconsistent with the status information of all the block nodes, the status information of all the block nodes is updated to the blockchain status information.

[0032] In some embodiments, receiving the blockchain state information processed by all block nodes according to the broadcast state information includes:

[0033] Generate a state vector table based on the broadcast state information, wherein the state vector table records the current state of each block node;

[0034] The current state of each block node in the state vector table is classified according to the state type, and the current state corresponding to the type with the largest number is output as the blockchain state information.

[0035] In some embodiments, after synchronizing the calculation result to the blockchain and updating the data on the blockchain, the method further includes:

[0036] detecting a data capacity of the blockchain, and in response to the data capacity being greater than a preset threshold, adding a block node to the blockchain;

[0037] The topology of the blockchain is updated according to the newly added block nodes.

[0038] This application also proposes a blockchain-based secure computing device for implementing the blockchain-based secure computing method described above. The blockchain-based secure computing device includes:

[0039] A data acquisition module is configured to obtain cloud data based on data calculation requests initiated by block nodes;

[0040] a node confirmation module, configured to determine, based on the block node, an adjacent block node adjacent to the block node;

[0041] a data calculation module configured to determine the total number of the block nodes and the adjacent block nodes; divide the cloud data into cloud data blocks that are consistent with the total number, and cause the block node and the adjacent block nodes to respectively perform calculations on their respective allocated cloud data blocks to obtain a plurality of local calculation results that are consistent with the total number, wherein each block node is allocated one of the cloud data blocks; and aggregate the plurality of local calculation results to obtain a calculation result of the cloud data;

[0042] The state synchronization module is configured to synchronize the calculation results to the blockchain and update the data of the blockchain.

[0043] The present application also proposes a blockchain-based secure computing device, which includes: a memory, a processor, and a blockchain-based secure computing program stored on the memory and executable on the processor, wherein the blockchain-based secure computing program is configured to implement the blockchain-based secure computing method described above.

[0044] The present application also proposes a storage medium, on which a blockchain-based secure computing program is stored. When the blockchain-based secure computing program is executed by a processor, the blockchain-based secure computing method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] FIG1 is a schematic diagram of the structure of a blockchain-based secure computing device in a hardware operating environment according to an embodiment of the present application;

[0046] FIG2 is a schematic diagram of a flowchart of a secure computing method based on blockchain according to an embodiment of the present application;

[0047] FIG3 is a topological diagram of block nodes in a secure computing method based on blockchain according to an embodiment of the present application;

[0048] FIG4 is a schematic diagram of a flowchart of a secure computing method based on blockchain according to another embodiment of the present application;

[0049] FIG5 is a structural block diagram of a blockchain-based secure computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] Refer to Figure 1, which is a structural diagram of a blockchain-based secure computing device in the hardware operating environment of an embodiment of the present application.

[0051] As shown in Figure 1, the blockchain-based secure computing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is configured to enable communication between these components. The user interface 1003 may include a display and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also be a storage device independent of the processor 1001.

[0052] The structure shown in FIG1 does not constitute a limitation on the blockchain-based secure computing device and may include more or fewer components than shown in the figure, or combine some components, or arrange the components differently.

[0053] As shown in FIG1 , the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a blockchain-based secure computing program.

[0054] In the blockchain-based secure computing device shown in Figure 1, the network interface 1004 is configured to communicate data with a network server; the user interface 1003 is configured to interact with the user; the processor 1001 and the memory 1005 in the blockchain-based secure computing device of the present application can be set in the blockchain-based secure computing device, and the blockchain-based secure computing device calls the blockchain-based secure computing program stored in the memory 1005 through the processor 1001, and executes the blockchain-based secure computing method provided in the embodiment of the present application.

[0055] An embodiment of the present application provides a secure computing method based on blockchain. Referring to FIG2 , FIG2 is a flow chart of a secure computing method based on blockchain according to an embodiment of the present application.

[0056] In this embodiment, the blockchain-based secure computing method includes the following steps:

[0057] Step S10: Obtain cloud data according to the data calculation request initiated by the block node.

[0058] The execution subject of this embodiment is a blockchain-based secure computing device, wherein the blockchain-based secure computing device has functions such as data processing, data communication, and program execution. The blockchain-based secure computing device can be an integrated controller, a control computer, and other devices, and of course, can also be other devices with similar functions.

[0059] The blockchain is formed by the interconnection between multiple nodes. The data communication between each node and other nodes will be broadcast in the entire network, and each node (i.e. block node) can record this data communication to form its own ledger. Therefore, the data recorded in the blockchain has a high degree of security.

[0060] In some embodiments, when a block node needs to process relevant data, it needs to obtain cloud data stored in other block nodes. At this time, the block node needs to access the block node storing the cloud data, and this data information will be recorded by all block nodes, including itself. After receiving the data calculation request, the target block node storing the target cloud data can send the cloud data to the block node that sent the data calculation request. All actions generated during this process will be recorded and form corresponding data information.

[0061] In some embodiments, obtaining cloud data according to a data calculation request initiated by a block node includes:

[0062] Locating the target block node storing the target cloud data according to the data calculation request of the block node;

[0063] Obtaining target cloud data from the target block node according to the data calculation request;

[0064] Homomorphically encrypt the target cloud data to obtain the cloud data.

[0065] In some embodiments, a block node's data computation request will be received by other block nodes and parsed. If the block node determines that the access target of the current data computation request is not itself, it can discard the current data computation request and not respond. Upon parsing and identifying that the access target of the data computation request is itself, the target block node can analyze the data computation request and determine the information in the data computation request, such as the data to be accessed. The target block node can provide feedback to the blockchain-based secure computing device regarding this data computation request, including returning the target cloud data or rejecting the data access request. After receiving the target cloud data, the blockchain-based secure computing device homomorphically encrypts the target cloud data to obtain the cloud data and sends the cloud data to the block node that sent the data computation request. After receiving the cloud data, the block node that sent the data computation request can directly process the data in an encrypted state. The resulting data is consistent with the decrypted data, reducing the time loss during data encryption and decryption and preventing data corruption during the encryption and decryption processes.

[0066] Step S20: Determine adjacent block nodes according to the block node that initiates the data calculation request.

[0067] Adjacent block nodes can be understood as block nodes that are directly connected to the current block node. In the blockchain, due to decentralization, data is transmitted between nodes. Therefore, adjacent block nodes can be determined based on the communication time between block nodes.

[0068] In some embodiments, due to the varying distances between block nodes, when searching for adjacent block nodes, a probe message can be sent to a block node that is in direct communication with the current block node, and a response message can be received. Based on this response, the distance between adjacent block nodes can be determined. Because block nodes may become disconnected for various reasons, it is necessary to determine adjacent block nodes in real time. Block nodes are sorted from smallest to largest based on their distance, and at least one block node with a relatively close distance is selected as a neighboring block node. The number of adjacent block nodes selected can be set based on actual conditions.

[0069] In some embodiments, determining the adjacent block node according to the block node includes:

[0070] Obtaining a node topology diagram of the blockchain;

[0071] Determine the position of the block node that initiates the data calculation request in the node topology map;

[0072] Determine the position of the block node directly connected to the block node initiating the data calculation request according to the position of the block node initiating the data calculation request in the node topology map;

[0073] Calculate the inter-node distance based on the position of the block node that initiates the data calculation request in the node topology map and the position of the block node directly connected to the block node that initiates the data calculation request;

[0074] Determine, based on the inter-node distance, adjacent block nodes adjacent to the block node that initiates the data calculation request.

[0075] In some embodiments, referring to FIG3 , FIG3 is a topological diagram of block nodes. Based on the topological diagram, the communication relationship between block nodes in the blockchain can be obtained. The location of the block node directly connected to the block node is determined from the connection relationship reflected in the topological diagram. The block node with the determined location is detected to determine whether it is in a working state. After receiving the detection feedback from the corresponding block node, the elapsed time is recorded. At the same time, a block node distance table is generated based on the block node with the determined location and the elapsed time. The distance between block nodes is determined based on the elapsed time. The longer the elapsed time, the greater the distance between the block nodes. Adjacent block nodes are determined based on the distance between the block nodes.

[0076] Step S30: Distribute the cloud data to the block node and the adjacent block node, so that the block node and the adjacent block node perform edge computing on the cloud data to obtain computing results.

[0077] In some embodiments, step S30 may include: determining the total number of the block nodes and the adjacent block nodes; dividing the cloud data into cloud data blocks that match the total number, causing the block node and the adjacent block nodes to perform calculations on their respective assigned cloud data blocks to obtain a plurality of local calculation results that match the total number. Each block node is assigned one of the cloud data blocks; and aggregating the plurality of local calculation results to obtain a calculation result for the cloud data.

[0078] In some embodiments, after the block node obtains the cloud data, it can distribute the cloud data to adjacent block nodes. The block node and multiple adjacent block nodes form multiple "edges", thereby sharing the data processing pressure of a single node. Each block node can perform calculations based on the cloud data it obtains, and finally output the calculation results to the block node that initiated the data calculation request to obtain the final calculation results.

[0079] In some embodiments, dividing the cloud data into cloud data blocks that are consistent with the total number, and causing the block node and the adjacent block nodes to perform calculations separately to obtain multiple local calculation results that are consistent with the total number, includes:

[0080] determining a computing service type based on the cloud data;

[0081] Determining the number of the computing service type, and comparing the number of the computing service type with the total number;

[0082] When the number of the calculated service types is less than the total number, determining a difference between the total number and the number of the calculated service types, and determining a target group according to the difference;

[0083] Determine the data volume corresponding to the computing business type, and divide the data of the computing business type with a larger data volume than other computing business types evenly into the target group according to the target group, so that the block node and the adjacent block node are calculated separately to obtain multiple local calculation results consistent with the total number.

[0084] In some embodiments, calculating the business type refers to the processing method of business data, such as business behaviors such as data aggregation and data classification. Calculating the number of business types refers to the number of types of calculation business. The target group is determined based on the difference, and the number of target groups is set to the number corresponding to the difference. When allocating data, the data is packaged according to the calculation business type, and the file size of each data packet is counted to ensure data integrity while averaging the amount of data in each target group.

[0085] Exemplarily, the data volumes of computing service types may be sorted from large to small to determine the computing service types with the highest data volumes after sorting; and the data of the computing service types with the highest data volumes may be evenly divided into target groups.

[0086] In some embodiments, the total number of block nodes and adjacent block nodes can be determined, and the obtained cloud data can be divided into cloud data blocks that are consistent with the total number. For example, if the total number of block nodes and adjacent block nodes is 4, then the cloud data can be divided into 4 cloud data blocks, which are delivered to the corresponding block nodes for calculation, wherein the size of each cloud data block can remain consistent or can be different. For example, the cloud data is divided in a way that ensures data integrity. When each block node receives the cloud data block that it is responsible for processing, it can calculate a local calculation result based on the cloud data block. After the calculation is completed, the obtained local calculation result can be transmitted to the block node that initiated the data calculation request, and the block node that initiated the data calculation request will summarize the various local calculation results to obtain the calculation result of the cloud data.

[0087] Step S40: Synchronize the calculation results to the blockchain and update the data of the blockchain.

[0088] In some embodiments, before broadcasting the calculation results in the blockchain, it is necessary to update the data status in its own block node according to the calculation results. After the block node calculates the calculation results of the cloud data, it can broadcast the current calculation results, and the broadcast information includes the status information of the current node. After other block nodes receive the broadcast information, they can update their own data status according to the data status information carried in the broadcast.

[0089] This embodiment obtains cloud data according to the data calculation request of the block node, determines the adjacent block node according to the block node, distributes the cloud data to the block node and the adjacent block node, enables the block node and the adjacent block node to perform edge calculation on the cloud data, obtains the calculation result, synchronizes the calculation result to the blockchain, updates the data of the blockchain, and migrates the "edge" and "end" with large data volume and the data with low delay sensitivity to the edge for processing, that is, the node with large data volume can transfer the data to other nodes for data processing, thereby reducing the burden on the blockchain and improving the data processing efficiency and security of the blockchain.

[0090] Refer to Figure 4, which is a flowchart of a blockchain-based secure computing method according to another embodiment of the present application.

[0091] Different from the above embodiment, the blockchain-based secure computing method of this embodiment further includes the following steps before step S10.

[0092] Step S401: Receive block synchronization information of the block node.

[0093] Step S402: Sending status confirmation information to all block nodes in the blockchain according to the block synchronization information, so that all block nodes broadcast their own status information.

[0094] Step S403: Receive the blockchain status information obtained by all block nodes based on the received broadcast status information and their own status information.

[0095] Step S404: broadcast the received blockchain status information in the blockchain, so that all block nodes compare the blockchain status information with the status information of all block nodes stored by themselves. When the received blockchain status information is inconsistent with the status information of all block nodes stored by themselves, the status information of all block nodes is updated to the blockchain status information for storage.

[0096] In some embodiments, after completing the calculation of cloud data, the blockchain-based secure computing device can initiate block synchronization information to synchronize the status information of each block node in the blockchain. After receiving the block synchronization information from the block node, it can send status confirmation information to all nodes in the blockchain, so that each block node in the blockchain can compare its own block status information with the broadcasted status information, and also broadcast its own status data. From the perspective of a single node, it can first update its own status information based on the received broadcast information. After the update is completed, it broadcasts its own broadcast information. At the same time, it also receives broadcast information sent by other block nodes, parses the received broadcast information, obtains the status information included in the broadcast information, and compares its own status information with the broadcasted status information to determine the consistency of the status information. If the status information is inconsistent, the status information of the current block node is updated to the status information of the blockchain.

[0097] In some embodiments, step S403 includes:

[0098] Generate a state vector table based on the broadcasted state information, wherein the state vector table records the current state of each block node;

[0099] The current state of each block node in the state vector table is classified according to the state type, and the current state corresponding to the type with the largest number is output as the blockchain state information.

[0100] The state vector table refers to the vector table used by the block node to determine the status information of each node in the current blockchain.

[0101] In some embodiments, ideally, after data synchronization is complete, the state information in each block node should remain consistent. However, in reality, various factors can cause state information synchronization to fail, resulting in unsuccessful data synchronization across block nodes. Therefore, to address this issue, block nodes can broadcast state information, with each broadcast carrying the state information of the corresponding block node. This allows each node to generate a state vector table based on the broadcast state information and its own state information. When constructing the vector table, a blockchain-based secure computing device first receives the state information synchronized by the block node initiating the data update and, based on this state information, determines the differences between the various state information. After a node detects the state information of all other block nodes, it can classify the state information detection results, calculate the most numerous classification in the state information, and determine the current classification as the preliminary state information. Simultaneously, other block nodes can obtain preliminary state information in the same manner. Based on each preliminary state information, the blockchain-based secure computing device determines the block nodes that have not completed state synchronization and initiates a forced update message to each of these block nodes, updating the data state of these block nodes to the blockchain state information.

[0102] In some embodiments, after synchronizing the calculation result to the blockchain and updating the data on the blockchain, the blockchain-based secure calculation method further includes:

[0103] detecting the data capacity of the blockchain, and adding a new block node to the blockchain when the data capacity is greater than a preset threshold;

[0104] The topology of the blockchain is updated according to the newly added block nodes.

[0105] In some embodiments, the data capacity of the current blockchain is tested to obtain a test result. If the data capacity in the test result is greater than a preset threshold, it indicates that the current blockchain may not be suitable for large-scale data operations, posing a data security risk. Therefore, a new block node can be added to the blockchain. Of course, even when there is spare data capacity, the new block node can actively join the current blockchain. When the new block node is added to the blockchain, data communication can be established with other block nodes in the blockchain, and the blockchain topology map can be updated with the new block node.

[0106] In some embodiments, the preset threshold can be determined according to actual needs.

[0107] This embodiment synchronizes the status information of its own block nodes after completing data calculation. After synchronization, it can update the status information of each block node in the current blockchain to ensure the consistency of block data. At this time, each block node can obtain the status information received by each block node according to the broadcast information in the form of broadcasting, and classify the information received by each block node to determine the status information of the current blockchain and the block nodes that have not completed the status update, and take corresponding update measures to make the data in the blockchain consistent and ensure the security of the blockchain data.

[0108] In addition, an embodiment of the present application also proposes a storage medium, on which a blockchain-based secure computing program is stored. When the blockchain-based secure computing program is executed by a processor, the steps of the blockchain-based secure computing method described above are implemented.

[0109] Refer to Figure 5, which is a structural block diagram of the first embodiment of the blockchain-based secure computing device of the present application.

[0110] As shown in FIG5 , the blockchain-based secure computing device proposed in the embodiment of the present application includes:

[0111] The data acquisition module 510 is configured to acquire cloud data according to the data calculation request initiated by the block node;

[0112] A node confirmation module 520 is configured to determine, based on the block node, adjacent block nodes adjacent to the block node;

[0113] The data calculation module 530 is configured to determine the total number of the block nodes and the adjacent block nodes; divide the cloud data into cloud data blocks that are consistent with the total number, and cause the block node and the adjacent block nodes to respectively perform calculations on their respective allocated cloud data blocks to obtain a plurality of local calculation results that are consistent with the total number, wherein each block node is allocated one of the cloud data blocks; and aggregate the plurality of local calculation results to obtain a calculation result of the cloud data;

[0114] The state synchronization module 540 is configured to synchronize the calculation results to the blockchain and update the data of the blockchain.

[0115] This embodiment obtains cloud data according to the data calculation request of the block node, determines the adjacent block node according to the block node, distributes the cloud data to the block node and the adjacent block node, enables the block node and the adjacent block node to perform edge calculation on the cloud data, obtains the calculation result, synchronizes the calculation result to the blockchain, and updates the data of the blockchain. By migrating the data with low delay sensitivity to the "edge" and "end" with large data volume, the burden of the blockchain is reduced, thereby improving the data processing efficiency and security of the blockchain.

[0116] In some embodiments, the node confirmation module 520 is further configured to obtain a node topology map of the blockchain; determine the position of the block node in the node topology map; determine the position of the block node directly connected to the block node based on the position of the block node in the node topology map; calculate the inter-node distance based on the position of the block node in the node topology map and the position of the block node directly connected to the block node; and determine the adjacent block node based on the inter-node distance.

[0117] In some embodiments, the data calculation module 530 is also configured to determine the computing business type based on the cloud data; determine the number of the computing business types, and compare the number of the computing business types with the total number; in response to the number of the computing business types being less than the total number, determine the difference between the total number and the number of the computing business types, and determine the target group based on the difference; determine the amount of data corresponding to the computing business type, and divide the data of the computing business type with a larger amount of data than other computing business types evenly into the target group based on the target group, so that the block node and the adjacent block node are calculated separately to obtain multiple local calculation results consistent with the total number.

[0118] In some embodiments, the data acquisition module 510 is further configured to locate the target block node storing the target cloud data according to the data calculation request of the block node; obtain the target cloud data from the target block node according to the data calculation request; and perform homomorphic encryption on the target cloud data to obtain the cloud data.

[0119] In some embodiments, the state synchronization module 540 is further configured to receive block synchronization information of the block node; send state determination information to all block nodes in the blockchain according to the block synchronization information, so that all block nodes broadcast their own state information; receive blockchain state information obtained by all block nodes based on the received broadcast state information and their own state information; broadcast the received blockchain state information in the blockchain, so that all block nodes compare the blockchain state information with the state information of all block nodes stored by themselves, and in response to the inconsistency between the blockchain state information and the state information of all block nodes stored by themselves, update the state information of all block nodes to the blockchain state information for storage.

[0120] In some embodiments, the state synchronization module 540 is further configured to generate a state vector table based on the broadcast state information, wherein the state vector table records the current state of each block node; the current state of each block node in the state vector table is classified according to the state type, and the current state corresponding to the type with the largest number is output as the blockchain state information.

[0121] In some embodiments, the state synchronization module 540 is further configured to detect the data capacity of the blockchain, and in response to the data capacity being greater than a preset threshold, add a block node to the blockchain;

[0122] The topology of the blockchain is updated according to the newly added block nodes.

[0123] The above is only an example. In actual application, those skilled in the art can make settings as needed.

[0124] Although the multiple steps in the flow chart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order and can be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0125] The workflow described above is illustrative only. In practical applications, those skilled in the art may select part or all of the workflows to implement the solution of this embodiment according to actual needs.

[0126] As used herein, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or system that includes the element.

[0127] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0128] Through the description of the above implementation methods, those skilled in the art can understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes at least one instruction for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method described in each embodiment of the present application.

Claims

1. A secure computing method based on blockchain, comprising: Obtain cloud data based on data calculation requests initiated by block nodes; Determine, according to the block node, an adjacent block node adjacent to the block node; Determining the total number of the block nodes and the adjacent block nodes; Divide the cloud data into cloud data blocks that are consistent with the total number, so that the block node and the adjacent block nodes respectively calculate the cloud data blocks allocated to them, and obtain a plurality of local calculation results that are consistent with the total number, wherein each block node is allocated one cloud data block; Aggregating the multiple local calculation results to obtain the calculation result of the cloud data; The calculation result is synchronized to the blockchain, and the data of the blockchain is updated.

2. The method of claim 1, wherein: The determining, according to the block node, an adjacent block node adjacent to the block node comprises: Obtaining a node topology diagram of the blockchain; Determine the position of the block node in the node topology map; Determine the position of the block node directly connected to the block node according to the position of the block node in the node topology map; Calculate the distance between nodes according to the position of the block node in the node topology map and the position of the block node directly connected to the block node; The adjacent block nodes are determined according to the distance between the nodes.

3. The method of claim 1, wherein: The dividing the cloud data into cloud data blocks that are consistent with the total number, so that the block node and the adjacent block node respectively calculate the cloud data blocks allocated to them, and obtain multiple local calculation results that are consistent with the total number, includes: Determine a computing service type according to the cloud data; Determine the number of computing service types, and compare the number of computing service types with the total number; In response to the number of the calculated service types being less than the total number, determining a difference between the total number and the number of the calculated service types, and determining a target group according to the difference; Determine the data volume corresponding to the computing business type, and according to the target grouping, evenly divide the data of the computing business type with a larger data volume than other computing business types into the target grouping, so that the block node and the adjacent block node are calculated separately to obtain multiple local calculation results consistent with the total number.

4. The method of claim 1, wherein: The step of obtaining cloud data according to a data calculation request initiated by a block node includes: Locating a target block node storing target cloud data according to a data calculation request of the block node; Acquire target cloud data from the target block node according to the data calculation request; The target cloud data is homomorphically encrypted to obtain the cloud data.

5. The method of claim 1, wherein: Before synchronizing the calculation result to the blockchain and updating the data of the blockchain, the method further includes: Receiving block synchronization information of the block node; Sending status confirmation information to all block nodes in the blockchain according to the block synchronization information, so that all block nodes broadcast their own status information; Receiving blockchain status information obtained by all block nodes according to the received broadcast status information and their own status information; The received blockchain status information is broadcasted in the blockchain, so that all the block nodes compare the blockchain status information with the status information of all the block nodes stored by themselves. In response to the inconsistency between the received blockchain status information and the status information of all the block nodes stored by themselves, the status information of all the block nodes is updated to the blockchain status information for storage.

6. The method of claim 5, wherein: The receiving of the blockchain status information obtained by all the block nodes according to the received broadcast status information and their own status information includes: Generate a state vector table according to the broadcasted state information, wherein the state vector table records the current state of each block node; The current state of each block node in the state vector table is classified according to the state type, and the current state corresponding to the type with the largest number is output as the blockchain state information.

7. The method according to claim 1, wherein after synchronizing the calculation result to the blockchain and updating the data of the blockchain, the method further comprises: detecting the data capacity of the blockchain, and in response to the data capacity being greater than a preset threshold, adding a block node to the blockchain; The topology map of the blockchain is updated according to the newly added block nodes.

8. A secure computing device based on blockchain, used to implement the secure computing method based on blockchain according to any one of claims 1 to 7, comprising: A data acquisition module, configured to acquire cloud data according to a data calculation request initiated by a block node; A node confirmation module, configured to determine an adjacent block node adjacent to the block node according to the block node; A data calculation module, configured to determine the total number of the block nodes and the adjacent block nodes; Divide the cloud data into cloud data blocks that are consistent with the total number, and make the block node and the adjacent block node respectively calculate the cloud data blocks allocated to them, so as to obtain a plurality of local calculation results that are consistent with the total number, wherein each block node is allocated one cloud data block; and aggregate the plurality of local calculation results to obtain a calculation result of the cloud data; The state synchronization module is configured to synchronize the calculation result to the blockchain and update the data of the blockchain.

9. A secure computing device based on blockchain, the secure computing device based on blockchain comprising: A memory, a processor, and a blockchain-based secure computing program stored in the memory and executable on the processor, wherein the blockchain-based secure computing program is configured to implement the blockchain-based secure computing method as described in any one of claims 1 to 7.

10. A storage medium, on which a blockchain-based secure computing program is stored, and when the blockchain-based secure computing program is executed by a processor, the blockchain-based secure computing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Secure multi-party computing method, electronic device and storage medium

    CN112184219A

  • Data communication method and system based on distributed edge computing

    CN116781699A

  • Block chain privacy protection method and system based on homomorphic encryption algorithm and zero-knowledge proof protocol

    CN116915379A

  • Block chain-based security calculation method and device, equipment and storage medium

    CN117395305A

  • Data sharding storage method and apparatus, and terminal and computer-readable storage mediium

    WO2021042923A1