Service degradation processing method and apparatus, client terminal, and computer program product

By using interceptor technology on the client terminal, some business requests are intercepted based on the server's feedback, which solves the stability problem of the client terminal when server resources are insufficient, realizes efficient business degradation processing, and ensures user experience and reasonable allocation of server resources.

CN115988084BActive Publication Date: 2025-12-19CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211544578.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2025-12-19
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

In existing technologies, when server resources are insufficient, the stability of client terminal business operations is low, and existing server-side business degradation technologies are slow to take effect during peak periods, with a wide impact, and cannot effectively guarantee user experience.

Method used

The client terminal uses interceptor technology to determine the downgraded objects and effective time based on the server's feedback, intercepts some business requests, releases server resources, and reduces server pressure by using traffic shaping and service circuit breaking.

Benefits of technology

It improved the stability of business operations on the client side, reduced the number of requests processed by the server, freed up server resources, and ensured the normal operation of core businesses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988084B_ABST
    Figure CN115988084B_ABST
Patent Text Reader

Abstract

The application relates to a service degradation processing method and device, a client terminal, a computer readable storage medium and a computer program product, and relates to the technical field of service processing. The method comprises the following steps: when it is determined that a service degradation condition is met according to a feedback result of a service processing request returned by a server, a degradation object is determined; an interceptor of the degradation object at a network request layer and an effective start time of the interceptor are determined; at least part of service processing requests of the degradation object after the effective start time are intercepted and processed to obtain a target service request; and the target service request is sent to the server. The method can improve the stability of service operation on the client terminal side.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of business processing, and in particular to a business degradation processing method and device, a client terminal, a computer readable storage medium and a computer program product. BACKGROUND

[0002] With the continuous development of Internet technology, a client terminal needs to call an interface of a server to provide a user with a business service through the interface provided by the server in order to meet the user's business needs. If the server has fewer resources, the client terminal may have an exception when calling the interface, and cannot provide the user with the business service.

[0003] Generally, the server can release resources through a business degradation processing manner to ensure the normal and efficient operation of core businesses. However, the above manner can result in low stability of business operation of the client terminal. SUMMARY

[0004] Therefore, it is necessary to provide a business degradation processing method, device, client terminal, computer readable storage medium and computer program product capable of improving the stability of business operation in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a business degradation processing method applied to a client terminal, and the method comprises the following steps.

[0006] When it is determined that a business degradation condition is met according to a feedback result of a business processing request returned by a server, a degradation object is determined.

[0007] An interceptor of the degradation object at a network request layer and an effective start time of the interceptor are determined.

[0008] At least part of business processing requests of the degradation object after the effective start time are intercepted and processed to obtain a target business request.

[0009] The target business request is sent to the server.

[0010] In an embodiment, when it is determined that a business degradation condition is met according to a feedback result of a business processing request returned by a server, a degradation object is determined, which comprises the following steps.

[0011] A business processing request is sent to the server in response to a business trigger request.

[0012] A feedback result of the server executing the business processing request is obtained.

[0013] When the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold, or server technology failure, it is determined that a service degradation condition is met, and a degradation level is determined;

[0014] The degradation object corresponding to the degradation level is obtained.

[0015] In one embodiment, the intercepting and processing of the at least partial service processing requests of the degradation object after the effective start time to obtain target service requests comprises:

[0016] When the service trigger request is received again within a minimum sending period after the effective start time, all service processing requests of the degradation object within the minimum sending period after the effective start time are intercepted and processed to obtain target service requests; the target service requests are service processing requests of the degradation object after the minimum sending period.

[0017] In one embodiment, the intercepting and processing of the at least partial service processing requests of the degradation object after the effective start time to obtain target service requests comprises:

[0018] When the service trigger request is received again within a minimum sending period after the effective start time, a preset proportion of service processing requests of the degradation object within the minimum sending period after the effective start time are intercepted and processed to obtain target service requests.

[0019] In one embodiment, the method further comprises:

[0020] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time meets a service degradation condition, the preset proportion is increased, and the degradation level is increased; the trigger degradation time is a time when the degradation object is determined; a degradation degree after the degradation level is increased is greater than a current degradation degree.

[0021] A degradation object after the degradation level is increased is determined.

[0022] The trigger degradation time is updated.

[0023] In one embodiment, the method further comprises:

[0024] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time does not meet a service degradation condition, the preset proportion is decreased, and the degradation level is decreased; a degradation degree after the degradation level is decreased is less than a current degradation degree.

[0025] A degradation object after the degradation level is decreased is determined.

[0026] updating the trigger degradation time.

[0027] In one embodiment, the intercepting and processing the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time to obtain the target service request comprises:

[0028] controlling the random number corresponding to the service processing request of the degraded object within the minimum sending period after the effective start time;

[0029] According to the random number, the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time is intercepted and processed to obtain the target service request.

[0030] In a second aspect, the application provides a service degradation processing device applied to a client terminal, and the device comprises:

[0031] The first determination module is configured to determine the degraded object when it is determined that the service degradation condition is met according to the feedback result of the server to the executed service processing request.

[0032] The second determination module is configured to determine the interceptor of the degraded object at the network request layer and the effective start time of the interceptor.

[0033] The acquisition module is configured to intercept and process at least part of the service processing requests of the degraded object after the effective start time to obtain the target service request.

[0034] The communication module is configured to send the target service request to the server.

[0035] In one embodiment, the first determination module is further configured to:

[0036] In response to the service trigger request, the service processing request is sent to the server.

[0037] The feedback result of the server executing the service processing request is acquired.

[0038] When the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value or server technical failure, it is determined that the service degradation condition is met and the degraded level is determined.

[0039] The degraded object corresponding to the degraded level is acquired.

[0040] In one embodiment, the acquisition module is further configured to:

[0041] When the service trigger request is received again within the minimum sending period after the effective start time, all service processing requests of the degraded object within the minimum sending period after the effective start time are intercepted to obtain a target service request.

[0042] In one embodiment, the obtaining module is further configured to:

[0043] When the service trigger request is received again within the minimum sending period after the effective start time, a preset proportion of service processing requests of the degraded object within the minimum sending period after the effective start time are intercepted to obtain a target service request.

[0044] In one embodiment, the apparatus further includes an adjusting module configured to:

[0045] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time meets a service degradation condition, the preset proportion is increased, and the degradation level is increased; the trigger degradation time is a time when a degraded object is determined; a degradation degree after the degradation level is increased is greater than a current degradation degree.

[0046] A degraded object after the degradation level is increased is determined.

[0047] The trigger degradation time is updated.

[0048] In one embodiment, the apparatus further includes an adjusting module configured to:

[0049] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time does not meet a service degradation condition, the preset proportion is decreased, and the degradation level is decreased; a degradation degree after the degradation level is decreased is less than a current degradation degree.

[0050] A degraded object after the degradation level is decreased is determined.

[0051] The trigger degradation time is updated.

[0052] In one embodiment, the obtaining module is further configured to:

[0053] A random number corresponding to a service processing request of the degraded object within the minimum sending period after the effective start time is controlled to be generated;

[0054] According to the random number, a preset proportion of service processing requests of the degraded object within the minimum sending period after the effective start time are intercepted to obtain a target service request.

[0055] In a third aspect, the present application provides a client terminal. The client terminal comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0056] determining a downgrade object when it is determined that the service downgrade condition is met according to the feedback result returned by the server for the executed service processing request;

[0057] determining an interceptor of the downgrade object at the network request layer and an effective start time of the interceptor;

[0058] intercepting at least part of the service processing request of the downgrade object after the effective start time to obtain a target service request;

[0059] sending the target service request to the server.

[0060] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the following steps when executed by a processor:

[0061] determining a downgrade object when it is determined that the service downgrade condition is met according to the feedback result returned by the server for the executed service processing request;

[0062] determining an interceptor of the downgrade object at the network request layer and an effective start time of the interceptor;

[0063] intercepting at least part of the service processing request of the downgrade object after the effective start time to obtain a target service request;

[0064] sending the target service request to the server.

[0065] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program implements the following steps when executed by a processor:

[0066] determining a downgrade object when it is determined that the service downgrade condition is met according to the feedback result returned by the server for the executed service processing request;

[0067] determining an interceptor of the downgrade object at the network request layer and an effective start time of the interceptor;

[0068] intercepting at least part of the service processing request of the downgrade object after the effective start time to obtain a target service request;

[0069] sending the target service request to the server.

[0070] The service degradation processing method, device, client terminal, computer readable storage medium and computer program product, when the client terminal determines that the service degradation condition is met according to the feedback result of the server returned to the executed service processing request, determines the degradation object, determines the interceptor of the degradation object at the network request layer, and determines the effective start time of the interceptor. The client terminal intercepts and processes at least part of the service processing request of the degradation object after the effective start time, obtains the target service request, and sends the target service request to the server. The application considers the degradation processing of the service from the perspective of the client terminal. The client terminal can adaptively perform service degradation processing based on the feedback result of the server returned to the service processing request, and intercept part of the service processing request sent by the client terminal to the server, so that the number of service processing requests of the server can be reduced, and the resources of the server side can be released. In this way, the server can improve the stability of the service operation on the client terminal side when processing the service processing request from the client terminal in the subsequent. BRIEF DESCRIPTION OF DRAWINGS

[0071] Figure 1 An application environment diagram of the service degradation processing method in one embodiment;

[0072] Figure 2 A flowchart of the service degradation processing method in one embodiment;

[0073] Figure 3 A flowchart of determining the degradation object when the service degradation condition is met according to the feedback result of the server returned to the executed service processing request in one embodiment;

[0074] Figure 4 A schematic diagram of the client terminal intercepting the service processing request in one embodiment;

[0075] Figure 5 A schematic diagram of the application system of the server side before and after QPS optimization in one embodiment;

[0076] Figure 6 A schematic diagram of the client terminal intercepting the service processing request of the degradation object in one embodiment;

[0077] Figure 7 A flowchart of the service degradation processing method in one embodiment;

[0078] Figure 8 A flowchart of the service degradation processing method in one embodiment;

[0079] Figure 9This is a flowchart illustrating a service degradation processing method in one embodiment;

[0080] Figure 10 This is a structural block diagram of a service degradation processing device in one embodiment;

[0081] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0083] When server pressure increases dramatically, the server can strategically degrade certain services and pages by not processing them or by processing them in a simpler way, depending on the actual business situation and traffic. This releases server-side resources to ensure the normal or efficient operation of core businesses.

[0084] However, existing business degradation technologies are mainly designed for the reasonable coordination of limited system resources on the server side. As an important part of mobile Internet application systems, client terminals do not yet have mature technologies to ensure that users' core business experience is not affected during peak periods under limited resources.

[0085] In particular, for enterprise-level application systems with hundreds of thousands of queries per second (QPS), relying solely on existing server-side business degradation technologies during peak periods presents challenges due to the sheer size of the system. These challenges include slow implementation of degradation strategies, delayed service recovery, and an excessively wide impact of business degradation. Furthermore, when server load increases dramatically, implementing business degradation from the server-side perspective leaves client terminals in a passive response position, resulting in low stability of client terminal business operations.

[0086] In view of this, this application provides a service degradation processing method, which is applied to a client terminal. The service degradation processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, client terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other network servers.

[0087] Specifically, when the client terminal 102 determines that the service downgrade condition is met according to the feedback result of the executed service processing request returned by the server 104, the downgrade object can be determined, and the interceptor of the downgrade object at the network request layer and the effective start time of the interceptor can be determined. The client terminal 102 can obtain the target service request by intercepting at least part of the service processing request of the downgrade object after the effective start time, and send the target service request to the server 104.

[0088] The client terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0089] In one embodiment, as shown in Figure 2 , a service downgrade processing method is provided. The method is applied to the client terminal 102 in Figure 1 for example, and includes the following steps:

[0090] S202, when it is determined that the service downgrade condition is met according to the feedback result of the executed service processing request returned by the server, the downgrade object is determined.

[0091] In this application, by using the interceptor technology, the client terminal can obtain the feedback result of the executed service processing request returned by the server based on the interceptor set in the network request layer. The client terminal can adaptively determine whether to downgrade the service according to the feedback result, without relying on the service downgrade processing of the server, and avoid being in a passive position. Wherein, the client terminal determines the downgrade object if it is determined that the service trigger condition is met according to the feedback result. The downgrade object is used to indicate the downgrade object corresponding to the service processing request, and the downgrade object can include at least one of the following: a user level corresponding to the service processing request and an interface name corresponding to the service processing request, etc.

[0092] In consideration of the fact that the operation strategy in the mobile Internet era is usually regional, and the service end application system is under pressure when a promotion activity is carried out in an individual region, it is also unfair if all the client terminals are affected by the service degradation. To avoid such a situation, the degradation object can also include the region where the client terminal sends the service processing request. Therefore, the degradation object can include at least one of the following: the user level corresponding to the service processing request, the interface name corresponding to the service processing request, or the region where the client terminal sends the service processing request. Among them, the region where the client terminal sends the service processing request can include the region where the promotion activity is carried out, etc.

[0093] It can be understood that when the client terminal in the region where the promotion activity is carried out sends a service processing request to the server, if the client terminal determines that the service degradation condition is met according to the feedback result of the server to the executed service processing request, the client terminal can set the region where the promotion activity is carried out as the intercepted region from the network request protocol layer through the interceptor added in the network request layer, so that the client terminal can intercept the service processing request in the region where the promotion activity is carried out.

[0094] It can be understood that the service processing request can include the region where the service processing request is sent, the user level corresponding to the service processing request, and the interface name corresponding to the service processing request, etc. When the client terminal determines that the service degradation condition is met according to the feedback result, at least one of the region where the service processing request is sent, the user level corresponding to the service processing request, and the interface name corresponding to the service processing request can be subjected to degradation processing.

[0095] S204, determining the interceptor of the degradation object in the network request layer, and the effective start time of the interceptor.

[0096] In this embodiment, by using the interceptor technology, the interceptor is added in the network request layer, so that when the client terminal determines that the service degradation condition is met according to the feedback result, the interceptor corresponding to the degradation object can be determined in the network request layer according to the degradation object to be degraded, and the effective start time of the interceptor can be determined. The interceptor is used to intercept the service processing request sent by the client terminal to the server, and the effective start time of the interceptor is used to indicate the starting time of intercepting the service processing request of the degradation object. The effective start time can be set as the time when it is determined that the service degradation condition is met.

[0097] When the interceptor is added in the network request layer, the interceptor set in the network request layer is used to intercept the corresponding business processing request. For example, the interceptor 1 added in the network request layer is used to intercept the region corresponding business processing request, the interceptor 2 added in the network request layer is used to intercept the user level corresponding business processing request, the interceptor 3 added in the network request layer is used to intercept the response result returned by the server, and the interceptor 4 added in the network request layer is used to intercept the interface name corresponding business processing request.

[0098] S206, intercepting and processing at least part of the business processing request of the degraded object after the effective start time to obtain a target business request.

[0099] In the embodiment, the client terminal can reduce the number of business requests sent to the server by intercepting and processing at least part of the business processing request of the degraded object after the effective start time, so as to reduce the pressure on the server side and release the resources on the server side.

[0100] It can be understood that when the client terminal intercepts and processes at least part of the business processing request of the degraded object after the effective start time, the intercepted business processing request is an invalid request, which is used to indicate that the client terminal cannot call the interface on the server side. The client terminal can discard the invalid request directly and construct and return a friendly prompt message, which contains a friendly prompt text message, such as prompting to try again later, so as to degrade the user's emotional feelings as much as possible.

[0101] It can be understood that when the client terminal intercepts and processes at least part of the business processing request of the degraded object after the effective start time, the client terminal can also quickly execute the bottom-up strategy of the business layer according to the agreement, so as to effectively improve the user experience. The bottom-up strategy is an extension part designed according to the business scene, such as providing an entrance to guide the user to experience other businesses of the application program started in the client terminal.

[0102] S208, sending a target business request to the server.

[0103] In summary, in the above Figure 2In the illustrated embodiment, the client terminal determines the downgrade object and determines the interceptor of the downgrade object at the network request layer and the effective start time of the interceptor by determining that the service downgrade condition is met according to the feedback result of the server returned for the executed service processing request. The client terminal obtains the target service request by intercepting at least part of the service processing request of the downgrade object after the effective start time, and sends the target service request to the server. The present application considers the downgrade processing of the service from the perspective of the client terminal. The client terminal can adaptively perform service downgrade processing based on the feedback result of the server returned for the service processing request, and by intercepting part of the service processing request sent by the client terminal to the server, the number of service processing requests processed by the server can be reduced, and the resources of the server side can be released. In this way, the server can improve the stability of the service operation on the client terminal side when processing the service processing request from the client terminal in the future.

[0104] In Figure 2 Based on the illustrated embodiment, in one of the embodiments, as Figure 3 As shown, a flowchart for determining a downgrade object when it is determined that a service downgrade condition is met according to a feedback result of a server returned for an executed service processing request is provided, comprising:

[0105] S302, in response to the service trigger request, and sending a service processing request to the server.

[0106] In this embodiment, when the user starts the application, the user can generate a corresponding service trigger request by clicking or touching the operation on the service in the application. The client terminal can generate a corresponding service processing request in response to the service trigger request, and send the service processing request to the server. The service trigger request can refer to the trigger request of the user to the coupon page, and the service processing request can refer to the opening request of the client terminal to the coupon page.

[0107] S304, obtaining a feedback result of the server executing the service processing request.

[0108] In this embodiment, the service processing request includes an interface called by the client terminal to the server. Through the interface name, the server can provide the interface to the client terminal, so that the client terminal can display the service processing result. Therefore, the feedback result is used to indicate the calling result of the interface corresponding to the service processing request. For example, the service processing request is the opening request of the client terminal to the coupon page. When the interface calling is normal, the client terminal can display the coupon page. When the interface calling is abnormal, the client terminal cannot display the coupon page, and the client terminal can display a prompt information, such as please try again later.

[0109] S306, when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value, or server technical failure, it is determined that the service degradation condition is met, and the degradation level.

[0110] In this embodiment, when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value, or server technical failure, it indicates that the service processing request sent by the client terminal to the server is abnormal, and therefore, it can be determined that the service degradation condition is met and the degradation level.

[0111] The interface call timeout means that the interface has ended with a timeout error code response. The interface being flow controlled means that the server flow controls the interface, and the limited call is rejected by the server with a specific response code. The interface response time exceeding a threshold value means that the interface ends with a 200 response code, but the response time exceeds the expected threshold value. The server technical failure means that the interface ends with a non-200 response code, which does not include the agreed business exception response code. For example, the server technical failure can include 50x exception, which means that the interface response code is 50x, and the 50x exception is a server error, such as 500 service internal error, 502 gateway error, etc.

[0112] S308, obtaining a degradation object corresponding to the degradation level.

[0113] In this embodiment, the degradation level and the degradation object have a corresponding relationship. The degradation object can include at least one of the following: a region where the client terminal sends the service processing request, a user level corresponding to the service processing request, and an interface name corresponding to the service processing request.

[0114] For example, taking the interface name as the degradation object, when the degradation level is level one, the interface name corresponding to the degradation level can include a normal interface, such as an advertisement interface, etc. When the degradation level is level two, the interface name corresponding to the degradation level can include a general interface and a normal interface, such as an advertisement interface and an order list interface, etc. When the degradation level is level three, the interface name corresponding to the degradation level can include a general interface, a normal interface, and an important interface, etc., such as an advertisement query interface, an order list interface, and a coupon interface, etc. It can be understood that in any case, the server only provides the client terminal with core interfaces, such as a login interface and a payment interface, etc., to ensure the normal operation of the core business.

[0115] In summary, in the above embodiments, when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value, or server technical failure, it is determined that the service degradation condition is met, and the degradation level. Figure 3In the embodiment shown, the client terminal can send a service processing request to the server in response to a service trigger request, obtain a feedback result of the server executing the service processing request, determine that the service degradation condition is met and the degradation level when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value, or server technical failure, and obtain the degradation object corresponding to the degradation level. The client terminal uses the feedback result as a reference basis for triggering adaptive service degradation of the client terminal, so that the processing pressure of the server side can be actively perceived, and the number of server processing requests can be reduced by intercepting part of the service processing requests, thereby releasing the resources of the server side. In this way, the server can improve the stability of service operation on the client terminal side when processing subsequent service processing requests from the client terminal.

[0116] In Figure 2 and Figure 3 In one embodiment, as shown in Figure 4 , a schematic diagram of a client terminal intercepting a service processing request is provided. The interceptor 1 added in the network request layer is used to intercept the service processing request corresponding to the region, the interceptor 2 added in the network request layer is used to intercept the service processing request corresponding to the user level, the interceptor 3 added in the network request layer is used to intercept the interface response (i.e., the feedback result) returned by the server, and the interceptors 4-6 added in the network request layer are used to intercept the service processing request corresponding to the interface name. Specifically, the interceptor 4 is used to intercept the service processing request corresponding to the ordinary interface, the interceptor 5 is used to intercept the service processing request corresponding to the general interface, and the interceptor 6 is used to intercept the service processing request corresponding to the important interface.

[0117] Suppose the service processing requests of non-VIP users in the third region and the fourth region need to be intercepted, and the feedback result returned by the server to the client terminal is a non-200 response code. The client terminal can adaptively start a first-level degradation, a second-level degradation, and a third-level degradation according to the importance of the interface corresponding to the service processing request. According to the importance of the interface, the interface can be divided into an ordinary interface, a general interface, an important interface, and a core interface. The ordinary interface is processed according to the first-level degradation, the ordinary interface and the general interface are processed according to the second-level degradation, and the ordinary interface, the general interface, and the important interface are processed according to the third-level degradation. The ordinary interface can include an advertisement query interface, the general interface can include an order list interface, the important interface can include a coupon redemption interface, and the core interface can include a login interface and a payment interface.

[0118] In the first example, if the client terminal in the first region receives a service trigger request of a normal user A, because the interception region in the interception condition is not met, the client terminal can send a service processing request to the server in response to the service trigger request of the normal user A.

[0119] In the second example, if the client terminal in the third region receives the service triggering request of the VIP user B, although the interception region in the interception condition is met, the user level in the interception condition is not met, therefore, the client terminal can send the service processing request to the server in response to the service triggering request of the VIP user B.

[0120] In the third example, if the client terminal in the third region receives the coupon service triggering request of the common user C, the client terminal sends the coupon service processing request to the server in response to the coupon service triggering request. The server returns the 500 response code to the client terminal, because the interception region in the interception condition is met, the user level in the interception condition is met, the non-200 response code returned by the server to the client terminal in the interception condition is met, and the important interface in the interception condition is met. Therefore, the client terminal intercepts the coupon service processing request of the common user C, and the client terminal also intercepts the order query service processing request and the advertisement query service processing request of the common user C.

[0121] It should be noted that when the interface called in the service processing request is the core interface, the service processing request is not processed in a degraded manner, so as to ensure the normal operation of the service corresponding to the core interface.

[0122] It can be understood from the above that the application adaptively performs service degradation from the perspective of the client terminal, so as to reduce the pressure of the server side. According to different feedback results returned by the server after executing the service processing request, the client terminal reduces the pressure of the server side in different ways.

[0123] In one embodiment, when the feedback result includes interface call timeout, interface flow control, and interface response time exceeding a threshold, the way in which the client terminal reduces the pressure of the server side is a traffic peak clipping manner. In the traffic peak clipping manner, the QPS of the application system on the server side can be reduced, so that the QPS curve of the application system on the server side is optimized from “tall and thin” to “short and fat”. Specifically, as shown in Figure 5 , a schematic diagram of the QPS of the application system on the server side before and after optimization is provided, and it can be seen that the QPS curve of the application system on the server side is optimized from “tall and thin” to “short and fat”.

[0124] In one embodiment, when the feedback result includes server technical failure, the way in which the client terminal reduces the pressure of the server side is a service fusing manner. In the service fusing manner, invalid requests sent by the client terminal to the server can be reduced.

[0125] In Figure 3On the basis of the embodiments shown, in one embodiment, the interception processing of at least part of the service processing requests of the degraded object within the minimum sending period after the effective start time is performed to obtain the target service request, including: when the service trigger request is received again within the minimum sending period after the effective start time, the interception processing of all service processing requests of the degraded object within the minimum sending period after the effective start time is performed to obtain the target service request. Wherein, the target service request is the service processing request of the degraded object after the minimum sending period, and the target service request is a valid request.

[0126] For example, the effective start time is represented by T 开始 , and the minimum sending period is represented by t, as shown in Figure 6 , a schematic diagram of a client terminal intercepting service processing requests of a degraded object is provided. The client terminal intercepts service processing requests within t seconds after T 开始 , the intercepted requests are invalid requests, and the received service processing requests after interception are valid requests, and so on.

[0127] Wherein, it is assumed that the interface called by the client terminal to the server is in a continuous flow control state, the client terminal will receive a flow control response code from the server, there is only one valid request within t seconds, that is, there is 1 / t valid requests within 1 second, and if the number of client terminals initiating service processing requests is Q, the actual pressure QPS valid of the application system of the server satisfies the following formula: It can be understood that by reasonably configuring t in combination with the client experience receiving degree, the pressure of the server end in the peak period can be effectively reduced, so that even if the server end appears flow control, it will not produce an avalanche effect, thereby quickly recovering.

[0128] It should be noted that the way in which the client terminal reduces the pressure of the server end can include a traffic peak shaving mode and a service fusing mode, when the traffic peak shaving mode is adopted, the feedback results obtained by the client terminal from the server include interface call timeout, interface being flow controlled, and interface response time exceeding a threshold, and when the service fusing mode is adopted, the feedback results obtained by the client terminal from the server include server technical failure. Since the server technical failure usually cannot be recovered in a short time, therefore, the minimum sending period corresponding to the service fusing mode needs to be set to be greater than the minimum sending period corresponding to the traffic peak shaving mode.

[0129] In Figure 3On the basis of the embodiment shown, in one embodiment, interception processing is performed on at least part of the service processing requests of the degraded object after the effective start time, and the target service request is obtained, including: when the service trigger request is received again within the minimum sending period after the effective start time, interception processing is performed on the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time, and the target service request is obtained. Wherein, the target service request is the request that is not intercepted in the service processing request of the degraded object within the minimum sending period after the effective start time, and the request is a valid request.

[0130] It can be understood that when the interception processing is performed on the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time, the preset proportion of the service processing requests is extracted from all the service processing requests of the degraded object within the minimum sending period after the effective start time, and the intercepted preset proportion of the service processing requests is an invalid request. Wherein, a random algorithm can be used to determine whether the service processing request of the degraded object within the minimum sending period after the effective start time is an invalid request.

[0131] Specifically, the interception processing is performed on the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time, and the target service request is obtained, including: controlling to generate a random number corresponding to the service processing request of the degraded object after the effective start time; according to the random number, the interception processing is performed on the preset proportion of the service processing requests of the degraded object within the minimum sending period after the effective start time, and the target service request is obtained.

[0132] Wherein, the random number corresponding to the service processing request of the degraded object after the effective start time can be generated by a random algorithm, and the preset proportion is a value between 0 and 100%. If it is necessary to intercept the preset proportion of the service processing requests of the degraded object, the service processing request corresponding to the random number when the generated random number is less than or equal to the preset proportion can be intercepted. It can be understood that for each user, when using the same interface of the client terminal at the same time, the same preset proportion of the requests can be randomly extracted for interception, and the fairness between users is ensured.

[0133] For example, the minimum sending period is represented by t, and the preset proportion of the requests generated within t seconds is p, which is discarded as an invalid request. Assuming that each client terminal generates n requests within t seconds, i.e. the number of invalid requests is n x p, and the valid requests sent are 1+n x (1-p), then the QPS of Q client terminals to the application system of the server side is valid The following formula is satisfied:

[0134] In one embodiment, after obtaining the target service request, the interception processing of the at least part of the service processing requests of the degraded object after the effective start time is performed, and the method further comprises the following steps: Figure 7 As shown in the figure, the method further comprises the following steps:

[0135] S702, when the feedback result of the target service request in the minimum degradation period after the triggering degradation time meets the service degradation condition, increasing the preset proportion and increasing the degradation level.

[0136] In the embodiment, the triggering degradation time is the time when the degraded object is determined, and when the feedback result of the target service request in the minimum degradation period after the triggering degradation time is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value, or server technical failure, it is determined that the service degradation condition is met.

[0137] In one embodiment, the preset proportion has a positive correlation with the degradation level, and the degradation level can be increased by increasing the preset proportion. The degradation degree after the degradation level is increased is greater than the current degradation degree. For example, if the degradation level is level one and the preset proportion is 30%, the degradation level can be increased to level two by increasing the preset proportion to 50%. If the degradation level is level two and the preset proportion is 50%, the degradation level can be increased to level three by increasing the preset proportion to 100%.

[0138] S704, determining the degraded object after the degradation level is increased.

[0139] In the embodiment, after the degradation level is increased by increasing the preset proportion, the number of the degraded objects of the client terminal after the degradation level is increased is greater than the number of the degraded objects after the degradation level is not increased, because the degradation degree after the degradation level is increased is greater than the current degradation degree. For example, taking the interface as the degraded object, when the degradation level is level one, the interface corresponding to the degradation level can include a normal interface, and the service processing request corresponding to the normal interface is intercepted by the client terminal. When the degradation level is level two, the interface corresponding to the degradation level can include a general interface and a normal interface, and the service processing request corresponding to the general interface and the normal interface is intercepted by the client terminal. It can be understood that the number of the service processing requests intercepted by the client terminal after the degradation level is increased is greater than the number of the service processing requests after the degradation level is not increased.

[0140] S706, updating the triggering degradation time.

[0141] The updated trigger degradation time is the time of determining the degradation object after increasing the degradation level. By updating the trigger degradation time, whether the preset proportion is increased to increase the degradation level can be continued to be judged next time. It should be noted that when the increased degradation level reaches the maximum degradation level set, if it is judged that the degradation level needs to be increased, the degradation level is not increased any more, but the maximum degradation level is used to intercept the business processing request. In an embodiment, the preset proportion corresponding to the maximum degradation level can be 100%, that is, all business processing requests of the degradation object in the minimum sending period after the effective start time are intercepted and processed, and the client terminal sends the business processing request after the minimum sending period to the server.

[0142] In summary, in the embodiment shown in Figure 7 In the embodiment shown in FIG. 8, when the feedback result of the target business request in the minimum degradation period after the trigger degradation time meets the business degradation condition, the preset proportion is increased, the degradation level is increased, the degradation object after the degradation level is increased is determined, and the trigger degradation time is updated. In this way, the client terminal can adaptively select a suitable degradation level and a degradation object corresponding to the degradation level according to the degree of abnormality of the server side. The client terminal can reduce the number of business requests sent to the server by intercepting and processing at least part of the business processing requests of the degradation object after the effective start time, so as to reduce the pressure of the server side and release the resources of the server side. In this way, the server can ensure the stability of the business operation on the client terminal side when processing the business processing request from the client terminal subsequently.

[0143] In an embodiment, after obtaining the target business request by intercepting and processing at least part of the business processing requests of the degradation object after the effective start time, the method further includes the following steps: Figure 8

[0144] S802, when the feedback result of the target business request in the minimum degradation period after the trigger degradation time does not meet the business degradation condition, the preset proportion is reduced, and the degradation level is reduced.

[0145] In the embodiment, the trigger degradation time is the time of determining the degradation object. When the feedback result of the target business request in the minimum degradation period after the trigger degradation time is interface call timeout, interface flow control, interface response time exceeding threshold or server technical failure, it is determined that the business degradation condition is not met.

[0146] ​In one embodiment, the preset ratio has a positive correlation with the degradation level, the degradation level can be reduced by reducing the preset ratio, and the degradation degree after the degradation level is reduced is less than the current degradation degree. For example, if the degradation level is three and the preset ratio is 100%, the degradation level can be reduced to two by reducing the preset ratio to 50%. If the degradation level is two and the preset ratio is 50%, the degradation level can be reduced to one by reducing the preset ratio to 30%.

[0147] S804, determining the degradation object after the degradation level is reduced.

[0148] In the present embodiment, after the degradation level is reduced by reducing the preset ratio, the number of the degradation objects of the client terminal after the degradation level is reduced is less than the number of the degradation objects after the degradation level is not reduced, because the degradation degree after the degradation level is reduced is less than the current degradation degree. For example, taking the interface as the degradation object, when the degradation level is two, the interface corresponding to the degradation level can include a general interface and a normal interface, and the client terminal intercepts the service processing request corresponding to the general interface and the normal interface. When the degradation level is one, the interface corresponding to the degradation level can include a normal interface, and the client terminal intercepts the service processing request corresponding to the normal interface. It can be understood that after the degradation level is reduced, the number of the interfaces intercepted by the client terminal is reduced, i.e., the number of the service processing requests corresponding to the interfaces intercepted by the client terminal is reduced.

[0149] S806, updating the trigger degradation time.

[0150] The updated trigger degradation time is the time of determining the degradation object after the degradation level is reduced. By updating the trigger degradation time, the preset ratio can be reduced to reduce the degradation level next time. It should be noted that when the reduced degradation level reaches the minimum degradation level set, if it is determined that the degradation level needs to be reduced, the degradation level is not reduced, but the minimum degradation level is used to intercept the service processing request. In one embodiment, the preset ratio corresponding to the minimum degradation level can be 0%, i.e., all the service processing requests of the degradation object in the minimum sending period after the effective start time are not intercepted, i.e., the service degradation processing of the client terminal is closed.

[0151] In summary, in the present embodiment, Figure 8In the embodiment shown, the trigger degradation time is updated by reducing the preset proportion, reducing the degradation level, and determining the degradation object after the degradation level is reduced when the feedback result of the target service request in the minimum degradation period after the trigger degradation time does not meet the service degradation condition. The client terminal can adaptively select a suitable degradation level and a degradation object corresponding to the degradation level according to the degree of abnormality of the server side. When the client terminal intercepts and processes at least part of the service processing requests of the degradation object after the effective start time, the client terminal can reduce the number of service requests sent to the server, thereby reducing the pressure on the server side and releasing the resources of the server side. In this way, the server can ensure the stability of the business operation on the client terminal side when processing the service processing requests from the client terminal in subsequent processing.

[0152] In combination with the above, as shown in Figure 9 A flowchart of a service degradation processing process is provided, and the specific process is as follows:

[0153] S901, after the user starts the application, when the user clicks or touches the operation of the business in the application, the corresponding business trigger request can be generated.

[0154] S902, the client terminal generates a corresponding service processing request in response to the business trigger request, and sends the service processing request to the server.

[0155] S903, the client terminal determines whether the service degradation condition is met according to the feedback result by obtaining the feedback result of the server executing the service processing request. Specifically, when the feedback result is interface call timeout, interface flow control, interface response time exceeding threshold, or server technical fault, it is determined that the service degradation condition is met, and then the degradation level and the degradation object corresponding to the degradation level are determined, the effective start time of the interceptor of the degradation object in the network request layer is obtained, and the trigger degradation time is recorded.

[0156] S904, when the business trigger request is received again in the minimum sending period after the effective start time, the random number x corresponding to the service processing request of the degradation object after the effective start time is generated. When the corresponding random number is greater than the preset proportion, the random number x corresponding to the service processing request is not intercepted, and the service processing request that is not intercepted is a valid request, that is, a target processing request.

[0157] S905, after the client terminal sends the target processing request to the server, the client terminal can determine whether the service degradation condition is met according to the feedback result returned by the server to the target processing request, and then increase or reduce the degradation level. Specifically, as described in S3 and S4:

[0158] S9061, when the client terminal determines that the service degradation condition is met according to the feedback result of the target processing request, and the current time when the client terminal determines that the service degradation condition is met meets the level upgrade condition, that is, the current time when the client terminal determines that the service degradation condition is met is within the minimum degradation period after the trigger degradation time, increase the preset proportion, increase the degradation level, and determine the degradation object after the degradation level is increased and update the trigger degradation time; after updating the trigger degradation time, the client terminal randomly delays for 1-2.5 seconds, displays a friendly prompt text through a pop-up window, and closes the pop-up window after a certain period of time. If the client terminal receives a service trigger request again after closing the pop-up window, it can return to S904 to perform the corresponding steps.

[0159] When the client terminal determines that the service degradation condition is met according to the feedback result of the target processing request, if the current time when the client terminal determines that the service degradation condition is met does not meet the level upgrade condition, that is, the current time when the client terminal determines that the service degradation condition is met is outside the minimum degradation period after the trigger degradation time, the client terminal can pop up a friendly prompt text and close the pop-up window after a certain period of time. If the client terminal receives a service trigger request again after closing the pop-up window, it can return to S2 to perform the corresponding steps.

[0160] S9062, when the client terminal determines that the service degradation condition is not met according to the feedback result of the target processing request, and the current time when the client terminal determines that the service degradation condition is not met meets the level degradation condition, that is, the current time when the client terminal determines that the service degradation condition is not met is within the minimum degradation period after the trigger degradation time, the preset proportion is reduced, the degradation level is reduced, and the degradation object after the degradation level is reduced is determined and the trigger degradation time is updated.

[0161] If the reduced degradation level is equal to the minimum degradation level, the client terminal clears the updated trigger degradation time and the effective start time, so that the previously recorded time does not affect the subsequent service degradation when the client terminal performs the service degradation process. It can be understood that when the reduced degradation level is equal to the minimum degradation level, it means that the server side responds normally, so the server side can normally return the service processing result to the client terminal, so that the client terminal can display the service processing result.

[0162] When the client terminal determines that the service degradation condition is not met according to the feedback result of the target processing request, if the current time when the client terminal determines that the service degradation condition is not met does not meet the level degradation condition, that is, the current time when the client terminal determines that the service degradation condition is met is outside the minimum degradation period after the trigger degradation time, it means that the server side responds normally, so the server side can normally return the service processing result to the client terminal, so that the client terminal can display the service processing result.

[0163] Combination Figure 9 It should be noted that, after adding or reducing the downgrade level, if the client terminal responds to the service trigger request again, the client terminal can perform the corresponding service interception process based on the added or reduced downgrade level.

[0164] Based on the above, it's important to note that when performing service degradation processing, it's crucial to ensure fairness between client terminals calling server-side interfaces and the fairness of service degradation processing across different client terminals. Fairness between interfaces means that interfaces with smooth responses should not be affected by interfaces with abnormal responses and thus not be excessively degraded. To ensure fairness between client terminals calling server-side interfaces, when a client terminal calls different interfaces on the server, it can perform corresponding service degradation processing on different interfaces according to their respective effective start times and degradation trigger times, thereby preventing smooth-responding interfaces from being affected by interfaces with abnormal responses. To ensure fairness in service degradation processing across different client terminals, the method described above for generating random numbers using a random algorithm allows for the random sampling and discarding of service processing requests at the same preset ratio for each user using the same interface on the mobile client at the same time, ensuring fairness among different client terminals.

[0165] In light of the above, it should be noted that the service degradation processing method proposed in this application can be integrated into a Software Development Kit (SDK). After installation on the client terminal, the client terminal can automatically and adaptively enable or disable service degradation. Furthermore, an overall switch can be set to control the service degradation processing on the client terminal. When the overall switch is on, the client terminal can adaptively perform service degradation processing.

[0166] Furthermore, the method proposed in this application fills the gap in technology for business degradation from the client terminal, solving the problem that client terminals can only passively respond and experience is out of control when server-side anomalies or congestion occur. By dynamically sensing the server-side status based on the interaction process between the client terminal and the server, the client terminal can adaptively select an appropriate degradation level to proactively discard edge requests, reduce server pressure, and ensure the normal and efficient operation of core businesses. At the same time, since client terminals are usually in single-user online mode, even if degradation levels are set according to the importance of interfaces, compared to the business degradation process on the server side, there is no secondary performance burden caused by this, and fairness issues are less likely to arise.

[0167] It should be understood that although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.

[0168] Based on the same inventive concept, the embodiments of the present application also provide a service degradation processing apparatus for implementing the service degradation processing method described above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so the specific limitations in one or more service degradation processing apparatus embodiments provided below can refer to the limitations of the service degradation processing method described above, which will not be repeated here.

[0169] In one embodiment, as shown in Figure 10 a service degradation processing apparatus is provided, comprising: a first determination module 1002, a second determination module 1004, an acquisition module 1006, and a communication module 1008, wherein:

[0170] The first determination module 1002 is configured to determine the degradation object when it is determined that the service degradation condition is met according to the feedback result of the server returned for the executed service processing request.

[0171] The second determination module 1004 is configured to determine the interceptor of the degradation object at the network request layer and the effective start time of the interceptor.

[0172] The acquisition module 1006 is configured to intercept and process at least part of the service processing request of the degradation object after the effective start time, and acquire the target service request.

[0173] The communication module 1008 is configured to send the target service request to the server.

[0174] In one embodiment, the first determination module is further configured to:

[0175] send the service processing request to the server in response to the service triggering request;

[0176] acquire the feedback result of the server executing the service processing request;

[0177] When the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold, or server technical failure, it is determined that a service degradation condition is met, and a degradation level is determined;

[0178] The degradation object corresponding to the degradation level is obtained.

[0179] In an embodiment, the obtaining module is further configured to:

[0180] When a service trigger request is received again within a minimum sending period after the effective start time, all service processing requests of the degradation object within the minimum sending period after the effective start time are intercepted to obtain a target service request; the target service request is a service processing request of the degradation object after the minimum sending period.

[0181] In an embodiment, the obtaining module is further configured to:

[0182] When a service trigger request is received again within a minimum sending period after the effective start time, a preset proportion of service processing requests of the degradation object within the minimum sending period after the effective start time are intercepted to obtain a target service request.

[0183] In an embodiment, the apparatus further includes an adjusting module configured to:

[0184] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time meets a service degradation condition, a preset proportion is increased, and a degradation level is increased; the trigger degradation time is a time at which the degradation object is determined; a degradation degree after the degradation level is increased is greater than a current degradation degree;

[0185] A degradation object after the degradation level is increased is determined.

[0186] The trigger degradation time is updated.

[0187] In an embodiment, the apparatus further includes an adjusting module configured to:

[0188] When a feedback result of the target service request within a minimum degradation period after a trigger degradation time does not meet a service degradation condition, a preset proportion is decreased, and a degradation level is decreased; a degradation degree after the degradation level is decreased is less than a current degradation degree.

[0189] A degradation object after the degradation level is decreased is determined.

[0190] The trigger degradation time is updated.

[0191] In an embodiment, the obtaining module is further configured to:

[0192] control a random number corresponding to a service processing request of the degradation object in a minimum sending period after the effective start time;

[0193] According to the random number, intercept a preset proportion of service processing requests of the degradation object in a minimum sending period after the effective start time, and obtain a target service request.

[0194] Each module in the service degradation processing apparatus can be implemented by software, hardware, and a combination thereof, in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0195] In one embodiment, a computer device, which can be a client terminal, has an internal structure diagram as shown in Figure 11 The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (near field communication), or other technologies. The computer program is executed by the processor to implement a service degradation processing method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. In this application, the display screen can be used to display a coupon page, an order query page, a login page, and the like. The input device of the computer device can be a touch layer overlaid on the display screen, or can be a key, trackball, or touchpad arranged on the shell of the computer device. In addition, the input device can be an external keyboard, touchpad, or mouse, and the like.

[0196] Those skilled in the art can understand that Figure 11 The structure shown in the above-mentioned figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0197] In one embodiment, a client terminal is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in each method embodiment.

[0198] In an embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.

[0199] In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.

[0200] A person of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium and can include the processes of the above method embodiments when executed. Any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, and the like. The volatile memory can include a random access memory (RAM) or an external cache memory, and the like. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), and the like. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, and the like, but is not limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, and the like, but is not limited thereto.

[0201] Any combination of the technical features of the above embodiments can be made. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0202] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent of the present application. It should be noted that, for those of ordinary skill in the art, several modifications 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 present application should be subject to the appended claims.

Claims

1. A service degradation handling method, characterized by, The method applied to a client terminal comprises: sending a service processing request to a server in response to a service trigger request; obtaining a feedback result of the server executing the service processing request; determining that a service degradation condition is met and a degradation level when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value or server technical failure; obtaining a degradation object corresponding to the degradation level; determining an interceptor of the degradation object at a network request layer and an effective start time of the interceptor; intercepting and processing at least part of service processing requests of the degradation object after the effective start time to obtain a target service request; sending the target service request to the server; wherein the intercepting and processing at least part of service processing requests of the degradation object after the effective start time to obtain a target service request comprises: intercepting and processing all service processing requests of the degradation object within a minimum sending period after the effective start time to obtain a target service request when the service trigger request is received again within the minimum sending period after the effective start time, wherein the target service request is a service processing request of the degradation object after the minimum sending period, and a minimum sending period corresponding to the server technical failure is greater than minimum sending periods corresponding to the interface call timeout, the interface being flow controlled or the interface response time exceeding the threshold value.

2. The method of claim 1, wherein, The intercepting and processing at least part of service processing requests of the degradation object after the effective start time to obtain a target service request comprises: intercepting and processing service processing requests of a preset proportion of the degradation object within a minimum sending period after the effective start time to obtain a target service request when the service trigger request is received again within the minimum sending period after the effective start time.

3. The method of claim 2, wherein, The method further comprises: increasing the preset proportion and the degradation level when a feedback result of the target service request within a minimum degradation period after a trigger degradation time meets the service degradation condition, the trigger degradation time being a time when the degradation object is determined, and a degradation degree after the degradation level is increased being greater than a current degradation degree; determining a degradation object after the degradation level is increased; updating the trigger degradation time.

4. The method of claim 2, wherein, The method further comprises: decreasing the preset proportion and the degradation level when a feedback result of the target service request within a minimum degradation period after a trigger degradation time does not meet the service degradation condition, a degradation degree after the degradation level is decreased being less than a current degradation degree; determining a degradation object after the degradation level is decreased; updating the trigger degradation time.

5. The method of claim 4, wherein, The intercepting and processing service processing requests of a preset proportion of the degradation object within a minimum sending period after the effective start time to obtain a target service request comprises: controlling generation of a random number corresponding to a service processing request of the degradation object within the minimum sending period after the effective start time; According to the random number, intercept processing is performed on preset proportion of service processing requests of the degraded object within a minimum sending period after the validity start time, and a target service request is obtained.

6. The method of claim 5, wherein, The intercept processing performed on the preset proportion of service processing requests of the degraded object within the minimum sending period after the validity start time according to the random number to obtain the target service request comprises: For the preset proportion of service processing requests of the degraded object within the minimum sending period after the validity start time, the service processing request corresponding to the random number when the random number is less than or equal to the preset proportion is intercepted to obtain the target service request.

7. The method of claim 3, wherein, The method further comprises: Based on a positive correlation between the preset proportion and the degradation level, the preset proportion is increased.

8. A service degradation handling apparatus characterized by comprising: The device is applied to a client terminal and comprises: A first determination module is configured to respond to a service trigger request, send a service processing request to a server, obtain a feedback result of the server executing the service processing request, determine that a service degradation condition is met and a degradation level when the feedback result is interface call timeout, interface being flow controlled, interface response time exceeding a threshold value or server technical failure, and obtain a degraded object corresponding to the degradation level. A second determination module is configured to determine an interceptor of the degraded object at a network request layer and a validity start time of the interceptor. An obtaining module is configured to, when the service trigger request is received again within a minimum sending period after the validity start time, intercept all service processing requests of the degraded object within the minimum sending period after the validity start time, and obtain a target service request; the target service request is a service processing request of the degraded object after the minimum sending period, and a minimum sending period corresponding to the server technical failure is greater than minimum sending periods corresponding to the interface call timeout, the interface being flow controlled or the interface response time exceeding the threshold value. A communication module is configured to send the target service request to the server.

9. The apparatus of claim 8, wherein, The obtaining module is further configured to: When the service trigger request is received again within the minimum sending period after the validity start time, intercept processing is performed on preset proportion of service processing requests of the degraded object within the minimum sending period after the validity start time, and a target service request is obtained.

10. The apparatus of claim 9, wherein, The device further comprises an adjusting module, which is configured to: When a feedback result of the target service request within a minimum degradation period after a trigger degradation time meets a service degradation condition, increase the preset proportion and the degradation level; the trigger degradation time is a time when the degraded object is determined; a degradation degree after the degradation level is increased is greater than a current degradation degree. Determine a degraded object after the degradation level is increased. Update the trigger degradation time.

11. The apparatus of claim 9, wherein, The device further comprises an adjusting module, which is further configured to: When a feedback result of the target service request within a minimum degradation period after a trigger degradation time does not meet a service degradation condition, decrease the preset proportion and the degradation level. The degradation degree after the degradation level is reduced is less than the current degradation degree; determining a degradation object after the degradation level is reduced; updating the trigger degradation time.

12. The apparatus of claim 9, wherein, The acquisition module is further configured to: control a random number corresponding to a service processing request of the degradation object within a minimum sending period after the effective start time; According to the random number, the target service request is obtained by intercepting a preset proportion of service processing requests of the degradation object within the minimum sending period after the effective start time.

13. The apparatus of claim 12, wherein, The acquisition module is further configured to: For a preset proportion of service processing requests of the degradation object within the minimum sending period after the effective start time, the target service request is obtained by intercepting the service processing request corresponding to the random number when the random number is less than or equal to the preset proportion.

14. The apparatus of claim 10, wherein, The adjustment module is further configured to: Based on the positive correlation between the preset proportion and the degradation level, the preset proportion is increased.

15. A client terminal comprising a memory and a processor, said memory storing a computer program, characterized in that, The processor executes the computer program to realize the steps of the method in any one of claims 1 to 7.

16. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 7.

17. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Service processing method and system

    CN107302459A

  • Access amount control method and device

    CN108512768A