Quota adjustment methods, devices, equipment and storage media

By using a Redis database for credit limit adjustment in the financial business system, serial credit limit updates under high concurrency were achieved, solving the business interruption problem caused by insufficient resources and improving the system's control accuracy and execution efficiency.

CN111062792BActive Publication Date: 2026-03-06WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911307888.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-17
Publication Date
2026-03-06
Estimated Expiration
2039-12-17

AI Technical Summary

Technical Problem

Existing financial business systems are prone to resource shortages or failures under high concurrency, which can affect normal business operations or cause interruptions.

Method used

A quota control method is adopted, which uses the Redis database to perform serial processing of quota update operations. By comparing and updating the target dimension parameters, the flexibility and accuracy of quota control are ensured, and resource shortages are prevented.

Benefits of technology

It improved the flexibility and accuracy of product quota control, enhanced the execution efficiency of business systems, and prevented business interruptions during high concurrency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111062792B_ABST
    Figure CN111062792B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for credit limit adjustment. The method obtains relevant field information of the target product from the credit limit update instruction via a server, and determines the target dimension parameter in the dimension information group corresponding to the target product in the Redis database based on the relevant field information. The server, based on the Redis database, serially processes the credit limit update operation in the credit limit update instruction, and when the deductible credit corresponding to the target dimension parameter is not less than the deductible credit, updates the deductible credit corresponding to the target dimension parameter of the target product and the total deductible credit of the product accordingly based on the deductible credit. This invention, based on the Redis database, realizes multi-dimensional credit limit control for products and achieves serial execution of credit limit operations during concurrency, improving the flexibility of product credit limit control, increasing the accuracy of product credit limit control, and enhancing the execution efficiency of the business system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology (Fintech), and more particularly to methods, apparatus, devices and computer-readable storage media for credit limit adjustment. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial sector, and the traditional financial industry is gradually transforming into Fintech. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on technology. Currently, financial institutions often develop multiple products or subsystems for use in their business systems. These products or subsystems are typically configured with resources based on actual needs. For example, when developing a subsystem, capacity and system resources are set according to the subsystem's actual needs; when developing a product, quota resources are set according to the product's actual needs. However, in cases of sudden surges in demand for certain subsystems or products, the total resources are limited, which can easily lead to insufficient or missing resources. This can disrupt normal business operations or cause system failures. Summary of the Invention

[0003] The main objective of this invention is to provide a quota control method, apparatus, device, and computer-readable storage medium, which aims to solve the technical problem that existing business systems are easily affected or interrupted under high concurrency.

[0004] To achieve the above objectives, the present invention provides a credit limit adjustment method, which is applied to a credit limit adjustment system. The credit limit adjustment system includes a terminal, a Redis database, and a server. The credit limit adjustment method includes the following steps:

[0005] When the server receives the quota update instruction sent by the terminal, it obtains the relevant field information of the target product in the quota update instruction, and determines the target dimension parameter in the dimension information group corresponding to the target product in the Redis database based on the relevant field information;

[0006] The server, based on the Redis database, serially processes the quota update operation in the quota update instruction, and compares the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter.

[0007] When the deductible amount corresponding to the target latitude parameter is not less than the deduction amount, the server updates the deductible amount corresponding to the target latitude parameter of the target product according to the deduction amount, and updates the total deductible amount of the target product accordingly.

[0008] Optionally, the dimension information group includes a first quota parameter, a second quota parameter, or a third quota parameter. When the server receives a quota update instruction sent by the terminal, it obtains the relevant field information of the target product in the quota update instruction, and determines the target dimension parameter in the dimension information group corresponding to the target product in the Redis database based on the relevant field information. The specific steps include:

[0009] When the server receives a quota update instruction sent by the terminal, it obtains the relevant field information of the target product in the quota update instruction.

[0010] The server determines the target dimension parameters based on a preset script program in the Redis database, according to the relevant field information, the first quota parameter, the second quota parameter, or the third quota parameter corresponding to the target product.

[0011] Optionally, the quota adjustment method further includes:

[0012] When the server receives a quota configuration instruction, it determines the product to be configured and the product quota parameters corresponding to the dimension information group to be configured in the quota configuration instruction.

[0013] Determine whether the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured;

[0014] If the sum of the first quota parameter and / or the sum of the second quota parameter in the configurable latitude information group matches the third quota parameter in the configurable latitude information group, then the latitude information and corresponding quota information of the product to be configured are updated according to the product quota parameter corresponding to the configurable latitude information group.

[0015] Optionally, the quota adjustment method further includes:

[0016] When the server receives a quota adjustment instruction, it obtains the first quota allocation parameter, the second quota allocation parameter, and / or the third quota allocation parameter of the target product.

[0017] The first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter are compared with the configured quota in the preset quota configuration table to determine the difference between the corresponding first quota parameter, the second quota parameter and / or the third quota parameter.

[0018] Based on the difference between the first quota parameter, the second quota parameter, and / or the third quota parameter, update the deductible quota corresponding to the dimension information group of the target product in the Redis database.

[0019] Optionally, the step of the server serially processing the quota update operation in the quota update instruction based on the Redis database, and comparing the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter, specifically includes:

[0020] The server processes the quota update operation in the quota update instruction serially and stores the quota update operation sequentially into the Redis database;

[0021] Based on the terminal identifier, operation type, and operation trigger time corresponding to the credit limit update operation, a corresponding operation identifier is added to the credit limit update operation. Among them, the same type of credit limit update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier.

[0022] If there is no duplicate operation identifier in the quota update operation, the deductible quota corresponding to the quota update operation is compared with the deductible quota corresponding to the target dimension parameter.

[0023] Optionally, the step of adding a corresponding operation identifier to the credit limit update operation based on the terminal identifier, operation type, and operation trigger time corresponding to the credit limit update operation, wherein the same type of credit limit update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier, further includes:

[0024] When the server has a duplicate operation identifier in the quota update operation, it deletes the quota update operation corresponding to the duplicate operation identifier in the Redis database.

[0025] Optionally, the steps of the quota adjustment method further include:

[0026] The server determines whether the quota configuration type of the target product belongs to the time interval type;

[0027] If the quota configuration type of the target product belongs to the time interval type, then the quota of the latitude information group corresponding to the target product will be updated according to the preset quota reconstruction rules and the current time.

[0028] Optionally, after the server serially processes the quota update operation in the quota update instruction based on the Redis database and compares the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter, the service further includes:

[0029] When the deductible amount corresponding to the target latitude parameter is less than the deductible amount, the server returns an insufficient amount reminder message.

[0030] Furthermore, to achieve the above objectives, the present invention also provides a credit limit adjustment device, wherein the credit limit adjustment method is applied to a credit limit adjustment system, the credit limit adjustment system includes a terminal, a Redis database, and a server, and the credit limit adjustment device includes:

[0031] The target dimension parameter confirmation module is used to obtain the relevant field information of the target product in the quota update instruction when the server receives the quota update instruction sent by the terminal, and determine the target dimension parameter in the dimension information group corresponding to the target product in the Redis database according to the relevant field information;

[0032] The deduction quota comparison module is used by the server to serially process the quota update operation in the quota update instruction based on the Redis database, and compare the deduction quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter.

[0033] The quota deduction update module is used to update the deductible quota corresponding to the target product's target latitude parameter according to the deduction quota when the deductible quota corresponding to the target latitude parameter is not less than the deduction quota, and to update the total deductible quota of the target product accordingly.

[0034] Optionally, the latitude information group includes a first quota parameter, a second quota parameter, or a third quota parameter, and the target latitude parameter confirmation module specifically includes:

[0035] The quota field acquisition unit is used to acquire relevant field information of the target product in the quota update instruction when the server receives the quota update instruction sent by the terminal.

[0036] The target dimension parameter determination unit is used by the server to determine the target dimension parameter based on a preset script program in the Redis database and according to the relevant field information of the first quota parameter, second quota parameter or third quota parameter corresponding to the target product.

[0037] Optionally, the quota control device further includes a quota verification module, which is used for:

[0038] When the server receives a quota configuration instruction, it determines the product to be configured and the product quota parameters corresponding to the dimension information group to be configured in the quota configuration instruction.

[0039] Determine whether the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured;

[0040] If the sum of the first quota parameter and / or the sum of the second quota parameter in the configurable latitude information group matches the third quota parameter in the configurable latitude information group, then the latitude information and corresponding quota information of the product to be configured are updated according to the product quota parameter corresponding to the configurable latitude information group.

[0041] Optionally, the credit limit adjustment device further includes a credit limit balancing module, which is used for:

[0042] When the server receives a quota adjustment instruction, it obtains the first quota allocation parameter, the second quota allocation parameter, and / or the third quota allocation parameter of the target product.

[0043] The first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter are compared with the configured quota in the preset quota configuration table to determine the difference between the corresponding first quota parameter, the second quota parameter and / or the third quota parameter.

[0044] Based on the difference between the first quota parameter, the second quota parameter, and / or the third quota parameter, update the deductible quota corresponding to the dimension information group of the target product in the Redis database.

[0045] Optionally, the deduction amount comparison module specifically includes:

[0046] The concurrent operation serial unit is used by the server to serially process the quota update operation in the quota update instruction and sequentially store the quota update operation into the Redis database;

[0047] The serial number addition unit is used to add a corresponding operation identifier to the quota update operation based on the terminal identifier, operation type and operation trigger time corresponding to the quota update operation. The same type of quota update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier.

[0048] The updated quota comparison unit is used to compare the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter when there is no duplicate operation identifier in the quota update operation.

[0049] The duplicate operation deletion unit is used to delete the quota update operation corresponding to the duplicate operation identifier in the Redis database when the server has a duplicate operation identifier in the quota update operation.

[0050] In addition, to achieve the above objectives, the present invention also provides a credit limit adjustment device, the credit limit adjustment device comprising: a memory, a processor, and a credit limit adjustment program stored in the memory and executable on the processor, wherein the credit limit adjustment program, when executed by the processor, implements the steps of the credit limit adjustment method as described above.

[0051] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a quota control program, which, when executed by a processor, implements the steps of the quota control method as described above.

[0052] This invention provides a credit limit adjustment method applied to a credit limit adjustment system, which includes a terminal, a Redis database, and a server. The credit limit adjustment method includes the following steps: When the server receives a credit limit update instruction from the terminal, it obtains relevant field information of the target product in the credit limit update instruction, and determines a target dimension parameter in the dimension information group corresponding to the target product in the Redis database based on the relevant field information; The server performs serial processing on the credit limit update operation in the credit limit update instruction based on the Redis database, and compares the deduction amount corresponding to the credit limit update operation with the deductible amount corresponding to the target dimension parameter; When the deductible amount corresponding to the target dimension parameter is not less than the deduction amount, the server updates the deductible amount corresponding to the target dimension parameter of the target product according to the deduction amount, and updates the total deductible amount of the target product accordingly. Through the above methods, this invention, based on the Redis database, realizes multi-dimensional quota control for products and achieves serial execution of quota operations during concurrency. This improves the flexibility and accuracy of quota control, enhances the execution efficiency of the business system, prevents normal business from being affected or interrupted by faults, and solves the technical problem that existing business systems are easily affected or interrupted by faults under high concurrency. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention;

[0054] Figure 2 This is a flowchart illustrating the first embodiment of the quota control method of the present invention.

[0055] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0056] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0057] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0058] In this embodiment of the invention, the quota adjustment device can be a PC or a server.

[0059] like Figure 1 As shown, the limit control device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0060] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0061] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a quota control program.

[0062] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the Redis database and communicate with the Redis database; the user interface 1003 is mainly used to connect to the client (terminal) and communicate with the terminal; and the processor 1001 can be used to call the quota control program stored in the memory 1005 and execute the operations in the quota control method described below.

[0063] Based on the above hardware structure, an embodiment of the quota control method of the present invention is proposed.

[0064] Reference Figure 2 , Figure 2This is a flowchart illustrating the first embodiment of the credit limit adjustment method of the present invention. The credit limit adjustment method is applied to a credit limit adjustment system, which includes a terminal, a Redis database, and a server. The credit limit adjustment method includes:

[0065] Step S10: When the server receives the quota update instruction sent by the terminal, it obtains the relevant field information of the target product in the quota update instruction, and determines the target dimension parameter in the dimension information group corresponding to the target product in the Redis database according to the relevant field information.

[0066] Currently, financial institutions often develop and use multiple products or subsystems in their business systems. In the past, the resources for these products or subsystems were generally set according to actual needs. For example, when developing a subsystem, capacity and system resources were set according to the actual needs of the subsystem; when developing a product, quota resources were set according to the actual needs of the product. However, in cases where the demand for certain subsystems or products suddenly increases, the total resources are limited, which can easily lead to insufficient or missing remaining resources. In such cases, normal business operations may be affected or interrupted.

[0067] This embodiment uses the example of a business system experiencing oversubscription under high concurrency to illustrate the concept. Based on a Redis database, it implements multi-dimensional quota control for products and achieves serial execution of quota operations during concurrency. This improves the flexibility and accuracy of product quota control, enhances the business system's execution efficiency, and prevents normal business operations from being affected or interrupted. Specifically, when the server receives a quota update instruction triggered by a user's product purchase operation, it obtains relevant field information of the target product from the quota update instruction, such as other:other (product shared quota), chnnl_id:other (second quota parameter, i.e., channel shared quota), or chnnl_id:co_no1 (first quota parameter, i.e., institution-specific quota), etc. Based on the relevant field information in the quota update instruction, it determines the target dimension parameter to be updated in the dimension information group corresponding to the target product. Redis is an in-memory database. The dimension information group includes a first quota parameter, namely the institution-specific quota, a second quota parameter, namely the channel-shared quota, or a third quota parameter, namely the total product quota. The target dimension parameter may include one or more of the institution-specific quota, the channel-shared quota, or the total product quota.

[0068] Further, step S10 specifically includes:

[0069] When the server receives a quota update instruction sent by the terminal, it obtains the relevant field information of the target product in the quota update instruction.

[0070] The server determines the target dimension parameters based on a preset script program in the Redis database, according to the relevant field information, the first quota parameter, the second quota parameter, or the third quota parameter corresponding to the target product.

[0071] In this embodiment, the preset script program can be a Lua script program. Lua is a scripting language that can be executed on the Redis server. A general query method is written in advance using Lua script, and then the Lua script is loaded into the Redis database server. Then, the commands in the Lua script are executed through Redis. By passing the query operation type parameter (such as optype == "C") to the Lua script, the corresponding query quota operation can be executed. Specifically, the parameters in the quota update instruction can be compared with the parameters corresponding to the institution-specific quota, channel-shared quota, or total product quota to determine the target dimension parameter corresponding to the quota update operation. Specifically, the GetQuotaData function in Lua scripts can be used to encapsulate the interface for obtaining the quota of the target product. Then, the quota can be obtained through three layers of logic. First, the first dimension quota, i.e., the institution-specific quota, is queried using the hget query command. If cooperate (the first quota parameter, i.e., the institution-specific quota) cannot be obtained, that is, the target product does not have the institution-specific quota, then the second dimension quota chnnlshared (the second quota parameter, i.e., the channel-shared quota) is obtained. If the channel-shared quota does not exist, the third dimension quota prod_shared (the product-shared quota, i.e., the total product quota) is obtained.

[0072] Step S20: The server serially processes the quota update operation in the quota update instruction based on the Redis database, and compares the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter.

[0073] In this embodiment, when the server receives a concurrent quota update instruction, it obtains the concurrent quota update operations from the instruction and adds these operations sequentially to the Redis database. Then, it processes these quota update operations serially according to their order in the Redis database. Specifically, before updating the quota for the target product, the deduction amount corresponding to each quota update operation is compared with the deductible quota corresponding to the target dimension parameter of the target product.

[0074] Step S30: When the deductible amount corresponding to the target latitude parameter is not less than the deduction amount, the server updates the deductible amount corresponding to the target latitude parameter of the target product according to the deduction amount, and updates the total deductible amount of the target product accordingly.

[0075] In this embodiment, when the deductible amount corresponding to the target dimension parameter is not less than the deductible amount, that is, when the remaining amount of the target dimension parameter of the target product is sufficient to complete the current amount update operation, the product sale can proceed with the current amount. The deductible amount is subtracted from the deductible amount corresponding to the target dimension parameter of the target product to update the deductible amount corresponding to the target dimension parameter of the target product, and this updates the total deductible amount corresponding to the target product. Then, following the above process, the next amount update operation corresponding to the amount update instruction in the Redis database continues to be updated until the amount update instruction is completed. Further, when the deductible amount corresponding to the target dimension parameter is less than the deductible amount, the server returns an insufficient amount reminder message. In other words, when it detects that the deductible amount corresponding to the target dimension parameter is less than the deductible amount, it returns an insufficient amount reminder message to remind the user that the current purchase amount for the product is insufficient.

[0076] This embodiment provides a credit limit adjustment method, which is applied to a credit limit adjustment system. The credit limit adjustment system includes a terminal, a Redis database, and a server. The credit limit adjustment method includes the following steps: When the server receives a credit limit update instruction sent by the terminal, it obtains relevant field information of the target product in the credit limit update instruction, and determines the target dimension parameter in the dimension information group corresponding to the target product in the Redis database based on the relevant field information; The server performs serial processing on the credit limit update operation in the credit limit update instruction based on the Redis database, and compares the deduction amount corresponding to the credit limit update operation with the deductible amount corresponding to the target dimension parameter; When the deductible amount corresponding to the target dimension parameter is not less than the deduction amount, the server updates the deductible amount corresponding to the target dimension parameter of the target product according to the deduction amount, and updates the total deductible amount of the target product accordingly. Through the above methods, this invention, based on the Redis database, realizes multi-dimensional quota control for products and achieves serial execution of quota operations during concurrency. This improves the flexibility and accuracy of quota control, enhances the execution efficiency of the business system, prevents normal business from being affected or interrupted by faults, and solves the technical problem that existing business systems are easily affected or interrupted by faults under high concurrency.

[0077] Furthermore, based on the first embodiment of the quota control method of the present invention, a second embodiment of the quota control method of the present invention is proposed.

[0078] In this embodiment, step S20 specifically includes:

[0079] The server processes the quota update operation in the quota update instruction serially and stores the quota update operation sequentially into the Redis database;

[0080] Based on the terminal identifier, operation type, and operation trigger time corresponding to the credit limit update operation, a corresponding operation identifier is added to the credit limit update operation. Among them, the same type of credit limit update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier.

[0081] If there is no duplicate operation identifier in the quota update operation, the deductible quota corresponding to the quota update operation is compared with the deductible quota corresponding to the target dimension parameter.

[0082] When the server has a duplicate operation identifier in the quota update operation, it deletes the quota update operation corresponding to the duplicate operation identifier in the Redis database.

[0083] In this embodiment, the Redis database records quota update operations involving quota changes and their corresponding results using operation identifiers, such as operation serial numbers, operation letters, or other identifiers. This prevents users from sending multiple update operations of the same type within a preset time period, i.e., preventing duplicate submissions. If a duplicate update operation exists, it is deleted based on the operation serial number, and the operation result corresponding to the operation serial number can also be directly returned. Specifically, the server serializes the quota update operations in the quota update instruction and stores them sequentially in the Redis database. Based on the terminal identifier, operation type, and operation trigger time corresponding to the quota update operation, a corresponding operation serial number is added to the quota update operation. The same operation serial number is assigned to quota update operations of the same type triggered by the same terminal and the same product within a preset time interval. If no duplicate operation serial number is detected in the quota update operations, then no duplicate update operation exists. If a duplicate operation serial number is detected in the quota update operations, then a duplicate update operation exists, and the duplicate quota update operation is removed based on the operation serial number. The operation result corresponding to the operation serial number can also be returned to the terminal to remind the user that the operation has been performed and to display the corresponding operation result.

[0084] In more embodiments, Lua scripts have a general interface, where different operation types correspond to different functions within the script. For example, a quota query retrieves quotas for different dimensions in Redis, while a quota setting sets quotas for different dimensions based on input parameters. Without a forced update, the query skips the step if a product already has a set quota; with a forced update, the latest quota overwrites the existing set quota if one is found. The quota deduction function encapsulates an atomic operation that queries the real-time quota, deducts the quota, and saves it. Leveraging the inherent atomicity of script execution on the Redis server, it serializes quota operations during concurrent execution. Specifically, the update operation checks if the deductible quota for the target dimension parameter is sufficient; if not, it returns an insufficient quota message; otherwise, it returns success and the remaining quota after deduction. In more embodiments, a quota return operation is also included, which performs the opposite operation to the quota deduction, used to return quotas after transaction cancellation or failure. The quota update operation calls the quota deduction and quota return methods based on the positive or negative value of the input quota parameter. The "Query Product" operation retrieves the credit limit information for all dimensions under that product. The "Automatic Clear" operation sets the automatic expiration time of the product's configured credit limit in Redis based on the input parameters.

[0085] Furthermore, based on the second embodiment of the quota control method of the present invention, a third embodiment of the quota control method of the present invention is proposed.

[0086] In this embodiment, the quota adjustment method further includes:

[0087] The server determines whether the quota configuration type of the target product belongs to the time interval type;

[0088] If the quota configuration type of the target product belongs to the time interval type, then the quota of the latitude information group corresponding to the target product will be updated according to the preset quota reconstruction rules and the current time.

[0089] In this embodiment, to facilitate product credit limit configuration, a pre-set credit limit reconstruction task can be configured. This involves periodically reconstructing credit limits with time intervals according to a preset configuration. After the user sets the credit limit reconstruction task, the server assigns a scheduled task to determine whether the product's credit limit configuration type belongs to a time interval type based on the credit limit configuration records in the database credit limit table. For example, it checks if the product's credit limit configuration record includes a field belonging to the time interval type. If the product's credit limit configuration record does, the product's credit limit does not need to be reconstructed; the initial credit limit is fixed. The time interval type includes single-day time interval credit limits, single-day cyclical credit limits, or cross-day interval credit limits, etc. The single-day time interval credit limit reconstruction task involves querying records in the credit limit configuration record, comparing the set time with the current time, and if the set time has arrived, overwriting the product's credit limit with the set amount in the Redis database. If the current time still belongs to the previous single-day interval, the credit limit reconstruction task can be skipped. Multiple single-day interval credit limits can be set to achieve a function similar to releasing a portion of the credit limit every hour during promotional activities. The cross-day interval quota rebuilding task sets a quota that is effective for a certain period. During this period, it does not rebuild the quota, but checks the end date and time. If the end time has passed, the quota for that product is deleted from Redis, meaning the product will no longer be sold through this method. The single-day recurring quota rebuilding task overwrites the configured quota for that product in the Redis database daily based on the set quota. The overwritten quota can be one or more dimensions from a dimensional information group.

[0090] Furthermore, the credit limit adjustment method also includes:

[0091] When the server receives a quota configuration instruction, it determines the product to be configured and the product quota parameters corresponding to the dimension information group to be configured in the quota configuration instruction.

[0092] Determine whether the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured;

[0093] If the sum of the first quota parameter and / or the sum of the second quota parameter in the configurable latitude information group matches the third quota parameter in the configurable latitude information group, then the latitude information and corresponding quota information of the product to be configured are updated according to the product quota parameter corresponding to the configurable latitude information group.

[0094] In this embodiment, the product shared quota is the total purchase quota of products for which no separate channel shared quota or institution-specific quota is configured. The channel shared quota is the purchase quota of products for which no separate institution-specific quota is configured (if no channel shared quota is configured, the product's shared quota is used). The institution-specific quota is configured by setting a separate institution quota configuration, meaning that the institution can only sell within its own quota configuration. When a user configures product quotas on the management console page, the server verifies the configured quotas according to preset rules. These verification rules include: verifying the product shared quota (i.e., the total product quota), the value of which is affected by the scale field in the product configuration, meaning the sum of the sales scale of all sub-channels and sub-institutions must equal the total product quota; and verifying the channel shared quota, which is the sum of all institution-specific quotas. When the channel shared quota is edited on the product shared quota page and saved, the shared quota value of the channel shared quota will be adjusted by default to ensure that the sum of these quotas equals the total product quota. The quota configuration operation refers to the process of increasing the quota dimensions of a product in the initial stage of product configuration, before it is publicly available, by adding quotas for specific channels and institutions. After detecting that the user has clicked the save button on the page, the server will enter the following parameters into the database based on the product code, product system, sales channel, partner institution, quota type, time range, and sales quota entered on the page: optype (operation type), prod_code (product code), prod_sys (product system), sys_sno (system serial number), chnnl (product sales channel), cooperate (partner institution, optional), and quota (operation quota, optional for some operations with no quota). In this process, `optype == "C"` indicates a quota query, `optype == "B"` indicates a quota deduction, `optype == "U"` indicates a quota update, `optype == "S"` indicates a quota setting (forced setting), `optype == "CS"` indicates a quota setting (not forced setting), `optype == "R"` indicates a quota return, `optype == "D"` indicates a quota deletion, `optype == "QP"` indicates a product query, and `optype == "EP"` indicates automatic clearing of settings. First, a record is inserted or updated in the quota configuration record table. Then, the quota operation interface of the Redis database is called. Depending on the operation type (`optype == "S"`, "U" etc.), if updating the quota setting and the data is not in Redis, the product quota data stored in the Redis database is directly inserted. If the Redis database already has active quota data, the difference between the existing data in the Redis database and the data in the quota configuration record table is used to update the data in the Redis database.

[0095] Furthermore, the credit limit adjustment method also includes:

[0096] When the server receives a quota adjustment instruction, it obtains the first quota allocation parameter, the second quota allocation parameter, and / or the third quota allocation parameter of the target product.

[0097] The first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter are compared with the configured quota in the preset quota configuration table to determine the difference between the corresponding first quota parameter, the second quota parameter and / or the third quota parameter.

[0098] Based on the difference in the first quota parameter, i.e. the difference in the institution-specific quota, the difference in the second quota parameter, i.e. the difference in the channel-shared quota, and / or the difference in the third quota parameter, i.e. the difference in the total product quota, the deductible quota corresponding to the dimension information group of the target product in the Redis database is updated accordingly.

[0099] In this embodiment, the quota balancing command is used to calculate the product's sales quota in real time when quota anomalies occur. This includes the first quota allocation parameter (the institution's dedicated sales quota), the second quota allocation parameter (the channel-shared sales quota), and / or the third quota allocation parameter (the product's total sales quota). This quota is compared with the quota set in the quota configuration record table to find the difference. Then, it is compared with the quota in the Redis database to find the abnormal data difference. This difference value is used as a quota adjustment value, and the Lua script is called to update the quota in the Redis database in real time.

[0100] The present invention also provides a credit limit adjustment device, wherein the credit limit adjustment method is applied to a credit limit adjustment system, the credit limit adjustment system includes a terminal, a Redis database, and a server, and the credit limit adjustment device includes:

[0101] The target dimension parameter confirmation module is used to obtain the relevant field information of the target product in the quota update instruction when the server receives the quota update instruction sent by the terminal, and determine the target dimension parameter in the dimension information group corresponding to the target product in the Redis database according to the relevant field information;

[0102] The deduction quota comparison module is used by the server to serially process the quota update operation in the quota update instruction based on the Redis database, and compare the deduction quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter.

[0103] The quota deduction update module is used to update the deductible quota corresponding to the target product's target latitude parameter according to the deduction quota when the deductible quota corresponding to the target latitude parameter is not less than the deduction quota, and to update the total deductible quota of the target product accordingly.

[0104] Furthermore, the latitude information group includes a first quota parameter, a second quota parameter, or a third quota parameter, and the target latitude parameter confirmation module specifically includes:

[0105] The quota field acquisition unit is used to acquire relevant field information of the target product in the quota update instruction when the server receives the quota update instruction sent by the terminal.

[0106] The target dimension parameter determination unit is used by the server to determine the target dimension parameter based on the Lua script program in the Redis database and the relevant field information of the first quota parameter, second quota parameter or third quota parameter corresponding to the target product.

[0107] Furthermore, the quota control device also includes a quota verification module, which is used for:

[0108] When the server receives a quota configuration instruction, it determines the product to be configured and the product quota parameters corresponding to the dimension information group to be configured in the quota configuration instruction.

[0109] Determine whether the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured;

[0110] If the sum of the first quota parameter and / or the sum of the second quota parameter in the configurable latitude information group matches the third quota parameter in the configurable latitude information group, then the latitude information and corresponding quota information of the product to be configured are updated according to the product quota parameter corresponding to the configurable latitude information group.

[0111] Furthermore, the credit limit adjustment device also includes a credit limit balancing module, which is used for:

[0112] When the server receives a quota adjustment instruction, it obtains the first quota allocation parameter, the second quota allocation parameter, and / or the third quota allocation parameter of the target product.

[0113] The first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter are compared with the configured quota in the preset quota configuration table to determine the difference between the corresponding first quota parameter, the second quota parameter and / or the third quota parameter.

[0114] Based on the difference between the first quota parameter, the second quota parameter, and / or the third quota parameter, update the deductible quota corresponding to the dimension information group of the target product in the Redis database.

[0115] Furthermore, the deduction amount comparison module specifically includes:

[0116] The concurrent operation serial unit is used by the server to serially process the quota update operation in the quota update instruction and sequentially store the quota update operation into the Redis database;

[0117] The serial number addition unit is used to add a corresponding operation identifier to the quota update operation based on the terminal identifier, operation type and operation trigger time corresponding to the quota update operation. The same type of quota update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier.

[0118] The updated quota comparison unit is used to compare the deductible quota corresponding to the quota update operation with the deductible quota corresponding to the target dimension parameter when there is no duplicate operation identifier in the quota update operation.

[0119] Furthermore, the deduction limit comparison module specifically includes: a duplicate operation deletion unit, used by the server to delete the limit update operation corresponding to the duplicate operation identifier in the Redis database when there is a duplicate operation identifier in the limit update operation.

[0120] Furthermore, the credit limit adjustment device includes a credit limit timed reconstruction module, which is used for:

[0121] The server determines whether the quota configuration type of the target product belongs to the time interval type;

[0122] If the quota configuration type of the target product belongs to the time interval type, then the quota of the latitude information group corresponding to the target product will be updated according to the preset quota reconstruction rules and the current time.

[0123] Furthermore, the credit limit adjustment device specifically includes a credit limit insufficient reminder module, which is used for:

[0124] When the deductible amount corresponding to the target latitude parameter is less than the deductible amount, the server returns an insufficient amount reminder message.

[0125] The methods executed by the above-mentioned program modules can be referred to in the various embodiments of the quota control method of the present invention, and will not be repeated here.

[0126] The present invention also provides a computer-readable storage medium.

[0127] The present invention provides a computer-readable storage medium storing a quota control program, which, when executed by a processor, implements the steps of the quota control method described above.

[0128] The method implemented when the quota control program running on the processor is executed can be referred to in various embodiments of the quota control method of the present invention, and will not be repeated here.

[0129] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0130] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0132] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for regulating a credit, characterized by, The quota regulation method is applied to a quota regulation system, and the quota regulation system comprises a terminal, a Redis database and a server. When the server receives the concurrent quota update instruction sent by the terminal, the server acquires the related field information of the target product in the quota update instruction, determines a target latitude parameter in a latitude information group corresponding to the target product in the Redis database according to the related field information, and the target latitude parameter comprises one or more of the following: an agency-specific quota, a channel-shared quota and a product total quota. The server acquires the concurrent quota update operation in the quota update instruction, sequentially adds the quota update operation to the Redis database, sequentially performs serial processing according to the sequentially arranged quota update operation in the Redis database, and adds the quota update operation to a corresponding operation identifier based on the terminal identifier, the operation type and the operation trigger time corresponding to the quota update operation, wherein the same operation identifier corresponds to the same type of quota update operation triggered by the same terminal based on the same product within a preset time interval; different operation types correspond to different functions in a Lua script, and a quota deduction function encapsulates an atomic operation of querying real-time quota and deducting and saving the quota. When there is a repeated operation identifier in the quota update operation, the server deletes the quota update operation corresponding to the repeated operation identifier in the Redis database. When there is no repeated operation identifier in the quota update operation, the server compares the deduction quota corresponding to the current quota update operation with the deductible quota corresponding to the target latitude parameter. When the deductible quota corresponding to the target latitude parameter is not less than the deduction quota corresponding to the current quota update operation, the server performs quota update on the deductible quota corresponding to the target latitude parameter of the target product according to the deduction quota, and performs corresponding update on the product deductible total quota corresponding to the target product, to complete the current quota update operation. According to the above process, the next quota update operation corresponding to the quota update instruction in the Redis database is continuously processed until the quota update instruction is completed. When the server receives a quota configuration instruction, the server determines the product to be configured and the product quota parameter corresponding to the latitude information group to be configured in the quota configuration instruction. It is judged whether the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured. If the sum of the first quota parameter and / or the sum of the second quota parameter in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured, the latitude information and the corresponding quota information of the product to be configured are updated according to the product quota parameter corresponding to the latitude information group to be configured. When the server receives a quota leveling instruction, the server acquires the first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter of the target product. The first quota allocation parameter, the second quota allocation parameter and / or the third quota allocation parameter are compared with the configured quota in the preset quota configuration table to determine the difference value of the first quota parameter, the difference value of the second quota parameter and / or the difference value of the third quota parameter; According to the difference value of the first quota parameter, the difference value of the second quota parameter and / or the difference value of the third quota parameter, the corresponding deductible quota of the latitude information group of the target product in the Redis database is updated.

2. The credit regulation method of claim 1, wherein, When the server receives the concurrent quota update instruction sent by the terminal, the server acquires the related field information of the target product in the quota update instruction, and determines the target latitude parameter in the latitude information group corresponding to the target product in the Redis database according to the related field information. When the server receives the concurrent quota update instruction sent by the terminal, the server acquires the related field information of the target product in the quota update instruction. The server determines the target latitude parameter based on the preset script program in the Redis database and the related field information in the special quota of the institution, the channel shared quota or the product total quota corresponding to the target product.

3. The allowance regulation method of claim 1, wherein, The steps of the quota control method further include: The server determines whether the quota configuration type of the target product belongs to the time interval type. If the quota configuration type of the target product belongs to the time interval type, the quota of the latitude information group corresponding to the target product is updated according to the preset quota reconstruction rule and the current time.

4. The credit regulation method according to any one of claims 1 to 3, wherein After the step of comparing the deductible quota corresponding to the current quota update operation with the deductible quota corresponding to the target latitude parameter, the following steps are further included: When the deductible quota corresponding to the target latitude parameter is less than the deductible quota, the server returns a reminder message of insufficient quota.

5. A credit regulating device, characterized in that The quota control device is applied to a quota control system, and the quota control system includes a terminal, a Redis database and a server. The quota control device includes: A target latitude parameter determination module is configured to acquire, when the server receives a concurrent quota update instruction sent by the terminal, related field information of a target product in the quota update instruction, and determine a target latitude parameter in a latitude information group corresponding to the target product in the Redis database according to the related field information. The target latitude parameter includes one or more of the following: special quota of an institution, channel shared quota, product total quota. A deductible quota comparison module is configured to acquire, by the server, a concurrent quota update operation in the quota update instruction, add the quota update operation to the Redis database in sequence, and sequentially process the quota update operation arranged in sequence in the Redis database in series, and compare the deductible quota corresponding to the current quota update operation with the deductible quota corresponding to the target latitude parameter. The deduction amount comparison module specifically comprises: a serial number adding unit, configured to add the quota update operation to a corresponding operation identifier based on a terminal identifier, an operation type, and an operation trigger time corresponding to the quota update operation, wherein the same type of quota update operation triggered by the same terminal based on the same product within a preset time interval corresponds to the same operation identifier; different operation types correspond to different functions in a Lua script, and a quota deduction function encapsulates an atomic operation of querying real-time quota and deducting quota and saving; an updated quota comparison unit, configured to compare a deduction amount corresponding to a current quota update operation with a deductible amount corresponding to the target latitude parameter when there is no repeated operation identifier in the quota update operation; a repeated operation deletion unit, configured to delete, by the server, a quota update operation corresponding to the repeated operation identifier in the Redis database when there is a repeated operation identifier in the quota update operation; The quota deduction update module is configured to update, by the server, the deductible amount corresponding to the target latitude parameter of the target product according to the deduction amount when the deductible amount corresponding to the target latitude parameter is not less than the deduction amount corresponding to the current quota update operation, and to update the product deductible total amount corresponding to the target product to complete the current quota update operation. The device is further configured to: continue processing a next quota update operation corresponding to the quota update instruction in the Redis database according to the above process until the quota update instruction is completed. The quota configuration checking module is configured to: determine, by the server, a product quota parameter corresponding to a product to be configured and a latitude information group to be configured in the quota configuration instruction when the quota configuration instruction is received; judge whether a sum of first quota parameters and / or a sum of second quota parameters in the latitude information group to be configured matches a third quota parameter in the latitude information group to be configured; and update, by the server, latitude information of the product to be configured and corresponding quota information according to the product quota parameter corresponding to the latitude information group to be configured if the sum of the first quota parameters and / or the sum of the second quota parameters in the latitude information group to be configured matches the third quota parameter in the latitude information group to be configured. The quota leveling module is configured to: obtain, by the server, a first quota allocation parameter, a second quota allocation parameter, and / or a third quota allocation parameter of the target product when a quota leveling instruction is received; compare the first quota allocation parameter, the second quota allocation parameter, and / or the third quota allocation parameter with a configuration quota in a preset quota configuration table to determine a difference value of the first quota parameter, a difference value of the second quota parameter, and / or a difference value of the third quota parameter; and update, by the server, the deductible amount corresponding to the latitude information group of the target product in the Redis database according to the difference value of the first quota parameter, the difference value of the second quota parameter, and / or the difference value of the third quota parameter.

6. A credit regulation device characterized by comprising: The quota regulation device comprises a memory, a processor, and a quota regulation program stored in the memory and executable on the processor, and the quota regulation program, when executed by the processor, implements the steps of the quota regulation method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a quota regulation program, and the quota regulation program, when executed by the processor, implements the steps of the quota regulation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Business data management method and apparatus

    CN107180040A