CN111797161A - Block chain technology-based auxiliary data cross-network convergence method and system - Google Patents
Block chain technology-based auxiliary data cross-network convergence method and system Download PDFInfo
- Publication number
- CN111797161A CN111797161A CN202010550335.6A CN202010550335A CN111797161A CN 111797161 A CN111797161 A CN 111797161A CN 202010550335 A CN202010550335 A CN 202010550335A CN 111797161 A CN111797161 A CN 111797161A
- Authority
- CN
- China
- Prior art keywords
- data
- block chain
- block
- test area
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/275—Synchronous replication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic 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/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a block chain technology-based auxiliary data cross-network convergence method and a system, which comprises the following steps: and a data distributed storage calling step: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components; and (3) data safety collection: encrypting the data using an asymmetric encryption algorithm; and block chain operation and synchronization: performing cross-network synchronization on data by using a block chain; cross-network data transmission: and configuring a route for opening a designated port to carry out TCP/IP communication. The method adopted by the invention has the advantages of uninterrupted data transmission, incapability of stealing data, complete data and no loss, and convenient and safe cross-network transmission.
Description
Technical Field
The invention relates to the technical field of data cross-network convergence, in particular to a method and a system for assisting data cross-network convergence based on a block chain technology. In particular to a method and a system for data exchange of anti-strike military affairs based on distributed remote cross-network exchange.
Background
With the development of military science and technology, the test data of weaponry is more and more, the data interaction of each test area is more and more frequent, and the test network in the test area is usually isolated from the intranet and can only transmit data through data copying or a connection switch, so that once the data is tampered, leaked and other security problems occur in the interaction process of the test network and the intranet, the service development is slightly influenced, and the heavy leakage of core information causes great loss.
The block chain is a distributed shared account book and a database, and has the characteristics of decentralization, no tampering, trace retaining in the whole process, traceability, collective maintenance, openness and transparency and the like. The types of blockchains are classified into public, alliance, and private chains. The public chain is exposed in the Internet and is not suitable for military data interaction. Federation chains are enterprise-oriented, and multiple blockchains may be used between enterprises or within an enterprise. The private chain only uses the general ledger technology of the block chain for accounting, and is not greatly different from other distributed storage schemes. The scheme provided by the invention is that the block chains are deployed in each test area by utilizing the characteristics of decentralization, non-tampering and whole-course trace retention of the block chains, and the security and traceability of the block chains are used for assisting data transmission so as to solve the problems of remote cross-network and anti-strike military data interchange.
Patent document CN110704460A (application number: 201910822515.2) discloses a space-time big data collection system and method, the system includes a static data collection subsystem and a dynamic data collection subsystem; the static data exchange subsystem comprises a first detection module for detecting first trigger events of different types and a first response module for executing data exchange service corresponding to the current first trigger event when the first detection module detects the current first trigger event; the dynamic data collection subsystem comprises a connection module for connecting the dynamic data collection subsystem with the platform of the internet of things, a second detection module for detecting second trigger events of different types, and a second response module for subscribing the data of the internet of things corresponding to the current second trigger event from the platform of the internet of things when the second detection module detects the current second trigger event.
Aiming at the problems in the technical background, the invention provides a safe cross-network data exchange mode, and the technical problems to be solved are embodied in the following points:
(1) data distributed storage: the original data is stored in a distributed mode so as to prevent the situation that data cannot be converged when a certain node is down.
(2) Data security transaction: the data can be correctly and completely exchanged without being stolen, which is the final aim, and the invention adopts the modes of public key encryption and private key decryption to safely transmit the data; and carrying out integrity verification on the data in a hash verification code mode to prevent the data from being tampered.
(3) Data synchronization between block chains: the blockchain of each test area needs to realize transaction data synchronization, and the blockchain plays a role in enabling each node to quickly and safely obtain transaction data, wherein the transaction data comprises an encryption public key of each node and a hash verification code of transmitted data. The rendezvous process is recorded by the block chain of each test area, so that the rendezvous log of each test area is generated conveniently.
(4) Cross-network data transmission: and the test network and the intranet can transmit data through the designated port by configuring the route. The transmitted data includes both blockchain "transaction" data as well as encrypted transaction data.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method and a system for assisting data cross-network convergence based on a block chain technology.
The block chain technology-based auxiliary data cross-network convergence method provided by the invention comprises the following steps:
and a data distributed storage calling step: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components;
and (3) data safety collection: encrypting the data using an asymmetric encryption algorithm;
and block chain operation and synchronization: performing cross-network synchronization on data by using a block chain;
cross-network data transmission: and configuring a route for opening a designated port to carry out TCP/IP communication.
Preferably, the data distributed storage calling step includes: and data is received and transmitted according to interfaces of the HBase and the HDFS.
Preferably, the step of securely exchanging the data includes:
the test area A is an encryptor, the test area B is a decryptor, and the test area A sends data to the test area B;
the test area B randomly generates a private key, the private key is only known by the test area B, and the private key is used for calculating another private key which is a public key by using an asymmetric algorithm; the public key cannot generate a private key through self reverse deduction;
the public key is transmitted to a test area A through a network, the test area A encrypts data according to the public key and transmits a ciphertext to a test area B, and the test area B decodes the ciphertext according to a private key;
the received data is verified by using the hash code, and the flow of the hash code verification is as follows:
the test area A sends data to a test area B, the test area A calculates a hash value H of the data through a hash function, the test area A transmits the data and the hash value H to the test area B, the test area B calculates the hash value H' of the data through the same hash function after obtaining the data, whether the data are modified or not is judged according to the comparison result, and if the data are not consistent, the data are modified.
Preferably, the block chain running and synchronizing step includes:
the transaction data of the block chain is effective when being recorded on the block chain after being identified by the block chain network;
the synchronous flow of the block chain is as follows:
the blockchain A synchronizes transaction data to the blockchain B, an account is activated on the blockchain B to synchronize transactions, and a synchronization program is run on the blockchain A to send the transaction data generated on the blockchain A to the blockchain B;
public key data synchronization, wherein when block chain link points are started, a common identification mechanism adopts a white list mode, each block chain link point senses the existence of the other side through a heartbeat mechanism to form a white list combining an IP address and an MAC address, when a new block is generated, a node obtains the longest chain in the block chain in the white list, the public key of the node is used as a block of transaction data to be added to the chain, meanwhile, a synchronization program sends the block to other block chains, and the public key of the node is safely transmitted to each block chain;
the synchronization of the hash codes, when data are converged, an initiating node of a block chain A creates a block record data initiator, a receiver, the hash codes of the data and a state bit, the block record data initiator, the receiver, the hash codes of the data and the state bit are sent to a block chain B, and when the block chain B receives the block, the state bit is not verified and is added into the block chain B; after the verification is finished, the state position can be verification failure or verification success; the block chain can not be rolled back, and after the block is added to the block chain B, the synchronous program sends the block back to the block chain A to finish one-time intersection;
recording is performed during the intersection of blockchain a and blockchain B.
Preferably, the step of cross-network data transmission includes:
respectively deploying block synchronization programs in a test area A and a test area B, creating accounts by the block synchronization programs, and identifying blocks into a block chain; establishing a block transmission queue for cross-network receiving and transmitting of blocks;
deploying a transceiving program among the block chain link points, performing data intersection, and establishing block data before and after the intersection; and creating multiple threads, transmitting the block data to a synchronization program while communicating with a receiving and transmitting program of the opposite party, and simultaneously performing data transmission and block chain synchronization.
The auxiliary data cross-network convergence system based on the block chain technology provided by the invention comprises the following components:
the data distributed storage calling module: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components;
the data security exchange module: encrypting the data using an asymmetric encryption algorithm;
block chain operation and synchronization module: performing cross-network synchronization on data by using a block chain;
the cross-network data transmission module: and configuring a route for opening a designated port to carry out TCP/IP communication.
Preferably, the data distributed storage calling module includes: and data is received and transmitted according to interfaces of the HBase and the HDFS.
Preferably, the data security transaction module includes:
the test area A is an encryptor, the test area B is a decryptor, and the test area A sends data to the test area B;
the test area B randomly generates a private key, the private key is only known by the test area B, and the private key is used for calculating another private key which is a public key by using an asymmetric algorithm; the public key cannot generate a private key through self reverse deduction;
the public key is transmitted to a test area A through a network, the test area A encrypts data according to the public key and transmits a ciphertext to a test area B, and the test area B decodes the ciphertext according to a private key;
the received data is verified by using the hash code, and the flow of the hash code verification is as follows:
the test area A sends data to a test area B, the test area A calculates a hash value H of the data through a hash function, the test area A transmits the data and the hash value H to the test area B, the test area B calculates the hash value H' of the data through the same hash function after obtaining the data, whether the data are modified or not is judged according to the comparison result, and if the data are not consistent, the data are modified.
Preferably, the block chain operation and synchronization module includes:
the transaction data of the block chain is effective when being recorded on the block chain after being identified by the block chain network;
the synchronous flow of the block chain is as follows:
the blockchain A synchronizes transaction data to the blockchain B, an account is activated on the blockchain B to synchronize transactions, and a synchronization program is run on the blockchain A to send the transaction data generated on the blockchain A to the blockchain B;
public key data synchronization, wherein when block chain link points are started, a common identification mechanism adopts a white list mode, each block chain link point senses the existence of the other side through a heartbeat mechanism to form a white list combining an IP address and an MAC address, when a new block is generated, a node obtains the longest chain in the block chain in the white list, the public key of the node is used as a block of transaction data to be added to the chain, meanwhile, a synchronization program sends the block to other block chains, and the public key of the node is safely transmitted to each block chain;
the synchronization of the hash codes, when data are converged, an initiating node of a block chain A creates a block record data initiator, a receiver, the hash codes of the data and a state bit, the block record data initiator, the receiver, the hash codes of the data and the state bit are sent to a block chain B, and when the block chain B receives the block, the state bit is not verified and is added into the block chain B; after the verification is finished, the state position can be verification failure or verification success; the block chain can not be rolled back, and after the block is added to the block chain B, the synchronous program sends the block back to the block chain A to finish one-time intersection;
recording is performed during the intersection of blockchain a and blockchain B.
Preferably, the cross-network data transmission module includes:
respectively deploying block synchronization programs in a test area A and a test area B, creating accounts by the block synchronization programs, and identifying blocks into a block chain; establishing a block transmission queue for cross-network receiving and transmitting of blocks;
deploying a transceiving program among the block chain link points, performing data intersection, and establishing block data before and after the intersection; and creating multiple threads, transmitting the block data to a synchronization program while communicating with a receiving and transmitting program of the opposite party, and simultaneously performing data transmission and block chain synchronization.
Compared with the prior art, the invention has the following beneficial effects:
1. data transmission is not interrupted, distributed access data is adopted, and data access is not influenced even if some nodes are down in the data collection process;
2. data cannot be stolen, transmitted data is encrypted through an asymmetric encryption algorithm, even if data is intercepted by a third party in the process of cross-network transmission, the data cannot be easily cracked due to the absence of a private key, and the public key is stored in a block chain, is public and transparent and cannot be tampered, cannot be forged by the third party, and cannot be abnormally encrypted;
3. the data is complete and not lost, and the data integrity is verified in a Hash verification code mode, so that the data is prevented from being illegally modified. The Hash verification code is stored in a block chain, and cannot be forged by a third party;
4. the cross-network transmission is convenient and safe, the block chain technology assists the cross-network transmission of data, the data safety is not required to be ensured by means of copying or a unidirectional gatekeeper and the like, and the data convergence efficiency is improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic network diagram of the system of the present invention;
FIG. 2 is a schematic diagram of data flow according to the present invention;
FIG. 3 is a flow chart of data security transaction according to the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
According to the invention, the block chains are established for each test area, and data are transmitted across networks under the existing distributed storage system. The method utilizes a block synchronization program to synchronize 'transaction' data of the blocks in real time, wherein the 'transaction' data comprises encrypted public keys on data nodes and Hash verification codes of the rendezvous data; the block chain technology does not synchronously exchange data, only plays a role in safely transmitting a public key and a Hash verification code in the data exchange process, and after the data transmission is finished and the verification is finished, the intersection records on the block chain can be used as data transmission records for log tracing.
(1) The data distributed storage calling method comprises the following steps:
the big data frame is already mature to be used in the test area, and structured data and unstructured data can be read and written in a distributed management mode through HBase and HDFS components. The data are accessed by using the distributed storage environment, and the data exchange is not influenced even if partial nodes are down. The invention calls interfaces of HBase and HDFS to complete data receiving and transmitting.
(2) The data security transaction method comprises the following steps:
after the data is read from the test area a, the data needs to be encrypted and transmitted to the test area B in order to prevent the data from being known by a third party. The invention uses asymmetric encryption algorithm to encrypt data, the flow of the asymmetric encryption algorithm is as follows:
taking the test area a to send data to the test area B as an example, assume that a is the encryptor and B is the decryptor. Firstly, a private key is randomly generated by B, the private key is only known by B, and then another key, called a public key, is calculated by the private key by using an asymmetric algorithm. The nature of this public key is that it is almost impossible to deduce the private key that generated it by itself. And then transmitting the public key to A through the network, after the A receives the public key, encrypting data by using the public key, transmitting a ciphertext to B through the network, and finally decoding the ciphertext by using a known private key by the B.
In order to prevent the data from being illegally modified in the process of crossing networks and need to be subjected to integrity check, the invention uses a Hash verification code mode to check the received data. The hash algorithm may map a binary value of any length to a smaller binary value of fixed length, called a hash value, and subsequent hashes will produce different values even if only one letter of the paragraph is altered. The process of the Hash verification is as follows:
take the example where test area a is to send data to test area B. Firstly, the data A obtains a hash value H through a hash function, the data A and the hash value H are transmitted to the data B, the data B obtains the data, then the hash value H 'of the data is obtained through the same hash function, and whether the H and the H' are consistent or not is compared, so that whether the data are modified or not can be judged.
(3) The block chain operation mode and the synchronization method are as follows:
for (2) the public key and the hash verification code mentioned in the data security exchange method need to be transmitted through cross-network, and in order to prevent the public key and the hash verification code from being tampered, the invention utilizes the public transparency and the non-tamper property of the block chain to carry out cross-network synchronization on the block chain.
The blockchain is driven by transaction, data synchronization between blockchain networks only needs to transfer the transaction to another blockchain, and the transaction data of the blockchain can be effective only after being identified by the blockchain network. The synchronous flow of the block chain is as follows:
taking the example that the blockchain a needs to synchronize the transaction data to the blockchain B, an account dedicated to synchronizing the transaction needs to be activated on the blockchain B, and a synchronization program is run on the blockchain a to send the transaction data generated on the blockchain a to the blockchain B.
For the synchronization of public key data, when the block chain link points are started, in order to improve the common identification efficiency and prevent the public key from being forged, the common identification mechanism adopts a white list mode, namely each block chain link point senses the existence of the other side through a heartbeat mechanism to form a white list combining an IP address and an MAC address, when a new block is generated, the node firstly obtains the longest chain in the block chain in the white list, the public key of the node is used as a block of transaction data to be added to the chain, meanwhile, a synchronization program sends the block to other block chains, and at the moment, the public key of the node is safely transmitted to each block chain.
For the synchronization of the Hash verification code, when data exchange occurs, an initiating node of a block chain A firstly creates a block to record the Hash verification code and a state bit of a data initiator, a data receiver, the data, and the block, firstly sends the block to a block chain B, and when the block chain B receives the block, the state bit is 'unverified' and is added into the block chain B; after the verification is finished, the status position may be "verification failed"/"verification successful", and since the block chain cannot be rolled back, the block is added to the block chain B, and the block is sent back to the block chain a by the synchronization program at the same time until the completion of one transaction. For the upper layer application, there is a record of the process of this intersection in both blockchain a and blockchain B.
(4) The cross-network data transmission method comprises the following steps:
because the block chain is established, data transmission becomes safe and reliable, cross-network transmission becomes simple, the traditional modes such as copying or unidirectional network gate and the like are not needed, and TCP/IP communication can be carried out only after the route of the designated port is configured.
Respectively deploying block synchronization programs in a test area A and a test area B, wherein the block synchronization programs mainly establish accounts and commonly identify blocks into a block chain; and establishing a block transmission queue for cross-network receiving and sending of the blocks.
Deploying a transceiving program among the block link points for data exchange, wherein the transceiving program is responsible for establishing block data before and after the exchange; and creating multiple threads, transmitting the block data to a synchronization program while communicating with a receiving and transmitting program of the opposite side, and simultaneously performing data transmission and block chain synchronization so as to improve the exchange efficiency.
The invention adopts the block chain technology to assist the safe data cross-network transmission, and the system network schematic diagram is shown in figure 1.
As shown in fig. 2, a node a sends data to a node B, the data is encrypted by using a public key synchronized by the node B, and the data is verified and decrypted after a hash verification code is synchronized to a block chain B by a block synchronization program.
The data security transaction process is completed by the cooperation of the data transceiving program and the block synchronization program, and the data security transaction is completed through four steps of public key synchronization, data transmission, hash verification code synchronization and data reception, and the detailed process is shown in fig. 3.
The block synchronization procedure is described in the following embodiments:
1) activating an account AccountB on the blockchain B for submitting blocks sent from the blockchain A;
2) and establishing multiple threads, communicating with a data transceiving program on the link points of the block, and transmitting and receiving the block data.
The specific implementation of the data transceiving program:
1) and calling an interface of the HDFS/HBase to read and write data, and performing binary stream conversion on the data.
2) TCP/IP communication is established among the nodes, and multithreading is established to communicate with the block synchronization program.
3) And calling an asymmetric encryption algorithm to perform public key encryption and private key decryption on the data, and calling a hash function to generate a hash verification code on the encrypted data.
The embodiment of the block content:
the contents of the block need to be redefined, and the following fields need to be added to the block in addition to the basic contents necessary for generating the blockchain, such as the index, the timestamp, the hash value of the previous block, and so on:
DataType: a block type;
PublicKey: a public key value;
a Sender: a sender;
receiver: a recipient;
HashCode: a hash verification code;
status: a status bit;
the complete implementation flow is shown in fig. 3 and is divided into four stages, which include the following steps:
step 1: and a public key synchronization stage. After a node on a block chain B is started, a data transceiving program generates a public key and a private key by using an asymmetric encryption algorithm (the invention uses an RSA encryption algorithm), the private key is stored in a local database, then the data transceiving program creates a new block, the block type DataType is set to be a public key type, a public key value PublicKey and a Sender are set, and other fields are empty; and sending the block to a block synchronization program, wherein the block synchronization program obtains the longest chain from all block chain link points, the newly-built block is identified into a block chain B, and simultaneously block data is synchronized into a block chain A, and the synchronization program of the block chain A judges that the type of the block is a 'public key' type and directly identifies the block to the block chain A, so that the sender can conveniently communicate with the sender in the future.
Step 2: and a data sending stage. And when the node of the block chain A transmits data to the node of the block chain B, a data transceiver on the node of the block chain A reads the public key of the node of the block chain B from the block chain A to encrypt the data, and then directly transmits the encrypted data to the node of the block chain B.
And step 3: and a hash verification code synchronization stage. The data transceiver on the node a of the block chain generates a hash verification code for the encrypted data by using a hash function (using the MD5 algorithm in the present invention), creates a new block, sets the block type DataType to "transceiving" type, sets the Sender, the Receiver and the hash verification code HashCode, and sets other fields to null. The data receiving and sending program directly sends the block to the synchronization program, and the block synchronization program synchronizes the block data into a block chain B; after the synchronization procedure of the block chain B judges that the block type of the block is the transceiving type, the Status bit Status of the block is set to "not checked", and the blocks are commonly identified to the block chain B.
And 4, step 4: and a data receiving stage. After the data receiving and sending program on the node B of the block chain receives the data, a block representing the data transmission is obtained on the block chain B according to the Sender, the Receiver and the time stamp, HashCode is read, the data is verified, the verification result 'verification success' or 'verification failure' is set to the Status of the block, other values of the block including an index, the time stamp, the hash value of the previous block and the like are updated, then the block is sent to a block synchronization program, the block is identified to the block chain again, and the block data is sent back to the block chain A; and the data transceiving program on the B node of the block chain reads the private key from the database, decrypts the data passing the verification, and completes the transceiving process. At this time, the block chains of both the transmitting and receiving sides have a block describing the data transmission, and a data collection log can be formed.
The auxiliary data cross-network convergence system based on the block chain technology provided by the invention comprises the following components:
the data distributed storage calling module: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components;
the data security exchange module: encrypting the data using an asymmetric encryption algorithm;
block chain operation and synchronization module: performing cross-network synchronization on data by using a block chain;
the cross-network data transmission module: and configuring a route for opening a designated port to carry out TCP/IP communication.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (10)
1. A block chain technology-based auxiliary data cross-network convergence method is characterized by comprising the following steps:
and a data distributed storage calling step: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components;
and (3) data safety collection: encrypting the data using an asymmetric encryption algorithm;
and block chain operation and synchronization: performing cross-network synchronization on data by using a block chain;
cross-network data transmission: and configuring a route for opening a designated port to carry out TCP/IP communication.
2. The method for assisting data cross-network transfer based on blockchain technology of claim 1, wherein the step of data distributed storage calling comprises: and data is received and transmitted according to interfaces of the HBase and the HDFS.
3. The method for assisting data cross-network convergence based on block chain technology as claimed in claim 1, wherein the data security convergence step comprises:
the test area A is an encryptor, the test area B is a decryptor, and the test area A sends data to the test area B;
the test area B randomly generates a private key, the private key is only known by the test area B, and the private key is used for calculating another private key which is a public key by using an asymmetric algorithm; the public key cannot generate a private key through self reverse deduction;
the public key is transmitted to a test area A through a network, the test area A encrypts data according to the public key and transmits a ciphertext to a test area B, and the test area B decodes the ciphertext according to a private key;
the received data is verified by using the hash code, and the flow of the hash code verification is as follows:
the test area A sends data to a test area B, the test area A calculates a hash value H of the data through a hash function, the test area A transmits the data and the hash value H to the test area B, the test area B calculates the hash value H' of the data through the same hash function after obtaining the data, whether the data are modified or not is judged according to the comparison result, and if the data are not consistent, the data are modified.
4. The method of claim 1, wherein the step of operating and synchronizing the blockchains comprises:
the transaction data of the block chain is effective when being recorded on the block chain after being identified by the block chain network;
the synchronous flow of the block chain is as follows:
the blockchain A synchronizes transaction data to the blockchain B, an account is activated on the blockchain B to synchronize transactions, and a synchronization program is run on the blockchain A to send the transaction data generated on the blockchain A to the blockchain B;
public key data synchronization, wherein when block chain link points are started, a common identification mechanism adopts a white list mode, each block chain link point senses the existence of the other side through a heartbeat mechanism to form a white list combining an IP address and an MAC address, when a new block is generated, a node obtains the longest chain in the block chain in the white list, the public key of the node is used as a block of transaction data to be added to the chain, meanwhile, a synchronization program sends the block to other block chains, and the public key of the node is safely transmitted to each block chain;
the synchronization of the hash codes, when data are converged, an initiating node of a block chain A creates a block record data initiator, a receiver, the hash codes of the data and a state bit, the block record data initiator, the receiver, the hash codes of the data and the state bit are sent to a block chain B, and when the block chain B receives the block, the state bit is not verified and is added into the block chain B; after the verification is finished, the state position can be verification failure or verification success; the block chain can not be rolled back, and after the block is added to the block chain B, the synchronous program sends the block back to the block chain A to finish one-time intersection;
recording is performed during the intersection of blockchain a and blockchain B.
5. The method for cross-network convergence of assistance data based on block chain technology as claimed in claim 1, wherein the cross-network data transmission step comprises:
respectively deploying block synchronization programs in a test area A and a test area B, creating accounts by the block synchronization programs, and identifying blocks into a block chain; establishing a block transmission queue for cross-network receiving and transmitting of blocks;
deploying a transceiving program among the block chain link points, performing data intersection, and establishing block data before and after the intersection; and creating multiple threads, transmitting the block data to a synchronization program while communicating with a receiving and transmitting program of the opposite party, and simultaneously performing data transmission and block chain synchronization.
6. A block chain technology-based auxiliary data cross-network convergence system is characterized by comprising:
the data distributed storage calling module: reading and writing the distributed management structured data and the unstructured data according to the HBase and the HDFS components;
the data security exchange module: encrypting the data using an asymmetric encryption algorithm;
block chain operation and synchronization module: performing cross-network synchronization on data by using a block chain;
the cross-network data transmission module: and configuring a route for opening a designated port to carry out TCP/IP communication.
7. The system of claim 6, wherein the data distributed storage invocation module comprises: and data is received and transmitted according to interfaces of the HBase and the HDFS.
8. The system of claim 6, wherein the data security transaction module comprises:
the test area A is an encryptor, the test area B is a decryptor, and the test area A sends data to the test area B;
the test area B randomly generates a private key, the private key is only known by the test area B, and the private key is used for calculating another private key which is a public key by using an asymmetric algorithm; the public key cannot generate a private key through self reverse deduction;
the public key is transmitted to a test area A through a network, the test area A encrypts data according to the public key and transmits a ciphertext to a test area B, and the test area B decodes the ciphertext according to a private key;
the received data is verified by using the hash code, and the flow of the hash code verification is as follows:
the test area A sends data to a test area B, the test area A calculates a hash value H of the data through a hash function, the test area A transmits the data and the hash value H to the test area B, the test area B calculates the hash value H' of the data through the same hash function after obtaining the data, whether the data are modified or not is judged according to the comparison result, and if the data are not consistent, the data are modified.
9. The system of claim 6, wherein the blockchain run and synchronization module comprises:
the transaction data of the block chain is effective when being recorded on the block chain after being identified by the block chain network;
the synchronous flow of the block chain is as follows:
the blockchain A synchronizes transaction data to the blockchain B, an account is activated on the blockchain B to synchronize transactions, and a synchronization program is run on the blockchain A to send the transaction data generated on the blockchain A to the blockchain B;
public key data synchronization, wherein when block chain link points are started, a common identification mechanism adopts a white list mode, each block chain link point senses the existence of the other side through a heartbeat mechanism to form a white list combining an IP address and an MAC address, when a new block is generated, a node obtains the longest chain in the block chain in the white list, the public key of the node is used as a block of transaction data to be added to the chain, meanwhile, a synchronization program sends the block to other block chains, and the public key of the node is safely transmitted to each block chain;
the synchronization of the hash codes, when data are converged, an initiating node of a block chain A creates a block record data initiator, a receiver, the hash codes of the data and a state bit, the block record data initiator, the receiver, the hash codes of the data and the state bit are sent to a block chain B, and when the block chain B receives the block, the state bit is not verified and is added into the block chain B; after the verification is finished, the state position can be verification failure or verification success; the block chain can not be rolled back, and after the block is added to the block chain B, the synchronous program sends the block back to the block chain A to finish one-time intersection;
recording is performed during the intersection of blockchain a and blockchain B.
10. The system of claim 6, wherein the cross-network data transmission module comprises:
respectively deploying block synchronization programs in a test area A and a test area B, creating accounts by the block synchronization programs, and identifying blocks into a block chain; establishing a block transmission queue for cross-network receiving and transmitting of blocks;
deploying a transceiving program among the block chain link points, performing data intersection, and establishing block data before and after the intersection; and creating multiple threads, transmitting the block data to a synchronization program while communicating with a receiving and transmitting program of the opposite party, and simultaneously performing data transmission and block chain synchronization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010550335.6A CN111797161B (en) | 2020-06-16 | 2020-06-16 | Method and system for assisting data cross-network exchange based on block chain technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010550335.6A CN111797161B (en) | 2020-06-16 | 2020-06-16 | Method and system for assisting data cross-network exchange based on block chain technology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111797161A true CN111797161A (en) | 2020-10-20 |
CN111797161B CN111797161B (en) | 2023-10-13 |
Family
ID=72803092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010550335.6A Active CN111797161B (en) | 2020-06-16 | 2020-06-16 | Method and system for assisting data cross-network exchange based on block chain technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111797161B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107292181A (en) * | 2017-06-20 | 2017-10-24 | 无锡井通网络科技有限公司 | Database Systems based on block chain and the application method using the system |
CN107528886A (en) * | 2017-07-25 | 2017-12-29 | 中国科学院计算技术研究所 | Block chain the whole network method for splitting and system |
CN109802993A (en) * | 2018-12-13 | 2019-05-24 | 深圳市链联科技有限公司 | A kind of alliance's chain building method based on supply chain ecology |
US20190279172A1 (en) * | 2018-03-06 | 2019-09-12 | Dash Core Group, Inc. | Methods and Systems for Object Validated Blockchain Accounts |
CN111078745A (en) * | 2019-12-20 | 2020-04-28 | 京东数字科技控股有限公司 | Data uplink method and device based on block chain technology |
-
2020
- 2020-06-16 CN CN202010550335.6A patent/CN111797161B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107292181A (en) * | 2017-06-20 | 2017-10-24 | 无锡井通网络科技有限公司 | Database Systems based on block chain and the application method using the system |
CN107528886A (en) * | 2017-07-25 | 2017-12-29 | 中国科学院计算技术研究所 | Block chain the whole network method for splitting and system |
US20190279172A1 (en) * | 2018-03-06 | 2019-09-12 | Dash Core Group, Inc. | Methods and Systems for Object Validated Blockchain Accounts |
CN109802993A (en) * | 2018-12-13 | 2019-05-24 | 深圳市链联科技有限公司 | A kind of alliance's chain building method based on supply chain ecology |
CN111078745A (en) * | 2019-12-20 | 2020-04-28 | 京东数字科技控股有限公司 | Data uplink method and device based on block chain technology |
Non-Patent Citations (1)
Title |
---|
代玥玥 等: "区块链赋能6G", 物联网学报, vol. 4, no. 1, pages 111 - 120 * |
Also Published As
Publication number | Publication date |
---|---|
CN111797161B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111295660B (en) | Computer-implemented system and method for connecting blockchain to digital twinning | |
CN112994892B (en) | Cross-chain interaction method, device, system and electronic equipment | |
CN113495920B (en) | Content auditing system, method and device based on blockchain and storage medium | |
Roscoe | Intensional specifications of security protocols | |
WO2021197105A1 (en) | Blockchain-based information release | |
CN103853634B (en) | Disaster recovery system and disaster recovery method | |
CN114255031A (en) | System for executing cross block chain of transaction, cross chain transaction method and equipment | |
CN112134834B (en) | Data lake system architecture based on block chain | |
CN109918261A (en) | Failure monitoring method, device, equipment and computer readable storage medium | |
CN111046407A (en) | Data storage system based on block chain | |
CN111949726A (en) | Relational database synchronization method and system based on block chain | |
CN111371588A (en) | SDN edge computing network system based on block chain encryption, encryption method and medium | |
CN101118639A (en) | Safety electric national census system | |
CN115129518B (en) | Backup and recovery method, device, equipment and medium for TEE (trusted execution environment) internal storage data | |
CN112329029A (en) | Block chain-based electronic archive file safe storage method and system | |
CN111797161B (en) | Method and system for assisting data cross-network exchange based on block chain technology | |
CN115001707B (en) | Device authentication method based on block chain and related device | |
CN111259455A (en) | Block chain private key escrow method and system | |
CN113904869B (en) | Method for detecting malicious nodes in blockchain and blockchain | |
CN106649744B (en) | Log recording method and device | |
CN113094398B (en) | Data link tracking method based on block chain technology | |
CN110190980A (en) | The system and method for supporting plug-in unitization access different blocks chain alliance chain network | |
CN112953897B (en) | Train control system edge security node implementation method based on cloud computing equipment | |
CN115208630A (en) | Block chain based data acquisition method and system and block chain system | |
CN114154965A (en) | Collaborative law enforcement and case handling management method and system based on block chain |
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 |