Block chain transaction asynchronous processing and fault retry method and transaction middleware

Through the asynchronous processing and fault retry methods of blockchain transactions, the problems of slow processing speed and complex fault retry are solved, asynchronous processing and automatic retry are realized, multi-condition query is supported, and the efficiency of the business system is improved. and stability.

CN119048237APending Publication Date: 2024-11-29欧冶云商股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411177244.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The slow processing speed of blockchain transactions leads to inefficiency of the business system. When the underlying platform of blockchain fails, the business system needs to manually retry the transaction request, which increases development complexity and workload, and the key-value storage cannot meet multi-condition query need.

Method used

Design a method for asynchronous processing and fault retry of blockchain transactions. By receiving blockchain transaction requests, adding them to the queue and processing asynchronously, querying the transaction results of the underlying blockchain platform regularly, and automatically retrying them when timeouts. Supports multi-condition query.

Benefits of technology

It realizes asynchronous processing of the business system, reduces development difficulty and workload, improves transaction processing efficiency, supports flexible query, automatic fault retry, and improves system stability and query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048237A_ABST
    Figure CN119048237A_ABST
Patent Text Reader

Abstract

The invention relates to a block chain transaction asynchronous processing and fault retry method and transaction middleware. The method comprises the following steps: receiving a block chain transaction request of a business system; adding the information to a block chain transaction data table and a transaction request queue, and returning receiving confirmation information to the business system; continuously and circularly processing the block chain transaction requests in the transaction request queue, and adding the block chain transaction requests into a transaction request to-be-completed data table; regularly querying and obtaining a new output block, analyzing a processed transaction list in the block, sending a transaction processing result to a business system, and updating a block chain transaction data table and a transaction request to-be-completed data table; and periodically querying the block chain transaction requests in the transaction request to-be-completed data table, taking out the block chain transaction requests which are not completed overtime, and adding the block chain transaction requests into the transaction request queue again for transaction request retry. Compared with the prior art, the method has the advantages of asynchronous processing, automatic fault detection and retry and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain transaction asynchronous processing and fault retry method and transaction middleware. Background Art

[0002] Blockchain is the underlying infrastructure of the digital economy and a typical collaborative technology that can improve collaboration efficiency, optimize business processes, reduce operating costs, and reduce the trust costs of multi-party collaboration and related transaction frictions.

[0003] Blockchain technology is a decentralized, tamper-proof, secure and reliable distributed ledger technology. It combines distributed storage, peer-to-peer transmission, consensus mechanism, cryptography and other technologies to record transaction data through growing data blocks to ensure the security and transparency of transaction data. Transactions in the blockchain network need to be confirmed, verified, packaged and recorded in blocks by multiple nodes, so the transaction processing speed is relatively slow. The Bitcoin network generates a new block approximately every 10 minutes, the average block time of Ethereum is about 15 seconds, and the block time of the alliance blockchain can be as short as a few seconds.

[0004] After the business system, as the requester, sends the blockchain transaction request to the underlying blockchain platform for processing, it needs to wait for the underlying blockchain platform to verify the transaction data, reach consensus, execute and generate blocks. These steps take a long time (such as 3 seconds to 10 minutes) to complete. The transaction request can only be processed after all these steps are completed. If the business system waits for the underlying blockchain platform to complete the transaction processing and return the processing result in a synchronous manner after issuing the blockchain transaction request, the long-term waiting in the synchronous manner will cause the efficiency of the business system to process blockchain transaction-related functions to be very low. In addition, when the underlying blockchain platform encounters hardware, software, or network failures, the blockchain transaction execution will fail. At this time, the business system is also responsible for resending the transaction request after the transaction execution fails, which brings complex transaction failure detection and retry function development work. The underlying blockchain platform usually uses key-value storage to save transaction data, and only supports accurate matching query of transaction data and transaction results according to the blockchain transaction hash value. It does not support multi-condition matching query, which makes it difficult to meet the flexible query requirements of the business system. Summary of the invention

[0005] The purpose of the present invention is to provide a blockchain transaction asynchronous processing and fault retry method and transaction middleware that realizes asynchronous processing and fault retry to reduce the development difficulty and workload of the business system.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A blockchain transaction asynchronous processing and fault retry method, comprising the following steps:

[0008] S1. Receive a blockchain transaction request from a business system, wherein the blockchain transaction request includes a callback notification address;

[0009] S2. Add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return receipt confirmation information of the blockchain transaction request to the business system;

[0010] S3, continuously looping and processing the blockchain transaction requests in the transaction request queue, and adding the blockchain transaction requests to a transaction request pending data table;

[0011] S4. Regularly query and obtain new output blocks and parse out the list of completed transactions in the blocks. Based on the transaction list, send the transaction processing results to the business system according to the callback notification address, and update the blockchain transaction data table and the transaction request pending data table;

[0012] S5. Periodically query the blockchain transaction requests in the transaction request to be completed data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.

[0013] Furthermore, the blockchain transaction data table defines the blockchain transaction data table and its business field name, business field data type, business field data length, and whether the business field data value can be empty in the database according to the blockchain transaction request type, and also includes application code, request number, request time, callback notification address, contract address, transaction processing status, transaction processing result, transaction processing completion time, block height, block time and blockchain transaction hash.

[0014] Furthermore, in step S2, the step of adding the blockchain transaction request to the blockchain transaction data table and the transaction request queue includes:

[0015] Determine whether an error occurs in the business field name, business field data type, business field data length, and whether the business field data value can be empty in the blockchain transaction request. If so, return an error message indicating that the blockchain transaction request parameters are incorrect to the business system. If not, add the blockchain transaction request to the blockchain transaction data table.

[0016] Add the blockchain transaction request to the transaction request queue.

[0017] Furthermore, the specific steps of step S3 include:

[0018] Continuously looping and processing the blockchain transaction requests in the transaction request queue, constructing a blockchain transaction raw_transaction according to the blockchain transaction request, sending the blockchain transaction to the blockchain underlying platform to asynchronously perform transaction verification, consensus, packaging and processing, and adding the blockchain transaction request to the transaction request pending data table, and removing the blockchain transaction request from the transaction request queue;

[0019] Among them, in the process of adding the blockchain transaction request to the transaction request pending data table, the transaction request pending data table is first queried to determine whether the blockchain transaction request exists in the transaction request pending data table. If not, the blockchain transaction request is added to the transaction request pending data table. If so, the transaction request pending data table is updated according to the blockchain transaction request.

[0020] Furthermore, the transaction request to be completed data table is queried according to the business primary key set in the transaction request to be completed data table, and the business primary key includes the transaction request type, application code and request number.

[0021] Furthermore, the specific steps of step S4 include:

[0022] S41. According to the block generation interval of the underlying blockchain platform, query and obtain the newly generated blocks regularly and parse the list of completed transactions in the blocks;

[0023] S42. Based on the transaction list, send the transaction processing result to the business system according to the callback notification address in the blockchain transaction request;

[0024] S43. Based on the transaction list, find the corresponding blockchain transaction request from the blockchain transaction data table, and update the transaction processing status, transaction processing result, transaction processing completion time, block height, block time and blockchain transaction hash;

[0025] S44. Based on the transaction list, remove the corresponding blockchain transaction request from the transaction request pending data table;

[0026] S45. Return to step S41 and continue to regularly query and process new output blocks and completed transactions on the underlying blockchain platform.

[0027] Furthermore, the specific steps of step S5 include:

[0028] S51. Periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval to find the blockchain transaction requests that have timed out and are not completed;

[0029] S52: Check the current queue length of the transaction request queue, and add the timed-out and uncompleted blockchain transaction request to the transaction request queue for transaction request retry according to the current queue length;

[0030] S53. Return to step S51 and continue to periodically query and process blockchain transaction requests that have timed out and are not completed.

[0031] Furthermore, the specific steps of step S52 include:

[0032] S521. If the current queue length of the transaction request queue is less than the retryable queue length limit, re-add the timed-out and unfinished blockchain transaction request to the transaction request queue, and remove the timed-out and unfinished blockchain transaction request from the transaction request pending data table;

[0033] S522: If the current queue length of the transaction request queue is greater than or equal to the retryable queue length limit, the process is suspended for a period of time, and then returns to step S521 to continue processing the timed-out and incomplete blockchain transaction request.

[0034] Furthermore, the method further comprises the following steps:

[0035] Obtain multi-condition combination query requests for blockchain transaction requests and transaction processing results of business systems;

[0036] Based on the query request, a multi-condition combination query is performed on the blockchain transaction data table, and the query result is returned to the business system.

[0037] This embodiment also provides a blockchain transaction middleware, including:

[0038] Receiving module: used to receive blockchain transaction requests from business systems;

[0039] Adding module: used to add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return the receipt confirmation information of the blockchain transaction request to the business system, wherein the business system does not need to wait for the return of the transaction processing result in a synchronous manner;

[0040] Processing module: used for continuously and cyclically processing the blockchain transaction requests in the transaction request queue, and adding the blockchain transaction requests to the transaction request pending data table;

[0041] Update module: used to query and obtain new output blocks regularly and parse the list of completed transactions in the blocks, send the transaction processing results to the business system based on the transaction list, and update the blockchain transaction data table and the transaction request pending data table;

[0042] Retry module: used to periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] (1) The blockchain transaction request of the method of the present invention includes a callback notification address. After the business system sends the blockchain transaction request, it does not need to wait for the return of the transaction processing result in a synchronous manner, but can process other business functions, thereby realizing the asynchronous processing function with the business system. The method of the present invention receives the blockchain transaction request, processes the transaction, and sends the transaction execution result to the business system through the callback notification address after completion. If there is a problem with the software, hardware, or network of the blockchain underlying platform, the blockchain transaction middleware will automatically detect the timeout and unprocessed transaction request and automatically retry, without the need for the business system to perform fault detection and retry, which significantly reduces the development difficulty and development workload of the business system using blockchain technology and the blockchain underlying platform.

[0045] (2) In the method of the present invention, after receiving the blockchain transaction request from the business system, the transaction request is first inserted into the blockchain transaction data table according to the transaction request type. If the transaction request parameters are abnormal, an error message will be inserted into the transaction data table, and the system will directly return the error message of the request parameter error to the requester without retrying. When the blockchain transaction request parameters are normally inserted into the transaction data table, the system adds the transaction request to the transaction request queue. The transaction request queue can quickly receive and record the blockchain transaction request of the business system, without the need for the business system as the requester to continuously wait for the processing result of the transaction request, and supports the system to effectively respond to sudden transaction request peaks.

[0046] (3) The present invention defines a blockchain transaction data table in the database according to the blockchain transaction request type, and defines the name, data type, data length, and whether it can be empty for each transaction request parameter. The blockchain transaction data table supports persistent storage and parameter verification of transaction requests, and supports flexible and fast multi-condition combination queries of transaction requests and transaction results as cache data. A blockchain transaction data table is established for each blockchain transaction request type, and the blockchain transaction data is isolated and protected by sub-tables, while improving the query speed of blockchain transaction data.

[0047] (4) In the process of continuously processing the requests in the transaction request queue, the method of the present invention sends a request to the underlying blockchain platform, and at the same time adds the transaction request to be completed in the database. For the transaction request to be completed data table, the transaction request type, application code and request number constitute the business primary key. When the transaction request is added, it is queried according to the business primary key. If it does not exist, a new data record is added. If it exists, the data record is updated to avoid a large number of repeated transaction requests and retry operations during long-term failures. The transaction request to be completed table uses the database to record the pending transaction requests for a long time, which can cope with the accumulation of a large number of transaction requests caused by long-term failures, and can also prevent the pending transaction requests being lost after the blockchain transaction middleware is restarted.

[0048] (5) For the timed-out and unfinished transaction requests in the transaction request pending data table, the blockchain transaction middleware checks the current queue length of the transaction request queue and re-adds the timed-out and unfinished transaction request to the transaction request queue only when the current queue length is less than the preset retry queue length limit, thereby ensuring that newly arrived transaction requests are processed first during peak transaction request periods and are retried only during non-peak transaction request periods. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0050] Figure 2 This is an internal flow chart of a business system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0052] This embodiment provides a blockchain transaction asynchronous processing and fault retry method, which is based on the designed blockchain transaction middleware, such as Figure 2As shown, the blockchain transaction middleware supports the business system to use the asynchronous processing method of blockchain transaction requests to improve the execution efficiency of related functions involving blockchain transactions. The business system needs to include a callback notification address in the blockchain transaction request. After sending the blockchain transaction request to the blockchain transaction middleware, it does not need to wait synchronously for the return of the transaction processing result, but can process other business functions. The blockchain transaction middleware is responsible for receiving transaction requests, processing transactions, and sending the transaction execution results to the business system through the callback address after completion. If there is a problem with the software, hardware, or network of the blockchain underlying platform, the blockchain transaction middleware will automatically detect the timed-out and unprocessed transaction requests and automatically retry them, without the need for the business system to perform fault detection and retry. The blockchain transaction middleware can significantly reduce the development difficulty and workload of business systems using blockchain technology and the underlying blockchain platform. Specifically, combined with Figure 1 and Figure 2 , the method comprises the following steps:

[0053] 1) According to the blockchain transaction request type, the blockchain transaction data table is defined in the database.

[0054] For each transaction request parameter, define the name, data type, data length, and whether it can be empty for the data table field. The blockchain transaction data table also contains the application code, request number, request time, callback notification address, contract address, transaction processing status, transaction processing results, transaction processing completion time, block height, block time, and blockchain transaction hash. The blockchain transaction data table supports persistent storage and parameter verification of transaction requests, and as cache data, supports flexible and fast multi-condition combination queries of transaction requests and transaction results. Create a blockchain transaction data table for each blockchain transaction request type, isolate and protect data through sub-tables, and improve query speed.

[0055] The specific operation of step 1) is as follows:

[0056] 1.1) Create a blockchain transaction data table in the database according to the blockchain transaction request type request_type.

[0057] CREATE TABLE[t_transaction_request_type] (

[0059] app_code VARCHAR(32)NOT NULL DEFAULT"COMMENT'Application code',

[0060] request_no VARCHAR(64)NOT NULL DEFAULT"COMMENT'Request number',

[0061] request_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT'request time',

[0062] callback_address VARCHAR(256)NOT NULL DEFAULT"COMMENT'Transaction processing result callback notification address',

[0063] contract_address VARCHAR(64)NOT NULL DEFAULT"COMMENT'Contract address',

[0064] process_status INT NOT NULL DEFAULT 0 COMMENT 'Transaction processing status',

[0065] process_result JSON NULL DEFAULT NULL COMMENT'Transaction processing result',

[0066] finish_time DATETIME NULL DEFAULT NULL COMMENT'Transaction processing completion time'

[0067] block_height INT NULL DEFAULT NULL COMMENT'Block height',

[0068] block_time DATETIME NULL DEFAULT NULL COMMENT'Block time',

[0069] transaction_hash VARCHAR(256)NULL DEFAULT NULL COMMENT'Blockchain transaction hash',

[0070] column_name_1DATA_TYPE[NULL|NOT NULL]COMMENT'Business field 1',

[0071] column_name_2DATA_TYPE[NULL|NOT NULL]COMMENT'Business field 2', column_name_3DATA_TYPE[NULL|NOT NULL]COMMENT'Business field 3', ....

[0073] column_name_n DATA_TYPE[NULL|NOT NULL]COMMENT'Business field n' )

[0075] 1.2) When saving the transaction request, the subsequent blockchain transaction data table can verify the name, data type, data length and value of the business field to see if it is NULL. If an error occurs, an error message indicating that the blockchain transaction request parameters are incorrect will be given.

[0076] 1.3) The subsequent blockchain transaction data table can be used as cache data to support efficient and flexible multi-condition combination queries of transaction requests and transaction results.

[0077] 2) Receive a blockchain transaction request from the business system, wherein the blockchain transaction request includes a callback notification address, add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return receipt confirmation information of the blockchain transaction request to the business system.

[0078] The specific operation of step 2) is as follows:

[0079] 2.1) After the business system sends a blockchain transaction request to the blockchain transaction middleware, the middleware system adds the transaction request to the corresponding blockchain transaction data table according to the transaction request type request_type.

[0080] 2.2) If the business field name, business field data type, business field data length, or whether the value can be NULL of the transaction request is incorrect, an error will be reported when the transaction request is added to the blockchain transaction data table. The middleware will directly return an error message indicating that the transaction request parameters are incorrect to the business system, and no retry is required.

[0081] 2.3) After the transaction request request can be correctly added to the blockchain transaction data table, the middleware adds the transaction request request to the transaction request queue request_queue, and then returns the transaction request receipt confirmation information to the business system. The transaction request queue request_queue can quickly receive and record a large number of transaction requests from the business system during peak hours, and then the middleware processes the transaction requests in turn to achieve the effect of peak shaving and valley filling and stable operation.

[0082] 2.4) After the business system receives the confirmation information of the transaction request from the middleware, it does not need to wait for the completion result of the transaction request and can continue to process other things.

[0083] 3) Continuously process the blockchain transaction requests in the transaction request queue in a loop, and add the blockchain transaction requests to the transaction request pending data table.

[0084] The specific operation of step 3) is as follows:

[0085] 3.1) The blockchain transaction middleware reads the blockchain transaction request request at the head of the queue from the transaction request queue request_queue, constructs the blockchain transaction raw_transaction according to the request, and sends the blockchain transaction to the underlying blockchain platform to asynchronously perform transaction verification, consensus, packaging and processing.

[0086] 3.2) The blockchain transaction middleware adds the transaction request request to the blockchain transaction request pending data table t_request_in_process in the database. The transaction request type request_type, application code app_code and request number request_no in the transaction request pending data table t_request_in_process form the business primary key. When the transaction request request is added to the transaction request pending table, the transaction request pending table t_request_in_process is first queried according to the business primary key. If the transaction request data does not exist, the transaction request data is added, otherwise the transaction request data is updated to avoid a large number of duplicate transaction requests in the transaction request pending data table during a long-term failure. When adding or updating a transaction request in the t_request_in_process table, the processing start time process_start_time needs to be updated. The transaction request pending data table t_request_in_process uses the database to persist the pending transaction requests, which can cope with the accumulation of a large number of transaction requests caused by long-term failures, and can also not lose the pending transaction requests in processing after the middleware is restarted.

[0087] 3.3) The blockchain transaction middleware removes the blockchain transaction request request from the transaction request queue request_queue.

[0088] 3.4) Return to step 3.1) and continue to process the next blockchain transaction request in the transaction request queue request_queue.

[0089] 4) Regularly query and obtain the new output blocks of the underlying blockchain platform and parse the transaction list transaction that has been processed in the block. Based on the transaction list transaction, send the transaction processing result to the business system according to the callback notification address, and update the blockchain transaction data table and the transaction request pending data table.

[0090] The specific operation of step 4) is as follows:

[0091] 4.1) The blockchain transaction middleware periodically queries and obtains new output blocks according to the block generation interval of the underlying blockchain platform and parses the list of completed transactions in the block.

[0092] 4.2) Take out transactions from the transaction list one by one, and send the transaction processing results to the business system according to the callback notification address callback_address.

[0093] 4.3) For blockchain transactions, find the corresponding transaction request in the blockchain transaction data table, and update the transaction processing status, transaction processing results, transaction processing completion time, block height, block time and blockchain transaction hash.

[0094] 4.4) For blockchain transaction, remove the corresponding transaction request from the transaction request pending table t_request_in_process.

[0095] 4.5) Return to step 4.2) and continue processing the next completed transaction in the transaction list.

[0096] 4.6) Return to step 4.1) and continue to regularly query and process the newly generated blocks and completed transactions of the underlying blockchain platform.

[0097] 5) Periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.

[0098] The specific operation of step 5) is as follows:

[0099] 5.1) The blockchain transaction middleware periodically queries the transaction request pending data table t_request_in_process according to the timeout check interval delay_check_period, and finds the delayed_request list of timed-out unfinished requests.

[0100] 5.2) Take out delayed_request from the delayed_request list of timed-out and unfinished requests one by one.

[0101] 5.3) Get the current queue length queue_length of the transaction request queue request_queue. If queue_length is less than the retry queue length limit allow_retry_queue_length, the middleware will re-add delayed_request to the transaction request queue and remove the delayed_request from t_request_in_process. This ensures that newly received business system transaction requests are processed first during business peak hours, and transaction timeout retries are only performed during non-business peak hours.

[0102] 5.4) Get the current queue length queue_length of the transaction request queue request_queue. If queue_length is greater than or equal to the retry queue length limit allow_retry_queue_length, sleep for a while, and then return to step 5.3) to continue processing the timed-out unfinished request delayed_request.

[0103] 5.5) Return to step 5.2) and continue to process the next timed-out uncompleted request delayed_request in the delayed_request list.

[0104] 5.6) Return to step 5.1) and continue to periodically query and process blockchain transaction requests that have timed out and are not completed.

[0105] 6) The blockchain transaction middleware obtains the blockchain transaction request of the business system and the multi-condition combination query request of the transaction processing result, performs a multi-condition combination query on the blockchain transaction data table, and returns the query result to the business system, solving the problem that the key-value database (Key-Value database) of the underlying blockchain platform can only query transaction data according to the primary key Key.

[0106] In summary, the method realizes asynchronous processing and fault retry of transactions through blockchain transaction middleware, and the blockchain transaction middleware includes the following:

[0107] Receiving module: used to receive blockchain transaction requests from business systems;

[0108] Adding module: used to add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return the receipt confirmation information of the blockchain transaction request to the business system, wherein the business system does not need to wait for the return of the transaction processing result in a synchronous manner;

[0109] Processing module: used for continuously and cyclically processing the blockchain transaction requests in the transaction request queue, and adding the blockchain transaction requests to the transaction request pending data table;

[0110] Update module: used to query and obtain new output blocks regularly and parse the list of completed transactions in the blocks, send the transaction processing results to the business system based on the transaction list, and update the blockchain transaction data table and the transaction request pending data table;

[0111] Retry module: used to periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.

[0112] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0113] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A blockchain transaction asynchronous processing and fault retry method, characterized in that: The following steps are involved: S1. Receive a blockchain transaction request from a business system, wherein the blockchain transaction request includes a callback notification address; S2. Add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return receipt confirmation information of the blockchain transaction request to the business system; S3, continuously looping and processing the blockchain transaction requests in the transaction request queue, and adding the blockchain transaction requests to a transaction request pending data table; S4. Regularly query and obtain new output blocks and parse out the list of completed transactions in the blocks. Based on the transaction list, send the transaction processing results to the business system according to the callback notification address, and update the blockchain transaction data table and the transaction request pending data table; S5. Periodically query the blockchain transaction requests in the transaction request to be completed data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.

2. A blockchain transaction asynchronous processing and fault retry method according to claim 1, characterized in that: According to the blockchain transaction request type, the blockchain transaction data table and its business field name, business field data type, business field data length, and whether the business field data value can be empty are defined in the database. It also includes application code, request number, request time, callback notification address, contract address, transaction processing status, transaction processing result, transaction processing completion time, block height, block time, and blockchain transaction hash.

3. A blockchain transaction asynchronous processing and fault retry method according to claim 2, characterized in that: In step S2, the step of adding the blockchain transaction request to the blockchain transaction data table and the transaction request queue includes: Determine whether an error occurs in the business field name, business field data type, business field data length, and whether the business field data value can be empty in the blockchain transaction request. If so, return an error message indicating that the blockchain transaction request parameters are incorrect to the business system. If not, add the blockchain transaction request to the blockchain transaction data table. Add the blockchain transaction request to the transaction request queue.

4. A blockchain transaction asynchronous processing and fault retry method according to claim 1, characterized in that: The specific steps of step S3 include: Continuously looping and processing the blockchain transaction requests in the transaction request queue, constructing a blockchain transaction raw_transaction according to the blockchain transaction request, sending the blockchain transaction to the blockchain underlying platform to asynchronously perform transaction verification, consensus, packaging and processing, and adding the blockchain transaction request to the transaction request pending data table, and removing the blockchain transaction request from the transaction request queue; Among them, in the process of adding the blockchain transaction request to the transaction request pending data table, the transaction request pending data table is first queried to determine whether the blockchain transaction request exists in the transaction request pending data table. If not, the blockchain transaction request is added to the transaction request pending data table. If so, the transaction request pending data table is updated according to the blockchain transaction request.

5. A blockchain transaction asynchronous processing and fault retry method according to claim 4, characterized in that: The transaction request to be completed data table is queried according to the business primary key set in the transaction request to be completed data table, and the business primary key includes the transaction request type, application code and request number.

6. A blockchain transaction asynchronous processing and fault retry method according to claim 1, characterized in that: The specific steps of step S4 include: S41. According to the block generation interval of the underlying blockchain platform, query and obtain the newly generated blocks regularly and parse the list of completed transactions in the blocks; S42. Based on the transaction list, send the transaction processing result to the business system according to the callback notification address in the blockchain transaction request; S43. Based on the transaction list, find the corresponding blockchain transaction request from the blockchain transaction data table, and update the transaction processing status, transaction processing result, transaction processing completion time, block height, block time and blockchain transaction hash; S44. Based on the transaction list, remove the corresponding blockchain transaction request from the transaction request pending data table; S45. Return to step S41 and continue to regularly query and process new output blocks and completed transactions on the underlying blockchain platform.

7. A blockchain transaction asynchronous processing and fault retry method according to claim 1, characterized in that: The specific steps of step S5 include: S51. Periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval to find the blockchain transaction requests that have timed out and are not completed; S52: Check the current queue length of the transaction request queue, and add the timed-out and uncompleted blockchain transaction request to the transaction request queue for transaction request retry according to the current queue length; S53. Return to step S51 and continue to periodically query and process blockchain transaction requests that have timed out and are not completed.

8. A blockchain transaction asynchronous processing and fault retry method according to claim 7, characterized in that: The specific steps of step S52 include: S521. If the current queue length of the transaction request queue is less than the retryable queue length limit, re-add the timed-out and unfinished blockchain transaction request to the transaction request queue, and remove the timed-out and unfinished blockchain transaction request from the transaction request pending data table; S522: If the current queue length of the transaction request queue is greater than or equal to the retryable queue length limit, the process is suspended for a period of time, and then returns to step S521 to continue processing the timed-out and incomplete blockchain transaction request.

9. A blockchain transaction asynchronous processing and fault retry method according to claim 1, characterized in that: The following steps are also included: Obtain multi-condition combination query requests for blockchain transaction requests and transaction processing results of business systems; Based on the query request, a multi-condition combination query is performed on the blockchain transaction data table, and the query result is returned to the business system.

10. A blockchain transaction middleware, characterized in that: include: Receiving module: used to receive blockchain transaction requests from business systems; Adding module: used to add the blockchain transaction request to the blockchain transaction data table and the transaction request queue, and return the receipt confirmation information of the blockchain transaction request to the business system, wherein the business system does not need to wait for the return of the transaction processing result in a synchronous manner; Processing module: used for continuously and cyclically processing the blockchain transaction requests in the transaction request queue, and adding the blockchain transaction requests to the transaction request pending data table; Update module: used to query and obtain new output blocks regularly and parse the list of completed transactions in the blocks, send the transaction processing results to the business system based on the transaction list, and update the blockchain transaction data table and the transaction request pending data table; Retry module: used to periodically query the blockchain transaction requests in the transaction request pending data table according to the set timeout check interval, take out the blockchain transaction requests that have timed out and are not completed, and re-add them to the transaction request queue to retry the transaction request.