WO2021114627A1 - Distributed transaction-based data processing method, device, terminal, and storage medium - Google Patents
Distributed transaction-based data processing method, device, terminal, and storage medium Download PDFInfo
- Publication number
- WO2021114627A1 WO2021114627A1 PCT/CN2020/099295 CN2020099295W WO2021114627A1 WO 2021114627 A1 WO2021114627 A1 WO 2021114627A1 CN 2020099295 W CN2020099295 W CN 2020099295W WO 2021114627 A1 WO2021114627 A1 WO 2021114627A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- transaction
- database
- block
- data
- target
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 27
- 238000012795 verification Methods 0.000 claims abstract description 44
- 238000001514 detection method Methods 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 21
- 230000002159 abnormal effect Effects 0.000 claims abstract description 12
- 238000012544 monitoring process Methods 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims description 29
- 238000013500 data storage Methods 0.000 claims description 6
- 230000005856 abnormality Effects 0.000 abstract description 6
- 238000004590 computer program Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012550 audit Methods 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012954 risk control Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
-
- 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
Definitions
- the first aspect of the present application provides a data processing method based on distributed transactions, which is applied to cross-chain operations of blockchains, and the data processing method based on distributed transactions includes:
- a second aspect of the present application provides a terminal, the terminal includes a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
- a third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
- the fourth aspect of the present application provides a data processing device based on distributed transactions, which is applied to cross-chain operations of a blockchain, and the data processing device based on distributed transactions includes:
- An identification acquisition module which is used to acquire the database identification carried in the block height verification request when the block height verification request output by the transaction requester is received;
- a database determining module configured to determine a target database for performing block height verification operations according to the database identifier
- the height monitoring module is used to monitor the height of the first block of the target database and the height of the second block of the original database;
- the data storage module is used to store the target data in the target database.
- Fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application.
- Fig. 3 is an exemplary functional block diagram of the terminal shown in Fig. 2.
- Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
- Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
- the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
- the underlying platform of the blockchain can include processing modules such as user management, basic services, smart contracts, and operation monitoring.
- the user management module is responsible for the identity information management of all blockchain participants, including the maintenance of public and private key generation (account management), key management, and maintenance of the correspondence between the user’s real identity and the blockchain address (authority management), etc.
- authorization supervise and audit certain real-identity transactions, and provide risk control rule configuration (risk control audit); basic service modules are deployed on all blockchain node devices to verify the validity of business requests, After completing the consensus on the valid request, it is recorded on the storage.
- Fig. 1 is a flowchart of a data processing method based on distributed transactions provided by the first embodiment of the present application.
- the data processing method based on distributed transactions is applied to the cross-chain operation of blockchain technology. As shown in FIG. 1, the data processing method based on distributed transactions includes the following steps:
- the transaction requester when a new read transaction is initiated on the blockchain network, the transaction requester outputs a block height verification request, which is used to request verification of the block height in the associated database (that is, Whether the amount of transaction data is consistent.
- the block height refers to the number of blocks linked to the main chain, that is, the number of blocks linked to the block chain.
- the block height can be used to identify the position of the block on the blockchain, and the block height contains the basic attributes and transaction data related to the block, where the basic attributes include the magic number (between blocks). Separator), block size and version number; the transaction data includes transaction count (the number of transactions recorded in the current block) and transaction details (for example, transaction timestamp, etc.).
- the method further includes: calling a monitoring process to obtain network data of the current blockchain network, where the network data includes network connection data and load data; Detect whether the network data is abnormal; when the detection result is that the network data is abnormal, perform a block height verification operation.
- the step of detecting whether the network data is abnormal includes: detecting whether there is disconnection data in the network connection data; when the detection result is that the network connection data has disconnection data, determining that the network data exists abnormal.
- the disconnection data is data in a preset data format, and it can be determined whether there is disconnection data by detecting whether there is data in the preset data format.
- the step of detecting whether the network data is abnormal further includes: detecting whether the load data exceeds a preset load data threshold; when the detection result is that the load data exceeds the preset load data threshold, determining the network data There is an exception.
- the preset load data threshold is a preset threshold that can ensure the normality of the blockchain network.
- the preset load data threshold can be obtained through neural network training, or can be given based on experience.
- the block height verification request carries a database identifier
- the database identifier is used to identify a certain database
- the specific form of the database identifier can be configured according to actual needs, for example,
- the database identifier may specifically be a database name, a database ID, and the like.
- the number of database identifiers may be one or more. In an embodiment, the number of the database identifiers is 3, corresponding to the state database, the historical database, and the distributed transaction database, respectively.
- a target database for performing block height verification operations is determined according to the database identifier, and the target database may be one or more of a state database, a historical database, and a distributed transaction database.
- the current status information of transactions of different transaction types is stored in the status database
- the transaction types may include ordinary transactions and distributed transaction transactions
- the current status information is the latest status information of the transaction, including: executing ( running, preparing, committing, aborting, committed, and aborted.
- the historical database stores historical status information of transactions of different transaction types.
- the distributed transaction database stores transaction data whose transaction type is distributed transaction.
- the original transaction data is stored in the original database, and the transaction data stored in the original database is complete, and there will be no omissions. Therefore, the block height monitor can monitor the first block height of each target database and the second block height of the original database to determine whether the transaction data in the target database is complete.
- the block height monitor can be used to monitor transaction data in the database.
- the number of block height monitors can be one, or the number of target databases that need to perform block height verification.
- step S14 Detect whether the height of the first block is consistent with the height of the second block, and when the detection result is that the height of the first block is inconsistent with the height of the second block, perform step S15.
- the present application it is detected whether the first block height is consistent with the second block height, and when the detection result is that the first block height is consistent with the second block height , To return the result of the block height consistency to the transaction requester. It is understandable that for the situation where the height of the first block of the target database is consistent with the height of the second block of the original database, if there is a new read transaction operation on the blockchain network at this time, no data read abnormality will occur Case.
- the number of the target database is multiple (for example, when the target database includes a state database, a historical database, and a distributed transaction database), in order to obtain the area between the target database and the original database
- the block height difference requires multiple reading of the block file, and the data processing efficiency is low.
- the step of determining the transaction data corresponding to the block height difference includes: calculating the block height of the target database and the original database Difference value set; determine the maximum difference value in the block height difference value set; retrieve the transaction data corresponding to the maximum difference value; determine the original database and the transaction data according to the transaction data corresponding to the maximum difference value Transaction data corresponding to the block height difference of the state database, the historical database, and the distributed transaction database.
- the second block height of the original database is 100
- the corresponding first block height of the state database is 97
- the first block height of the historical database is 95
- the distribution The height of the first block of the style transaction database is 93.
- the block height differences between the original database and the state database, historical database, and distributed transaction database are 3, 5, and 7, respectively. Since the maximum block height difference is 7, the transaction data corresponding to blocks with a block height of 94-100 are retrieved from the original database. It is understandable that by retrieving the transaction data corresponding to the maximum value at one time and sequentially storing the retrieved data in the corresponding target database, the block file can be read at one time, reducing the block file reverse sequence The optimized processing process improves the efficiency of data processing.
- the transaction type of the transaction data is determined, and the target data of the corresponding attribute is matched according to the transaction type.
- the transaction types include ordinary transactions and distributed transaction transactions.
- For distributed transaction transactions the entire transaction process is based on the two-phase protocol. Therefore, the distributed transaction-based data processing method provided in this application is also based on the two-phase protocol.
- the transaction type of the transaction data is determined, and the target data of the corresponding attribute is matched according to the transaction type.
- the steps include: when the transaction type is a normal transaction, obtaining the key value and value of the transaction data corresponding to the normal transaction; when the transaction type is a distributed transaction transaction, obtaining the phase nature of the distributed transaction transaction , And determine the target data according to the nature of the stage.
- the stage properties include the first stage and the second stage.
- the step of determining the target data according to the nature of the phase includes: judging whether the nature of the phase is in the first phase; when the judgment result is that the nature of the phase is in the first phase, determining the distributed transaction The transaction is at the target location in the block file, and the target location is written into the Index database (at this time, it is not necessary to write the key value and value value of the distributed transaction transaction into the target database); The result is that when the nature of the phase is in the second phase, the transaction status of the distributed transaction transaction is determined, and when the transaction status is committed, the target corresponding to the first phase in the Index database is obtained according to the distributed transaction ID And extract the data key value and value value of the write set of the distributed transaction transaction from the block file according to the target location.
- the transaction status of the distributed transaction transaction in the second phase also includes aborted, and when the transaction status is the aborted state, there is no need to read data.
- the step of determining the transaction type of the transaction data and matching the target data of the corresponding attribute according to the transaction type includes: Determine whether the distributed transaction transaction is in the first stage; when the result of the determination is that the distributed transaction transaction is in the first stage, obtain the read set and write set of the distributed transaction transaction; when the result of the determination is the distribution
- the transaction transaction is in the second stage, the read set and write set of the transaction corresponding to the first stage in the target database are determined and deleted according to the distributed transaction ID.
- the step of storing the target data in the target database includes: storing key values and value values of transaction data of ordinary transactions in the state database And/or historical database; storing the data key value and value value of the write set of the distributed transaction transaction in the second stage and the transaction status as committed to the state database and/or historical database.
- the target database is a distributed transaction database
- the read set and write set of the distributed transaction transaction in the first stage are stored in the distributed transaction database.
- Operation target database monitor the height of the first block of the target database and the height of the second block of the original database; detect whether the height of the first block is consistent with the height of the second block; when the detection result is all When the height of the first block is inconsistent with the height of the second block, the block height difference between the target database and the original database is calculated, and the block height difference is retrieved from the original database
- Corresponding transaction data determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type; store the target data in the target database.
- the terminal 1 may further include a display screen 20 and a processor 30.
- the memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
- the memory 10 may be different types of storage devices for storing various types of data.
- it can be the memory or internal memory of the terminal 1, or a memory card that can be externally connected to the terminal 1, such as flash memory, SM card (Smart Media Card), SD card (Secure Digital Card, secure digital card) Wait.
- the memory 10 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, and a flash memory card (Flash Card). , At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
- the memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal 1, and data set and obtained by applying the above-mentioned distributed transaction-based data processing method.
- the processor 30 is configured to execute the distributed transaction-based data processing method and various software installed in the terminal 1, such as an operating system and application display software.
- the processor 30 includes, but is not limited to, a processor (Central Processing Unit, CPU), a Micro Controller Unit (MCU), and other devices for interpreting computer instructions and processing data in computer software.
- a processor Central Processing Unit, CPU
- MCU Micro Controller Unit
- the distributed transaction-based data processing apparatus 100 may include some or all of the functional modules shown in FIG. The functions will be described in detail below. It should be noted that the same nouns, related nouns, and specific explanations in the above implementations of the distributed transaction-based data processing method can also be applied to the following introduction to the functions of each module. To save space and avoid repetition, I won’t repeat them here.
- the height monitoring module 103 may be used to monitor the height of the first block of the target database and the height of the second block of the original database.
- the height detection module 104 may be used to detect whether the height of the first block is consistent with the height of the second block.
- the data retrieval module 105 can be used to calculate the difference between the block height of the target database and the original database when the detection result is that the height of the first block is inconsistent with the height of the second block, and obtain information from all the blocks.
- the transaction data corresponding to the block height difference is retrieved from the original database.
- the data matching module 106 may be used to determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type.
- the data storage module 107 may be used to store the target data in the target database.
- the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 30, the steps of the distributed transaction-based data processing method in any of the foregoing embodiments are implemented.
- the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
- the processor 30 is the control center of the distributed transaction-based data processing device 100/terminal 1, using various interfaces Each part of the entire distributed transaction-based data processing device 100/terminal 1 is connected to the line.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Finance (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Computing Systems (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Provided are a distributed transaction-based data processing method, device, terminal, and storage medium, relating to the technical field of blockchain, said method comprising: when a block height verification request is received, obtaining a database identifier carried in the block height verification request (S11); according to the database identifier, determining a target database used for performing a block height verification operation (S12); monitoring the height of a first block of the target database and the height of a second block of the original database (S13); detecting whether the height of the first block is consistent with the height of the second block (S14); if the result of detection is that the heights are inconsistent, then calculating the block height difference between the target database and the original database and retrieving transaction data corresponding to the block height difference from the original database (S15); determining the transaction type of transaction data and matching the target data of the corresponding attribute according to the transaction type (S16); storing the target data in the target database (S17). The described method can avoid abnormal data reading caused by network abnormalities and other reasons, and thus improves the accuracy of data reading.
Description
本申请要求于2020年05月28日提交中国专利局,申请号为202010467837.2,发明名称为“基于分布式事务的数据处理方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on May 28, 2020, the application number is 202010467837.2, and the invention title is "Data processing method, device, terminal and storage medium based on distributed transaction", all of which The content is incorporated in this application by reference.
本申请涉及区块链技术领域,尤其涉及一种基于分布式事务的数据处理方法、装置、终端及存储介质。This application relates to the field of blockchain technology, and in particular to a data processing method, device, terminal and storage medium based on distributed transactions.
目前,区块链技术由于具有去中心化、开放性、自治性、信息不可篡改性及匿名性等重要特征而被广泛应用,各种不同的区块链技术纷纷涌现出来,区块链之间的互操作(也即跨链操作)成为了一个非常重要而又迫切的需求。例如,企业用户可能需要在不同的链之间进行业务迁移;普通用户可能需要在不同的链之间进行资产交换;央行的数字法币可能会需要在各个区块链上流通等。At present, blockchain technology is widely used due to its important features such as decentralization, openness, autonomy, immutability of information, and anonymity. Various blockchain technologies have emerged one after another. Interoperability (that is, cross-chain operation) has become a very important and urgent need. For example, enterprise users may need to migrate business between different chains; ordinary users may need to exchange assets between different chains; the digital legal currency of the central bank may need to circulate on various blockchains, etc.
跨链操作必然涉及到不同区块节点的交易数据增删改查,为了满足不同节点的交易数据的ACID(原子性、一致性、隔离性及持久性)特性,需要在跨链技术中引入分布式事务的操作。然而,发明人意识到由于网络延迟等原因,事务的关联数据库存储的交易数据量会出现不一致的情况,导致读事务操作无法读取到一致数据,造成数据读取异常。Cross-chain operations inevitably involve the addition, deletion, modification and inspection of transaction data of different block nodes. In order to meet the ACID (atomicity, consistency, isolation, and durability) characteristics of transaction data of different nodes, it is necessary to introduce distributed in cross-chain technology. The operation of the transaction. However, the inventor realizes that due to network delays and other reasons, the amount of transaction data stored in the transaction's associated database will be inconsistent, resulting in the failure of the read transaction operation to read consistent data, resulting in abnormal data reading.
因而,有必要提供一种方法,能够校验关联数据库的数据量是否一致,并对不一致的数据及时处理,从而增加数据读取准确性。Therefore, it is necessary to provide a method that can verify whether the amount of data in the associated database is consistent, and process inconsistent data in a timely manner, thereby increasing the accuracy of data reading.
发明内容Summary of the invention
鉴于以上内容,有必要提供一种基于分布式事务的数据处理方法、装置、终端及存储介质,能够避免由于网络延迟等原因造成的数据读取异常的问题,增加数据读取准确性。In view of the above, it is necessary to provide a data processing method, device, terminal, and storage medium based on distributed transactions, which can avoid the problem of abnormal data reading caused by network delays and other reasons, and increase the accuracy of data reading.
本申请的第一方面提供一种基于分布式事务的数据处理方法,应用于区块链的跨链操作中,所述基于分布式事务的数据处理方法包括:The first aspect of the present application provides a data processing method based on distributed transactions, which is applied to cross-chain operations of blockchains, and the data processing method based on distributed transactions includes:
当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;
根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;
监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;
检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;
当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;
确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;
存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
本申请的第二方面提供一种终端,所述终端包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:A second aspect of the present application provides a terminal, the terminal includes a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;
根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;
监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;
检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;
当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;
确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;
存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:A third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;
根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;
监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;
检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;
当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;
确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;
存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
本申请的第四方面提供一种基于分布式事务的数据处理装置,应用于区块链的跨链操作中,所述基于分布式事务的数据处理装置包括:The fourth aspect of the present application provides a data processing device based on distributed transactions, which is applied to cross-chain operations of a blockchain, and the data processing device based on distributed transactions includes:
标识获取模块,用于当接收到事务请求方输出的区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;An identification acquisition module, which is used to acquire the database identification carried in the block height verification request when the block height verification request output by the transaction requester is received;
数据库确定模块,用于根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;A database determining module, configured to determine a target database for performing block height verification operations according to the database identifier;
高度监听模块,用于监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;The height monitoring module is used to monitor the height of the first block of the target database and the height of the second block of the original database;
高度检测模块,用于检测所述第一区块高度与所述第二区块高度是否一致;A height detection module for detecting whether the height of the first block is consistent with the height of the second block;
数据调取模块,用于当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;The data retrieval module is used to calculate the block height difference between the target database and the original database when the detection result is that the height of the first block is inconsistent with the height of the second block, and obtain from the Retrieve the transaction data corresponding to the block height difference from the original database;
数据匹配模块,用于确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;The data matching module is used to determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;
数据存储模块,用于存储所述目标数据至所述目标数据库中。The data storage module is used to store the target data in the target database.
由以上技术方案可知,本申请应用于区块链技术,利用本申请,通过对不同数据库的区块高度进行校验,能够发现区块高度不一致的数据库,并及时对区块高度不一致的数据库进行数据处理,能够避免网络异常等原因造成的数据读取异常的情况,从而提高数据读取准确性。It can be seen from the above technical solutions that this application is applied to blockchain technology. Using this application, by verifying the block heights of different databases, it is possible to find databases with inconsistent block heights, and perform timely analysis on databases with inconsistent block heights. Data processing can avoid abnormal data reading caused by network abnormalities and other reasons, thereby improving the accuracy of data reading.
图1是本申请第一实施方式提供的基于分布式事务的数据处理方法的流程图。Fig. 1 is a flowchart of a data processing method based on distributed transactions provided by the first embodiment of the present application.
图2是本申请一实施方式的终端的结构示意图。Fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application.
图3是图2所示的终端的示例性的功能模块图。Fig. 3 is an exemplary functional block diagram of the terminal shown in Fig. 2.
如下具体实施方式将结合上述附图进一步说明本申请。The following specific embodiments will further illustrate this application in conjunction with the above-mentioned drawings.
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to be able to understand the above objectives, features and advantages of the application more clearly, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the application and the features in the embodiments can be combined with each other if there is no conflict.
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In the following description, many specific details are set forth in order to fully understand the present application, and the described embodiments are a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terms used in the specification of the application herein are only for the purpose of describing specific embodiments, and are not intended to limit the application.
本申请实施例提供的基于分布式事务的数据处理方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述基于分布式事务的数据处理方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。The execution subject of the distributed transaction-based data processing method provided in the embodiment of the present application includes but is not limited to at least one of the electronic devices that can be configured to execute the method provided in the embodiment of the present application, such as a server and a terminal. In other words, the distributed transaction-based data processing method may be executed by software or hardware installed on a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层。Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
区块链底层平台可以包括用户管理、基础服务、智能合约以及运营监控等处理模块。其中,用户管理模块负责所有区块链参与者的身份信息管理,包括维护公私钥生成(账户管理)、密钥管理以及用户真实身份和区块链地址对应关系维护(权限管理)等,并且在授权的情况下,监管和审计某些真实身份的交易情况,提供风险控制的规则配置(风控审计);基础服务模块部署在所有区块链节点设备上,用来验证业务请求的有效性,并对有效请求完成共识后记录到存储上,对于一个新的业务请求,基础服务先对接口适配解析和鉴权处理(接口适配),然后通过共识算法将业务信息加密(共识管理),在加密之后完整一致的传输至共享账本上(网络通信),并进行记录存储;智能合约模块负责合约的注册发行以及合约触发和合约执行,开发人员可以通过某种编程语言定义合约逻辑,发布到区块链上(合约注册),根据合约条款的逻辑,调用密钥或者其它的事件触发执行,完成合约逻辑,同时还提供对合约升级注销的功能;运营监控模块主要负责产品发布过程中的部署、配置的修改、合约设置、云适配以及产品运行中的实时状态的可视化输出,例如:告警、监控网络情况、监控节点设备健康状态等。The underlying platform of the blockchain can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including the maintenance of public and private key generation (account management), key management, and maintenance of the correspondence between the user’s real identity and the blockchain address (authority management), etc. In the case of authorization, supervise and audit certain real-identity transactions, and provide risk control rule configuration (risk control audit); basic service modules are deployed on all blockchain node devices to verify the validity of business requests, After completing the consensus on the valid request, it is recorded on the storage. For a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management), After encryption, it is completely and consistently transmitted to the shared ledger (network communication), and recorded and stored; the smart contract module is responsible for contract registration and issuance, contract triggering and contract execution. Developers can define the contract logic through a certain programming language and publish it to On the blockchain (contract registration), according to the logic of the contract terms, call keys or other events to trigger execution, complete the contract logic, and also provide the function of contract upgrade and cancellation; the operation monitoring module is mainly responsible for the deployment of the product release process , Configuration modification, contract settings, cloud adaptation, and visual output of real-time status during product operation, such as: alarms, monitoring network conditions, monitoring node equipment health status, etc.
图1是本申请第一实施方式提供的基于分布式事务的数据处理方法的流程图。所述基于分布式事务的数据处理方法应用于区块链技术的跨链操作中,如图1所示,所述基于分布式事务的数据处理方法包括如下步骤:Fig. 1 is a flowchart of a data processing method based on distributed transactions provided by the first embodiment of the present application. The data processing method based on distributed transactions is applied to the cross-chain operation of blockchain technology. As shown in FIG. 1, the data processing method based on distributed transactions includes the following steps:
S11、当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识。S11. When the block height verification request is received, obtain the database identifier carried in the block height verification request.
在本申请的至少一实施例中,当区块链网络上发起新的读事务时,由事务请求方输出区块高度校验请求,用于请求校验关联数据库中的区块高度(也即交易数据的数据量)是否一致。所述区块高度是指区块链接在主链的个数,也即链接在区块链上的块数。所述区块高度可以用来标识区块在区块链上位置,所述区块高度中包含区块相关的基础属性与交易数据,其中,所述基础属性包括神奇数(区块之间的分隔符)、区块大小及版本号等信息;所述交易数据包括交易计数(当前区块所记录的交易数)及交易详情(例如,交易时间戳等)。In at least one embodiment of the present application, when a new read transaction is initiated on the blockchain network, the transaction requester outputs a block height verification request, which is used to request verification of the block height in the associated database (that is, Whether the amount of transaction data is consistent. The block height refers to the number of blocks linked to the main chain, that is, the number of blocks linked to the block chain. The block height can be used to identify the position of the block on the blockchain, and the block height contains the basic attributes and transaction data related to the block, where the basic attributes include the magic number (between blocks). Separator), block size and version number; the transaction data includes transaction count (the number of transactions recorded in the current block) and transaction details (for example, transaction timestamp, etc.).
优选地,当区块链网络遇到某些突发性原因导致服务器当机,或由于服务器承载的压力过大时,才需要对关联数据库的区块高度进行校验。因而,为了减少区块高度的校验次数,提高事务处理效率,所述方法还包括:调用监控进程获取当前区块链网络的网络数据,其中, 所述网络数据包括网络连接数据与负载数据;检测所述网络数据是否存在异常;当检测结果为所述网络数据存在异常时,执行区块高度校验操作。具体地,所述检测所述网络数据是否异常的步骤包括:检测所述网络连接数据中是否存在断开数据;当检测结果为所述网络连接数据存在断开数据时,确定所述网络数据存在异常。其中,所述断开数据为预设数据格式的数据,通过检测是否存在预设数据格式的数据能够确定是否存在断开数据。或者,所述检测所述网络数据是否异常的步骤还包括:检测所述负载数据是否超过预设负载数据阈值;当检测结果为所述负载数据超过预设负载数据阈值时,确定所述网络数据存在异常。所述预设负载数据阈值为预先设置的,能够保证区块链网络正常的阈值,所述预设负载数据阈值可以通过神经网络训练得到,也可以基于经验给出。Preferably, when the blockchain network encounters some unexpected reasons that cause the server to crash, or the pressure carried by the server is too large, the block height of the associated database needs to be verified. Therefore, in order to reduce the number of block height checks and improve transaction processing efficiency, the method further includes: calling a monitoring process to obtain network data of the current blockchain network, where the network data includes network connection data and load data; Detect whether the network data is abnormal; when the detection result is that the network data is abnormal, perform a block height verification operation. Specifically, the step of detecting whether the network data is abnormal includes: detecting whether there is disconnection data in the network connection data; when the detection result is that the network connection data has disconnection data, determining that the network data exists abnormal. Wherein, the disconnection data is data in a preset data format, and it can be determined whether there is disconnection data by detecting whether there is data in the preset data format. Alternatively, the step of detecting whether the network data is abnormal further includes: detecting whether the load data exceeds a preset load data threshold; when the detection result is that the load data exceeds the preset load data threshold, determining the network data There is an exception. The preset load data threshold is a preset threshold that can ensure the normality of the blockchain network. The preset load data threshold can be obtained through neural network training, or can be given based on experience.
在本申请的至少一实施例中,所述区块高度校验请求中携带有数据库标识,所述数据库标识用于标识某一个数据库,所述数据库标识的具体形式可以根据实际需求配置,例如,所述数据库标识具体可以是数据库名称、数据库ID等。所述数据库标识的个数可以为一个,也可以为多个。在一实施例中,所述数据库标识的个数为3个,分别对应状态数据库、历史数据库以及分布式事务数据库。In at least one embodiment of the present application, the block height verification request carries a database identifier, the database identifier is used to identify a certain database, and the specific form of the database identifier can be configured according to actual needs, for example, The database identifier may specifically be a database name, a database ID, and the like. The number of database identifiers may be one or more. In an embodiment, the number of the database identifiers is 3, corresponding to the state database, the historical database, and the distributed transaction database, respectively.
S12、根据所述数据库标识确定用于执行区块高度校验操作的目标数据库。S12: Determine a target database for performing a block height verification operation according to the database identifier.
在本申请的至少一实施例中,根据所述数据库标识确定用于执行区块高度校验操作的目标数据库,所述目标数据库可以为状态数据库、历史数据库以及分布式事务数据库中的一个或多个。其中,所述状态数据库中存储有不同交易类型交易的当前状态信息,所述交易类型可以包括普通交易与分布式事务交易,所述当前状态信息为该交易的最新状态信息,包括:正在执行(running)、正在准备(preparing)、正在提交(committing)、正在回滚(aborting)、提交完成(committed)以及回滚完成(aborted)等状态。所述历史数据库中存储有不同交易类型交易的历史状态信息。所述分布式事务数据库中存储有交易类型为分布式事务的交易数据。In at least one embodiment of the present application, a target database for performing block height verification operations is determined according to the database identifier, and the target database may be one or more of a state database, a historical database, and a distributed transaction database. A. Wherein, the current status information of transactions of different transaction types is stored in the status database, the transaction types may include ordinary transactions and distributed transaction transactions, and the current status information is the latest status information of the transaction, including: executing ( running, preparing, committing, aborting, committed, and aborted. The historical database stores historical status information of transactions of different transaction types. The distributed transaction database stores transaction data whose transaction type is distributed transaction.
S13、监听所述目标数据库的第一区块高度与原始数据库的第二区块高度。S13. Monitor the height of the first block of the target database and the height of the second block of the original database.
在本申请的至少一实施例中,所述原始数据库中存储有原始交易数据,所述原始数据库中存储的交易数据是完整的,不会出现遗漏的情况。因而,可以通过区块高度监听器监听每一所述目标数据库的第一区块高度与原始数据库的第二区块高度来判断所述目标数据库中的交易数据是否完整。所述区块高度监听器可以用于监听数据库中的交易数据。所述区块高度监听器的个数可以为一个,也可以为需要执行区块高度校验的目标数据库的个数。In at least one embodiment of the present application, the original transaction data is stored in the original database, and the transaction data stored in the original database is complete, and there will be no omissions. Therefore, the block height monitor can monitor the first block height of each target database and the second block height of the original database to determine whether the transaction data in the target database is complete. The block height monitor can be used to monitor transaction data in the database. The number of block height monitors can be one, or the number of target databases that need to perform block height verification.
S14、检测所述第一区块高度与所述第二区块高度是否一致,当检测结果为所述第一区块高度与所述第二区块高度不一致时,执行步骤S15。S14. Detect whether the height of the first block is consistent with the height of the second block, and when the detection result is that the height of the first block is inconsistent with the height of the second block, perform step S15.
在本申请的至少一实施例中,检测所述第一区块高度与所述第二区块高度是否一致,当检测结果为所述第一区块高度与所述第二区块高度一致时,向所述事务请求方返回区块高度一致的结果。可以理解的是,对于目标数据库的第一区块高度与原始数据库的第二区块高度一致的情况,此时若区块链网络上有新的读事务操作时,不会产生数据读取异常的情况。In at least one embodiment of the present application, it is detected whether the first block height is consistent with the second block height, and when the detection result is that the first block height is consistent with the second block height , To return the result of the block height consistency to the transaction requester. It is understandable that for the situation where the height of the first block of the target database is consistent with the height of the second block of the original database, if there is a new read transaction operation on the blockchain network at this time, no data read abnormality will occur Case.
S15、计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据。S15. Calculate the block height difference between the target database and the original database, and retrieve transaction data corresponding to the block height difference from the original database.
在本申请的至少一实施例中,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据。具体地,所述从所述原始数据库中调取所述区块高度差值对应的交易数据的步骤包括:调取所述原始数据库中的区块文件;反序列化所述区块文件中的原始交易数据;获取所述原始交易数据携带的时间戳;根据所述时间戳确定所述原始交易数据中与所述区块高度差值对应的交易数据。其中,所述区块文件中存储有原始交易数据,所述原始交易数据经序列化处理后存储至所述区块文件中,序列化规则可以包括Protobuf协议、Thrift协议或Java serialization协议中的一种或多种,在此 不做限制。调用与所述序列化规则对应的反序列化规则对所述原始交易数据进行反序列处理,从而得到能够查看与分析的原始交易数据。In at least one embodiment of the present application, the block height difference between the target database and the original database is calculated, and the transaction data corresponding to the block height difference is retrieved from the original database. Specifically, the step of retrieving the transaction data corresponding to the block height difference from the original database includes: retrieving a block file in the original database; deserializing the block file in the block file Original transaction data; obtain the timestamp carried by the original transaction data; determine the transaction data corresponding to the block height difference in the original transaction data according to the timestamp. Wherein, the block file stores original transaction data, and the original transaction data is serialized and stored in the block file. The serialization rules may include one of the Protobuf protocol, the Thrift protocol, or the Java serialization protocol. There are no restrictions here. The deserialization rule corresponding to the serialization rule is called to perform deserialization processing on the original transaction data, so as to obtain the original transaction data that can be viewed and analyzed.
优选地,当所述目标数据库的个数为多个时(例如,当所述目标数据库包括状态数据库、历史数据库及分布式事务数据库时),为了获取所述目标数据库与所述原始数据库的区块高度差值,需要多次读取所述区块文件,数据处理效率较低。为了减少对所述区块文件的读取次数,提高数据处理效率,所述确定所述区块高度差值对应的交易数据的步骤包括:计算所述目标数据库与所述原始数据库的区块高度差值集;确定所述区块高度差值集中差值最大值;调取所述差值最大值对应的交易数据;根据所述差值最大值对应的交易数据分别确定所述原始数据库与所述状态数据库、所述历史数据库、所述分布式事务数据库的区块高度差值对应的交易数据。Preferably, when the number of the target database is multiple (for example, when the target database includes a state database, a historical database, and a distributed transaction database), in order to obtain the area between the target database and the original database The block height difference requires multiple reading of the block file, and the data processing efficiency is low. In order to reduce the number of times of reading the block file and improve the efficiency of data processing, the step of determining the transaction data corresponding to the block height difference includes: calculating the block height of the target database and the original database Difference value set; determine the maximum difference value in the block height difference value set; retrieve the transaction data corresponding to the maximum difference value; determine the original database and the transaction data according to the transaction data corresponding to the maximum difference value Transaction data corresponding to the block height difference of the state database, the historical database, and the distributed transaction database.
示例性地,当所述原始数据库的第二区块高度为100时,对应的所述状态数据库的第一区块高度为97,所述历史数据库的第一区块高度为95,所述分布式事务数据库的第一区块高度为93。由此可知,所述原始数据库与所述状态数据库、历史数据库、分布式事务数据库的区块高度差值分别为3,5,7。由于最大的区块高度差值为7,则从所述原始数据库中调取区块高度为94-100的区块对应的交易数据。可以理解的是,通过一次调取所述最大值对应的交易数据,并将调取的数据依次存储至对应的目标数据库中,能够一次读取所述区块文件,减少了区块文件反序列化的处理过程,提高了数据处理效率。Exemplarily, when the second block height of the original database is 100, the corresponding first block height of the state database is 97, the first block height of the historical database is 95, and the distribution The height of the first block of the style transaction database is 93. It can be seen that the block height differences between the original database and the state database, historical database, and distributed transaction database are 3, 5, and 7, respectively. Since the maximum block height difference is 7, the transaction data corresponding to blocks with a block height of 94-100 are retrieved from the original database. It is understandable that by retrieving the transaction data corresponding to the maximum value at one time and sequentially storing the retrieved data in the corresponding target database, the block file can be read at one time, reducing the block file reverse sequence The optimized processing process improves the efficiency of data processing.
S16、确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据。S16. Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type.
确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据。所述交易类型包括普通交易与分布式事务交易。对于分布式事务交易,其整个交易过程是基于二阶段协议进行的,因而,本申请提供的基于分布式事务的数据处理方法也基于二阶段协议进行。The transaction type of the transaction data is determined, and the target data of the corresponding attribute is matched according to the transaction type. The transaction types include ordinary transactions and distributed transaction transactions. For distributed transaction transactions, the entire transaction process is based on the two-phase protocol. Therefore, the distributed transaction-based data processing method provided in this application is also based on the two-phase protocol.
在本申请的至少一实施例中,当所述目标数据库为状态数据库和/或历史数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤包括:当所述交易类型为普通交易时,获取所述普通交易对应交易数据的key值与value值;当所述交易类型为分布式事务交易时,获取所述分布式事务交易的阶段性质,并根据所述阶段性质确定所述目标数据。所述阶段性质包括第一阶段与第二阶段。In at least one embodiment of the present application, when the target database is a state database and/or a history database, the transaction type of the transaction data is determined, and the target data of the corresponding attribute is matched according to the transaction type. The steps include: when the transaction type is a normal transaction, obtaining the key value and value of the transaction data corresponding to the normal transaction; when the transaction type is a distributed transaction transaction, obtaining the phase nature of the distributed transaction transaction , And determine the target data according to the nature of the stage. The stage properties include the first stage and the second stage.
具体地,所述根据所述阶段性质确定所述目标数据的步骤包括:判断所述阶段性质是否处于第一阶段;当判断结果为所述阶段性质处于第一阶段时,确定所述分布式事务交易在所述区块文件中的目标位置,并将所述目标位置写入Index数据库中(此时,并不需要将分布式事务交易的key值与value值写入目标数据库中);当判断结果为所述阶段性质处于第二阶段时,确定所述分布式事务交易的交易状态,并当所述交易状态为committed时,根据分布式事务ID获取所述Index数据库中第一阶段对应的目标位置,并根据所述目标位置从所述区块文件中提取所述分布式事务交易的写集的数据key值与value值。其中,所述分布式事务交易在第二阶段的交易状态还包括aborted,当所述交易状态为aborted状态时,无需读取数据。Specifically, the step of determining the target data according to the nature of the phase includes: judging whether the nature of the phase is in the first phase; when the judgment result is that the nature of the phase is in the first phase, determining the distributed transaction The transaction is at the target location in the block file, and the target location is written into the Index database (at this time, it is not necessary to write the key value and value value of the distributed transaction transaction into the target database); The result is that when the nature of the phase is in the second phase, the transaction status of the distributed transaction transaction is determined, and when the transaction status is committed, the target corresponding to the first phase in the Index database is obtained according to the distributed transaction ID And extract the data key value and value value of the write set of the distributed transaction transaction from the block file according to the target location. Wherein, the transaction status of the distributed transaction transaction in the second phase also includes aborted, and when the transaction status is the aborted state, there is no need to read data.
在本申请的至少一实施例中,当所述目标数据库为分布式事务数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤包括:判断所述分布式事务交易是否处于第一阶段;当判断结果为所述分布式事务交易处于第一阶段时,获取所述分布式事务交易的读集与写集;当判断结果为所述分布式事务交易处于第二阶段时,根据分布式事务ID确定并删除所述目标数据库中第一阶段对应交易的读集与写集。通过将处于第一阶段的分布式事务交易的读集与写集存储至分布式事务数据库中,能够将这部分数据锁住,避免其他交易更改这部数据。当分布式事务交易处于第二阶段时,删除所述目标数据库中第一阶段对应交易的读集与写集,将此部分数据解锁。In at least one embodiment of the present application, when the target database is a distributed transaction database, the step of determining the transaction type of the transaction data and matching the target data of the corresponding attribute according to the transaction type includes: Determine whether the distributed transaction transaction is in the first stage; when the result of the determination is that the distributed transaction transaction is in the first stage, obtain the read set and write set of the distributed transaction transaction; when the result of the determination is the distribution When the transaction transaction is in the second stage, the read set and write set of the transaction corresponding to the first stage in the target database are determined and deleted according to the distributed transaction ID. By storing the read set and write set of the distributed transaction transaction in the first stage in the distributed transaction database, this part of the data can be locked, and other transactions can prevent other transactions from changing this data. When the distributed transaction transaction is in the second stage, delete the read set and write set of the transaction corresponding to the first stage in the target database, and unlock this part of the data.
可以理解的是,当交易类型为普通交易时,无需将普通交易的交易数据存储至所述分布 式事务数据库中。It is understandable that when the transaction type is a normal transaction, there is no need to store transaction data of the normal transaction in the distributed transaction database.
S17、存储所述目标数据至所述目标数据库中。S17. Store the target data in the target database.
在本申请的至少一实施例中,存储所述目标数据至所述目标数据库中,从而使得所述目标数据库的第一区块高度与所述原始数据库的第二区块高度一致。In at least one embodiment of the present application, the target data is stored in the target database, so that the height of the first block of the target database is consistent with the height of the second block of the original database.
当所述目标数据库为状态数据库和/或历史数据库时,所述存储所述目标数据至所述目标数据库中的步骤包括:将普通交易的交易数据的key值与value值存储至所述状态数据库和/或历史数据库;将处于第二阶段且交易状态为committed的分布式事务交易的写集的数据key值与value值存储至所述状态数据库和/或历史数据库。当所述目标数据库为分布式事务数据库时,将处于第一阶段的分布式事务交易的读集与写集存储至所述分布式事务数据库中。When the target database is a state database and/or a historical database, the step of storing the target data in the target database includes: storing key values and value values of transaction data of ordinary transactions in the state database And/or historical database; storing the data key value and value value of the write set of the distributed transaction transaction in the second stage and the transaction status as committed to the state database and/or historical database. When the target database is a distributed transaction database, the read set and write set of the distributed transaction transaction in the first stage are stored in the distributed transaction database.
在图1所描述的方法流程中,通过对不同数据库的区块高度进行校验,能够发现区块高度不一致的数据库,并及时对区块高度不一致的数据库进行数据处理,能够避免网络异常等原因造成的数据读取异常的情况,从而提高数据读取准确性。In the method flow described in Figure 1, by checking the block heights of different databases, databases with inconsistent block heights can be found, and data processing on databases with inconsistent block heights can be performed in time to avoid network abnormalities and other reasons. Resulting in abnormal data reading, thereby improving the accuracy of data reading.
以上是对本申请实施例所提供的方法进行的详细描述。根据不同的需求,所示流程图中方块的执行顺序可以改变,某些方块可以省略。下面对本申请实施例所提供的终端1进行描述。The above is a detailed description of the method provided by the embodiment of the present application. According to different requirements, the execution order of the blocks in the flowchart shown can be changed, and some blocks can be omitted. The terminal 1 provided in the embodiment of the present application will be described below.
图2是本申请一实施方式的终端的结构示意图,如图2所示,终端1包括存储器10,存储器10中存储有所述基于分布式事务的数据处理装置100。所述终端1可以是计算机、平板电脑、个人数字助理等具有数据处理、分析、程序执行及显示等功能的电子设备。所述基于分布式事务的数据处理装置100在接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;检测所述第一区块高度与所述第二区块高度是否一致;当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;存储所述目标数据至所述目标数据库中。利用本申请,通过对不同数据库的区块高度进行校验,能够发现区块高度不一致的数据库,并及时对区块高度不一致的数据库进行数据处理,能够避免网络异常等原因造成的数据读取异常的情况,从而提高数据读取准确性。FIG. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in FIG. 2, the terminal 1 includes a memory 10 in which the distributed transaction-based data processing device 100 is stored. The terminal 1 may be an electronic device with functions of data processing, analysis, program execution, and display, such as a computer, a tablet computer, or a personal digital assistant. When the distributed transaction-based data processing device 100 receives a block height verification request, it obtains the database identification carried in the block height verification request; and determines that it is used to perform the block height verification according to the database identification. Operation target database; monitor the height of the first block of the target database and the height of the second block of the original database; detect whether the height of the first block is consistent with the height of the second block; when the detection result is all When the height of the first block is inconsistent with the height of the second block, the block height difference between the target database and the original database is calculated, and the block height difference is retrieved from the original database Corresponding transaction data; determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type; store the target data in the target database. Using this application, by verifying the block heights of different databases, it is possible to find databases with inconsistent block heights, and to process data in time for databases with inconsistent block heights, which can avoid data reading abnormalities caused by network abnormalities and other reasons. In order to improve the accuracy of data reading.
本实施方式中,终端1还可以包括显示屏20及处理器30。存储器10、显示屏20可以分别与处理器30电连接。In this embodiment, the terminal 1 may further include a display screen 20 and a processor 30. The memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
所述的存储器10可以是不同类型存储设备,用于存储各类数据。例如,可以是终端1的存储器、内存,还可以是可外接于该终端1的存储卡,如闪存、SM卡(Smart Media Card,智能媒体卡)、SD卡(Secure Digital Card,安全数字卡)等。此外,存储器10可以包括包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。存储器10用于存储各类数据,例如,所述终端1中安装的各类应用程序(Applications)、应用上述基于分布式事务的数据处理方法而设置、获取的数据等信息。The memory 10 may be different types of storage devices for storing various types of data. For example, it can be the memory or internal memory of the terminal 1, or a memory card that can be externally connected to the terminal 1, such as flash memory, SM card (Smart Media Card), SD card (Secure Digital Card, secure digital card) Wait. In addition, the memory 10 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, and a flash memory card (Flash Card). , At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. The memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal 1, and data set and obtained by applying the above-mentioned distributed transaction-based data processing method.
显示屏20安装于终端1,用于显示信息。The display screen 20 is installed in the terminal 1 for displaying information.
处理器30用于执行所述基于分布式事务的数据处理方法以及所述终端1内安装的各类软件,例如操作系统及应用显示软件等。处理器30包含但不限于处理器(Central Processing Unit,CPU)、微控制单元(Micro Controller Unit,MCU)等用于解释计算机指令以及处理计算机软件中的数据的装置。The processor 30 is configured to execute the distributed transaction-based data processing method and various software installed in the terminal 1, such as an operating system and application display software. The processor 30 includes, but is not limited to, a processor (Central Processing Unit, CPU), a Micro Controller Unit (MCU), and other devices for interpreting computer instructions and processing data in computer software.
所述的基于分布式事务的数据处理装置100可以包括一个或多个的模块,所述一个或多 个模块被存储在终端1的存储器10中并被配置成由一个或多个处理器(本实施方式为一个处理器30)执行,以完成本申请实施例。当所述基于分布式事务的数据处理装置100应用于集群管理器时,例如,参阅图3所示,所述基于分布式事务的数据处理装置100可以包括标识获取模块101、数据库确定模块102、高度监听模块103、高度检测模块104、数据调取模块105、数据匹配模块106以及数据存储模块107。本申请实施例所称的模块可以是完成一特定功能的程序段,比程序更适合于描述软件在处理器30中的执行过程。The distributed transaction-based data processing apparatus 100 may include one or more modules, and the one or more modules are stored in the memory 10 of the terminal 1 and configured to be operated by one or more processors (this The implementation manner is executed by a processor 30) to complete the embodiment of the present application. When the distributed transaction-based data processing device 100 is applied to a cluster manager, for example, as shown in FIG. 3, the distributed transaction-based data processing device 100 may include an identification acquiring module 101, a database determining module 102, The height monitoring module 103, the height detection module 104, the data retrieval module 105, the data matching module 106, and the data storage module 107. The module referred to in the embodiment of the present application may be a program segment that completes a specific function, and is more suitable for describing the execution process of software in the processor 30 than a program.
可以理解的是,对应上述基于分布式事务的数据处理方法中的各实施方式,基于分布式事务的数据处理装置100可以包括图3中所示的各功能模块中的一部分或全部,各模块的功能将在以下具体介绍。需要说明的是,以上基于分布式事务的数据处理方法的各实施方式中相同的名词、相关名词及其具体的解释说明也可以适用于以下对各模块的功能介绍。为节省篇幅及避免重复起见,在此就不再赘述。It can be understood that, corresponding to the various implementations in the above-mentioned distributed transaction-based data processing method, the distributed transaction-based data processing apparatus 100 may include some or all of the functional modules shown in FIG. The functions will be described in detail below. It should be noted that the same nouns, related nouns, and specific explanations in the above implementations of the distributed transaction-based data processing method can also be applied to the following introduction to the functions of each module. To save space and avoid repetition, I won’t repeat them here.
标识获取模块101可以用于当接收到事务请求方输出的区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识。The identification obtaining module 101 may be configured to obtain the database identification carried in the block height verification request when the block height verification request output by the transaction requester is received.
数据库确定模块102可以用于根据所述数据库标识确定用于执行区块高度校验操作的目标数据库。The database determining module 102 may be configured to determine a target database for performing the block height verification operation according to the database identifier.
高度监听模块103可以用于监听所述目标数据库的第一区块高度与原始数据库的第二区块高度。The height monitoring module 103 may be used to monitor the height of the first block of the target database and the height of the second block of the original database.
高度检测模块104可以用于检测所述第一区块高度与所述第二区块高度是否一致。The height detection module 104 may be used to detect whether the height of the first block is consistent with the height of the second block.
数据调取模块105可以用于当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据。The data retrieval module 105 can be used to calculate the difference between the block height of the target database and the original database when the detection result is that the height of the first block is inconsistent with the height of the second block, and obtain information from all the blocks. The transaction data corresponding to the block height difference is retrieved from the original database.
数据匹配模块106可以用于确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据。The data matching module 106 may be used to determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type.
数据存储模块107可以用于存储所述目标数据至所述目标数据库中。The data storage module 107 may be used to store the target data in the target database.
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器30执行时实现上述任一实施方式中的基于分布式事务的数据处理方法的步骤。The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 30, the steps of the distributed transaction-based data processing method in any of the foregoing embodiments are implemented.
所述基于分布式事务的数据处理装置100如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施方式方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器30执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)等。If the distributed transaction-based data processing device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium, and the computer-readable storage medium may be non- Volatile storage media can also be volatile storage media. Based on this understanding, this application implements all or part of the processes in the above-mentioned implementation methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor 30, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) )Wait.
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器30是所述基于分布式事务的数据处理装置100/终端1的控制中心,利用各种接口和线路连接整个基于分布式事务的数据处理装置100/终端1的各个部分。The so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor 30 is the control center of the distributed transaction-based data processing device 100/terminal 1, using various interfaces Each part of the entire distributed transaction-based data processing device 100/terminal 1 is connected to the line.
所述存储器10用于存储所述计算机程序和/或模块,所述处理器30通过运行或执行存储在所述存储器10内的计算机程序和/或模块,以及调用存储在存储器10内的数据,实现所述 基于分布式事务的数据处理装置100/终端1的各种功能。所述存储器10可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端1的使用所创建的数据等。The memory 10 is used to store the computer program and/or module, and the processor 30 runs or executes the computer program and/or module stored in the memory 10 and calls the data stored in the memory 10, The various functions of the distributed transaction-based data processing device 100/terminal 1 are realized. The memory 10 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created in accordance with the use of the terminal 1 are stored.
在本申请所提供的几个具体实施方式中,应该理解到,所揭露的终端和方法,可以通过其它的方式实现。例如,以上所描述的系统实施方式仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several specific implementation manners provided in this application, it should be understood that the disclosed terminal and method may be implemented in other ways. For example, the system implementation described above is only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
对于本领域技术人员而言,显然本申请实施例不限于上述示范性实施例的细节,而且在不背离本申请实施例的精神或基本特征的情况下,能够以其他的具体形式实现本申请实施例。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请实施例的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请实施例内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。系统、装置或终端权利要求中陈述的多个单元、模块或装置也可以由同一个单元、模块或装置通过软件或者硬件来实现。For those skilled in the art, it is obvious that the embodiments of the present application are not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the embodiments of the present application. example. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the embodiments of the present application is defined by the appended claims rather than the above description, and therefore it is intended to fall on All changes within the meaning and scope of equivalent elements of the claims are included in the embodiments of the present application. Any reference signs in the claims should not be regarded as limiting the claims involved. Multiple units, modules or devices stated in the claims of a system, device or terminal can also be implemented by the same unit, module or device through software or hardware.
以上实施方式仅用以说明本申请实施例的技术方案而非限制,尽管参照以上较佳实施方式对本申请实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本申请实施例的技术方案进行修改或等同替换都不应脱离本申请实施例的技术方案的精神和范围。The above implementation manners are only used to illustrate the technical solutions of the embodiments of the present application, not to limit them. Although the embodiments of the present application are described in detail with reference to the above preferred implementation manners, those of ordinary skill in the art should understand that the technical solutions of the embodiments of the present application Modifications or equivalent replacements of the solutions should not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (20)
- 一种基于分布式事务的数据处理方法,应用于区块链的跨链操作中,其中,所述基于分布式事务的数据处理方法包括:A data processing method based on distributed transactions is applied to cross-chain operations of blockchains, wherein the data processing method based on distributed transactions includes:当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
- 根据权利要求1所述的基于分布式事务的数据处理方法,其中,所述从所述原始数据库中调取所述区块高度差值对应的交易数据的步骤包括:The data processing method based on distributed transactions according to claim 1, wherein the step of retrieving the transaction data corresponding to the block height difference from the original database comprises:调取所述原始数据库中的区块文件;Retrieve the block file in the original database;反序列化所述区块文件中的原始交易数据;Deserialize the original transaction data in the block file;获取所述原始交易数据携带的时间戳;Acquiring the timestamp carried in the original transaction data;根据所述时间戳确定所述原始交易数据中与所述区块高度差值对应的交易数据。The transaction data corresponding to the block height difference in the original transaction data is determined according to the time stamp.
- 根据权利要求2所述的基于分布式事务的数据处理方法,其中,当所述目标数据库包括状态数据库、历史数据库及分布式事务数据库时,所述确定所述区块高度差值对应的交易数据的步骤包括:The data processing method based on distributed transactions according to claim 2, wherein when the target database includes a state database, a history database, and a distributed transaction database, the transaction data corresponding to the block height difference is determined The steps include:计算所述目标数据库与所述原始数据库的区块高度差值集;Calculating a block height difference set between the target database and the original database;确定所述区块高度差值集中差值最大值;Determine the maximum value of the difference in the block height difference concentration;调取所述差值最大值对应的交易数据;Retrieve the transaction data corresponding to the maximum value of the difference;根据所述差值最大值对应的交易数据分别确定所述原始数据库与所述状态数据库、所述历史数据库、所述分布式事务数据库的区块高度差值对应的交易数据。The transaction data corresponding to the block height difference of the original database, the state database, the history database, and the distributed transaction database are respectively determined according to the transaction data corresponding to the maximum value of the difference.
- 根据权利要求3所述的基于分布式事务的数据处理方法,其中,当所述目标数据库为状态数据库和/或历史数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤包括:The data processing method based on distributed transactions according to claim 3, wherein when the target database is a state database and/or a historical database, the transaction type of the transaction data is determined, and the transaction type is determined according to the transaction type. The steps of matching out the target data of the corresponding attribute include:当所述交易类型为普通交易时,获取所述普通交易对应交易数据的key值与value值;When the transaction type is an ordinary transaction, obtain the key value and the value of the transaction data corresponding to the ordinary transaction;当所述交易类型为分布式事务交易时,获取所述分布式事务交易的阶段性质,并根据所述阶段性质确定所述目标数据。When the transaction type is a distributed transaction transaction, the phase nature of the distributed transaction transaction is obtained, and the target data is determined according to the phase nature.
- 根据权利要求4所述的基于分布式事务的数据处理方法,其中,所述根据所述阶段性质确定所述目标数据的步骤包括:The data processing method based on distributed transactions according to claim 4, wherein the step of determining the target data according to the nature of the stage comprises:判断所述阶段性质是否处于第一阶段;Determine whether the nature of the stage is in the first stage;当判断结果为所述阶段性质处于第一阶段时,确定所述分布式事务交易在所述区块文件中的目标位置,并将所述目标位置写入Index数据库中;When the judgment result is that the nature of the phase is in the first phase, determine the target position of the distributed transaction transaction in the block file, and write the target position into the Index database;当判断结果为所述阶段性质处于第二阶段时,确定所述分布式事务交易的交易状态,并当所述交易状态为committed时,根据分布式事务ID获取所述Index数据库中第一阶段对应的目标位置,并根据所述目标位置从所述区块文件中提取所述分布式事务交易的写集的数据key值与value值。When the judgment result is that the nature of the phase is in the second phase, determine the transaction status of the distributed transaction transaction, and when the transaction status is committed, obtain the first phase corresponding to the Index database according to the distributed transaction ID And extract the data key value and value value of the write set of the distributed transaction transaction from the block file according to the target position.
- 根据权利要求3所述的基于分布式事务的数据处理方法,其中,当所述目标数据库为分布式事务数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应 属性的目标数据的步骤包括:The data processing method based on distributed transactions according to claim 3, wherein when the target database is a distributed transaction database, the transaction type of the transaction data is determined, and the corresponding transaction type is matched according to the transaction type. The steps for the target data of the attribute include:判断所述分布式事务交易是否处于第一阶段;Determine whether the distributed transaction transaction is in the first stage;当判断结果为所述分布式事务交易处于第一阶段时,获取所述分布式事务交易的读集与写集;When the judgment result is that the distributed transaction transaction is in the first stage, acquiring the read set and the write set of the distributed transaction transaction;当判断结果为所述分布式事务交易处于第二阶段时,根据分布式事务ID确定并删除所述目标数据库中第一阶段对应交易的读集与写集。When the judgment result is that the distributed transaction transaction is in the second stage, the read set and the write set of the transaction corresponding to the first stage in the target database are determined and deleted according to the distributed transaction ID.
- 根据权利要求1所述的基于分布式事务的数据处理方法,其中,所述方法还包括:The data processing method based on distributed transactions according to claim 1, wherein the method further comprises:调用监控进程获取当前区块链网络的网络数据,其中,所述网络数据包括网络连接数据与负载数据;Invoke the monitoring process to obtain network data of the current blockchain network, where the network data includes network connection data and load data;检测所述网络数据是否存在异常;Detecting whether the network data is abnormal;当检测结果为所述网络数据存在异常时,接收区块高度校验请求。When the detection result is that the network data is abnormal, a block height verification request is received.
- 一种终端,其中,所述终端包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:A terminal, wherein the terminal includes a processor and a memory, and the processor is configured to execute at least one computer-readable instruction stored in the memory to implement the following steps:当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
- 根据权利要求8所述的终端,其中,在所述从所述原始数据库中调取所述区块高度差值对应的交易数据的步骤时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The terminal according to claim 8, wherein, in the step of retrieving the transaction data corresponding to the block height difference from the original database, the processor executes the at least one computer-readable instruction To achieve the following steps:调取所述原始数据库中的区块文件;Retrieve the block file in the original database;反序列化所述区块文件中的原始交易数据;Deserialize the original transaction data in the block file;获取所述原始交易数据携带的时间戳;Acquiring the timestamp carried in the original transaction data;根据所述时间戳确定所述原始交易数据中与所述区块高度差值对应的交易数据。The transaction data corresponding to the block height difference in the original transaction data is determined according to the time stamp.
- 根据权利要求9所述的终端,其中,在当所述目标数据库包括状态数据库、历史数据库及分布式事务数据库时,所述确定所述区块高度差值对应的交易数据的步骤时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The terminal according to claim 9, wherein, when the target database includes a state database, a historical database, and a distributed transaction database, when the step of determining the transaction data corresponding to the block height difference, the The processor executes the at least one computer readable instruction to implement the following steps:计算所述目标数据库与所述原始数据库的区块高度差值集;Calculating a block height difference set between the target database and the original database;确定所述区块高度差值集中差值最大值;Determine the maximum value of the difference in the block height difference concentration;调取所述差值最大值对应的交易数据;Retrieve the transaction data corresponding to the maximum value of the difference;根据所述差值最大值对应的交易数据分别确定所述原始数据库与所述状态数据库、所述历史数据库、所述分布式事务数据库的区块高度差值对应的交易数据。The transaction data corresponding to the block height difference of the original database, the state database, the history database, and the distributed transaction database are respectively determined according to the transaction data corresponding to the maximum value of the difference.
- 根据权利要求10所述的终端,其中,当所述目标数据库为状态数据库和/或历史数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤时,所述处理器执行所述至少一个计算机可读指令还用以实现以下步骤:The terminal according to claim 10, wherein, when the target database is a state database and/or a history database, the transaction type of the transaction data is determined, and the target data corresponding to the attribute is matched according to the transaction type When the processor executes the at least one computer-readable instruction, the processor is also used to implement the following steps:当所述交易类型为普通交易时,获取所述普通交易对应交易数据的key值与value值;When the transaction type is an ordinary transaction, obtain the key value and the value of the transaction data corresponding to the ordinary transaction;当所述交易类型为分布式事务交易时,获取所述分布式事务交易的阶段性质,并根据所述阶段性质确定所述目标数据。When the transaction type is a distributed transaction transaction, the phase nature of the distributed transaction transaction is obtained, and the target data is determined according to the phase nature.
- 根据权利要求11所述的终端,其中,在所述根据所述阶段性质确定所述目标数据的步骤时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The terminal according to claim 11, wherein, in the step of determining the target data according to the nature of the stage, the processor executes the at least one computer-readable instruction to implement the following steps:判断所述阶段性质是否处于第一阶段;Determine whether the nature of the stage is in the first stage;当判断结果为所述阶段性质处于第一阶段时,确定所述分布式事务交易在所述区块文件中的目标位置,并将所述目标位置写入Index数据库中;When the judgment result is that the nature of the phase is in the first phase, determine the target position of the distributed transaction transaction in the block file, and write the target position into the Index database;当判断结果为所述阶段性质处于第二阶段时,确定所述分布式事务交易的交易状态,并当所述交易状态为committed时,根据分布式事务ID获取所述Index数据库中第一阶段对应的目标位置,并根据所述目标位置从所述区块文件中提取所述分布式事务交易的写集的数据key值与value值。When the judgment result is that the nature of the phase is in the second phase, determine the transaction status of the distributed transaction transaction, and when the transaction status is committed, obtain the first phase corresponding to the Index database according to the distributed transaction ID And extract the data key value and value value of the write set of the distributed transaction transaction from the block file according to the target position.
- 根据权利要求10所述的终端,其中,在当所述目标数据库为分布式事务数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:The terminal according to claim 10, wherein, when the target database is a distributed transaction database, the step of determining the transaction type of the transaction data, and matching the target data of the corresponding attribute according to the transaction type When the processor executes the at least one computer-readable instruction to implement the following steps:判断所述分布式事务交易是否处于第一阶段;Determine whether the distributed transaction transaction is in the first stage;当判断结果为所述分布式事务交易处于第一阶段时,获取所述分布式事务交易的读集与写集;When the judgment result is that the distributed transaction transaction is in the first stage, acquiring the read set and the write set of the distributed transaction transaction;当判断结果为所述分布式事务交易处于第二阶段时,根据分布式事务ID确定并删除所述目标数据库中第一阶段对应交易的读集与写集。When the judgment result is that the distributed transaction transaction is in the second stage, the read set and the write set of the transaction corresponding to the first stage in the target database are determined and deleted according to the distributed transaction ID.
- 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer-readable instruction, and when the at least one computer-readable instruction is executed by a processor, the following steps are implemented:当接收到区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;When a block height verification request is received, obtain the database identifier carried in the block height verification request;根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;Determining a target database for performing block height verification operations according to the database identifier;监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;Monitor the height of the first block of the target database and the height of the second block of the original database;检测所述第一区块高度与所述第二区块高度是否一致;Detecting whether the height of the first block is consistent with the height of the second block;当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;When the detection result is that the height of the first block is inconsistent with the height of the second block, calculate the block height difference between the target database and the original database, and retrieve the Transaction data corresponding to the block height difference;确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;Determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;存储所述目标数据至所述目标数据库中。Storing the target data in the target database.
- 根据权利要求14所述的存储介质,其中,在所述从所述原始数据库中调取所述区块高度差值对应的交易数据的步骤时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 14, wherein, in the step of retrieving the transaction data corresponding to the block height difference from the original database, the at least one computer readable instruction is executed by a processor To achieve the following steps:调取所述原始数据库中的区块文件;Retrieve the block file in the original database;反序列化所述区块文件中的原始交易数据;Deserialize the original transaction data in the block file;获取所述原始交易数据携带的时间戳;Acquiring the timestamp carried in the original transaction data;根据所述时间戳确定所述原始交易数据中与所述区块高度差值对应的交易数据。The transaction data corresponding to the block height difference in the original transaction data is determined according to the time stamp.
- 根据权利要求15所述的存储介质,其中,在当所述目标数据库包括状态数据库、历史数据库及分布式事务数据库时,所述确定所述区块高度差值对应的交易数据的步骤时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 15, wherein when the target database includes a state database, a historical database, and a distributed transaction database, when the step of determining the transaction data corresponding to the block height difference, the The at least one computer readable instruction is executed by the processor to implement the following steps:计算所述目标数据库与所述原始数据库的区块高度差值集;Calculating a block height difference set between the target database and the original database;确定所述区块高度差值集中差值最大值;Determine the maximum value of the difference in the block height difference concentration;调取所述差值最大值对应的交易数据;Retrieve the transaction data corresponding to the maximum value of the difference;根据所述差值最大值对应的交易数据分别确定所述原始数据库与所述状态数据库、所述历史数据库、所述分布式事务数据库的区块高度差值对应的交易数据。The transaction data corresponding to the block height difference of the original database, the state database, the history database, and the distributed transaction database are respectively determined according to the transaction data corresponding to the maximum value of the difference.
- 根据权利要求16所述的存储介质,其中,在当所述目标数据库为状态数据库和/或历史数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤时,所述至少一个计算机可读指令被处理器执行还用以实现以下步骤:The storage medium according to claim 16, wherein when the target database is a state database and/or a historical database, the transaction type of the transaction data is determined, and the corresponding attribute is matched according to the transaction type In the step of target data, the at least one computer readable instruction is executed by the processor to implement the following steps:当所述交易类型为普通交易时,获取所述普通交易对应交易数据的key值与value值;When the transaction type is an ordinary transaction, obtain the key value and the value of the transaction data corresponding to the ordinary transaction;当所述交易类型为分布式事务交易时,获取所述分布式事务交易的阶段性质,并根据所述阶段性质确定所述目标数据。When the transaction type is a distributed transaction transaction, the phase nature of the distributed transaction transaction is obtained, and the target data is determined according to the phase nature.
- 根据权利要求17所述的存储介质,其中,在所述根据所述阶段性质确定所述目标数据的步骤时,所述至少一个计算机可读指令被处理器执行时还用以实现以下步骤:18. The storage medium according to claim 17, wherein in the step of determining the target data according to the nature of the stage, the at least one computer readable instruction is further used to implement the following steps when being executed by a processor:判断所述阶段性质是否处于第一阶段;Determine whether the nature of the stage is in the first stage;当判断结果为所述阶段性质处于第一阶段时,确定所述分布式事务交易在所述区块文件中的目标位置,并将所述目标位置写入Index数据库中;When the judgment result is that the nature of the phase is in the first phase, determine the target position of the distributed transaction transaction in the block file, and write the target position into the Index database;当判断结果为所述阶段性质处于第二阶段时,确定所述分布式事务交易的交易状态,并当所述交易状态为committed时,根据分布式事务ID获取所述Index数据库中第一阶段对应的目标位置,并根据所述目标位置从所述区块文件中提取所述分布式事务交易的写集的数据key值与value值。When the judgment result is that the nature of the phase is in the second phase, determine the transaction status of the distributed transaction transaction, and when the transaction status is committed, obtain the first phase corresponding to the Index database according to the distributed transaction ID And extract the data key value and value value of the write set of the distributed transaction transaction from the block file according to the target position.
- 根据权利要求16所述的存储介质,其中,在当所述目标数据库为分布式事务数据库时,所述确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据的步骤时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:The storage medium according to claim 16, wherein when the target database is a distributed transaction database, the transaction type of the transaction data is determined, and the target data of the corresponding attribute is matched according to the transaction type. During the steps, the at least one computer-readable instruction is executed by the processor to implement the following steps:判断所述分布式事务交易是否处于第一阶段;Determine whether the distributed transaction transaction is in the first stage;当判断结果为所述分布式事务交易处于第一阶段时,获取所述分布式事务交易的读集与写集;When the judgment result is that the distributed transaction transaction is in the first stage, acquiring the read set and the write set of the distributed transaction transaction;当判断结果为所述分布式事务交易处于第二阶段时,根据分布式事务ID确定并删除所述目标数据库中第一阶段对应交易的读集与写集。When the judgment result is that the distributed transaction transaction is in the second stage, the read set and the write set of the transaction corresponding to the first stage in the target database are determined and deleted according to the distributed transaction ID.
- 一种基于分布式事务的数据处理装置,应用于区块链的跨链操作中,其中,所述基于分布式事务的数据处理装置包括:A data processing device based on distributed transactions is applied to cross-chain operations of blockchains, wherein the data processing device based on distributed transactions includes:标识获取模块,用于当接收到事务请求方输出的区块高度校验请求时,获取所述区块高度校验请求携带的数据库标识;An identification acquisition module, which is used to acquire the database identification carried in the block height verification request when the block height verification request output by the transaction requester is received;数据库确定模块,用于根据所述数据库标识确定用于执行区块高度校验操作的目标数据库;A database determining module, configured to determine a target database for performing block height verification operations according to the database identifier;高度监听模块,用于监听所述目标数据库的第一区块高度与原始数据库的第二区块高度;The height monitoring module is used to monitor the height of the first block of the target database and the height of the second block of the original database;高度检测模块,用于检测所述第一区块高度与所述第二区块高度是否一致;A height detection module for detecting whether the height of the first block is consistent with the height of the second block;数据调取模块,用于当检测结果为所述第一区块高度与所述第二区块高度不一致时,计算所述目标数据库与所述原始数据库的区块高度差值,并从所述原始数据库中调取所述区块高度差值对应的交易数据;The data retrieval module is used to calculate the block height difference between the target database and the original database when the detection result is that the height of the first block is inconsistent with the height of the second block, and obtain from the Retrieve the transaction data corresponding to the block height difference from the original database;数据匹配模块,用于确定所述交易数据的交易类型,并根据所述交易类型匹配出对应属性的目标数据;The data matching module is used to determine the transaction type of the transaction data, and match the target data of the corresponding attribute according to the transaction type;数据存储模块,用于存储所述目标数据至所述目标数据库中。The data storage module is used to store the target data in the target database.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010467837.2A CN111694852B (en) | 2020-05-28 | 2020-05-28 | Data processing method, device, terminal and storage medium based on distributed transaction |
CN202010467837.2 | 2020-05-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021114627A1 true WO2021114627A1 (en) | 2021-06-17 |
Family
ID=72478467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/099295 WO2021114627A1 (en) | 2020-05-28 | 2020-06-30 | Distributed transaction-based data processing method, device, terminal, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111694852B (en) |
WO (1) | WO2021114627A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112488836B (en) * | 2020-11-30 | 2023-06-02 | 成都质数斯达克科技有限公司 | Transaction transmitting method, device, electronic equipment and readable storage medium |
CN112395300B (en) * | 2021-01-20 | 2021-05-25 | 腾讯科技(深圳)有限公司 | Data processing method, device and equipment based on block chain and readable storage medium |
CN113515534B (en) * | 2021-05-18 | 2023-09-01 | 深圳大学 | Block chain-based concurrent transaction data processing method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165229A (en) * | 2018-08-23 | 2019-01-08 | 北京京东金融科技控股有限公司 | Local the block synchronous method of inspection, device, equipment and storage medium |
CN109272311A (en) * | 2018-09-29 | 2019-01-25 | 亚洲数字科技有限公司 | A kind of across chain flogic system based on digital wallet |
CN109857724A (en) * | 2019-02-12 | 2019-06-07 | 众安信息技术服务有限公司 | The method and apparatus for supporting multitype database is realized based on block chain |
CN110300172A (en) * | 2019-06-28 | 2019-10-01 | 深圳市网心科技有限公司 | A kind of the common recognition method and relevant device of block chain data |
WO2020023828A1 (en) * | 2018-07-27 | 2020-01-30 | Alibaba Group Holding Limited | Blockchain-based cross-chain data operation method and apparatus |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103391311B (en) * | 2013-06-24 | 2016-10-05 | 北京奇虎科技有限公司 | A kind of multi-platform between the method and system of consistency verification of data |
CN107332876B (en) * | 2017-05-31 | 2020-05-08 | 深圳前海微众银行股份有限公司 | Method and device for synchronizing state of blockchain |
WO2019178772A1 (en) * | 2018-03-21 | 2019-09-26 | 深圳蓝贝科技有限公司 | Database master-slave block consistency check method, device and system |
US10972279B2 (en) * | 2018-06-07 | 2021-04-06 | International Business Machines Corporation | Efficient validation for blockchain |
CN110597907B (en) * | 2019-09-10 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Cross-block-chain data information synchronization method, device, equipment and medium |
CN110928950A (en) * | 2019-11-25 | 2020-03-27 | 深圳壹账通智能科技有限公司 | Block chain transaction information management method and device, computer equipment and storage medium |
-
2020
- 2020-05-28 CN CN202010467837.2A patent/CN111694852B/en active Active
- 2020-06-30 WO PCT/CN2020/099295 patent/WO2021114627A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020023828A1 (en) * | 2018-07-27 | 2020-01-30 | Alibaba Group Holding Limited | Blockchain-based cross-chain data operation method and apparatus |
CN109165229A (en) * | 2018-08-23 | 2019-01-08 | 北京京东金融科技控股有限公司 | Local the block synchronous method of inspection, device, equipment and storage medium |
CN109272311A (en) * | 2018-09-29 | 2019-01-25 | 亚洲数字科技有限公司 | A kind of across chain flogic system based on digital wallet |
CN109857724A (en) * | 2019-02-12 | 2019-06-07 | 众安信息技术服务有限公司 | The method and apparatus for supporting multitype database is realized based on block chain |
CN110300172A (en) * | 2019-06-28 | 2019-10-01 | 深圳市网心科技有限公司 | A kind of the common recognition method and relevant device of block chain data |
Also Published As
Publication number | Publication date |
---|---|
CN111694852B (en) | 2024-06-25 |
CN111694852A (en) | 2020-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11444777B2 (en) | Method and system for providing validated, auditable, and immutable inputs to a smart contract | |
CN109791591B (en) | Method and system for identity and credential protection and verification via blockchain | |
JP7028532B2 (en) | Methods, equipment and computer programs for managing the blockchain life cycle | |
US11070360B2 (en) | Parallel transaction validation and block generation in a blockchain | |
US20230269088A1 (en) | Asynchronously determining relational data integrity using cryptographic data structures | |
CN110597908B (en) | Credit recording method, equipment and storage medium based on blockchain | |
WO2021114627A1 (en) | Distributed transaction-based data processing method, device, terminal, and storage medium | |
WO2021114628A1 (en) | Transaction processing method for distributed transactions and related device | |
US11570005B2 (en) | Systems and methods for proving immutability of blockchains | |
WO2020051312A1 (en) | Blockchain timeclock system | |
US12198141B2 (en) | Consensus key locking with fast local storage for idempotent transactions | |
WO2020055413A1 (en) | Blockchain for audit | |
CN114219596B (en) | Data processing method and related equipment based on decision tree model | |
CN113312259A (en) | Interface testing method and device | |
EP3688717A1 (en) | Method for executing smart contracts through electronic processing means using the blockchain technology | |
CN112965900A (en) | Data auditing method, device, server and storage medium based on block chain | |
CN111813829A (en) | Data settlement method, device, electronic device and storage medium | |
CN111899018B (en) | Order data processing method, device, server and storage medium | |
CN111737303A (en) | Data query method, device, computer equipment and storage medium | |
US12198143B2 (en) | Regenerating transaction objects when processing fails on a transaction exchange platform | |
US12198142B2 (en) | Watchdog microservice to resolve locks when processing fails on a transaction exchange platform | |
CN113592645A (en) | Data verification method and device | |
CN113032747B (en) | Display control method, device, terminal and storage medium for management system | |
US20250148476A1 (en) | Consensus Key Locking with Fast Local Storage for Idempotent Transactions | |
CN116483731A (en) | Function testing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20898863 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20898863 Country of ref document: EP Kind code of ref document: A1 |