Data processing method and device, equipment, storage medium and program product
By using preset judgment tables or cache and limit accumulation tables in the linked payment business scenarios, the problems of complex calculation of transfer limits and failure of concurrent control in the existing technology are solved, and efficient and accurate limit control is achieved.
Patent Information
- Application Number
- CN202411177154.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-02-07
AI Technical Summary
In the linked payment business scenario, the calculation of transfer limits is complex and inefficient, and the concurrency of transfer orders cannot be effectively controlled, resulting in the failure of limit control.
Use preset judgment table or preset cache to determine the current transfer task to avoid concurrent transfers; determine the used quota of the account group based on the preset limit accumulation table, and perform multi-dimensional limit verification.
The calculation is simplified, efficiency is improved, the transfer limit is effectively controlled, and the limit failure caused by concurrent transfers is avoided.
Smart Images

Figure CN119398769A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular, to a data processing method, apparatus, device, storage medium, and program product. Background Art
[0002] In the linkage payment business scenario, you need to set the account group transfer limit according to business needs. According to the account group limit, limit the actual transfer order to avoid exceeding the limit.
[0003] The existing technical solution records the usage record of the account group limit based on the transfer order. When the transfer order application is initiated, the transfer limit is controlled based on the account group limit usage record. It has the following defects: the calculation is complex and the efficiency is low; it does not consider the concurrent transfer order, which may make the limit control invalid. Summary of the invention
[0004] The embodiments of the present invention provide a data processing method, apparatus, device, storage medium and program product, which can not only simplify calculation and improve efficiency, but also avoid concurrent transfers to ensure the effectiveness of transfer limit control.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, including:
[0006] receiving a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount;
[0007] Searching for the account group identifier from a preset duplicate detection table or a preset cache;
[0008] If the account group identifier is not found in the preset duplicate detection table or the preset cache, the duplicate detection data corresponding to the transfer request is written into the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and the timeout period;
[0009] Determine the used amount of the account group in multiple dimensions based on a preset limit accumulation table;
[0010] Performing a limit check on the transfer request based on the used quotas under the multiple dimensions and the transfer amount to obtain a check result; wherein the check result includes a limit check pass and a limit check fail;
[0011] If the verification result is that the limit verification is passed, the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated.
[0012] In a second aspect, an embodiment of the present invention further provides a data processing device, including:
[0013] A transfer request receiving module, configured to receive a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount;
[0014] An account group identifier search module, used to search for the account group identifier from a preset duplicate detection table or a preset cache;
[0015] a duplicate detection data writing module, configured to write the duplicate detection data corresponding to the transfer request into the preset duplicate detection table or the preset cache if the account group identifier is not found in the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and a timeout period;
[0016] A used credit limit determination module, used to determine the used credit limit of the account group in multiple dimensions based on a preset credit limit accumulation table;
[0017] A limit verification module, configured to perform a limit verification on the transfer request based on the used quotas under the multiple dimensions and the transfer amount, and obtain a verification result; wherein the verification result includes a limit verification pass and a limit verification fail;
[0018] The transfer task execution module is used to execute the transfer task corresponding to the transfer request and update the preset limit accumulation table when the verification result is that the limit verification is passed.
[0019] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method as described in the embodiment of the present invention is implemented.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the data processing method as described in the embodiment of the present invention is implemented.
[0021] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which implements the data processing method as described in the embodiment of the present invention when executed by a processor.
[0022] The embodiment of the present invention discloses a data processing method, apparatus, device, storage medium and program product, which receive a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount; searching for the account group identifier from a preset duplicate detection table or a preset cache; if the account group identifier is not found from the preset duplicate detection table or the preset cache, writing the duplicate detection data corresponding to the transfer request into the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and a timeout period; determining the used amount of the account group under multiple dimensions based on a preset limit accumulation table; performing limit verification on the transfer request based on the used amount and the transfer amount under multiple dimensions to obtain a verification result; wherein the verification result includes a limit verification pass and a limit verification fail; if the verification result is a limit verification pass, executing the transfer task corresponding to the transfer request, and updating the preset limit accumulation table. The data processing method provided by the embodiment of the present invention can avoid concurrent transfers by using a preset duplicate detection table or a preset cache to determine the transfer tasks currently being executed by the account group, so as to ensure the effectiveness of the transfer limit control; at the same time, limit verification is performed based on the preset limit accumulation table, which can greatly reduce the amount of calculation for determining the used amount of each dimension, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a data processing method provided by an embodiment of the present invention;
[0025] Figure 2 An example diagram of a preset limit accumulation table provided in an embodiment of the present invention;
[0026] Figure 3 A flowchart of a data processing method provided by an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of the structure of a data processing device provided by an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0030] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. The purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0031] The existing technology has the following defects: First, the used amount of multiple dimensions is calculated through transfer record data, which is computationally intensive and inefficient; second, the concurrent control of transfer orders is not considered, which may make the limit control invalid. For example, if an account group initiates two transfer applications at the same time (the transfer amount is 2 yuan each), if the existing solution is used, it is found that the used amount of the account group (7 yuan) does not reach the limit (7+2<10 yuan), but the actual transfer exceeds the limit (the account group usage limit is 7+2+2>10 yuan), making the limit control invalid.
[0032] Figure 1 The present invention provides a flowchart of a data processing method according to an embodiment of the present invention. The method can be applied to the case of controlling the limit of linked transfer. The method can be executed by a data processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Figure 1 As shown, the method comprises the following steps:
[0033] S110, receiving a transfer request.
[0034] The transfer request includes at least one of the following information: account group identifier and transfer amount. The account group includes multiple accounts, and the accounts in the account group are divided into linked payment accounts and payment accounts. Linked transfer can be understood as the flow of funds between multiple accounts in the account group, for example: automatically transferring funds from a linked payment account (A) in the account group to a payment account (B), and then to the receiving account (C) (funds flow A->B->C).
[0035] In this embodiment, a transfer request may be initiated by any account in the account group to transfer funds to other accounts in the account group.
[0036] S120, searching for the account group identifier from a preset duplicate detection table or a preset cache.
[0037] Among them, the preset duplicate detection table or preset cache (such as: Redis) is used to store the duplicate detection data corresponding to the transfer task currently being executed. The duplicate detection data includes the account group identifier and the timeout time, wherein the timeout time is obtained by accumulating a preset time length when the transfer request is received, and the preset time length is preset, for example: 5 minutes. The calculation formula of the timeout time can be expressed as: timeout time = current time + preset time length. The purpose of setting this timeout time is to prevent multiple transfer tasks from being executed in parallel during the period between the current time and the timeout time, which causes the problem of invalid limit control.
[0038] Optionally, before searching for the account group identifier from the preset duplicate detection table or the preset cache, the following steps are also included: extracting the timeout time of each duplicate detection data in the preset duplicate detection table or the preset cache; if the timeout time is less than or equal to the current time, determining the duplicate detection data as expired data; and deleting the expired data from the preset duplicate detection table or the preset cache.
[0039] Among them, if the timeout time is less than the current time, it indicates that the corresponding duplicate judgment data has expired, and the expired duplicate judgment data is deleted from the preset duplicate judgment table or preset cache. If the timeout time is greater than the current time, it indicates that the corresponding duplicate judgment data has not expired, and the duplicate judgment data is retained in the preset duplicate judgment table or preset cache. In this embodiment, the expired duplicate judgment data is deleted from the preset duplicate judgment table or preset cache, which can ensure the smooth execution of the transfer task corresponding to the transfer request.
[0040] S130: If the account group identifier is not found in the preset duplicate detection table or the preset cache, the duplicate detection data corresponding to the transfer request is written into the preset duplicate detection table or the preset cache.
[0041] If the account group identifier is not found in the preset duplicate detection table or preset cache, it indicates that there is no transfer task currently being executed for the account group, and the transfer request can continue to be processed, that is, the transfer task of the account group will not be executed in parallel. At this time, the duplicate detection data corresponding to the transfer request is written into the preset duplicate detection table or preset cache, and the subsequent steps for the transfer request are continued. In this embodiment, the duplicate detection data corresponding to the transfer request is written into the preset duplicate detection table or preset cache to prevent the subsequent transfer task from being executed in parallel with the transfer task corresponding to the transfer request.
[0042] Among them, if the account group identifier is found from the preset duplicate detection table or the preset cache, it indicates that there is currently a transfer task being executed for the account group, and the transfer request cannot be processed further, thereby generating a first prompt message to prompt that there is currently a transfer task being executed for the account group, please try again later.
[0043] S140, determining the used credit limit of the account group in multiple dimensions based on the preset credit limit accumulation table.
[0044] The preset limit accumulation table may be a daily limit accumulation table, which records the used limit in units of "days", that is, each data in the table records the used limit on a certain day. The dimensions may include at least one of the following dimensions: day, week, month, quarter, year and account group, and each dimension is preset. For example, Figure 2 is an example diagram of a preset limit accumulation table in this embodiment, such as Figure 2 As shown, the table includes the account group ID and the cumulative used amount on each trading day corresponding to the account group ID.
[0045] Optionally, the method for determining the used credit limit of an account group in multiple dimensions based on the preset limit accumulation table may be: obtaining the used credit limit of the day from the limit daily accumulation table to obtain the used credit limit in the daily dimension; based on the data in the limit daily accumulation table, statistics are performed on the used credit limit of the most recent week, the most recent month, the most recent quarter, and the most recent year to obtain the used credit limit in the weekly dimension, the monthly dimension, the quarterly dimension, and the annual dimension; based on the data in the limit daily accumulation table, statistics are performed on the historical used credit limit of the account group to obtain the used credit limit of the account group.
[0046] Specifically, based on the data in the quota-day cumulative table, the daily used quota in the most recent week is accumulated to obtain the used quota under the weekly dimension. Based on the data in the quota-day cumulative table, the daily used quota in the most recent month is accumulated to obtain the used quota under the monthly dimension. Based on the data in the quota-day cumulative table, the daily used quota in the most recent quarter is accumulated to obtain the used quota under the quarterly dimension. Based on the data in the quota-day cumulative table, the daily used quota in the most recent year is accumulated to obtain the used quota under the annual dimension. Based on the data in the quota-day cumulative table, the historical daily used quota is accumulated to obtain the used quota under the account group dimension. In this embodiment, the used quota under each dimension is counted through the quota-day cumulative table instead of through transfer records one by one, which can greatly reduce the amount of calculation and improve efficiency.
[0047] S150, performing a limit check on the transfer request based on the used amount and the transfer amount in multiple dimensions to obtain a check result.
[0048] The verification results include limit verification passed and limit verification failed. In this embodiment, based on the transfer amount and the used amount in each dimension, the transfer request is subjected to limit verification in each dimension. If each dimension is verified, the limit verification of the transfer request is verified to be passed.
[0049] Optionally, a limit check is performed on a transfer request based on the used amount and transfer amount in multiple dimensions, and the verification result may be obtained by: obtaining the limit amount in each dimension; for each dimension, a limit check is performed on the transfer request based on the used amount, the limit amount and the transfer amount in the dimension, and a sub-verification result in the dimension is obtained; if the sub-verification results in each dimension are all verified, the limit check of the transfer request is passed; if at least one of the sub-verification results in each dimension is verified unsuccessfully, the limit check of the transfer request is failed.
[0050] Specifically, the limit amount under each dimension is preset. Specifically, the limit verification method for the transfer request based on the used limit amount, the limit amount and the transfer amount under the dimension can be: for each dimension, the used limit amount and the transfer amount under the dimension are accumulated, and the accumulated result is compared with the limit amount of the dimension, and the sub-verification result of the dimension is determined based on the comparison result.
[0051] Specifically, based on the used amount, limit amount and transfer amount under the dimension, the transfer request is subject to limit verification, and the sub-verification result under the dimension may be obtained by accumulating the used amount and the transfer amount to obtain the accumulated amount; if the accumulated amount is less than or equal to the limit amount, the sub-verification result under the dimension is passed; if the accumulated amount is greater than the limit amount, the sub-verification result under the dimension is failed.
[0052] Among them, the used amount and the transfer amount are accumulated to obtain the new used amount under this dimension, that is, the accumulated amount. If the accumulated amount is less than or equal to the limit amount, it means that after the transfer task corresponding to the current transfer request is executed, the used amount of this dimension does not exceed the limit amount of this dimension, and the sub-verification result under the dimension is verification passed. If the accumulated amount is greater than the limit amount, it means that after the transfer task corresponding to the current transfer request is executed, the used amount of this dimension exceeds the limit amount of this dimension, and the sub-verification result under this dimension is verification failed.
[0053] In this embodiment, if the sub-verification results under each dimension are all verified, the limit verification of the transfer request is passed; if at least one of the sub-verification results under each dimension is verified unsuccessful, the limit verification of the transfer request is unsuccessful.
[0054] S160: If the verification result is that the limit verification is passed, the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated.
[0055] Among them, executing the transfer task corresponding to the transfer request and updating the preset limit accumulation table includes the following process: first, the limit is pre-deducted for the transfer request, then the preset limit accumulation table is updated, and then the transfer task corresponding to the transfer request is executed, and finally the preset limit accumulation table is updated again based on the execution result.
[0056] Specifically, the process of executing the transfer task corresponding to the transfer request and updating the preset limit accumulation table can be: pre-deducting the limit from the transfer request based on the preset limit record table to update the preset limit accumulation table; executing the transfer task corresponding to the transfer request to obtain the transfer result; wherein the transfer result includes a successful transfer and a failed transfer; and updating the preset limit record table and / or the preset limit accumulation table based on the transfer result.
[0057] The preset limit record table is used to record the transaction serial number and status information corresponding to the transfer request. The status information includes a first state, a second state and a third state; the first state is a locked state, the second state is a successful state, and the third state is a failed state.
[0058] The transfer request also includes a transaction serial number. Optionally, the limit is pre-deducted from the transfer request based on the preset limit record table to update the preset limit accumulation table by: writing the limit record data of the transfer request into the preset limit record table; and updating the used amount of the day in the preset limit accumulation table based on the transfer amount.
[0059] The limit record data includes: transaction serial number and status information, and the status information is the first status, and the first status is the locked status. In this embodiment, the transaction serial number and the first status are first written into the preset limit record table as the limit record data, and then the used daily limit in the preset limit accumulation table is updated based on the transfer amount.
[0060] Specifically, the method for updating the used daily quota in the preset limit accumulation table based on the transfer amount may be: the used daily quota in the preset limit accumulation table and the transfer amount are accumulated to obtain a new used daily quota. The used daily quota in the preset limit accumulation table and the transfer amount are accumulated to achieve the limit withholding of the transfer request.
[0061] Optionally, the method for updating the preset limit record table and / or the preset limit accumulation table based on the transfer result can be: if the transfer result is a successful transfer, the status information in the limit record data in the preset limit record table is changed from the first state to the second state; if the transfer result is a failed transfer, the status information of the preset limit record table is changed from the first state to the third state, and the used amount for the day in the preset limit accumulation table is updated based on the transfer amount.
[0062] The second state is a success state, and the third state is a failure state. If the transfer result is a success, the state information in the limit record data in the preset limit record table is changed from a locked state to a success state. If the transfer result is a failure, the state information in the preset limit record table is changed from a locked state to a failure state, and the used amount for the day in the preset limit accumulation table is updated based on the transfer amount.
[0063] Specifically, if the transfer result is a transfer failure, the method for updating the used daily quota in the preset limit accumulation table based on the transfer amount can be: subtract the used daily quota in the preset limit accumulation table from the transfer amount to obtain a new used daily quota.
[0064] In this embodiment, if the transfer result is a transfer failure, the used amount for the day updated during the limit withholding process in the preset limit accumulation table needs to be updated to the used amount for the day before the limit withholding, so as to ensure the accuracy of the data.
[0065] Optionally, after pre-deducting the limit from the transfer request based on the preset limit record table to update the preset limit accumulation table, the following step is also included: deleting the duplicate detection data corresponding to the transfer request in the preset duplicate detection table or the preset cache.
[0066] In this embodiment, after the transfer request is pre-deducted by the limit, the duplicate detection data corresponding to the transfer request in the preset duplicate detection table or preset cache is deleted to ensure the smooth execution of subsequent transfer requests of the account group.
[0067] Optionally, before the limit is pre-deducted for the transfer request based on the preset limit record table, the following steps are also included: querying the limit record data of the transfer request from the preset limit record table based on the transaction serial number; if the limit record data of the transfer request is queried from the preset limit record table, and the status information is the third state, then the third state is modified to the first state, and the operation of updating the preset limit accumulation table is executed; if the limit record data of the transfer request is queried from the preset limit record table, and the status information is the first state or the second state, then a second prompt information is generated to prompt the rejection of repeated processing of the transfer request; if the limit record data of the transfer request is not queried from the preset limit record table, then the operation of pre-deducting the limit for the transfer request based on the preset limit record table is executed.
[0068] If the limit record data of the transfer request is queried from the preset limit record table, and the status information is a failed state, it means that the transfer task corresponding to the transfer request has failed to execute previously. At this time, in order to re-execute the transfer task, it is necessary to modify the status information from the failed state to the locked state, and execute the update of the preset limit accumulation table, execute the transfer task corresponding to the transfer request, and update the preset limit record table and / or the preset limit accumulation table based on the transfer result. In this way, the transfer task can be retried.
[0069] If the limit record data of the transfer request is queried from the preset limit record table, and the status information is locked or successful, it means that the transfer task corresponding to the transfer request is being executed or has been successfully executed. In order to prevent repeated execution, a second prompt information is generated to refuse repeated processing of the transfer request.
[0070] If the limit record data of the transfer request is not found from the preset limit record table, it indicates that the transfer task corresponding to the transfer request has not been executed, then the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated.
[0071] Optionally, based on the above embodiment, Figure 3 It is a flow chart of a data processing method provided by the invention implementation, such as Figure 3 As shown, the method comprises the following steps:
[0072] S301, receiving a transfer request.
[0073] S302: extracting expired duplicate detection data from a preset duplicate detection table or a preset cache based on a timeout period, and deleting the expired duplicate detection data.
[0074] S303, searching for the account group identifier from a preset duplicate detection table or a preset cache, if the account group identifier is found, executing S304, if the account group identifier is not found, executing S311.
[0075] S304, writing the duplicate detection data corresponding to the transfer request into a preset duplicate detection table or a preset cache.
[0076] S305, based on the data in the daily limit accumulation table, determine the used quota in the daily dimension, weekly dimension, monthly dimension, quarterly dimension, annual dimension and account group dimension.
[0077] S306, based on the used amount, limit amount and transfer amount in each dimension, the transfer request is checked for limit and the check result is obtained; if the check passes, S307 is executed; if the check fails, S312 is executed.
[0078] S307, write the transaction serial number and lock status of the transfer request into the preset limit record table, and add the daily used limit in the preset limit accumulation table and the transfer amount to obtain a new daily used limit.
[0079] S308, execute the transfer task corresponding to the transfer request and obtain the transfer result; if the transfer result is a successful transfer, execute S309; if the transfer result is a failed transfer, execute S310.
[0080] S309, modifying the status information in the limit record data in the preset limit record table from the locked status to the successful status.
[0081] S310, modifying the status information of the preset limit record table from the locked status to the failed status, and updating the used daily quota in the preset limit accumulation table based on the transfer amount.
[0082] S311, generating first prompt information to prompt the account group of the current transfer task being executed.
[0083] S312: Refuse to execute the transfer task corresponding to the transfer request.
[0084] The technical solution of this embodiment is to receive a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount; search the account group identifier from a preset duplicate detection table or a preset cache; if the account group identifier is not found from the preset duplicate detection table or the preset cache, write the duplicate detection data corresponding to the transfer request into the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and a timeout period; determine the used amount of the account group in multiple dimensions based on a preset limit accumulation table; perform limit verification on the transfer request based on the used amount and the transfer amount in multiple dimensions to obtain a verification result; wherein the verification result includes a limit verification pass and a limit verification fail; if the verification result is a limit verification pass, execute the transfer task corresponding to the transfer request, and update the preset limit accumulation table. The data processing method provided by the embodiment of the present invention can avoid concurrent transfers by using a preset duplicate detection table or a preset cache to determine the transfer tasks currently being executed by the account group, so as to ensure the effectiveness of the transfer limit control; at the same time, limit verification is performed based on the preset limit accumulation table, which can greatly reduce the amount of calculation for determining the used amount of each dimension, thereby improving efficiency.
[0085] Figure 4 is a structural diagram of a data processing device provided by the present invention, such as Figure 4 As shown, the device comprises:
[0086] The transfer request receiving module 410 is used to receive a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount;
[0087] An account group identifier search module 420 is used to search for an account group identifier from a preset duplicate detection table or a preset cache;
[0088] The duplicate detection data writing module 430 is used to write the duplicate detection data corresponding to the transfer request into the preset duplicate detection table or preset cache if the account group identifier is not found in the preset duplicate detection table or preset cache; wherein the duplicate detection data includes the account group identifier and the timeout period;
[0089] A used credit limit determination module 440 is used to determine the used credit limit of the account group in multiple dimensions based on a preset credit limit accumulation table;
[0090] A limit verification module 450 is used to perform a limit verification on the transfer request based on the used limit and the transfer amount in multiple dimensions to obtain a verification result; wherein the verification result includes a limit verification pass and a limit verification fail;
[0091] The transfer task execution module 460 is used to execute the transfer task corresponding to the transfer request and update the preset limit accumulation table when the verification result is that the limit verification is passed.
[0092] Optionally, it also includes: an expired data deletion module, which is used to:
[0093] Extract the preset duplicate detection table or the timeout time of each duplicate detection data in the preset cache;
[0094] If the timeout period is less than or equal to the current time, the duplicate data is determined as expired data;
[0095] Delete expired data from the preset duplicate detection table or preset cache.
[0096] Optionally, the method further includes: a first prompt information generating module, configured to:
[0097] If the account group identifier is found in the preset duplicate detection table or the preset cache, a first prompt message is generated to prompt the account group that currently has a transfer task being executed.
[0098] Optionally, the preset limit accumulation table is a limit daily accumulation table; the dimensions include at least one of the following dimensions: day, week, month, quarter, year and account group; the used limit determination module 440 is further used to:
[0099] Obtain the used quota for the day from the daily quota accumulation table to obtain the used quota under the daily dimension;
[0100] Based on the data in the daily quota accumulation table, statistics are collected on the used quotas in the most recent week, the most recent month, the most recent quarter, and the most recent year to obtain the used quotas in the weekly, monthly, quarterly, and annual dimensions;
[0101] The historical used quota of the account group is counted based on the data in the limit daily accumulation table to obtain the used quota under the account group.
[0102] Optionally, the quota checking module 450 is further used for:
[0103] Get the limit amount under each dimension;
[0104] For each dimension, perform limit verification on the transfer request based on the used limit, limit limit and transfer amount under the dimension, and obtain the sub-verification result under the dimension;
[0105] If the sub-verification results of each dimension are all verified, the limit verification of the transfer request is passed;
[0106] If at least one of the sub-verification results under each dimension fails the verification, the limit verification of the transfer request fails.
[0107] Optionally, the quota checking module 450 is further used for:
[0108] Accumulate the used amount and the transfer amount to obtain the accumulated amount;
[0109] If the accumulated amount is less than or equal to the limit amount, the sub-verification result under the dimension is verification passed;
[0110] If the accumulated amount is greater than the limit, the sub-check result under the dimension is check failure.
[0111] Optionally, the transfer task execution module 460 is further configured to:
[0112] Based on the preset limit record table, the limit is withheld from the transfer request to update the preset limit accumulation table;
[0113] Execute the transfer task corresponding to the transfer request and obtain the transfer result; wherein the transfer result includes transfer success and transfer failure;
[0114] The preset limit record table and / or the preset limit accumulation table are updated based on the transfer result.
[0115] Optionally, the transfer request includes a transaction serial number; the transfer task execution module 460 is further used to:
[0116] Writing the limit record data of the transfer request into the preset limit record table; wherein the limit record data includes: transaction serial number and status information, and the status information is a first state, and the first state is a locked state;
[0117] The used amount for the day in the preset limit accumulation table is updated based on the transfer amount.
[0118] Optionally, the transfer task execution module 460 is further configured to:
[0119] The used amount of the day in the preset limit accumulation table is added to the transfer amount to obtain a new used amount of the day.
[0120] Optionally, the transfer task execution module 460 is further configured to:
[0121] If the transfer result is successful, the state information in the limit record data in the preset limit record table is changed from the first state to the second state; wherein the second state is a success state;
[0122] If the transfer result is a transfer failure, the status information of the preset limit record table is modified from the first state to the third state, and the used amount for the day in the preset limit accumulation table is updated based on the transfer amount; wherein the third state is a failure state.
[0123] Optionally, if the transfer result is a transfer failure, the transfer task execution module 460 is further configured to:
[0124] Subtract the amount of transfer from the amount used on the day in the preset limit accumulation table to obtain the new amount of money used on the day.
[0125] Optionally, the transfer task execution module 460 is further configured to:
[0126] Delete the duplicate detection data corresponding to the transfer request in the preset duplicate detection table or the preset cache.
[0127] Optionally, it also includes: a quota record data query module, which is used to:
[0128] Based on the transaction serial number, query the limit record data of the transfer request from the preset limit record table;
[0129] If the limit record data of the transfer request is found from the preset limit record table, and the state information is the third state, the third state is changed to the first state, and the operation of updating the preset limit accumulation table is performed;
[0130] If the limit record data of the transfer request is found from the preset limit record table, and the status information is the first status or the second status, a second prompt information is generated to prompt that the repeated processing of the transfer request is rejected;
[0131] If the limit record data of the transfer request is not found in the preset limit record table, the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated. The above device can execute the method provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0132] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0133] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0134] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0135] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data processing method.
[0136] In some embodiments, the data processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0138] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0139] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0140] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0141] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0142] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0143] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the data processing method provided in any embodiment of the present application.
[0144] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0145] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A data processing method, characterized in that: include: receiving a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount; Searching for the account group identifier from a preset duplicate detection table or a preset cache; If the account group identifier is not found in the preset duplicate detection table or the preset cache, the duplicate detection data corresponding to the transfer request is written into the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and the timeout period; Determine the used amount of the account group in multiple dimensions based on a preset limit accumulation table; Performing a limit check on the transfer request based on the used quotas under the multiple dimensions and the transfer amount to obtain a check result; wherein the check result includes a limit check pass and a limit check fail; If the verification result is that the limit verification is passed, the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated.
2. The method according to claim 1, characterized in that Before searching the preset duplicate detection table or the preset cache for the account group identifier, the method further includes: Extract the timeout time of each duplicate detection data in the preset duplicate detection table or the preset cache; If the timeout period is less than or equal to the current time, the duplicate detection data is determined as expired data; The expired data is deleted from the preset duplicate detection table or the preset cache.
3. The method according to claim 1, characterized in that After searching the preset duplicate detection table or the preset cache for the account group identifier, the method further includes: If the account group identifier is found in the preset duplicate detection table or the preset cache, a first prompt message is generated to prompt that there is a transfer task being executed for the account group.
4. The method according to claim 1, characterized in that: The preset limit accumulation table is a limit daily accumulation table; the dimension includes at least one of the following dimensions: day, week, month, quarter, year and account group; Determine the used amount of the account group in multiple dimensions based on the preset limit accumulation table, including: Obtain the used amount of the day from the limit daily accumulation table to obtain the used amount under the daily dimension; Based on the data in the daily quota accumulation table, statistics are respectively performed on the used quotas in the most recent week, the most recent month, the most recent quarter, and the most recent year to obtain the used quotas in the weekly dimension, the monthly dimension, the quarterly dimension, and the annual dimension; The historical used credit limit of the account group is counted based on the data in the limit day accumulation table to obtain the used credit limit of the account group.
5. The method according to claim 1 or 4, characterized in that: Performing a limit check on the transfer request based on the used quotas under the multiple dimensions and the transfer amount to obtain a check result, including: Get the limit amount under each dimension; For each dimension, based on the used amount under the dimension, the limit amount and the transfer amount, a limit check is performed on the transfer request to obtain a sub-check result under the dimension; If the sub-verification results under each dimension are all verified, the limit verification of the transfer request is passed; If at least one of the sub-verification results under each dimension is verification failure, the limit verification of the transfer request fails.
6. The method according to claim 5, characterized in that Based on the used amount under the dimension, the limit amount and the transfer amount, the transfer request is subjected to a limit check to obtain a sub-check result under the dimension, including: Accumulating the used credit limit and the transfer amount to obtain an accumulated credit limit; If the accumulated amount is less than or equal to the limit amount, the sub-verification result under the dimension is verification passed; If the accumulated amount is greater than the limit amount, the sub-verification result under the dimension is verification failure.
7. The method according to claim 1, characterized in that Executing the transfer task corresponding to the transfer request and updating the preset limit accumulation table, including: Performing limit withholding on the transfer request based on the preset limit record table to update the preset limit accumulation table; Execute the transfer task corresponding to the transfer request to obtain a transfer result; wherein the transfer result includes a successful transfer and a failed transfer; The preset limit record table and / or the preset limit accumulation table are updated based on the transfer result.
8. The method according to claim 7, characterized in that The transfer request includes a transaction serial number; The limit withholding is performed on the transfer request based on the preset limit record table to update the preset limit accumulation table, including: Writing the limit record data of the transfer request into the preset limit record table; wherein the limit record data includes: a transaction serial number and status information, and the status information is a first status, and the first status is a locked status; The used amount for the day in the preset limit accumulation table is updated based on the transfer amount.
9. The method according to claim 8, characterized in that The used amount for the day in the preset limit accumulation table is updated based on the transfer amount, including: The used daily limit in the preset limit accumulation table is added to the transfer amount to obtain a new used daily limit.
10. The method according to claim 8, characterized in that The preset limit record table and / or the preset limit accumulation table is updated based on the transfer result, including: If the transfer result is a successful transfer, the state information in the limit record data in the preset limit record table is modified from a first state to a second state; wherein the second state is a successful state; If the transfer result is a transfer failure, the status information of the preset limit record table is modified from the first status to the third status, and the used amount for the day in the preset limit accumulation table is updated based on the transfer amount; wherein the third status is a failure status.
11. The method according to claim 10, characterized in that If the transfer result is a transfer failure, the used amount for the day in the preset limit accumulation table is updated based on the transfer amount, including: The amount used on that day in the preset limit accumulation table is subtracted from the transfer amount to obtain a new amount used on that day.
12. The method according to claim 7, characterized in that After the limit is pre-deducted for the transfer request based on the preset limit record table to update the preset limit accumulation table, the method further includes: The duplicate detection data corresponding to the transfer request in the preset duplicate detection table or the preset cache is deleted.
13. The method according to claim 10, characterized in that Before the limit withholding is performed on the transfer request based on the preset limit record table, the method further includes: Based on the transaction serial number, query the limit record data of the transfer request from the preset limit record table; If the limit record data of the transfer request is found from the preset limit record table, and the state information is the third state, the third state is changed to the first state, and the operation of updating the preset limit accumulation table is performed; If the limit record data of the transfer request is found from the preset limit record table, and the status information is the first status or the second status, a second prompt information is generated to prompt that the repeated processing of the transfer request is rejected; If the limit record data of the transfer request is not found in the preset limit record table, the transfer task corresponding to the transfer request is executed, and the preset limit accumulation table is updated.
14. A data processing device, characterized in that: include: A transfer request receiving module, configured to receive a transfer request; wherein the transfer request includes at least one of the following information: an account group identifier and a transfer amount; An account group identifier search module, used to search for the account group identifier from a preset duplicate detection table or a preset cache; a duplicate detection data writing module, configured to write the duplicate detection data corresponding to the transfer request into the preset duplicate detection table or the preset cache if the account group identifier is not found in the preset duplicate detection table or the preset cache; wherein the duplicate detection data includes the account group identifier and a timeout period; A used credit limit determination module, used to determine the used credit limit of the account group in multiple dimensions based on a preset credit limit accumulation table; A limit verification module, configured to perform a limit verification on the transfer request based on the used quotas under the multiple dimensions and the transfer amount, and obtain a verification result; wherein the verification result includes a limit verification pass and a limit verification fail; The transfer task execution module is used to execute the transfer task corresponding to the transfer request and update the preset limit accumulation table when the verification result is that the limit verification is passed.
15. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the data processing method according to any one of claims 1 to 13 when executing the computer program.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data processing method according to any one of claims 1 to 13 is implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 13.