Bandwidth management method, device, medium and electronic device in current limiting scenario

By storing prompt information locally on the terminal and using status codes to extract target prompt information, the problem of bandwidth waste during gateway current limiting is solved, saving bandwidth costs and improving user experience.

CN115514650BActive Publication Date: 2024-10-01HANGZHOU NETEASE ZAIGU TECH CO LTD
View PDF 23 Cites 0 Cited by

Patent Information

Application Number
CN202211155688.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2024-10-01
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

In high-traffic and high-concurrency scenarios, the current-limiting reminder information returned by the gateway when limiting current leads to bandwidth waste and network congestion, affecting user experience.

Method used

By pre-stored prompt information locally in the terminal and extracting target prompt information based on the status code of the over-limit information, the amount of over-limit information returned by the gateway is reduced, and bandwidth overhead is reduced.

Benefits of technology

It effectively reduces the bandwidth consumption when the gateway returns over-limit information, reduces bandwidth costs, improves user experience, and avoids network congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514650B_ABST
    Figure CN115514650B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a bandwidth management method, device, medium and electronic device in a flow-limiting scenario. When the method is applied to a gateway, it includes the steps of: receiving a service request sent by a terminal; wherein the service request is used to request service information from a server; determining whether the service request is an over-limit request based on the service carrying capacity of the server; if the service request is an over-limit request, intercepting the service request and returning the over-limit information to the terminal, so that the terminal extracts the corresponding target prompt information from the pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information. The bandwidth management method in a flow-limiting scenario disclosed in the present disclosure enables the terminal to obtain the target prompt information locally based on the over-limit information, which can reduce the volume of the over-limit information and reduce bandwidth overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] When the terminal application requests services from the backend server, the request will first pass through the gateway and then reach the backend microservice. After receiving the request through the gateway, the microservice will execute the business logic based on the request. In some scenarios with high traffic and high concurrency, such as e-commerce flash sales, in order to ensure the stability of the backend microservice, the application-side requests that exceed the limit will be limited by the gateway and directly return a limit reminder, such as the gateway returns a page indicating too many requests error (429) to the application.

[0003] The current limiting reminder returned by the gateway when limiting the current is generally implemented based on the HTTP protocol (Hyper Text Transfer Protocol). The HTTP protocol includes a response header for instructing the client how to process and a response body representing the actual content sent to the client. After receiving the HTTP protocol, the client can display relevant content on the page based on the response header and response body.

[0004] When limiting the flow, the response body of the over-limit information returned by the gateway to different applications is completely consistent and repeated. The response body of each over-limit information received by the application will occupy hundreds of bits of bandwidth. In the scenario of concurrent TPS (system throughput) of millions to tens of millions, the occupied bandwidth will be as much as tens of Gbps (switching bandwidth), which generates huge bandwidth costs. However, bandwidth resources are very precious and limited. This method of the gateway will also squeeze other normal user requests, resulting in higher response delays and even directly leading to network congestion, which in turn affects the user experience. Summary of the invention

[0005] To this end, the present disclosure proposes a bandwidth management method in a flow-limiting scenario, in which the terminal obtains target prompt information from the local area based on the excess information, which can reduce the volume of the excess information and reduce bandwidth overhead.

[0006] In this context, embodiments of the present disclosure are intended to provide a bandwidth management method, device, medium, and electronic device in a flow limiting scenario.

[0007] In a first aspect of an embodiment of the present disclosure, a bandwidth management method in a flow limiting scenario is provided, which is applied to a gateway, and the method includes: receiving a service request sent by a terminal; wherein the service request is used to request service information from a server; determining whether the service request is an over-limit request based on the service carrying capacity of the server; if the service request is an over-limit request, intercepting the service request and returning the over-limit information to the terminal, so that the terminal extracts corresponding target prompt information from pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information.

[0008] In a second aspect of an embodiment of the present disclosure, a bandwidth management method in a flow limiting scenario is provided, which is applied to a terminal, and the method includes: sending a service request for requesting service information to a gateway; receiving overlimit information returned by the gateway for the service request; wherein the overlimit information is generated by the gateway based on the service carrying capacity of the server corresponding to the service request; based on the overlimit information, corresponding target prompt information is selected from pre-stored prompt information, and the target prompt information is rendered and displayed.

[0009] In a third aspect of the embodiments of the present disclosure, a bandwidth management method in a flow limiting scenario is provided, including: a terminal sends a service request for requesting service information from a server to a gateway; the gateway determines whether the service request is an over-limit request based on the service carrying capacity of the server; if the service request is an over-limit request, the gateway intercepts the service request and returns the over-limit information to the terminal; the terminal extracts corresponding target prompt information from pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information.

[0010] In a fourth aspect of an embodiment of the present disclosure, a bandwidth management device in a flow limiting scenario is provided, which is configured in a gateway, and the device includes: a service request receiving module, configured to receive a service request sent by a terminal; wherein the service request is used to request service information from a server; an over-limit judgment module, configured to determine whether the service request is an over-limit request based on the service carrying capacity of the server; a first over-limit processing module, configured to intercept the service request if the service request is an over-limit request, and return the over-limit information to the terminal, so that the terminal extracts corresponding target prompt information from pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information.

[0011] In the fifth aspect of the embodiment of the present disclosure, a bandwidth management device in a flow limiting scenario is provided, which is configured in a terminal, and the device includes: a service request sending module, configured to send a service request for requesting service information to a gateway; an overlimit information receiving module, configured to receive overlimit information returned by the gateway for the service request; wherein the overlimit information is generated by the gateway based on the service carrying capacity of the server corresponding to the service request; a second overlimit processing module, configured to select corresponding target prompt information from pre-stored prompt information based on the overlimit information, and render and display the target prompt information.

[0012] In the sixth aspect of the embodiment of the present disclosure, a bandwidth management system in a flow limiting scenario is provided, comprising: a gateway and a terminal pre-stored with prompt information; wherein the terminal is used to send a service request to request service information from a server; the gateway is used to determine whether the service request is an over-limit request based on the service carrying capacity of the server, and when the service request is an over-limit request, intercept the service request and return the over-limit information to the terminal, so that the terminal extracts corresponding target prompt information from the pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information.

[0013] In a seventh aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the bandwidth management method in the current limiting scenario as described above is implemented.

[0014] In an eighth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the bandwidth management method in the current limiting scenario as described above is implemented.

[0015] According to the technical solution of the implementation mode of the present disclosure, after confirming that the service request is an over-limit request, the over-limit information is returned to the terminal through the gateway, and the target prompt information corresponding to the over-limit information can be extracted from the prompt information stored locally in the terminal based on the over-limit information. There is no need to calculate the target prompt information based on the over-limit information, which can reduce the volume of the over-limit information and reduce the bandwidth overhead occupied by the gateway when returning the over-limit information. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0017] Figure 1 This is an application scenario diagram of a bandwidth management method in a flow limiting scenario shown in an exemplary embodiment of the present application;

[0018] Figure 2 is a flow chart of a bandwidth management method in a flow limiting scenario shown in an exemplary embodiment of the present application;

[0019] Figure 3 is a flow chart of a bandwidth management method in a flow limiting scenario shown in another exemplary embodiment of the present application;

[0020] Figure 4 yes Figure 2A flow chart of step S250 in the illustrated embodiment in an exemplary embodiment;

[0021] Figure 5 yes Figure 2 A flowchart of step S230 in the illustrated embodiment in an exemplary embodiment;

[0022] Figure 6 is a flow chart of a bandwidth management method in a flow limiting scenario shown in another exemplary embodiment of the present application;

[0023] Figure 7 is a flow chart of a bandwidth management method in a flow limiting scenario shown in another exemplary embodiment of the present application;

[0024] Figure 8 is a schematic diagram of the structure of a bandwidth management device in a flow limiting scenario shown in an exemplary embodiment of the present application;

[0025] Fig. 9 is a structural schematic diagram of a bandwidth management device in a flow limiting scenario shown in another exemplary embodiment of the present application;

[0026] Fig.10 A schematic diagram showing the structure of a storage medium according to an exemplary embodiment of the present disclosure is shown;

[0027] Fig.11 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0028] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0029] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0030] According to an embodiment of the present disclosure, a bandwidth management method, device, medium and electronic device in a flow limiting scenario are proposed.

[0031] In addition, any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.

[0032] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION

[0034] The implementation of each application business in the terminal can send business requests to the backend microservices through the application, so that the backend microservices execute business logic corresponding to the business requests. Of course, during the sending process, the business request must first pass through the API (Application Program Interface) gateway and then reach the backend microservice. When the business request volume of the backend microservice is too high, the gateway will start current limiting. The information transmission between the terminal, gateway and backend microservices mostly relies on the HTTP protocol.

[0035] Specifically, the API gateway is referred to as the gateway. It acts as a proxy for the API exposed by microservices and is the unified entrance for all service access. User requests will first pass through the API gateway and then reach the backend microservices. Some common capabilities of microservices, such as current limiting, authentication, and traffic grayscale, will be moved forward and sunk to the API gateway.

[0036] Application, also known as app for short, refers to a program installed on smart devices such as mobile phones, which generally needs to work with the server. Common applications are mainly divided into two categories. One is pre-installed system applications, such as text messages, photos, memos, etc.; the other is third-party applications, such as news applications, shopping applications, social applications, etc.

[0037] Hyper Text Transfer Protocol (HTTP) is a simple request-response protocol that usually runs on top of TCP (Transmission Control Protocol). It specifies what messages a client may send to a server and what responses it may get.

[0038] The Response Header in the HTTP protocol is used to instruct the client how to process the response body and tell the browser information such as the response type, character encoding, and byte size.

[0039] The response body in the HTTP protocol is the actual content sent by the server to the client. In addition to web pages, the response body can also be other types of documents such as Word, Excel or PDF (some different document types). The specific document type is determined by the MIME (Multipurpose Internet Mail Extensions) type specified by Content-Type (telling the client the content type of the actual returned content).

[0040] The backend microservices may be overloaded due to excessive business requests. Service overload means that the number of service requests exceeds the maximum value that the service can bear, resulting in excessive server load and increased response delay. The user side will experience failure to load or slow loading, which will cause the user to retry further. The service has been processing invalid requests in the past and cannot process other requests, resulting in the number of valid requests processed by the server being zero, and even causing an avalanche in the entire system. In order to avoid server overload, there are generally various overload protection strategies, the most typical of which is current limiting.

[0041] Current limiting is to limit the number of requests or concurrency. The normal operation of the system is guaranteed by limiting the number of requests within a time window. If the service resources and processing capacity are limited, it is necessary to limit the upstream requests for calling the service to prevent the service from being stopped due to resource exhaustion.

[0042] Common current limiting algorithms include counting current limiting, leaky bucket algorithm and token bucket algorithm.

[0043] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.

[0044] Application Scenario Overview

[0045] First reference Figure 1 , Figure 1 An application scenario diagram is shown in which a bandwidth management method in a flow limiting scenario in which an embodiment of the present disclosure can be applied. The application scenario includes a terminal 100, a gateway 200, and a server 300.

[0046] The terminal 100 is provided with a plurality of applications, and different applications can send service requests to the server 300 based on the gateway 200. The server 300 is a micro server corresponding to different applications, and can execute and express normal service logic based on the service requests.

[0047] The terminal 100, the gateway 200 and the server 300 are connected via wired or wireless transmission. It should be understood that Figure 1 The number of terminals 100, gateways 200 and servers 300 transmitted by wire or wireless is only illustrative. According to the implementation requirements, there can be any number of terminals 100, gateways 200 and servers 300. For example, the server 300 can be a server cluster composed of multiple servers.

[0048] Among them, the terminal 100 can be any electronic device that can realize data visualization, such as a smart phone, a tablet, a laptop, a computer, etc., and there is no restriction here. The server 300 can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, wherein multiple servers can form a blockchain, and the server is a node on the blockchain. The server 300 can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network) and big data and artificial intelligence platforms, and there is no restriction here.

[0049] The bandwidth management method in the current limiting scenario provided by the embodiment of the present disclosure may be executed by the terminal 100 or the gateway 200 . Accordingly, the bandwidth management device in the current limiting scenario is generally disposed in the terminal 100 or the gateway 200 .

[0050] For example, in an exemplary embodiment, the application in the terminal 100 sends a service request to the gateway 200, and the service request is used to request service information from the server. After receiving the service information, the gateway 200 determines whether the service request is an over-limit request based on the service carrying capacity of the server. If the service request is an over-limit request, the service request is intercepted, that is, the gateway 200 does not send the service request to the server 300, but returns the over-limit information to the terminal. The response body of the over-limit information is set to empty, and the response header is set to the status code corresponding to the service request. After receiving the over-limit information, the terminal 100's application will extract the corresponding target prompt information from the pre-stored prompt information based on the response header of the over-limit information, and render and display the target prompt information.

[0051] The status codes of different response headers in this embodiment will store corresponding prompt information locally in the terminal 100. After receiving the overlimit information, the target prompt information can be obtained locally through the status code, and the response body of the overlimit information is empty. The target prompt information can be displayed on the interface of the terminal 100 through the response header.

[0052] It should be understood that Figure 1 The application scenario shown is only an example in which the embodiments of the present disclosure can be implemented. The scope of application of the embodiments of the present disclosure is not limited in any aspect by the application scenario.

[0053] Exemplary Methods

[0054] Combine the following Figure 1 For application scenarios, refer to Figure 2 To describe the bandwidth management method for flow limiting scenarios according to an exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0055] refer to Figure 2 , Figure 2 A bandwidth management method in a current limiting scenario disclosed in an embodiment is applied to Figure 1 The gateway 200 in the method includes steps S210 to S250, which are specifically described as follows:

[0056] Step S210: receiving a service request sent by a terminal, where the service request is used to request service information from a server.

[0057] The bandwidth management method in the current limiting scenario of this embodiment can be referred to Figure 3 As shown in the flowchart, in one embodiment, the user initiates a service request, such as a rush purchase service request, a web page acquisition service request, etc., through the application software on the control terminal.

[0058] The service request is to request service information from the corresponding server. For example, in one embodiment, the terminal sends a service request for a rush purchase. After the server executes the expression service logic in response to the service request, the purchase success information can be displayed on the terminal interface.

[0059] The application's business request will first reach the gateway. After receiving the business request, the gateway can use the current limiting engine inside the gateway to determine whether the business request exceeds the limit.

[0060] Step S230: Determine whether the service request is an over-limit request based on the service carrying capacity of the server.

[0061] In this embodiment, determining whether a service request is an over-limit request may be accomplished by a current limiting engine preset in the gateway.

[0062] Specifically, when setting up the gateway, you can configure the flow limiting rules in the flow limiting engine based on the server's business carrying capacity and the flow limiting algorithm. When the business request reaches the gateway, the flow limiting engine in the gateway calculates whether the business request exceeds the limit based on the business request, flow limiting rules, and flow limiting algorithm, that is, whether it is an over-limit request.

[0063] In this embodiment, for an application in the terminal, there is at least one microservice providing services for the application. Different business requests correspond to different servers providing services. Therefore, the overall traffic of an application can be predicted through empirical parameters, and then the overall traffic can be broken down into the traffic that each server needs to bear. In this way, based on the traffic that the server needs to bear, the maximum business carrying capacity of each server can be obtained.

[0064] Based on the maximum business carrying capacity of each server, the flow limiting rules can be configured by combining the server's business processing performance and the flow limiting algorithm. Specifically, according to the flow limiting algorithm, the business request processing quota of each server under the corresponding flow limiting algorithm is configured. The higher the maximum business carrying capacity and the business processing performance, the larger the business request processing quota. Until the number of business requests processed by the server within a certain period of time exceeds the request quota, it is regarded as an over-limit request.

[0065] Of course, in other embodiments, it is also possible to directly determine whether a service request exceeds the limit based on the maximum service carrying capacity and current service processing capacity of the server. The above are two exemplary methods for determining whether a service request exceeds the limit, and are not intended to limit the method for determining whether a service request exceeds the limit.

[0066] Step S250: If the service request is an over-limit request, the service request is intercepted and over-limit information is returned to the terminal, so that the terminal extracts corresponding target prompt information from pre-stored prompt information based on the over-limit information and renders and displays the target prompt information.

[0067] In this embodiment, the gateway obtains the maximum service carrying capacity of the server and the service processing capacity currently processed by the server when receiving the service request, and then determines whether the service request exceeds the limit by comparing the maximum service carrying capacity and the service processing capacity.

[0068] Of course, in other embodiments, the flow limiting rules may also be used to determine whether the service request entering the server exceeds the server's processing service request quota. If it exceeds the quota, it is considered an over-limit request.

[0069] When a service request exceeds the limit, the gateway will intercept the service request and generate an excess information based on the service request. The excess information is in the http protocol format, that is, it includes the response body and the response header.

[0070] Generally speaking, based on the response body and response header in the overlimit information, the target prompt information can be displayed on the terminal interface, such as displaying "The server has crashed, please try again later" and other flow-limiting text or flow-limiting interface on the terminal interface. Of course, different business requests correspond to different target prompt information. For example, for shopping-related business requests, the target prompt information should be related to the information that the shopping server cannot provide services, that is, the target prompt information can change with the change of business requests. Since the response body and response header contain all the data of the target prompt information, when the gateway sends the overlimit information, it will occupy a large bandwidth.

[0071] In this embodiment, in order to reduce the bandwidth consumption caused by the gateway when returning the overlimit information, the response body returned by the server is set to empty, the response header is set to a status code, and multiple prompt information is stored locally in the terminal. Different prompt information corresponds to different business requests, and different status codes correspond to different prompt information. The corresponding prompt information can be determined from the multiple stored prompt information through the status code in the overlimit information.

[0072] In this way, when the gateway returns the overlimit information, since the response body of the overlimit information is empty, the bandwidth occupied by the overlimit information interaction can be reduced, and the terminal can determine the target prompt information corresponding to the status code of the response header from multiple prompt information pre-stored locally based on the response header in the overlimit information.

[0073] Of course, for multiple applications in the terminal, the prompt information required by different applications can be stored in the storage space allocated for the application in the terminal.

[0074] Furthermore, the status code can be a status code specified by the existing HTTP, such as message status codes 100, 101, etc., redirect status codes 300, 301, etc., which are not limited here. In other embodiments, you can also customize characters or strings as status codes, and the status code can correspond to the prompt information stored locally in the corresponding terminal.

[0075] If the business request is not an over-limit request, the business request will be sent to the server so that the server can execute normal business logic based on the business request and return business information. After receiving the business information, the terminal can display the business information on the application interface, such as the purchase success page.

[0076] In this embodiment, the content displayed on the terminal interface of the limited business request is no longer generated by the overlimit information returned by the gateway, but the terminal application selects the local page or text to display directly according to the response header of the overlimit information, and the response body in the corresponding overlimit information can be set to empty. Without the user's perception, the downlink bandwidth consumption is greatly reduced by slimming the response body, which brings great savings in bandwidth costs, while improving user experience and user retention.

[0077] Figure 4 yes Figure 2 The flowchart of step S250 in the embodiment shown is in an exemplary embodiment. Figure 4 As shown, in an exemplary embodiment, the process of intercepting the service request and returning the over-limit information to the terminal so that the terminal extracts the corresponding over-limit interface from the pre-stored local interface based on the over-limit information and renders and displays the over-limit interface may include steps S410 to S450, which are described in detail as follows:

[0078] Step S410: construct initial information.

[0079] The initial information in this embodiment may be initialized HTTP information, that is, the initial information includes an initial response header and an initial response body. After writing the information required to be transmitted to the terminal into the initial response header and the initial response body, the HTTP information for transmission can be obtained.

[0080] Step S430: Set the initial response header to the status code corresponding to the service request, and set the initial response body to empty to obtain the overlimit information.

[0081] In this embodiment, the status code (status code) of the initial response header is set based on the business request. Different status codes correspond to different prompt information. Multiple prompt information are stored locally in the terminal. The target prompt information corresponding to the status code can be determined from multiple prompt information later through the status code.

[0082] At the same time, since the terminal stores the prompt information locally, the response body can be set to be empty, and the purpose of reducing bandwidth usage can be achieved by slimming the response body.

[0083] Specifically, the response body is set to be empty. Relevant codes may be set at the gateway kernel level and at the gateway plug-in level to indicate that the response body is empty. The following is a code example for setting the response body to be empty at the gateway kernel level:

[0084] At the gateway kernel level: error_page 429 / 429_error_handle; location = / 429_error_handle {internal; return 429 "";}.

[0085] Of course, the relevant representative expressions in the above code are all commonly used expressions in the program, which will not be elaborated here, and are only used to exemplify some program methods, which is not a specific limitation on the method of setting the response body to be empty. The response body can also be set to be empty in other ways.

[0086] Step S450: Return the overlimit information to the terminal, so that the terminal extracts the corresponding target prompt information according to the status code for rendering and display.

[0087] After the gateway generates the over-limit information, it can return the over-limit information to the terminal. The terminal will extract the corresponding target prompt information according to the status code in the over-limit information for rendering and display.

[0088] In this embodiment, when the excessive business request is limited by the gateway, the gateway returns an empty response body and sets a status code in the response header. On the other hand, the page or text displayed to the user is stored locally in the terminal, and the terminal selects the corresponding local page or text for rendering and display based on the response header returned by the gateway, thereby avoiding the transmission of a large number of duplicate page texts from the server to the front end, greatly reducing bandwidth costs.

[0089] Figure 5 yes Figure 2 The flowchart of step S230 in the embodiment shown is in an exemplary embodiment. Figure 5 As shown, in an exemplary embodiment, the process of determining whether the service request is an over-limit request based on the service carrying capacity of the server may include steps S510 to S550, which are described in detail as follows:

[0090] Step S510: Obtain the maximum service carrying capacity of the server and the service processing capacity currently processed by the server.

[0091] In this embodiment, a method for determining whether a service request exceeds the limit is proposed, namely, by obtaining the maximum service carrying capacity of the server and the service processing capacity currently processed by the server when the gateway receives the service request, and then comparing the maximum service carrying capacity and the service processing capacity to determine whether the service request exceeds the limit.

[0092] The maximum business carrying capacity can be specifically confirmed through processes such as traffic estimation, traffic decomposition, and stress testing.

[0093] In a specific embodiment, traffic estimation is to estimate the overall traffic of an application in the terminal based on industry research analysis, historical experience, business models, etc.; traffic decomposition is to disassemble the estimated overall traffic to obtain the traffic size that each microservice needs to bear (at least one microservice is required to provide services to an application. For example, in one embodiment, the server supporting a certain application business may include user microservices, marketing microservices, transaction microservices, etc.), and for each microservice, the resources (servers, databases, caches, etc.) that cannot support its estimated traffic size; stress testing refers to simulating user traffic for overall stress testing, discovering performance bottlenecks, and measuring the traffic size that the system can actually bear, and optimizing as needed or increasing capacity through expansion to obtain a performance baseline that ultimately meets the business traffic requirements, which can be considered to be the maximum business carrying capacity of each microservice (server).

[0094] Step S530: If the service processing volume is greater than or equal to the maximum service carrying volume, the service request is an over-limit request.

[0095] If the service processing volume is greater than or equal to the maximum service carrying capacity, the service request is an over-limit request, that is, Figure 2 Step S250 in .

[0096] Step S550: If the service processing volume is less than the maximum service carrying volume, the service request is a non-overlimit request.

[0097] When the business request is a non-overlimit request, the business request is sent to the server so that the server can execute normal business logic based on the business request and return business information. After receiving the business information, the terminal can display the business information on the application interface, such as the purchase success page.

[0098] Of course, in other embodiments, in order to ensure the accuracy of current limiting, the current limiting rules of each microservice are also configured based on the performance baseline. The current limiting rules include parameters such as the performance of the microservice and the current limiting algorithm, so as to determine whether the business request exceeds the limit based on the current limiting rules.

[0099] Different current limiting algorithms correspond to different current limiting rules. First, the quota of business requests processed by each server can be configured based on the maximum business carrying capacity and business processing performance. The higher the maximum business carrying capacity and business processing performance, the larger the quota of business requests processed. Different current limiting algorithms have different settings for the quota of business requests processed.

[0100] For example, in one embodiment, a counting-based current limiting algorithm is used to configure the current limiting rules. The amount of business requests processed is the total amount of business requests that can be processed by the server within a time period based on the maximum business load and business performance. During the time period, each time a business request is received, the count is increased by "1" until the total amount is reached. Subsequent business requests within the time period are considered to exceed the limit. If a token bucket algorithm is used to configure the current limiting rules, the amount of business requests processed is the rate at which the server generates tokens and the size of the bucket that stores tokens in the server. The higher the maximum business load and the business processing performance, the larger the rate at which tokens are generated and the capacity of the bucket. When the gateway receives a business request, if it cannot obtain a token from the bucket, the business request is considered to be an over-limit request.

[0101] Of course, the above are only two exemplary ways of setting current limiting rules. In other embodiments, different current limiting rules can be set according to needs, and no specific limitation is made here.

[0102] In this embodiment, by setting the over-limit judgment, the normal operation of the server business is guaranteed, and after the over-limit is judged, the bandwidth occupied by the over-limit interaction can be reduced based on the above method.

[0103] refer to Figure 6 , Figure 6 A bandwidth management method in a current limiting scenario disclosed in another embodiment is applied to Figure 1 The terminal 100 in the embodiment includes steps S610 to S650, which are specifically described as follows:

[0104] Step S610: Send a service request for requesting service information to the gateway.

[0105] The bandwidth management method in the current limiting scenario proposed in this example can be referenced Figure 3 In one embodiment, the terminal sends a service request to the server through the application on it, and the service request will first reach the gateway so that the gateway can judge the service request and determine whether the service request is an over-limit request.

[0106] Step S630: Receive the overlimit information returned by the gateway in response to the service request.

[0107] The over-limit information is generated by the gateway based on the service carrying capacity of the server corresponding to the service request.

[0108] In this embodiment, after receiving the service request, the gateway will determine whether the service carrying capacity of the server requested by the service request exceeds the limit. If it exceeds the limit, the gateway will intercept the service request and return the excess information to the terminal.

[0109] The overlimit information in this embodiment is generated based on the HTTP protocol, which includes a response body and a response header. In order to reduce the bandwidth of gateway interaction when the limit is exceeded, the response body is set to empty, and the response header is set to a status code corresponding to the business request. The status code corresponds to multiple prompt information stored locally in the terminal, that is, a certain status code can correspond to a certain prompt information.

[0110] If the gateway determines that the limit is not exceeded, the service request is sent to the server, so that the server executes the normal service logic based on the service request and returns the service information.

[0111] Step S650: Select corresponding target prompt information from pre-stored prompt information based on the overlimit information, and render and display the target prompt information.

[0112] In this embodiment, after receiving the overlimit information, the terminal matches multiple locally stored prompt information based on the status code in the overlimit information, and then renders and displays the successfully matched target prompt information on the terminal interface.

[0113] In this embodiment, the downlink bandwidth consumption is greatly reduced by slimming down the response body, which brings about a great saving in bandwidth cost, and at the same time improves the user experience and increases user retention.

[0114] refer to Figure 7 , Figure 7 A bandwidth management method in a current limiting scenario is disclosed in another embodiment. The method can be applied to Figure 6 Before step S610 in the method, the method includes steps S710 to S730, which are described in detail as follows:

[0115] Step S710: Send a prompt information acquisition request to the gateway, so that the gateway returns an over-limit prompt page and over-limit prompt text to the terminal based on the prompt information acquisition request.

[0116] In this embodiment, before performing the bandwidth management method in the current limiting scenario, a prompt information acquisition request may be sent to the gateway to obtain an over-limit prompt page and an over-limit prompt text.

[0117] Specifically, an over-limit prompt page or over-limit prompt text is set inside the gateway. Generally, when the terminal sends a service request to the server, the gateway generates the over-limit prompt page or over-limit prompt text in HTTP format and returns it to the terminal. The terminal displays the corresponding information on the terminal page based on the returned HTTP format data.

[0118] In this embodiment, a prompt information acquisition request is directly sent to the gateway, so that the gateway returns the saved over-limit prompt page and over-limit prompt text to the terminal, and the terminal saves it as prompt information. When the gateway subsequently determines that the limit is exceeded, the response body in HTTP can be set to empty, and the response header can include the status code, which greatly reduces bandwidth consumption. The terminal can extract the target prompt information from the saved prompt information based on the status code for display.

[0119] Step S730: The over-limit prompt page and the over-limit prompt text are stored locally as prompt information.

[0120] In this embodiment, the gateway returns the overlimit prompt page and the overlimit prompt text to the terminal based on the prompt information acquisition request, which is also implemented through the HTTP protocol. In this way, the response header in the HTTP protocol returned by the gateway based on the prompt information acquisition request should also have a status code. When the overlimit prompt page and the overlimit prompt text are stored locally as prompt information, the status code is mapped to the corresponding prompt information. Subsequently, the corresponding target prompt information can be directly obtained from the multiple saved prompt information through the status code in the overlimit information.

[0121] In this embodiment, by saving the over-limit prompt page and the prompt information of the over-limit prompt copy in the terminal, the gateway can set the response body to be empty when returning the over-limit information, which greatly reduces the bandwidth cost.

[0122] Exemplary Devices

[0123] After introducing the method of the exemplary embodiment of the present disclosure, next, refer to Figures 8 to 9 A bandwidth management device in a flow limiting scenario according to an exemplary embodiment of the present disclosure is described.

[0124] refer to Figure 8 , Figure 8 is a structural diagram of a bandwidth management device in a current limiting scenario proposed in an exemplary embodiment, the device is configured at Figure 1 The gateway 200 in the embodiment specifically comprises:

[0125] The service request receiving module 810 is configured to receive a service request sent by a terminal; wherein the service request is used to request service information from a server;

[0126] An over-limit determination module 830 is configured to determine whether a service request is an over-limit request based on the service carrying capacity of the server;

[0127] The first over-limit processing module 850 is configured to intercept the service request if it is an over-limit request, and return the over-limit information to the terminal, so that the terminal extracts the corresponding target prompt information from the pre-stored prompt information based on the over-limit information, and renders and displays the target prompt information.

[0128] The configuration disclosed in this embodiment is Figure 1 The bandwidth management device in the flow limiting scenario of the gateway 200 can reduce the volume of over-limit information sent by the gateway and reduce bandwidth overhead.

[0129] In one embodiment of the present disclosure, the first over-limit processing module includes:

[0130] An initial information construction unit, configured to construct initial information; wherein the initial information includes an initial response header and an initial response body;

[0131] An overrun information acquisition unit is configured to set an initial response header to a status code corresponding to the service request and set an initial response body to empty, so as to obtain overrun information; wherein different status codes correspond to different prompt information;

[0132] The target prompt information display unit is configured to return the overlimit information to the terminal, so that the terminal extracts the corresponding target prompt information according to the status code for rendering and display.

[0133] In one embodiment of the present disclosure, the over-limit judgment module includes:

[0134] A service volume acquisition unit configured to acquire a maximum service carrying capacity of the server and a service processing volume currently processed by the server;

[0135] A first over-limit judgment unit is configured to determine that a service request is an over-limit request if the service processing volume is greater than or equal to the maximum service carrying volume;

[0136] The first over-limit judgment unit is configured to determine that if the service processing volume is less than the maximum service carrying volume, the service request is a non-over-limit request.

[0137] In one embodiment of the present disclosure, the over-limit judgment module includes:

[0138] The service information sending unit is configured to send the service request to the server if the service request is a non-overlimit request, so that the server returns the service information based on the service request.

[0139] refer to Fig. 9 , Fig. 9 is a structural diagram of a bandwidth management device in a current limiting scenario proposed in an exemplary embodiment, the device is configured at Figure 1 The terminal 100 in the embodiment specifically comprises:

[0140] A service request sending module 910, configured to send a service request for requesting service information to the gateway;

[0141] The over-limit information receiving module 930 is configured to receive the over-limit information returned by the gateway for the service request; wherein the over-limit information is generated by the gateway based on the service carrying capacity of the server corresponding to the service request;

[0142] The second overrun processing module 950 is configured to select corresponding target prompt information from pre-stored prompt information based on the overrun information, and render and display the target prompt information.

[0143] The configuration disclosed in this embodiment is Figure 1 The bandwidth management device in the flow limiting scenario of the terminal 100 can obtain target prompt information from the local based on the excess information, reduce the volume of the excess information sent by the gateway, and reduce the bandwidth overhead.

[0144] In one embodiment of the present disclosure, the configuration Figure 1 The bandwidth management device in the current limiting scenario of the terminal 100 further includes:

[0145] A prompt information acquisition request sending module is configured to send a prompt information acquisition request to the server, so that the server returns an over-limit prompt page and an over-limit prompt copy to the terminal based on the prompt information acquisition request;

[0146] The prompt information storage module is configured to store the over-limit prompt page and the over-limit prompt text as prompt information locally.

[0147] It should be noted that the bandwidth management device in the current limiting scenario provided in the above embodiment and the bandwidth management method in the current limiting scenario provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.

[0148] Exemplary Media

[0149] After introducing the device of the exemplary embodiment of the present disclosure, next, refer to Fig.10 A storage medium according to an exemplary embodiment of the present disclosure is described.

[0150] In some embodiments, various aspects of the present disclosure may also be implemented as a medium on which program code is stored, and when the program code is executed by a processor of a device, it is used to implement the steps of the bandwidth management method in a flow limiting scenario according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.

[0151] refer to Fig.10 As shown, a program product 1000 for implementing the bandwidth management method in the above-mentioned flow limiting scenario according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.

[0152] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0153] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Readable signal media may also be any readable medium other than a readable storage medium.

[0154] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).

[0155] Exemplary Computing Devices

[0156] After introducing the bandwidth management method in the flow limiting scenario, the bandwidth management method device in the flow limiting scenario, and the storage medium according to the exemplary embodiment of the present disclosure, the following is a reference to Fig.11 An electronic device according to an exemplary embodiment of the present disclosure is described.

[0157] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0158] Fig.11 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0159] It should be noted that Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0160] like Fig.11As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103, such as executing the method in the above embodiment. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, the ROM 1102 and the RAM 1103 are connected to each other through the bus 1104. The input / output (I / O) interface 1105 is also connected to the bus 1104.

[0161] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0162] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.

[0163] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0164] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0165] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0166] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the bandwidth management method in the current limiting scenario as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.

[0167] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the bandwidth management method in the current limiting scenario provided in each of the above embodiments.

[0168] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A bandwidth management method in a current limiting scenario, It is characterized in that Applied to a gateway, the method comprises: Receiving a service request sent by a terminal; wherein the service request is used to request service information from a server; Determine whether the service request is an over-limit request based on the maximum service carrying capacity of the server by using a flow limiting engine; the maximum service carrying capacity is determined based on the flow that the server needs to bear, the flow that the server needs to bear is the flow of the entire flow disassembled to the server, and the entire flow is the entire flow of the target application predicted based on empirical parameters; If the business request is an over-limit request, intercept the business request and construct initial information; wherein the initial information includes an initial response header and an initial response body; set the initial response header to a status code corresponding to the business request, and set the initial response body to empty to obtain the over-limit information; wherein different business request status codes correspond to different prompt information; return the over-limit information to the terminal, so that the terminal extracts the corresponding target prompt information from multiple prompt information pre-stored locally according to the status code for rendering and display.

2. The method according to claim 1, It is characterized in that The determining whether the service request is an over-limit request based on the maximum service carrying capacity of the server includes: Obtaining the maximum service carrying capacity of the server and the service processing capacity currently processed by the server; If the service processing volume is greater than or equal to the maximum service carrying capacity, the service request is an over-limit request; If the service processing volume is less than the maximum service carrying capacity, the service request is a non-overlimit request.

3. The method according to claim 2, It is characterized in that The method further comprises: If the service request is not an over-limit request, the service request is sent to the server, so that the server returns service information based on the service request.

4. A bandwidth management method in a current limiting scenario, It is characterized in that Applied to a terminal, the method comprises: Sending a service request for requesting service information to the gateway; Receive the over-limit information returned by the gateway for the service request; wherein the over-limit information is returned by the gateway through the flow limiting engine when determining that the service request is an over-limit request, and the gateway determines whether the service request is an over-limit request based on the maximum service carrying capacity of the server corresponding to the service request; the maximum service carrying capacity is determined based on the traffic that the server needs to bear, the traffic that the server needs to bear is the traffic of the overall traffic decomposed to the server, and the overall traffic is the overall traffic of the target application predicted based on the empirical parameters; Selecting corresponding target prompt information from pre-stored prompt information based on the overrun information, and rendering and displaying the target prompt information; The over-limit information is obtained by the gateway in the following manner: constructing initial information; wherein the initial information includes an initial response header and an initial response body; setting the initial response header to a status code corresponding to the service request, and setting the initial response body to empty, so as to obtain the over-limit information; wherein different status codes of different service requests correspond to different prompt information; The selecting corresponding target prompt information from pre-stored prompt information based on the overrun information, and rendering and displaying the target prompt information includes: The corresponding target prompt information is extracted according to the status code for rendering and display.

5. The method according to claim 4, It is characterized in that Before selecting corresponding target prompt information from pre-stored prompt information based on the overrun information and rendering and displaying the target prompt information, the method further includes: Sending a prompt information acquisition request to the server, so that the server returns an over-limit prompt page and over-limit prompt text to the terminal based on the prompt information acquisition request; The over-limit prompt page and the over-limit prompt text are stored locally as prompt information.

6. A bandwidth management method in a current limiting scenario, It is characterized in that include: The terminal sends a service request to the gateway for requesting service information from the server; The gateway determines whether the service request is an over-limit request based on the maximum service carrying capacity of the server through a flow limiting engine; the maximum service carrying capacity is determined based on the traffic that the server needs to bear, the traffic that the server needs to bear is the traffic of the entire traffic decomposed to the server, and the entire traffic is the entire traffic of the target application predicted based on empirical parameters; If the service request is an over-limit request, the gateway intercepts the service request and returns over-limit information to the terminal; The terminal extracts corresponding target prompt information from pre-stored prompt information based on the overrun information, and renders and displays the target prompt information; Wherein, if the service request is an over-limit request, the gateway intercepts the service request and returns over-limit information to the terminal, including: constructing initial information; wherein the initial information includes an initial response header and an initial response body; setting the initial response header to a status code corresponding to the service request, and setting the initial response body to empty, so as to obtain the over-limit information, and returning the over-limit information to the terminal; wherein different status codes of different service requests correspond to different prompt information; The terminal extracts corresponding target prompt information from pre-stored prompt information based on the overrun information, and renders and displays the target prompt information, including: The terminal extracts the corresponding target prompt information according to the status code and renders and displays it.

7. A bandwidth management device in a current limiting scenario, It is characterized in that Configured in a gateway, the device includes: A service request receiving module, configured to receive a service request sent by a terminal; wherein the service request is used to request service information from a server; an over-limit judgment module, configured to determine whether the service request is an over-limit request based on the maximum service carrying capacity of the server through a flow limiting engine; the maximum service carrying capacity is determined based on the flow that the server needs to bear, the flow that the server needs to bear is the flow of the entire flow disassembled to the server, and the entire flow is the entire flow of the target application predicted based on the empirical parameters; A first overlimit processing module is configured to intercept the service request if it is an overlimit request and construct initial information; wherein the initial information includes an initial response header and an initial response body; an overlimit information acquisition unit is configured to set the initial response header to a status code corresponding to the service request and set the initial response body to empty to obtain overlimit information; wherein different status codes of different service requests correspond to different prompt information; The target prompt information display unit is configured to return the overrun information to the terminal, so that the terminal extracts the corresponding target prompt information from the multiple prompt information pre-stored locally according to the status code for rendering and display.

8. The bandwidth management device in a current limiting scenario according to claim 7, It is characterized in that The over-limit judgment module comprises: A service volume acquisition unit configured to acquire a maximum service carrying capacity of the server and a service processing volume currently processed by the server; A first over-limit judgment unit is configured to determine that a service request is an over-limit request if the service processing volume is greater than or equal to the maximum service carrying volume; The first over-limit judgment unit is configured to determine that if the service processing volume is less than the maximum service carrying volume, the service request is a non-over-limit request.

9. The bandwidth management device in a current limiting scenario according to claim 8, It is characterized in that The over-limit judgment module includes: The service information sending unit is configured to send the service request to the server if the service request is a non-overlimit request, so that the server returns the service information based on the service request.

10. A bandwidth management device in a current limiting scenario, It is characterized in that Configured in a terminal, the device includes: A service request sending module, configured to send a service request for requesting service information to the gateway; An overlimit information receiving module is configured to receive the overlimit information returned by the gateway for the service request; wherein the overlimit information is generated by the gateway through the flow limiting engine based on the maximum service carrying capacity of the server corresponding to the service request, and the maximum service carrying capacity is determined based on the traffic that the server needs to bear, and the traffic that the server needs to bear is the traffic of the overall traffic disassembled to the server, and the overall traffic is the overall traffic of the target application predicted based on empirical parameters; the overlimit information is obtained by the gateway in the following manner: constructing initial information; wherein the initial information includes an initial response header and an initial response body; setting the initial response header to a status code corresponding to the service request, and setting the initial response body to empty, so as to obtain the overlimit information; wherein the status codes of different service requests correspond to different prompt information; The second overrun processing module is configured to select corresponding target prompt information from pre-stored prompt information based on the status code in the overrun information, and render and display the target prompt information.

11. The bandwidth management device in a current limiting scenario according to claim 10, It is characterized in that The bandwidth management device in the current limiting scenario also includes: A prompt information acquisition request sending module is configured to send a prompt information acquisition request to the server, so that the server returns an over-limit prompt page and an over-limit prompt copy to the terminal based on the prompt information acquisition request; The prompt information storage module is configured to store the over-limit prompt page and the over-limit prompt text as prompt information locally.

12. A bandwidth management system in a current limiting scenario, It is characterized in that include: A gateway and a terminal pre-stored with prompt information; wherein, The terminal is used to send a service request to request service information from the server; The gateway is used to determine whether the service request is an over-limit request based on the maximum service carrying capacity of the server through a flow limiting engine, the maximum service carrying capacity is determined based on the traffic that the server needs to bear, the traffic that the server needs to bear is the traffic of the overall traffic decomposed to the server, and the overall traffic is the overall traffic of the target application predicted based on empirical parameters; when the service request is an over-limit request, the service request is intercepted and initial information is constructed; wherein the initial information includes an initial response header and an initial response body; the initial response header is set to a status code corresponding to the service request, and the initial response body is set to empty to obtain the over-limit information; wherein different status codes of different service requests correspond to different prompt information; the over-limit information is returned to the terminal, so that the terminal extracts the corresponding target prompt information from multiple prompt information pre-stored locally according to the status code for rendering and display.

13. An electronic device, It is characterized in that include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 6.

14. A computer readable medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Microservice rate limiting method and apparatus

    CA3140333A1

  • Content providing control method, terminal device and user device

    CN105847173A

  • Page switching method, mobile terminal and storage medium

    CN107038245A

  • Method and device for processing service request

    CN108234653A

  • Traffic management method and device for distributed system, and computing device

    CN109617831A