CN114363416B - Cross-chain processing method and device based on block chain, storage medium and server - Google Patents
Cross-chain processing method and device based on block chain, storage medium and server Download PDFInfo
- Publication number
- CN114363416B CN114363416B CN202111633303.3A CN202111633303A CN114363416B CN 114363416 B CN114363416 B CN 114363416B CN 202111633303 A CN202111633303 A CN 202111633303A CN 114363416 B CN114363416 B CN 114363416B
- Authority
- CN
- China
- Prior art keywords
- cross
- transaction
- chain
- processing
- link
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 357
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000012216 screening Methods 0.000 claims description 11
- 230000001960 triggered effect Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 12
- 230000011664 signaling Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000000977 initiatory effect Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000010926 purge Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Marketing (AREA)
- Signal Processing (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a blockchain-based cross-chain processing method, a device, a storage medium and a server, wherein the method comprises the following steps: receiving a processing request sent by a source chain for processing the cross-chain transaction, recording a first receiving time stamp, wherein the processing request carries the cross-chain transaction and a processing time length upper limit value; based on the first receiving time stamp and the upper limit value of the processing time length, determining a timeout processing time stamp of the cross-chain transaction, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the method comprises the steps of sending a cross-link transaction to a destination link, and triggering the destination link to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of the reception of the first processing result when the first processing result for the cross-chain transaction is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-chain transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-chain transaction, and sending a processing result to the source chain.
Description
Technical Field
The present application relates to the field of computers, and in particular, to a blockchain-based cross-chain processing method, device, storage medium, and server.
Background
In recent years, with the heat of blockchain technology, more and more enterprises and developers are added into the wave of blockchain, and many different types of chains are also appeared on the market, and are applied to the fields of finance, health care, supply chain, asset management, tracing and the like. However, most on-chain applications (cryptocurrency or smart contracts) cannot cross the boundaries of the current chain, and cannot cooperate with other chains to implement the circulation of value, thereby limiting the space in which the blockchain can be played. How to enable different types of chains to cooperate to realize the circulation of value is the direction of exploration, which is also the cause of the cross-chain technology.
In the prior art, the complete cross-chain transaction completion mark is: the source chain receives the processing result of the destination chain. However, due to the problems of network delay, equipment failure and the like, the overtime situation of the cross-link transaction processing exists, and the relay link needs to inquire the processing situation of each transaction to screen out the overtime transaction, so that the transaction processing speed of the relay link is reduced.
Disclosure of Invention
The embodiment of the application provides a blockchain-based cross-link processing method, a blockchain-based cross-link processing device, a storage medium and a server, which can quickly inquire overtime transactions caused by problems such as network delay and equipment failure, and can improve the transaction processing rate of a relay chain while guaranteeing the atomicity of cross-link transactions.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
a blockchain-based cross-chain processing method, comprising:
receiving a processing request which is sent by a source chain and used for processing a cross-chain transaction by a request destination chain, recording a first receiving timestamp of the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction;
determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list;
the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed;
recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received;
And if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the first processing result to the source chain.
A blockchain-based cross-chain processing device, comprising:
the first receiving module is used for receiving a processing request which is sent by a source chain and used for requesting a destination chain to process the cross-chain transaction, recording a first receiving time stamp for receiving the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction;
the determining module is used for determining a timeout processing time stamp of the cross-link transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-link transaction and the timeout processing time stamp corresponding to the cross-link transaction in a specified timeout list;
the triggering module is used for sending the cross-link transaction to a destination chain and triggering the destination chain to feed back a first processing result after the cross-link transaction is processed;
a second receiving module, configured to record a second receiving timestamp of receiving a first processing result for the cross-chain transaction when the first processing result is received;
And the clearing module is used for clearing the cross-link transaction in the appointed timeout list and the timeout processing time stamp corresponding to the cross-link transaction if the second receiving time stamp is positioned before the timeout processing time stamp, and sending the first processing result to the source chain.
In some embodiments, the apparatus further comprises:
the recording module is used for recording a third receiving time stamp for receiving the second processing result when receiving the second processing result aiming at other cross-chain transactions;
the screening module is used for screening out the overtime transaction with the overtime processing time stamp positioned before the third receiving time stamp from the appointed overtime list, and marking the state of the overtime transaction as a rollback state;
the first triggering module is used for returning the overtime transaction to the source chain corresponding to each overtime transaction, triggering the source chain to roll back the overtime transaction, and feeding back a first roll-back receipt after the roll-back is completed.
In some embodiments, the first trigger module includes:
the first determining submodule is used for acquiring source chains corresponding to each overtime transaction and determining overtime transactions with the same source chains;
and the first triggering submodule is used for returning the overtime transactions with the same source chain to the corresponding source chain, and triggering the source chain to roll back the overtime transactions.
In some embodiments, the apparatus further comprises:
the second triggering module is used for triggering the destination chain to roll back the cross-chain transaction when a first processing result aiming at the cross-chain transaction is received if the cross-chain transaction is a timeout transaction, and feeding back a second roll-back receipt after the roll-back is completed;
and the first marking module is used for marking the state of the cross-chain transaction as a rollback completion state when the first rollback receipt and the second rollback receipt are received.
In some embodiments, the second trigger module includes:
the sending sub-module is used for sending error reporting information to the target chain when a first processing result aiming at the cross-chain transaction is received if the cross-chain transaction is a timeout transaction, wherein the error reporting information is used for prompting the state of the cross-chain transaction of the target chain to be a rollback state;
and the second triggering sub-module is used for triggering the destination chain to roll back the cross-chain transaction when the error reporting information is received, and feeding back a second roll-back receipt after the roll-back is completed.
In some embodiments, the determining module includes:
the calculating sub-module is used for calculating the sum of the first receiving time stamp and the processing time length to obtain a calculation result;
And the second determining submodule is used for determining the calculation result as a timeout processing time stamp of the cross-chain transaction.
In some embodiments, the purge module includes:
the clearing sub-module is used for clearing the cross-link transaction and the overtime processing time stamp corresponding to the cross-link transaction in the appointed overtime list, marking the state of the cross-link transaction as a processing completion state and sending the first processing result to the source chain.
A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the blockchain-based cross-chain processing method described above.
A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of the blockchain-based cross-chain processing method described above when the program is executed.
According to the method, a processing request for processing the cross-chain transaction by a request destination chain sent by a source chain is received, a first receiving time stamp for receiving the processing request is recorded, and the processing request carries the cross-chain transaction and a processing time length upper limit value of the cross-chain transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the processing result to the source chain. Therefore, when receiving the processing request of each cross-link transaction, the cross-link transaction and the corresponding overtime timestamp are recorded in the appointed overtime list, and the recorded cross-link transaction and the corresponding overtime timestamp are deleted when the processing result of the cross-link transaction is received before the overtime timestamp, so that the processing condition of the transaction is recorded through the appointed overtime list, the overtime transaction caused by the problems of network delay, equipment failure and the like is rapidly inquired, and the transaction processing rate of the relay link is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic diagram of a data sharing system of a blockchain-based cross-chain processing method according to an embodiment of the present application.
Fig. 1b is a flowchart of a blockchain-based cross-chain processing method according to an embodiment of the present application.
Fig. 2a is a schematic signaling flow diagram of a first method for cross-chain processing based on blockchain according to an embodiment of the present application.
Fig. 2b is a schematic signaling flow diagram of a second method for cross-chain processing based on blockchain according to an embodiment of the present application.
FIG. 3 is a schematic diagram of a block-chain-based cross-chain processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a blockchain-based cross-chain processing method, a blockchain-based cross-chain processing device and a computer readable storage medium.
Referring to fig. 1a, fig. 1a is a schematic diagram of a data sharing system of a blockchain-based cross-chain processing method according to an embodiment of the present application, and referring to the data sharing system shown in fig. 1a, the data sharing system 100 refers to a system for performing data sharing between nodes, where the data sharing system may include a plurality of nodes 11, and the plurality of nodes 11 may be clients in the data sharing system. Each node 11 may receive input information during normal operation and maintain shared data within the data sharing system based on the received input information. In order to ensure the information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and the nodes can transmit information through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding to the node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated block can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
TABLE 1
In the present embodiment, description will be made from the viewpoint of a blockchain-based cross-chain processing apparatus that can be integrated in a server having a storage unit and a microprocessor installed therein and having an arithmetic capability.
Referring to fig. 1b, fig. 1b is a schematic flow chart of a first method for processing a blockchain-based cross-chain according to an embodiment of the present application. The block chain-based cross-chain processing method comprises the following steps:
In step 101, a processing request sent by a source chain and used for requesting a destination chain to process a cross-chain transaction is received, a first receiving timestamp of the processing request is recorded, and the processing request carries the cross-chain transaction and a processing time length upper limit value of the cross-chain transaction.
When the cross-link transaction is performed, the source end (initiating end) of the cross-link transaction is the source link, and the processing end corresponding to the cross-link transaction is the destination end. The source chain throws out the cross-chain transaction, and the cross-chain transaction also carries the upper limit value of the processing time length, such as 5 minutes, designated by the source chain for the cross-chain transaction. When the cross-link gateway monitors that the cross-link transaction exists, the cross-link transaction is packaged into the cross-link transaction with the general format and is sent to the relay link. The upper limit value of the processing time length is the maximum time length which can be supported by the normal processing completion (without timeout) received by the relay link from the cross-link transaction.
Specifically, when receiving a cross-link transaction sent by a cross-link gateway, the relay chain records a uplink timestamp of the cross-link transaction, namely, receives a first receiving timestamp of the uplink of the cross-link transaction, wherein the uplink of the cross-link transaction refers to a process that the relay chain packages and outputs the current cross-link transaction and other cross-link transactions, so that the first receiving timestamp refers to a process that the current cross-link transaction and other cross-link transactions are packaged and output, and the first receiving timestamp refers to a timestamp of the uplink of the block after the common identification passes. For example, a cross-chain transaction is uplink at 11 at 45 minutes and 30 seconds, i.e., the block in which the cross-chain transaction is located is uplink at 11 at 45 minutes and 30 seconds. Then 11 at 45 minutes and 30 seconds is the first receive timestamp for cross-chain transaction a.
In step 102, a timeout processing timestamp of the cross-chain transaction is determined based on the first receiving timestamp and the upper limit value of the processing duration, and the cross-chain transaction and the timeout processing timestamp corresponding to the cross-chain transaction are recorded in a specified timeout list.
Wherein the timeout processing timestamp of the cross-chain transaction may be determined based on the first receive timestamp of the received cross-chain transaction and the upper limit of the processing duration of the cross-chain transaction provided by the source chain. The overtime processing time stamp is used for confirming that the cross-chain transaction is normally processed and is not overtime when the cross-chain transaction is processed before the overtime processing time stamp; when the processing of the cross-chain transaction is completed after the timeout processing time stamp, then the cross-chain transaction timeout processing is confirmed. And record the cross-chain transaction and the corresponding timeout processing timestamp in a specified timeout list.
In some embodiments, the step of determining a timeout processing timestamp of the cross-chain transaction based on the first receive timestamp and the processing duration upper limit comprises:
(1) Calculating the sum of the first receiving time stamp and the processing time length to obtain a calculation result;
(2) And determining the calculation result as a timeout processing timestamp of the cross-chain transaction.
The overtime processing time stamp can obtain a calculation result by calculating the sum of the first receiving time stamp and the processing time length; and determining the calculation result as a timeout processing timestamp of the cross-chain transaction.
For example, when the first receiving timestamp of the cross-chain transaction a is 11 points 45 minutes and 30 seconds, the upper limit value of the processing duration configured by the source chain for the cross-chain transaction a is 5 minutes, and the calculation result is 11 points 50 minutes and 30 seconds. The 11 point 50 minutes 30 seconds is determined as the timeout processing timestamp for cross-chain transaction a.
In step 103, a cross-link transaction is sent to the destination link, and the destination link is triggered to feed back a first processing result after the cross-link transaction is processed.
After receiving the cross-link transaction, the relay link packages the cross-link transaction and checks the transaction after successful blocking. And transmitting the verified information such as the cross-link transaction, the verification result and the like to the destination link, thereby triggering the destination link to process the cross-link transaction, and feeding back the first processing result after the cross-link transaction.
Specifically, the first processing result is a processing result obtained by the destination chain according to corresponding processing performed by the cross-chain transaction. For example, a cross-chain transaction requests that the destination chain calculate 1 plus 1 equal to 1, and the destination chain calculates a value of 1 plus 1, thereby feeding back 2 as the first processing result.
In step 104, when a first processing result is received for the cross-chain transaction, a second receive timestamp is recorded at which the first processing result was received.
And when the first processing result of the target link feedback for the cross-link transaction is received, recording a second receiving timestamp for receiving the first processing result. Specifically, in the uplink process of the cross-link transaction, the first processing result is also packaged by the relay link to be blocked, so the second receiving timestamp is the timestamp of the block uplink of the relay link for packaging the first processing result into the block.
For example, the second reception time stamp at which the first processing result is received as 2 is 11 points 50 minutes 25 seconds.
In step 105, if the second receiving timestamp is located before the timeout processing timestamp, the cross-link transaction in the appointed timeout list and the timeout processing timestamp corresponding to the cross-link transaction are cleared, and the processing result is sent to the source link.
If the second receiving timestamp is located before the timeout processing timestamp, it indicates that the cross-link transaction is not overtime and belongs to normal processing, the appointed timeout list cross-link transaction and the timeout processing timestamp corresponding to the cross-link transaction can be cleared, and the first processing result is sent to the source link, so that the whole cross-link transaction is ended.
For example, the specified timeout list records that the timeout processing time stamp corresponding to the cross-link transaction a is 11 points 50 minutes 30 seconds, the second receiving time stamp of the first processing result of the cross-link transaction a, which receives the feedback of the destination link, is 11 points 50 minutes 25 seconds, and before the time of 11 points 50 minutes 30 seconds, the timeout is not performed, so the cross-link transaction a and the timeout processing time stamp corresponding to the cross-link transaction a recorded in the specified timeout list are cleared, and the first processing result is sent to the source link.
In some embodiments, after the step of recording the cross-chain transaction and the timeout processing timestamp corresponding to the cross-chain transaction in a specified timeout list, the method further includes:
(1) Recording a third receiving timestamp for receiving a second processing result when receiving processing requests for other cross-link transactions or receiving the second processing result for other cross-link transactions;
(2) Screening out the overtime transaction with the overtime processing time stamp positioned before the third receiving time stamp from the appointed overtime list, and marking the state of the overtime transaction as a rollback state
(3) Returning the overtime transaction to the source chain corresponding to each overtime transaction, triggering the source chain to roll back the overtime transaction, feeding back a first roll-back receipt after the roll-back is completed,
For the cross-link transaction, there may be a processing result fed back by the destination link, so when a second processing result of other cross-link transactions is received, or when a processing request for other cross-link transactions is received, a third receiving timestamp of receiving the second processing result may be recorded. Specifically, in the uplink process of the cross-link transaction, the second processing result is also packaged by the relay link to be output, so the third receiving timestamp is the uplink timestamp of the output block of the relay link packaging the second processing result to be input into the block. Specifically, a period of outputting a block of one block, for example, 2s, may be set, and when a block is newly output, the timestamp of outputting the block is determined as the third reception timestamp. And screening out timeout transactions with timeout processing time stamps positioned before the third receiving time stamp from the appointed timeout list. And setting a trigger condition for screening the overtime transactions, wherein the trigger condition is based on the third receiving time stamp and each overtime transaction recorded in the appointed overtime list and the corresponding overtime processing time stamp when the processing result of the overtime transaction is received.
For example, when the specified timeout list records that the timeout processing time stamp corresponding to the cross-link transaction a is 11 points 50 minutes 30 seconds and the timeout processing time stamp corresponding to the cross-link transaction B is 11 points 52 minutes 30 seconds, and when the third receiving time stamp when the second processing result corresponding to the other cross-link transaction C is received is 11 points 55 minutes 30 seconds, it is indicated that the cross-link transaction a and the cross-link transaction B are not deleted from the specified timeout list based on the normal processing flow at 11 points 55 minutes 30 seconds, and the processing timeout of the cross-link transaction a and the cross-link transaction B is determined and determined as the timeout transaction.
Specifically, after the overtime transactions are determined in the appointed overtime list, the relay chain marks the states of the overtime transactions as rollbacks, returns the overtime transactions to the source chain corresponding to each overtime transaction, triggers the source chain to rollback the overtime transactions, and feeds back a first rollback receipt to the relay chain after the rollback is completed. The purpose of marking the state of the overtime transaction is that, on one hand, the relay chain guides the rollback operation of the application chain on the cross-chain transactions according to the state of the overtime transaction, on the other hand, in order to avoid that a certain transaction in the overtime list caused by overlong overtime time is repeatedly determined as the overtime transaction, a determination condition of the overtime transaction can be set, the determination is carried out according to the transaction state of the transaction in the overtime list, and the overtime transaction marked as the rollback is not screened as the overtime transaction any more later, thereby improving the screening efficiency of the relay chain when screening the overtime transaction. Transactions within the specified timeout list that are not marked as rollback status and timeout may be determined to be timeout transactions. Rollback refers to restoring the account in which the user was located to a state prior to initiation of the transaction, e.g., a service contract of the source chain has a corresponding method to handle the rolled back transaction, such as transfer contract for transfer, for restoring the amount deducted in the account at the initiation of the transaction. Since the rollback process on the source chain also requires some time, the source chain is required to feed back a first rollback receipt after the rollback is completed.
In some embodiments, the step of returning the timeout transaction to the source chain corresponding to each timeout transaction and triggering the source chain to rollback the timeout transaction includes:
(1.1) acquiring source chains corresponding to each timeout transaction, and determining timeout transactions with the same source chains;
(1.2) returning the same timeout transaction of the source chain to the corresponding source chain, and triggering the source chain to roll back the timeout transaction.
In order to avoid sending the overtime transactions individually to the source chains, the overtime transactions initiated by the same source chain can be sorted, and the sorted overtime transactions are returned to the corresponding source chain, so that the source chain is triggered to roll back the overtime transactions. Thereby improving rollback efficiency for the source chain.
In some embodiments, after the step of screening out timeout transactions from the specified timeout list having a timeout processing timestamp preceding the third receive timestamp, further comprising:
(1) If the cross-chain transaction is a timeout transaction, triggering the destination chain to roll back the cross-chain transaction when a first processing result aiming at the cross-chain transaction is received, and feeding back a second roll-back receipt after the roll-back is completed;
(2) And when the first rollback receipt and the second rollback receipt are received, marking the state of the cross-chain transaction as a rollback completion state.
If the cross-link transaction processed at this time is a timeout transaction, when a first processing result aiming at the cross-link transaction is received, triggering the target link to roll back the cross-link transaction, and feeding back a second roll-back receipt after the roll-back is completed. The service contracts of the destination chain also have corresponding methods for processing rolled-back transactions, such as transfer contracts for transferring money for restoring the amount deducted in the account when the transaction is initiated.
Specifically, when the first rollback receipt and the second rollback receipt are received, the source chain and the destination chain are described as being rollback completed for the same cross-chain transaction, and the state of the cross-chain transaction is marked as a rollback completion state.
In some embodiments, if the cross-chain transaction is a timeout transaction, when a first processing result for the cross-chain transaction is received, triggering the destination chain to rollback the cross-chain transaction includes:
(1.1) if the cross-chain transaction is a timeout transaction, when a first processing result aiming at the cross-chain transaction is received, sending error reporting information to the target chain, wherein the error reporting information is used for prompting the state of the cross-chain transaction of the target chain to be a rollback state;
And (1.2) triggering the destination chain to roll back the cross-chain transaction when the error reporting information is received, and feeding back a second roll-back receipt after the roll-back is completed.
The cross-link transaction processed at this time is determined to be a timeout transaction, then the cross-link transaction is marked as a rollback status, and error reporting information can be generated based on the rollback status, so as to prompt that the target link cannot continue to execute due to the timeout when the cross-link transaction is determined to be the rollback status, and the target link is required to rollback for the cross-link transaction.
In some embodiments, the step of clearing the specified timeout list and the timeout processing timestamp corresponding to the cross-link transaction and sending the first processing result to the source chain includes:
and clearing the cross-link transaction and the overtime processing time stamp corresponding to the cross-link transaction in the appointed overtime list, marking the state of the cross-link transaction as a processing completion state, and sending the first processing result to the source chain.
If the processing of the cross-link transaction is not overtime, the state of the cross-link transaction can be marked as the processing completion state.
As can be seen from the foregoing, in the embodiment of the present application, a processing request for processing a cross-link transaction by receiving a request destination chain sent by a source chain records a first receiving timestamp for receiving the processing request, where the processing request carries the cross-link transaction and a processing duration upper limit value of the cross-link transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the processing result to the source chain. Therefore, when receiving the processing request of each cross-link transaction, the cross-link transaction and the corresponding overtime timestamp are recorded in the appointed overtime list, and the recorded cross-link transaction and the corresponding overtime timestamp are deleted when the processing result of the cross-link transaction is received before the overtime timestamp, so that the processing condition of the transaction is recorded through the appointed overtime list, the overtime transaction caused by the problems of network delay, equipment failure and the like is rapidly inquired, and the transaction processing rate of the relay link is improved.
The methods described in connection with the above embodiments are described in further detail below by way of example.
In this embodiment, description will be given by taking an example in which the blockchain-based cross-chain processing apparatus is specifically integrated in a server, specifically referring to the following description.
Referring to fig. 2a and fig. 2b, fig. 2a is a first signaling flow diagram of a blockchain-based cross-link processing method according to an embodiment of the present application, and fig. 2b is a second signaling flow diagram of a blockchain-based cross-link processing method according to an embodiment of the present application. Fig. 2a is a schematic signaling flow diagram of normal processing (without timeout) for the present cross-link transaction, and fig. 2b is a schematic signaling flow diagram of timeout processing for the present cross-link transaction.
Referring to fig. 2a, the source chain throws out the present cross-link transaction based on the service requirement, and when the cross-link gateway monitors the present cross-link transaction, the cross-link transaction is forwarded to the relay chain, the relay chain records a first receiving timestamp when receiving the cross-link transaction, and records the present cross-link transaction and a corresponding overtime processing timestamp in a specified overtime list; and (3) issuing the present cross-link transaction, and forwarding the cross-link transaction to a corresponding destination link when the cross-link gateway monitors that the relay link has the issued cross-link transaction. And executing corresponding processing by the destination chain to obtain a first processing result, and issuing the first processing result. And the cross-link gateway receives the first processing result and forwards the first processing result to the relay link. When the relay chain receives the first processing result, a second receiving time stamp is recorded, and based on the second receiving time stamp and the time-out processing time stamp of the current cross-chain transaction recorded in the appointed time-out list, the relay chain determines that the processing of the current cross-chain transaction is not time-out and belongs to normal processing, the current cross-chain transaction recorded in the time-out list is correspondingly cleared, and the first processing result is returned to the source chain through the cross-chain gateway, so that the current cross-chain transaction flow is ended.
Referring to fig. 2b, the source chain throws out the present cross-link transaction based on the service requirement, and when the cross-link gateway monitors the present cross-link transaction, the cross-link transaction is forwarded to the relay chain, the relay chain records a first receiving timestamp when receiving the cross-link transaction, and records the present cross-link transaction and a corresponding overtime processing timestamp in a specified overtime list; and (3) issuing the present cross-link transaction, and forwarding the cross-link transaction to a corresponding destination link when the cross-link gateway monitors that the relay link has the issued cross-link transaction. And executing corresponding processing by the destination chain to obtain a first processing result, and issuing the first processing result. In the above process, if the relay link receives the second processing result returned by the destination link based on other cross-link exchanges, the third receiving timestamp is recorded, and the timeout transaction is determined from the specified timeout list based on the third receiving timestamp. If the current cross-link transaction is determined to be the overtime transaction, the relay link triggers the rollback of the source link through the cross-link gateway and marks the state of the current cross-link transaction as the rollback state. After the rollback is finished, the source chain feeds back a first rollback receipt to the relay chain through the cross-chain gateway, so that the source chain side of the relay chain is informed of the completion of rollback. If the relay link receives the first processing result returned by the destination link through the cross-link gateway, the relay link sends an error message to the destination link through the cross-link gateway, and the error message is used for triggering the destination link to roll back for the cross-link transaction because the state of the cross-link transaction is marked as a roll-back state. And after the destination chain rollback is finished, feeding back a second rollback receipt to the relay chain through the cross-chain gateway, and informing the completion of the destination chain side rollback of the relay chain. After the relay link receives the first rollback receipt and the second rollback receipt, it can be determined that the source chain side and the destination chain side are rollback and complete for the current cross-chain transaction, and the current cross-chain transaction flow is ended.
As can be seen from the foregoing, in the embodiment of the present application, a processing request for processing a cross-link transaction by receiving a request destination chain sent by a source chain records a first receiving timestamp for receiving the processing request, where the processing request carries the cross-link transaction and a processing duration upper limit value of the cross-link transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the processing result to the source chain. Therefore, when receiving the processing request of each cross-link transaction, the cross-link transaction and the corresponding overtime timestamp are recorded in the appointed overtime list, and the recorded cross-link transaction and the corresponding overtime timestamp are deleted when the processing result of the cross-link transaction is received before the overtime timestamp, so that the processing condition of the transaction is recorded through the appointed overtime list, the overtime transaction caused by the problems of network delay, equipment failure and the like is rapidly inquired, and the transaction processing rate of the relay link is improved.
In order to facilitate better implementation of the blockchain-based cross-chain processing method provided by the embodiment of the application, the embodiment of the application also provides a device based on the blockchain-based cross-chain processing method. Where nouns have the same meaning as in the blockchain-based cross-chain processing method described above, reference may be made to the description of the method embodiments for specific implementation details.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a blockchain-based cross-chain processing device according to an embodiment of the present application, where the blockchain-based cross-chain processing device may include a first receiving module 301, a determining module 302, a triggering module 303, a second receiving module 304, a clearing module 305, and the like.
The first receiving module 301 is configured to receive a processing request sent by a source chain and used for requesting a destination chain to process a cross-link transaction, record a first receiving timestamp for receiving the processing request, where the processing request carries the cross-link transaction and an upper limit value of a processing duration of the cross-link transaction;
a determining module 302, configured to determine a timeout processing timestamp of the cross-link transaction based on the first receiving timestamp and the upper limit value of the processing duration, and record the cross-link transaction and the timeout processing timestamp corresponding to the cross-link transaction in a specified timeout list;
The triggering module 303 is configured to send the cross-link transaction to a destination chain, and trigger the destination chain to feed back a first processing result after the cross-link transaction is processed;
a second receiving module 304, configured to record, when a first processing result for the cross-chain transaction is received, a second receiving timestamp for receiving the first processing result;
and a clearing module 305, configured to clear the cross-link transaction in the specified timeout list and the timeout processing timestamp corresponding to the cross-link transaction if the second receiving timestamp is located before the timeout processing timestamp, and send the first processing result to the source link.
In some embodiments, the apparatus further comprises:
the recording module is used for recording a third receiving time stamp for receiving the second processing result when receiving the second processing result aiming at other cross-chain transactions;
a screening module, configured to screen the specified timeout list for a timeout transaction whose timeout processing timestamp is located before the third receiving timestamp;
the first triggering module is used for returning the overtime transaction to the source chain corresponding to each overtime transaction, triggering the source chain to roll back the overtime transaction, feeding back a first roll-back receipt after the roll-back is completed, and marking the state of the overtime transaction as the roll-back state.
In some embodiments, the first trigger module includes:
the first determining submodule is used for acquiring source chains corresponding to each overtime transaction and determining overtime transactions with the same source chains;
and the first triggering submodule is used for returning the overtime transactions with the same source chain to the corresponding source chain, and triggering the source chain to roll back the overtime transactions.
In some embodiments, the apparatus further comprises:
the second triggering module is used for triggering the destination chain to roll back the cross-chain transaction when a first processing result aiming at the cross-chain transaction is received if the cross-chain transaction is a timeout transaction, and feeding back a second roll-back receipt after the roll-back is completed;
and the first marking module is used for marking the state of the cross-chain transaction as a rollback completion state when the first rollback receipt and the second rollback receipt are received.
In some embodiments, the second trigger module includes:
the sending sub-module is used for sending error reporting information to the target chain when a first processing result aiming at the cross-chain transaction is received if the cross-chain transaction is a timeout transaction, wherein the error reporting information is used for prompting the state of the cross-chain transaction of the target chain to be a rollback state;
And the second triggering sub-module is used for triggering the destination chain to roll back the cross-chain transaction when the error reporting information is received, and feeding back a second roll-back receipt after the roll-back is completed.
In some embodiments, the determining module 302 includes:
the calculating sub-module is used for calculating the sum of the first receiving time stamp and the processing time length to obtain a calculation result;
and the second determining submodule is used for determining the calculation result as a timeout processing time stamp of the cross-chain transaction.
In some embodiments, the purge module 305 includes:
the clearing sub-module is used for clearing the cross-link transaction and the overtime processing time stamp corresponding to the cross-link transaction in the appointed overtime list, marking the state of the cross-link transaction as a processing completion state and sending the first processing result to the source chain.
As can be seen from the foregoing, in the embodiment of the present application, a first receiving module 301 receives, from a source chain, a processing request for processing a cross-link transaction by a request destination chain, and records a first receiving timestamp for receiving the processing request, where the processing request carries the cross-link transaction and a processing duration upper limit value of the cross-link transaction; the determining module 302 determines a timeout processing timestamp of the cross-link transaction based on the first receiving timestamp and the upper limit value of the processing duration, and records the cross-link transaction and the timeout processing timestamp corresponding to the cross-link transaction in a specified timeout list; the triggering module 303 sends the cross-link transaction to a destination chain, and triggers the destination chain to feed back a first processing result after the cross-link transaction is processed; the second receiving module 304 records a second receiving timestamp of the first processing result when the first processing result for the cross-chain transaction is received; the clearing module 305 clears the cross-link transaction and the timeout processing timestamp corresponding to the cross-link transaction in the specified timeout list if the second receiving timestamp is located before the timeout processing timestamp, and sends the first processing result to the source link. Therefore, when receiving the processing request of each cross-link transaction, the cross-link transaction and the corresponding overtime timestamp are recorded in the appointed overtime list, and the recorded cross-link transaction and the corresponding overtime timestamp are deleted when the processing result of the cross-link transaction is received before the overtime timestamp, so that the processing condition of the transaction is recorded through the appointed overtime list, the overtime transaction caused by the problems of network delay, equipment failure and the like is rapidly inquired, and the transaction processing rate of the relay link is improved.
Correspondingly, the embodiment of the application also provides a server. As shown in fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application. The server 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. It will be appreciated by those skilled in the art that the server architecture shown in the figures is not limiting of the server and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
The processor 401 is a control center of the server 400, connects respective portions of the entire server 400 using various interfaces and lines, and performs various functions of the server 400 and processes data by running or loading software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the server 400.
In the embodiment of the present application, the processor 401 in the server 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions:
Receiving a processing request which is sent by a source chain and used for processing a cross-chain transaction by a request destination chain, recording a first receiving timestamp of the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the first processing result to the source chain.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 4, the server 400 further includes: an input unit 403 and a power supply 404. The processor 401 is electrically connected to the input unit 403 and the power supply 404, respectively. Those skilled in the art will appreciate that the server architecture shown in fig. 4 is not limiting of the server and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
In the present embodiment, the input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 404 is used to power the various components of the server 400. Alternatively, the power supply 404 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 404 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the above, in the server provided in this embodiment, a processing request for processing a cross-link transaction by a request destination chain sent by a source chain is received, and a first receiving timestamp for receiving the processing request is recorded, where the processing request carries the cross-link transaction and a processing duration upper limit value of the cross-link transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the processing result to the source chain. Therefore, when receiving the processing request of each cross-link transaction, the cross-link transaction and the corresponding overtime timestamp are recorded in the appointed overtime list, and the recorded cross-link transaction and the corresponding overtime timestamp are deleted when the processing result of the cross-link transaction is received before the overtime timestamp, so that the processing condition of the transaction is recorded through the appointed overtime list, the overtime transaction caused by the problems of network delay, equipment failure and the like is rapidly inquired, and the transaction processing rate of the relay link is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the data processing methods provided by the embodiments of the present application. For example, the computer program may perform the steps of:
receiving a processing request which is sent by a source chain and used for processing a cross-chain transaction by a request destination chain, recording a first receiving timestamp of the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction; determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list; the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed; recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received; and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the processing result to the source chain.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the computer program stored in the storage medium may execute steps in any of the data processing methods provided in the embodiments of the present application, the beneficial effects that any of the blockchain-based cross-chain processing methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
The above describes in detail a blockchain-based cross-link processing method, device, storage medium and server provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the above description of the embodiments is only used to help understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.
Claims (10)
1. A blockchain-based cross-chain processing method, comprising:
receiving a processing request which is sent by a source chain and used for processing a cross-chain transaction by a request destination chain, recording a first receiving timestamp of the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction;
determining a timeout processing time stamp of the cross-chain transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-chain transaction and the timeout processing time stamp corresponding to the cross-chain transaction in a specified timeout list;
the cross-link transaction is sent to a target link, and the target link is triggered to feed back a first processing result after the cross-link transaction is processed;
recording a second reception timestamp of reception of a first processing result for the cross-chain transaction when the first processing result is received;
and if the second receiving timestamp is positioned before the overtime processing timestamp, clearing the cross-link transaction in the appointed overtime list and the overtime processing timestamp corresponding to the cross-link transaction, and sending the first processing result to the source chain.
2. The blockchain-based cross-chain processing method of claim 1, further comprising, after the step of recording the cross-chain transaction and the timeout processing timestamp corresponding to the cross-chain transaction in a specified timeout list:
recording a third receiving timestamp for receiving a second processing result when receiving processing requests for other cross-link transactions or receiving the second processing result for other cross-link transactions;
screening out the overtime transaction with the overtime processing time stamp positioned before the third receiving time stamp from the appointed overtime list, and marking the state of the overtime transaction as a rollback state;
and returning the overtime transaction to the source chain corresponding to each overtime transaction, triggering the source chain to roll back the overtime transaction, and feeding back a first roll-back receipt after the roll-back is completed.
3. The blockchain-based cross-chain processing method of claim 2, wherein the step of returning the timeout transaction to the source chain corresponding to each timeout transaction, triggering the source chain to rollback the timeout transaction, comprises:
acquiring source chains corresponding to each overtime transaction, and determining overtime transactions with the same source chains;
And returning the overtime transactions with the same source chains to the corresponding source chains, and triggering the source chains to roll back the overtime transactions.
4. The blockchain-based cross-chain processing method of claim 2, further comprising, after the step of screening out timeout transactions from the specified timeout list that have a timeout processing timestamp preceding the third receive timestamp:
if the cross-chain transaction is a timeout transaction, triggering the destination chain to roll back the cross-chain transaction when a first processing result aiming at the cross-chain transaction is received, and feeding back a second roll-back receipt after the roll-back is completed;
and when the first rollback receipt and the second rollback receipt are received, marking the state of the cross-chain transaction as a rollback completion state.
5. The blockchain-based cross-chain processing method of claim 3, wherein if the cross-chain transaction is a timeout transaction, triggering the destination chain to rollback the cross-chain transaction when a first processing result for the cross-chain transaction is received, comprising:
if the cross-link transaction is a timeout transaction, when a first processing result aiming at the cross-link transaction is received, sending error reporting information to the target link, wherein the error reporting information is used for prompting the state of the cross-link transaction of the target link to be a rollback state;
And triggering the destination chain to roll back the cross-chain transaction when the error reporting information is received, and feeding back a second roll-back receipt after the roll-back is completed.
6. The blockchain-based cross-chain processing method of any of claims 1-5, wherein the step of determining a timeout processing timestamp for the cross-chain transaction based on the first receive timestamp and the processing duration upper limit comprises:
calculating the sum of the first receiving time stamp and the processing time length to obtain a calculation result;
and determining the calculation result as a timeout processing timestamp of the cross-chain transaction.
7. The blockchain-based cross-chain processing method of any of claims 1-5, wherein the step of clearing the cross-chain transaction and the timeout processing timestamp corresponding to the cross-chain transaction in the specified timeout list and sending the first processing result to the source chain comprises:
and clearing the cross-link transaction and the overtime processing time stamp corresponding to the cross-link transaction in the appointed overtime list, marking the state of the cross-link transaction as a processing completion state, and sending the first processing result to the source chain.
8. A blockchain-based cross-chain processing device, comprising:
the first receiving module is used for receiving a processing request which is sent by a source chain and used for requesting a destination chain to process the cross-chain transaction, recording a first receiving time stamp for receiving the processing request, wherein the processing request carries the cross-chain transaction and the upper limit value of the processing time length of the cross-chain transaction;
the determining module is used for determining a timeout processing time stamp of the cross-link transaction based on the first receiving time stamp and the upper limit value of the processing time length, and recording the cross-link transaction and the timeout processing time stamp corresponding to the cross-link transaction in a specified timeout list;
the triggering module is used for sending the cross-link transaction to a destination chain and triggering the destination chain to feed back a first processing result after the cross-link transaction is processed;
a second receiving module, configured to record a second receiving timestamp of receiving a first processing result for the cross-chain transaction when the first processing result is received;
and the clearing module is used for clearing the cross-link transaction in the appointed timeout list and the timeout processing time stamp corresponding to the cross-link transaction if the second receiving time stamp is positioned before the timeout processing time stamp, and sending the processing result to the source chain.
9. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the blockchain-based cross-chain processing method of any of claims 1 to 7.
10. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps in the blockchain-based cross-chain processing method of any of claims 1 to 7 when the program is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111633303.3A CN114363416B (en) | 2021-12-29 | 2021-12-29 | Cross-chain processing method and device based on block chain, storage medium and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111633303.3A CN114363416B (en) | 2021-12-29 | 2021-12-29 | Cross-chain processing method and device based on block chain, storage medium and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114363416A CN114363416A (en) | 2022-04-15 |
CN114363416B true CN114363416B (en) | 2024-01-23 |
Family
ID=81104243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111633303.3A Active CN114363416B (en) | 2021-12-29 | 2021-12-29 | Cross-chain processing method and device based on block chain, storage medium and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114363416B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372254A (en) * | 2016-09-28 | 2017-02-01 | 广州华多网络科技有限公司 | Business data processing method and device, and terminal |
CN107920120A (en) * | 2017-11-22 | 2018-04-17 | 北京小米移动软件有限公司 | Method for processing business, device and computer-readable recording medium |
CN111698120A (en) * | 2020-06-02 | 2020-09-22 | 浙江大华技术股份有限公司 | Storage node isolation method and device |
CN112714158A (en) * | 2020-12-21 | 2021-04-27 | 东软集团股份有限公司 | Transaction processing method, relay network, cross-link gateway, system, medium, and device |
CN112822181A (en) * | 2020-12-30 | 2021-05-18 | 杭州趣链科技有限公司 | Verification method of cross-chain transaction, terminal device and readable storage medium |
CN113269545A (en) * | 2021-05-26 | 2021-08-17 | 杭州云象网络技术有限公司 | Hash time locking method and system based on cloud cross-chain transfer protocol |
CN113612616A (en) * | 2021-07-27 | 2021-11-05 | 北京沃东天骏信息技术有限公司 | Vehicle communication method and device based on block chain |
CN113760509A (en) * | 2021-08-25 | 2021-12-07 | 北京百度网讯科技有限公司 | Timeout management method and device and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100329127A1 (en) * | 2009-06-30 | 2010-12-30 | Computer Associates Think, Inc. | Network entity self-governing communication timeout management |
-
2021
- 2021-12-29 CN CN202111633303.3A patent/CN114363416B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372254A (en) * | 2016-09-28 | 2017-02-01 | 广州华多网络科技有限公司 | Business data processing method and device, and terminal |
CN107920120A (en) * | 2017-11-22 | 2018-04-17 | 北京小米移动软件有限公司 | Method for processing business, device and computer-readable recording medium |
CN111698120A (en) * | 2020-06-02 | 2020-09-22 | 浙江大华技术股份有限公司 | Storage node isolation method and device |
CN112714158A (en) * | 2020-12-21 | 2021-04-27 | 东软集团股份有限公司 | Transaction processing method, relay network, cross-link gateway, system, medium, and device |
CN112822181A (en) * | 2020-12-30 | 2021-05-18 | 杭州趣链科技有限公司 | Verification method of cross-chain transaction, terminal device and readable storage medium |
CN113269545A (en) * | 2021-05-26 | 2021-08-17 | 杭州云象网络技术有限公司 | Hash time locking method and system based on cloud cross-chain transfer protocol |
CN113612616A (en) * | 2021-07-27 | 2021-11-05 | 北京沃东天骏信息技术有限公司 | Vehicle communication method and device based on block chain |
CN113760509A (en) * | 2021-08-25 | 2021-12-07 | 北京百度网讯科技有限公司 | Timeout management method and device and electronic equipment |
Non-Patent Citations (1)
Title |
---|
一种即时触发的PIT表项老化方法;黄慧群;王雨;兰巨龙;;信息工程大学学报(第02期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114363416A (en) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018228338A1 (en) | Resource transfer method, device, storage medium and computer equipment | |
EP3489825A1 (en) | Method, apparatus and computer readable storage medium for processing service | |
CN112446786A (en) | Abnormal transaction processing method and device, electronic equipment and readable storage medium | |
CN112099935B (en) | Task processing method and device | |
CN103312549A (en) | Transaction management method, device and system | |
CN110880100A (en) | Business approval processing method, device and system | |
CN115174472B (en) | Message forwarding processing method and related device | |
CN111563124A (en) | Operation processing method, device and system based on block chain | |
CN110098979A (en) | A kind of short link message monitor method and device based on block chain | |
CN111652605A (en) | Creation system and creation method for creating cloud service package by public cloud service | |
US20240333819A1 (en) | Call processing method and system, and device | |
CN109191271B (en) | Funds collection method, apparatus, computer device and storage medium | |
CN114363416B (en) | Cross-chain processing method and device based on block chain, storage medium and server | |
CN118200376A (en) | Link switching method, device, equipment and storage medium | |
CN116384993B (en) | Method and system for realizing high consistency of order payment state based on cloud payment center | |
CN109714208A (en) | A kind of equipment is included in method, storage medium and the electronic equipment of network management | |
CN103580951B (en) | Output comparative approach, test migration householder method and the system of multiple information systems | |
JP4516594B2 (en) | Message transmission control method, message transmission control device, and message transmission control program | |
CN111190754A (en) | Block chain event notification method and block chain system | |
CN115643271A (en) | Method, device, server and medium for synchronizing multi-application data on cloud | |
CN114298700A (en) | Block chain transaction method and device, terminal equipment and computer readable storage medium | |
CN110349357B (en) | Remote automatic counting system, device and method based on terminal instruction forwarding | |
CN115987858A (en) | Pressure testing method of block chain network and related equipment | |
CN113177052A (en) | Method and device for processing service data consistency of distributed system | |
CN110458701A (en) | A kind of data processing method, device, block chain node device and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |