WO2019024583A1 - 交易回滚方法、装置、计算机设备和存储介质 - Google Patents
交易回滚方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2019024583A1 WO2019024583A1 PCT/CN2018/088569 CN2018088569W WO2019024583A1 WO 2019024583 A1 WO2019024583 A1 WO 2019024583A1 CN 2018088569 W CN2018088569 W CN 2018088569W WO 2019024583 A1 WO2019024583 A1 WO 2019024583A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- transaction
- rollback
- target
- identifier
- status
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 application relates to a transaction rollback method, apparatus, computer device and storage medium.
- Transaction rollback refers to the fact that after the customer directly or indirectly conducts the product trading transaction on the Internet (such as fund trading), the data obtained after the execution of the transaction becomes meaningless due to the change of the trading parameters (such as the change in the net value of the unit on the day of the fund transaction).
- the share of the fund purchased by the user has changed, and the fund share obtained by executing the fund transaction is no longer useful, so that the data obtained after the execution of the transaction needs to be restored to the last correct state.
- the traditional transaction rollback method is to perform full rollback of batch transactions after all the received batch transactions are executed.
- the inventors realized that when the number of batch transactions is large, the full rollback of the transaction takes a long time, making the transaction rollback inefficient.
- a transaction rollback method In accordance with various embodiments disclosed herein, a transaction rollback method, apparatus, computer device, and storage medium are provided.
- a transaction rollback method including:
- the rollback mode is a partial rollback carrying a filter condition and a transaction batch identifier, screening a target transaction that satisfies the screening condition from a transaction corresponding to the transaction batch identifier;
- the target transaction is rolled back.
- a transaction rollback device comprising:
- a transaction rollback instruction receiving module configured to receive a transaction rollback instruction, where the transaction rollback instruction carries a rollback mode
- a transaction screening module configured to: if the rollback mode is a partial rollback carrying a filter condition and a transaction batch identifier, screening a target transaction that satisfies the screening condition from a transaction corresponding to the transaction batch identifier;
- a transaction status detecting module configured to detect a transaction status of the target transaction
- the transaction rollback module is configured to roll back the target transaction if the transaction status of the target transaction is processed.
- a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps:
- the rollback mode is a partial rollback carrying a filter condition and a transaction batch identifier, screening a target transaction that satisfies the screening condition from a transaction corresponding to the transaction batch identifier;
- the target transaction is rolled back.
- One or more non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the following steps:
- the rollback mode is a partial rollback carrying a filter condition and a transaction batch identifier, screening a target transaction that satisfies the screening condition from a transaction corresponding to the transaction batch identifier;
- the target transaction is rolled back.
- FIG. 1 is an application environment diagram of a transaction rollback method in accordance with one or more embodiments.
- FIG. 2 is a block diagram of a computer device in accordance with one or more embodiments.
- FIG. 3 is a flow diagram of a transaction rollback method in accordance with one or more embodiments.
- FIG. 4 is a flow diagram of a target transaction rollback method in accordance with one or more embodiments.
- FIG. 5 is a flow diagram of a method for rerolling a partial transaction transaction in accordance with one or more embodiments.
- FIG. 6 is a flow diagram of a bulk transaction full rollback method in accordance with one or more embodiments.
- FIG. 7 is a schematic flow chart of a transaction rollback method in another embodiment.
- FIG. 8 is a block diagram of a transaction rollback device in accordance with one or more embodiments.
- the transaction rollback method provided by the present application can be applied to an application environment as shown in FIG. 1.
- the server 102 communicates with the terminal 104 through the network, the server 102 receives the transaction rollback instruction sent by the terminal 104, and the transaction rollback instruction carries the rollback mode; if the rollback mode is part of the rollback mode carrying the filter condition and the transaction batch identifier, then The target transaction satisfying the screening condition is selected from the transaction corresponding to the transaction batch identifier; the transaction status of the target transaction is detected; if the transaction status of the target transaction is processed, the target transaction is rolled back.
- Server 102 can be implemented as a standalone server or as a server cluster of multiple servers.
- Terminals 104 include, but are not limited to, various personal computers, notebook computers, smart phones, tablets, portable wearable devices, and the like. It should be noted that the transaction rollback method provided by the embodiment of the present application may also be implemented only by the server 102.
- a computer device is provided, the internal structure of which may be as shown in FIG. 2, which may be the server shown in FIG. 1.
- the computer device includes a processor connected by a system bus, a non-volatile storage medium, an internal memory, and a network connection port.
- the non-volatile storage medium can be a non-transitory computer readable storage medium.
- An operating system and computer readable instructions are stored in the non-volatile storage medium for implementing the medical service reservation method applicable to the server provided in the embodiments of the present application.
- This processor is used to improve computing and control capabilities and support the operation of the entire server.
- the internal memory is used to provide an environment for the operation of operating systems and computer readable instructions in a non-volatile storage medium.
- the network interface is used for network communication with the terminal. It will be understood by those skilled in the art that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. Specifically, the computer device may include More or fewer components than shown in the figure, or some components combined, or with different component arrangements.
- a transaction rollback method is provided, which is applied to the server as shown in FIG. 2, and includes the following steps:
- Step 302 Receive a transaction rollback instruction, and the transaction rollback instruction carries a rollback mode.
- Transaction rollback refers to the fact that after the customer directly or indirectly conducts the product trading transaction on the Internet (such as fund trading), the data obtained after the execution of the transaction becomes meaningless due to the change of the trading parameters (such as the net value of the unit on the day of the fund buying transaction).
- the change has caused the share of the fund purchased by the user to change, and the fund share obtained from the previous execution of the fund transaction is no longer useful, so that the data obtained after the execution of the transaction needs to be restored to the last correct state.
- the transaction rollback instruction may be an instruction that is preset to be turned on periodically, or an instruction that the operator initiates in real time through the terminal.
- the server initiates a preset transaction rollback instruction according to a preset open time, such as opening a transaction rollback instruction at 6 pm on the 5th and 25th of 2017, and the transaction rollback instruction carries a rollback indication
- the data of the mode such as the filter rollback instruction carrying the filter condition and the transaction batch identifier, indicates that the rollback mode is a partial rollback in the transaction corresponding to the transaction batch identifier, and if the transaction rollback instruction only carries the transaction
- the batch ID indicates that the rollback mode is the full rollback of the transaction corresponding to the transaction batch ID.
- the terminal operator first inputs data indicating the rollback mode.
- the dimension of the filter condition may be selected in the given filter condition drop-down list, and then the specific content corresponding to the filter condition dimension is input in the text box.
- the filter form, such as the selected filter condition dimension is the transaction product, enter the transaction product name or the transaction product identifier in the text box, and input (or select) in the given batch identification input box (or selection box) to be returned.
- the batch ID of the rolled trade and then send a trade rollback command to the server by clicking the "Send" button.
- the rollback mode includes full rollback and partial rollback.
- the full rollback refers to the rollback of the received batch transaction data
- the batch transaction data may be the transaction data identified by the batch application date.
- the transaction application date may be a specific date (such as July 2, 2017) or a certain time range (such as June 2, 2017 to July 2, 2017).
- Step 304 If the rollback mode is a partial rollback carrying the filter condition and the transaction batch identifier, the target transaction satisfying the screening condition is selected from the transaction corresponding to the transaction batch identifier.
- the screening criteria are based on actual trading needs.
- the screening conditions include at least one of two dimensions of a transaction product and a transaction user.
- the performance form of the transaction product may be a transaction product name, a transaction product type, or a transaction product identifier (such as a product code);
- the transaction user may be in the form of a transaction product holding user name or a transaction product. Hold the user ID (such as the user ID number).
- the screening conditions are not limited to the screening conditions of the two dimensions of the transaction product and the transaction user listed in the embodiment. In the embodiment, the screening conditions of other dimensions may also be determined according to actual transaction requirements.
- the transaction batch identifier is used to uniquely identify the received batch transaction, specifically, the transaction application date, such as batch 20170405, or a deformation based on the transaction application date, such as batches 20170405001 and 20170405002, Is the transaction batch ID generated by the custom rule, such as batch S342209A.
- the number of received transaction batch identifiers is not limited, and may be one or multiple.
- the target transaction is filtered based on the filter criteria and the transaction batch ID in the transaction stored by the server.
- the transactions stored by the server are obtained from a sales platform such as a bank.
- the screening condition is that the fund product identifier is 004282, the transaction batch identifier is 20160504, and the target transaction is in the fund transaction conducted on the day of May 4, 2016, the user purchases or redeems the fund transaction with the fund product identifier 004282.
- the screening condition is that the fund transaction holding user ID is 342401196802058475, the transaction batch identifier is 20160504, 20160505, 20160506, and the target transaction is the user ID 342401196802058475 corresponding user from May 4, 2016 to May 6, 2016 Fund transactions conducted in three days.
- Step 306 detecting the transaction status of the target transaction.
- the transaction status includes three states: pending, in process, and processed. Specifically, after the server receives the transaction data that is uploaded by the terminal and carries the transaction batch identifier, the transaction data is stored in the database and marked as a pending state; the server periodically detects whether there is a transaction in the database to be processed, if any , the transaction status of the transaction is changed to the processing status, and the transaction is executed according to the preset transaction execution rule; when the transaction is successfully executed, such as a fund purchase transaction, the server successfully writes the fund share of the fund transaction. Entering the database and sending it to the user terminal will change the processing status of the transaction to the processed status.
- Step 308 If the transaction status of the target transaction is processed, the target transaction is rolled back.
- the transaction status of the target transaction is processed, it indicates that the target transaction has been processed in the batch transaction being executed, and the target transaction can be rolled back, and has no effect on the non-target transaction in the batch transaction still in the execution state; Or if the batch transaction of the batch in the target transaction has been processed, the target transaction can be rolled back.
- the target transaction needs to be re-executed according to the changed value of the transaction execution parameter, so that the server sends the data obtained after the target transaction is re-executed to the terminal. For example, on March 7, 2017, the customer spent 2,000 yuan to purchase a fund.
- the server obtained the unit net value of the fund on March 7, 2017, which was 1 yuan/share, and told the customer to purchase 2000 funds.
- 2017 On March 8th the fund's unit net value is 1.5 yuan / share, so the server needs to do transaction rollback, the customer's account assets on March 8, 2017 will be converted into the total assets of the account on March 6, 2017, which is Empty, and then re-read the unit's net worth data on March 8, 2017, to calculate the customer's 3,000 yuan assets.
- the step of rolling back the target transaction includes:
- step 318 the data written in the database during the execution of the target transaction is changed to the data before the execution of the target transaction.
- the execution flow of the transaction is pre-set, and the data written to the database during the execution of the transaction is determined.
- the execution process of each fund transaction is: reading the fund transaction type. If the fund transaction type is purchase, the fund transaction amount is read, and the unit net value of the fund transaction application date provided by the fund net value interface is obtained, according to the fund transaction amount. Calculate the user's share with the unit net value, calculate the user's current share of the current account based on the calculated user share and the pre-stored user share share, and obtain the current unit net value of the fund, based on the current user share and the current unit net value.
- the current unit net value is calculated based on the current unit net value of the fund and the pre-stored user history share. Therefore, the data written into the database during the execution of the fund transaction is the user holding share or the user redemption amount. Then, for the rollback of the target transaction, the value corresponding to the user's share of the target transaction (the fund transaction type is purchased) or the user redemption amount (the fund transaction type is redemption) corresponding to the target transaction during the execution process is required. The value is modified to execute the null value before the transaction, and the current net asset value is changed to the historical net asset value before the transaction is executed.
- Step 328 modifying the transaction status of the target transaction to a pending status.
- the transaction status is changed to the "processed” status. Then, for the rollback of the target transaction, the transaction status needs to be changed to the "pending" status.
- the rollback of the target transaction is realized by the program code, instead of the rollback of the target transaction through the database.
- the error location can be located in real time, so that the problem can be solved in time to re-roll the data, and the transaction processing is guaranteed. Timeliness.
- the method further includes:
- Step 502 If the rollback mode is a partial rollback carrying the transaction data, parsing the transaction data to obtain the transaction product identifier, the transaction application date, and the transaction product holding user identifier.
- Transaction data is data generated by a user directly or indirectly through a trading operation on the Internet.
- fund transaction data includes: fund holding user identification, fund transaction type, fund identification, fund transaction application date, transaction amount or user holding share.
- Step 504 If the transaction product identifier is consistent with the preset supplemental transaction product identifier, and the transaction application date is earlier than the current date, the transaction product identifier and the transaction product holding user identifier stored in the search database are the same and the transaction application date is the same. A transaction to be rolled back later than the transaction application date.
- the transaction product identifier is consistent with the preset replenishment transaction product identifier, it indicates that the transaction product is a transaction product that can perform transaction data re-recording operation. And when the transaction application date is earlier than the current date of the system, the current transaction data of the transaction product is to be re-recorded. Then, after the transaction data of the transaction product is added to the system, all the transaction data after the date of the application for the replacement transaction needs to be rolled back before the execution of the transaction data.
- the system does not perform bulk trading every day, but does the transaction re-recording afterwards.
- the transaction application date as the transaction batch identifier as an example, the following description is made: when the transaction with the transaction batch identifier of 20170605 is entered first, and the transaction batch identifier is entered after the transaction of 20170302, the transaction with the transaction batch identifier of 20170302 is executed. Before the transaction data is rolled back, the transaction data identified as the transaction batch of 20170605 is first restored to the state of the transaction batch identifier of 20170301.
- step 506 the transaction to be rolled back is rolled back.
- the single-thread execution mode is adopted. Therefore, before the transaction to be rolled back is performed, the transaction data to be rolled back is directly rolled back after the transaction is confirmed to be rolled back: The data value written into the database during the execution of the roll transaction is changed to the data value before the execution of the transaction to be rolled back, and the transaction state of the transaction to be rolled back is modified to the pending state.
- the method further includes:
- Step 602 If the rollback mode is a full rollback carrying the transaction batch identifier, the transaction corresponding to the transaction batch identifier is obtained.
- the transaction batch identifier is used to uniquely identify the received batch transaction, specifically, the transaction application date, or the deformation of the transaction request date as a base string, or a transaction batch generated by a custom rule. logo, etc.
- the number of received transaction batch identifiers is not limited, and may be one or multiple.
- Step 604 detecting the transaction status of the transaction corresponding to the transaction batch identifier.
- the multi-thread parallel execution mode is used to process the transaction data. Therefore, after acquiring the transaction corresponding to the transaction batch identifier, it is also necessary to detect the transaction status of the transaction.
- the transaction status includes three states: pending, in process, and processed.
- Step 606 If the transaction status of the transaction corresponding to the transaction batch identifier is processed, the transaction corresponding to the transaction batch identifier is rolled back.
- the batch transaction corresponding to the received transaction batch identifier is rolled back: corresponding to the transaction batch identifier
- the data written in the database during the execution of the transaction is changed to execute the data before the transaction corresponding to the transaction batch identifier; the transaction status corresponding to the transaction batch identifier is modified to the pending state.
- a rollback method for partially rolling back a transaction product with a large transaction volume but also a rollback method for performing full rollback of the received batch transaction data is provided, so that the system can perform different manners.
- the rollback improves the flexibility of transaction rollback.
- another transaction rollback method including:
- Step 702 Receive a transaction rollback instruction, and the transaction rollback instruction carries a rollback mode.
- the transaction rollback instruction may be an instruction that is preset to be turned on periodically, or an instruction that the operator initiates in real time through the terminal; the rollback mode includes full rollback and partial rollback.
- Step 704 If the rollback mode is a partial rollback carrying the filter condition and the transaction batch identifier, the target transaction satisfying the screening condition is selected from the transaction corresponding to the transaction batch identifier.
- the screening criteria are based on actual trading needs.
- the screening conditions include at least one of two dimensions of a transaction product and a transaction user.
- the performance form of the transaction product may be a transaction product name, a transaction product type, or a transaction product identifier;
- the transaction user may be in the form of a transaction product holding user name, or may be a transaction product holding user identifier, etc.
- the screening conditions are not limited to the screening conditions of the two dimensions of the transaction product and the transaction user listed in the embodiment. In one embodiment, the screening conditions of other dimensions may also be determined according to actual transaction requirements.
- the transaction batch ID is used to uniquely identify the bulk transaction received.
- the number of the received transaction batch identifiers is not limited, and may be one or multiple.
- Step 706 detecting the transaction status of the target transaction.
- the multi-thread parallel execution mode is used to process the transaction data. Therefore, after finding the target transaction satisfying the screening condition in the received batch transaction, it is necessary to detect the transaction status of the target transaction, and correspondingly according to the transaction status.
- Step 708 If the transaction status of the target transaction is processed, the target transaction is rolled back.
- the transaction status includes three states: pending, in process, and processed. Rollback is only possible after the execution of the target transaction has ended.
- Step 710 If the rollback mode is a partial rollback carrying the transaction data, parsing the transaction data to obtain the transaction product identifier, the transaction application date, and the transaction product holding user identifier.
- Transaction data is data generated by a user directly or indirectly through a trading operation on the Internet.
- fund transaction data includes: fund holding user identification, fund transaction type, fund identification, fund transaction application date, transaction amount or user holding share.
- Step 712 If the transaction product identifier is consistent with the preset supplemental transaction product identifier, and the transaction application date is earlier than the current date, the transaction product identifier and the transaction product holding user identifier stored in the search database are the same and the transaction application date is the same. A transaction to be rolled back later than the transaction application date.
- the transaction product is a transaction product that can perform the transaction data re-recording operation, and when the transaction application date is earlier than the current date of the system, the current transaction product is to be executed. A supplement to the transaction data. Then, after the transaction data of the transaction product is added to the system, all the transaction data after the date of the application for the replacement transaction needs to be rolled back before the execution of the transaction data.
- step 714 the transaction to be rolled back is rolled back.
- the single-thread execution mode is adopted. Therefore, before the transaction of the re-rolling is performed, the transaction data to be rolled back needs to be directly rolled back after the transaction to be rolled back is determined.
- Step 716 If the rollback mode is a full rollback carrying the transaction batch identifier, the transaction corresponding to the transaction batch identifier is obtained.
- Step 718 detecting the transaction status of the transaction corresponding to the transaction batch identifier.
- the transaction data is processed by the multi-thread parallel execution mode. Therefore, after acquiring the transaction corresponding to the transaction batch identifier, it is also necessary to detect the transaction status of the transaction.
- Step 720 If the transaction status of the transaction corresponding to the transaction batch identifier is processed, the transaction corresponding to the transaction batch identifier is rolled back.
- the transaction After obtaining the transaction corresponding to the received transaction batch identifier and determining that the transaction status of the transaction corresponding to the transaction identifier is processed, the transaction is fully rolled back.
- a rollback method for partially rolling back a transaction product with a large transaction volume is provided, but also a rollback method for partially rolling back a transaction product with a small transaction volume due to the double-registration transaction, and
- the rollback method of the full volume rollback of the received batch transaction data enables the system to roll back different ways according to the transaction volume of the transaction product, thereby improving the flexibility of the transaction rollback.
- FIGS. 3-7 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 3-7 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
- a transaction rollback device including a transaction rollback instruction receiving module 802, a transaction screening module 804, a transaction status detection module 806, and a transaction rollback module 808, wherein:
- the transaction rollback instruction receiving module 802 is configured to receive a transaction rollback instruction, and the transaction rollback instruction carries a rollback mode.
- the transaction screening module 804 is configured to: if the rollback mode is a part of the rollback carrying the filter condition and the transaction batch identifier, filter the target transaction that meets the screening condition from the transaction corresponding to the transaction batch identifier.
- the transaction status detection module 806 is configured to detect a transaction status of the target transaction.
- the transaction rollback module 808 is configured to roll back the target transaction if the transaction status of the target transaction is processed.
- the screening condition includes at least one of a transaction product and a transaction product holding user.
- the transaction rollback module 808 is configured to change the data written to the database during the execution of the target transaction to the data before the execution of the target transaction; and modify the transaction status of the target transaction to the pending state.
- the transaction rollback module 808 is further configured to: if the rollback mode is a partial rollback carrying the transaction data, parsing the transaction data to obtain the transaction product identifier, the transaction application date, and the transaction product holding user identifier;
- the product identification is consistent with the preset replenishment transaction product identification, and the transaction application date is earlier than the current date, the search product identifier and the transaction product holding user ID stored in the search database are the same and the transaction application date is later than the transaction application date.
- the transaction to be rolled back; the transaction to be rolled back is rolled back.
- the transaction rollback module 808 is further configured to: if the rollback mode is a full rollback carrying the transaction batch identifier, obtain a transaction corresponding to the transaction batch identifier; and detect a transaction corresponding to the transaction batch identifier The transaction status, if the transaction status of the transaction corresponding to the transaction batch identifier is processed, the transaction corresponding to the transaction batch identifier is rolled back.
- Each of the above-described transaction rollback devices may be implemented in whole or in part by software, hardware, and combinations thereof.
- Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
- a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the processor such that the one or more processors perform the following steps:
- the target transaction satisfying the screening condition is selected from the transaction corresponding to the transaction batch identifier
- the target transaction is rolled back.
- the screening condition includes at least one of a transaction product and a transaction user.
- the step of the processor performing the rollback of the target transaction includes: changing data written in the database during the execution of the target transaction to data before executing the target transaction; and transacting the target transaction The status is changed to the pending status.
- the processor when executing the computer readable instructions, further implements the step of parsing the transaction data to obtain the transaction product identification, the transaction application date, and the transaction product holding if the rollback mode is a partial rollback carrying the transaction data.
- the processor when executing the computer readable instructions, further implements the step of: obtaining a transaction corresponding to the transaction batch identifier if the rollback mode is a full volume rollback carrying the transaction batch identifier; and detecting and trading The transaction status of the transaction corresponding to the batch identifier. If the transaction status of the transaction corresponding to the transaction batch identifier is processed, the transaction corresponding to the transaction batch identifier is rolled back.
- One or more non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the following steps:
- the target transaction satisfying the screening condition is selected from the transaction corresponding to the transaction batch identifier
- the target transaction is rolled back.
- the screening condition includes at least one of a transaction product and a transaction user.
- the computer readable instructions are further executed by the processor to: change the data written to the database during the execution of the target transaction to data prior to execution of the target transaction; and modify the transaction status of the target transaction Is pending status.
- the computer readable instructions are further executed by the processor to: if the rollback mode is a partial rollback carrying the transaction data, parsing the transaction data to obtain the transaction product identification, the transaction application date, and the transaction product holding There is a user identifier; if the transaction product identifier is consistent with the preset replenishment transaction product identifier, and the transaction application date is earlier than the current date, the search product identifier and the transaction product holder user identifier stored in the search database are the same and the transaction application is The transaction to be rolled back later than the transaction application date; and the rollback transaction to be rolled back.
- the computer readable instructions are further executed by the processor to: if the rollback mode is a full rollback carrying the batch identification, obtaining a transaction corresponding to the batch identification; and detecting and trading batches The transaction status of the transaction corresponding to the secondary identification, if the transaction status of the transaction corresponding to the transaction batch identifier is processed, the transaction corresponding to the transaction batch identifier is rolled back.
- Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM) or external cache memory.
- RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- Synchlink DRAM SLDRAM
- Memory Bus Radbus
- RDRAM Direct RAM
- DRAM Direct Memory Bus Dynamic RAM
- RDRAM Memory Bus Dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- General Physics & Mathematics (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
Claims (20)
- 一种交易回滚方法,包括:接收交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求1所述的方法,其特征在于,所述将所述目标交易进行回滚,包括:将所述目标交易在执行过程中写入数据库的数据变更为执行所述目标交易前的数据;及将所述目标交易的交易状态修改为待处理状态。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据预设开启时间启动预设的交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:若所述回滚模式为携带交易数据的部分回滚,则解析所述交易数据得到交易产品标识、交易申请日期和交易产品持有用户标识;若所述交易产品标识与预设补录交易产品标识对比一致,且所述交易申请日期早于当前日期,则查找数据库中存储的与所述交易产品标识和交易产品持有用户标识均相同且交易申请日期晚于所述交易申请日期的待回滚交易;及将所述待回滚交易进行回滚。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:若所述回滚模式为携带交易批次标识的全量回滚,则获取与所述交易批次 标识对应的交易;检测与所述交易批次标识对应的交易的交易状态;及若与所述交易批次标识对应的交易的交易状态为已处理,则将与所述交易批次标识对应的交易进行回滚。
- 一种交易回滚装置,包括:交易回滚指令接收模块,用于接收交易回滚指令,所述交易回滚指令携带回滚模式;交易筛选模块,用于若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;交易状态检测模块,用于检测所述目标交易的交易状态;及交易回滚模块,用于若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求6所述的装置,其特征在于,所述交易回滚模块用于将所述目标交易在执行过程中写入数据库的数据变更为执行所述目标交易前的数据;及将所述目标交易的交易状态修改为待处理状态。
- 根据权利要求6所述的装置,其特征在于,所述装置还包括:交易回滚指令启动模块,用于根据预设开启时间启动预设的交易回滚指令,所述交易回滚指令携带回滚模式;所述交易筛选模块用于若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;所述交易状态检测模块用于检测所述目标交易的交易状态;及所述交易回滚模块用于若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求6所述的装置,其特征在于,所述交易回滚模块还用于若所述回滚模式为携带交易数据的部分回滚,则解析所述交易数据得到交易产品标识、交易申请日期和交易产品持有用户标识;若所述交易产品标识与预设补录交易产品标识对比一致,且所述交易申请日期早于当前日期,则查找数据库中存储的与所述交易产品标识和交易产品持有用户标识均相同且交易申请日期 晚于所述交易申请日期的待回滚交易;及将所述待回滚交易进行回滚。
- 根据权利要求6所述的装置,其特征在于,所述交易回滚模块还用于若所述回滚模式为携带交易批次标识的全量回滚,则获取与所述交易批次标识对应的交易;检测与所述交易批次标识对应的交易的交易状态;及若与所述交易批次标识对应的交易的交易状态为已处理,则将与所述交易批次标识对应的交易进行回滚。
- 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述将所述目标交易进行回滚的步骤,包括:将所述目标交易在执行过程中写入数据库的数据变更为执行所述目标交易前的数据;及将所述目标交易的交易状态修改为待处理状态。
- 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:根据预设开启时间启动预设的交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所 述计算机可读指令时还执行以下步骤:若所述回滚模式为携带交易数据的部分回滚,则解析所述交易数据得到交易产品标识、交易申请日期和交易产品持有用户标识;若所述交易产品标识与预设补录交易产品标识对比一致,且所述交易申请日期早于当前日期,则查找数据库中存储的与所述交易产品标识和交易产品持有用户标识均相同且交易申请日期晚于所述交易申请日期的待回滚交易;及将所述待回滚交易进行回滚。
- 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:若所述回滚模式为携带交易批次标识的全量回滚,则获取与所述交易批次标识对应的交易;检测与所述交易批次标识对应的交易的交易状态;及若与所述交易批次标识对应的交易的交易状态为已处理,则将与所述交易批次标识对应的交易进行回滚。
- 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:将所述目标交易在执行过程中写入数据库的数据变更为执行所述目标交易前的数据;及将所述目标交易的交易状态修改为待处理状态。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令 被所述处理器执行时还执行以下步骤:根据预设开启时间启动预设的交易回滚指令,所述交易回滚指令携带回滚模式;若所述回滚模式为携带筛选条件和交易批次标识的部分回滚,则从与所述交易批次标识对应的交易中筛选出满足所述筛选条件的目标交易;检测所述目标交易的交易状态;及若所述目标交易的交易状态为已处理,则将所述目标交易进行回滚。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:若所述回滚模式为携带交易数据的部分回滚,则解析所述交易数据得到交易产品标识、交易申请日期和交易产品持有用户标识;若所述交易产品标识与预设补录交易产品标识对比一致,且所述交易申请日期早于当前日期,则查找数据库中存储的与所述交易产品标识和交易产品持有用户标识均相同且交易申请日期晚于所述交易申请日期的待回滚交易;及将所述待回滚交易进行回滚。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:若所述回滚模式为携带交易批次标识的全量回滚,则获取与所述交易批次标识对应的交易;检测与所述交易批次标识对应的交易的交易状态;及若与所述交易批次标识对应的交易的交易状态为已处理,则将与所述交易批次标识对应的交易进行回滚。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710643873.8 | 2017-07-31 | ||
| CN201710643873.8A CN107783861B (zh) | 2017-07-31 | 2017-07-31 | 交易回滚方法、装置、存储介质和计算机设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019024583A1 true WO2019024583A1 (zh) | 2019-02-07 |
Family
ID=61437725
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/088569 Ceased WO2019024583A1 (zh) | 2017-07-31 | 2018-05-27 | 交易回滚方法、装置、计算机设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107783861B (zh) |
| WO (1) | WO2019024583A1 (zh) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107783861B (zh) * | 2017-07-31 | 2020-11-24 | 平安科技(深圳)有限公司 | 交易回滚方法、装置、存储介质和计算机设备 |
| CN109240735B (zh) * | 2018-07-27 | 2021-09-24 | 平安科技(深圳)有限公司 | 需求回滚方案填写方法、装置、终端及可读存储介质 |
| CN109493230B (zh) * | 2018-12-28 | 2020-09-15 | 中国银行股份有限公司 | 一种单边交易的补录方法及装置 |
| CN109885422B (zh) * | 2018-12-29 | 2024-01-12 | 贝壳技术有限公司 | 一种房产交易系统中配置平台的数据回滚方法和装置 |
| CN112598520B (zh) * | 2020-12-28 | 2024-06-11 | 中国农业银行股份有限公司 | 交易管理的方法、装置、电子设备以及存储介质 |
| CN113744056A (zh) * | 2021-09-07 | 2021-12-03 | 辽宁振兴银行股份有限公司 | 一种联机交易幂等的方法及装置 |
| CN118115275B (zh) * | 2024-03-07 | 2025-02-11 | 张家港保税数据科技有限公司 | 一种交割服务业务回滚方法和系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102571850A (zh) * | 2010-12-24 | 2012-07-11 | 中国移动通信集团山东有限公司 | 事务提交系统、方法及设备 |
| CN104794138A (zh) * | 2014-01-22 | 2015-07-22 | 深圳市沃信科技有限公司 | 一种数据库交易结果确认方法、装置及系统 |
| CN105659204A (zh) * | 2013-08-13 | 2016-06-08 | 经度事业闪存公司 | 用于进行带有注释的原子写入操作的方法和装置 |
| JP5978008B2 (ja) * | 2012-05-29 | 2016-08-24 | みずほ情報総研株式会社 | 取引管理システム、取引管理方法及び取引管理プログラム |
| CN106991606A (zh) * | 2017-03-29 | 2017-07-28 | 恒生电子股份有限公司 | 交易数据处理方法及装置 |
| CN107783861A (zh) * | 2017-07-31 | 2018-03-09 | 平安科技(深圳)有限公司 | 交易回滚方法、装置、存储介质和计算机设备 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9104630B1 (en) * | 2012-10-24 | 2015-08-11 | Google Inc. | Online account reset, rollback, and backup |
| CN103077019B (zh) * | 2012-12-27 | 2016-07-06 | 中国建设银行股份有限公司 | 一种图形化参数批量维护方法和装置 |
| CN105989133B (zh) * | 2015-02-25 | 2019-10-01 | 阿里巴巴集团控股有限公司 | 事务处理方法及装置 |
-
2017
- 2017-07-31 CN CN201710643873.8A patent/CN107783861B/zh active Active
-
2018
- 2018-05-27 WO PCT/CN2018/088569 patent/WO2019024583A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102571850A (zh) * | 2010-12-24 | 2012-07-11 | 中国移动通信集团山东有限公司 | 事务提交系统、方法及设备 |
| JP5978008B2 (ja) * | 2012-05-29 | 2016-08-24 | みずほ情報総研株式会社 | 取引管理システム、取引管理方法及び取引管理プログラム |
| CN105659204A (zh) * | 2013-08-13 | 2016-06-08 | 经度事业闪存公司 | 用于进行带有注释的原子写入操作的方法和装置 |
| CN104794138A (zh) * | 2014-01-22 | 2015-07-22 | 深圳市沃信科技有限公司 | 一种数据库交易结果确认方法、装置及系统 |
| CN106991606A (zh) * | 2017-03-29 | 2017-07-28 | 恒生电子股份有限公司 | 交易数据处理方法及装置 |
| CN107783861A (zh) * | 2017-07-31 | 2018-03-09 | 平安科技(深圳)有限公司 | 交易回滚方法、装置、存储介质和计算机设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107783861A (zh) | 2018-03-09 |
| CN107783861B (zh) | 2020-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019024583A1 (zh) | 交易回滚方法、装置、计算机设备和存储介质 | |
| US20240242295A1 (en) | Ticket processing | |
| WO2020134989A1 (zh) | Excel数据的导入方法、装置、计算机设备和存储介质 | |
| CN107038645B (zh) | 业务处理方法、装置及系统和服务器 | |
| CA3157818A1 (en) | Method, apparatus, computer device, and storage medium for fusing multi-system multi-store orders | |
| CN108305173B (zh) | 理财产品的交易处理方法、装置、计算机设备和存储介质 | |
| CN105930259A (zh) | 一种web回归测试的方法和装置 | |
| CN105335143A (zh) | 一种业务处理方法及装置 | |
| WO2019033741A1 (zh) | 投资产品的资源处理方法、装置、存储介质和计算机设备 | |
| CN113094414A (zh) | 流转图谱生成方法及装置 | |
| CN113971074B (zh) | 事务处理方法、装置、电子设备及计算机可读存储介质 | |
| CN117874002A (zh) | 一种用于异构数据迁移的方法及系统 | |
| CN110109798A (zh) | 应用程序异常处理方法、装置、计算机设备及存储介质 | |
| CN116521343A (zh) | 资源交互信息处理方法、装置、计算机设备和存储介质 | |
| CN110413614A (zh) | 一种数据表生成的方法及装置 | |
| CN110941948B (zh) | 单据界面的展示方法、装置、设备及存储介质 | |
| CN115564390A (zh) | 一种交易审查方法、装置、电子设备及存储介质 | |
| CN120804457B (zh) | 网页自动化任务的检测方法、装置和电子设备 | |
| CN115599968B (zh) | 交易数据处理方法、装置、计算机设备和存储介质 | |
| CN119538916B (zh) | 一种异常词汇的检测方法、装置、计算机设备及存储介质 | |
| US20260080471A1 (en) | System and method for backtesting economic calendar | |
| CN111507566B (zh) | 物品生产单的生成方法、装置、计算机设备和存储介质 | |
| CN119539720A (zh) | 基于工作流系统的数据处理方法、装置、设备及存储介质 | |
| CN117649303A (zh) | 保全业务受理方法、装置、计算机设备和存储介质 | |
| CN120338908A (zh) | 产品上下架状态识别方法、装置、计算机设备和存储介质 |
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: 18841618 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: 18841618 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.08.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18841618 Country of ref document: EP Kind code of ref document: A1 |