A data processing method and device

By using a preset data table in the processing server to select data for processing based on generation time and status, the problem of poor data processing flexibility in the existing technology is solved, and efficient and accurate processing of multiple pieces of data in the financial industry is achieved.

CN111737262BActive Publication Date: 2024-08-30WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010594611.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-28
Publication Date
2024-08-30
Estimated Expiration
2040-06-28

Smart Images

  • Figure CN111737262B
    Figure CN111737262B
Patent Text Reader

Abstract

A data processing method and device for improving the flexibility of data processing. The processing server selects the data with the latest generation time and the status of pending processing from the data corresponding to the target account in the preset data table as the target data, processes the target data, and updates its status to processing. After obtaining the processing result corresponding to the target data: if the processing fails, the status of the target data in the preset data table is updated to processing failure, and the status of the data with a generation time before the target data in each data is updated to no processing required; if the processing is successful, the status of the target data in the preset data table is updated to processing success. By setting the status of each data in the preset data table, the processing progress of each data can be accurately controlled, so that each data can be processed in order of generation time from near to far, which helps to improve the flexibility of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to a data processing method and device. Background Art

[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming to financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.

[0003] The financial industry (such as banks) generally involves data processing operations, and due to the nature of the financial industry, it is necessary to ensure the accuracy, security and non-loss of data processing operations as much as possible. However, most of the current data processing methods can only process a single piece of data. When processing multiple pieces of data, it is necessary to send processing requests for each piece of data in turn, resulting in poor flexibility of data processing methods.

[0004] In summary, there is an urgent need for a data processing method to improve the flexibility of data processing. Summary of the invention

[0005] The embodiments of the present invention provide a data processing method and device to improve the flexibility of data processing.

[0006] In a first aspect, the present application provides a data processing method, which is applicable to a processing server, and the method includes: the processing server selects the data with the latest generation time and the status to be processed from each data corresponding to the target account in a preset data table as the target data, processes the target data, and updates the status of the target data to being processed. After obtaining the processing result corresponding to the target data: if the processing result is a processing failure, the status of the target data in the preset data table is updated to a processing failure, and the status of the data in each data whose generation time is before the target data is updated to no processing required; if the processing result is a processing success, the status of the target data in the preset data table is updated to a processing success.

[0007] In the above design, by setting a preset data table and setting the status of each piece of data in the preset data table, the processing server can accurately control the processing progress of each piece of data, such as whether the data is being processed, pending, successfully processed, failed to process, or does not need to be processed. In this way, under the condition that the status of each piece of data is known, the processing server can accurately process each piece of data in the order of generation time from recent to distant, so that it is suitable for occasions where users have requirements for the processing time of multiple pieces of data, which helps to improve the flexibility of data processing.

[0008] In a possible design, before the processing server selects the data with the latest generation time and the status of pending processing from each piece of data as the target data, it also determines that there is no data in the status of being processed among each piece of data. In this way, the processing server can avoid processing the data of the account that currently has a processing task, so as to ensure that the next piece of data is processed after the current data of a certain account is processed as much as possible, which helps the data of the account to be accurately processed in the order of generation time from recent to distant.

[0009] In a possible design, if there is data in the processing state among the data, the processing server can re-determine the target account according to the accounts in the preset data table. In this way, when there is a processing task for the current account, the processing server can switch to processing other accounts, so that the data of other accounts can be processed in parallel while waiting for the processing result of the data of the current account, and the data processing efficiency is better.

[0010] In a possible design, the processing server processes the target data, including: the processing server queries the first data value corresponding to the target data from the preset data table, obtains the second data value corresponding to the target account at the current moment, and if the first data value is not greater than the second data value, generates a processing task corresponding to the target data according to the first data value; if the first data value is greater than the second data value, generates a processing task corresponding to the target data according to the second data value, and then updates the status corresponding to the target data in the preset data table to being processed. In this way, the processing server can perform data processing operations each time according to the minimum value of the account data value and the data value of the data, so as to avoid the situation where the account data value is insufficient to support the data value of the data, thereby improving the feasibility of data processing.

[0011] In one possible design, the preset data table is obtained in the following manner: the processing server receives a data processing request, obtains each piece of alternative data corresponding to the account information based on the account information included in the data processing request, determines each piece of data within the time information range included in the data processing request from each piece of alternative data, and adds each piece of data to the preset data table.

[0012] In a possible design, adding the data to the preset data table includes: the processing server selects a piece of unanalyzed data from the data in the order of generation time from recent to distant, determines the first data value corresponding to the data according to the third data value corresponding to the data and the fourth data value corresponding to the account at the current time, adds the data, the account information and the first data value to the preset data table, sets the state of the data in the preset data table to be processed, and executes the above content repeatedly until there is no unanalyzed data in the data. The first data value is the smaller value of the third data value and the fourth data value.

[0013] In a second aspect, the present application provides a data processing device, the device comprising:

[0014] A determination module is used to determine a target account based on each account in a preset data table;

[0015] a processing module, configured to obtain each piece of data corresponding to the target account, select the data with the latest generation time and the status of being processed as the target data from the each piece of data, process the target data, and update the status of the target data to being processed;

[0016] An update module is used to, after obtaining the processing result corresponding to the target data, if the processing result is a processing failure, update the status of the target data in the preset data table to processing failure, and update the status of the data whose generation time is before the target data in each data to no need to be processed; or, if the processing result is a processing success, update the status of the target data in the preset data table to processing success.

[0017] In a possible design, before the processing module selects the data with the latest generation time and the status of being processed from the data as the target data, it is also used to: determine that there is no data in the status of being processed among the data.

[0018] In a possible design, the processing module is further used to: if there is data in the processing status among the data, re-determine the target account according to each account in a preset data table.

[0019] In a possible design, the processing module is specifically used to: query from the preset data table to obtain the first data value corresponding to the target data, obtain the second data value corresponding to the target account at the current moment, if the first data value is not greater than the second data value, generate the processing task corresponding to the target data according to the first data value; or, if the first data value is greater than the second data value, generate the processing task corresponding to the target data according to the second data value; update the status corresponding to the target data in the preset data table to processing.

[0020] In a possible design, the processing module obtains the preset data table in the following manner: first, a data processing request is received, wherein the data processing request includes account information and time information; then, each piece of alternative data corresponding to the account information is obtained, and each piece of data within the time information range is determined from the various pieces of alternative data; and finally, each piece of data is added to the preset data table.

[0021] In a possible design, the processing module is specifically used to: select an unanalyzed piece of data from the pieces of data in the order of generation time from recent to remote, determine the first data value corresponding to the data according to the third data value corresponding to the data and the fourth data value corresponding to the account at the current moment, add the data, the account information and the first data value to the preset data table, and set the state of the data in the preset data table to be processed, and execute the above content in a loop until there is no unanalyzed data in the pieces of data. Wherein, the first data value is the smaller value of the third data value and the fourth data value.

[0022] In a third aspect, the present application provides a computing device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes any data processing method described in the first aspect.

[0023] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program executable by a computing device, wherein when the program is run on the computing device, the computing device executes any of the data processing methods described in the first aspect.

[0024] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of a system architecture of a data processing system is exemplarily shown;

[0027] Figure 2 A schematic diagram showing a flow chart of a data processing method provided by an embodiment of the present application;

[0028] Figure 3 A flowchart showing a refund processing method provided in an embodiment of the present application is exemplified;

[0029] Figure 4 An interactive schematic diagram exemplarily illustrating a working mode of each module provided in an embodiment of the present application;

[0030] Figure 5An interactive schematic diagram exemplarily illustrating another working mode of each module provided in an embodiment of the present application;

[0031] Figure 6 An interactive schematic diagram exemplarily illustrating another working mode of each module provided in an embodiment of the present application;

[0032] Figure 7 A schematic diagram showing the structure of a data processing device provided by an embodiment of the present application is exemplified;

[0033] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application is exemplified. DETAILED DESCRIPTION

[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Figure 1 A schematic diagram of the architecture of a data processing system provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the data processing system may include a bank node 110, a third-party payment institution 120, a server cluster 130 and at least one client, such as client 141, client 142 and client 143. Among them, the bank node 110 can be connected to the third-party payment institution 120, the third-party payment institution 120 can be connected to the server cluster 130, and the server cluster 130 can be connected to each of the at least one client. The communication connection can be a wired communication connection or a wireless communication connection, without limitation.

[0036] like Figure 1 As shown, the server cluster 130 may include multiple processing servers arranged in parallel, such as processing server 1311, processing server 1312, and processing server 1313. Exemplarily, the server cluster 130 may also include a load balancing server 132. When the load balancing server 132 and multiple processing servers are included at the same time, the load balancing server 132 may be connected to each client and each processing server respectively.

[0037] In the embodiment of the present application, the client may refer to any user device that can interact with the user, such as a mobile phone, a tablet computer, a desktop computer, a wearable bracelet, etc. Moreover, the way in which the client interacts with the user is not limited to touch screen, voice, remote control, and brain waves.

[0038] based on Figure 1The refund processing system shown, Figure 2 The flowchart of a data processing method provided by an embodiment of the present application is exemplarily shown, and the method is suitable for processing a server, such as Figure 1 The processing server 1311, the processing server 1312 or the processing server 1313 shown, for example Figure 1 The server cluster 130 is shown. Figure 2 As shown, the method includes:

[0039] Step 201: The processing server determines a target account based on each account in a preset data table.

[0040] In the embodiment of the present application, when there are two or more accounts in the preset data table, the processing server can randomly select one account from the two or more accounts as the target account, or select the target account according to the time sequence in which the data of each account is added to the preset data table. When a piece of data in each target account is processed, the processing server can select the next target account from the preset data table for processing, so as to execute the data processing process and the account analysis process in parallel, thereby improving the efficiency of data processing.

[0041] In an optional implementation manner, the preset data table can be constructed in the following manner:

[0042] The processing server receives a data processing request sent by at least one client, which may include account information and time information. According to the account information in the data processing request, the server obtains various candidate data corresponding to the account information, and then, according to the time information in the data processing request, determines various data within the time information range from the various candidate data, and adds various data to a preset data table.

[0043] Exemplarily, the time information included in the data processing request may include both the start time node and the end time node, or may only include the start time node. A preset duration threshold may also be set in the processing server. If the data processing request includes the start time node and the end time node, and the duration between the two is greater than the duration threshold, the processing server may select the time node corresponding to the duration threshold as the final start time node according to the end time node, and use the alternative data between the final start time node and the end time node in each candidate data as each candidate data corresponding to the account. If the data processing request only includes the start time node, the processing server may calculate the duration between the start time node and the current time node. If the duration is greater than the duration threshold, the time node corresponding to the duration threshold is selected according to the current time node as the final start time node, and the alternative data between the final start time node and the current time node in each candidate data is used as each data corresponding to the account.

[0044] In an optional implementation, after obtaining each piece of data of the account, the processing server can select a piece of unanalyzed data from each piece of data in the order of generation time from recent to distant, and take the smaller value of the third data value corresponding to the data and the fourth data value corresponding to the account at the current moment as the first data value corresponding to the data, and then add the data, the account information and the first data value to the preset data table, and set the status of the data in the preset data table to pending processing. After the analysis of the data is completed, select a piece of unanalyzed data from each piece of data in the order of generation time from recent to distant, and repeat the above content until there is no unanalyzed data in each piece of data, and then each piece of data corresponding to the account is added to the preset data table.

[0045] In an embodiment of the present application, if the processing server receives data processing requests sent by at least two clients at the same time, the processing server can process the data processing requests sent by each client in turn according to a single thread, or it can create multiple threads and use multiple threads to process the data processing requests sent by at least two clients in parallel to improve the efficiency of data processing.

[0046] Step 202, the processing server obtains each piece of data corresponding to the target account, selects the data with the latest generation time and the status of being processed as the target data from each piece of data, processes the target data, and updates the status of the target data to being processed.

[0047] In an optional implementation, after the processing server obtains each piece of data corresponding to the target account, it can query the status of each piece of data of the target account from the preset data table. If there is no data in the state of being processed among the various pieces of data of the target account, the data with the latest generation time and the state of being processed can be selected from the various pieces of data as the target data, and the target data is processed, and the state of the target data is updated to being processed, and then the target account is re-determined according to the various accounts in the preset data table. If there is data in the state of being processed among the various pieces of data of the target account, the target account can be re-determined according to the various accounts in the preset data table. In this way, the processing server can avoid processing the data of the account that currently has a processing task, so as to ensure that the next piece of data is processed after the current data of a certain account is processed as much as possible, which helps the various pieces of data of the account to be accurately processed in the order of generation time from near to far. Moreover, when there is a processing task for the current account, by switching to processing other accounts, the processing server can process the data of other accounts in parallel while waiting for the processing result of the data of the current account, which helps to improve the processing efficiency of the data.

[0048] Exemplarily, the processing server can process the target data in the following manner: query the first data value corresponding to the target data from the preset data table, obtain the second data value corresponding to the target account at the current moment, if the first data value is not greater than the second data value, then generate the processing task corresponding to the target data according to the first data value, if the first data value is greater than the second data value, then generate the processing task corresponding to the target data according to the second data value, and send the processing task to the third-party payment institution, so that the third-party payment institution sends it to the bank node for processing. In addition, the processing server also updates the status corresponding to the target data in the preset data table to processing, so when the target account is reprocessed later, as long as the data has not been processed, the status of the data is always processing, and the processing server will not process the target account, which helps to ensure that the data in the target account is processed in order from recent to distant in terms of generation time.

[0049] Step 203, after obtaining the processing result corresponding to the target data, the processing server determines:

[0050] If the processing result is processing failure, execute step 204;

[0051] If the processing result is successful, execute step 205.

[0052] In an optional implementation, after the processing server obtains the processing task, it can also verify the processing task. If the verification fails, the processing result is determined to be a processing failure. If the verification succeeds, the processing task can be sent to a third-party payment institution for verification by the third-party payment institution. If the third-party payment institution fails to verify, the processing server can receive the verification failure information responded by the third-party payment institution, and then determine that the processing result is a processing failure. If the third-party payment institution verifies successfully, the third-party payment institution can send the processing task to the bank node, and the bank node processes the processing task, and after the processing is completed, the processing result is sent to the processing server through the third-party payment institution.

[0053] Step 204: the processing server updates the status of the target data in the preset data table to processing failure, and updates the status of the data whose generation time is before the target data in each data item to not need to be processed.

[0054] In the embodiment of the present application, if a data in the target account fails to be processed, the processing server will no longer process the data whose generation time is before the generation time of the data, but will wait until the data is successfully processed next time before processing. In this way, the processing server can accurately process the data in the target account in the order of generation time from recent to distant, avoiding the problem of processing the data with an earlier generation time before a certain data is processed, and then making errors when processing the data later.

[0055] Step 205: The processing server updates the status of the target data in the preset data table to processing success.

[0056] In an optional implementation, step 201 and step 202, and step 203 to step 205 may be executed in parallel, that is, the processing server analyzes the data of the account in the preset data table on one thread, and obtains the data processing result and updates the preset data table on another thread. In this way, the efficiency of data processing can be further improved.

[0057] In the above embodiment of the present application, the processing server selects the data with the latest generation time and the state of pending processing from each data corresponding to the target account in the preset data table as the target data, processes the target data, and updates the state of the target data to being processed. After obtaining the processing result corresponding to the target data: if the processing result is a processing failure, the state of the target data in the preset data table is updated to a processing failure, and the state of the data whose generation time is before the target data in each data is updated to not need to be processed. If the processing result is a processing success, the state of the target data in the preset data table is updated to a processing success. In the embodiment of the present application, by setting a preset data table and setting the state of each data in the preset data table, the processing server can accurately control the processing progress of each data, for example, whether the data is in processing, pending, successfully processed, failed to process, or does not need to be processed. In this way, under the condition that the state of each data is known, the processing server can accurately process each data in the order of generation time from near to far, so that it is suitable for occasions where users have requirements for the processing time of multiple data, which helps to improve the flexibility of data processing.

[0058] The following exemplarily introduces the data processing method in the embodiment of the present application by taking the refund scenario as an example. In this example, the processing server is used to refund the funds transferred to the repayment account, and the preset data table corresponds to the refund record table.

[0059] The following is an introduction to some of the terms involved in the refund scenario.

[0060] 1. Repayment account.

[0061] In the embodiment of the present application, the repayment account is set up for the user's loan business. For example, if the user has borrowed 100,000 yuan from Bank A, Bank A will open a repayment account for the user, and the user needs to transfer a fixed repayment amount from his other accounts to the repayment account on time every month. On the repayment date set by the user, Bank A will automatically deduct the money from the user's repayment account and reduce the user's outstanding balance accordingly. In this way, when the user repays 100,000 yuan, the repayment account can be invalidated because the outstanding balance has been paid off. Different loan products can correspond to different repayment accounts, for example, a mortgage corresponds to a mortgage repayment account, and a car loan corresponds to a car loan repayment account.

[0062] 2. The remaining balance of the account and the available balance of the account.

[0063] In the embodiment of the present application, the remaining balance of the account refers to the amount actually stored in the account, and the available balance of the account refers to the amount that the account can use for refund. For example, if the remaining balance of the account is 100, if the account has determined that a refund of 50 is required, then the available balance of the account is 50.

[0064] The refund processing method in the following embodiments is applicable to the repayment account, which is an account specifically used for repayment and cannot be used for other payment behaviors. Based on this, if the user accidentally transfers the wrong money to the repayment account, the user actually has no way to refund the money in the repayment account. In this case, the user can only contact the bank for verification, which makes the repayment process very complicated and the user experience is not good.

[0065] Figure 3 A flowchart of a refund processing method provided in an embodiment of the present application is exemplarily shown, and the method is applicable to a processing server, such as Figure 1 The processing server 1311, the processing server 1312 or the processing server 1313 shown, for example Figure 1 The server cluster 130 is shown. Figure 3 As shown, the method includes:

[0066] Step 301: The processing server receives a refund request, which includes the account information to be refunded and the refund time information.

[0067] In an optional implementation, a repayment APP may be provided on each client, and the user performs the repayment operation by logging into the repayment APP. When the user finds that his repayment operation is wrong, the user can log into the repayment APP, then click the refund button on the repayment APP interface, and fill in the account information to be refunded and the refund time information. Among them, the account information to be refunded may refer to the account number of the repayment account, such as a bank card number. The refund time information may refer to a time node, which is used to indicate that the user wants to refund all incoming transactions from the time node to the current time node. Alternatively, the refund time information may also refer to a time node interval, which is used to indicate that the user wants to refund all incoming transactions in the time node interval.

[0068] In the embodiment of the present application, after the user fills in the account information to be refunded and the refund time information and clicks the submit button, the client can generate a refund request based on the information filled in by the user, and then send the refund request to the processing server. Figure 1As shown, the client can actually send the refund request to the load balancing server 132 first. In this case, the load balancing server 132 can first learn the availability of each processing server, such as the cache status of the central processing unit (CPU), the availability of memory space, etc., and then select the most idle processing server from processing servers 1311 to 1313 as the target server, and send the refund request to the target server for refund processing. In this way, the user's refund request can be sent to a relatively idle processing server for processing each time, which helps to reduce the time the user waits for a refund.

[0069] Step 302: The processing server verifies the refund request:

[0070] If the verification fails, execute step 303;

[0071] If the verification passes, step 304 is executed.

[0072] In the embodiment of the present application, the user may refer to an individual user or a corporate user. When the user is a corporate user, all employees of the enterprise can log in to the repayment APP corresponding to the corporate user, but different employees have different permissions.

[0073] In an optional implementation manner, the processing server verifies the refund request, which may include one or more of the following:

[0074] 1. The processing server verifies whether the payment password of the currently logged-in user is correct.

[0075] In the case where the user is an enterprise user, if the user's payment password is incorrect, it means that the employee is suspected of illegal operation. In this case, the processing server fails to verify the refund request.

[0076] 2. The processing server queries the refund record table for all the incoming transactions in the pending or processing state to see whether there is an incoming transaction corresponding to the account to be refunded.

[0077] In an embodiment of the present application, the refund record table is used to store the account flow that is to be refunded or refunded, and there are five possible states for each account flow: pending, in process, failed to process, successfully processed, and no processing required. If there is an account flow corresponding to an account in the refund record table that is in a pending state or in process, it means that the account is currently processing a refund. In this case, if a new refund corresponding to the account is executed at the same time, there may be a situation where the remaining amount of the account after the refund being processed is completed cannot be refunded. In order to solve this problem, the embodiment of the present application sets only one refund request to be processed in the same time period. In this case, if there is an account flow corresponding to the account to be refunded among all the account flows in the refund record table that are in a pending state or in process, the processing server fails the verification of the refund request.

[0078] The relevant contents of the account entry flow table will be described in detail in the following embodiments, and will not be introduced in detail here.

[0079] Third, the processing server determines whether the balance in the account to be refunded is less than the set amount.

[0080] In the embodiment of the present application, the set amount is used to indicate the refund capability of the account to be refunded. The set amount can be set by a person skilled in the art based on experience, for example, it can be 0 or a number slightly greater than 0. When the balance in the account to be refunded is less than the set amount, the account to be refunded does not have the refund capability, so the processing server fails to verify the refund request. When the balance in the account to be refunded is not less than the set amount, the account to be refunded has the refund capability, so the processing server passes the verification of the refund request, and of course, other content verification can also be performed.

[0081] Fourth, the processing server determines whether the user currently logged into the repayment APP has the repayment authority.

[0082] In an optional implementation, the processing server can query the identity of the currently logged-in employee. If the employee's identity is that of an employee who does not have the ability to repay (such as other employees of the company), the processing server can pass the verification of the refund request. If the employee's identity is that of an employee who has the ability to repay (such as a company legal person), the processing server can pass the verification of the refund request, and can also perform verification of other contents. Of course, this is only an optional implementation. In other optional implementations, the processing server can also determine whether the user who logs in to the repayment APP has the repayment authority in other ways. For example, it can verify the identity card information uploaded by the user to determine whether the user has the repayment authority, or it can notify the user to enter a verification code to determine whether the user has the repayment authority, etc.

[0083] In an optional implementation, in order to ensure the accuracy of the verification, the processing server may perform the above four verification contents on the refund request. When the processing server performs the above four verification contents on the refund request, the refund request verification passes, which may specifically include the following contents: the user's payment password is correct, and there is no account entry corresponding to the account to be refunded in all the account entry flows in the pending state or the processing state in the refund record table, and the balance in the account to be refunded is not less than the set amount, and the user who is currently logged in to the repayment APP has the repayment authority. Correspondingly, the refund request verification fails, which may specifically include the following contents: the user's payment password is incorrect, and there is an account entry corresponding to the account to be refunded in all the account entry flows in the pending state or the processing state in the refund record table, and the balance in the account to be refunded is less than the set amount, and the user who is currently logged in to the repayment APP does not have the repayment authority.

[0084] Step 303: The processing server sends a refund failure message to the client.

[0085] In an optional implementation, when the verification content that causes the verification to fail is different, the corresponding refund failure message is also different, for example:

[0086] If the verification fails due to the user's incorrect payment password, the refund failure message can be "Payment password error". In this way, if the user accidentally enters the wrong payment password and the verification fails, the user can re-enter the correct payment password to re-initiate a refund; or

[0087] If the verification fails because there is an entry corresponding to the account to be refunded in all the entry entries in the pending or processing status in the refund record table, the refund failure message can be "There is a refund being processed, and a refund cannot be initiated temporarily", so that the user knows that he can re-initiate a refund after waiting for a period of time; or,

[0088] If the verification fails because the balance in the account to be refunded is less than the set amount, the refund failure message can be "Insufficient account balance". In this way, if the user must perform a refund, the user can first transfer part of the funds to the account and then re-initiate a refund; or,

[0089] If the verification fails because the user currently logged into the repayment APP does not have the repayment authority, the refund failure message can be "Insufficient authority". In this way, if the user must perform a refund, the user can entrust other employees with refund authority to re-initiate the refund.

[0090] Step 304: The processing server obtains a target account entry that matches the refund time information from the account entry corresponding to the account to be refunded.

[0091] In an embodiment of the present application, the account transactions corresponding to each account can be stored in an account transaction database. In this case, the processing server can first filter out the account transactions corresponding to the account to be refunded from the account transaction database, and then filter out the target account transactions that match the refund time information from these account transactions.

[0092] In an optional implementation manner, the target account flow matching the refund time information may specifically refer to:

[0093] The time of occurrence of the account entry is within the time range specified by the refund time information. For example, when the user selects a starting time node and an ending time node, and the refund time information corresponds to the time node range of 2020.06.01 to 2020.06.11, the account entry matching the refund time information may refer to all the account entry generated by the account to be refunded within the time range of 2020.06.01 to 2020.06.11. Or when the user only selects a starting time point, and the refund time information corresponds to the starting time node of 2020.06.01 and the current time node is 2020.06.21, the account entry matching the refund time information may refer to all the account entry generated by the account to be refunded within the time range of 2020.06.01 to 2020.06.21; or,

[0094] The time of occurrence of the account flow is within the intersection of the preset time span range and the time range defined by the refund time information, where the intersection refers to the intersection closest to the current time. For example, when the user selects a start time node and an end time node, when the refund time information corresponds to the time node range of 2020.06.01 to 2020.06.11, and the preset time span range is 3 days, the account flow matching the refund time information may refer to all the account flow generated by the account to be refunded within the time range of 2020.06.09 to 2020.06.11. Or when the user only selects a start time point, when the refund time information corresponds to the start time node of 2020.06.01, the current time node is 2020.06.21, and the preset time span range is 3 days, the account flow matching the refund time information may refer to all the account flow generated by the account to be refunded within the time range of 2020.06.19 to 2020.06.21. This method uses the most recent account transaction to be refunded as the account transaction to be refunded, so that the refund operation can be executed starting from the most recent account transaction, which helps to improve the real-time and accuracy of the refund.

[0095] Step 305, the processing server extracts a target entry flow from the unprocessed target entry flow in order of time from recent to oldest:

[0096] If there is currently an unprocessed target account entry flow, the processing server executes steps 306 to 307 on the retrieved target account entry flow; or,

[0097] If there is no unprocessed target account entry flow at present, the processing server executes step 308 .

[0098] In the embodiment of the present application, the target account flow time being close means that the time difference between the account flow time of the target account flow and the current time is small, and the target account flow time being far means that the time difference between the account flow time of the target account flow and the current time is large.

[0099] Step 306, the processing server determines whether the entry flow meets the preset refund conditions, if not, execute step 305, if yes, execute step 307.

[0100] In an optional implementation, the processing server may first determine whether the target account entry flow satisfies the preset termination processing rule. If the target account entry flow satisfies the preset termination processing rule, the processing of the account may be terminated directly, that is, the account entry flow that has not been processed in the account will no longer be processed, and then other accounts will be reselected for processing. If the target account entry flow does not meet the preset termination processing rule, it may be determined whether the target account entry flow meets the preset ignore processing rule. If the target account entry flow meets the preset ignore processing rule, it is determined that the target account entry flow does not meet the preset refund condition. The processing server may directly ignore the account entry flow and continue to process the next account entry flow of the account. If the target account entry flow does not meet the preset ignore processing rule, it is determined that the target account entry flow meets the preset refund condition.

[0101] Exemplarily, the termination processing rules may include the following:

[0102] The target account entry has been stored in the refund record table, and the status of the target account entry is successfully processed; or,

[0103] The target account entry flow is stored in the refund record table.

[0104] When the above termination processing rules are met, the processing server may no longer analyze other unprocessed target account flows. This situation applies to each refund when the processing server analyzes the target account flows in order from recent to distant. In this way, as long as there is a target account flow that has been refunded, the target account flows before the entry time of the target account flow (i.e. other unprocessed target account flows) have been refunded, so these target account flows do not need to be analyzed this time.

[0105] It is understandable that the above content is only an illustrative introduction to several possible termination processing rules. As for the specific content of the rules, it can be set by the user according to actual needs, and this application does not limit this.

[0106] Exemplarily, the ignore processing rules may include the following:

[0107] The transferor account of the target account entry is the bank where the account to be refunded is located; in this case, the target account entry corresponds to a loan entry of the user at the bank where the account to be refunded is located. The existence of this entry will not affect other entries, so the processing server can not refund this entry and can continue to select a new target account entry. Or,

[0108] The transferor account of the target deposit flow is not the account under the name of the currently logged-in user; under normal circumstances, only the user himself will transfer funds to his repayment account (i.e. the account to be refunded) for repayment operations. If other users transfer funds to the user's repayment account, it means that there is a problem with the funds, for example, other users may have transferred to the wrong account, or the bank system may have failed. In order to avoid refunding problematic deposit flows, when the above conditions are met, the processing server can directly determine that the target deposit flow does not meet the preset refund conditions. Or,

[0109] The target account flow has been stored in the refund record table, and the status of the target account flow is successfully processed; in this case, if the target account flow has been stored in the refund record table, and the status of the target account flow is successfully processed, it means that the target account flow has been successfully refunded. In order to prevent duplicate refunds, when the above conditions are met, the processing server can also directly determine that the target account flow does not meet the preset refund conditions. Or,

[0110] The target account flow is stored in the refund record table; in this case, as long as the user has previously executed a refund process for the target account flow, no refund will be made to the target account flow in the future, regardless of whether the user's refund is successful or not. This situation takes into account the following scenario: if the bank system does not fail, the refund operation performed by the user will most likely be successful. The refund operation will only fail if the user closes the account immediately after transferring funds to the repayment account. Based on this, if the refund fails due to this scenario, then subsequent refunds will not be successful. Therefore, when the above conditions are met, the processing server can also directly determine that the target account flow does not meet the preset refund conditions.

[0111] In an optional implementation manner, the target account entry flow does not meet the ignore processing rule, and may include the following contents:

[0112] The transferor account of the target account entry is the account under the name of the currently logged-in user, and the target account entry is not stored in the refund record table. This situation is used to indicate that the target account entry is a transfer of funds from the user's other accounts to the account to be refunded, and the user has not previously performed a refund process on the target account entry; or,

[0113] The transferor account of the target account entry is the account under the name of the currently logged-in user, and the target account entry is stored in the refund record table. The status of the target account entry is processing failure or no processing is required. This situation is used to indicate that the target account entry is a transfer of funds from the user's other accounts to the account to be refunded, and although the user has previously performed a refund process on the target account entry, the refund was not successful.

[0114] It is understandable that the above content is only an illustrative introduction to several possible ignore processing rules. As for the specific content of the rules, it can be set by the user according to actual needs, and this application does not limit this.

[0115] Step 307, the processing server determines the refund amount corresponding to the entry flow of the item based on the deposit amount corresponding to the entry flow of the item and the available balance of the account to be refunded, adds the entry flow of the item, the account corresponding to the entry flow of the item, and the refund amount to the refund record table, and sets the status of the entry flow of the item in the refund record table to be processed.

[0116] In the embodiment of the present application, when the account amount corresponding to the target account flow is not greater than the available balance of the account to be refunded, the available balance of the account to be refunded can support the refund of the target account flow. In this case, the refund amount corresponding to the target account flow is the account amount corresponding to the target account flow. When the account amount corresponding to the target account flow is greater than the available balance of the account to be refunded, the available balance of the account to be refunded cannot support the refund of the target account flow. In this case, the refund amount corresponding to the target account flow is the available balance of the account to be refunded. Moreover, after adding the target account flow and its corresponding refund amount to the refund record table, the available balance of the account to be refunded can also be updated to the difference between the available balance of the account to be refunded and the refund amount corresponding to the target account flow. In this way, as long as there is no situation where other amounts are transferred from the account to be refunded midway, the remaining balance of the account to be refunded can be refunded in sequence according to the set refund amount until the remaining balance of the account to be refunded is 0, or the target account flow to be refunded is refunded.

[0117] It should be noted that "adding each target account flow to the refund record table in real time" is only an optional implementation method. In another optional implementation method, a list to be refunded can also be set up first. When a target account flow meets the refund conditions, the target account flow is first added to the list to be refunded, and the next target account flow is analyzed. After all the target account flows corresponding to the account to be refunded are analyzed, the refund record in the list to be refunded is added to the refund record table. The above implementation method is to analyze one account flow at a time, which may cause two adjacent account flows in the refund record table to belong to different accounts with a relatively close generation time. This implementation method is to analyze one account at a time, so that two adjacent account flows in the refund record table belong to the same account with a relatively close generation time. This method can realize account-level refund entry.

[0118] The implementation process of step 301 to step 307 is introduced by taking a specific example below:

[0119] Table 1 exemplifies a refund record table for the current period. It is understandable that the refund record table shown in Table 1 is only an example, and in other examples, the refund record table may also include the refund application time, the refund request amount, the refund transaction time, etc.

[0120] Account Serial number of deposit Refund Status Refund amount Time of deposit A 11 Processing 50 2020.06.09-10:00 B 21 Pending 10 2020.06.09-9:00 B 22 Processing success 30 2020.06.10-12:00 C 31 No treatment required 10 2020.06.09-10:00 C 32 No treatment required 20 2020.06.09-14:00 C 33 Handling failure 50 2020.06.10-15:00 C 34 Processing success 45 2020.06.10-17:00

[0121] Table 1

[0122] As shown in Table 1, in the current period, Account A, Account B and Account C all have account entries to be refunded. Account A has an account entry 11 that is being refunded, Account B has an account entry 21 to be refunded and an account entry 22 that has been successfully refunded, Account C has two account entries 31 and 32 that do not need to be refunded, as well as an account entry 33 for a failed refund and an account entry 34 for a successful refund.

[0123] Table 2 exemplarily shows a target account entry flow table corresponding to account A, account B and account C.

[0124] Account Serial number of deposit Amount of deposit Time of deposit A 11 50 2020.06.09-10:00 B 21 10 2020.06.09-9:00 B 22 30 2020.06.10-12:00 C 31 10 2020.06.09-10:00 C 32 20 2020.06.09-14:00 C 33 50 2020.06.10-15:00 C 34 45 2020.06.10-17:00

[0125] Table 2

[0126] As shown in Table 2, when the user of account A initiates a refund request, the refund request indicates that the amount of the account entry number 11 is to be refunded. Since the account entry number 11 exists in the refund record table 1 of the current period, and the status of the account entry number 11 is being processed, it means that the account entry number 11 is being refunded in the current period. Therefore, the processing server can display a refund failure message to the user, "There is a refund being processed for the account entry number 11, and the refund cannot be initiated temporarily."

[0127] When the user of account B initiates a refund request, the refund request indicates that the amount of the entry serial number 21 and the amount of the entry serial number 22 should be refunded. Since the entry time of the entry serial number 22 is after the entry serial number 21, the entry serial number 22 can be analyzed first and then the entry serial number 21. Since the entry serial number 22 exists in the refund record table 1 of the current period, and the status of the entry serial number 22 is successfully processed, it means that the refund operation of the entry serial number 22 has been successfully performed before the current period. Therefore, the processing server can display a message of "Please do not refund the entry serial number 22 again" or "Refund request is being processed, please wait and try again" or other display content to the user, indicating that the refund failed. In addition, in one case, since the entry serial number 22 with a more recent time has been analyzed, the entry serial number 21 does not need to be analyzed again. In another case, in order to prevent the account serial number 21 from not being refunded in the previous analysis, the account serial number 21 can be analyzed even if the more recent account serial number 22 has been analyzed. In this case, since the account serial number 21 exists in the refund record table 1 of the current period, and the status of the account serial number 21 is pending, it means that the current period is waiting for the refund operation of the account serial number 21. Therefore, the processing server can display a refund failure message to the user, "There is a refund being processed for the account serial number 21, and the refund cannot be initiated temporarily" or "The refund request is being processed, please wait and try again" or other content;

[0128] When the user of account C initiates a refund request, the refund request indicates that the amount of entry serial number 31, the amount of entry serial number 32, the amount of entry serial number 33 and the amount of entry serial number 34 should be refunded. Since the order of entry time from far to near is entry serial number 34, entry serial number 33, entry serial number 32 and entry serial number 31, entry serial number 34 can be analyzed first, then entry serial number 33, then entry serial number 32, and finally entry serial number 31. Since there is entry serial number 34 in the refund record table 1 of the current period, and the status of entry serial number 34 is successfully processed, it means that the refund operation for entry serial number 34 has been successfully performed before the current period. Therefore, the processing server can display a refund failure message to the user such as "Please do not refund entry serial number 34 again" or "Refund request is being processed, please wait and try again" or other content.

[0129] In one case, since the recent entry serial number 34 has been analyzed, the entry serial number 33, the entry serial number 32 and the entry serial number 31 do not need to be analyzed again. In another case, in order to prevent the entry serial number 33, the entry serial number 32 and the entry serial number 31 from not being refunded in the previous analysis, the entry serial number 33, the entry serial number 32 and the entry serial number 31 can also be analyzed even if the recent entry serial number 34 has been analyzed. In this case, since the entry serial number 33 exists in the refund record table 1 of the current period, and the status of the entry serial number 33 is processing failure, it means that the entry serial number 33 waiting for refund before the current period has not been successfully refunded due to some kind of failure. Therefore, the processing server can add the entry serial number 33 to the refund record table, or can also consider the situation of the user canceling the account and directly return the refund failure message "some kind of failure caused the refund of the entry serial number 33 to fail" to the user. Furthermore, since the current period's refund record table 1 contains entry serial number 32 and entry serial number 31, and the status of entry serial number 32 and entry serial number 31 is "no processing required", it means that entry serial number 32 and entry serial number 31 before the current period have not been successfully refunded, so the processing server can add entry serial number 32 and entry serial number 31 to the refund record table, or can also consider the user's account cancellation and directly return to the user a refund failure message "some failure caused the refund of entry serial number 32 and entry serial number 31 to fail". Or, in another case, considering that although these two entry serial numbers have not been successfully refunded, they have actually been stored in the refund record table, but have not been processed, so it is still possible to return to the user a "refund request successful" message.

[0130] Table 3 shows an example of a target entry flow sheet corresponding to another account C.

[0131] Account Serial number of deposit Amount of deposit Time of deposit C 31 10 2020.06.09-10:00 C 32 20 2020.06.09-14:00 C 33 50 2020.06.10-15:00 C 34 45 2020.06.10-17:00 C 35 70 2020.06.11-13:00 C 36 22 2020.06.11-15:00

[0132] Table 3

[0133] As shown in Table 3, when the user of account C initiates a refund request, the refund request indicates that the amount of entry serial number 34, the amount of entry serial number 35, and the amount of entry serial number 36 should be refunded. Since the order of entry time from far to near is entry serial number 36, entry serial number 35, and entry serial number 34, entry serial number 36 can be analyzed first, then entry serial number 35, and then entry serial number 34. When the remaining balance of account C is 80, since there are no entry serial numbers 36 and 35 in the refund record table 1 of the current period, the processing server can add entry serial number 36 and its corresponding refund amount (the smaller value between the available balance 80 and the entry amount 22, i.e. 22) and entry serial number 35 and its corresponding refund amount (the available balance is updated to 58, the smaller value between the available balance 58 and the entry amount 70, i.e. 58) to the refund record table, and set the status of entry serial number 36 and entry serial number 35 to pending, as shown in Table 4. Since there is entry serial number 34 in the refund record table 1 of the current period, and the status of entry serial number 34 is successfully processed, it means that the refund operation for entry serial number 34 has been successfully performed before the current period, so the processing server can display a refund failure message "Please do not refund entry serial number 34 again" to the user. Or, in another case, considering that although no refund was made for this entry, a refund has actually been made successfully in other processing flows, a "refund request successful" message can still be returned to the user.

[0134] Account Serial number of deposit Refund Status Refund amount A 11 Processing 50 B 21 Pending 100 B 22 Processing success 30 C 31 No treatment required 50 C 32 No treatment required 100 C 33 Handling failure 20 C 34 Processing success 70 C 35 Pending 58 C 36 Pending 22

[0135] Table 4

[0136] Step 308, the processing server executes multiple rounds of refund task operations. In two adjacent rounds of refund task operations, the next round of refund task operations is started after waiting for a preset time interval after the previous round of refund task operations is completed. The preset time interval can be set according to user needs, for example, it can be set to 1 minute or 2 minutes.

[0137] For each round of refund task operation, the processing server executes steps 309 to 315.

[0138] Step 309, the processing server selects a target account from the accounts in the refund record table that have not been analyzed for this round of refund task operation, and analyzes the target account entry flow corresponding to the target account in the refund record table:

[0139] When there is a target account entry with a status of "being processed" in the target account entry corresponding to the target account, it means that a refund has been initiated for the target account entry before, and the refund has not yet been processed. In this case, the refund for the target account entry may be successful or unsuccessful, and these two refund results will change the available balance of the target account. Therefore, the refund operation cannot be performed on other target account entries of the account in the current period. In this case, execute step 309, that is, the processing server first turns to analyze the target account entries of other accounts. In the next round of refund task operations, if the target account entry corresponding to the target account is completed, the refund operation can be performed on other target account entries of the target account. Or,

[0140] When there is no target entry flow in the processing state in the target entry flow corresponding to the target account, step 310 is executed.

[0141] It should be noted that in the embodiment of the present application, the processing server can select the target account in the order of time from recent to distant, or can select the target account randomly. Because all accounts will be polled and analyzed once in a refund task operation, how to select the target account has no essential difference to the execution result of this round of refund task operation.

[0142] Step 310, the processing server may select a target account entry flow that has not been analyzed from the target account entry flow corresponding to the target account in order of time from recent to remote, and determine the status of the target account entry flow in the refund record table:

[0143] If the status of the target account entry is successfully processed (indicating that the target account entry has been successfully refunded in the previous refund task operation, and the target account entry does not need to be refunded again), then execute step 310; or,

[0144] If the status of the entry is processing failure, execute step 311; or,

[0145] If the status of the entry is pending, execute step 312.

[0146] Step 311, the processing server updates the status of other target account entry flows in the target account whose generation time is after the generation time of the target account entry flow to no need for processing.

[0147] In an optional implementation, when the status of the target account entry is processing failure, it means that the target account entry failed to be refunded in the previous round of refund task operation. In the case that the target account entry with a relatively recent time has not been successfully refunded, in order to ensure that the amount in the target account can be refunded in sequence according to the original path, in this case, the processing server can also not refund the target account entry whose generation time is after the target account entry with failed refund. In addition, the processing server also needs to update the status of these unprocessed target account entry from pending to no processing, so that when the user re-initiates a refund request for the target account, the processing server can know that there is no pending account entry in the target account, which helps the user's subsequent refund operation to proceed smoothly.

[0148] Step 312, the processing server determines the refundable amount corresponding to the target account entry according to the remaining amount of the target account and the refund amount corresponding to the target account entry, and generates a refund task corresponding to the target account entry according to the target account entry and its corresponding refundable amount. Moreover, since the refund process has been started for the target account entry, the processing server can also update the status of the target account entry in the refund record table to being processed.

[0149] In the embodiment of the present application, when the remaining balance of the target account is not less than the refund amount corresponding to the target account entry, the remaining balance of the target account can support the refund of the target account entry. In this case, the refundable amount corresponding to the target account entry is the refund amount corresponding to the target account entry. When the remaining balance of the target account is less than the refund amount corresponding to the target account entry, the remaining balance of the target account cannot support the refund of the target account entry. In this case, the refundable amount corresponding to the target account entry is the remaining balance of the target account.

[0150] Exemplarily, after the refundable amount is determined, the refundable amount and refund amount corresponding to the target account flow can also be recorded in the refund record table, so as to facilitate subsequent query of detailed refund data based on the refund record table.

[0151] In the embodiment of the present application, the processing server sends the refund task corresponding to the target account flow to the third-party payment institution, so that the third-party payment institution sends the refund task to the bank for refund processing, and the processing server then executes step 309. In this case, after the processing server generates a refund task for a target account flow in the target account, it can no longer analyze other target account flows of the target account, so as to ensure that only one refund task for a target account flow in an account in the same period is executed, and after the task of this target account flow is completed, other target account flows of this account are executed. In this way, even if a transfer-out transaction occurs after the refund of the target account flow, resulting in the remaining balance in the target account being unable to execute the refund of other target account flows, this method can also identify the inability to refund before generating the refund tasks corresponding to other target account flows, thereby helping to improve the accuracy of generating refund tasks and increase the probability of successful refunds.

[0152] In an optional implementation, when the processing server is connected to the bank via a third-party payment institution, the refund task will be verified at least twice as follows before reaching the bank:

[0153] During the verification phase of the processing server, the processing server verifies the legitimacy of the refund task, for example, verifies whether the transferee account name and the transferee institution type of the refund task are consistent. If they are consistent (for example, the transferor account name is a Class I account of Bank of China, and the transferor institution type is Bank of China), the verification is passed, and the processing server can send the refund task to a third-party payment institution for further verification. If they are inconsistent (for example, the transferor account name is a Class I account of Bank of China, and the transferor institution type is Industrial and Commercial Bank of China), the verification fails, and the processing server directly determines that the refund task has failed. In this case, the processing server can directly update the status of the target account entry in the refund record table to processing failure, and can also update the status of other target account entry in the target account whose generation time is before the generation time of the target account entry to no need to be processed.

[0154] During the verification phase of the third-party payment institution, the third-party payment institution conducts a second verification of the legitimacy of the refund task, such as verifying whether the user of the refund task and the transferor account match. If they match (for example, the transferor account is an account under the user name of the refund task), the verification is passed, and the third-party payment institution can send the refund task to the bank, and the bank will perform the refund operation. If they match (for example, the transferor account is not an account under the user name of the refund task), the verification fails, and the third-party payment institution can directly respond to the processing server with an indication message of refund failure. In this case, the processing server can directly update the status of the target account entry in the refund record table to processing failure, and can also update the status of other target account entries in the target account whose generation time is before the generation time of the target account entry to no processing required.

[0155] In the embodiment of the present application, the above is only an optional implementation. In another optional implementation, the processing server can also communicate with the bank directly without transferring to the bank through a third-party payment institution. In this case, if the processing server successfully verifies the refund task corresponding to the entry flow, it can directly send the refund task to the bank for the bank to process the refund.

[0156] Step 313: During the process of executing the refund task operation (this round or each subsequent round), the processing server may also receive the refund result corresponding to the target account entry sent by the third-party payment institution. If the status corresponding to the target account entry in the refund record table is "in process":

[0157] If the refund result corresponding to the entry is a successful refund, then execute step 314; or,

[0158] If the refund result corresponding to the entry transaction of the item is refund failure, execute step 315.

[0159] Step 314, the processing server updates the status of the entry in the refund record table to successful processing.

[0160] Step 315, the processing server updates the status of the target account entry in the refund record table to processing failure, and may update the status of other target account entries in the target account whose generation time is before the generation time of the target account entry to no need for processing.

[0161] In an optional implementation, the refund result corresponding to the target account flow received by the processing server may not be a successful refund or a failed refund, but may be pending or in progress. This may be caused by a problem in the message transmission process between the bank and the processing server. In this case, in order to ensure the accuracy of the refund processing and prevent the occurrence of refund accidents, the processing server may not update the status of the target account flow first, but directly generate an alarm message and send it to the third-party payment institution; or if there is no corresponding alarm interface between the processing server and the third-party payment institution, the processing server may also generate an alarm log, which will be subsequently notified to the third-party payment institution by the operation and maintenance personnel, so that the third-party payment institution can verify and confirm it before determining the subsequent refund process.

[0162] In another optional implementation, the status corresponding to the target account entry in the refund record table may be originally a successful or failed process. If the processing server receives the refund result corresponding to the target account entry again, it means that the third-party payment institution may have repeatedly sent the refund result message of the target account entry to the processing server twice, and the message transmission process of the third-party payment institution may fail. In this case:

[0163] If the refund result corresponding to the target entry flow of the item matches the status corresponding to the target entry flow of the item in the refund record table, for example, the refund result corresponding to the target entry flow of the item is a successful refund and the status corresponding to the target entry flow of the item in the refund record table is a successful processing, or the refund result corresponding to the target entry flow of the item is a failed refund and the status corresponding to the target entry flow of the item in the refund record table is a failed processing, then the processing server may not update the status corresponding to the target entry flow of the item in the refund record table; or,

[0164] If the refund result corresponding to the target entry flow and the status corresponding to the target entry flow in the refund record table do not match, for example, the refund result corresponding to the target entry flow is a successful refund and the status corresponding to the target entry flow in the refund record table is a failed processing, or the refund result corresponding to the target entry flow is a failed refund and the status corresponding to the target entry flow in the refund record table is a successful processing, then it means that the bank's refund process may have a fault. In order to avoid bank accidents, the processing server can also generate an alarm message and send it to the third-party payment institution; or if there is no corresponding alarm interface between the processing server and the third-party payment institution, the processing server can also generate an alarm log, which will be subsequently notified to the third-party payment institution by the operation and maintenance personnel, so that the third-party payment institution and the bank can verify and confirm before determining the subsequent refund process.

[0165] The refund process is described in detail below using the refund record table shown in Table 4 as an example.

[0166] In the first round of refund task operations, the processing server first analyzes account C. Since there is no account entry flow with a status of "being processed" in account C, the processing server can first select an account entry flow 36 with the latest generation time from account C. Since the status of account entry flow 36 is "to be processed", the processing server can generate a refund task corresponding to account entry flow 36 based on account entry flow 36, the corresponding refund amount 22 and the remaining amount of account C. After sending the refund task to the third-party payment institution, the status of account entry flow 36 is updated to "being processed".

[0167] At this time, since there is a refund task being processed in account C and the refund result has not been obtained, the processing server will no longer analyze account C, but will instead analyze account B. Since there is no account entry in the processing status in account B, the processing server can first select an account entry 22 with the latest generation time from account B. The status of account entry 22 is successfully processed, indicating that the refund has been successfully refunded before account entry 22. Therefore, the processing server can no longer analyze account entry 22, but will instead analyze account entry 21. Since the status of account entry 21 is pending, the processing server can generate a refund task corresponding to account entry 21 based on account entry 21, the corresponding refund amount 100, and the remaining amount of account B. After sending the refund task to the third-party payment institution, the status of account entry 21 is updated to being processed.

[0168] At this time, since there is a refund task in progress in account B and the refund result has not been obtained, the processing server will no longer analyze account B, but will instead analyze account A. Account A has an entry flow 11 in the processing state, which means that there is an entry flow 11 in account A that is being refunded and has not yet obtained a refund result. In this case, the processing server can no longer analyze account A. So far, all accounts in the refund record table have been analyzed once in the first round of refund task operations. The first round of refund task operations is completed, and the corresponding refund record table is updated to Table 5.

[0169]

[0170]

[0171] Table 5

[0172] In one possible scenario, the processing server waits for a preset time interval before starting a second round of refund task operations. If during the waiting period, the processing server receives a refund result of entry 11 returned by the third-party payment institution, indicating that the refund is successful, the refund result of entry 21 is a refund failure, and the refund result of entry 36 is a refund success, then the status of entry 11 in the refund processing table can be updated to successful processing, the status of entry 21 can be updated to failed processing, and the status of entry 36 can be updated to successful processing. Next, in the second round of refund task operation, the processing server first analyzes account C. Since there is no account entry flow in the processing status in account C, the processing server can first select an account entry flow 36 with the latest generation time from account C. Since the status of account entry flow 36 is successfully processed, the processing server can not repeat the refund of account entry flow 36, but can select another account entry flow 35 with a later generation time. Since the status of account entry flow 35 is pending, the processing server can generate a refund task corresponding to account entry flow 35 according to account entry flow 35, the refund amount 58 corresponding to account entry flow 35, and the remaining amount of account C. After sending the refund task to the third-party payment institution, the status of account entry flow 35 is updated to being processed. Correspondingly, there is no pending account entry flow in account B and account A, so the processing server can not process the account entry flows in account B and account A. The updated refund record table is shown in Table 6.

[0173]

[0174]

[0175] Table 6

[0176] In another possible situation, the processing server starts the second round of refund task operation after waiting for a preset time interval. If during the waiting period, the processing server receives the refund result of the account flow 11 returned by the third-party payment institution as a successful refund and the refund result of the account flow 36 as a failed refund, then the status of the account flow 11 in the refund processing table can be updated to a successful processing and the status of the account flow 36 can be updated to a failed processing. Since there is an account flow 35 in the account flow in the pending state in account C that is generated later than the account flow 36, considering that the reason for the refund failure may be the cancellation of the user's transfer account, the processing server can also update the status of the account flow 35 in the refund processing table to no processing required. Then, in the second round of refund task operation, there is no pending account flow in account C and account A, and there is an account flow in the processing state in account B, so the processing server can not process the account flows in account C, account B and account A. The updated refund record table is shown in Table 7.

[0177] Account Serial number of deposit Refund Status Refund amount A 11 Processing success 50 B 21 Processing 100 B 22 Processing success 30 C 31 No treatment required 50 C 32 No treatment required 100 C 33 Handling failure 20 C 34 Processing success 70 C 35 No treatment required 58 C 36 Handling failure 22

[0178] Table 7

[0179] In the embodiment of the present application, by carrying the account information and refund time information to be refunded in the refund request, the processing server can perform refund operations on the incoming transactions in the account to be refunded that are within the refund time information range in sequence. This method helps to implement account-level refund operations and can be applied to situations where users have refund requirements for multiple incoming transactions on their accounts, with good flexibility.

[0180] In an optional implementation, the modular concept can also be applied to the refund processing method of the present application to implement the refund operation at the account level in a more fine-grained manner. Figure 2 The refund method flow shown is divided into different modules for processing, wherein the module can be understood as a microservice, or as a server or chip, or as a thread in the server. Exemplarily, in one possible design, a refund request processing module, a refund processing module, and a refund result module can be set in the processing server, the refund request processing module is used to execute the method in steps 301 to 307, the refund processing module is used to execute the method in steps 308 to 312, and the refund result module is used to execute the method in steps 313 to 315. Among them, the refund processing module may include an ignore processing submodule and a termination processing submodule, the ignore processing submodule is used to use the ignore processing rules to determine whether the account flow meets the ignore processing conditions, and the termination processing submodule is used to use the termination processing rules to determine whether the account flow meets the termination processing conditions. In the embodiment of the present application, there are multiple working modes between the refund request processing module, the refund processing module, and the refund result module, such as:

[0181] Figure 4The interactive flow chart of the first working mode is shown as an example. In the first working mode, the refund request processing module, the refund processing module and the refund result module perform their respective tasks in parallel and do not interfere with each other. Specifically, the refund request processing module is responsible for receiving refund requests sent by different clients, determining the account flow to be refunded according to the account information to be refunded and the refund time information in the refund request, analyzing each account flow to be refunded, and adding the account flow to the refund record table when the account flow meets the refund condition. The refund processing module is responsible for analyzing the account flow to be processed in the refund record table at a preset time interval. After each round of analysis, the next round of analysis is started after a preset time interval. The refund result module is responsible for receiving the refund result sent by the third-party payment institution, and updating the status of the account flow being processed in the refund record table according to the refund result. In this working mode, although the three modules do not interfere with each other, they have clear division of labor. Even if one of the modules fails, it will not affect the normal operation of other modules.

[0182] Figure 5 The interactive flow chart of the second working mode is exemplarily shown. In the second working mode, the refund request processing module, the refund processing module and the refund result module mutually notify each other of their working status. Specifically, after the refund request processing module adds all the account flow corresponding to the refund request to the refund record table according to the refund request sent by a client, it can send a first indication message to the refund processing module, and the first indication message carries the identifier (such as the account number) of the account to be refunded corresponding to the client. Correspondingly, after the refund processing module receives the first indication message, it can obtain an account flow corresponding to the account to be refunded from the refund record table, generate a refund task corresponding to the account flow and send it to the third-party payment institution. Correspondingly, after the refund result module receives the refund result corresponding to the account flow sent by the third-party payment institution, in addition to updating the status of the account flow in the refund record table, it can also send a second indication message to the refund processing module, and the second indication message carries the identifier (such as the account flow number) of the account flow. Correspondingly, after the refund processing module receives the second indication message, it can continue to process other account flows corresponding to the account to be refunded. In this working mode, the three modules cooperate with each other by sending instructions, which helps to improve the real-time processing of refunds. However, if one module fails in this mode, the other modules will not receive the instruction information of the module, so the other modules will not process other account flows, resulting in interruption of refund processing.

[0183] Figure 6The interactive flow chart of the third working mode is exemplified. In the third working mode, the refund request processing module, the refund processing module and the refund result module perform their respective work in parallel, and can also notify each other of their working status. In this mode, if the refund processing module receives the first indication information sent by the refund request processing module, it can process the account flow according to the above-mentioned second working mode. At the same time, after processing an account flow, even if the second indication information sent by the refund result module is not received, the refund processing module can continue to process the account flow of other accounts according to the above-mentioned first working mode, or can wait for a preset interval time to continue processing other account flows of the account. In this way, even if the refund request processing module does not send the first indication information to the refund processing module, or even if the refund result module does not send the second indication information to the refund processing module, the processing process of the refund processing module will not be interrupted. This mode can ensure the real-time nature of the refund processing and the continuous availability of the refund processing.

[0184] In view of the above method flow, an embodiment of the present invention further provides a data processing device, and the specific content of the device can be implemented with reference to the above method.

[0185] Figure 7 A structural diagram of a data processing device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the data processing device 700 includes:

[0186] A determination module 701 is used to determine a target account according to each account in a preset data table;

[0187] A processing module 702 is used to obtain each piece of data corresponding to the target account, select the data with the latest generation time and the status of being processed as the target data from the various pieces of data, process the target data, and update the status of the target data to being processed;

[0188] The updating module 703 is used for obtaining the processing result corresponding to the target data:

[0189] If the processing result is a processing failure, the state of the target data in the preset data table is updated to a processing failure, and the state of the data whose generation time is before the target data in the data is updated to no need to be processed; or

[0190] If the processing result is successful, the status of the target data in the preset data table is updated to successful processing.

[0191] Optionally, before the processing module 702 selects the data with the latest generation time and the state of being processed as the target data from the various pieces of data, it is further configured to:

[0192] It is determined that no data in a processing state exists among the data.

[0193] Optionally, the processing module 702 is further configured to:

[0194] If there is data in the processing state among the data, the target account is re-determined according to each account in the preset data table.

[0195] Optionally, the processing module 702 is specifically configured to:

[0196] Obtaining a first data value corresponding to the target data from the preset data table;

[0197] Obtaining a second data value corresponding to the target account at the current moment;

[0198] If the first data value is not greater than the second data value, generating a processing task corresponding to the target data according to the first data value; or,

[0199] If the first data value is greater than the second data value, generating a processing task corresponding to the target data according to the second data value;

[0200] The status corresponding to the target data in the preset data table is updated to being processed.

[0201] Optionally, the processing module 702 obtains the preset data table in the following manner:

[0202] receiving a data processing request; the data processing request including account information and time information;

[0203] Acquire each candidate data corresponding to the account information, and determine each data within the time information range from the each candidate data;

[0204] Add the pieces of data to the preset data table.

[0205] Optionally, the processing module 702 is specifically configured to:

[0206] Selecting one piece of unanalyzed data from the pieces of data in the order of generation time from recent to remote, determining a first data value corresponding to the data according to a third data value corresponding to the data and a fourth data value corresponding to the account at the current moment, adding the data, the account information and the first data value to the preset data table, and setting the state of the data in the preset data table to pending; wherein the first data value is the smaller value of the third data value and the fourth data value;

[0207] The above contents are executed in a loop until there is no unanalyzed data in the data.

[0208] It can be seen from the above content that: in the above embodiment of the present application, the processing server selects the data with the latest generation time and the state of pending processing from each data corresponding to the target account in the preset data table as the target data, processes the target data, and updates the state of the target data to being processed. After obtaining the processing result corresponding to the target data: if the processing result is a processing failure, the state of the target data in the preset data table is updated to a processing failure, and the state of the data whose generation time is before the target data in each data is updated to no processing required, if the processing result is a processing success, the state of the target data in the preset data table is updated to a processing success. In the embodiment of the present application, by setting a preset data table and setting the state of each data in the preset data table, the processing server can accurately control the processing progress of each data, for example, whether the data is in processing, pending, successfully processed, failed to process, or does not need to be processed. In this way, under the condition that the state of each data is known, the processing server can accurately process each data in the order of generation time from near to far, so that it is suitable for occasions where users have a demand for the processing time of multiple data, which helps to improve the flexibility of data processing.

[0209] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute the following Figure 2 or Figure 3 The data processing method described in any one of the above.

[0210] Based on the same inventive concept, an embodiment of the present invention further provides a computer program product, which, when executed on a computer, enables the computer to execute the following Figure 2 or Figure 3 The data processing method described in any one of the above.

[0211] Based on the same technical concept, an embodiment of the present invention provides a computing device, such as Figure 8 As shown, it includes at least one processor 1101 and a memory 1102 connected to the at least one processor. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present invention. Figure 8 For example, the processor 1101 and the memory 1102 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0212] In the embodiment of the present invention, the memory 1102 stores instructions that can be executed by at least one processor 1101. By executing the instructions stored in the memory 1102, the at least one processor 1101 can execute the steps included in the aforementioned processing method based on the distributed batch processing system.

[0213] Among them, the processor 1101 is the control center of the computing device, and can use various interfaces and lines to connect various parts of the computing device, and realize data processing by running or executing instructions stored in the memory 1102 and calling data stored in the memory 1102. Optionally, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes instructions issued by operation and maintenance personnel. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0214] The processor 1101 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the processing method based on the distributed batch processing system may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0215] The memory 1102 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1102 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1102 in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0216] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0217] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0218] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0219] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

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

Claims

1. A data processing method, It is characterized in that The method comprises: Determine the target account based on each account in the preset data table; Acquire each piece of data corresponding to the target account, select the data with the latest generation time and the status of being processed as the target data from the each piece of data, process the target data, and update the status of the target data to being processed; After obtaining the processing result corresponding to the target data: If the processing result is a processing failure, the state of the target data in the preset data table is updated to a processing failure, and the state of the data whose generation time is before the target data in the data is updated to no need to be processed; or If the processing result is successful, the status of the target data in the preset data table is updated to successful processing; The preset data table is obtained in the following manner: Receiving a data processing request; the data processing request includes account information and time information; obtaining each candidate data corresponding to the account information, and determining each data within the time information range from the each candidate data, wherein any one of the each data includes account information and an amount of money deposited corresponding to the account information; Select one piece of unanalyzed data from the pieces of data in the order of generation time from recent to remote, determine the first data value corresponding to the data according to the third data value corresponding to the data and the fourth data value corresponding to the account information corresponding to the data at the current moment, add the data, the account information and the first data value to the preset data table, set the status of the data in the preset data table to be processed, and execute the above content in a loop until there is no unanalyzed data in the pieces of data; wherein the first data value is the smaller value of the third data value and the fourth data value, the third data value is the amount of money deposited corresponding to the account information, and the fourth data value is the available balance corresponding to the account information.

2. The method according to claim 1, It is characterized in that Before selecting the data with the latest generation time and the state of being processed as the target data from the data, the method further includes: It is determined that no data in a processing state exists among the data.

3. The method according to claim 2, It is characterized in that The method further comprises: If there is data in the processing state among the data, the target account is re-determined according to each account in the preset data table.

4. The method according to any one of claims 1 to 3, It is characterized in that The processing of the target data and updating the state of the target data to being processed includes: Obtaining a first data value corresponding to the target data from the preset data table, wherein the first data value is a refund amount of the target account; Obtaining a second data value corresponding to the target account at the current moment, where the second data value is the remaining amount of the target account at the current moment; If the first data value is not greater than the second data value, generating a processing task corresponding to the target data according to the first data value; or, If the first data value is greater than the second data value, generating a processing task corresponding to the target data according to the second data value; The status corresponding to the target data in the preset data table is updated to being processed.

5. A data processing device, It is characterized in that The device comprises: A determination module is used to determine a target account based on each account in a preset data table; a processing module, configured to obtain each piece of data corresponding to the target account, select the data with the latest generation time and the status of being processed as the target data from the each piece of data, process the target data, and update the status of the target data to being processed; An updating module, configured to, after obtaining the processing result corresponding to the target data, if the processing result is a processing failure, update the status of the target data in the preset data table to a processing failure, and update the status of the data whose generation time is before the target data in each piece of data to no need to be processed; or, if the processing result is a processing success, update the status of the target data in the preset data table to a processing success; Wherein, the determination module is specifically used for: Receiving a data processing request, wherein the data processing request includes account information and time information; obtaining each candidate data corresponding to the account information, and determining each data within the time information range from the each candidate data, wherein the data includes the account information and the amount of money deposited corresponding to the account information; Select one piece of unanalyzed data from the pieces of data in the order of generation time from recent to remote, determine the first data value corresponding to the data according to the third data value corresponding to the data and the fourth data value corresponding to the account information corresponding to the data at the current moment, add the data, the account information and the first data value to the preset data table, set the status of the data in the preset data table to be processed, and execute the above content in a loop until there is no unanalyzed data in the pieces of data; wherein the first data value is the smaller value of the third data value and the fourth data value, the third data value is the amount of money deposited corresponding to the account information, and the fourth data value is the available balance corresponding to the account information.

6. The device as claimed in claim 5, It is characterized in that The processing module is specifically used for: Obtaining a first data value corresponding to the target data from the preset data table, wherein the first data value is a refund amount of the target account; Obtaining a second data value corresponding to the target account at the current moment, where the second data value is the remaining amount of the target account at the current moment; If the first data value is not greater than the second data value, generating a processing task corresponding to the target data according to the first data value; or, If the first data value is greater than the second data value, generating a processing task corresponding to the target data according to the second data value; The status corresponding to the target data in the preset data table is updated to being processed.

7. A computing device, It is characterized in that The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method according to any one of claims 1 to 4.

8. A computer-readable storage medium, It is characterized in that It stores a computer program executable by a computing device, and when the program is run on the computing device, the computing device executes the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Buffer bookkeeping method, apparatus and equipment thereof

    CN107016604A