Request processing method and device

By analyzing the transaction request, querying the main table of the account, and the cutting day status of the bookkeeping system, updating the Japanese account balance and/or account balance in the main table of the account, solving the first to the double balance processing mechanism to the update caused by the update caused The error problem improves the accuracy of the update.

CN119379435APending Publication Date: 2025-01-28BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418905.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the double balance processing mechanism, there may be a problem of first-order and then-order, resulting in errors in processing the balance on the previous day in the main account table.

Method used

Analysis through the receiving transaction request, obtain the account, amount, type, and date of the target transaction; query the main table of the account to obtain the last transaction date; Recorded target trading accounts and/or account balance of the previous day.

Benefits of technology

The problem of error update of the daily account balance in the upper -issue to the problem is solved, and the accuracy of the previous day account balance and/or account balance update have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379435A_ABST
    Figure CN119379435A_ABST
Patent Text Reader

Abstract

The invention provides a request processing method and device, and the method comprises the steps: carrying out the analysis of a received transaction request, so as to obtain a target transaction account, a target transaction amount, a target transaction type, and a target transaction date of a target transaction; according to the target transaction account, querying an account main table to read a last transaction date from the account main table; reading the date switching state of the bookkeeping system at the current moment from the date table; and based on the read day switching state, the target transaction date, the last transaction date, the target transaction amount and the target transaction type, updating the last day account balance and / or account balance of the target transaction account recorded in the account main table. Therefore, by setting the day switching state, the problem that the last-day account balance is wrongly updated in the first-sending and second-arrival problem is solved, and the accuracy of the last-day account balance and / or the account balance updating is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a request processing method and device. Background Art

[0002] At present, many banks adopt a 7×24-hour processing mechanism to provide online account transaction processing 24 hours a day, seven days a week. However, this mechanism requires the bank system to be able to process not only daily online account transactions without interruption, but also to be able to perform batch processing at specific times (such as the end of the day), such as the bank's end-of-day interest settlement, total and branch verification, etc., and these batch processing needs to rely on the balance data of the previous day.

[0003] In the related art, the banking system usually arranges a short batch transaction period after the system switching date to save the current account balance field in the account master table to the previous day's balance field, wherein the execution time of this batch transaction needs to be very short to reduce the impact on daily online account transactions. However, during this batch transaction execution period, the system usually suspends the processing of online account transaction requests. Although the problem of data inconsistency can be avoided, it cannot truly achieve 7×24 uninterrupted processing, and the user experience is poor.

[0004] At present, in order to overcome the above limitations, some banking systems adopt a dual balance processing mechanism, that is, two balance fields are set in the account master table, one is used to record the current balance, that is, the account balance (also known as the account balance of the day), and the other is used to record the balance of the previous day, that is, the balance of the previous day (also known as the account balance of the previous day). During the batch processing at the end of the day, the banking system will automatically update these two fields without suspending online transactions.

[0005] However, the use of the dual balance processing mechanism may cause the problem of "last sent first arrived" or "first sent last arrived" in 7X24 hour transactions. For example, transaction T1 for account A is received at 23:59:59 on D day, and then transaction T2 for account A is received at 00:00:01 on D+1 day. In the dual balance processing mechanism, since the two transactions are received at close times, transaction T2 may be processed first and then transaction T1. At this time, it will cause errors in the processing of the previous day's balance in the account master table. Summary of the invention

[0006] The present application provides a request processing method to solve one of the technical problems in the related art at least to a certain extent. The technical solution of the present application is as follows:

[0007] According to a first aspect of an embodiment of the present application, a request processing method is provided, comprising: parsing a received transaction request to obtain a target transaction account, a target transaction amount, a target transaction type and a target transaction date of a target transaction; querying an account master table according to the target transaction account to read the last transaction date from the account master table; reading the cut-day status of the accounting system at the current moment from the date table; and updating the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the read cut-day status, the target transaction date, the last transaction date, the target transaction amount and the target transaction type.

[0008] According to a second aspect of an embodiment of the present application, a request processing device is provided, including:

[0009] A parsing module, used to parse the received transaction request to obtain a target transaction account, a target transaction amount, a target transaction type and a target transaction date of the target transaction;

[0010] A query module, used for querying an account master table according to the target transaction account, so as to read the last transaction date from the account master table;

[0011] The reading module is used to read the current day-cutting status of the accounting system from the date table;

[0012] An updating module is used to update the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the read cut-day status, the target transaction date, the last transaction date, the target transaction amount and the target transaction type.

[0013] According to the third aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the request processing method as described in the embodiment of the first aspect of the present application.

[0014] According to the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device can execute the request processing method as described in the embodiment of the first aspect of the present application.

[0015] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, including: a computer program, which, when executed by a processor, implements the request processing method as described in the embodiment of the first aspect of the present application.

[0016] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0017] Parse the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction; query the account master table according to the target transaction account to read the last transaction date from the account master table; read the current cut-day status of the accounting system from the date table; update the previous day's account balance and / or account balance of the target transaction account recorded in the account master table based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type. Thus, the problem of the previous day's account balance update error in the first-come-first-served problem is solved; it not only depends on the target transaction date, last transaction date, target transaction amount and target transaction type, but also depends on the current cut-day status of the accounting system to achieve the update of the previous day's account balance and / or account balance of the target transaction account recorded in the account master table, and improve the accuracy of the previous day's account balance and / or account balance update.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0020] Figure 1 is a flowchart of a request processing method shown in the first embodiment of the present application;

[0021] Figure 2 This is a flowchart of a request processing method according to the second embodiment of the present application;

[0022] Figure 3 is a schematic diagram of the structure of a request processing device shown in the third embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0026] It should be noted that in the technical solution of this application, the collection, storage, use, processing, transmission, provision and application of user personal information involved are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0027] In the dual balance processing mechanism, as shown in Table 1, the fields saved in the account master table may include the account balance, the previous day's balance (also known as the previous day's account balance), the last business date (also known as the last transaction date), and the account master table may also save the current system date of the accounting system.

[0028] Table 1 Account Master Table

[0029]

[0030]

[0031] When the dual balance processing mechanism is used to solve the limitation of 7X24 hours trading, there may be a problem of last-come-first-served. For example, a transaction T1 for account A is received at 23:59:59 on D day, and then a transaction T2 for account A is received at 00:00:01 on D+1 day. In the dual balance processing mechanism, transaction T1 is processed first and then transaction T2, which is no problem; however, since the two transactions are received at a close time, transaction T2 may be processed first and then transaction T1. At this time, it may cause errors in the processing of the previous day's balance in the account master table, where the account balance field, previous day's balance field, and last business date field are stored.

[0032] For example, the account balance of account A recorded in the account master table is 1000, the transaction amount of transaction T2 is 200, and the amount of transaction T1 is -100. When processing transaction T2 first, if the current system date of the accounting system (such as the bank core system, financial system, etc.) is greater than the last business date (also known as the last transaction date) of account A recorded in the account master table, then after executing the double balance switch, the account balance of account A recorded in the account master table will be updated to the previous day's balance of account A recorded in the account master table, and based on the transaction T2, the current system date of the accounting system (such as the bank core system, financial system, etc.) will be greater than the last business date (also known as the last transaction date) of account A recorded in the account master table. The transaction amount of Yi T2 is 200, so the account balance of account A recorded in the account master table is updated, and the last business date of account A recorded in the account master table is updated to the current system date. The previous day's balance of account A recorded in the account master table is updated to 1000, and the account balance is updated to 1200; then, when processing transaction T1 on transaction day D, since the current system date of account A recorded in the account master table is equal to the last business date of the account, at this time, no double balance switching is performed, and the previous day's balance of 1000 is wrong.

[0033] In response to the above problems, the present application proposes a request processing method and device.

[0034] The request processing method and device according to the embodiments of the present application are described below with reference to the accompanying drawings.

[0035] Figure 2 It is a flowchart of the request processing method shown in the first embodiment of the present application.

[0036] The embodiment of the present application takes the request processing method being configured in a request processing device as an example. The request processing device can be applied to any electronic device so that the electronic device can perform the request processing function.

[0037] Among them, the electronic device can be any device with computing capabilities, such as a PC (Personal Computer), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0038] like Figure 1 As shown, the request processing method may include the following steps:

[0039] Step 101, parse the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction.

[0040] It should be noted that the target transaction can be uniquely indicated by a unique serial number.

[0041] The target transaction type may be, for example, an outgoing transaction or an incoming transaction.

[0042] In an embodiment of the present application, when a transaction request is received, the received transaction request is parsed to obtain a target transaction account, a target transaction amount, a target transaction type, and a target transaction date of the target transaction.

[0043] In order to accurately obtain the target transaction date of the target transaction, as a possible implementation method, when a transaction request is received, the current date in the date table can be read, and the date read in the date table is used as the target transaction date of the target transaction.

[0044] Step 102, query the account master table according to the target transaction account to read the last transaction date from the account master table.

[0045] It is understandable that the last transaction date of each trading account can be recorded in the account master table. Therefore, in this application, the account master table can be queried based on the target trading account, so as to read the last transaction date of the target trading account from the account master table.

[0046] Step 103, read the current date status of the accounting system from the date table.

[0047] The day-cut status can be used to indicate whether the accounting system has completed the day-cut, wherein the day-cut status includes a first setting status and a second setting status.

[0048] The first setting state is also called the cutting-in-progress state, and the second setting state is also called the cutting-in-progress completion state.

[0049] As a possible implementation method, the switching state can be identified by coding. For example, the first setting state can be identified by 0 and the second setting state can be identified by 1, or the first setting state can be identified by 1 and the second setting state can be identified by 0. This application does not limit the coding used for the switching state.

[0050] Step 104, based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type, the previous day's account balance and / or account balance of the target transaction account recorded in the account master table are updated.

[0051] The request processing method of the embodiment of the present application parses the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction; according to the target transaction account, query the account master table to read the last transaction date from the account master table; read the current cut-day status of the accounting system from the date table; based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type, update the previous day's account balance and / or account balance of the target transaction account recorded in the account master table. Thus, the problem of the previous day's account balance update error in the first-come-first-served problem is solved; not only relying on the target transaction date, last transaction date, target transaction amount and target transaction type, but also relying on the current cut-day status of the accounting system, the previous day's account balance and / or account balance of the target transaction account recorded in the account master table is updated, and the accuracy of the previous day's account balance and / or account balance update is improved.

[0052] In order to clearly explain how, in the above embodiments of the present application, the previous day's account balance and / or account balance of the target transaction account recorded in the account master table is updated based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type, the present application also proposes a request processing method.

[0053] Figure 2 It is a flowchart of the request processing method shown in the second embodiment of the present application.

[0054] like Figure 2 As shown, the request processing method may include the following steps:

[0055] Step 201 , parsing the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction.

[0056] Step 202, query the account master table according to the target transaction account to read the last transaction date from the account master table.

[0057] Step 203, read the current date status of the accounting system from the date table.

[0058] It should be noted that the execution process of steps 201 to 203 can refer to the execution process of any embodiment of the present application and will not be repeated here.

[0059] In order to clearly explain how the cut-day status of the accounting system at the current moment is accurately recorded in the date table in this application, as a possible implementation method, when the current moment of the accounting system belongs to the set time period, the cut-day status in the date table is recorded as the first set state; when the current moment of the accounting system does not belong to the set time period, the cut-day status in the date table is recorded as the second set state.

[0060] Among them, the set time period can be pre-set, for example, the set time period is 00:00:00-00:00:10, 00:00:00-00:00:15, etc. every day, and this application does not impose any restrictions on this.

[0061] Step 204, compare the target transaction date with the last transaction date.

[0062] Step 205 , based on the comparison result, the read cut-day status, the target transaction amount and the target transaction type, the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table are updated.

[0063] Specifically,

[0064] Scenario 1: In response to the target transaction date being less than the last transaction date, and the read transaction date status being the first set status

[0065] It should be noted that, assuming that the target transaction date is T and the last transaction date is T+1, the target transaction date is less than the last transaction date, indicating that the transaction on T+1 was processed first. Therefore, when the read cut-day status is the first set status, the following steps can be performed:

[0066] 1.1 When the target transaction type is entry, the previous day's account balance and account balance of the target transaction account recorded in the account master table are updated based on the target transaction amount and target transaction type.

[0067] As an example, assuming that the target transaction account of the target transaction is A, the target transaction amount is 100, the target transaction type is entry, the previous day account balance of the target transaction account A recorded in the account master table is 1000, and the account balance is 2000. Assuming that the target transaction date of the target transaction is less than the last transaction date, and the read cut-day status is the first set status, then based on the target transaction amount and target transaction type of the target transaction, after the previous day account balance 1000 of the target transaction account recorded in the account master table is updated, the previous day account balance T' of the target transaction account in the updated account master table is:

[0068] T' = 1000 + 100 = 1100; (1)

[0069] Based on the target transaction amount and target transaction type of the target transaction, after the account balance 2000 of the target transaction account recorded in the account master table is updated, the account balance Q' of the target transaction account in the updated account master table is:

[0070] Q' = 2000 + 100 = 2100; (2)

[0071] 1.2 When the target transaction type is outgoing, determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; if the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, based on the target transaction amount and target transaction type, update the previous day's account balance and account balance of the target transaction account recorded in the account master table.

[0072] It is understandable that when the target transaction type is an outgoing transaction, there may be a situation where the account balance of the target transaction account recorded in the account master table is not sufficient to fully pay the target transaction amount. For example, assuming that the target transaction account of the target transaction is B, the target transaction amount is 400, and the target transaction type is an outgoing transaction, the account balance of the target transaction account B recorded in the account master table is 200. At this time, the account balance of 200 cannot fully pay 400. Therefore, when the target transaction type is an outgoing transaction, it can be preferentially determined whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; if the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, the previous day's account balance and / or account balance of the target transaction account recorded in the account master table can be updated based on the target transaction amount and the target transaction type.

[0073] As an example, assuming that the target transaction account of the target transaction is B, the target transaction amount is 400, and the target transaction type is outgoing, the previous day's account balance of the target transaction account B recorded in the account master table is 1000, and the account balance is 2000. Assuming that the target transaction date of the target transaction is less than the last transaction date, and the read cut-day status is the first set status, it is first determined whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table. When it is determined that the target transaction amount of 400 is less than the account balance of 2000 of the target transaction account recorded in the account master table, the previous day's account balance of 1000 of the target transaction account recorded in the account master table is updated based on the target transaction amount and the target transaction type of the target transaction. The previous day's account balance T' of the target transaction account in the updated account master table is:

[0074] T' = 1000 - 400 = 600; (3)

[0075] Based on the target transaction amount and target transaction type of the target transaction, after the account balance 2000 of the target transaction account recorded in the account master table is updated, the account balance Q' of the target transaction account in the updated account master table is:

[0076] Q' = 2000 - 400 = 1700; (4)

[0077] Optionally, when the target transaction type is outgoing payment, if the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table, a first prompt message is generated and sent to prompt the user that the transaction exceeds the limit.

[0078] Therefore, a fault-tolerant mechanism is set up, which can execute the processing of transactions whose transaction date is less than the last transaction date when the accounting system is in the first set state, thereby improving the accuracy of double balance updates, improving the system's fault tolerance, and improving the user experience.

[0079] Scenario 2: In response to the target transaction date being less than the last transaction date, and the read transaction date status being the second set status

[0080] At this time, a second prompt message may be generated and sent to prompt the user that the transaction is abnormal.

[0081] As an example, assuming that the target transaction date is T and the last transaction date is T+1, at this time, the target transaction date is less than the last transaction date, indicating that the transaction on T+1 was processed first. When the read date-cutting status is the second set status, it indicates that the accounting system has completed the date-cutting and can no longer process the transaction on T. At this time, a second prompt message can be generated and sent to prompt the user that the transaction is abnormal.

[0082] Scenario 3: In response to the target transaction date not being less than the last transaction date and the read cut-date status being the second set status

[0083] 3.1 When the target transaction type is entry and the current system date of the accounting system is greater than the last transaction date, firstly, based on the account balance of the target transaction account recorded in the account master table, the previous day's account balance of the target transaction account recorded in the account master table is updated; secondly, based on the target transaction amount and target transaction type, the account balance of the target transaction account recorded in the account master table is updated.

[0084] As an example, assuming that the target transaction account A of the target transaction, the target transaction date is 20240708, the target transaction amount is 200, the target transaction type is account entry, the last transaction date of account A is 20240707, the read cut-date status is the second set status, the current system date of the accounting system is 20240708, the target transaction date of the target transaction is greater than the last transaction date, and the current system date of the accounting system is greater than the last transaction date. At this time, the target transaction is the first transaction processed by the accounting system on the current system date 20240708, and the transaction type is account entry. At this time, firstly, based on the account balance of the target transaction account recorded in the account master table, the previous day's account balance of the target transaction account recorded in the account master table can be updated, for example, the previous day's account balance of the target transaction account in the account master table can be updated to the account balance of the target transaction account recorded in the account master table; secondly, based on the target transaction amount and the target transaction type, the account balance of the target transaction account recorded in the account master table can be updated. Therefore, when the target transaction type is an entry, and the current system date of the accounting system is greater than the last transaction date, the account balance and the previous day's account balance can be updated.

[0085] Optionally, when the target transaction type is an entry, and the current system date of the accounting system is greater than the last transaction date, after the previous day's account balance and the account balance of the target transaction account recorded in the account master table are updated, the last transaction date of the target transaction account recorded in the account master table may also be updated based on the current system date of the accounting system. For example, the current system date of the accounting system may be determined as the last transaction date of the target transaction account in the account master table. In this way, the last transaction date of the target transaction account in the account master table may be updated.

[0086] 3.2 When the target transaction type is an outgoing transaction, and the current system date of the accounting system is greater than the last transaction date, first, based on the account balance of the target transaction account recorded in the account master table, the previous day's account balance of the target transaction account recorded in the account master table is updated; second, it is determined whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; finally, when the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, based on the target transaction amount and the target transaction type, the account balance of the target transaction account recorded in the account master table is updated.

[0087] It should be understood that when the target transaction type is an outgoing transaction and the current system date of the accounting system is greater than the last transaction date, it indicates that the target transaction is the first transaction processed by the accounting system on the current system date. At this time, the account balance of the target transaction account recorded in the account master table is the actual account balance of the previous day. Therefore, the account balance of the target transaction account recorded in the account master table can be updated first; secondly, since the target transaction type is an outgoing transaction, it is necessary to determine whether the account balance of the target transaction account recorded in the account master table is sufficient to pay the target transaction amount, that is, to determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; when the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, it indicates that the account balance of the target transaction account is sufficient to pay, and the account balance can be updated, that is, based on the target transaction amount and the target transaction type, the account balance of the target transaction account recorded in the account master table is updated.

[0088] On the contrary, when the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table, it indicates that the account balance of the target transaction account is insufficient for payment. At this time, there is no need to update the account balance of the target transaction account in the account master table.

[0089] Optionally, when the target transaction type is an outgoing transaction and the current system date of the accounting system is greater than the last transaction date, after the account balance and / or the previous day's account balance of the target transaction account in the account master table are updated, the last transaction date of the target transaction account recorded in the account master table can be updated based on the current system date of the accounting system.

[0090] 3.3 When the target transaction type is entry and the current system date of the accounting system is equal to the last transaction date, the account balance of the target transaction account recorded in the account master table is updated based on the target transaction amount and target transaction type.

[0091] It should be noted that when the target transaction type is entry, and the current system date of the accounting system is equal to the last transaction date, it indicates that the accounting system has processed the transaction on the current system date. At this time, the previous day's account balance of the target transaction account recorded in the account master table is the actual previous day's account balance. There is no need to update the previous day's account balance of the target transaction account recorded in the account master table. You only need to update the account balance of the target transaction account recorded in the account master table.

[0092] 3.4 When the target transaction type is an outgoing transaction, and the current system date of the accounting system is equal to the last transaction date, first, determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; second, when the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, based on the target transaction amount and the target transaction type, update the account balance of the target transaction account recorded in the account master table.

[0093] It should be understood that when the target transaction type is an outgoing transaction, and the current system date of the accounting system is equal to the last transaction date, it indicates that the accounting system has processed the transaction on the current system date, and the previous day's account balance of the target transaction account in the account master table does not need to be updated. It is only necessary to update the account balance of the target transaction account recorded in the account master table based on the target transaction amount and the target transaction type, provided that the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table.

[0094] Therefore, when the target transaction date is not less than the last transaction date and the read cut-day status is the second set status, the account balance and / or the previous day balance is updated, thereby improving the accuracy of the balance update.

[0095] The request processing method of the present application compares the target transaction date with the last transaction date; based on the comparison result, the read cut-day status, the target transaction amount and the target transaction type, the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table are updated. Therefore, it not only depends on the read cut-day status, the target transaction amount and the target transaction type, but also depends on the comparison result of the target transaction date and the last transaction date to achieve the update of the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table, and improve the accuracy of the update of the previous day's account balance and / or the account balance.

[0096] In order to clearly illustrate the request processing method of the present application, the above process is described in detail below with reference to examples.

[0097] As an example, the request processing method of the present application is applied to the transaction processing process of the accounting system. It should be noted that, in addition to the account master table, the accounting system may also include a system date table (referred to as the date table in the present application), wherein the system date table may be used to store the transaction date of the transaction and the system's day-cutting status, and the day-cutting status includes 0-day-cutting (referred to as the first setting status in the present application) and 1-day-cutting completed (referred to as the second setting status in the present application).

[0098] It should also be noted that after the accounting system completes the business processing (or transaction processing) on ​​day T, the system starts batch processing transactions and switches the transaction date to day T+1, and at the same time switches the day-cutting status to 0-mid-day. When the day-cutting status of the accounting system is 0-mid-day, the accounting system can process transactions on day T on day T+1; when the day-cutting status of the accounting system is 1-day-cutting completed, the accounting system is not allowed to process transactions on day T on day T+1.

[0099] When the target transaction occurs in the target account,

[0100] 1. When the transaction date of the target transaction (the date in the system date table read when the transaction is received) is less than the last business date of the target account recorded in the account master table (recorded as the last transaction date in this application), assuming that the transaction date of the transaction is T day and the last business date is T+1 day, it means that the accounting system first processes the transaction of T+1 day under the target account, and then processes the target transaction of T day under the target account. At this time, it is necessary to read the day-cutting status field segment value in the system date table to obtain the day-cutting status of the accounting system at the current moment; when the day-cutting status of the accounting system is 1-day-cutting completion, the transaction reports an error; when the day-cutting status of the accounting system is 0-day-cutting, it is necessary to update the target transaction amount of the target transaction to the previous day's account balance of the target account, that is, based on the target transaction amount and target transaction type (i.e., outgoing and incoming) of the target transaction, the previous day's account balance of the target account in the account master table is updated.

[0101] Optionally, the account balance of the target account in the account master table may also be updated based on the target transaction amount and target transaction type of the target transaction.

[0102] It should be noted that when the target transaction type is an outgoing transaction, it is necessary to first determine whether the account balance of the target account in the account master table is sufficient to pay the target transaction amount, that is, to determine whether the account balance of the target account recorded in the account master table is greater than the target transaction amount, and if the account balance of the target account recorded in the account master table is not less than the target transaction amount, execute the target transaction amount and target transaction type based on the target transaction, and update the account balance of the target account recorded in the account master table and the account balance of the previous day.

[0103] 2. When the transaction date of the target transaction is not less than the last transaction date of the target account recorded in the account master table, and the cut-date status field in the system date table is 1-cut-date completed, in the account interest calculation, total and sub-checking and other businesses, the business data needs to be calculated based on the previous day's balance of the account. Then the dynamic judgment rules for the previous day's balance are as follows:

[0104] 2.1 When the current system date of the accounting system is greater than the last transaction date, it indicates that the target transaction is the first transaction processed by the accounting system on the current system date. At this time, the account balance of the target account recorded in the account master table is the actual account balance of the previous day. Therefore, the account balance of the target account recorded in the account master table can be updated based on the account balance of the target account recorded in the account master table.

[0105] Optionally, the account balance of the target account in the account master table may be updated based on the target transaction amount and the target transaction type of the target transaction.

[0106] It should be noted that when the target transaction type is an outgoing transaction, it is necessary to first determine whether the account balance of the target account in the account master table is sufficient to pay the target transaction amount, that is, to determine whether the account balance of the target account recorded in the account master table is greater than the target transaction amount, and if the account balance of the target account recorded in the account master table is not less than the target transaction amount, execute the operation of updating the account balance of the target account recorded in the account master table based on the target transaction amount and target transaction type of the target transaction.

[0107] 2.2 When the current system date of the accounting system is equal to the last transaction date, it indicates that the accounting system has processed the transaction on the current system date. At this time, the previous day's account balance of the target account recorded in the account master table is the actual previous day's account balance, and there is no need to update the previous day's account balance of the target account recorded in the account master table.

[0108] At this time, the account balance of the target account in the account master table may be updated based on the target transaction amount and target transaction type of the target transaction.

[0109] It is also necessary to understand that during the update process of the day-cut status, a parameterized time point can be defined, and when the time point is reached, the day-cut status field segment value in the system date table is updated.

[0110] In summary, the dual balance mechanism avoids the temporary unavailability of the daily microservice during batch processing, and realizes the 7×24-hour non-stop processing of related businesses. The dual balance mechanism is integrated with the setting of the daily status, which can effectively solve the balance switching problem of first-come-first-served in related businesses. In a certain period of time, even if the system processes some transactions on T+1 day first, it is also allowed to process transactions on T day, which enhances the system's fault tolerance and improves the user experience.

[0111] Corresponding to the request processing method provided in the above embodiment, the present application also provides a request processing device. Since the request processing device provided in the embodiment of the present application corresponds to the request processing method provided in the above embodiment, the implementation method of the request processing method is also applicable to the request processing device provided in the embodiment of the present application, and will not be described in detail in the embodiment of the present application.

[0112] Figure 4 It is a structural diagram of a request processing device shown in the third embodiment of the present application.

[0113] like Figure 3 As shown, the request processing device 300 includes: a parsing module 301, a query module 302, a reading module 303 and an updating module 304.

[0114] The parsing module 301 is used to parse the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction.

[0115] The query module 302 is used to query the account master table according to the target transaction account to read the last transaction date from the account master table.

[0116] The reading module 303 is used to read the current day-cutting status of the accounting system from the date table.

[0117] The updating module 304 is used to update the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type.

[0118] In a possible implementation of the embodiment of the present application, the update module 304 is used to: compare the target transaction date with the last transaction date; and update the previous day's account balance and / or account balance of the target transaction account recorded in the account master table based on the comparison result, the read cut-day status, the target transaction amount and the target transaction type.

[0119] In a possible implementation of the embodiment of the present application, the update module 304 is used to: in response to the target transaction date being less than the last transaction date, the read cut-day status being the first set status and the target transaction type being an entry, update the previous day's account balance and the account balance of the target transaction account recorded in the account master table based on the target transaction amount and the target transaction type; in response to the target transaction date being less than the last transaction date, the read cut-day status being the first set status and the target transaction type being an exit, determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; if the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, update the previous day's account balance and the account balance of the target transaction account recorded in the account master table based on the target transaction amount and the target transaction type.

[0120] In a possible implementation of the embodiment of the present application, the update module 304 is further used to: if the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table, generate and send a first prompt message to prompt the transaction excess.

[0121] In a possible implementation of the embodiment of the present application, the update module 304 is also used to: in response to the target transaction date being less than the last transaction date and the read date-cutting status being the second set status, generate and send a second prompt message to prompt the user of an abnormal transaction.

[0122] In a possible implementation of the embodiment of the present application, the update module 304 is also used to: in response to the target transaction date being not less than the last transaction date, the read cut-date status being the second set status, the target transaction type being account entry, and the current system date of the accounting system being greater than the last transaction date, based on the account balance of the target transaction account recorded in the account master table, update the previous day's account balance of the target transaction account recorded in the account master table; based on the target transaction amount and the target transaction type, update the account balance of the target transaction account recorded in the account master table.

[0123] In a possible implementation of the embodiment of the present application, the update module 304 is also used to: in response to the target transaction date being not less than the last transaction date, the read cut-day status being the second set status, the target transaction type being an outgoing transaction, and the current system date of the accounting system being greater than the last transaction date, based on the account balance of the target transaction account recorded in the account master table, update the previous day's account balance of the target transaction account recorded in the account master table; determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; when the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, update the account balance of the target transaction account recorded in the account master table based on the target transaction amount and the target transaction type.

[0124] In a possible implementation of the embodiment of the present application, the update module 304 is also used to: in response to the target transaction date being not less than the last transaction date, the read cut-day status being the second set status, the target transaction type being an account entry, and the current system date of the accounting system being equal to the last transaction date, based on the target transaction amount and the target transaction type, update the account balance of the target transaction account recorded in the account master table; in response to the target transaction date being not less than the last transaction date, the read cut-day status being the second set status, the target transaction type being an account exit, and the current system date of the accounting system being equal to the last transaction date, determine whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; when the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, based on the target transaction amount and the target transaction type, update the account balance of the target transaction account recorded in the account master table.

[0125] In a possible implementation of the embodiment of the present application, the request processing device 300 may further include:

[0126] The recording module is used to: in response to the current time of the accounting system belonging to the set time period, record the day-cutting state in the date table as the first set state; in response to the current time of the accounting system not belonging to the set time period, record the day-cutting state in the date table as the second set state.

[0127] The request processing device of the embodiment of the present application parses the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction; according to the target transaction account, query the account master table to read the last transaction date from the account master table; read the current cut-day status of the accounting system from the date table; based on the read cut-day status, target transaction date, last transaction date, target transaction amount and target transaction type, update the previous day's account balance and / or account balance of the target transaction account recorded in the account master table. Thus, the problem of the previous day's account balance update error in the first-come-first-served problem is solved; not only relying on the target transaction date, last transaction date, target transaction amount and target transaction type, but also relying on the current cut-day status of the accounting system, the previous day's account balance and / or account balance of the target transaction account recorded in the account master table is updated, and the accuracy of the previous day's account balance and / or account balance update is improved.

[0128] In an exemplary embodiment, an electronic device is also provided.

[0129] Among them, electronic equipment includes:

[0130] processor;

[0131] a memory for storing processor-executable instructions;

[0132] The processor is configured to execute instructions to implement the request processing method proposed in any of the aforementioned embodiments.

[0133] As an example, Figure 4 is a schematic diagram of the structure of an electronic device 400 shown in an exemplary embodiment of the present application. Figure 4 As shown, the electronic device 400 may further include:

[0134] The memory 410 and the processor 420, a bus 430 connecting different components (including the memory 410 and the processor 420), the memory 410 stores a computer program, and when the processor 420 executes the program, the request processing method described in the embodiment of the present application is implemented.

[0135] Bus 430 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0136] The electronic device 400 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 400, including volatile and non-volatile media, removable and non-removable media.

[0137] The memory 410 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 440 and / or cache memory 450. The server 400 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 460 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 430 via one or more data medium interfaces. Memory 410 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.

[0138] A program / utility 480 having a set (at least one) of program modules 470 may be stored, for example, in the memory 410, such program modules 470 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 470 generally perform the functions and / or methods of the embodiments described herein.

[0139] The electronic device 400 may also communicate with one or more external devices 490 (e.g., keyboard, pointing device, display 491, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or may communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 492. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 493. As shown, the network adapter 493 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0140] The processor 420 executes various functional applications and data processing by running the programs stored in the memory 410 .

[0141] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the request processing method of the embodiment of the present application, and will not be repeated here.

[0142] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the request processing method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the request processing method proposed in any of the above embodiments is implemented.

[0144] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions claimed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not claimed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0145] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A request processing method, characterized in that: The method comprises: Parsing the received transaction request to obtain the target transaction account, target transaction amount, target transaction type and target transaction date of the target transaction; According to the target transaction account, query the account master table to read the last transaction date from the account master table; Read the current day-cutting status of the accounting system from the date table; Based on the read cut-day status, the target transaction date, the last transaction date, the target transaction amount and the target transaction type, the previous day account balance and / or the account balance of the target transaction account recorded in the account master table are updated.

2. The method according to claim 1, characterized in that The updating of the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the read cut-day status, the target transaction date, the last transaction date, the target transaction amount and the target transaction type includes: comparing the target transaction date with the last transaction date; Based on the comparison result, the read cut-day status, the target transaction amount and the target transaction type, the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table are updated.

3. The method according to claim 2, characterized in that The updating of the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the comparison result, the read cut-day status, the target transaction amount and the target transaction type includes: In response to the target transaction date being less than the last transaction date, the read cut-day status being the first set status, and the target transaction type being account entry, based on the target transaction amount and the target transaction type, updating the previous day account balance and the account balance of the target transaction account recorded in the account master table; In response to the target transaction date being less than the last transaction date, the read cut-date status being the first set status, and the target transaction type being outgoing, determining whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; If the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, based on the target transaction amount and the target transaction type, the previous day's account balance and the account balance of the target transaction account recorded in the account master table are updated.

4. The method according to claim 3, characterized in that The method further comprises: If the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table, a first prompt message is generated and sent to prompt that the transaction is over-limited.

5. The method according to claim 3, characterized in that: The method further comprises: In response to the target transaction date being less than the last transaction date and the read transaction date status being the second set status, a second prompt message is generated and sent to prompt the user of transaction abnormality.

6. The method according to claim 3, characterized in that The method further comprises: In response to the target transaction date being not less than the last transaction date, the read cut-date status being the second set status, the target transaction type being account entry, and the current system date of the accounting system being greater than the last transaction date, based on the account balance of the target transaction account recorded in the account master table, the previous day's account balance of the target transaction account recorded in the account master table is updated; Based on the target transaction amount and the target transaction type, the account balance of the target transaction account recorded in the account master table is updated.

7. The method according to claim 3, characterized in that The method further comprises: In response to the target transaction date being not less than the last transaction date, the read cut-date status being the second set status, the target transaction type being an outgoing transaction, and the current system date of the accounting system being greater than the last transaction date, based on the account balance of the target transaction account recorded in the account master table, updating the previous day's account balance of the target transaction account recorded in the account master table; Determining whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; When the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, the account balance of the target transaction account recorded in the account master table is updated based on the target transaction amount and the target transaction type.

8. The method according to claim 3, characterized in that The method further comprises: In response to the target transaction date being not less than the last transaction date, the read cut-date status being the second set status, the target transaction type being account entry, and the current system date of the accounting system being equal to the last transaction date, the account balance of the target transaction account recorded in the account master table is updated based on the target transaction amount and the target transaction type; In response to the target transaction date being not less than the last transaction date, the read cut-date status being the second set status, the target transaction type being outgoing, and the current system date of the accounting system being equal to the last transaction date, determining whether the target transaction amount is greater than the account balance of the target transaction account recorded in the account master table; When the target transaction amount is not greater than the account balance of the target transaction account recorded in the account master table, the account balance of the target transaction account recorded in the account master table is updated based on the target transaction amount and the target transaction type.

9. The method according to any one of claims 1 to 8, characterized in that: The record of the cut-day status of the accounting system in the date table includes: In response to the current time of the accounting system belonging to a set time period, recording the day-cutting state in the date table as the first set state; In response to the current time of the accounting system not belonging to the set time period, the day-cutting state in the date table is recorded as the second set state.

10. A request processing device, characterized in that: The device comprises: A parsing module, used to parse the received transaction request to obtain a target transaction account, a target transaction amount, a target transaction type and a target transaction date of the target transaction; A query module, used for querying an account master table according to the target transaction account, so as to read the last transaction date from the account master table; The reading module is used to read the current day-cutting status of the accounting system from the date table; An updating module is used to update the previous day's account balance and / or the account balance of the target transaction account recorded in the account master table based on the read cut-day status, the target transaction date, the last transaction date, the target transaction amount and the target transaction type.