Real-time QPS control method, system, computer and computer-readable storage medium
By setting QPS configuration information in the real-time query system and using the distributed KV database for real-time updates, the problem of tenant-level QPS control is solved, real-time QPS management of each tenant is realized, and the system service quality and QPS control accuracy are improved.
Patent Information
- Application Number
- CN202011416858.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-12-07
AI Technical Summary
The existing real-time online query system cannot control the QPS of each tenant independently, causing requests from high-QPS tenants to affect low-QPS tenants, making it impossible to control and adjust the QPS of each tenant in real time.
By setting QPS configuration information in the real-time query system, including QPS value and update time, using the distributed KV database for data storage and real-time updating, and adjusting the tenant's QPS configuration information in real time according to the adjustment rules, tenant-level QPS control is achieved.
Real-time QPS management of each tenant is realized to prevent high QPS tenants from affecting the overall service, and improve system service quality and QPS control accuracy.
Smart Images

Figure CN112416958B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a real-time QPS control method, system, computer device, and computer-readable storage medium. Background Art
[0002] In the era of cloud computing, there is an opportunity to significantly save computing costs, that is, to bring together countless separate servers and separate computing resources (on the cloud) and let tenants share these computing resources and storage resources on the cloud. Sharing resources can reduce costs. In the database field, tenants refer to the "users" of a database. Tenants hope to enjoy both low costs and resource isolation. In order to achieve this goal, various technologies to solve multi-tenant resource sharing have emerged. When the number of tenants increases, multi-tenant applications will face more performance pressure than single-tenant applications.
[0003] The current real-time online query systems are all services built according to certain QPS requirements. They cannot allow online tenants to make uncontrolled queries without restrictions. Different tenants need to ensure different QPS queries. The existing QPS control is the overall QPS control for the entire service. Such overall QPS control cannot control the QPS for each online tenant separately, which causes the requests of low QPS tenants to be affected by high QPS tenants; it is impossible to grasp the QPS situation of each tenant in real time and control it in real time. Summary of the invention
[0004] The embodiments of the present application provide a real-time QPS control method, system, computer device and computer-readable storage medium to achieve real-time QPS control of online sub-tenants and improve the system service quality.
[0005] In a first aspect, an embodiment of the present application provides a real-time QPS control method, including:
[0006] The QPS configuration step is used to set the QPS configuration information of multiple tenants through a QPS control front-end system, and the QPS configuration information at least includes: QPS value M, control time T for QPS value update c ;
[0007] A QPS configuration information synchronization step, wherein the QPS control front-end system synchronizes the QPS configuration information to a real-time query system through a timed polling interface;
[0008] The step of adjusting the QPS configuration information in real time, wherein the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system stores data based on a distributed KV database, which is a Key-value database. Optionally, the distributed KV database adopts a Redis storage system, and the QPS configuration information is stored based on a MAP structure;
[0009] The QPS configuration information real-time update step is used for the real-time query system to update the tenant's QPS update information in real time according to the query request after receiving a query request from the tenant. If the tenant turns on QPS control, the tenant's configuration information is queried in real time according to the QPS real-time update step.
[0010] Through the above steps, the QPS control at the tenant level is solved. Different services can be provided according to the tenant level through real-time control of QPS configuration information, which effectively solves the situation where high QPS tenants affect the overall service. By reasonably allocating the QPS value of each tenant, the overall service QPS control is improved and the service quality is improved.
[0011] In some embodiments, the QPS update information includes a key value and a value, and adopts a two-dimensional HashMap data structure.
[0012] The key value further includes: tenant code and business interface;
[0013] The value further includes: QPS update time t and current QPS value l.
[0014] In some embodiments, the QPS configuration information real-time update step further includes:
[0015] Using the real-time query system to obtain the current time T of the query request,
[0016] If Tt <T c and l>0, then through the query request, l=l-1, indicating that there are remaining QPS values available within the current control time;
[0017] If Tt <T c If l<0, the query request is not passed, indicating that the QPS value of the current control time has been used up and the next control time cannot be entered;
[0018] If Tt>T c, then update the QPS configuration information of the tenant and pass the query request, l=l-1, indicating that the current control time has been exceeded, entering the next control time, and recalculating according to the QPS configuration information.
[0019] Through the above steps, the QPS management of the current control time of the tenant can be effectively implemented.
[0020] In some embodiments, the adjustment rule further comprises:
[0021] Obtain the current QPS value l of the tenant within the current control time and calculate the difference diff between the QPS value M and the original QPS value M0 of the tenant in the real-time query system;
[0022] If diff>0 and l>0, update the current QPS value to l=l+diff;
[0023] If diff>0 and l≤0, update the current QPS value to l=diff;
[0024] If diff<0 and l≤0, then wait until the next control cycle is entered to update the QPS configuration information. At this time, if the tenant initiates a query request, the request will not be approved;
[0025] If diff<0 and l>0, then update M0=M0-l and further judge:
[0026] If diff<0, then update l=-1. At this time, if the tenant initiates a query request, the request will not be approved;
[0027] If diff≥0, then l=diff is updated, and diff at this time is the difference between the QPS value M and the updated original QPS value M0.
[0028] Through the adjustment rules, the embodiment of the present application realizes real-time feedback to the query request of the current control time when the configuration information of the tenant changes, further improving the immediacy of the update of the tenant's QPS configuration information in the embodiment of the present application.
[0029] In a second aspect, an embodiment of the present application provides a real-time QPS control system, including:
[0030] The QPS configuration module is used to set the QPS configuration information of multiple tenants through a QPS control front-end system. The QPS configuration information at least includes: QPS value M, QPS value update control time T c ;
[0031] A QPS configuration information synchronization module, used for the QPS control front-end system to synchronize the QPS configuration information to a real-time query system through a timed polling interface;
[0032] A QPS configuration information real-time adjustment module, wherein the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system stores data based on a distributed KV database, which is a Key-value database. Optionally, the distributed KV database uses a Redis storage system, and the QPS configuration information is stored based on a MAP structure;
[0033] The QPS configuration information real-time update module is used for the real-time query system to update the QPS update information of the tenant in real time according to the query request after receiving the query request of the tenant. If the tenant turns on QPS control, the configuration information of the tenant is queried in real time according to the QPS real-time update module.
[0034] Through the above modules, the QPS control at the tenant level is solved. Different services can be provided according to the tenant level through real-time control of QPS configuration information, which effectively solves the situation where high QPS tenants affect the overall service. By reasonably allocating the QPS value of each tenant, the overall service QPS control is improved and the service quality is improved.
[0035] In some embodiments, the QPS update information includes a key value and a value, and adopts a two-dimensional HashMap data structure.
[0036] The key value further includes: tenant code and business interface;
[0037] The value further includes: QPS update time t and current QPS value l.
[0038] In some embodiments, the QPS configuration information real-time update module further includes:
[0039] Using the real-time query system to obtain the current time T of the query request,
[0040] If Tt <T c and l>0, then through the query request, l=l-1, indicating that there are remaining QPS values available within the current control time;
[0041] If Tt <T cIf l<0, the query request is not passed, indicating that the QPS value of the current control time has been used up and the next control time cannot be entered;
[0042] If Tt>T c , then update the QPS configuration information of the tenant and pass the query request, l=l-1, indicating that the current control time has been exceeded, entering the next control time, and recalculating according to the QPS configuration information.
[0043] Through the above modules, the QPS management of the current control time of the tenant can be effectively implemented.
[0044] In some embodiments, the adjustment rule further comprises:
[0045] Obtain the current QPS value l of the tenant within the current control time and calculate the difference diff between the QPS value M and the original QPS value M0 of the tenant in the real-time query system;
[0046] If diff>0 and l>0, update the current QPS value to l=l+diff;
[0047] If diff>0 and l≤0, update the current QPS value to l=diff;
[0048] If diff<0 and l≤0, then wait until the next control cycle is entered to update the QPS configuration information. At this time, if the tenant initiates a query request, the request will not be approved;
[0049] If diff<0 and l>0, then update M0=M0-l and further judge:
[0050] If diff<0, then update l=-1. At this time, if the tenant initiates a query request, the request will not be approved;
[0051] If diff≥0, then l=diff is updated, and diff at this time is the difference between the QPS value M and the updated original QPS value M0.
[0052] Through the adjustment rules, the embodiment of the present application realizes real-time feedback to the query request of the current control time when the configuration information of the tenant changes, further improving the immediacy of the update of the tenant's QPS configuration information in the embodiment of the present application.
[0053] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the real-time QPS control method as described in the first aspect above is implemented.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the real-time QPS control method as described in the first aspect above.
[0055] Compared with the related technologies, the real-time QPS control method, system, computer device and computer-readable storage medium provided in the embodiments of the present application solve the control of tenant-level QPS and can provide different services according to the tenant level; solve the situation where high QPS users affect the overall service, reasonably allocate the QPS of each tenant, and better control the QPS of the overall service; update the QPS settings in real time and control the QPS in real time.
[0056] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0058] Figure 1 is a flow chart of a real-time QPS control method according to an embodiment of the present application;
[0059] Figure 2 It is a structural block diagram of a real-time QPS control system according to an embodiment of the present application. Description of the drawings:
[0061] 101. QPS configuration module;
[0062] 102. QPS configuration information synchronization module;
[0063] 103. QPS configuration information real-time adjustment module;
[0064] 104. QPS configuration information real-time update module. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0066] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0067] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0068] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0069] This embodiment provides a real-time QPS control method. Figure 1 is a flow chart of a real-time QPS control method according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0070] The QPS configuration step S101 is used to set the QPS configuration information of multiple tenants through a QPS control front-end system. The QPS configuration information at least includes: QPS value M, QPS value update control time T c , optional, the control time is one hour;
[0071] QPS configuration information synchronization step S102, for the QPS control front-end system to synchronize the QPS configuration information to a real-time query system through a timed polling interface;
[0072] In the step S103 of real-time adjustment of QPS configuration information, the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system stores data based on a distributed KV database, which is a Key-value database. Optionally, the distributed KV database adopts the Redis storage system, and the QPS configuration information is stored based on the MAP structure;
[0073] The QPS configuration information real-time update step S104 is used for the real-time query system to update the tenant's QPS update information in real time according to the query request after receiving a query request from a tenant. If the tenant turns on QPS control, the tenant's configuration information is queried in real time according to the QPS real-time update step.
[0074] Through the above steps, the QPS control at the tenant level is solved. Different services can be provided according to the tenant level through real-time control of QPS configuration information, which effectively solves the situation where high QPS tenants affect the overall service. By reasonably allocating the QPS value of each tenant, the overall service QPS control is improved and the service quality is improved.
[0075] In some embodiments, the QPS update information includes a key value and a value, and adopts a two-dimensional HashMap data structure.
[0076] The key value further includes: tenant code and business interface;
[0077] The value further includes: QPS update time t and current QPS value l.
[0078] In some embodiments, the QPS configuration information real-time update step S104 further includes:
[0079] Use the real-time query system to obtain the current time T of the query request,
[0080] If Tt <T cIf l>0, then through the query request, l=l-1; it means that there are remaining QPS values available within the current control time;
[0081] If Tt <T c If l<0, the query request is not passed, indicating that the QPS value of the current control time has been used up and the next control time cannot be entered;
[0082] If Tt>T c , then update the tenant's QPS configuration information and query through the request, l = l-1. It means that the current control time has exceeded and the next control time has begun. The QPS configuration information is recalculated. At this time, if the QPS of the interface is configured to be 1 million, the updated current QPS value l is 1 million, and the current QPS value l after the query request is 1 million-1.
[0083] Through the above steps, the QPS management of the current control time of the tenant can be effectively implemented.
[0084] In some embodiments, the adjustment rules further include:
[0085] Get the current QPS value l of the tenant in the current control time and calculate the difference diff between the QPS value M and the original QPS value M0 of the tenant in the real-time query system;
[0086] If diff>0 and l>0, update the current QPS value to l=l+diff;
[0087] If diff>0 and l≤0, update the current QPS value to l=diff;
[0088] If diff<0 and l≤0, wait until the next control cycle to update the QPS configuration information. At this time, if the tenant initiates a query request, the request will not be approved;
[0089] If diff<0 and l>0, then update M0=M0-l and further judge:
[0090] If diff<0, update l=-1. At this time, if the tenant initiates a query request, the request will not be approved;
[0091] If diff≥0, then update l=diff, where diff is the difference between the QPS value M and the updated original QPS value M0.
[0092] By adjusting the rules, the embodiment of the present application realizes real-time feedback to the query request of the current control time when the tenant's configuration information changes, further improving the immediacy of the embodiment of the present application for updating the tenant's QPS configuration information.
[0093] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0094] This embodiment also provides a real-time QPS control system, which is used to implement the above-mentioned embodiments and preferred implementations, and will not be repeated here. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0095] Figure 2 is a structural block diagram of a real-time QPS control system according to an embodiment of the present application, such as Figure 2 As shown, the system includes:
[0096] The QPS configuration module 101 is used to set the QPS configuration information of multiple tenants through a QPS control front-end system. The QPS configuration information at least includes: QPS value M, QPS value update control time T c , optional, the control time is one hour;
[0097] QPS configuration information synchronization module 102, used for the QPS control front-end system to synchronize QPS configuration information to a real-time query system through a timed polling interface;
[0098] QPS configuration information real-time adjustment module 103, the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system is based on a distributed KV database for data storage, the KV database is a Key-value database, optionally, the distributed KV database adopts the Redis storage system, and the QPS configuration information is based on the MAP structure for data storage; specifically, the QPS update information includes key value and value value, and adopts a two-dimensional HashMap data structure, the key value further includes: tenant code and business interface; the value value further includes: QPS update time t and current QPS value l.
[0099] Specifically, the adjustment rules further include:
[0100] Get the current QPS value l of the tenant in the current control time and calculate the difference diff between the QPS value M and the original QPS value M0 of the tenant in the real-time query system;
[0101] If diff>0 and l>0, update the current QPS value to l=l+diff;
[0102] If diff>0 and l≤0, update the current QPS value to l=diff;
[0103] If diff<0 and l≤0, wait until the next control cycle to update the QPS configuration information. At this time, if the tenant initiates a query request, the request will not be approved;
[0104] If diff<0 and l>0, then update M0=M0-l and further judge:
[0105] If diff<0, update l=-1. At this time, if the tenant initiates a query request, the request will not be approved;
[0106] If diff≥0, then update l=diff, where diff is the difference between the QPS value M and the updated original QPS value M0.
[0107] The QPS configuration information real-time update module 104 is used to update the tenant's QPS update information in real time according to the query request after the real-time query system receives a query request from a tenant. If the tenant turns on QPS control, the tenant's configuration information is queried in real time according to the QPS real-time update module. Among them, the QPS configuration information real-time update module 104 further includes:
[0108] Use the real-time query system to obtain the current time T of the query request,
[0109] If Tt <T c If l>0, then through the query request, l=l-1; it means that there are remaining QPS values available within the current control time;
[0110] If Tt <T c If l<0, the query request is not passed, indicating that the QPS value of the current control time has been used up and the next control time cannot be entered;
[0111] If Tt>T c , then update the tenant's QPS configuration information and query through the request, l = l-1. It means that the current control time has exceeded and the next control time has begun. The QPS configuration information is recalculated. At this time, if the QPS of the interface is configured to be 1 million, the updated current QPS value l is 1 million, and the current QPS value l after the query request is 1 million-1.
[0112] Through the above modules, the QPS management of the tenant's current control time is effectively realized; the QPS control at the tenant level is solved, and different services can be provided according to the tenant level through real-time control of QPS configuration information, which effectively solves the situation where high QPS tenants affect the overall service. By reasonably allocating the QPS value of each tenant, the overall service QPS control is improved and the service quality is improved. In addition, through the above adjustment rules, the embodiment of the present application realizes real-time feedback to the query request of the current control time when the tenant's configuration information changes, further improving the immediacy of the update of the tenant's QPS configuration information in the embodiment of the present application.
[0113] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0114] In addition, combined Figure 1 The real-time QPS control method described in the embodiment of the present application may be implemented by a computer device, which may include a processor and a memory storing computer program instructions.
[0115] Specifically, the processor may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0116] Among them, the memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside the data processing device. In a specific embodiment, the memory is a non-volatile memory. In a specific embodiment, the memory includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (ElectricallyAlterable Read-OnlyMemory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0117] The memory may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor.
[0118] The processor implements any one of the real-time QPS control methods in the above embodiments by reading and executing computer program instructions stored in the memory.
[0119] In addition, in combination with the real-time QPS control method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the real-time QPS control methods in the above embodiment is implemented.
[0120] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0121] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A real-time QPS control method, characterized in that: include: The QPS configuration step is used to set the QPS configuration information of multiple tenants through a QPS control front-end system, and the QPS configuration information at least includes: QPS value M, control time of QPS value update T c ; A QPS configuration information synchronization step, wherein the QPS control front-end system synchronizes the QPS configuration information to a real-time query system through a timed polling interface; The step of adjusting the QPS configuration information in real time, wherein the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system stores data based on a distributed KV database, and the adjustment rule further includes: Get the current QPS value of the tenant in the current control time l And calculate the difference between the QPS value M and the original QPS value M0 of the tenant in the real-time query system diff ; like diff >0 and l > 0, then update the current QPS value to l = l + diff ; like diff >0 and l ≤0, then update the current QPS value to l = diff ; like diff 0 and l ≤0, then wait to enter the next control cycle to update the QPS configuration information; like diff 0 and l > 0, then update M0 = M0- l Further judgment: like diff <0, then update l =-1; like diff ≥0, then update l = diff ; The step of updating the QPS configuration information in real time is used for the real-time query system to update the QPS update information of the tenant in real time according to the query request after receiving a query request from the tenant.
2. The real-time QPS control method according to claim 1, characterized in that: The QPS update information includes a key value and a value. The key value further includes: tenant code and business interface; The value further includes: QPS update time t And the current QPS value l .
3. The real-time QPS control method according to claim 2, characterized in that: The step of updating the QPS configuration information in real time further comprises: Using the real-time query system to obtain the current time of the query request T , like T - t <T c and l >0, then the query request is passed, l = l -1; like T - t <T c and l <0, the query request is not passed; like T - t > T c , then update the QPS configuration information of the tenant and pass the query request, l = l -1.
4. A real-time QPS control system, characterized in that: include: The QPS configuration module is used to set the QPS configuration information of multiple tenants through a QPS control front-end system. The QPS configuration information includes at least: QPS value M, control time of QPS value update T c ; A QPS configuration information synchronization module, used for the QPS control front-end system to synchronize the QPS configuration information to a real-time query system through a timed polling interface; The real-time QPS configuration information adjustment module, the real-time query system obtains the QPS update information of each tenant in real time, and compares the QPS configuration information with the original QPS configuration information of the tenant, and adjusts the QPS configuration information of the tenant's current control time in real time according to an adjustment rule, wherein the real-time query system stores data based on a distributed KV database, and the adjustment rule further includes: Get the current QPS value of the tenant in the current control time l And calculate the difference between the QPS value M and the original QPS value M0 of the tenant in the real-time query system diff ; like diff >0 and l > 0, then update the current QPS value to l = l + diff ; like diff >0 and l ≤0, then update the current QPS value to l = diff ; like diff 0 and l ≤0, then wait to enter the next control cycle to update the QPS configuration information; like diff 0 and l > 0, then update M0 = M0- l Further judgment: like diff <0, then update l =-1; like diff ≥0, then update l = diff ; The QPS configuration information real-time update module is used for updating the QPS update information of the tenant in real time according to the query request after the real-time query system receives a query request from the tenant.
5. The real-time QPS control system according to claim 4, characterized in that: The QPS update information includes a key value and a value. The key value further includes: tenant code and business interface; The value further includes: QPS update time t And the current QPS value l .
6. The real-time QPS control system according to claim 5, characterized in that: The QPS configuration information real-time update module further includes: Using the real-time query system to obtain the current time of the query request T , like T - t <T c and l >0, then the query request is passed, l = l -1; like T - t <T c and l <0, the query request is not passed; like T - t > T c , then update the QPS configuration information of the tenant and pass the query request, l = l -1.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the real-time QPS control method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the real-time QPS control method according to any one of claims 1 to 3 is implemented.
