Block chain protocol processing system and processing method thereof
Technical Field
The invention relates to the technical field of block chain data communication, in particular to a block chain protocol processing system and a processing method thereof.
Background
The blockchain is a data storage and processing form of decentralization, and in order to ensure smooth data communication, each blockchain needs to have a corresponding intelligent contract to agree on a data protocol. Because each blockchain cannot completely predict future data network models at the beginning of establishment, incompatibility of data protocols among different blockchains occurs, and the data protocols of the blockchains need to be processed so as to complete data communication among different blockchains. In the prior art, for data communication among different block chains of a protocol, the communication interfaces are usually subjected to protocol conversion one by one, and the system complexity is greatly increased and the data communication efficiency is obviously reduced by adopting the mode.
Disclosure of Invention
The invention aims to provide a machine processing method of a block chain protocol processing system, which can solve the defects of the prior art, simplify the complexity of the protocol processing system and improve the data communication efficiency.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows.
A blockchain protocol processing system includes,
The first interface module is used for receiving and transmitting data in the first block chain;
the second interface module is used for receiving and transmitting data in a second block chain;
The data conversion module is respectively in communication connection with the first interface module and the second interface module and is used for establishing communication links between the first interface module and the second interface module;
And the database module is in communication connection with the data conversion module and is used for storing data in the data conversion module.
The processing method of the block chain protocol processing system comprises the following steps:
A. the first interface module is built in a first blockchain,
A first smart contract recording area for recording smart contracts of a first blockchain;
the first data transmission confirmation area is used for judging the validity of the data transmitted from the first block chain to the second block chain;
the first verification area is used for verifying the data judged to be legal by the data transmission confirmation area;
B. the second interface module is built in a second blockchain,
A second smart contract recording area for recording smart contracts of a second blockchain;
The second data transmission confirmation area is used for judging the validity of the data transmitted by the second block chain to the first block chain;
the second verification area is used for verifying the data judged to be legal by the data transmission confirmation area;
C. The data conversion module converts data from the first interface module and the second interface module;
D. The database module stores data in the data conversion module.
Preferably, in step A,
The node with highest reliability in the first data transmission confirmation area is selected as a judging node, the data is judged legally, other nodes in the first data transmission confirmation area monitor the judging process of the judging node, the monitored nodes vote on the judging process, if the voting result exceeds 50% and the judging process is confirmed to be abnormal, the judging result is accepted, otherwise, the node with highest reliability in the nodes with abnormal judging process is selected as the judging node, the steps are repeated to judge legally the data again, and meanwhile, the reliability parameter value of the original judgment fixed nodes is reduced;
And broadcasting a judging result of the first data transmission confirmation area to the nodes in the first verification area, processing the judging result by using a consensus algorithm to obtain a verification result, and recording the verification result on a Hash chain.
Preferably, in step B,
The node with highest reliability in the second data transmission confirmation area is selected as a judging node, the data is judged legally, the rest nodes in the second data transmission confirmation area monitor the judging process of the judging node, the monitored nodes vote on the judging process, if the voting result exceeds 50% and the judging process is confirmed to be abnormal, the judging result is accepted, otherwise, the node with highest reliability in the nodes with abnormal judging process is selected as the judging node, the steps are repeated to judge legally the data again, and meanwhile, the reliability parameter value of the original judgment fixed nodes is reduced;
and B, broadcasting a judging result of the second data transmission confirmation area to the nodes in the second verification area, processing the judging result by using a consensus algorithm to obtain a verification result, and recording the verification result on the same Hash chain as in the step A.
Preferably, the data conversion module analyzes the formats of the data sent by the first interface module and the second interface module to obtain a data format part which can be mutually converted in the data formats, establishes a mapping relation for the data format part which can be mutually converted, establishes a common format set for other data formats, and selects a format in the common format set to replace other data formats.
Preferably, the data conversion module firstly searches the historical record in the database module, if the same data format conversion substitution record is searched, the conversion substitution mode in the historical record is directly used for processing the data to be processed, otherwise, the data format analysis and the search selection of the public format set are carried out.
The beneficial effects brought by adopting the technical scheme are as follows: the invention establishes a conversion and replacement mechanism of the data format in the data conversion module, so that the data enters the rear shell of the data conversion module to directly carry out corresponding format change, and then the data after the format change is directly output, the transmission direction of the data is not required to be resolved, and a plurality of sets of data conversion paths are not required to be arranged, thereby effectively reducing the complexity of the data conversion module. Because only one set of data format conversion mechanism is arranged in the data conversion module, the invention reduces the waste of the calculation force of the data conversion module by illegal data by optimizing the verification process of the data validity in order to ensure the data processing efficiency of the data conversion module, and ensures that the data conversion module is always in an effective data processing state.
Drawings
Fig. 1 is a schematic diagram of one embodiment of the present invention.
Detailed Description
Referring to fig. 1, one embodiment of the present invention includes,
The first interface module 1 is used for receiving and transmitting data in the first blockchain;
A second interface module 2, configured to send and receive data in a second blockchain;
The data conversion module 3 is respectively in communication connection with the first interface module 1 and the second interface module 2 and is used for establishing communication links between the first interface module 1 and the second interface module 2;
The database module 4 is in communication connection with the data conversion module 3 and is used for storing the data in the data conversion module 3.
The processing method of the block chain protocol processing system comprises the following steps:
A. the first interface module 1 is built in a first blockchain,
A first smart contract recording area for recording smart contracts of a first blockchain;
the first data transmission confirmation area is used for judging the validity of the data transmitted from the first block chain to the second block chain;
the first verification area is used for verifying the data judged to be legal by the data transmission confirmation area;
B. the second interface module 2 is built in a second blockchain,
A second smart contract recording area for recording smart contracts of a second blockchain;
The second data transmission confirmation area is used for judging the validity of the data transmitted by the second block chain to the first block chain;
the second verification area is used for verifying the data judged to be legal by the data transmission confirmation area;
C. The data conversion module 3 converts data from the first interface module 1 and the second interface module 2;
D. the database module 4 stores the data in the data conversion module 3.
In the step a, the step a is performed,
The node with highest reliability in the first data transmission confirmation area is selected as a judging node, the data is judged legally, other nodes in the first data transmission confirmation area monitor the judging process of the judging node, the monitored nodes vote on the judging process, if the voting result exceeds 50% and the judging process is confirmed to be abnormal, the judging result is accepted, otherwise, the node with highest reliability in the nodes with abnormal judging process is selected as the judging node, the steps are repeated to judge legally the data again, and meanwhile, the reliability parameter value of the original judgment fixed nodes is reduced;
And broadcasting a judging result of the first data transmission confirmation area to the nodes in the first verification area, processing the judging result by using a consensus algorithm to obtain a verification result, and recording the verification result on a Hash chain.
In the step B of the process,
The node with highest reliability in the second data transmission confirmation area is selected as a judging node, the data is judged legally, the rest nodes in the second data transmission confirmation area monitor the judging process of the judging node, the monitored nodes vote on the judging process, if the voting result exceeds 50% and the judging process is confirmed to be abnormal, the judging result is accepted, otherwise, the node with highest reliability in the nodes with abnormal judging process is selected as the judging node, the steps are repeated to judge legally the data again, and meanwhile, the reliability parameter value of the original judgment fixed nodes is reduced;
and B, broadcasting a judging result of the second data transmission confirmation area to the nodes in the second verification area, processing the judging result by using a consensus algorithm to obtain a verification result, and recording the verification result on the same Hash chain as in the step A.
The data conversion module 3 analyzes the formats of the data sent by the first interface module 1 and the second interface module 2 to obtain a data format part which can be mutually converted in the data formats, establishes a mapping relation for the data format part which can be mutually converted, establishes a common format set for other data formats, and selects a format in the common format set to replace other data formats.
The data conversion module 3 firstly searches the historical record in the database module 4, if the same data format conversion substitution record is searched, the conversion substitution mode in the historical record is directly used for processing the data to be processed, otherwise, the data format analysis and the search selection of the public format set are carried out.
The invention abandons the mode of arranging the protocol processing system on different data communication paths in the prior art, greatly simplifies the complexity of the protocol processing system, reduces the data processing flow and improves the data communication efficiency.
In the description of the present invention, it should be understood that the terms "longitudinal," "transverse," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate or are based on the orientation or positional relationship shown in the drawings, merely to facilitate description of the present invention, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the present invention.
The foregoing has shown and described the basic principles and main features of the present invention and the advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made without departing from the spirit and scope of the invention, which is defined in the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.