[go: up one dir, main page]

CN114710508B - A data synchronization method and related device based on blockchain - Google Patents

A data synchronization method and related device based on blockchain Download PDF

Info

Publication number
CN114710508B
CN114710508B CN202210367814.3A CN202210367814A CN114710508B CN 114710508 B CN114710508 B CN 114710508B CN 202210367814 A CN202210367814 A CN 202210367814A CN 114710508 B CN114710508 B CN 114710508B
Authority
CN
China
Prior art keywords
hash value
node
verification result
data
data synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210367814.3A
Other languages
Chinese (zh)
Other versions
CN114710508A (en
Inventor
熊学涛
陈升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
21VIANET GROUP Inc
Original Assignee
21VIANET GROUP Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 21VIANET GROUP Inc filed Critical 21VIANET GROUP Inc
Priority to CN202210367814.3A priority Critical patent/CN114710508B/en
Publication of CN114710508A publication Critical patent/CN114710508A/en
Application granted granted Critical
Publication of CN114710508B publication Critical patent/CN114710508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请涉及区块链技术领域,尤其涉及一种基于区块链的数据同步方法及相关装置,区块链网络包括多个核心云节点和边缘计算节点,任意一个核心云节点响应于所述边缘节点发送的数据同步请求,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果;其中,所述数据同步请求中包括所述边缘节点获取到的待同步数据和哈希值;获取其它各核心云节点各自对应的哈希值验证结果,并基于各哈希值验证结果,确定所述边缘节点的节点验证结果;基于所述节点验证结果,对所述待同步数据进行数据同步,这样,能够提高数据同步的安全性。

The present application relates to the field of blockchain technology, and in particular to a blockchain-based data synchronization method and related devices. The blockchain network includes multiple core cloud nodes and edge computing nodes. Any core cloud node responds to a data synchronization request sent by the edge node, verifies the hash value in the data synchronization request, and determines a hash value verification result corresponding to the hash value; wherein the data synchronization request includes the data to be synchronized and the hash value obtained by the edge node; the hash value verification results corresponding to each of the other core cloud nodes are obtained, and based on each hash value verification result, the node verification result of the edge node is determined; based on the node verification result, the data to be synchronized is synchronized, so that the security of data synchronization can be improved.

Description

Data synchronization method and related device based on block chain
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a blockchain-based data synchronization method and related devices.
Background
With the development of internet technology, more and more applications need to be deployed to edges to achieve closer users and quicker interaction, and cloud edge collaboration is very important characteristics and requirements in edge computing, and comprises various synergies such as resource collaboration, application collaboration, data collaboration, intelligent collaboration and the like.
In the cloud-edge cooperative data synchronization, the number of edge nodes is large, and safety measures for the edge nodes are weaker than those for the core cloud nodes, so that the safety of data is not high in the data synchronization process.
In the related art, when data synchronization of cloud-edge coordination is performed, a mode of encryption transmission between nodes is generally adopted, channels between edge nodes and core cloud nodes are encrypted, and after the data reach the core cloud nodes, the core cloud nodes perform decryption and uploading, so that the data synchronization is realized.
However, in the related art, the encryption is performed on the channel between one edge node and one core cloud node, and when the edge computing node is broken, an illegal data synchronization request can be sent to the core cloud node, so that the whole system data is monitored and stolen, and therefore, the security of data synchronization can be reduced by only performing verification and decryption on the edge node through one core cloud node.
Disclosure of Invention
The embodiment of the application provides a data synchronization method and a related device based on a block chain so as to improve the safety of data synchronization.
The specific technical scheme provided by the embodiment of the application is as follows:
a blockchain-based data synchronization method, the blockchain network including a plurality of core cloud nodes and edge nodes, the method comprising:
Any core cloud node responds to a data synchronization request sent by the edge node, verifies a hash value in the data synchronization request, and determines a hash value verification result corresponding to the hash value, wherein the data synchronization request comprises data to be synchronized and the hash value acquired by the edge node;
Obtaining hash value verification results corresponding to other core cloud nodes, and determining node verification results of the edge nodes based on the hash value verification results;
And based on the node verification result, carrying out data synchronization on the data to be synchronized.
Optionally, verifying the hash value in the data synchronization request, and determining a hash value verification result corresponding to the hash value specifically includes:
Determining corresponding hash value sequence information based on node identifiers corresponding to any core cloud node;
Determining a corresponding node hash value from the hash values based on the hash value sequence information, wherein the hash value comprises node hash values corresponding to each core cloud node, and the node hash values are arranged based on a preset sequence;
And determining a hash value verification result based on the node hash value and in combination with a preset hash value authentication rule.
Optionally, determining the hash value verification result specifically includes:
If the node hash value is determined to be the same as the prestored standard node hash value, determining that the corresponding hash value verification result is passed;
If the node hash value is determined to be different from the standard node hash value, determining that the corresponding hash value verification result is failed.
Optionally, determining the node verification result of the edge node based on each hash value verification result specifically includes:
determining the number of the hash value verification results passing through from the hash value verification results, and taking the number of the hash value verification results as the number of the results corresponding to the edge nodes;
If the number of the results is not smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is passed;
If the number of the results is smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is failed.
Optionally, based on the node verification result, performing data synchronization on the data to be synchronized specifically includes:
If the node verification result is determined to be passed, carrying out data synchronization on the data to be synchronized by adopting a preset data synchronization mode;
if the node verification result is determined to be failed, determining the edge node as a problem node, generating alarm information based on the node verification result, and sending the alarm information to a client for display.
Optionally, a preset data synchronization mode is adopted to perform data synchronization on the data to be synchronized, which specifically includes:
reading a node authority type, wherein the node authority type is provided with a packaging authority and a non-authority;
If the node authority type is determined to have the packaging authority, packaging the data to be synchronized to obtain updated data, and storing the updated data into a preset system database;
If the node authority type is determined to be non-authority, a synchronization instruction is sent to a core cloud node with the node authority type being packaging authority, so that the core cloud node with the node authority type being packaging authority packages the data to be synchronized, update data is obtained, and the update data is stored in the system database.
A blockchain-based data synchronization method, the blockchain network including a plurality of core cloud nodes and edge computing nodes, the method comprising:
the edge node acquires data to be synchronized and determines a hash value;
generating a data synchronization request containing the data to be synchronized and the hash value;
And respectively sending the data synchronization requests to the plurality of core cloud nodes, so that the plurality of core cloud nodes respectively respond to the data synchronization requests sent by the edge nodes, verify hash values in the data synchronization requests, determine hash value verification results corresponding to the hash values, acquire hash value verification results corresponding to other core cloud nodes, determine node verification results of the edge nodes based on the hash value verification results, and perform data synchronization on the data to be synchronized based on the node verification results.
A blockchain-based data synchronization apparatus, the blockchain network including a plurality of core cloud nodes and edge nodes, the apparatus being applied to any one core cloud node, the apparatus comprising:
the verification module is used for verifying the hash value in the data synchronization request in response to the data synchronization request sent by the edge node by any core cloud node and determining a hash value verification result corresponding to the hash value, wherein the data synchronization request comprises the data to be synchronized and the hash value acquired by the edge node;
the determining module is used for acquiring hash value verification results corresponding to other core cloud nodes and determining node verification results of the edge nodes based on the hash value verification results;
and the processing module is used for carrying out data synchronization on the data to be synchronized based on the node verification result.
Optionally, the hash value in the data synchronization request is verified, a hash value verification result corresponding to the hash value is determined, and the verification module is further configured to:
Determining corresponding hash value sequence information based on node identifiers corresponding to any core cloud node;
Determining a corresponding node hash value from the hash values based on the hash value sequence information, wherein the hash value comprises node hash values corresponding to each core cloud node, and the node hash values are arranged based on a preset sequence;
And determining a hash value verification result based on the node hash value and in combination with a preset hash value authentication rule.
Optionally, when determining the hash value verification result, the verification module is further configured to:
If the node hash value is determined to be the same as the prestored standard node hash value, determining that the corresponding hash value verification result is passed;
If the node hash value is determined to be different from the standard node hash value, determining that the corresponding hash value verification result is failed.
Optionally, when determining the node verification result of the edge node based on each hash value verification result, the determining module is further configured to:
determining the number of the hash value verification results passing through from the hash value verification results, and taking the number of the hash value verification results as the number of the results corresponding to the edge nodes;
If the number of the results is not smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is passed;
If the number of the results is smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is failed.
Optionally, the processing module is further configured to:
If the node verification result is determined to be passed, carrying out data synchronization on the data to be synchronized by adopting a preset data synchronization mode;
if the node verification result is determined to be failed, determining the edge node as a problem node, generating alarm information based on the node verification result, and sending the alarm information to a client for display.
Optionally, a preset data synchronization mode is adopted, and when data synchronization is performed on the data to be synchronized, the processing module is further configured to:
reading a node authority type, wherein the node authority type is provided with a packaging authority and a non-authority;
If the node authority type is determined to have the packaging authority, packaging the data to be synchronized to obtain updated data, and storing the updated data into a preset system database;
If the node authority type is determined to be non-authority, a synchronization instruction is sent to a core cloud node with the node authority type being packaging authority, so that the core cloud node with the node authority type being packaging authority packages the data to be synchronized, update data is obtained, and the update data is stored in the system database.
A blockchain-based data synchronization device, the blockchain network including a plurality of core cloud nodes and edge nodes to which the device is applied, the device comprising:
The acquisition module is used for acquiring data to be synchronized and determining a hash value;
The generation module is used for generating a data synchronization request containing the data to be synchronized and the hash value;
And the processing module is used for respectively sending the data synchronization requests to the plurality of core cloud nodes, so that the plurality of core cloud nodes respectively respond to the data synchronization requests sent by the edge nodes, verify the hash values in the data synchronization requests, determine hash value verification results corresponding to the hash values, acquire hash value verification results corresponding to other core cloud nodes, determine node verification results of the edge nodes based on the hash value verification results, and perform data synchronization on the data to be synchronized based on the node verification results.
An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the blockchain-based data synchronization method described above when the program is executed.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the blockchain-based data synchronization method described above.
In the embodiment of the application, any core cloud node responds to a data synchronization request sent by an edge node, verifies a hash value in the data synchronization request, determines a hash value verification result corresponding to the hash value, wherein the data synchronization request comprises data to be synchronized and the hash value acquired by the edge node, acquires hash value verification results corresponding to other core cloud nodes, determines a node verification result of the edge node based on the hash value verification results, and performs data synchronization on the data to be synchronized based on the node verification result. Therefore, when the edge node initiates the data synchronization request, the node verification result of the edge node needs to be determined based on the hash value verification results corresponding to each core cloud node in the group, and the data synchronization is realized based on the node verification results, so that single-point authentication is converted into distributed authentication, and even if the edge node is broken, the authentication of all the core cloud nodes cannot be passed, thereby improving the security of the data synchronization.
Drawings
FIG. 1 is a schematic diagram of a block chain based data synchronization method according to an embodiment of the present application;
FIG. 2 is a flowchart of a data synchronization method based on a blockchain in an embodiment of the present application;
FIG. 3 is a block chain block diagram of an embodiment of the present application;
FIG. 4 is another flow chart of a method for data synchronization based on blockchain in an embodiment of the application;
FIG. 5 is a block chain based data synchronization apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating another exemplary block chain based data synchronization apparatus according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
With the rapid development of the industrial internet along with the digitized transformation and upgrading of enterprises, more and more applications need to be deployed towards the edge to realize closer users, quicker interaction and lossless information transmission, such as remote medical treatment, industrial control, internet of vehicles and other scenes. Edge clouds are a major trend in the current development of cloud computing.
Edge cloud implementations bring computing, storage, network capabilities closer to user distributed deployment. In the edge computation of the cloud edge collaboration scene, a large amount of information is required to be transferred between the core cloud node and the edge node, and the cloud edge collaboration is very important characteristic and requirement in the edge computation, and comprises various synergies such as resource collaboration, application collaboration, data collaboration, intelligent collaboration and the like.
In the cloud-edge cooperative data synchronization, because the number of edge nodes is large and the security measures of the edge nodes are relatively weaker than those of the core cloud nodes, the risks of leakage from the edge nodes and illegal data uploading from the edge nodes in the data synchronization process must be prevented and controlled.
In the related art, when performing data synchronization of cloud-edge collaboration, the data synchronization can be generally achieved in the following two ways.
The first mode is that the edge node uploads the data transmitted from the user side to the nearest core cloud node through an encryption channel or uploads the data to the home core cloud node for synchronization, then the core cloud node receives the data through the encryption channel, when the received data is verified to have no problem, the data is stored in a system database, and according to the actual requirements of the system and the application, the core cloud node determines whether to synchronize the data to other edge nodes.
And the second mode is that the edge node uploads the data transmitted from the user side to the nearest core cloud node in a data encryption mode or uploads the data to the home core cloud node in a synchronization mode, then the core cloud node decrypts the received data, and when the received data is verified to have no problem, the data is stored in a system database, and according to the actual requirements of the system and the application, the core cloud node determines whether to synchronize the data to other edge nodes.
However, the data synchronization method of the cloud edge collaboration scene in the related art is still an update method of single-point verification, and is also a set of encryption on a channel between an edge node and a core cloud node or encryption on data transmitted between an edge node and a core cloud node, so that when the edge node is broken, an illegal data synchronization request can be initiated to the core cloud node, thereby causing the whole system data to be tampered and damaged or monitored and stolen, having larger security risk and reducing the security of data synchronization.
In order to solve the above problems, in an embodiment of the present application, a data synchronization method based on a blockchain is provided, any one core cloud node verifies a hash value in a data synchronization request in response to a data synchronization request sent by an edge node, determines a hash value verification result corresponding to the hash value, the data synchronization request includes data to be synchronized and the hash value obtained by the edge node, obtains hash value verification results corresponding to other core cloud nodes, determines a node verification result of the edge node based on the hash value verification results, and performs data synchronization on the data to be synchronized based on the node verification result. Therefore, the data synchronization is changed from single-point encryption and single-point authentication into distributed verification and authentication, any edge node initiates a data synchronization request, and the data synchronization can be performed only by the verification of all core cloud nodes in the group, so that the security of the data synchronization can be improved.
Based on the above embodiments, referring to fig. 1, a schematic view of a data synchronization method based on a blockchain in an embodiment of the present application is shown, which specifically includes:
And grouping and classifying each core cloud node and each edge node in the original cloud computing, wherein each edge node belongs to a group of core cloud nodes, so that the blockchain network comprises a plurality of node groups, and each node group comprises one edge node and a plurality of core cloud nodes.
As shown in fig. 1, each core cloud node in the blockchain network is A, B, C, D, E, each edge node is a, B, C, D, E, f, g, h, i, j, k, each core cloud node and each edge node are grouped and classified, edge node a, core cloud node B and core cloud node C are grouped, edge node f, core cloud node B, core cloud node C and core cloud node D are grouped, and edge node j, core cloud node C, core cloud node D and core cloud node E are grouped.
Each core cloud node in one group is used as a stakeholder node of a blockchain, a part of core cloud nodes in the authorized group are assigned to have the rights of blockchain accounting and data storage, each core cloud node verifies hash values in data synchronization requests respectively, hash value verification results corresponding to the hash values are determined, hash value verification results corresponding to other core cloud nodes in one group are obtained, node verification results of edge nodes are determined based on the hash value verification results, and data synchronization is performed on data to be synchronized based on the node verification results.
The edge computing nodes in the group are used as common nodes of the blockchain, receive data to be synchronized, which are automatically acquired by a user or a system, generate data synchronization requests based on the data to be synchronized, and respectively send the data synchronization requests to each core cloud node in the group.
Based on the above embodiments, referring to fig. 2, a flow chart of a data synchronization method based on a blockchain in an embodiment of the present application specifically includes:
And S20, any core cloud node responds to the data synchronization request sent by the edge node, verifies the hash value in the data synchronization request and determines a hash value verification result corresponding to the hash value.
The data synchronization request comprises data to be synchronized and a hash value acquired by the edge node.
In the embodiment of the application, the blockchain network comprises a plurality of core cloud nodes and an edge node, and the edge node sends a data synchronization request to each core cloud node in the blockchain network, so that after receiving the data synchronization request sent by the edge node, any core cloud node responds to the received data synchronization request to verify the hash value in the data synchronization request, and a hash value verification result corresponding to the hash value is obtained.
The data to be synchronized is update data received by the edge node from a user or automatically acquired by the system, and the update data may be, for example, local temperature, humidity and other information acquired by an industrial sensor.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for determining a hash value verification result corresponding to a hash value, and a process for determining the hash value verification result in the embodiment of the present application is described in detail below, which specifically includes:
s201, determining corresponding hash value sequence information based on node identifiers corresponding to any core cloud node.
In the embodiment of the application, each core cloud node in the blockchain network corresponds to one node hash value, and the hash values are generated by arranging the node hash values corresponding to the core cloud nodes according to the preset sequence, so that each core cloud node is associated with corresponding hash value sequence information, and the hash value sequence information associated with the core cloud node can be determined based on the node identifier corresponding to any core cloud node.
It should be noted that, in the embodiment of the present application, the hash value sequence information is used to indicate the sequence of the node hash value corresponding to a certain core cloud node in the hash value.
In addition, it should be noted that in the embodiment of the present application, each core cloud node corresponds to one hash value sequence information, for example, a node identifier of the core cloud node a is 1, and hash value sequence information associated with the node identifier 1 is first, and then the node hash value corresponding to the core cloud node is arranged in the first bit in the hash values of the nodes.
S202, determining a corresponding node hash value from the hash values based on the hash value sequence information.
The hash value comprises node hash values corresponding to each core cloud node, and the node hash values are arranged based on a preset sequence.
In the embodiment of the application, after the hash value sequence information is obtained, the corresponding node hash value can be determined from the node hash values which are arranged according to the sequence.
For example, assume that the hash value is 99,100,20,31, where the node corresponding to the core cloud node a is identified as 1, the node corresponding to the core cloud node B is identified as 2, the node corresponding to the core cloud node C is identified as 3, and the node corresponding to the core cloud node D is identified as 4. If the core cloud node is the core cloud node B, determining that the corresponding hash value sequence information is third according to the node identifier 2 corresponding to the core cloud node B, and therefore determining that the node hash value corresponding to the core cloud node is 20 from the hash values according to the hash value sequence information.
In the embodiment of the application, different core cloud nodes in the group are respectively provided with different blockchain verification passwords, and the node hash value is generated by combining a hash algorithm according to the blockchain verification passwords corresponding to the core cloud nodes. The block chain verification password in the embodiment of the application is transmitted after being calculated by a hash algorithm, and is not transmitted by a plaintext, so that the safety of data synchronization can be improved.
S203, determining a hash value verification result based on the node hash value and combining a preset hash value authentication rule.
In the embodiment of the application, the hash value verification result is determined based on the node hash value and in combination with a preset hash value authentication rule, and specifically, the hash value verification result can be determined through the corresponding node hash value verification result.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for determining the hash value verification result, and in the following embodiment of the present application, a process for determining the hash value verification result is described in detail, which specifically includes:
and S203-1, if the node hash value is determined to be the same as the prestored standard node hash value, determining that the corresponding hash value verification result is passed.
In the embodiment of the application, whether the node hash value is the same as the prestored standard node hash value is judged, and if the node hash value is the same as the prestored standard node hash value, the corresponding hash value verification result is determined to be passed.
And S203-2, if the node hash value is determined to be different from the standard node hash value, determining that the corresponding hash value verification result is failed.
In the embodiment of the application, whether the node hash value is the same as the prestored standard node hash value is judged, and if the node hash value is different from the prestored standard node hash value, the corresponding hash value verification result is determined to be failed.
In the embodiment of the application, the validity and compliance of the data to be synchronized are checked, so that the data to be synchronized is ensured to be legal.
S21, obtaining hash value verification results corresponding to other core cloud nodes, and determining node verification results of the edge nodes based on the hash value verification results.
In the embodiment of the application, hash value verification results corresponding to other core cloud nodes are obtained, and node verification results of the edge nodes are determined based on the hash value verification results.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for determining hash value verification results corresponding to core cloud nodes, and a process for determining node verification results of edge nodes in the embodiment of the present application is described in detail below, which specifically includes:
S211, determining the number of the hash value verification results as the number of the results corresponding to the edge nodes from the hash value verification results.
In the embodiment of the application, since the hash value verification results are divided into pass and fail, the hash value verification results are counted as the pass number in each hash value verification result, and the determined number is used as the result number corresponding to the edge node.
For example, assuming that the hash value verification result corresponding to the core cloud node a is passing, the hash value verification result corresponding to the core cloud node B is passing, the hash value verification result corresponding to the core cloud node C is not passing, and the hash value verification result corresponding to the core cloud node D is passing, the number of the hash value verification results passing is determined to be 3, so the number of the results corresponding to the edge nodes is 3.
And S212, if the number of the determined results is not smaller than the preset number threshold, determining that the node verification result corresponding to the edge node is passed.
In the embodiment of the application, whether the number of the results is not smaller than the preset number threshold is judged, and if the number of the results is not smaller than the preset number threshold, the node verification result corresponding to the edge node is determined to be passed.
For example, assuming that the number of results is 10 and the preset number threshold is 9, it is determined that the node verification result corresponding to the edge node is passed.
It should be noted that, in the embodiment of the present application, the number threshold is determined based on the number of core cloud nodes and the verification success percentage.
For example, assuming that the number of core cloud nodes is 20 and the verification success percentage is 90%, the calculated number threshold is 18, that is, if the number of the determined results is greater than or equal to 18, the node verification result corresponding to the edge node is determined to be passed, and if the number of the determined results is less than 18, the node verification result corresponding to the edge node is determined to be failed.
And S213, if the number of the determined results is smaller than the preset number threshold, determining that the node verification result corresponding to the edge node is failed.
In the embodiment of the application, whether the number of the results is not smaller than the preset number threshold is judged, and if the number of the results is smaller than the preset number threshold, the node verification result corresponding to the edge node is determined to be failed.
For example, assuming that the number of results is 7 and the preset number threshold is 9, it is determined that the node verification result corresponding to the edge node is failed.
Optionally, in the embodiment of the present application, a possible implementation manner is further provided for determining a node verification result corresponding to an edge node, specifically, counting the number of passing hash value verification results, determining a ratio between the number of passing hash value verification results and the number of nodes of all core cloud nodes according to the number of passing hash value verification results, if the calculated ratio is determined not to be smaller than a preset ratio threshold, determining that the node verification result corresponding to the edge node is passing, and if the calculated ratio is determined to be smaller than the preset ratio threshold, determining that the node verification result corresponding to the edge node is not passing.
For example, assuming that the number of the counted hash value verification results is 10 and there are 20 core cloud nodes in total, if the number of the counted hash value verification results is 10, calculating the ratio of the number of the passing hash values to the number of all core cloud nodes to be 0.5, determining that the calculated ratio of 0.5 is smaller than a preset ratio threshold value of 0.8, and determining that the node verification result corresponding to the edge node is failed.
For another example, assuming that the number of the counted hash value verification results is 9 and 10 core cloud nodes are total, each hash value verification result is 9, the ratio between the number of the passing results and the number of all core cloud nodes is calculated to be 0.9, the calculated ratio 0.9 is determined to be greater than a preset ratio threshold value 0.8, the hash value verification result of the core cloud nodes in the group is determined to be that the passing ratio reaches the ratio threshold value, the node verification result corresponding to the edge node is determined to be passing, and the edge node passes authentication.
And S22, carrying out data synchronization on the data to be synchronized based on the node verification result.
In the embodiment of the application, after the node verification result is obtained, the data to be synchronized in the data synchronization request can be synchronized based on the node verification result.
Optionally, in the embodiment of the present application, a possible implementation manner is provided for performing data synchronization on data to be synchronized based on a node verification result, and a data synchronization process for data to be synchronized in the embodiment of the present application is described in detail below, which specifically includes:
S221, if the node verification result is determined to be passed, carrying out data synchronization on the data to be synchronized by adopting a preset data synchronization mode.
S2211, reading the node authority type.
The node authority types are package authority and no authority.
In the embodiment of the application, each core cloud node corresponds to a node authority type, and the node authority types are divided into a packaging authority type and a non-authority type, so that the node authority types of the core cloud nodes are read.
The specific packaging authority characterizes the core cloud node to have the authority of packaging the data to be synchronized, and the non-authority characterizes the core cloud node not to have the authority of packaging the data to be synchronized.
S2212, if the node authority type is determined to have the packaging authority, packaging the data to be synchronized to obtain updated data, and storing the updated data into a preset system database.
In the embodiment of the application, if the node authority type is determined to have the packaging authority, the data to be synchronized in the data synchronization request is packaged and uplink to obtain the updated data, and the updated data is stored in a preset system database.
S2213, if the node authority type is determined to be non-authority, a synchronous instruction is sent to the core cloud node with the node authority type of packing authority, so that the core cloud node with the node authority type of packing authority packs data to be synchronized, update data is obtained, and the update data is stored in a system database.
In the embodiment of the application, if the node authority type is determined to be non-authority, a synchronous instruction is sent to the core cloud node with the node authority type of packing authority, so that the core cloud node with the node authority type of packing authority corresponds to the node authority type to pack the data to be synchronized, update data is obtained, and the update data is stored in a system database, thereby realizing synchronous processing of the data to be synchronized.
For example, referring to FIG. 3, a block chain block diagram is shown in which each block is used to package verification and data update information and form hash values from node hash values in accordance with an embodiment of the present application.
And S222, if the node verification result is determined to be failed, determining the edge node as a problem node, generating alarm information based on the node verification result, and sending the alarm information to the client for display.
In the embodiment of the application, if the node verification result is not passed, determining the edge node as a problem node, generating relevant alarm information based on the node verification result, and sending the generated alarm information to the client for display, thereby determining the working state of the edge node by an administrator and deciding whether the edge node is required to be out of service.
In the embodiment of the application, the data synchronization process is changed from original single-point encryption and single-point authentication into distributed verification and authentication, any edge node initiates data synchronization, all core cloud nodes in the group need to be verified, and only the core cloud nodes with the hash value verification result that the number of the core cloud nodes passes through the threshold exceeds the preset number can perform data synchronization through verification, so that the safety of data synchronization can be ensured, in addition, in the embodiment of the application, in the data synchronization request, the verification passwords are not sent in the plaintext, the results of the hash values of the nodes are arranged in sequence, the messages are intercepted in time, the passwords cannot be cracked, and the security of data synchronization is further improved.
Based on the above embodiments, referring to fig. 4, another flowchart of a data synchronization method based on a blockchain in an embodiment of the present application specifically includes:
s40, acquiring data to be synchronized, and determining a hash value.
In the embodiment of the application, the edge node receives the data to be synchronized and determines the hash value corresponding to each core cloud node.
It should be noted that, when the edge node receives the data to be synchronized, the edge node may be divided into two modes, the first mode, for receiving the data to be synchronized uploaded by the user, and the second mode, for receiving the data to be synchronized automatically acquired by the system.
The data to be synchronized may be, for example, local temperature, humidity, etc. information acquired by an industrial sensor, which is not limited in the embodiment of the present application.
And S41, generating a data synchronization request containing data to be synchronized and a hash value.
In the embodiment of the application, the data synchronization request is generated based on the data to be synchronized and the hash value, so that the data synchronization request contains the data to be synchronized and the hash value.
And S42, respectively transmitting the data synchronization request to a plurality of core cloud nodes, so that the plurality of core cloud nodes respectively respond to the data synchronization request transmitted by the edge node, verify the hash value in the data synchronization request, determine hash value verification results corresponding to the hash value, acquire hash value verification results corresponding to other core cloud nodes, determine node verification results of the edge node based on the hash value verification results, and perform data synchronization on the data to be synchronized based on the node verification results.
In the embodiment of the application, the data synchronization request is respectively sent to the plurality of core cloud nodes in the group, so that the plurality of core cloud nodes respectively respond to the data synchronization request sent by the edge node after receiving the data synchronization request, verify the hash value in the data synchronization request, determine the hash value verification result corresponding to the hash value, then acquire the hash value verification results corresponding to other core cloud nodes respectively, and determine the node verification result corresponding to the edge node based on the hash value verification results, thereby determining whether the data to be synchronized uploaded by the edge node can be synchronized based on the node verification result.
Further, in the embodiment of the present application, the edge node may also receive data sent by the core cloud node, which is not limited in the embodiment of the present application.
Based on the same inventive concept, the embodiment of the application also provides a data synchronization device based on the block chain, wherein the data synchronization device based on the block chain can be a hardware structure, a software module or a hardware structure plus a software module. Based on the above embodiments, referring to fig. 5, in an embodiment of the present application, a block chain-based data synchronization device is shown, which specifically includes:
The verification module 500 is configured to verify a hash value in a data synchronization request sent by an edge node in response to the data synchronization request by any one core cloud node, and determine a hash value verification result corresponding to the hash value;
The determining module 510 is configured to obtain hash value verification results corresponding to other core cloud nodes, and determine a node verification result of the edge node based on the hash value verification results;
and the processing module 520 is configured to perform data synchronization on the data to be synchronized based on the node verification result.
Optionally, the hash value in the data synchronization request is verified, and a hash value verification result corresponding to the hash value is determined, and the verification module 500 is further configured to:
Determining corresponding hash value sequence information based on node identifiers corresponding to any core cloud node;
Determining a corresponding node hash value from the hash values based on the hash value sequence information, wherein the hash value comprises node hash values corresponding to each core cloud node, and the node hash values are arranged based on a preset sequence;
And determining a hash value verification result based on the node hash value and in combination with a preset hash value authentication rule.
Optionally, when determining the hash value verification result, the verification module 500 is further configured to:
If the node hash value is determined to be the same as the prestored standard node hash value, determining that the corresponding hash value verification result is passed;
If the node hash value is determined to be different from the standard node hash value, determining that the corresponding hash value verification result is failed.
Optionally, when determining the node verification result of the edge node based on each hash value verification result, the determining module 510 is further configured to:
determining the number of the hash value verification results passing through from the hash value verification results, and taking the number of the hash value verification results as the number of the results corresponding to the edge nodes;
If the number of the results is not smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is passed;
If the number of the results is smaller than a preset number threshold, determining that the node verification result corresponding to the edge node is failed.
Optionally, the processing module 520 is further configured to:
If the node verification result is determined to be passed, carrying out data synchronization on the data to be synchronized by adopting a preset data synchronization mode;
if the node verification result is determined to be failed, determining the edge node as a problem node, generating alarm information based on the node verification result, and sending the alarm information to a client for display.
Optionally, when the data to be synchronized is synchronized by adopting a preset data synchronization manner, the processing module 520 is further configured to:
reading a node authority type, wherein the node authority type is provided with a packaging authority and a non-authority;
If the node authority type is determined to have the packaging authority, packaging the data to be synchronized to obtain updated data, and storing the updated data into a preset system database;
If the node authority type is determined to be non-authority, a synchronization instruction is sent to a core cloud node with the node authority type being packaging authority, so that the core cloud node with the node authority type being packaging authority packages the data to be synchronized, update data is obtained, and the update data is stored in the system database.
Based on the same inventive concept, another data synchronization device based on a block chain is also provided in the embodiment of the present application, where the data synchronization device based on a block chain may be a hardware structure, a software module, or a hardware structure plus a software module. Based on the above embodiments, referring to fig. 6, a schematic structural diagram of another data synchronization device based on a blockchain in an embodiment of the present application specifically includes:
an obtaining module 600, configured to obtain data to be synchronized and determine a hash value;
a generating module 610, configured to generate a data synchronization request including the data to be synchronized and the hash value;
And the processing module 620 is configured to send the data synchronization request to the plurality of core cloud nodes, so that the plurality of core cloud nodes respectively respond to the data synchronization request sent by the edge node, verify hash values in the data synchronization request, determine hash value verification results corresponding to the hash values, obtain hash value verification results corresponding to other core cloud nodes, determine node verification results of the edge node based on the hash value verification results, and perform data synchronization on the data to be synchronized based on the node verification results.
Based on the above embodiments, referring to fig. 7, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown.
Embodiments of the present application provide an electronic device that may include a processor 710 (Center Processing Unit, a CPU), a memory 720, an input device 730, an output device 740, and the like, where the input device 730 may include a keyboard, a mouse, a touch screen, and the like, and the output device 740 may include a display device, such as a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), a Cathode Ray Tube (CRT), and the like.
Memory 720 may include Read Only Memory (ROM) and Random Access Memory (RAM) and provides processor 710 with program instructions and data stored in memory 720. In an embodiment of the present application, the memory 720 may be used to store a program of any of the blockchain-based data synchronization methods in the embodiment of the present application.
Processor 710 is configured to execute any of the blockchain-based data synchronization methods of the embodiments of the present application in accordance with the obtained program instructions by calling the program instructions stored in memory 720 by processor 710.
Based on the above embodiments, in the embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the blockchain-based data synchronization method in any of the method embodiments described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1.一种基于区块链的数据同步方法,其特征在于,区块链网络包括多个核心云节点和边缘节点,所述方法包括:1. A data synchronization method based on blockchain, characterized in that the blockchain network includes multiple core cloud nodes and edge nodes, and the method includes: 任意一个核心云节点响应于所述边缘节点发送的数据同步请求,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果;其中,所述数据同步请求中包括所述边缘节点获取到的待同步数据和哈希值,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,具体包括:基于所述任意一个核心云节点对应的节点标识,确定出相应的哈希值顺序信息,基于所述哈希值顺序信息,从所述哈希值中,确定出对应的节点哈希值,其中,所述哈希值中包括每个核心云节点各自对应的节点哈希值,各节点哈希值是基于预设顺序排列的,基于所述节点哈希值,结合预设的哈希值认证规则,确定哈希值验证结果;Any core cloud node responds to the data synchronization request sent by the edge node, verifies the hash value in the data synchronization request, and determines the hash value verification result corresponding to the hash value; wherein the data synchronization request includes the data to be synchronized and the hash value obtained by the edge node, verifies the hash value in the data synchronization request, and determines the hash value verification result corresponding to the hash value, specifically including: based on the node identifier corresponding to any core cloud node, determining the corresponding hash value sequence information, based on the hash value sequence information, determining the corresponding node hash value from the hash value, wherein the hash value includes the node hash value corresponding to each core cloud node, and each node hash value is arranged based on a preset order, and based on the node hash value, combined with a preset hash value authentication rule, determines the hash value verification result; 获取其它各核心云节点各自对应的哈希值验证结果,并基于各哈希值验证结果,确定所述边缘节点的节点验证结果;Obtaining hash value verification results corresponding to each other core cloud node, and determining the node verification result of the edge node based on each hash value verification result; 基于所述节点验证结果,对所述待同步数据进行数据同步。Based on the node verification result, data synchronization is performed on the data to be synchronized. 2.如权利要求1所述的方法,其特征在于,确定哈希值验证结果,具体包括:2. The method according to claim 1, wherein determining the hash value verification result specifically comprises: 若确定所述节点哈希值与预先存储的标准节点哈希值相同,则确定对应的哈希值验证结果为通过;If it is determined that the node hash value is the same as the pre-stored standard node hash value, then the corresponding hash value verification result is determined to be passed; 若确定所述节点哈希值与所述标准节点哈希值不相同,则确定对应的哈希值验证结果为未通过。If it is determined that the node hash value is different from the standard node hash value, the corresponding hash value verification result is determined to be failed. 3.如权利要求2所述的方法,其特征在于,基于各哈希值验证结果,确定所述边缘节点的节点验证结果,具体包括:3. The method according to claim 2, wherein determining the node verification result of the edge node based on each hash value verification result specifically comprises: 从各哈希值验证结果中,确定出哈希值验证结果为通过的数量,作为所述边缘节点对应的结果数量;From each hash value verification result, determine the number of hash value verification results that pass as the number of results corresponding to the edge node; 若确定所述结果数量不小于预设的数量阈值,则确定所述边缘节点对应的节点验证结果为通过;If it is determined that the number of results is not less than a preset number threshold, determining that the node verification result corresponding to the edge node is passed; 若确定所述结果数量小于预设的数量阈值,则确定所述边缘节点对应的节点验证结果为未通过。If it is determined that the number of results is less than a preset number threshold, then it is determined that the node verification result corresponding to the edge node is failed. 4.如权利要求1所述的方法,其特征在于,基于所述节点验证结果,对所述待同步数据进行数据同步,具体包括:4. The method according to claim 1, characterized in that synchronizing the data to be synchronized based on the node verification result specifically comprises: 若确定所述节点验证结果为通过,则采用预设的数据同步方式,对待同步数据进行数据同步;If it is determined that the node verification result is passed, a preset data synchronization method is used to synchronize the data to be synchronized; 若确定所述节点验证结果为未通过,则确定所述边缘节点为问题节点,并基于所述节点验证结果,生成告警信息,将所述告警信息发送至客户端进行展示。If it is determined that the node verification result is failed, the edge node is determined to be a problem node, and based on the node verification result, an alarm message is generated, and the alarm message is sent to the client for display. 5.如权利要求4所述的方法,其特征在于,采用预设的数据同步方式,对待同步数据进行数据同步,具体包括:5. The method according to claim 4, characterized in that the data to be synchronized is synchronized using a preset data synchronization method, specifically comprising: 读取节点权限类型,其中,所述节点权限类型为具有打包权限和无权限;Read the node permission type, where the node permission type is either with packaging permission or without permission; 若确定所述节点权限类型为具有打包权限,则对所述待同步数据进行打包,获得更新数据,并将所述更新数据存储至预设的系统数据库中;If it is determined that the node permission type has packaging permission, the data to be synchronized is packaged to obtain updated data, and the updated data is stored in a preset system database; 若确定所述节点权限类型为无权限,则向所述节点权限类型为具有打包权限的核心云节点发送同步指令,以使所述节点权限类型为具有打包权限的核心云节点对所述待同步数据进行打包,获得更新数据,并将所述更新数据存储至所述系统数据库中。If it is determined that the node authority type is no authority, a synchronization instruction is sent to the core cloud node whose node authority type is with packaging authority, so that the core cloud node whose node authority type is with packaging authority packages the data to be synchronized, obtains updated data, and stores the updated data in the system database. 6.一种基于区块链的数据同步方法,其特征在于,区块链网络包括多个核心云节点和边缘节点,所述方法包括:6. A data synchronization method based on blockchain, characterized in that the blockchain network includes multiple core cloud nodes and edge nodes, and the method includes: 所述边缘节点获取待同步数据,以及,确定哈希值;The edge node obtains the data to be synchronized, and determines a hash value; 生成包含有所述待同步数据和所述哈希值的数据同步请求;Generate a data synchronization request including the data to be synchronized and the hash value; 分别将所述数据同步请求发送给所述多个核心云节点,以使所述多个核心云节点分别响应于所述边缘节点发送的数据同步请求,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,获取其它各核心云节点各自对应的哈希值验证结果,并基于各哈希值验证结果,确定所述边缘节点的节点验证结果,基于所述节点验证结果,对所述待同步数据进行数据同步,其中,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,具体包括:基于所述任意一个核心云节点对应的节点标识,确定出相应的哈希值顺序信息,基于所述哈希值顺序信息,从所述哈希值中,确定出对应的节点哈希值,其中,所述哈希值中包括每个核心云节点各自对应的节点哈希值,各节点哈希值是基于预设顺序排列的,基于所述节点哈希值,结合预设的哈希值认证规则,确定哈希值验证结果。The data synchronization request is sent to the multiple core cloud nodes respectively, so that the multiple core cloud nodes respectively respond to the data synchronization request sent by the edge node, verify the hash value in the data synchronization request, determine the hash value verification result corresponding to the hash value, obtain the hash value verification result corresponding to each other core cloud node, and determine the node verification result of the edge node based on each hash value verification result, and synchronize the data to be synchronized based on the node verification result, wherein the hash value in the data synchronization request is verified and the hash value verification result corresponding to the hash value is determined, specifically including: based on the node identifier corresponding to any one of the core cloud nodes, determining the corresponding hash value sequence information, based on the hash value sequence information, determining the corresponding node hash value from the hash value, wherein the hash value includes the node hash value corresponding to each core cloud node, and each node hash value is arranged based on a preset order, and based on the node hash value, the hash value verification result is determined in combination with a preset hash value authentication rule. 7.一种基于区块链的数据同步装置,其特征在于,区块链网络包括多个核心云节点和边缘节点,所述装置应用于任意一个核心云节点,所述装置包括:7. A data synchronization device based on blockchain, characterized in that the blockchain network includes multiple core cloud nodes and edge nodes, and the device is applied to any core cloud node, and the device includes: 验证模块,用于任意一个核心云节点响应于所述边缘节点发送的数据同步请求,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果;其中,所述数据同步请求中包括所述边缘节点获取到的待同步数据和哈希值,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,具体包括:基于所述任意一个核心云节点对应的节点标识,确定出相应的哈希值顺序信息,基于所述哈希值顺序信息,从所述哈希值中,确定出对应的节点哈希值,其中,所述哈希值中包括每个核心云节点各自对应的节点哈希值,各节点哈希值是基于预设顺序排列的,基于所述节点哈希值,结合预设的哈希值认证规则,确定哈希值验证结果;A verification module, for any core cloud node to respond to a data synchronization request sent by the edge node, verify the hash value in the data synchronization request, and determine the hash value verification result corresponding to the hash value; wherein the data synchronization request includes the data to be synchronized and the hash value obtained by the edge node, and the hash value in the data synchronization request is verified to determine the hash value verification result corresponding to the hash value, specifically including: based on the node identifier corresponding to any core cloud node, determining the corresponding hash value sequence information, based on the hash value sequence information, determining the corresponding node hash value from the hash value, wherein the hash value includes the node hash value corresponding to each core cloud node, and each node hash value is arranged based on a preset order, and based on the node hash value, the hash value verification result is determined in combination with a preset hash value authentication rule; 确定模块,用于获取其它各核心云节点各自对应的哈希值验证结果,并基于各哈希值验证结果,确定所述边缘节点的节点验证结果;A determination module, used to obtain the hash value verification results corresponding to each other core cloud node, and determine the node verification result of the edge node based on each hash value verification result; 处理模块,用于基于所述节点验证结果,对所述待同步数据进行数据同步。A processing module is used to synchronize the data to be synchronized based on the node verification result. 8.一种基于区块链的数据同步装置,其特征在于,区块链网络包括多个核心云节点和边缘节点,所述装置应用于所述边缘节点,所述装置包括:8. A data synchronization device based on blockchain, characterized in that the blockchain network includes multiple core cloud nodes and edge nodes, the device is applied to the edge nodes, and the device includes: 获取模块,用于获取待同步数据,以及,确定哈希值;An acquisition module, used to acquire data to be synchronized and determine a hash value; 生成模块,用于生成包含有所述待同步数据和所述哈希值的数据同步请求;A generating module, used for generating a data synchronization request including the data to be synchronized and the hash value; 处理模块,用于分别将所述数据同步请求发送给所述多个核心云节点,以使所述多个核心云节点分别响应于所述边缘节点发送的数据同步请求,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,获取其它各核心云节点各自对应的哈希值验证结果,并基于各哈希值验证结果,确定所述边缘节点的节点验证结果,基于所述节点验证结果,对所述待同步数据进行数据同步,其中,对所述数据同步请求中的哈希值进行验证,确定所述哈希值对应的哈希值验证结果,具体包括:基于所述任意一个核心云节点对应的节点标识,确定出相应的哈希值顺序信息,基于所述哈希值顺序信息,从所述哈希值中,确定出对应的节点哈希值,其中,所述哈希值中包括每个核心云节点各自对应的节点哈希值,各节点哈希值是基于预设顺序排列的,基于所述节点哈希值,结合预设的哈希值认证规则,确定哈希值验证结果。A processing module, used for sending the data synchronization request to the multiple core cloud nodes respectively, so that the multiple core cloud nodes respectively respond to the data synchronization request sent by the edge node, verify the hash value in the data synchronization request, determine the hash value verification result corresponding to the hash value, obtain the hash value verification result corresponding to each other core cloud node, and determine the node verification result of the edge node based on each hash value verification result, and synchronize the data to be synchronized based on the node verification result, wherein verifying the hash value in the data synchronization request and determining the hash value verification result corresponding to the hash value specifically includes: determining the corresponding hash value sequence information based on the node identifier corresponding to any one of the core cloud nodes, and determining the corresponding node hash value from the hash value based on the hash value sequence information, wherein the hash value includes the node hash value corresponding to each core cloud node, and each node hash value is arranged based on a preset order, and the hash value verification result is determined based on the node hash value in combination with a preset hash value authentication rule. 9.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现权利要求1-6任一项所述方法的步骤。9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于:所述计算机程序被处理器执行时实现权利要求1-6任一项所述方法的步骤。10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by a processor.
CN202210367814.3A 2022-04-08 2022-04-08 A data synchronization method and related device based on blockchain Active CN114710508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210367814.3A CN114710508B (en) 2022-04-08 2022-04-08 A data synchronization method and related device based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210367814.3A CN114710508B (en) 2022-04-08 2022-04-08 A data synchronization method and related device based on blockchain

Publications (2)

Publication Number Publication Date
CN114710508A CN114710508A (en) 2022-07-05
CN114710508B true CN114710508B (en) 2025-04-25

Family

ID=82173106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210367814.3A Active CN114710508B (en) 2022-04-08 2022-04-08 A data synchronization method and related device based on blockchain

Country Status (1)

Country Link
CN (1) CN114710508B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115203333A (en) * 2022-07-29 2022-10-18 中国工商银行股份有限公司 Block chain network-based ticket information synchronous processing method and device
CN116346308B (en) * 2023-03-28 2025-09-05 福建福链科技有限公司 Blockchain trusted sensor implementation method and system based on mimetic hashing technology

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019586A (en) * 2019-05-29 2020-12-01 国际商业机器公司 Approximate hash verification for blockchains
CN112231401A (en) * 2020-09-27 2021-01-15 中国建设银行股份有限公司 A blockchain-based model management method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014007501A (en) * 2012-06-22 2014-01-16 Fujitsu Ltd Communication device
CN107249046A (en) * 2017-08-15 2017-10-13 李俊庄 A kind of distributed cloud storage system construction method based on block chain
CN111064813B (en) * 2020-03-16 2020-06-30 支付宝(杭州)信息技术有限公司 Method and device for processing message synchronization during blockchain consensus processing
CN111553792A (en) * 2020-03-24 2020-08-18 平安科技(深圳)有限公司 Data verification method and device based on block chain
CN112073379B (en) * 2020-08-12 2022-11-11 国网江苏省电力有限公司南京供电分公司 Lightweight Internet of things security key negotiation method based on edge calculation
CN113259494B (en) * 2021-07-12 2021-11-12 深圳市华海同创科技有限公司 File storage method and device, electronic equipment and storage medium
CN114244523B (en) * 2021-12-09 2024-07-12 东软集团股份有限公司 Data processing method, device and adapter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019586A (en) * 2019-05-29 2020-12-01 国际商业机器公司 Approximate hash verification for blockchains
CN112231401A (en) * 2020-09-27 2021-01-15 中国建设银行股份有限公司 A blockchain-based model management method and device

Also Published As

Publication number Publication date
CN114710508A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN111708991B (en) Service authorization method, device, computer equipment and storage medium
CN111090876B (en) Method and device for calling a contract
CN103795692B (en) Open authorization method, system and certification authority server
US10810315B2 (en) Enabling access to data
CN109274652B (en) Identity information verification system, method and device and computer storage medium
US10164963B2 (en) Enforcing server authentication based on a hardware token
CN106991298B (en) Access method of application program to interface, authorization request method and device
CN112887282B (en) An identity authentication method, device, system and electronic equipment
CN111131336B (en) Resource access method, device, equipment and storage medium under multi-party authorization scene
CN106055936B (en) Executable program data packet encrypting/decrypting method and device
CN114900338A (en) Encryption and decryption method, device, equipment and medium
CN106302606B (en) Across the application access method and device of one kind
CN113497709A (en) Trusted data source management method based on block chain, signature device and verification device
CN104243419A (en) Data processing method, device and system based on secure shell protocol
CN106850232B (en) Authorization management method and system for state maintenance
CN114710508B (en) A data synchronization method and related device based on blockchain
CN116055225A (en) Blockchain-based power data access method, device and system
CN116975937B (en) Anonymous proof method, anonymous verification method
US12244728B2 (en) Data protection apparatus, electronic apparatus, method, and storage medium
CN112702354B (en) Data resource sharing traceability method and device based on blockchain technology
CN108242997B (en) Method and device for secure communication
CN118395508A (en) Log file tamper-proof detection method, device, system and medium
CN113949515A (en) A digital copyright information processing method and device, and storage medium
US10177918B2 (en) User permission check system
CN119520124B (en) Business system login method, device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant