CN116308342A - Block chain transaction method, device and computer readable storage medium - Google Patents

Block chain transaction method, device and computer readable storage medium Download PDF

Info

Publication number
CN116308342A
CN116308342A CN202211690340.2A CN202211690340A CN116308342A CN 116308342 A CN116308342 A CN 116308342A CN 202211690340 A CN202211690340 A CN 202211690340A CN 116308342 A CN116308342 A CN 116308342A
Authority
CN
China
Prior art keywords
blockchain
cross
parameter
transaction
message
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.)
Pending
Application number
CN202211690340.2A
Other languages
Chinese (zh)
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.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology 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 China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202211690340.2A priority Critical patent/CN116308342A/en
Publication of CN116308342A publication Critical patent/CN116308342A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a blockchain transaction method, a blockchain transaction device and a computer readable storage medium, relates to the field of data transmission, and can improve the transaction efficiency between different blockchains when a relay blockchain is busy. The method comprises the following steps: obtaining a first message of a source blockchain and a first cross-link contract of a target blockchain; determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter; sending a second message to the target blockchain; the second message is to instruct the target blockchain to conduct a target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.

Description

Block chain transaction method, device and computer readable storage medium
Technical Field
The present disclosure relates to the field of data transmission, and in particular, to a blockchain transaction method, apparatus, and computer readable storage medium.
Background
Because of the different formats and the authentication problems between different blockchains, in order to realize the cross-chain transaction between different blockchains, the prior blockchain transaction method is that a source blockchain transmits transaction related data to a relay blockchain, the relay blockchain transmits a verification success certificate to the source blockchain after verifying the transaction related data, simultaneously transmits the transaction related data to a target blockchain and receives a receipt certificate from the target blockchain, and the relay blockchain also receives a receipt success certificate of the target blockchain after the target blockchain completes the transaction with the source blockchain, and simultaneously the relay blockchain informs the source blockchain of the completion of the cross-chain transaction.
In the existing blockchain transaction method, the relay blockchain needs to verify transaction related data of the source blockchain and interact various certificates with the source blockchain and the target blockchain, the task amount of the relay blockchain is large, and when the relay blockchain is busy, the transaction efficiency between different blockchains is low.
Disclosure of Invention
The application provides a blockchain transaction method, a blockchain transaction device and a computer readable storage medium, which can improve the transaction efficiency between different blockchains when a relay blockchain is busy.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, a blockchain transaction method is provided, the method comprising: obtaining a first message of a source blockchain and a first cross-link contract of a target blockchain; the method comprises the steps that a first message is used for requesting target transaction with a target blockchain, the first message comprises a first parameter in a second cross-link contract of a source blockchain, the first parameter is used for indicating transaction actions of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract; determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter; sending a second message to the target blockchain; the second message is to instruct the target blockchain to conduct a target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.
Based on the scheme, a third cross-link contract of the target blockchain is determined according to the first parameter and the first cross-link contract by acquiring a first message comprising the first parameter and the first cross-link contract of the target blockchain, and a second message comprising the third cross-link contract is sent to the target blockchain so that the target blockchain conducts target transaction with the source blockchain based on the third cross-link contract. Compared with the existing blockchain transaction method requiring the processing of the relay blockchain, in the scheme of the application, as the parameter value and the type of the second parameter in the third cross-link contract of the target blockchain are the same as the parameter value and the type of the first parameter in the second cross-link contract of the source blockchain, and the format of each parameter is the same as the format of the respective cross-link contract, the transaction can be directly carried out between the two blockchains, the transaction between the two blockchains can be realized without the processing of the relay blockchain, and the transaction efficiency between different blockchains can be improved when the relay blockchain is busy.
With reference to the first aspect, in certain implementation manners of the first aspect, determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract specifically includes: converting the first parameter into a second parameter; and writing the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
Based on the scheme, a scheme of determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract can be implemented.
With reference to the first aspect, in certain embodiments of the first aspect, the method further comprises: sending a third message to the target blockchain; the third message is used for acquiring the transaction state of the target transaction; acquiring a fourth message of the target block chain; the fourth message includes a transaction status of the target transaction.
Based on the scheme, the transaction state of the target transaction can be perceived by sending a third message for acquiring the transaction state of the target transaction to the target blockchain and receiving a fourth message comprising the transaction state of the target transaction.
With reference to the first aspect, in certain embodiments of the first aspect, the method further comprises: transmitting a fifth message to the source blockchain; the fifth message includes a transaction status of the target transaction.
Based on the scheme, the source blockchain can be made to sense the transaction state of the target transaction by sending a fifth message including the transaction state of the target transaction to the source blockchain.
In a second aspect, a blockchain transaction device is provided for implementing the blockchain transaction method of the first aspect. The blockchain transaction device comprises corresponding modules, units or means (means) for realizing the method, wherein the modules, units or means can be realized by hardware, software or realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the functions described above.
With reference to the second aspect, in certain embodiments of the second aspect, the blockchain transaction device includes: a transceiver module and a processing module; the receiving and transmitting module is used for acquiring a first message of a source block chain and a first cross-link contract of a target block chain; the method comprises the steps that a first message is used for requesting target transaction with a target blockchain, the first message comprises a first parameter in a second cross-link contract of a source blockchain, the first parameter is used for indicating transaction actions of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract; the processing module is used for determining a third cross-link contract of the target block chain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter; the receiving and transmitting module is also used for transmitting a second message to the target block chain; the second message is to instruct the target blockchain to conduct a target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.
With reference to the second aspect, in certain embodiments of the second aspect, the processing module is specifically configured to: converting the first parameter into a second parameter; and writing the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
With reference to the second aspect, in certain embodiments of the second aspect, the transceiver module is further configured to: sending a third message to the target blockchain; the third message is used for acquiring the transaction state of the target transaction; acquiring a fourth message of the target block chain; the fourth message includes a transaction status of the target transaction.
With reference to the second aspect, in certain embodiments of the second aspect, the transceiver module is further configured to: transmitting a fifth message to the source blockchain; the fifth message includes a transaction status of the target transaction.
In a third aspect, there is provided a blockchain transaction device, comprising: at least one processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement a method as provided by the first aspect and any one of its possible implementations.
In a fourth aspect, there is provided a computer readable storage medium, which when executed by a processor of a blockchain transaction device, causes the blockchain transaction device to perform a method as provided by the first aspect and any possible implementation thereof.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, enable the computer to perform the method provided by the first aspect and any one of its possible embodiments.
In a sixth aspect, there is provided a chip system comprising: a processor and interface circuit; interface circuit for receiving computer program or instruction and transmitting to processor; the processor is configured to execute a computer program or instructions to cause the chip system to perform a method as provided in the first aspect and any one of its possible embodiments described above.
The technical effects of any one of the embodiments of the second aspect to the sixth aspect may be referred to the technical effects of the different embodiments of the first aspect, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of a block chain transaction system according to the present application;
FIG. 2 is a flow chart of a blockchain transaction method provided by the present application;
FIG. 3 is a flow chart of another blockchain transaction method provided herein;
FIG. 4 is a flow chart of another blockchain transaction method provided herein;
FIG. 5 is a schematic diagram of a block chain transaction device according to the present application;
fig. 6 is a schematic structural diagram of another blockchain transaction device provided in the present application.
Detailed Description
In the description of the present application, unless otherwise indicated, "a plurality" means two or more than two. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", and the like are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
Meanwhile, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion that may be readily understood.
It is appreciated that reference throughout this specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, various embodiments are not necessarily referring to the same embodiments throughout the specification. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It is to be understood that in this application, the terms "when …," "if," and "if" are used to indicate that the corresponding process is to be performed under some objective condition, and are not intended to limit the time, nor do they require that the acts be performed with a judgment, nor are they intended to imply that other limitations are present.
It can be appreciated that some optional features of the embodiments of the present application may be implemented independently in some scenarios, independent of other features, such as the scheme on which they are currently based, to solve corresponding technical problems, achieve corresponding effects, or may be combined with other features according to requirements in some scenarios. Accordingly, the apparatus provided in the embodiments of the present application may also implement these features or functions accordingly, which is not described herein.
Throughout this application, unless specifically stated otherwise, identical or similar parts between the various embodiments may be referred to each other. In the present application, unless specifically stated or logic conflict, terms and/or descriptions between different embodiments and between implementation methods in the embodiments are consistent and may be mutually cited, technical features in the different embodiments and implementation methods in the embodiments may be combined to form a new embodiment, implementation, method, or implementation method according to their inherent logic relationship. The following embodiments of the present application are not to be construed as limiting the scope of the present application.
Fig. 1 is a schematic architecture diagram of a blockchain transaction system provided in the present application, and the technical solution of the embodiment of the present application may be applied to the blockchain transaction system shown in fig. 1, where, as shown in fig. 1, the blockchain transaction system 10 includes a blockchain transaction device 11 and an electronic device 12.
The blockchain transaction device 11 is directly connected or indirectly connected to the electronic device 12, and in this connection, the connection may be wired or wireless, which is not limited in the embodiment of the present application.
The blockchain transaction device 11 may be used to receive data from the electronic device 12.
The electronic device 12 may be used to send data to the blockchain transaction device 11.
The blockchain transaction device 11 and the electronic device 12 may be independent devices or may be integrated into the same device, which is not particularly limited in this application.
When the blockchain transaction device 11 and the electronic device 12 are integrated into the same device, the communication between the blockchain transaction device 11 and the electronic device 12 is a communication between internal modules of the device. In this case, the communication flow between the two is the same as "in the case where the blockchain transaction device 11 and the electronic device 12 are independent of each other".
In the following embodiments provided in the present application, the present application will be described taking the case where the blockchain transaction device 11 and the electronic device 12 are provided independently of each other.
In practical applications, the blockchain transaction method provided in the embodiments of the present application may be applied to the blockchain transaction device 11, and may also be applied to devices included in the blockchain transaction device 11.
The blockchain transaction method provided in the embodiment of the present application will be described below by taking the application of the blockchain transaction method to the blockchain transaction device 11 as an example with reference to the accompanying drawings.
Fig. 2 is a flow chart of a blockchain transaction method provided in the present application, as shown in fig. 2, the method includes the following steps:
s201, the blockchain transaction device obtains a first message of a source blockchain and a first cross-link contract of a target blockchain.
The first message is used for requesting to conduct target transaction with the target blockchain, the first message comprises a first parameter in a second cross-link contract of the source blockchain, the first parameter is used for indicating transaction action of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract.
It should be noted that the target transaction may be transmission data, which is not particularly limited in this application.
The first message may be a cross-chain transaction request message, or the first message may also be a target transaction request message, or the first message may also be a message with other names, where the specific name of the first message is not specifically limited in this application.
The format of the first cross-link contract may be an a format, or the format of the first cross-link contract may also be a B format, or the format of the first cross-link contract may also be other formats, and the specific format of the first cross-link contract is not specifically limited in this application.
Illustratively, the format of the first cross-link contract may be a smart legal format.
The format of the second cross-link contract may be a C format, or the format of the second cross-link contract may also be a D format, or the format of the second cross-link contract may also be other formats, and the specific format of the second cross-link contract is not specifically limited in this application.
Illustratively, the format of the second cross-link contract may be an application logic format.
Correspondingly, in the case that the format of the second cross-link contract is the C format, the format of the first parameter is also the C format, or in the case that the format of the second cross-link contract is the D format, the format of the first parameter is also the D format.
The first parameter may be a parameter of a cross-link contract method in the second cross-link contract.
The transaction action may be an action corresponding to the target transaction, for example, the transaction action may be a certificate action, or the transaction action may also be a query action, or the transaction action may also be another action, which is not specifically limited in the present application.
As one possible implementation, in connection with fig. 1, a blockchain transaction device receives a message from an electronic device, the message including a first message of a source blockchain and a first cross-link contract of a target blockchain, and the blockchain transaction device obtains the first message of the source blockchain and the first cross-link contract of the target blockchain from the message.
As yet another possible implementation, the blockchain transaction device receives a message from a source blockchain, the message including a first message of the source blockchain and a blockchain identification of a target blockchain, the blockchain transaction device obtains the first message of the source blockchain from the message, and obtains a first cross-chain contract of the target blockchain based on the blockchain identification of the target blockchain.
It should be noted that, in this possible implementation manner, the specific implementation manner of the blockchain transaction device to obtain the first cross-link contract of the target blockchain according to the blockchain identifier of the target blockchain may refer to an existing scheme, which is not described herein.
S202, the blockchain transaction device determines a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract.
The third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter.
When the parameter value of the first parameter is the E value, the parameter value of the second parameter is also the E value, or when the parameter value of the first parameter is the F value, the parameter value of the second parameter is also the F value.
In the case where the type of the first parameter is the G type, the type of the second parameter is also the G type, or in the case where the type of the first parameter is the H type, the type of the second parameter is also the H type.
In the case where the format of the first cross-link contract is a format, the format of the second parameter is also a format, or in the case where the format of the first cross-link contract is B format, the format of the second parameter is also B format.
In the case where the format of the first cross-link contract is a format, the format of the third cross-link contract is also a format, or in the case where the format of the first cross-link contract is B format, the format of the third cross-link contract is also B format.
As one possible implementation, the blockchain transaction device determines a second parameter according to the first parameter, and determines a third cross-link contract of the target blockchain according to the second parameter and the first cross-link contract.
It should be noted that, for a specific description of this possible implementation manner, reference may be made to the related description of the subsequent part of the specific embodiment of the present application, which is not described herein in detail.
S203, the blockchain transaction device sends a second message to the target blockchain.
The second message is used for indicating the target blockchain to conduct target transaction with the source blockchain based on the third cross-link contract, and the second message comprises the third cross-link contract.
It should be noted that, the second message may be a cross-link transaction indication message, or the second message may also be target transaction indication information, or the second message may also be a message with another name, where the specific name of the second message is not specifically limited in this application.
Specific implementations of target blockchain to conduct target transactions with the source blockchain based on the third cross-chain contract may refer to existing schemes, which are not described herein.
Based on the scheme, a third cross-link contract of the target blockchain is determined according to the first parameter and the first cross-link contract by acquiring a first message comprising the first parameter and the first cross-link contract of the target blockchain, and a second message comprising the third cross-link contract is sent to the target blockchain so that the target blockchain conducts target transaction with the source blockchain based on the third cross-link contract. Compared with the existing blockchain transaction method requiring the processing of the relay blockchain, in the scheme of the application, as the parameter value and the type of the second parameter in the third cross-link contract of the target blockchain are the same as the parameter value and the type of the first parameter in the second cross-link contract of the source blockchain, and the format of each parameter is the same as the format of the respective cross-link contract, the transaction can be directly carried out between the two blockchains, the transaction between the two blockchains can be realized without the processing of the relay blockchain, and the transaction efficiency between different blockchains can be improved when the relay blockchain is busy.
The blockchain transaction method provided by the application is generally described above, and the blockchain transaction method provided by the application will be further described below with reference to the accompanying drawings.
In one design, fig. 3 is a schematic flow chart of another blockchain transaction method provided in the present application, as shown in fig. 3, S202 provided in the specific embodiment of the present application specifically includes the following steps:
s301, the blockchain transaction device converts the first parameter into a second parameter.
As one possible implementation, the blockchain transaction device converts the format of the first parameter into the format of the first cross-link contract, resulting in the second parameter.
As an example, taking the format of the first parameter as the C format and the format of the first cross-link contract as the a format as an example, the blockchain transaction device converts the C format of the first parameter into the a format to obtain the second parameter.
As yet another example, taking the format of the first parameter as D format and the format of the first cross-link contract as B format as an example, the blockchain transaction device converts the D format of the first parameter into B format to obtain the second parameter.
It should be noted that, in this possible implementation manner, a specific implementation manner of converting the format of the first parameter into the format of the first cross-link contract by the blockchain transaction device may refer to an existing related scheme, which is not described in this application.
S302, the blockchain transaction device writes the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
As one possible implementation manner, the blockchain transaction device writes the parameter value of the second parameter into the parameter of the corresponding type in the first cross-link contract to obtain a third cross-link contract of the target blockchain.
As an example, taking the parameter value of the second parameter as the E value and the type of the second parameter as the G type as an example, the blockchain transaction device writes the E value into the parameter of the G type in the first blockchain contract to obtain the third blockchain contract of the target blockchain.
As yet another example, taking the parameter value of the second parameter as the F value and the type of the second parameter as the H type as an example, the blockchain transaction device writes the F value into the H type parameter in the first cross-link contract to obtain the third cross-link contract of the target blockchain.
It should be noted that, in this possible implementation manner, the specific implementation manner of writing the second parameter into the first cross-link contract by the blockchain transaction device may refer to an existing related scheme, which is not specifically limited in this application.
Based on the scheme, a scheme of determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract can be implemented.
In one design, fig. 4 is a schematic flow chart of another blockchain transaction method provided in the present application, as shown in fig. 4, and further includes the following steps:
s401, the blockchain transaction device sends a third message to the target blockchain.
The third message is used for acquiring the transaction state of the target transaction.
It should be noted that, the third message may be a transaction status query message, or the third message may also be a transaction status query message of the target transaction, or the third message may also be a message with another name, which is not specifically limited in this application.
The transaction state of the target transaction may be that the transaction is being performed, or the transaction state of the target transaction may be that the transaction fails, or the transaction state of the target transaction may be that the transaction is completed.
S402, the blockchain transaction device acquires a fourth message of the target blockchain.
Wherein the fourth message includes a transaction status of the target transaction.
It should be noted that, the fourth message may be a query response message, or the fourth message may also be a query response message of the target transaction, or the fourth message may also be a message with another name, which is not specifically limited in this application.
As one possible implementation, in connection with fig. 1, the blockchain transaction device receives a message of the electronic device, where the message includes a fourth message of the target blockchain, and the blockchain transaction device obtains the fourth message of the target blockchain from the message.
As yet another possible implementation, the blockchain transaction device receives a message of the target blockchain, the message including a fourth message of the target blockchain, and the blockchain transaction device obtains the fourth message of the target blockchain from the message.
Based on the scheme, the transaction state of the target transaction can be perceived by sending a third message for acquiring the transaction state of the target transaction to the target blockchain and receiving a fourth message comprising the transaction state of the target transaction.
In one design, the blockchain transaction method provided by the present application further includes the following steps:
the blockchain transaction device sends a fifth message to the source blockchain.
Wherein the fifth message includes a transaction status of the target transaction.
The fifth message may be the same as the fourth message, or the fifth message may be different from the fourth message.
If the fourth message is the query response message, the fifth message is also the query response message, or if the fourth message is the query response message of the target transaction, the fifth message is also the query response message of the target transaction.
In the case that the fifth message is different from the fourth message, the fifth message may be a query reply message, or the fifth message may also be a query reply message of the target transaction, or the fifth message may also be a message with another name, which is not particularly limited in this application.
Based on the scheme, the source blockchain can be made to sense the transaction state of the target transaction by sending a fifth message including the transaction state of the target transaction to the source blockchain.
The above description has been made mainly in terms of executing the blockchain transaction method by the blockchain transaction device. To achieve the above functions, the blockchain transaction device includes hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional modules of the blockchain transaction device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. Optionally, the division of the modules in the embodiments of the present application is schematic, which is merely a logic function division, and other division manners may be actually implemented. Further, "module" herein may refer to an application-specific integrated circuit (ASIC), an electrical circuit, a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above-described functionality.
In the case of using the function module division, fig. 5 shows a schematic structural diagram of a blockchain transaction device. As shown in fig. 5, the blockchain transaction device 50 includes a transceiver module 501 and a processing module 502.
In some embodiments, the blockchain transaction device 50 may also include a memory module (not shown in fig. 5) for storing program instructions and data.
Wherein, the transceiver module 501 is configured to obtain a first message of a source blockchain and a first cross-link contract of a target blockchain; the method comprises the steps that a first message is used for requesting target transaction with a target blockchain, the first message comprises a first parameter in a second cross-link contract of a source blockchain, the first parameter is used for indicating transaction actions of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract; a processing module 502 configured to determine a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter; the transceiver module 501 is further configured to send a second message to the target blockchain; the second message is to instruct the target blockchain to conduct a target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.
Optionally, the processing module 502 is specifically configured to: converting the first parameter into a second parameter; and writing the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
Optionally, the transceiver module 501 is further configured to: sending a third message to the target blockchain; the third message is used for acquiring the transaction state of the target transaction; acquiring a fourth message of the target block chain; the fourth message includes a transaction status of the target transaction.
Optionally, the transceiver module 501 is further configured to: transmitting a fifth message to the source blockchain; the fifth message includes a transaction status of the target transaction.
All relevant contents of each step related to the above method embodiment may be cited to the functional descriptions of the corresponding functional modules, which are not described herein.
In the case of implementing the functions of the above functional modules in the form of hardware, fig. 6 shows a schematic diagram of a blockchain transaction device. As shown in FIG. 6, the blockchain transaction device 60 includes a processor 601, a memory 602, and a bus 603. The processor 601 and the memory 602 may be connected by a bus 603.
The processor 601 is a control center of the blockchain transaction device 60, and may be one processor or a collective name of a plurality of processing elements. For example, the processor 601 may be a general-purpose central processing unit (central processing unit, CPU), or may be another general-purpose processor. Wherein the general purpose processor may be a microprocessor or any conventional processor or the like.
As one example, processor 601 may include one or more CPUs, such as CPU 0 and CPU 1 shown in fig. 6.
The memory 602 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), magnetic disk storage or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
As a possible implementation, the memory 602 may exist separately from the processor 601, and the memory 602 may be connected to the processor 601 through the bus 603 for storing instructions or program codes. The processor 601, when invoking and executing instructions or program code stored in the memory 602, is capable of implementing the blockchain transaction methods provided by embodiments of the present application.
In another possible implementation, the memory 602 may also be integrated with the processor 601.
Bus 603 may be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
It should be noted that the configuration shown in fig. 6 does not constitute a limitation of the blockchain transaction device 60. In addition to the components shown in fig. 6, the blockchain transaction device 60 may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
As an example, in connection with fig. 5, the transceiver module 501 and the processing module 502 in the blockchain transaction device 50 perform the same function as the processor 601 in fig. 6.
Optionally, as shown in fig. 6, the blockchain transaction device 60 provided in the embodiments of the present application may further include a communication interface 604.
Communication interface 604 for connecting with other devices via a communication network. The communication network may be an ethernet, a radio access network, a wireless local area network (wireless local area networks, WLAN), etc. The communication interface 604 may include a receiving unit for receiving data and a transmitting unit for transmitting data.
In one possible implementation, in the blockchain transaction device 60 provided in the embodiments of the present application, the communication interface 604 may also be integrated in the processor 601, which is not specifically limited in the embodiments of the present application.
As one possible product form, the blockchain transaction device of the embodiments of the present application may also be implemented using the following: one or more field programmable gate arrays (field programmable gate array, FPGA), programmable logic devices (programmable logic device, PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuit or combination of circuits capable of performing the various functions described throughout this application.
From the above description of embodiments, it will be apparent to those skilled in the art that the foregoing functional unit divisions are merely illustrative for convenience and brevity of description. In practical applications, the above-mentioned function allocation may be performed by different functional units, i.e. the internal structure of the device is divided into different functional units, as needed, to perform all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The present application also provides a computer-readable storage medium, on which a computer program or instructions are stored, which when executed cause a computer to perform the steps of the method flow shown in the above-described method embodiments.
Embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the method flows shown in the method embodiments described above.
An embodiment of the present application provides a chip system, including: a processor and interface circuit; interface circuit for receiving computer program or instruction and transmitting to processor; the processor is configured to execute the computer program or instructions to cause the chip system to perform the steps of the method flow shown in the method embodiments described above.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: electrical connections having one or more wires, portable computer diskette, hard disk. Random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), registers, hard disk, optical fiber, portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium suitable for use by a person or persons of skill in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in a special purpose ASIC. In the context of the present application, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Since the blockchain transaction device, the computer readable storage medium and the computer program product provided in the present embodiment can be applied to the blockchain transaction method provided in the present embodiment, the technical effects obtained by the blockchain transaction device, the computer readable storage medium and the computer program product can also refer to the method embodiments described above, and the embodiments of the present application are not repeated herein.
Although the present application has been described herein in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the figures, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the present application has been described in connection with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made without departing from the spirit and scope of the application. Accordingly, the specification and drawings are merely exemplary illustrations of the present application as defined in the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents that fall within the scope of the present application. It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A blockchain transaction method, the method comprising:
obtaining a first message of a source blockchain and a first cross-link contract of a target blockchain; the first message is used for requesting to conduct target transaction with the target blockchain, the first message comprises a first parameter in a second cross-link contract of the source blockchain, the first parameter is used for indicating transaction action of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract;
determining a third cross-link contract of the target blockchain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter;
sending a second message to the target blockchain; the second message is to instruct the target blockchain to conduct the target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.
2. The method according to claim 1, wherein said determining a third cross-link contract for said target blockchain based on said first parameter and said first cross-link contract, in particular comprises:
converting the first parameter to the second parameter;
and writing the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
sending a third message to the target blockchain; the third message is used for acquiring the transaction state of the target transaction;
acquiring a fourth message of the target blockchain; the fourth message includes a transaction status of the target transaction.
4. A method according to claim 3, characterized in that the method further comprises:
transmitting a fifth message to the source blockchain; the fifth message includes a transaction status of the target transaction.
5. A blockchain transaction device, the blockchain transaction device comprising: a transceiver module and a processing module;
the receiving and transmitting module is used for acquiring a first message of a source block chain and a first cross-link contract of a target block chain; the first message is used for requesting to conduct target transaction with the target blockchain, the first message comprises a first parameter in a second cross-link contract of the source blockchain, the first parameter is used for indicating transaction action of the target transaction, the format of the first cross-link contract is different from that of the second cross-link contract, and the format of the first parameter is the same as that of the second cross-link contract;
the processing module is used for determining a third cross-link contract of the target block chain according to the first parameter and the first cross-link contract; the third cross-link contract comprises a second parameter, the format of the third cross-link contract and the format of the second parameter are the same as those of the first cross-link contract, the parameter value of the second parameter is the same as that of the first parameter, and the type of the second parameter is the same as that of the first parameter;
the receiving and transmitting module is further used for sending a second message to the target block chain; the second message is to instruct the target blockchain to conduct the target transaction with the source blockchain based on the third cross-link contract, the second message including the third cross-link contract.
6. The blockchain transaction device of claim 5, wherein the processing module is specifically configured to:
converting the first parameter to the second parameter;
and writing the second parameter into the first cross-link contract to determine a third cross-link contract of the target blockchain.
7. The blockchain transaction device of claim 5 or 6, wherein the transceiver module is further configured to:
sending a third message to the target blockchain; the third message is used for acquiring the transaction state of the target transaction;
acquiring a fourth message of the target blockchain; the fourth message includes a transaction status of the target transaction.
8. The blockchain transaction device of claim 7, wherein the transceiver module is further configured to:
transmitting a fifth message to the source blockchain; the fifth message includes a transaction status of the target transaction.
9. A blockchain transaction device, the blockchain transaction device comprising: a processor coupled to a memory for storing a program or instructions that, when executed by the processor, cause the blockchain transaction device to perform the method of any of claims 1 to 4.
10. A computer readable storage medium having stored thereon a computer program or instructions, which when executed cause a computer to perform the method of any of claims 1 to 4.
CN202211690340.2A 2022-12-27 2022-12-27 Block chain transaction method, device and computer readable storage medium Pending CN116308342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211690340.2A CN116308342A (en) 2022-12-27 2022-12-27 Block chain transaction method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211690340.2A CN116308342A (en) 2022-12-27 2022-12-27 Block chain transaction method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116308342A true CN116308342A (en) 2023-06-23

Family

ID=86794879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211690340.2A Pending CN116308342A (en) 2022-12-27 2022-12-27 Block chain transaction method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116308342A (en)

Similar Documents

Publication Publication Date Title
CN110750341B (en) Task scheduling method, device, system, terminal equipment and storage medium
CN113127168A (en) Service distribution method, system, device, server and medium
TWI754811B (en) System for using device identification to identify via telecommunication server and method thereof
CN111949470A (en) Chip verification method and device, electronic equipment and storage medium
CN109446130B (en) Method and system for acquiring state information of I/O (input/output) equipment
CN111372224A (en) Method, device and equipment for sharing seed code number by eSIM (embedded subscriber identity Module)
CN113177014A (en) Serial port communication method based on inspection mode and serial port chip
CN113515420A (en) Test method and test system
CN113177015A (en) Frame header-based serial port communication method and serial port chip
CN116308342A (en) Block chain transaction method, device and computer readable storage medium
KR20170117326A (en) Direct memory access control device for at least one processing unit having a random access memory
CN111240908B (en) Verification method and verification system for processor interface, electronic equipment and storage medium
CN109491648B (en) Method, system and equipment for realizing independent partition of library function in embedded software
CN113051077A (en) User request processing method and device, terminal equipment and storage medium
CN116820877A (en) Message determining method, device and computer readable storage medium
CN114356541B (en) Configuration method, device and system of computing core and electronic equipment
CN117250941A (en) Abnormality controller determination method, abnormality controller determination device, vehicle, and computer-readable storage medium
CN116701205A (en) Regression testing method, regression testing device and computer readable storage medium
CN116095042B (en) Communication method, system, electronic device and storage medium
CN112769915B (en) Sharing method and device between intelligent cabin vehicle-mounted devices and intelligent cabin
US11916792B2 (en) Vehicle communication control device and method
CN116860486A (en) Information transmission method, producer device, and computer-readable storage medium
CN112203264B (en) Equipment pairing method applied to equipment group and equipment in equipment group
CN117034973A (en) Quality determination method, quality determination device and computer-readable storage medium
CN117008791A (en) Resource relation establishing method, terminal and computer readable storage medium

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