CN111008827B - Cross-chain transaction signature method and device - Google Patents

Cross-chain transaction signature method and device Download PDF

Info

Publication number
CN111008827B
CN111008827B CN201911165887.9A CN201911165887A CN111008827B CN 111008827 B CN111008827 B CN 111008827B CN 201911165887 A CN201911165887 A CN 201911165887A CN 111008827 B CN111008827 B CN 111008827B
Authority
CN
China
Prior art keywords
cross
blockchain
transaction
chain component
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911165887.9A
Other languages
Chinese (zh)
Other versions
CN111008827A (en
Inventor
石翔
莫楠
李辉忠
张开翔
范瑞彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201911165887.9A priority Critical patent/CN111008827B/en
Publication of CN111008827A publication Critical patent/CN111008827A/en
Priority to PCT/CN2020/127566 priority patent/WO2021103998A1/en
Application granted granted Critical
Publication of CN111008827B publication Critical patent/CN111008827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Abstract

The invention relates to the field of financial science and technology (Fintech), is also suitable for the field of BlockChain, and discloses a cross-chain transaction signature method and a device, wherein the method comprises the following steps: the first cross-link component sends the uplink request to the second cross-link component, the second cross-link component generates a transaction to be signed according to the uplink request and the state information of the blockchain, a signature algorithm of the transaction to be signed and the blockchain is sent to the first cross-link component, the first cross-link component signs the transaction to be signed according to the signature algorithm by using a user private key, the generated signed transaction is sent to the second cross-link component, and the second cross-link component sends the signed transaction to the blockchain. The technical scheme is used for solving the problem of higher complexity of the client in the prior art.

Description

Cross-chain transaction signature method and device
Technical Field
The embodiment of the invention relates to the field of financial science and technology (Fintech), in particular to a cross-chain transaction signature method and device in the field of blockchain.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changed into financial technology (fintech), but due to the requirements of safety and real-time performance of the financial industry, the requirements of the technology are also higher.
There are currently various types of blockchains. Under certain business scenarios, the client needs to operate different types of blockchains at the same time and send transactions to different types of blockchains, but the signature algorithms of the different types of blockchains are different, for example, one client corresponds to the Ethernet blockchain and the bitcoin blockchain at the same time, when the client needs to send the transactions to the Ethernet blockchain, the client signs the transactions according to the signature algorithm of the Ethernet blockchain and sends the transactions, and when the client needs to send the transactions to the bitcoin blockchain, the client signs the transactions according to the signature algorithm of the bitcoin blockchain and sends the transactions.
In the prior art, a client needs to configure a signature algorithm corresponding to different types of blockchains locally, and before a transaction is sent, the signature algorithm of a target blockchain needs to be judged and signed according to the signature algorithm. The method has higher requirements on the client and increases the complexity of the client.
Disclosure of Invention
The embodiment of the invention provides a cross-chain transaction signature method and device, which are used for solving the problem of higher complexity of a client in the prior art.
In a first aspect, a method for signing a cross-chain transaction provided by an embodiment of the present invention includes:
the first cross-link component sends a request for uplink to the second cross-link component; the first cross-chain component corresponds to the client, and the second cross-chain component corresponds to the blockchain; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the first cross-chain component receives a transaction to be signed and a signature algorithm of the blockchain, which are sent by the second cross-chain component; the transaction to be signed is generated by the second cross-chain component according to the uplink request and the state information of the blockchain;
the first cross-chain component signs the transaction to be signed by using a user private key according to the signature algorithm, and sends the generated signed transaction to the second cross-chain component so that the second cross-chain component sends the signed transaction to the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, the to-be-uplink data includes a target blockchain identifier and transaction content corresponding to the to-be-uplink data;
the first cross-link component sending a request for a uplink to a second cross-link component comprising:
the first cross-link component generates the uplink request according to the transaction content;
the first cross-chain component sends the uplink request to a second cross-chain component corresponding to the target blockchain.
In the above technical solution, a first cross-link component corresponding to the client and a second cross-link component corresponding to the blockchain are deployed, where the first cross-link component is configured to receive data to be uplinked sent by the client and generate an uplinking request, and the second cross-link component is configured to receive the uplinking request sent by the first cross-link component and generate a transaction that is used for uplinking but not signed according to state information of the blockchain, and send a signature algorithm of the blockchain to the first cross-link component together, so that the first cross-link component signs the transaction that is not signed by a private key of a user according to the signature algorithm. That is, the first cross-link component is used for signing according to the private key of the user, the second cross-link component is used for providing the first cross-link component with a corresponding signature algorithm, and the client only needs to submit the data to be uploaded to the first cross-link component through interaction between the first cross-link component and the second cross-link component, so that the client does not need to sign the transaction according to the signature algorithms of different types of blockchains, and the complexity of the client is reduced. Furthermore, the client corresponds to the first cross-link component, when the client submits the data to be uplink to the first cross-link component, the data to be uplink is in a fixed format, and the client does not need to convert the data to be uplink into different formats according to the requirements of different types of blockchains, so that the complexity of the client is further reduced.
In a second aspect, a method for signing a cross-chain transaction provided by an embodiment of the present invention includes:
the second cross-link component receives a uplink request sent by the first cross-link component; the second cross-chain component corresponds to a blockchain, and the first cross-chain component corresponds to a client; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the second cross-chain component generates a transaction to be signed according to the uplink request and the state information of the blockchain, and sends the transaction to be signed and a signature algorithm of the blockchain to the first cross-chain component;
the second cross-chain component receives signed transactions sent by the first cross-chain component; the signed transaction is generated after the first cross-chain component signs the transaction to be signed by using a user private key;
the second cross-chain component sends the signed transaction into the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, before the second cross-chain component generates the transaction to be signed according to the uplink request and the state information of the blockchain, the method further includes:
the second cross-chain component sends a synchronization request to the blockchain;
the second cross-chain component receives the state information of the blockchain feedback; the state information is generated by the blockchain based on a most current state of the blockchain.
In the above technical solution, a first cross-link component corresponding to the client and a second cross-link component corresponding to the blockchain are deployed, where the first cross-link component is configured to receive to-be-uplinked data sent by the client to generate an uplinking request, and the second cross-link component is configured to receive the uplinking request sent by the first cross-link component and generate a transaction that is used for uplinking but not signed according to state information of the blockchain, and send a signature algorithm of the blockchain to the first cross-link component together, so that the first cross-link component signs the transaction that is not signed by a private key of a user according to the signature algorithm. That is, the first cross-link component is used for signing according to the private key of the user, the second cross-link component is used for providing the first cross-link component with a corresponding signature algorithm, and through interaction between the first cross-link component and the second cross-link component, the realization client only needs to submit the data to be uploaded to the first cross-link component, the client is not required to sign the transaction according to the signature algorithms of different types of blockchains, and the complexity of the client is reduced. Furthermore, the client corresponds to the first cross-link component, when the client submits the data to be uplink to the first cross-link component, the data to be uplink is in a fixed format, and the client does not need to convert the data to be uplink into different formats according to the requirements of different types of blockchains, so that the complexity of the client is further reduced.
In a third aspect, an embodiment of the present invention further provides a cross-chain transaction signature apparatus, including:
the first cross-link assembly comprises a receiving and transmitting unit and a processing unit;
the receiving and transmitting unit is used for sending the uplink request to the second cross-link component; the first cross-chain component corresponds to the client, and the second cross-chain component corresponds to the blockchain; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the receiving and transmitting unit is further used for receiving a transaction to be signed and a signature algorithm of the blockchain, which are sent by the second cross-chain component; the transaction to be signed is generated by the second cross-chain component according to the uplink request and the state information of the blockchain;
the processing unit is used for signing the transaction to be signed by using a user private key according to the signing algorithm, and controlling the receiving and transmitting unit to transmit the generated signed transaction to the second cross-chain component so that the second cross-chain component transmits the signed transaction to the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, the to-be-uplink data includes a target blockchain identifier and transaction content corresponding to the to-be-uplink data;
the receiving and transmitting unit is specifically configured to:
and generating the uplink request according to the transaction content, and sending the uplink request to a second cross-chain component corresponding to the target blockchain.
In a fourth aspect, an embodiment of the present invention further provides a cross-chain transaction signature apparatus, including:
the second cross-chain assembly comprises a receiving and transmitting unit and a processing unit;
the receiving and transmitting unit is used for receiving a uplink request sent by the first cross-link component; the second cross-chain component corresponds to a blockchain, and the first cross-chain component corresponds to a client; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the processing unit is used for generating a transaction to be signed according to the uplink request and the state information of the blockchain, and controlling the receiving and transmitting unit to transmit the transaction to be signed and a signature algorithm of the blockchain to the first cross-chain component;
the receiving and transmitting unit is further used for receiving signed transactions sent by the first cross-link component; the signed transaction is generated after the first cross-chain component signs the transaction to be signed by using a user private key;
the transceiver unit is also configured to send the signed transaction into the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, the transceiver unit is further configured to:
before the processing unit generates a transaction to be signed according to the uplink request and the state information of the blockchain, a synchronization request is sent to the blockchain;
receiving the state information fed back by the block chain; the state information is generated by the blockchain based on a most current state of the blockchain.
In a fifth aspect, embodiments of the present invention also provide a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the cross-chain transaction signature method according to the obtained program.
Correspondingly, the embodiment of the invention also provides a computer-readable nonvolatile storage medium, which comprises computer-readable instructions, wherein when the computer reads and executes the computer-readable instructions, the computer is caused to execute the cross-chain transaction signature method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 (a) is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 1 (b) is a schematic diagram of another system architecture according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a cross-chain transaction signature method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another cross-chain transaction signature method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a cross-chain transaction signature device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another cross-chain transaction signature device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 illustrates a system architecture, which may include a first blockchain, a second blockchain, a cross-chain component, and a client, to which embodiments of the present invention provide a cross-chain transaction signature method.
The first blockchain and the second blockchain are different types of blockchains, and the signature algorithms adopted by the first blockchain and the second blockchain are different, for example, the first blockchain is an Ethernet blockchain, the second blockchain is a bit coin blockchain, the first blockchain adopts the signature algorithm of the Ethernet blockchain, and the second blockchain adopts the signature algorithm of the bit coin blockchain.
The cross-chain component is for connecting the client and the first blockchain, and for connecting the client and the second blockchain. The cross-chain component is configured with a user private key and signature algorithms of each blockchain, and is used for performing the uplink operation after signing the to-be-uplink transaction of the client by adopting the user private key according to the signature algorithm of the blockchain. For example, as in fig. 1 (a), if the first blockchain is an ethernet blockchain, the cross-chain component may use a user private key to sign the transaction to be uplink of the client according to the signature algorithm of the ethernet blockchain, and then send the signed transaction to the ethernet blockchain.
Further, the cross-chain component may include a first cross-chain component and a second cross-chain component, where the first cross-chain component corresponds to the client, and the first cross-chain component may be a component installed in the client or may be a component independent of a component other than the client, and the first cross-chain component may be installed with an SDK (Software Development Kit ) for providing a unified interface for the client; the second blockchain components correspond to blockchains, and each blockchain corresponds to at least one second blockchain component, as in fig. 1 (b), the first blockchain corresponds to one second blockchain component, and the second blockchain corresponds to one second blockchain component.
The first cross-link component is locally configured with a user private key, the second cross-link component is locally configured with a signature algorithm of the blockchain, and the data interaction between the first cross-link component and the second cross-link component can realize that the uplink operation is executed after the to-be-uplink transaction of the client is signed by the user private key according to the signature algorithm of the blockchain. For example, as shown in fig. 1 (b), if the first blockchain is an ethernet blockchain, the second cross-chain component corresponding to the ethernet blockchain is locally configured with a signature algorithm of the ethernet blockchain, and the first cross-chain component signs the to-be-uplink transaction of the client by using the user private key according to the signature algorithm of the ethernet blockchain locally configured by the second cross-chain component and then sends the to-be-uplink transaction to the second cross-chain component, so that the second cross-chain component sends the signed to-be-uplink transaction to the ethernet blockchain.
In the system architecture shown in fig. 1 (a) and 1 (b), although only two blockchains are shown, the present solution is also applicable to a plurality of blockchains, which correspond to at least two types. Moreover, one blockchain may correspond to at least one second cross-chain component, the local of any of the at least one second cross-chain component configured with a signature algorithm corresponding to the blockchain.
Based on the above description, fig. 2 illustrates a flow of a cross-chain transaction signature method provided by an embodiment of the present invention, where the flow may be interactively performed by a first cross-chain component and a second cross-chain component.
As shown in fig. 2, the process specifically includes:
in step 201, the first cross-link component sends a request for a uplink to the second cross-link component.
The request for the uplink is determined by the first cross-link component from the data to be uplink of the client. The first cross-link component provides a unified interface for the client and is used for receiving data to be uplinked sent by the client, wherein the data to be uplinked can comprise a transaction path and transaction contents, and the transaction path comprises an identifier of a target blockchain corresponding to the data to be uplinked and an identifier of a target contract to be invoked on the target blockchain; the transaction content comprises a transaction method and transaction parameters, wherein the transaction method refers to a contract method in a target contract to be called; transaction parameters refer to parameters entered into a contract method.
In one implementation, a first cross-link component receives data to be uplink sent by a client, generates a uplink request according to transaction content in the data to be uplink, determines a second cross-link component corresponding to a target block chain according to a transaction path in the data to be uplink, and sends the generated uplink request to the second cross-link component corresponding to the target block chain. In another aspect, the client calls a unified interface provided by the first cross-link component to send data to be uplink, and transmits a transaction method, a transaction parameter and a transaction path in the data to be uplink to the unified interface of the first cross-link component, and the first cross-link component constructs a pre-sent request packet (equivalent to an uplink request) according to the transaction method and the transaction parameter and sends the pre-sent request packet to a second cross-link component corresponding to the transaction path according to the transaction path. Wherein the pre-sent request packet may be in Json format.
In step 202, the second cross-chain component generates a transaction to be signed based on the uplink request and the state information of the blockchain.
The state information of the blockchain may be understood as information generated by the blockchain according to the latest state data, and the latest block header information of the blockchain may be included in the state information of the blockchain. The second cross-chain component continuously keeps synchronous with nodes in the block chain to synchronize the state information of the block chain from the block chain, specifically, the second cross-chain component sends a synchronization request to the block chain, after the block chain receives the synchronization request, the state information is generated according to the latest state data such as the block head information of the latest block, and the state information is sent to the second cross-chain component, and correspondingly, the second cross-chain component receives the state information fed back by the block chain.
In the embodiment of the invention, the transaction to be signed is not signed, namely the signature field in the generated transaction to be signed is null. The transaction to be signed may be in a binary format.
In step 203, the second cross-chain component sends the signature algorithm of the blockchain and the transaction to be signed to the first cross-chain component.
The signature algorithm is a signature algorithm of a blockchain configured locally on the second cross-chain component, and can also be said that the second cross-chain component can be configured with the signature algorithm of the blockchain locally, and after the second cross-chain component generates a transaction to be signed, the generated transaction to be signed and the locally configured signature algorithm of the blockchain are sent to the first cross-chain component together.
For example, the blockchain is BCOS, the signature algorithm adopted by the BCOS is ECDSA (Elliptic Curve Digital Signature Algorithm ) algorithm, then the second cross-chain component corresponding to the BCOS is locally configured with the ECDSA algorithm, and after the second cross-chain component receives the uplink request sent by the first cross-chain component, the generated transaction to be signed and the ECDSA algorithm are sent to the first cross-chain component together.
In step 204, the first cross-chain component signs the transaction to be signed using the user private key according to a signing algorithm.
The user private key is configured at a client side local to the first cross-link component, and after the first cross-link component receives the transaction to be signed and the signing algorithm of the blockchain, the first cross-link component signs the transaction to be signed by using the locally configured user private key according to the signing algorithm of the blockchain, so that signed transaction is generated.
The first cross-chain component sends the generated signed transaction to the second cross-chain component, step 205.
At step 206, the second cross-chain component sends the signed transaction into the blockchain.
It should be noted that, one client may correspond to multiple blockchains, that is, one client may send a transaction to different blockchains, for example, in fig. 2, the client may send a first transaction to a first blockchain or send a second transaction to a second blockchain, where when the client sends a transaction to different blockchains, the signature algorithm of the blockchain is configured in the corresponding second cross-chain component, and when the first cross-chain component sends a uplink request to the second cross-chain component of the target blockchain, the second cross-chain component of the target blockchain generates a transaction to be signed according to the uplink request and state information, and feeds back the locally configured signature algorithm of the target blockchain and the transaction to be signed to the first cross-chain component, and the first cross-chain component signs the transaction to be signed according to the signature algorithm of the target blockchain using a private key of the user, so that the generated signed transaction is a transaction conforming to the signature algorithm of the target blockchain.
The embodiment of the invention is specifically described below in connection with a scenario, where the client corresponds to two blockchains, namely, a blockchain a and a blockchain B, and a certification contract a is deployed on the blockchain a and a certification contract B is deployed on the blockchain B. The client may invoke the interface of the certification method of certification contract a to store evidence in blockchain a or invoke the interface of the certification method of certification contract B to store evidence in blockchain B. However, because the blockchain types of the blockchain a and the blockchain B are different, the transaction requiring uplink can be sent to the chain after the transaction requiring uplink is signed by adopting a signature algorithm corresponding to the blockchain aiming at the blockchains of different types. In the embodiment of the invention, firstly, a user private key is configured in a first cross-link component, a signature algorithm of a block chain corresponding to a second cross-link component is configured in a second cross-link component, the block chain A is assumed to correspond to a second cross-link component 1, the signature algorithm of the block chain A is configured in the second cross-link component 1, and the second cross-link component 1 continuously synchronizes state information from nodes in the block chain A; the blockchain B corresponds to the second cross-chain component 2, the signature algorithm of the blockchain B is configured in the second cross-chain component 2, and the second cross-chain component 2 continuously synchronizes state information from nodes in the blockchain B.
If the client needs to store evidence into the blockchain a, the interaction flow among the client, the first cross-chain component, the second cross-chain component 1, and the blockchain a can be as shown in fig. 3.
Step 301, a client sends data to be uplink to a first cross-link component;
the client calls the unified interface, and the parameters of the incoming interface are as follows:
transaction path: blockchain a/license contract a
The transaction method comprises the following steps: method for storing evidence
Transaction parameters: evidence information
Step 302, a first cross-link component constructs a uplink request according to a transaction method and transaction parameters;
the uplink request may be in Json format or other formats.
Step 303, the first cross-link component sends the uplink request to the second cross-link component 1 according to the transaction path;
in step 304, the second cross-chain component 1 generates a transaction to be signed according to the current blockheight of blockchain a and the uplink request.
The transaction to be signed is a transaction to be signed which is generated by the second cross-chain component 1 according to the current block height and the uplink request and is suitable for the blockchain A, wherein the transaction to be signed is a transaction which is not signed yet, namely a signature field in the generated transaction to be signed is null. The transaction to be signed may be in a binary format.
Step 305, the second cross-chain component 1 sends the signature algorithm of the blockchain a and the transaction to be signed to the first cross-chain component;
step 306, the first cross-chain component signs the transaction to be signed with the user key according to the signing algorithm of the blockchain a;
the signature generated by adopting the user key according to the signature algorithm of the blockchain A is added into the signature field of the transaction to be signed, so that the signed transaction is determined.
Step 307, the first cross-chain component sends the signed transaction to the second cross-chain component 1;
at step 308, the second cross-chain component 1 sends the signed transaction to blockchain a.
If the client stores evidence in the blockchain B, the interaction flow among the client, the first cross-chain component, the second cross-chain component 2, and the blockchain B is similar to the steps 301 to 308, and will not be repeated.
In the embodiment of the invention, a first cross-link component corresponding to a client and a second cross-link component corresponding to a blockchain are deployed, wherein the first cross-link component is used for receiving to-be-uplinked data sent by the client to generate an uplinking request, the second cross-link component is used for receiving the uplinking request sent by the first cross-link component and generating a transaction which is used for uplinking and is not signed according to the state information of the blockchain, and a signature algorithm of the blockchain is sent to the first cross-link component together, so that the first cross-link component signs the transaction which is not signed by adopting a user private key according to the signature algorithm. That is, the first cross-link component is used for signing according to the private key of the user, the second cross-link component is used for providing the first cross-link component with a corresponding signature algorithm, and through interaction between the first cross-link component and the second cross-link component, the realization client only needs to submit the data to be uploaded to the first cross-link component, the client is not required to sign the transaction according to the signature algorithms of different types of blockchains, and the complexity of the client is reduced. Furthermore, the client corresponds to the first cross-link component, when the client submits the data to be uplink to the first cross-link component, the data to be uplink is in a fixed format, and the client does not need to convert the data to be uplink into different formats according to the requirements of different types of blockchains, so that the complexity of the client is further reduced.
Based on the same inventive concept, fig. 4 illustrates an exemplary structure of a cross-chain transaction signature device provided by an embodiment of the present invention, where the device may perform a flow based on a cross-chain transaction signature method.
The device comprises:
a first cross-link assembly, which includes a transceiver unit 401 and a processing unit 402;
the transceiver unit 401 is configured to send a uplink request to the second cross-link component; the first cross-chain component corresponds to the client, and the second cross-chain component corresponds to the blockchain; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the transceiver unit 401 is further configured to receive a transaction to be signed and a signature algorithm of the blockchain sent by the second cross-chain component; the transaction to be signed is generated by the second cross-chain component according to the uplink request and the state information of the blockchain;
the processing unit 402 is configured to sign the transaction to be signed according to the signing algorithm by using a user private key, and control the transceiver unit 401 to send the generated signed transaction to the second cross-chain component, so that the second cross-chain component sends the signed transaction to the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component;
the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, the to-be-uplink data includes a target blockchain identifier and transaction content corresponding to the to-be-uplink data;
the transceiver unit 401 is specifically configured to:
and generating the uplink request according to the transaction content, and sending the uplink request to a second cross-chain component corresponding to the target blockchain.
Based on the same inventive concept, fig. 5 illustrates an exemplary structure of a cross-chain transaction signature device provided by an embodiment of the present invention, where the device may perform a flow based on a cross-chain transaction signature method.
The device comprises:
a second cross-chain component, which includes a transceiver unit 501 and a processing unit 502;
the transceiver unit 501 is configured to receive a uplink request sent by a first cross-link component; the second cross-chain component corresponds to a blockchain, and the first cross-chain component corresponds to a client; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the processing unit 502 is configured to generate a transaction to be signed according to the uplink request and the state information of the blockchain, and control the transceiver unit 501 to send the transaction to be signed and a signature algorithm of the blockchain to the first cross-chain component;
the transceiver unit 501 is further configured to receive a signed transaction sent by the first cross-link component; the signed transaction is generated after the first cross-chain component signs the transaction to be signed by using a user private key;
the transceiving unit 501 is further configured to send the signed transaction into the blockchain.
Optionally, the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component;
the user private key is a user private key of the client that is configured locally to the first cross-chain component.
Optionally, the blockchain has a plurality of types, and the signature algorithms of the blockchains of different types are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
Optionally, the transceiver unit 501 is further configured to:
transmitting a synchronization request to the blockchain before the processing unit 502 generates a transaction to be signed according to the uplink request and the state information of the blockchain;
receiving the state information fed back by the block chain; the state information is generated by the blockchain based on a most current state of the blockchain.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the cross-chain transaction signature method according to the obtained program.
Based on the same inventive concept, the embodiment of the invention also provides a computer readable nonvolatile storage medium, which comprises computer readable instructions, when the computer reads and executes the computer readable instructions, the computer is caused to execute the cross-chain transaction signature method.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable cross-chain transaction signature device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable cross-chain transaction signature device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable cross-chain transaction signing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable cross-chain transaction signing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. A method of signing a cross-chain transaction comprising:
the first cross-link component sends a request for uplink to the second cross-link component; the first cross-chain component corresponds to the client, and the second cross-chain component corresponds to the blockchain; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the first cross-chain component receives a transaction to be signed and a signature algorithm of the blockchain, which are sent by the second cross-chain component; the transaction to be signed is generated by the second cross-chain component according to the uplink request and the state information of the blockchain;
the first cross-chain component signs the to-be-signed transaction by using a user private key according to the signature algorithm, and sends the generated signed transaction to the second cross-chain component so that the second cross-chain component sends the signed transaction to the blockchain;
the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
2. The method of claim 1, wherein the blockchain has a plurality of types, and the signature algorithms of different types of blockchains are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
3. The method according to claim 1 or 2, wherein the to-be-uplinked data comprises identification and transaction content of a target blockchain corresponding to the to-be-uplinked data;
the first cross-link component sending a request for a uplink to a second cross-link component comprising:
the first cross-link component generates the uplink request according to the transaction content;
the first cross-chain component sends the uplink request to a second cross-chain component corresponding to the target blockchain.
4. A method of signing a cross-chain transaction comprising:
the second cross-link component receives a uplink request sent by the first cross-link component; the second cross-chain component corresponds to a blockchain, and the first cross-chain component corresponds to a client; the uplink request is determined by the first cross-link component according to the data to be uplink of the client;
the second cross-chain component generates a transaction to be signed according to the uplink request and the state information of the blockchain, and sends the transaction to be signed and a signature algorithm of the blockchain to the first cross-chain component;
the second cross-chain component receives signed transactions sent by the first cross-chain component; the signed transaction is generated after the first cross-chain component signs the transaction to be signed by using a user private key;
the second cross-chain component sending the signed transaction into the blockchain;
the signature algorithm is a signature algorithm of the blockchain that is configured locally to the second cross-chain component; the user private key is a user private key of the client that is configured locally to the first cross-chain component.
5. The method of claim 4, wherein the blockchain has a plurality of types, and the signature algorithms of the different types of blockchains are different; for each blockchain, a signature algorithm of the blockchain is configured locally to a second cross-chain component corresponding to the blockchain; at least one second cross-chain component is associated with each blockchain.
6. The method of claim 4 or 5, wherein before the second cross-chain component generates a transaction to be signed from the uplink request and the state information of the blockchain, further comprising:
the second cross-chain component sends a synchronization request to the blockchain;
the second cross-chain component receives the state information of the blockchain feedback; the state information is generated by the blockchain based on a most current state of the blockchain.
7. A computing device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory and for performing the method of any of claims 1 to 3 or any of claims 4 to 6 in accordance with the obtained program.
8. A computer readable non-transitory storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any one of claims 1 to 3 or any one of claims 4 to 6.
CN201911165887.9A 2019-11-25 2019-11-25 Cross-chain transaction signature method and device Active CN111008827B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911165887.9A CN111008827B (en) 2019-11-25 2019-11-25 Cross-chain transaction signature method and device
PCT/CN2020/127566 WO2021103998A1 (en) 2019-11-25 2020-11-09 Method for signing cross-blockchain transactions, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911165887.9A CN111008827B (en) 2019-11-25 2019-11-25 Cross-chain transaction signature method and device

Publications (2)

Publication Number Publication Date
CN111008827A CN111008827A (en) 2020-04-14
CN111008827B true CN111008827B (en) 2023-07-21

Family

ID=70112676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911165887.9A Active CN111008827B (en) 2019-11-25 2019-11-25 Cross-chain transaction signature method and device

Country Status (2)

Country Link
CN (1) CN111008827B (en)
WO (1) WO2021103998A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008827B (en) * 2019-11-25 2023-07-21 深圳前海微众银行股份有限公司 Cross-chain transaction signature method and device
CN112150148A (en) * 2020-09-24 2020-12-29 普华云创科技(北京)有限公司 Enterprise asset protection method and system based on block chain technology
CN113691621B (en) * 2021-08-24 2023-10-13 上海点融信息科技有限责任公司 Block chain data uplink method
CN113781216A (en) * 2021-08-27 2021-12-10 浙商银行股份有限公司 Asynchronous cross-chain transaction query method and device based on callback contract mechanism

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909369A (en) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 Based on the common recognition method, apparatus merchandised across chain and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10417188B2 (en) * 2016-05-27 2019-09-17 Mastercard International Incorporated Method and system for transferring trust across block chain segments
CN109428722A (en) * 2017-08-30 2019-03-05 上海策赢网络科技有限公司 A kind of content delivery method and device
CN108256864B (en) * 2018-02-13 2019-06-07 中链科技有限公司 Foundation across chain alliance and communication means, system between a kind of block chain
CN108876618A (en) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 A kind of exchange block catenary system and corresponding universal block chain mutual operation method and network
CN109104287A (en) * 2018-07-27 2018-12-28 众安信息技术服务有限公司 The method and apparatus communicated in block chain
CN110008686B (en) * 2018-11-16 2020-12-04 创新先进技术有限公司 Cross-block-chain data processing method and device, client and block chain system
CN111614656B (en) * 2018-11-16 2021-12-24 创新先进技术有限公司 Credible management method and device for cross-link data and electronic equipment
CN109460413B (en) * 2018-11-19 2022-05-13 众安信息技术服务有限公司 Method and system for establishing account across block chains
CN109903041A (en) * 2018-11-30 2019-06-18 阿里巴巴集团控股有限公司 The method and system of block cochain for the transaction of block chain
EP3590084B1 (en) * 2019-03-04 2022-05-11 Advanced New Technologies Co., Ltd. Methods and devices for testing signature verification for blockchain system
CN110011793A (en) * 2019-04-03 2019-07-12 上海中商网络股份有限公司 Anti-fake data processing method of tracing to the source, device, equipment and medium
CN110149316B (en) * 2019-04-22 2022-05-17 众安信息技术服务有限公司 Block chain publishing method and device
CN110266655B (en) * 2019-05-30 2021-11-12 中国工商银行股份有限公司 Cross-chain interconnection method, device and system based on block chain
CN111008827B (en) * 2019-11-25 2023-07-21 深圳前海微众银行股份有限公司 Cross-chain transaction signature method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909369A (en) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 Based on the common recognition method, apparatus merchandised across chain and storage medium

Also Published As

Publication number Publication date
WO2021103998A1 (en) 2021-06-03
CN111008827A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN111008827B (en) Cross-chain transaction signature method and device
CN111080449B (en) Cross-chain transaction method of blockchain, management node and blockchain network
CN109741056B (en) Method and device for uploading electronic certificate
CN111464627B (en) Data processing method, edge server, center server and processing system
CN109815025B (en) Service model calling method, device and storage medium
CN111144883A (en) Processing performance analysis method and device for block chain network
CN111260076B (en) Block chain-based edge node training method, block chain and storage medium
CN106911703B (en) Method and system for building unified interface platform
US20220337429A1 (en) Interactive aggregate signature method, and device and storage medium
CN113505520A (en) Method, device and system for supporting heterogeneous federated learning
CN109769156B (en) Visual implementation method and device of GPON business model
EP4030776A1 (en) Method and apparatus for triggering vomci function from olt to send omci messages
CN111917859B (en) Data transmission method and device, computer equipment and storage medium
CN106453213A (en) Intersystem call method and device
CN112905313A (en) Task processing method and device and electronic equipment
CN115883053A (en) Model training method and device based on federated machine learning
CN111275553B (en) Block chain data storage method and block chain system
CN104699799A (en) Data transmission method based on cross system
CN115776461A (en) Screen projection method, equipment and storage medium
CN112532713B (en) Anti-bifurcation detection method and device for blockchain
EP3200388B1 (en) User permission check system
CN110816435A (en) Method and device for remotely controlling vehicle
CN114253747B (en) Distributed message management system and method
US11917409B2 (en) Vehicle-to-x communication apparatus and method for achieving a safety integrity level in vehicle-to-x communication
CN112084160B (en) Small curve steel rail bending positioning detection method, device and platform

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