Heterogeneous block link access method and system applied to Internet of things
Technical Field
The invention relates to the technical field of combination of the Internet of things and a block chain, in particular to a heterogeneous block chain access method and system applied to the Internet of things.
Background
The combination of the internet of things technology and the block chain technology is urging to be applied in various new industries. For example, in the financial industry, the technology of the internet of things is utilized to monitor the mobile property in real time to form a digital warehouse slip, the digital warehouse slip is registered through a block chain, the non-falsification and the credible authentication of the warehouse slip are realized, and the financial institution can develop the mobile property financing service based on the digital warehouse slip; in the field of agricultural aquaculture, dissolved oxygen real-time monitoring data acquired by Internet of things equipment are recorded in a block chain, and an insurance company can develop aquaculture floating insurance services based on the dissolved oxygen real-time monitoring data, and the services all need to be tightly combined with the block chain technology by Internet of things application.
Due to the diversity of block chain technologies, different block chains have certain differences in principle and implementation mode, in the existing solution, the application on the platform needs to adapt to different types of block chains, if the application needs to be accessed to a plurality of bottom layer block chain systems simultaneously, adaptation codes need to be compiled for each bottom layer block chain technical scheme, the difficulty and cost of application and development technologies are greatly improved, and the efficiency is low.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides a heterogeneous block link-in method and a heterogeneous block link-in system applied to the Internet of things, and the defects in the prior art are overcome.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme: a heterogeneous block link access system applied to the Internet of things comprises an application, a functional layer and a block chain, wherein the application is connected with the functional layer, and the functional layer is connected with the block chain;
the functional layer consists of an interface layer, a management layer, an adaptation layer and an access layer;
the access layer comprises a plurality of access modules and is used for butting different block chain platforms at the bottom layer to realize communication protocols, consensus protocols and the like defined by the different block chain platforms;
the adaptation layer comprises a plurality of adaptation modules and is used for realizing the adaptation of a block chain bottom layer protocol and an upper layer general interface protocol and a management protocol;
the management layer comprises a block chain management module and is used for uniformly managing account numbers, certificates, keys and the like of the bottom heterogeneous block chain system and managing the loading and running of the adaptation layer and the access layer module;
the interface layer comprises a universal interface module, and is used for facing an application and providing a standardized block chain capability access interface.
Preferably, the access module adopts a plug-in architecture, and the functions realized by the access module include but are not limited to transmission control of a block chain data packet, analysis and encapsulation of a block chain protocol, a block chain consensus algorithm, an intelligent contract mechanism and the like; access modules accessing the same underlying blockchain technology architecture may run one or more instances as needed.
Preferably, the blockchain management module is configured to store data such as related account numbers, wallets, configuration information, and the like of blockchains of different applications, where configuration data of different applications are isolated from each other.
Preferably, the blockchain management module is configured to abstract blockchain operations, define and implement standardized blockchain operation business logic process management, including but not limited to transactions, authentication, queries, smart contract execution, and the like.
Preferably, the adaptation module is configured to execute specific blockchain operation logic and call an access layer interface to operate a specific underlying blockchain.
Preferably, the interface module is configured to provide a general blockchain operation and management API to the upper-layer internet of things application, including but not limited to data link, transaction execution, transaction verification, transaction inquiry, account configuration, account authentication, blockchain parameter configuration, and the like.
A heterogeneous block chaining method applied to the Internet of things comprises the following steps:
1) an application calls an interface layer application interface configuration block chain parameter, configures application related block chain accounts, and if a plurality of bottom layer block chains need to be simultaneously connected, needs to configure each block chain respectively;
2) the application configuration data is processed and encrypted for storage by the block chain management module;
3) an application calls an interface layer application data uplink interface, an interface module calls a management layer data uplink function, a block chain management module coordinates and schedules a corresponding adaptation layer module to execute uplink operation according to an application request, and the adaptation module translates a management layer standardized block chain operation instruction into a specific block chain operation instruction and sends the specific block chain operation instruction to an access module for execution;
4) the access module executes data chaining operation and feeds back the execution result step by step according to the opposite direction of the call chain.
(III) advantageous effects
The invention provides a heterogeneous block link access method and system applied to the Internet of things. The method has the following beneficial effects:
1. according to the invention, by abstracting and packaging different bottom layer block chain technologies, a standardized block chain access and management interface is provided for the application, the technical details of a bottom layer heterogeneous block chain system are isolated, the technical difficulty and cost of application development are reduced, and the efficiency is improved.
2. According to the invention, the support of the heterogeneous block chain technology is realized through the plug-in architecture on the adaptation layer and the access layer, and the access of the multi-block chain is realized through the plug-in architecture.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example (b):
as shown in fig. 1, an embodiment of the present invention provides a heterogeneous block link access system applied to the internet of things, where the system includes an application, a functional layer and a block chain, the application is connected with the functional layer, and the functional layer is connected with the block chain;
the functional layer consists of an interface layer, a management layer, an adaptation layer and an access layer;
the access layer comprises a plurality of access modules and is used for butting different block chain platforms at the bottom layer to realize communication protocols, consensus protocols and the like defined by the different block chain platforms;
the adaptation layer comprises a plurality of adaptation modules and is used for realizing the adaptation of a block chain bottom layer protocol, an upper layer general interface protocol and a management protocol;
the management layer comprises a block chain management module, and is used for uniformly managing account numbers, certificates, keys and the like of the bottom heterogeneous block chain system and managing the loading and running of the adaptation layer and the access layer module;
the interface layer comprises a universal interface module, and the interface layer is used for facing an application and providing a standardized blockchain capability access interface.
The access module adopts a plug-in type structure, and the functions realized by the access module include but are not limited to transmission control of block chain data packets, analysis and encapsulation of block chain protocols, block chain consensus algorithm, intelligent contract mechanism and the like; access modules accessing the same underlying blockchain technology architecture may run one or more instances as needed.
The block chain management module is used for storing data such as block chain related accounts, wallets and configuration information of different applications, and the configuration data of different applications are isolated from each other.
The blockchain management module is used for abstracting blockchain operation, defining and realizing standardized blockchain operation business logic process management, including but not limited to transaction, authentication, query, intelligent contract execution and the like.
The adaptation module is used for executing specific block chain operation logic and calling an access layer interface to operate a specific block chain at the bottom layer.
The interface module is used for providing general blockchain operation and management AP I for the upper-layer Internet of things application, including but not limited to data uplink, transaction execution, transaction verification, transaction inquiry, account configuration, account authentication, blockchain parameter configuration and the like.
In the invention, the adaptation module and the access module can be combined in the system implementation.
A heterogeneous block link access method applied to the Internet of things comprises the following steps:
1) an application calls an interface layer application interface configuration block chain parameter, configures application related block chain accounts, and if a plurality of bottom layer block chains need to be simultaneously connected, needs to configure each block chain respectively;
2) the application configuration data is processed and encrypted for storage by the block chain management module;
3) an application calls an interface layer application data uplink interface, an interface module calls a management layer data uplink function, a block chain management module coordinates and schedules a corresponding adaptation layer module to execute uplink operation according to an application request, and the adaptation module translates a management layer standardized block chain operation instruction into a specific block chain operation instruction and sends the specific block chain operation instruction to an access module for execution;
4) the access module executes data chaining operation and feeds back the execution result step by step according to the opposite direction of the call chain.
According to the invention, by abstracting and packaging different bottom layer block chain technologies, a standardized block chain access and management interface is provided for the application, the technical details of a bottom layer heterogeneous block chain system are isolated, the technical difficulty and cost of application development are reduced, and the efficiency is improved.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.