Limit management method and device, equipment and storage medium

Through unified inspection and adjustment interfaces, multiple quota items are managed, which solves the problem of incompatible quota control logic, reduces development costs, and improves system stability and compatibility.

CN118780906APending Publication Date: 2024-10-15FUTU NETWORK TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410689996.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In the existing technology, quota control logics are incompatible with each other, leading to problems such as increased development costs and poor system stability.

Method used

Use a unified checking interface and a unified adjustment interface to check and adjust multiple types of quota items to achieve quota control based on unified logic, reduce development costs, and improve system stability and compatibility.

Benefits of technology

Achieving quota control through a unified interface solves the problem of incompatibility of quota control logic, reduces development costs, improves the efficiency of quota management and system stability, and avoids database burden and data processing congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780906A_ABST
    Figure CN118780906A_ABST
Patent Text Reader

Abstract

The invention provides a quota management method and device, equipment and a storage medium, and the method comprises the steps: obtaining a business processing request of a target business, and the business processing request comprises a quota adjustment value of a business resource quota of the target business; in response to the service processing request, checking a quota residual value of the service resource quota based on the unified checking interface; in response to the passing of the check, for each target quota item in the business resource quota, generating a quota adjustment transaction for adjusting the target quota item according to an adjustment value corresponding to the target quota item in the quota adjustment values, the business resource quota comprises at least one of the following quota items: a user dimension quota item, a user group dimension quota item and a time dimension quota item; and based on the quota adjustment transaction, calling a unified adjustment interface to adjust the quota residual value of the target quota item. The limit management efficiency and flexibility are improved, the system stability and compatibility are improved, and the development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a quota management method, apparatus, device and storage medium. Background Art

[0002] In the process of virtual resource trading and exercise, quota control is generally carried out in order to comply with compliance requirements or for the purpose of risk control. For example, the administrator or broker of the virtual resource trading unit will flexibly configure the number of virtual resources such as stocks that users can operate within a period of time, so as to adapt to different operation scenarios and risk control needs.

[0003] At present, when implementing quota control, since there are multiple types of quotas and each type of quota needs to be implemented according to an independent set of control logic, there is a problem of incompatibility between different quota control logics. Moreover, when a new type of quota needs to be added, the corresponding control logic needs to be redeveloped, resulting in increased development costs. Summary of the invention

[0004] The present application provides a quota management method, apparatus, device and storage medium to improve the efficiency and flexibility of quota management, improve system stability and compatibility, and reduce development costs.

[0005] In a first aspect, the present application provides a quota management method, the method comprising: obtaining a business processing request of a target business, the business processing request including a quota adjustment value of a business resource quota of the target business; in response to the business processing request, checking the remaining quota value of the business resource quota based on a unified check interface; in response to passing the check, for each target quota item in the business resource quota, generating a quota adjustment transaction for adjusting the target quota item according to the adjustment value corresponding to the target quota item in the quota adjustment value, the business resource quota including at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item; based on the quota adjustment transaction, calling a unified adjustment interface to adjust the remaining quota value of the target quota item.

[0006] In a second aspect, the present application provides a quota management device, including: an acquisition module, used to: acquire a business processing request of a target business, the business processing request including a quota adjustment value of a business resource quota of the target business; an inspection module, used to: respond to the business processing request, and inspect the remaining quota value of the business resource quota based on a unified inspection interface; a generation module, used to: in response to passing the inspection, for each target quota item in the business resource quota, generate a quota adjustment transaction for adjusting the target quota item according to the adjustment value corresponding to the target quota item in the quota adjustment value, wherein the business resource quota includes at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item; an adjustment module, used to: based on the quota adjustment transaction, call a unified adjustment interface to adjust the remaining quota value of the target quota item.

[0007] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect or its various implementations.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect or its various implementations.

[0009] In a fifth aspect, the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute the method in the first aspect or its various implementations.

[0010] In a sixth aspect, the present application provides a computer program, which enables a computer to execute the method in the first aspect or its various implementations.

[0011] Through the technical solution of the present application, the electronic device can check and adjust at least one credit item, that is, at least one type of credit, according to a unified check interface and calling a unified adjustment interface. That is to say, the electronic device can realize credit control of multiple types of credits based on a unified control logic. Therefore, the problem that different credit control logics are incompatible with each other can be solved, the development cost can be reduced, the efficiency and flexibility of credit management can be improved, and the system stability and compatibility can be improved. In addition, for each credit item, the electronic device can generate a transaction for adjusting the credit remaining value of the credit item, and realize the credit adjustment for the credit item based on the transaction, thereby avoiding the problem of heavy database burden and data processing congestion caused by processing multiple credit items based on one transaction, and improving the success rate of credit management. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] Figure 1 An application scenario diagram provided for an embodiment of the present application;

[0014] Figure 2 A flow chart of a credit limit management method provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a credit limit management method provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of another credit limit management method provided in an embodiment of the present application;

[0017] Figure 5 A schematic diagram of another credit limit management method provided in an embodiment of the present application;

[0018] Figure 6 A schematic diagram of another credit limit management method provided in an embodiment of the present application;

[0019] Figure 7 A schematic diagram of another credit limit management method provided in an embodiment of the present application;

[0020] Figure 8 A schematic diagram of another credit limit management method provided in an embodiment of the present application;

[0021] Fig. 9 A schematic diagram of a credit limit management device 900 provided in an embodiment of the present application;

[0022] Fig.10 A schematic block diagram of an electronic device 1000 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] As mentioned above, the existing technology has the problem that different quota control logics are not compatible with each other and the development cost is high.

[0026] In order to solve the above technical problems, the present application can check and adjust at least one credit item, i.e., at least one type of credit, according to a unified check interface and calling a unified adjustment interface, thereby realizing credit control of multiple types of credits based on a unified control logic, thus solving the problem of incompatibility between different credit control logics, reducing development costs, improving the efficiency and flexibility of credit management, and improving system stability and compatibility. In addition, for each credit item, the electronic device can generate a transaction for adjusting the credit remaining value of the credit item, and realize the credit adjustment for the credit item based on the transaction, thereby avoiding the problem of heavy database burden and data processing congestion caused by processing multiple credit items based on one transaction, and improving the success rate of credit management.

[0027] It should be understood that the technical solution of the present application can be applied to the following scenarios, but is not limited to:

[0028] In some possible implementations, the technical solution of the present application can be used in a quota management scenario of virtual resources. For example, it can be applied to a scenario where a user exercises rights for stock 1, and the present application does not impose any restrictions on this.

[0029] In some possible implementations, Figure 1 An application scenario diagram provided for an embodiment of the present application, such as Figure 1 As shown, the application scenario may include a terminal device 110 and an electronic device 120. The terminal device 110 and the electronic device 120 may be connected via a wired network or a wireless network.

[0030] Among them, the terminal device 110 can install a financial transaction client, and the user can perform target business related to virtual resources based on the client. Correspondingly, the electronic device 120 can obtain a business processing request for the target business, and the business processing request may include a quota adjustment value of the business resource quota of the target business. Thereafter, the electronic device 120 can adjust the quota of the business resource quota in response to the request.

[0031] Exemplarily, the terminal device 110 may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) or virtual reality (VR) device, etc., but is not limited thereto. The electronic device 120 may be a server, a server cluster consisting of multiple servers, or a cloud platform control center, which is not limited in the embodiments of the present application.

[0032] also, Figure 1 The number of terminal devices and electronic devices shown is only exemplary, and may actually include other numbers of terminal devices and electronic devices, which is not limited in this application.

[0033] In some other possible implementations, the technical solution of the present application can be executed by the above-mentioned terminal device 110, and the present application does not impose any limitation on this.

[0034] It should be noted that in the specific implementation of the present application, relevant data such as virtual resources, business resource quotas, quota adjustment values, quota remaining values, quota configuration items, business processing requests, etc. are involved. When the embodiments of the present application are applied to specific products or technologies, user permission, consent or authorization is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0035] After introducing the application scenarios of the embodiments of the present application, the technical solution of the present application will be described in detail below:

[0036] Figure 2 A flow chart of a quota management method provided in an embodiment of the present application, the method can be performed as follows Figure 1 The electronic device 120 shown in the figure performs, but is not limited to this. Figure 2 As shown, the method may include the following steps:

[0037] S210: Obtaining a business processing request of a target business, where the business processing request includes a quota adjustment value of a business resource quota of the target business;

[0038] S220: In response to the business processing request, checking the remaining value of the business resource quota based on the unified checking interface;

[0039] S230: In response to the check being passed, for each target quota item in the business resource quota, according to the adjustment value corresponding to the target quota item in the quota adjustment value, a quota adjustment transaction for adjusting the target quota item is generated, where the business resource quota includes at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item;

[0040] S240: Based on the quota adjustment transaction, call the unified adjustment interface to adjust the remaining quota value of the target quota item.

[0041] In some implementations, the target business may be a business related to exercising rights or virtual resource trading, but is not limited thereto. Accordingly, the business processing request may be an order request for purchasing stocks corresponding to the exercised rights when the user exercises the rights, or a sell request for selling a fund when the user sells the fund.

[0042] Business resource quota refers to a certain number of processing permissions set for business resources in the target business. Business resource quotas can be classified from different dimensions. Specifically, business resource quotas can be classified from different dimensions into at least one of the following quota items, but not limited to: user dimension quota item, user group dimension quota item, and time dimension quota item.

[0043] Among them, the user dimension quota item refers to the processing quota of business resources for a single user set for a single user; the user group dimension quota item refers to the processing quota of business resources for the entire company / department set for the entire company / department; the time dimension quota item refers to the processing quota for business resources set according to time periods such as days, months, and years. The time dimension quota item may specifically include: single-day quota item (i.e. the processing quota for business resources set within a single day), monthly quota item (i.e. the processing quota for business resources set within the current month), and current year quota item (i.e. the processing quota for business resources set within the current year).

[0044] Taking the target business as equity incentive business and the business resources as stocks involved in the equity incentive business as an example, the user dimension quota item can be the quantity quota that employee 1 of company 1 can purchase for stocks involved in the equity incentive business of company 1; the user group dimension quota item can be the quantity quota that company 1 can sell for stocks involved in its equity incentive business; the time dimension quota item can refer to the quantity quota of stocks that can be traded under the equity incentive business within 1 day.

[0045] Of course, the user dimension quota item, user group dimension and time dimension quota item can be further divided according to the time period and / or business object. The business object refers to the company or department corresponding to the target business. For example, if the target business is an equity incentive business, the business object refers to the company or department with the equity incentive business. For example, for the user dimension quota item, it can be any of the following: the processing quota of business resources set for a single user in a specific time period; the processing quota of a specific business resource of a specific business object set for a single user; the processing quota of a specific business resource of a specific business object set for a single user in a specific time period. For the user group dimension quota item, it can be: the processing quota of business resources set for the entire company / department in a specific time period. For the time dimension quota item, it can be the processing quota of business resources for a specific business object set according to time periods such as days, months, and years.

[0046] Exemplarily, if the target business is an equity incentive business, user 1 can log in to account 1 based on the client and purchase 50 shares of company 1's stock 1 on the exercise date. The client can respond to the purchase operation and determine that the business processing request is (account, account 1; quantity, 50; virtual resources, stock 1). The business resource quota corresponding to the request includes a user dimension quota item (in this embodiment, it refers to the quota for user 1, specifically the quota of user 1's account 1), and the quota adjustment value of the business resource quota is: account 1 consumes 50 shares of stock 1.

[0047] It should be noted that the unified check interface can be used to check the remaining value of multiple credit items. Similarly, the unified adjustment interface can be used to adjust the remaining value of multiple credit items. That is to say, for credit items of any dimension, the electronic device only needs to configure the data in the underlying configuration table in advance, and then it can check and adjust the remaining value of the credit through the above two interfaces, which not only saves development costs, but also avoids the problem of incompatibility of control logic corresponding to different credit items.

[0048] In addition, the electronic device can integrate the unified checking interface and the unified adjustment interface to obtain one interface, such as the checking and adjustment interface, so that the checking and adjustment of the remaining value of the quota for different quota items can be realized by calling only one interface.

[0049] In some implementations, the electronic device may check the remaining value of the service resource quota based on the unified checking interface in any of the following implementations, but is not limited thereto:

[0050] The first implementation method is to obtain multiple check items, which are used to check the remaining value of the business resource quota; instantiate the multiple check items to obtain multiple check item instances; based on a unified check interface, traverse the multiple check item instances to check the remaining value of the business resource quota.

[0051] Among them, different check items are used to check the remaining value of different quota items to determine whether the remaining value of the quota is sufficient, etc. Specifically, after obtaining the business processing request, the quota item of the business resource quota can be determined based on the business type of the business processing request, that is, the target quota item to be checked for the remaining value of the quota is determined, and the check items corresponding to each target quota item are obtained accordingly.

[0052] For example, if the business type of the business processing request is a transaction order type, the resource identifier and user identifier of the business resource carried in the business processing request can be obtained, and the target quota item corresponding to the business resource quota can be determined based on the resource identifier and user identifier of the business resource, and check items corresponding to each target quota item of the business resource can be constructed. Through these check items, the remaining value of the quota corresponding to each target quota item of the business resource quota can be checked.

[0053] Among them, the user identification may include but is not limited to the user's personal identification and the group identification of the company or department to which the user belongs; specifically, if the business processing request is an order request for a certain business resource by a certain user, the quota items corresponding to the resource identification and the user identification can be matched according to the resource identification of the business resource in the order request and the user identification of the user. For example, it may include but is not limited to: the user dimension quota item corresponding to the personal identification, the user group dimension quota item corresponding to the group identification, and the time dimension quota items in different time dimensions corresponding to the personal identification and / or group identification (for example, the user's single-day quota item or the monthly quota item of the company or department to which the user belongs, etc.), and then according to each matched quota item, the inspection items corresponding to each matched quota item are constructed, thereby obtaining multiple inspection items.

[0054] Specifically, according to the resource identifier of the business resource in the order request and the user identifier of the user, the quota item corresponding to the resource identifier and the user identifier is matched. Specifically, the resource identifier and the user identifier can be spliced ​​to obtain an index identifier, and then the index identifier is matched with the quota item identifiers of different quota items to obtain the association degree. Further, the association degree between the index identifier and the quota item identifiers of different quota items can be determined by the number of consecutive identical characters between the index identifier and the quota item identifiers of different quota items. At the same time, if the number of consecutive identical characters is closer to the length of the resource identifier or the user identifier, the larger its weight value in formula (1) is, and the corresponding association degree is larger. According to formula (1), the association degree between the index identifier and the quota item identifier of the quota item is calculated as:

[0055]

[0056] Wherein, sim represents the correlation between the index identifier and the quota item identifier of the quota item, α and β represent the preset correlation factors, and mon mun Indicates the number of consecutive identical characters in the index identifier and the quota item identifier of the quota item, USE mun Indicates the length of the user ID, Resource mun Indicates the length of the resource identifier. When the correlation between the index identifier and the quota item identifier of a certain quota item is greater than a preset threshold, it can be determined that the quota item is the target quota item corresponding to the business resource quota involved in the business processing request.

[0057] For example, if the business type of the business processing request is a transaction modification type, that is, the business processing request is a modification request for a historical business order, such as increasing / decreasing the quota adjustment value in the historical business order, the order information can be determined according to the modification request, the order ID of the historical business order can be determined according to the order information, the quota flow information corresponding to the order ID can be matched, and the quota items involved in the historical business order can be obtained according to the quota flow information, and then the inspection items corresponding to each quota item involved can be constructed according to these quota items involved, so as to obtain multiple inspection items. Among them, the quota flow information records the amount of business resource quota occupied by the order under different quota items.

[0058] The following is an introduction to the specific contents of the inspection items:

[0059] Exemplarily, each check item may include necessary information required for checking the remaining value of the corresponding credit limit item, such as the identification of the credit limit item, the adjustment type of the credit limit item, the check method, the check result output method, etc.

[0060] Among them, the adjustment type of the credit limit item can be determined by the business processing request. If the business processing request is used to reduce the remaining value of the credit limit (i.e., occupy or consume the remaining value of the credit limit), the adjustment type of the credit limit item is the type of occupying the remaining value of the credit limit. If the business processing request is used to increase the remaining value of the credit limit, the adjustment type of the credit limit item is the type of releasing the remaining value of the credit limit.

[0061] The checking method can be used to check the size of the remaining value of the credit limit and the credit limit adjustment value, and may include a specific checking logic script. For example, by calling the detection logic script, the following checking method can be implemented: obtaining the remaining value of the credit limit and the credit limit adjustment value of the credit limit item, determining the adjustment type of the credit limit item, and comparing the remaining value of the credit limit and the credit limit adjustment value.

[0062] Among them, the adjustment type of the credit item can correspond to the inspection method one by one. For example, if the adjustment type of the credit item is a type that occupies the remaining value of the credit, the inspection method is used to check whether the remaining value of the credit is greater than or equal to the credit adjustment value. Accordingly, in response to the inspection result that the remaining value of the credit is greater than or equal to the credit adjustment value, it can be determined that the inspection result is passed. If the adjustment type of the credit item is a type that releases the remaining value of the credit, the inspection method is used to check whether the remaining value of the credit is less than the credit adjustment value. Accordingly, in response to the inspection result that the remaining value of the credit is less than the credit adjustment value, it can be determined that the inspection result is passed.

[0063] Furthermore, the check item may be a pre-packaged class for checking the remaining value of the credit limit corresponding to different credit limit items, but is not limited thereto. Afterwards, the electronic device may create an object according to the definition of the check item and the information included in the check item to obtain a check item instance, thereby completing the instantiation processing for the check item.

[0064] It can be understood that instantiation refers to the process of creating multiple objects with the same properties and methods according to the definition of the class in object-oriented programming. The created objects are called instances of the class. The class is a custom data type used to define a set of properties and methods (the check items in this application are used to define the necessary information required to check the remaining value of the corresponding credit item). The instance has an independent memory space, has different property values, and can execute the methods defined in the class definition. By instantiating the class, multiple objects of the same type can be created, thereby avoiding rewriting the same code. At the same time, properties and methods can be encapsulated into specific objects to achieve data isolation, thereby achieving unified operations for different objects and improving the flexibility and scalability of the code.

[0065] Exemplarily, the electronic device may add multiple check item instances to a set or a list to obtain a check item instance set or a check item instance list. In addition, the electronic device may determine that the unified check interface can accept the check item instance as a parameter and return the check result as a result. Afterwards, the electronic device may call the unified check interface and use a loop method or an iterator to traverse the check items in the above set or list to obtain the check result, thereby completing the check of the remaining value of the business resource quota.

[0066] Exemplarily, the electronic device may use multi-threading or multi-coroutine to concurrently traverse multiple inspection item instances to increase the response speed of the program.

[0067] It should be noted that the above embodiment completes the check of the remaining quota value of all quota items in the business resource quota through multiple check items, which can be specifically: for each quota item, at least one check item corresponding to the quota item is used to check the remaining quota value of the quota item; or, for each check item in the multiple check items, the check item can be used to check any at least one quota item in the business resource quota. In other words, the above embodiment completes the check of the quota item from the perspective of the check item, and the electronic device can also complete the check of the remaining quota value from the perspective of the quota item, which can specifically include: in response to a business processing request, based on the business type of the business processing request, determining the target quota item of the business resource quota; instantiating the target quota item to obtain a quota item instance; based on the quota item instance, calling the check logic script through a unified check interface to check the remaining quota value of the business resource quota under the target quota item.

[0068] Specifically, if the business type of the business processing request is a transaction order type, the resource identifier and user identifier of the business resource carried by the business processing request can be obtained, and the target quota item corresponding to the business resource quota can be determined based on the resource identifier and user identifier of the business resource. If the business type of the business processing request is a transaction order modification type, the order identifier of the historical business order corresponding to the order information can be determined based on the order information carried by the business processing request, and the quota flow information corresponding to the order identifier can be matched. The used quota items involved in the historical business order are obtained based on the quota flow information, and the target quota items are determined based on the used quota items.

[0069] This application will introduce this in the following embodiments according to the business type of the business processing request from three possible implementation methods: implementation methods 2, 3, and 4 respectively:

[0070] The second implementation method is that the above-mentioned checking of the remaining value of the business resource quota may include: determining the business type of the business processing request; in response to the business type being a transaction order type, instantiating at least one quota item to obtain at least one quota item instance; obtaining the configuration data corresponding to at least one quota item, the configuration data including the quota adjustment range and the used quota data; checking the remaining value of the business resource quota through the quota adjustment value, at least one quota item instance and multiple configuration data. Among them, the electronic device can define the above method in a unified check interface, so that the remaining value of the business resource quota can be checked based on the unified check interface. The quota adjustment range may include a single quota adjustment range and a total quota adjustment range, the single quota adjustment range refers to the numerical range of the quota adjustment value under a single quota adjustment, and the total quota adjustment range refers to the numerical range of the sum of the quota adjustment value and the used quota value.

[0071] It can be understood that if the business type is a transaction order type, the quota adjustment value of the business resource quota can be understood as a value used to consume, reduce, use or occupy the remaining value of the quota.

[0072] Among them, in the above-mentioned embodiments, the credit limit item instance can call a method for checking the remaining credit limit value of the corresponding credit limit item through a unified checking interface, that is, it can be used to check the remaining credit limit value of the corresponding credit limit item, and in subsequent embodiments, for example, in the embodiment corresponding to S230, the credit limit item instance can also call an adjustment method for adjusting the remaining credit limit value of the corresponding credit limit item according to the credit limit adjustment value through a unified adjustment interface, and a credit limit adjustment transaction for adjusting the corresponding credit limit item can be generated according to the adjustment method, that is, it can be used to adjust the remaining credit limit value of the corresponding credit limit item.

[0073] In the following embodiments, an example of a quota item will be introduced:

[0074] Exemplarily, the process of instantiating a credit item by an electronic device is similar to the process of instantiating a check item described above, and this application will not elaborate on this. For example, in response to the business type being a transaction order type, the electronic device may first determine at least one credit item involved in the target business when placing a transaction order based on the resource identifier of the business resource carried in the business processing request and the user identifier, and then instantiate any target credit item in the at least one credit item to obtain a credit item instance corresponding to the target credit item, and then based on the credit item instance, call the check method through the unified check interface to check the credit remaining value of the business resource credit based on the credit adjustment range of the target credit item and the used credit data.

[0075] Among them, the inspection method can be used to check the size of the remaining credit limit value and the credit limit adjustment value, and may include a specific inspection logic script. For example, the following inspection method can be implemented by calling the detection logic script: determine whether the credit limit adjustment value belongs to the single credit limit adjustment range in the credit limit adjustment range, determine whether the sum of the credit limit adjustment value and the used credit limit value in the used credit limit data belongs to the total credit limit adjustment range in the credit limit adjustment range, and compare whether the remaining credit limit value is greater than or equal to the credit limit adjustment value; in response to the credit limit adjustment value belonging to the single credit limit adjustment range, the sum of the credit limit adjustment value and the used credit limit value in the used credit limit data belongs to the credit limit adjustment range, and the remaining credit limit value is greater than or equal to the credit limit adjustment value, determine that the inspection is passed; otherwise, determine that the inspection is failed, wherein the credit limit adjustment range may include a single credit limit adjustment range and a total credit limit adjustment range.

[0076] In addition, the credit item instance may also include an identifier of the corresponding credit item to determine the corresponding credit item and check its credit remaining value. Afterwards, the electronic device may use the configuration data and credit adjustment value of at least one credit item as parameters in the corresponding credit item instance, thereby completing the check of the credit remaining value of the business resource credit under the above at least one credit item by traversing the credit item instance and executing the check method.

[0077] For example, Figure 3 As shown, in response to the business type of the business processing request being a transaction order type, the electronic device can obtain all the quota items involved in the business resource quota when placing a transaction order according to the resource identifier and user identifier of the business resource carried in the business processing request, and obtain the quota item instances of all the quota items through the factory class (this application will be introduced in subsequent embodiments, and will not be repeated here), and at the same time, pull the configuration data corresponding to all the quota items through the factory class. After that, the electronic device can call the check method through the unified check interface based on the quota item instance according to the quota adjustment value and the configuration data, so as to check the remaining quota value of the corresponding quota item, for example, to check whether the remaining quota value is sufficient, that is, whether it is greater than or equal to the quota adjustment value, etc. If the check passes, the subsequent adjustment operation of the remaining quota value can be performed, and if the check fails, an error message can be generated and sent to the terminal device.

[0078] In addition, if the check is passed, after adjusting the remaining value of the credit limit, when responding to the business processing request to place a transaction order, the electronic device can record the credit limit flow information corresponding to different credit limit items, wherein the credit limit flow information can include the credit limit usage flow of each order for each credit limit item and the credit limit usage record of different credit limit items. Exemplarily, the credit limit usage flow can include an order identifier, multiple credit limit items, and the credit limit adjustment value of each credit limit item, and the credit limit usage record can include multiple credit limit items and the used credit limit value of each credit limit item. For example, the credit limit usage flow can record: (order identification A; credit limit item A: 50; credit limit item B: 60; credit limit item C: 100), (order identification B; credit limit item A: 50; credit limit item B: 90), etc.; the credit limit usage record can record: (credit limit item A: used credit limit value is 100; credit limit item B: used credit limit value is 150; credit limit item C: used credit limit value is 80). This application does not impose any restrictions on the specific content and form of the credit limit usage flow and credit limit usage records.

[0079] It should be noted that the second achievable method mainly introduces a method for checking the remaining value of the credit limit under a business whose business type of the business processing request is a transaction order type. The following introduces a method for checking the remaining value of the credit limit under a business whose business type of the business processing request is a transaction order modification type:

[0080] It can be understood that if the business type is the first transaction change type (i.e., the type of increasing the order quantity in historical orders), the target business can be understood as a business that increases the order quantity in historical orders and the quota adjustment value of the business resource quota can be understood as a value used to consume, reduce, use or occupy the remaining value of the quota; if the business type is the second transaction change type (i.e., the type of reducing the order quantity in historical orders), the target business can be understood as a business that reduces the order quantity in historical orders and the quota adjustment value of the business resource quota can be understood as a value used to increase, restore, release or recover the remaining value of the quota.

[0081] Since the first transaction modification type or the second transaction modification type is to modify the order quantity in the historical order, the check on the remaining value of the quota should also be based on the quota items involved in the historical order. Therefore, the used quota items involved in the historical order should be obtained to ensure that the quota items in the target business are consistent with the quota items involved in the historical order, avoiding inconsistent quota types due to transaction modification.

[0082] The following will introduce the method of checking the remaining value of the quota under the transaction modification type business through the three and four achievable methods:

[0083] The third achievable method is to determine the business type of the business processing request; in response to the business type being the first transaction modification type, obtain the used credit item involved in the historical order corresponding to the target business, instantiate the used credit item in the business resource credit, and obtain the used credit item instance; obtain the configuration data corresponding to the used credit item, and check the remaining credit value of the business resource credit through the credit adjustment value, the used credit item instance, and the configuration data corresponding to the used credit item. The first transaction modification type is a type that increases the order quantity in the historical order. Among them, the electronic device can define the above method in a unified check interface, so that the remaining credit value of the business resource credit can be checked based on the unified check interface.

[0084] It should be noted that the content corresponding to the used credit limit item and the instantiation processing process of the used credit limit item are similar to the content corresponding to the credit limit item and the instantiation processing process in the above-mentioned second implementation method, and this application will not go into details about this.

[0085] For example, Figure 4As shown in (a), if the business type of the business processing request is the first transaction change type, the electronic device can first determine the order ID (IDentity) corresponding to the historical order, and then obtain the credit limit flow information corresponding to the historical order according to the order ID, such as the credit limit usage flow, and obtain the used credit limit items involved in the historical order from the credit limit flow information to ensure that the credit limit items in the target business are consistent with the credit limit items involved in the historical order.

[0086] Afterwards, the electronic device can obtain the quota item instances and configuration data corresponding to all used quota items through the factory class, and then call the inspection method based on the quota item instance through the unified inspection interface to check the remaining quota value of the business resource quota under the used quota item according to the quota adjustment value and the configuration data of the corresponding quota item. For example, check whether the remaining quota value of the business resource quota under the used quota item is sufficient, that is, whether it is greater than or equal to the quota adjustment value. If the check passes, subsequent adjustment operations on the remaining quota value can be performed. If the check fails, an error message can be generated and sent to the terminal device. In addition, similarly, the electronic device can record the corresponding quota occupation flow and quota usage record.

[0087] The fourth implementation method is to respond to the business type of the business processing request as the second transaction modification type, obtain the used credit items involved in the historical orders corresponding to the target business; obtain the credit flow information corresponding to the used credit items; construct the order resource credit items according to the credit flow information, and the order resource credit items are used to characterize the credit value occupied by the used credit items; instantiate the order resource credit items to obtain the order resource credit item instance; check the credit remaining value of the business resource credit through the order resource credit item instance and the credit adjustment value, and the second transaction modification type is a type that reduces the number of orders placed in the historical orders. Among them, the electronic device can define the above method in a unified check interface, so that the credit remaining value of the business resource credit can be checked based on the unified check interface.

[0088] Exemplarily, the electronic device can determine the order information according to the business processing request, determine the order identification according to the order information, and match the credit flow information corresponding to the order identification, wherein the credit flow information can include credit usage flow. After obtaining the credit flow information, the used credit item and the used credit value of the used credit item (i.e., the occupied credit value) can be determined from the credit flow information; for example, the used credit value of the used credit item of the order information can be calculated according to the credit usage flow of the used credit item; then, the order resource credit item is constructed based on the used credit item, and the credit remaining value of the business resource credit under the order resource credit item is determined according to the used credit value of the used credit item.

[0089] When checking the remaining value of the business resource quota, the order resource quota item can be instantiated to obtain an order resource quota item instance, and the check method can be called through the order resource quota item instance to check the remaining value of the business resource quota under the order resource quota item.

[0090] Exemplarily, the content corresponding to the order resource quota item instance can refer to the content corresponding to the check item instance in the implementation method 1. For example, the electronic device can first construct a quota item instance corresponding to the order resource quota item, and then call the check method through the unified check interface based on the quota item instance corresponding to the order resource quota item to check whether the remaining quota value of the business resource quota under the order resource quota item is sufficient for the deduction of the quota adjustment value.

[0091] For example, Figure 4 As shown in (b), if the business type is the second transaction order modification type, the electronic device can first determine the order ID corresponding to the historical order, and then obtain the credit flow according to the order ID, that is, the credit occupation flow, obtain the used credit items involved in the historical order from the credit occupation flow, and determine the maximum reduction value of each used credit item according to the credit occupation flow, that is, the occupied credit value, as the maximum rollback value. Since the order modification operation may occur multiple times, and each time may be to increase the order quantity or to reduce the order quantity, the occupied credit value of the corresponding used credit item can be determined according to the credit occupation flow, so that it can be ensured that when the order modification operation is performed to reduce the order quantity, the credit adjustment value will not exceed the occupied credit value, and the order can also be rolled back or the order can be cancelled according to the above-mentioned maximum rollback value. Afterwards, the electronic device can construct a rollback instance, that is, the above-mentioned order quantity reduction instance, according to the above-mentioned maximum rollback value, and check the credit remaining value according to the rollback instance in combination with the method in the above-mentioned embodiment.

[0092] A fifth achievable method is to determine at least one quota item included in the business resource quota; generate a specific quota item instance for each of the at least one quota item, wherein the specific quota item instance is used to obtain a specific check item for checking the remaining quota value of the corresponding quota item, and instantiate the specific check item to obtain a specific check item instance; traverse the specific check item to implement a check on the remaining quota value, wherein the contents corresponding to the specific check item and the specific check item instance are similar to those in the achievable method one, and are not elaborated here to avoid repetition.

[0093] That is to say, the credit limit item instance in the above embodiment can also be specifically used to obtain the inspection item of the corresponding credit limit item and instantiate the inspection item to obtain the inspection item instance, so as to determine the specific inspection item instance through the specific credit limit item instance, and complete the inspection of the remaining value of the credit limit through the specific inspection item instance.

[0094] In some implementations, the electronic device may use multi-threading or multi-coroutines to concurrently traverse multiple credit item instances, used credit item instances, or order quantity reduction instances to increase the response speed of the program.

[0095] This application will introduce the content of adjusting the remaining value of the credit limit in the following embodiments:

[0096] It is understandable that for each credit item, the electronic device can generate a transaction for adjusting the remaining credit value of the credit item, and implement the credit adjustment for the credit item based on the transaction. That is to say, the electronic device can use a small transaction to adjust the remaining credit value of the credit item. Compared with the method of using one transaction to update the remaining credit value of multiple credit items, it is not easy to cause a large database burden and data processing congestion due to a large number of credit items, which can improve the success rate of credit management. Moreover, each credit item corresponds to a transaction, which can also achieve accurate rollback for each credit item and reasonable occupation of the credit.

[0097] In some implementable methods, in combination with the content corresponding to the above-mentioned credit limit item instance, the above-mentioned adjustment value corresponding to the target credit limit item in the credit limit adjustment value generates a credit limit adjustment transaction for adjusting the target credit limit item, including: instantiating the target credit limit item according to the adjustment value corresponding to the target credit limit item in the credit limit adjustment value to obtain a target credit limit item instance, calling an adjustment method for adjusting the remaining credit limit value through a unified adjustment interface based on the target credit limit item instance, and generating a credit limit adjustment transaction for adjusting the target credit limit item.

[0098] The above adjustment method may include: if the adjustment type of the credit limit item is the type of occupying the remaining value of the credit limit, the adjusted remaining value of the credit limit is determined by the difference between the remaining value of the credit limit and the adjustment value corresponding to the target credit limit item; or, if the adjustment type of the credit limit item is the type of releasing the remaining value of the credit limit, the adjusted remaining value of the credit limit is determined by the sum of the remaining value of the credit limit and the adjustment value corresponding to the target credit limit item.

[0099] In some possible implementations, the above-mentioned adjustment of the remaining credit limit value of the target credit limit item may include: obtaining multiple credit limit configuration items of the target credit limit item; determining the priority order of each credit limit configuration item based on the usage period and total credit limit value of each credit limit configuration item; and adjusting the remaining credit limit values ​​of multiple credit limit configuration items based on the priority order of each credit limit configuration to update the remaining credit limit value of the target credit limit item.

[0100] Among them, multiple credit configuration items of a credit item can be understood as multiple usable items of a credit item. For example, for credit item A, credit item A includes 2 credit configuration items: credit configuration item a1 and credit configuration item a2, wherein the total credit value of credit configuration item a1 is a1, i.e., the credit limit is a1, and the validity period is from January 1 to January 31, and the total credit value of credit configuration item a2 is a2, i.e., the credit limit is a2, and the validity period is from February 2 to February 28. That is to say, the total credit value of credit item A is a1+a2, and credit configuration item a1 is valid and usable between January 1 and January 31, and credit configuration item a1 is invalid and cannot be used outside January 1 to January 31; credit configuration item a2 is valid and can be used between February 2 and February 28, and the total credit value of credit configuration item a2 is invalid and cannot be used outside February 2 to February 28. When adjusting the remaining value of the credit limit, the electronic device can

[0101] Exemplarily, the electronic device can sort multiple credit limit configuration items according to the order of usage period from early to late. For credit limit configuration items with the same usage period, they can be sorted in the order of total credit limit value from small to large, so as to obtain the priority order of each credit limit configuration, so as to give priority to the credit limit configuration items that are about to expire and the credit limit configuration items with smaller total credit limit values, so as to achieve more reasonable credit limit usage.

[0102] After determining the priority order of each credit configuration, the electronic device can adjust the remaining credit value of the credit configuration item with the highest priority order according to the credit adjustment value. If the remaining credit value of a credit configuration item is not enough to deduct the credit adjustment value, other credit configuration items can continue to be used in order of priority until the credit required by the target business is met, that is, it is sufficient to occupy the credit adjustment value.

[0103] For example, Figure 5 As shown in the flowchart on the left, if the business type is a transaction order type, the business resource quota includes quota item A, and the target business needs to occupy a quota quantity of 150, that is, the quota adjustment value of quota item A is 150. Quota item A includes 2 quota configuration items: quota configuration item a1 and quota configuration item a2. The remaining quota values ​​of quota configuration item a1 and quota configuration item a2 are 100 and 50 respectively. The usage period of quota configuration item a1 is earlier than that of quota configuration item a2. Therefore, the electronic device can first adjust the quota configuration item a1 according to the quota adjustment value 150, and determine that the remaining quota value of the adjusted quota configuration item a1 is 0. Then, the quota configuration item a2 can be adjusted to determine that the remaining quota value of the adjusted quota configuration item a2 is 0, and determine that the update of the remaining quota value for quota item A is completed.

[0104] like Figure 5As shown in the flowchart on the right, if the business type is the second transaction modification type, the business resource quota includes quota item B, and the target business needs to reduce the order quantity in the historical order by 60, that is, the quota adjustment value of quota item B is 60. Quota item B includes 2 quota configuration items: quota configuration item b1 and quota configuration item b2. The remaining quota values ​​of quota configuration item b1 and quota configuration item b2 are 50 and 100 respectively, and the occupied quota values ​​are 50 and 30 respectively. The service life of quota configuration item b1 is earlier than that of quota configuration item b2. Therefore, the electronic device can first adjust the quota configuration item b2 according to the quota adjustment value 60, and determine that the remaining quota value of the adjusted quota configuration item b2 is 130, and the occupied quota value is 0; then, the quota configuration item b1 can be adjusted to determine that the remaining quota value of the adjusted quota configuration item b1 is 50+(60-30)=80, and determine that the update of the remaining quota value for quota item B is completed.

[0105] In some possible implementations, before the above-mentioned generation of the credit limit adjustment transaction for adjusting the target credit limit item, it also includes: determining a request identifier of the business processing request, the request identifier is used to uniquely identify the business request; judging whether the request identifier is the same as a historical request identifier of a historical business processing request; if the request identifier is the same as the historical request identifier, in response to the processing result of the historical business processing request being a successful processing, the processing result of the historical business processing request is determined as the processing result of the business request, or, in response to the processing result of the historical business processing request being a failed processing, continuing to execute the generation of the credit limit adjustment transaction for adjusting the target credit limit item to determine the processing result of the business request; if the request identifier is not the same as the historical request identifier, executing the generation of the credit limit adjustment transaction for adjusting the target credit limit item to determine the processing result of the business request.

[0106] Through the above embodiments, idempotence control for business processing requests can be implemented to ensure that consistent results can be obtained based on multiple identical requests, and to avoid processing pressure and waste of processing resources caused by the need to perform the same operation on multiple identical requests.

[0107] In some implementations, the electronic device may submit a sub-quota adjustment transaction based on an optimistic lock to avoid conflicts between the processing results of one task and the processing results of another task when multiple tasks simultaneously process the same transaction.

[0108] Optimistic Locking is a concurrency control mechanism that allows multiple tasks to operate on data in parallel without locking. When one of the multiple tasks needs to update data, optimistic locking will not lock the data immediately, but will check whether other tasks have modified the data during the update to avoid thread conflicts between multiple tasks.

[0109] In some implementations, the electronic device may generate a quota rollback transaction according to the quota adjustment value of the business resource quota in response to the processing result of the business request being a processing failure, and submit the quota rollback transaction to restore the business resource quota to the quota before obtaining the business processing request. Rollback refers to the act of restoring a program or data to the most recent correct version when an error occurs in the program or data.

[0110] Exemplarily, the electronic device may first determine at least one credit limit item included in the business resources, as well as the current credit limit value of each credit limit item and the initial value before adjustment, namely, the rollback target value. Then, the electronic device may construct a rollback object list based on the above-mentioned at least one credit limit item, and then determine the difference between the current credit limit value and the rollback target value of each credit limit item as the rollback adjustment value of the credit limit item. Then, the electronic device may determine that the rollback operation includes: traversing each credit limit item in the rollback object list, and using the corresponding rollback adjustment value to adjust the value of the credit limit item to the rollback target value. Finally, the electronic device may determine that the credit limit rollback transaction includes the above-mentioned rollback object list, rollback adjustment value and rollback operation.

[0111] In some possible implementations, the electronic device can implement the setting and management of the quota through classes and interfaces, specifically, Figure 6As shown, the general credit class can be used to implement the unified usage method of all credit items, that is, the adjustment method, rollback method, and inspection method of the remaining credit value. It can inherit the "credit usage interface (i.e., unified adjustment interface)" and "inspection interface (i.e., unified inspection interface)". If a new credit item appears, the class corresponding to the new credit item (i.e., the specific credit class) can simply inherit the general credit class to implement the adjustment of the credit item. The general credit class can record the credit value used by the credit item in the credit usage data model, and record the detailed flow of each credit occupation in the credit flow data model. The general credit class can also start a transaction to write to the database to implement the adjustment of the remaining credit value, and use optimistic locking to update the corresponding data. In addition, the general credit class can be configured with the credit limit, i.e., the total credit value, the current usage, i.e., the credit adjustment value under the current business, the source of business, employee configuration, unified credit usage method, unified credit rollback method, and unified credit inspection method. The credit usage interface can be configured with a credit usage method, i.e., a method for adjusting the remaining credit value and a credit rollback method, etc. The inspection interface can be configured with an inspection method for the remaining credit value. The specific credit class is the credit usage class corresponding to each credit item, which inherits the credit general class. Therefore, it is only necessary to obtain the corresponding credit configuration in the credit configuration data model, and then call the credit general class to execute the general processing logic for the credit. The specific inspection item class includes inspection item instances corresponding to each inspection item, which can implement specific inspection content. The factory class can be instantiated. For example, it can generate corresponding inspection item instances based on inspection items and generate credit item instances based on quota items for unified management of instances. The factory class can be configured with an inspection item array for obtaining inspection item instances. The credit process class includes the unified credit usage process. The factory class can be called to obtain the instance corresponding to each credit item and put it in the array, and a unique record can be created for each request to make the request idempotent. After that, the array can be traversed to obtain each instance to complete the credit usage, that is, the adjustment of the remaining credit value. When an error occurs in the credit usage, that is, when the business processing request fails, the array can be traversed to roll back. The credit process class can be configured with a credit item instance array for unified credit usage process, unified order modification process, and unified order cancellation process. The inspection process class includes a unified inspection process for inspection items. It can obtain an inspection item instance array, call the inspection method of each instance, and finally summarize the results and return. The inspection process class can be configured with an inspection item instance array for unified inspection. The credit setting class can be configured with a credit limit setting method for credit configuration, for example, to configure the total credit value of credit items and credit configuration items.

[0112] The present application will provide an overall introduction to the technical solution of the present application in the following embodiments:

[0113] In some possible implementations, such as Figure 7As shown, the electronic device includes a transaction service and a background, and the administrator can set the quota through the front-end page of the management end, for example, the quota items included in the business resource quota and the configuration data and quota configuration items of each quota item can be set. Then, the transaction service can obtain the set data from the management end and send it to the background for storage, and the background can return a message of successful quota setting to the management end. After that, the user can initiate the operation of trading virtual resources such as stocks or exercising rights (for example, order operation, order change operation or order withdrawal operation) through the client, and the transaction service (or the exercise service of the electronic device) checks the remaining value of the quota by calling the background. In response to the check passing, the transaction service (or exercise service) adjusts the remaining value of the quota by calling the background, and the background can return to the client a message of successful quota check and successful quota occupation. In addition, the background can record the occupied flow and the amount used of each quota item, so that the administrator or user can send the recorded occupied flow and the amount used to the terminal device when initiating a viewing request to the background based on the terminal device.

[0114] In some possible implementations, such as Figure 8 As shown, the electronic device can receive a business processing request, and use the factory class to initialize the configured check items, obtain the check item instance, and then traverse all the check item instances. When the traversal check passes, it is determined that this business is to increase or deduct the quota, that is, to increase or deduct the remaining value of the quota of the business resource quota. At the same time, the increase processing record is recorded in the quota task table, and the processing status of the business processing request is determined to be in processing. Then, the electronic device can determine whether there is a primary key conflict, that is, whether there is a historical business processing request that is the same as this business processing request. If there is the same historical business processing request, it is determined that there is a primary key conflict, and the quota task table is queried to determine whether the historical business processing request is successfully processed. If it is not successfully processed, the electronic device can determine that the historical business processing request response failed. If the processing is successful, the electronic device can determine the processing result of the historical business processing request as the processing result of this business processing request. If there is no same historical business processing request, it is determined that there is no primary key conflict, and the electronic device can perform the increase or decrease of the remaining value of the quota of all quota items according to the method in the above example according to the business scenario, that is, the business type of the target business, and record the quota flow table at the same time. If the execution is successful, the processing status in the quota task table can be updated to processing success, confirming that the response to this business processing request is successful. If the execution is unsuccessful, the rollback method can be called, and the processing status in the quota task table can be updated to processing failure, confirming that the response to this business processing request is unsuccessful.

[0115] It should be noted that all the above technical solutions can be combined in any way to form optional embodiments of the present application, which will not be described one by one here.

[0116] Fig. 9 A schematic diagram of a credit limit management device 900 provided in an embodiment of the present application.

[0117] like Fig. 9 As shown, the credit limit management device 900 includes: an acquisition module 901, a checking module 902, a generation module 903, an adjustment module 904, a determination module 905, a judgment module 906, a processing module 907, and a rollback module 908.

[0118] In some possible implementations, an acquisition module 901 is used to: obtain a business processing request of a target business, the business processing request including a quota adjustment value of a business resource quota of the target business; an inspection module 902 is used to: respond to the business processing request, and check the remaining quota value of the business resource quota based on a unified inspection interface; a generation module 903 is used to: in response to a passed inspection, for each target quota item in the business resource quota, generate a quota adjustment transaction for adjusting the target quota item according to the adjustment value corresponding to the target quota item in the quota adjustment value, wherein the business resource quota includes at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item; an adjustment module 904 is used to: based on the quota adjustment transaction, call a unified adjustment interface to adjust the remaining quota value of the target quota item.

[0119] In some possible implementations, the check module 902 is specifically used to: obtain multiple check items, where the multiple check items are used to check the remaining value of the business resource quota; instantiate the multiple check items to obtain multiple check item instances; and traverse the multiple check item instances based on a unified check interface to check the remaining value of the business resource quota.

[0120] In some possible implementations, the checking module 902 is specifically used to: determine the business type of the business processing request; in response to the business type being a transaction order type, instantiate at least one credit item to obtain at least one credit item instance; obtain configuration data corresponding to at least one credit item, the configuration data including a credit adjustment range and used credit data; and check the remaining credit value of the business resource credit through a credit adjustment value, at least one credit item instance and multiple configuration data.

[0121] In some possible implementations, the inspection module 902 is specifically used to: determine the business type of the business processing request; in response to the business type being the first transaction modification type, obtain the used credit item involved in the historical order corresponding to the target business, instantiate the used credit item in the business resource credit, and obtain the used credit item instance; obtain the configuration data corresponding to the used credit item, and check the remaining credit value of the business resource credit through the credit adjustment value, the used credit item instance and the configuration data corresponding to the used credit item, and the first transaction modification type is to increase the order quantity in the historical order type; or, in response to the business type being the second transaction order modification type, obtaining the used credit item involved in the historical order corresponding to the target business; obtaining the credit flow information corresponding to the used credit item, and constructing an order resource credit item according to the credit flow information, the order resource credit item being used to characterize the credit value occupied by the used credit item; instantiating the order resource credit item to obtain an order resource credit item instance; checking the remaining credit value of the business resource credit through the order resource credit item instance and the credit adjustment value, the second transaction order modification type is a type that reduces the number of orders placed in historical orders.

[0122] In some possible implementations, the adjustment module 904 is specifically used to: obtain multiple quota configuration items of the target quota item; determine the priority order of each quota configuration item based on the usage period and total quota value of each quota configuration item; and adjust the remaining quota values ​​of the multiple quota configuration items based on the priority order of each quota configuration to update the remaining quota value of the target quota item.

[0123] In some implementations, the determination module 905 is used to determine the request identifier of the business processing request, and the request identifier is used to uniquely identify the business request; the judgment module 906 is used to determine whether the request identifier is the same as the historical request identifier of the historical business processing request; the processing module 907 is used to: if the request identifier is the same as the historical request identifier, the processing result of the historical business processing request is a successful processing in response to the processing result of the historical business processing request, and the processing result of the historical business processing request is determined as the processing result of the business request, or, if the processing result of the historical business processing request is a failed processing, continue to execute the generation of the quota adjustment transaction for adjusting the target quota item to determine the processing result of the business request; if the request identifier is not the same as the historical request identifier, then execute the generation of the quota adjustment transaction for adjusting the target quota item to determine the processing result of the business request. Among them, the processing module 907 may include the generation module 903 and the adjustment module 904, or it may be other modules different from the generation module 903 and the adjustment module 904, and this application does not limit this.

[0124] In some implementations, the rollback module 908 is used to generate a quota rollback transaction based on the quota adjustment value of the business resource quota in response to the processing result of the business request being a processing failure; and submit the quota rollback transaction to restore the business resource quota to the quota before obtaining the business processing request.

[0125] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig. 9 The device 900 shown can execute the above method embodiments, and the above and other operations and / or functions of each module in the device 900 are respectively for implementing the corresponding processes in the above methods, which will not be repeated here for the sake of brevity.

[0126] The above describes the device 900 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0127] Fig.10 A schematic block diagram of an electronic device 1000 provided in an embodiment of the present application.

[0128] like Fig.10 As shown, the electronic device 1000 may include:

[0129] The memory 1010 and the processor 1020, the memory 1010 is used to store the computer program and transmit the program code to the processor 1020. In other words, the processor 1020 can call and run the computer program from the memory 1010 to implement the method in the embodiment of the present application.

[0130] For example, the processor 1020 may be configured to execute the above method embodiments according to instructions in the computer program.

[0131] In some embodiments of the present application, the processor 1020 may include but is not limited to:

[0132] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0133] In some embodiments of the present application, the memory 1010 includes but is not limited to:

[0134] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAMbus RAM (DR RAM).

[0135] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 1010 and executed by the processor 1020 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0136] like Fig.10 As shown, the electronic device may also include:

[0137] The transceiver 1030 may be connected to the processor 1020 or the memory 1010 .

[0138] The processor 1020 may control the transceiver 1030 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1030 may include a transmitter and a receiver. The transceiver 1030 may further include an antenna, and the number of antennas may be one or more.

[0139] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0140] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0141] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instruction is loaded and executed on a computer, the computer can be made to perform the corresponding flow in each method in the embodiment of the present application in whole or in part, and generate the functions that can be realized by each method in the embodiment of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0142] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0144] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0145] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A quota management method, characterized in that: include: Acquire a business processing request of a target business, wherein the business processing request includes a quota adjustment value of a business resource quota of the target business; In response to the business processing request, checking the remaining value of the business resource quota based on a unified checking interface; In response to the check being passed, for each target quota item in the business resource quota, according to the adjustment value corresponding to the target quota item in the quota adjustment value, a quota adjustment transaction for adjusting the target quota item is generated, wherein the business resource quota includes at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item; Based on the quota adjustment transaction, a unified adjustment interface is called to adjust the remaining quota value of the target quota item.

2. The method according to claim 1, characterized in that The checking the remaining value of the business resource quota based on the unified checking interface includes: Acquire multiple check items, where the multiple check items are used to check the remaining value of the business resource quota; Instantiate the multiple inspection items to obtain multiple inspection item instances; Based on the unified check interface, the multiple check item instances are traversed to check the remaining value of the business resource quota.

3. The method according to claim 1, characterized in that The checking of the remaining value of the business resource quota includes: Determining a business type of the business processing request; In response to the business type being a transaction order type, instantiating the at least one credit limit item to obtain at least one credit limit item instance; Acquire configuration data corresponding to each of the at least one credit limit items, the configuration data including a credit limit adjustment range and used credit limit data; The remaining value of the quota of the service resource quota is checked by using the quota adjustment value, the at least one quota item instance and the plurality of configuration data.

4. The method according to claim 1, characterized in that The checking of the remaining value of the business resource quota includes: Determining a business type of the business processing request; In response to the business type being the first transaction modification type, obtaining the used credit item involved in the historical order corresponding to the target business, instantiating the used credit item in the business resource credit to obtain a used credit item instance; obtaining configuration data corresponding to the used credit item, the configuration data including a credit adjustment range and used credit data, checking the credit remaining value of the business resource credit by means of the credit adjustment value, the used credit item instance and the configuration data corresponding to the used credit item, the first transaction modification type is a type of increasing the order quantity in the historical order; or, In response to the business type being the second transaction order modification type, the used credit item involved in the historical order corresponding to the target business is obtained; the credit flow information corresponding to the used credit item is obtained, and an order resource credit item is constructed according to the credit flow information, wherein the order resource credit item is used to characterize the credit value occupied by the used credit item; the order resource credit item is instantiated to obtain an order resource credit item instance; the remaining credit value of the business resource credit is checked through the order resource credit item instance and the credit adjustment value, wherein the second transaction order modification type is a type that reduces the order quantity in the historical order.

5. The method according to any one of claims 1 to 4, characterized in that: The adjusting the remaining amount of the target amount item includes: Acquire multiple quota configuration items of the target quota item; Determine the priority order of each of the credit limit configuration items according to the validity period and the total credit limit value of each of the credit limit configuration items; According to the priority order of each of the quota configurations, the remaining quota values ​​of the multiple quota configuration items are adjusted to update the remaining quota value of the target quota item.

6. The method according to any one of claims 1 to 4, characterized in that: Before generating the quota adjustment transaction for adjusting the target quota item, the method further includes: Determine a request identifier of the business processing request, where the request identifier is used to uniquely identify the business request; Determining whether the request identifier is the same as a historical request identifier of a historical business processing request; If the request identifier is the same as the historical request identifier, in response to the processing result of the historical business processing request being a successful processing, the processing result of the historical business processing request is determined as the processing result of the business request; or, in response to the processing result of the historical business processing request being a failed processing, the generation of the quota adjustment transaction for adjusting the target quota item is continued to be executed to determine the processing result of the business request; If the request identifier is different from the historical request identifier, the quota adjustment transaction for adjusting the target quota item is generated and the processing result of the business request is determined.

7. The method according to any one of claims 1 to 4, characterized in that: Also includes: In response to a processing result of the business request being a processing failure, generating a quota rollback transaction according to a quota adjustment value of the business resource quota; Submit the quota rollback transaction to restore the business resource quota to the quota before obtaining the business processing request.

8. A quota management device, characterized in that: include: An acquisition module, configured to: acquire a business processing request of a target business, wherein the business processing request includes a quota adjustment value of a business resource quota of the target business; A checking module, configured to: in response to the service processing request, check the remaining value of the service resource quota based on a unified checking interface; A generating module, configured to: in response to the check being passed, for each target quota item in the business resource quota, generate a quota adjustment transaction for adjusting the target quota item according to the adjustment value corresponding to the target quota item in the quota adjustment value, wherein the business resource quota includes at least one of the following quota items: a user dimension quota item, a user group dimension quota item, and a time dimension quota item; The adjustment module is used to call a unified adjustment interface to adjust the remaining value of the target quota item based on the quota adjustment transaction.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.