Cross-link data access transmission method, system and device adopting multi-channel access
Technical Field
The invention belongs to the technical field of block chain cross-link, and particularly relates to a cross-link data access transmission method, system and device adopting multi-channel access.
Background
The blockchain network is a relatively closed system, and does not actively interact with the outside world, and the assets of each chain are also independent value systems. The cross-chain technology aims at building trust bridges among chains, breaking the situation of one chain-island, and realizing asset interoperation among chains so as to realize win-win in a larger range.
In real application, block chains are adopted to carry out cross-chain, multiple service scenes exist, different channels are needed to be established for the multiple service scenes to carry out transaction on a business end, the access and the transmission of cross-chain data can be technically understood, the access problem of the data can be necessarily involved in order to ensure the safety of the data transmission, the current cross-chain technology is not mature, and the access speed and the safety influence of the cross-chain on the existing block chain system are to be improved.
Disclosure of Invention
Based on the background and the problems existing in the prior art, the invention aims to design a cross-link data access transmission method, a system, a storage medium and a device adopting multi-channel access. The method of the invention performs access authorization access control on access in all data transmission processes by realizing interaction between the multi-span chain channel and the service end, ensures safe butt joint of all data access in the span chain transaction process, solves the problems of butt joint safety and speed in the span chain transaction process in the scene, and satisfies rapid implementation and development of the span chain service and application in complex scenes.
In a first aspect, a method and a system for cross-link data access transmission using multi-channel access are provided, and the specific implementation steps include:
the method comprises the steps that a cross-link management module distributes a plurality of cross-link channels to be cross-linked for a service end, and meanwhile generates corresponding channel numbers for the channels, wherein the channel numbers bind the numbers of contract methods called by the channels;
channel information and cross-link interaction information for identifying authority identities in the process of accessing or transmitting data are configured in the contract method;
after triggering the contract method, the cross-link management module executes cross-link data access and transmission according to channel information and cross-link interaction information;
the service end acquires the cross-link information export document, executes cross-link transaction and returns a transaction result to inform the cross-link management module;
the cross-link management module receives the multi-channel notification based on an asynchronous mode, is coupled with the service end according to the blockchain information, judges whether the access meets the access condition or not in a bidirectional asynchronous mode through the service end and the cross-link channel, and feeds back the result to notify the cross-link management module.
In the foregoing solution of the first aspect, the channel is configured by the cross-link management module to allocate cross-link channel numbers (channel numbers, numbers) and set contract methods that can be invoked by corresponding channels according to the cross-link data access types, and the service end is combined with multi-channel access to implement cross-link workflow tandem access to data.
In the foregoing aspect of the first aspect, the contract method corresponds to a channel number, and rights access information is generated according to channel information and provided for service end identification.
In the above scheme, the cross-link management module identifies the channel number and the contract method number of the contract method to select the channel and the contract method, and the channel calls the contract method based on the cross-link gateway.
In the above scheme, the cross-link gateway realizes the invocation of the contract method, numbers the data transmitted by different channels, respectively binds different sender route numbers and receiver route numbers, and triggers a timestamp timer by a global tracking number of the cross-link data access provided or forwarded by the cross-link gateway, and the timestamp timer locks the time of the cross-link data access and transmission.
In the foregoing solution of the first aspect, the cross-link management module provides the authority identity derivative to a service end, and the specific implementation steps include:
request for a contracted message format;
checking whether the distributed channel number and contract method number meet the authority identity access authorization requirement by a cross-link router;
when the authorization requirement is met, checking the message signature, and synchronously returning to the channel and authorizing the channel to access the service end; if not, the message is synchronously refused and access is forbidden;
the channel authorizes the access business end to execute transaction data transmission, and the business end and the cross-link channel can complete butt joint through the transaction data transmission.
In the above scheme, the contract method is configured to perform cross-chain interaction with the multiparty blockchain, then callback setting is performed through the contract method, multiparty cross-chain channel and business end data access and transmission are combined, complex cross-chain transaction scene setting and rapid change of a cross-chain transaction model are met, and the specific implementation steps comprise:
configuring a cross-chain gateway, a blockchain intelligent contract, a channel of a callback after execution and a contract method called by the contract method, and interacting with the cross-chain gateway in an asynchronous mode;
after the cross-link gateway invokes the blockchain, a processing result is sent by a cross-link router, the cross-link router connects a plurality of cross-link channels in series according to callback information, and whether the cross-link channels and the service end are mutually exclusive is judged according to the callback information; if the inter-link channel callback is empty, ending the process execution, and acquiring an execution result notice by the service end;
based on the configuration and callback process, the cross-link data access and transmission flow combination is completed by the cross-link route, the cross-link gateway, the blockchain, other cross-link channels and the service end.
In a second aspect, the present invention also provides a cross-link data access system adopting multi-channel access, which specifically comprises:
service end: providing a cross-link access or data transmission request to a cross-link management module; acquiring cross-link information and exporting a document, executing cross-link transaction and returning a transaction result to inform the cross-link management module; judging whether the accessed cross-link channel meets access conditions or not and feeding back a result notification cross-link management module;
and a cross-chain management module: distributing a plurality of cross-link channels to be cross-linked for a service end, and generating corresponding channel numbers for the channels; executing cross-link data access and transmission according to channel information and cross-link interaction information; receiving a transaction result notice returned by a service end; receiving a feedback result notice of a service end or a cross-link channel;
the contract method comprises the following steps: channel information and cross-link interaction information for identifying authority identities in the process of accessing or transmitting data are configured in a contract method; after triggering, executing cross-link data access or data transmission;
cross-link channel: for cross-chain data transmission; judging whether the accessed service end meets the access condition or not and feeding back the result notification to the cross-link management module;
the cross-link is defined by: distributing cross-link channel numbers (channel numbers, numbers) and setting contract methods which can be called by corresponding channels; a global tracking number to provide or forward cross-chain data access triggers a timestamp timer; checking whether the allocated channel number and contract method number meet the authority identity access authorization requirement; after the cross-link gateway invokes the blockchain contract method, a processing result is sent by a cross-link router, the cross-link router connects a plurality of cross-link channels in series according to callback information, and whether the cross-link channels and a service end are mutually exclusive or not is judged according to the callback information;
cross-chain gateway: calling a contract method; and data access and transmission are performed in an asynchronous mode.
In a third aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method steps of any of the above;
in a fourth aspect, a cross-chain data access device employing multi-channel access is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method steps of any of the above when executing the computer program.
Compared with the prior art, the method has the advantages that a multi-cross-link channel docking mode is set to interact with a service end system, access authorization is carried out on all accessed systems through a cross-link route and a cross-link gateway, a corresponding accessible cross-link contract method is configured for each channel, the access channels are accessed according to authorized identities, access is directly forbidden when access conditions are not met, and safe docking of cross-link transactions is met; the invention sets the one-to-one correspondence of the cross-link channel, the channel number and the contract method number, thereby being convenient for identifying the authorization condition of the access authority, controlling the flexible operation among the cross-link management module, the business end, the multi-cross-link channel, the contract method, the cross-link gateway and the cross-link router, being capable of flexibly configuring the channel and maximally ensuring the safety of the cross-link transaction on the premise of improving the development speed of the cross-link transaction.
Drawings
FIG. 1 is a flow chart of cross-chain data access transmission using multi-channel access in accordance with the present invention;
fig. 2 is a diagram of a cross-link data access transmission device employing multi-channel access in accordance with the present invention.
Detailed Description
In order to more clearly and accurately describe the technical scheme and advantages of the present invention, the following detailed description of the present invention is further provided with reference to the accompanying drawings in the examples of the present invention, which illustrate an embodiment of the present invention, and the technical scheme of the present invention is rearranged or simply replaced to fall within the technical scope of the present invention.
The data interaction process may also be regarded as a process of data access and/or transmission in the present invention.
The invention realizes the access authorization access control on the accesses in all the data transmission processes by realizing the interaction between the multi-span chain channel and the service end, realizes the safe butt joint of the cross-chain transaction, ensures the safety and the speed in the cross-chain transaction process, and satisfies the rapid implementation and development of the cross-chain application construction of the complex scene.
As shown in fig. 1, the invention adopts a cross-link data access transmission flow chart with multi-channel access, and the specific implementation steps include:
step1: the method comprises the steps that a cross-link management module distributes a plurality of cross-link channels to be cross-linked for a service end, and meanwhile generates corresponding channel numbers for the channels, wherein the channel numbers bind the numbers of contract methods called by the channels;
the channel is divided into a plurality of channels by a cross-link management module according to the cross-link data access type, cross-link channel numbers (channel numbers and numbers) are distributed by the cross-link management module, a contract method which can be called by the corresponding channel is set, and a service end is combined with multi-channel access to realize cross-link workflow serial access data. The cross-link management module identifies the channel number and the contract method number of the contract method to select the channel and the contract method, and the channel calls the contract method based on the cross-link gateway. The cross-link gateway realizes the invocation of the contract method, numbers the data transmitted by different channels, respectively binds different sender route numbers and receiver route numbers, and triggers a time stamp timer by a global tracking number for providing or forwarding cross-link data access by the cross-link gateway, wherein the time stamp timer locks the time of the cross-link data access and transmission.
The contract method corresponds to a channel number, and rights access information is generated according to channel information and provided for the service end to identify.
Step2: channel information and cross-link interaction information for identifying authority identities in the process of accessing or transmitting data are configured in the contract method, the authority identities are exported and provided for a service end through a cross-link management module, and the specific implementation steps comprise:
s21: request for a contracted message format; for example, the following message formats may be agreed:
{
"acsCode": "channel number assigned across chain management module",
"funcCode": "contract method number assigned across chain management modules",
"txnnNo": "service end cross-chain data access or transmission number",
"reqTm": "request time for cross-chain data access and transmission",
"reqContent": "service message object field",
"sign Str": message signature "
}
S22: checking whether the distributed channel number and contract method number meet the authority identity access authorization requirement by a cross-link router;
s23: when the authorization requirement is met, checking the message signature, and synchronously returning to the channel and authorizing the channel to access the service end; if not, the message is synchronously refused and access is forbidden;
s24: the channel authorizes the access business end to execute transaction data transmission, and the business end and the cross-link channel can complete butt joint through the transaction data transmission.
Step3: after triggering the contract method, the cross-link management module executes cross-link data access and transmission according to channel information and cross-link interaction information; the contract method is configured to perform cross-chain interaction with the multiparty blockchain, then callback setting is carried out through the contract method, multiparty cross-chain channel and business end data access and transmission are combined, complex cross-chain transaction scene setting and rapid change of a cross-chain transaction model are met, and the method specifically comprises the following steps:
s31: configuring a cross-chain gateway, a blockchain intelligent contract, a channel of a callback after execution and a contract method which are called by the contract method, interacting with the cross-chain gateway in an asynchronous mode, and adopting gRPC+protobuf technology for a request message format;
gRPC: an open source high performance RPC (Remote Procedure Call) framework: a set of mechanisms is provided to enable communication between applications.
protobuf (Google Protocol Buffers): google provides a tool library (similar to Json) with efficient protocol data exchange formats, but with higher conversion efficiency than Json, protobuf, both time and space efficiency 3-5 times that of Json.
gRPC may define an interface through protobuf, so that there may be more stringent interface constraints.
S32: after the cross-link gateway invokes the blockchain, a processing result is sent by a cross-link router, the cross-link router connects a plurality of cross-link channels in series according to callback information, and whether the cross-link channels and the service end are mutually exclusive is judged according to the callback information; if the inter-link channel callback is empty, ending the process execution, and acquiring an execution result notice by the service end;
based on the configuration and callback process, the cross-link data access and transmission flow combination is completed by the cross-link route, the cross-link gateway, the blockchain, other cross-link channels and the service end.
Step4: the service end acquires the cross-link information export document, executes cross-link transaction and returns a transaction result to inform the cross-link management module;
step5: the cross-link management module receives the multi-channel notification based on an asynchronous mode, is coupled with the service end according to the blockchain information, judges whether the access meets the access condition or not in a bidirectional asynchronous mode through the service end and the cross-link channel, and feeds back the result to notify the cross-link management module.
The invention also provides a cross-link data access and transmission system adopting multi-channel access, which comprises the following specific components:
service end: providing a cross-link access or data transmission request to a cross-link management module; acquiring cross-link information and exporting a document, executing cross-link transaction and returning a transaction result to inform the cross-link management module; judging whether the accessed cross-link channel meets access conditions or not and feeding back a result notification cross-link management module;
and a cross-chain management module: distributing a plurality of cross-link channels to be cross-linked for a service end, and generating corresponding channel numbers for the channels; executing cross-link data access and transmission according to channel information and cross-link interaction information; receiving a transaction result notice returned by a service end; receiving a feedback result notice of a service end or a cross-link channel;
the contract method comprises the following steps: channel information and cross-link interaction information for identifying authority identities in the process of accessing or transmitting data are configured in a contract method; after triggering, executing cross-link data access or data transmission;
cross-link channel: for cross-chain data transmission; judging whether the accessed service end meets the access condition or not and feeding back the result notification to the cross-link management module;
the cross-link is defined by: distributing cross-link channel numbers (channel numbers, numbers) and setting contract methods which can be called by corresponding channels; a global tracking number to provide or forward cross-chain data access triggers a timestamp timer; checking whether the allocated channel number and contract method number meet the authority identity access authorization requirement; after the cross-link gateway invokes the blockchain contract method, a processing result is sent by a cross-link router, the cross-link router connects a plurality of cross-link channels in series according to callback information, and whether the cross-link channels and a service end are mutually exclusive or not is judged according to the callback information;
cross-chain gateway: calling a contract method; and data access and transmission are performed in an asynchronous mode.
The number of modules and the scale of processing described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the system components/assemblies/elements of the present invention will be readily apparent to those skilled in the art.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements any of the above method steps; for the storage medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, and reference should be made to the description of the method embodiments for relevant points.
Based on the same inventive concept, the present embodiment provides a cross-link data access and transmission device adopting multi-channel access, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that the processor executes the computer program to implement any one of the above method steps. For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The previous description of the embodiments is provided to facilitate a person of ordinary skill in the art in order to make and use the present invention. It should be understood that the present invention is not limited to the application of the above examples, and various modifications to the above-described embodiments will be apparent to those skilled in the art, and it should be apparent from the disclosure of the present invention that modifications and adaptations of the present invention are intended to be within the scope of the present invention.