Service request management method and device, computer equipment and readable storage medium
By dynamically adjusting the maximum allowable number of business requests in the cloud management platform and attenuating according to the error rate of business requests, the problem of network congestion risks and inflexible management caused by fixed number of requests in traditional technology is solved, and more efficient business request management is achieved.
Patent Information
- Application Number
- CN202411759646.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The fixed number of service requests settings in traditional cloud management platforms may cause users to make too many retry requests when network or service failures, increasing the risk of network congestion, and inflexible management.
By obtaining the error rate threshold and request cycle of the service request, the business request error rate of the target user is calculated, and the attenuation processing of the number of requests threshold is performed based on the error rate, and the maximum allowable request number of the next cycle is dynamically adjusted to avoid excessive requests when the error rate is too high.
Improves flexibility in business request management, reduces the number of business requests when the error rate is high, and reduces the risk of network congestion.
Smart Images

Figure CN119652972A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud platform technology, and in particular to a service request management method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of cloud platform technology, users can initiate business requests based on the cloud management platform. After receiving the business requests, the cloud management platform will process them and deploy corresponding services and businesses.
[0003] In traditional technology, a fixed number of requests is generally preset for each time period in the cloud management platform. However, once a problem occurs with the application service or the network in the cloud management platform, the use of a fixed number of requests may cause users to retry too many business requests, increase the risk of network congestion, and result in inflexible business request management. Summary of the invention
[0004] Based on this, it is necessary to provide a business request management method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the flexibility of business request management in response to the above technical problems.
[0005] In a first aspect, the present application provides a service request management method, comprising:
[0006] Obtain the request quantity threshold, request error rate threshold, and request cycle configured for business requests initiated based on the cloud management platform;
[0007] In a case where it is determined that the current cycle ends based on the request cycle, determining a first request error rate of multiple service requests initiated by the target user in a cycle previous to the current cycle, and a second request error rate of multiple service requests initiated by the target user in the current cycle;
[0008] If the second request error rate is greater than the error rate threshold and the first request error rate, performing attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period;
[0009] The update quantity threshold is determined as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the subsequent period.
[0010] In one embodiment, performing attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain the update quantity threshold of the next cycle of the current cycle includes:
[0011] Obtaining historical request error rates of respective multiple historical periods before the previous period;
[0012] An error rate enhancement period group is determined according to a numerical relationship between each of the historical request error rates and the first request error rate; the error rate enhancement period group includes the current period and a period before the current period; the error rate enhancement period group includes at least two time-continuous request periods, and the request error rate of any enhancement period in the error rate enhancement period group except the first request period is greater than the request error rate of the period before the enhancement period;
[0013] The request quantity threshold is attenuated according to the error rate enhancement period group, the second request error rate, and the first request error rate to obtain an update quantity threshold of a period subsequent to the current period.
[0014] In one of the embodiments, attenuating the request quantity threshold according to the error rate enhancement period group, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period includes:
[0015] Determining a decay factor based on the number of request cycles included in the error rate enhancement cycle group and the first number of requests corresponding to the first request cycle in the error rate enhancement cycle group;
[0016] The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
[0017] In one embodiment, the method further comprises:
[0018] If the second request error rate is greater than the error rate threshold and less than the first request error rate, an error rate reduction cycle group is determined according to a numerical relationship between each of the historical request error rates and the first request error rate; the error rate reduction cycle group includes the current cycle and a cycle before the current cycle; the error rate reduction cycle group includes at least two time-continuous request cycles, and the request error rate of any reduction cycle in the error rate reduction cycle group except the first request cycle is less than the request error rate of the cycle before the reduction cycle;
[0019] The request quantity threshold is attenuated according to the error rate attenuation cycle group, the second request error rate, and the first request error rate to obtain an update quantity threshold of a period subsequent to the current period.
[0020] In one embodiment, performing attenuation processing on the request quantity threshold according to the error rate attenuation cycle group, the second request error rate, and the first request error rate to obtain the update quantity threshold of the next cycle after the current cycle includes:
[0021] Determining a decay factor based on the number of request cycles included in the error rate attenuation cycle group and the first number of requests corresponding to the first request cycle in the error rate attenuation cycle group;
[0022] The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
[0023] In one embodiment, the method further comprises:
[0024] If the second request error rate is less than the error rate threshold, determining the request quantity threshold as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next period;
[0025] If the second request error rate is greater than the error rate threshold and equal to the first request error rate, the maximum allowed number of requests for the current cycle is determined as the maximum allowed number of requests for business requests initiated by the target user based on the cloud management platform in the next cycle.
[0026] In a second aspect, the present application also provides a service request management device, including:
[0027] A data acquisition module is used to obtain a request quantity threshold, a request error rate threshold, and a request cycle configured for a business request initiated based on a cloud management platform;
[0028] an error rate determination module, configured to determine, when determining that a current cycle ends based on the request cycle, a first request error rate of a plurality of service requests initiated by a target user in a cycle previous to the current cycle, and a second request error rate of a plurality of service requests initiated by the target user in the current cycle;
[0029] an attenuation processing module, configured to, if the second request error rate is greater than the error rate threshold and the first request error rate, perform attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period;
[0030] The request quantity determination module is used to determine the update quantity threshold as the maximum allowed request quantity of the business request initiated by the target user based on the cloud management platform in the subsequent period.
[0031] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0033] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0034] The above-mentioned business request management method, apparatus, computer equipment, computer-readable storage medium and computer program product obtain the request quantity threshold, request error rate threshold and request cycle configured for the business request initiated by the cloud management platform, and can determine the specific situation of the business request configuration. When the end of the current cycle is determined based on the request cycle, the first request error rate of multiple business requests initiated by the target user in the cycle before the current cycle and the second request error rate of multiple business requests initiated by the target user in the current cycle are determined. The request error rate of each of the current cycle and the cycle before the current cycle can be determined. If the second request error rate If the rate is greater than the error rate threshold and the first request error rate, it indicates that the error rate of the current cycle is relatively high and higher than the error rate of the previous cycle. Therefore, it is necessary to attenuate the request quantity threshold according to the second request error rate and the first request error rate to obtain the update quantity threshold of the next cycle after the current cycle. The update quantity threshold is determined as the maximum allowed number of business requests initiated by the target user based on the cloud management platform in the next cycle, thereby adaptively reducing the maximum allowed number of requests for the next cycle after the current cycle to avoid too many business requests initiated when the error rate is too high, which is conducive to improving the flexibility of business request management. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 An application environment diagram of a business request management method in an embodiment;
[0037] Figure 2 A schematic diagram of a process flow of a service request management method in an embodiment;
[0038] Figure 3 A schematic diagram of a change in a request error rate of a service request management method in an embodiment;
[0039] Figure 4 A flowchart of a business request management step in an embodiment;
[0040] Figure 5 A flowchart of the first stage of a service request management method in one embodiment;
[0041] Figure 6 A schematic diagram of the second phase of a service request management method in one embodiment;
[0042] Figure 7 A flowchart of the third stage of a service request management method in one embodiment;
[0043] Figure 8 A flowchart of a service request management method in another embodiment;
[0044] Fig. 9 is a structural block diagram of a service request management device in one embodiment;
[0045] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The service request management method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the cloud management platform 104 through the network. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The cloud management platform 104 is a platform for centralized management of cloud resources and services. It provides comprehensive monitoring, deployment, configuration and management functions for the cloud environment. The cloud management platform 104 is usually deployed on the server side to support large-scale, high availability and scalability requirements. Specifically, in the process of business request management, the terminal can obtain the request quantity threshold, request error rate threshold and request cycle configured for the business request initiated by the cloud management platform 104; when the end of the current cycle is determined based on the request cycle, the first request error rate of multiple business requests initiated by the target user in the previous cycle of the current cycle and the second request error rate of multiple business requests initiated by the target user in the current cycle are determined; if the second request error rate is greater than the error rate threshold and the first request error rate, the request quantity threshold is attenuated according to the second request error rate and the first request error rate to obtain the updated quantity threshold for the next cycle of the current cycle; the updated quantity threshold is determined as the maximum allowed request number of business requests initiated by the target user in the next cycle based on the cloud management platform 104.
[0048] In an exemplary embodiment, Figure 2 As shown, a business request management method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps S202 to S208. Among them:
[0049] Step S202, obtaining a request quantity threshold, a request error rate threshold, and a request period configured for a business request initiated based on a cloud management platform.
[0050] Among them, the cloud management platform is a platform for centralized management of cloud resources and services. It provides comprehensive monitoring, deployment, configuration and management functions for the cloud environment. The cloud management platform is usually deployed on the server side to support large-scale, high availability and scalability requirements. A business request refers to a requirement or instruction issued by an entity (such as an individual, organization or system) to another entity to perform a specific business operation or obtain a certain business service. The request quantity threshold refers to the maximum number limit set for business requests in a certain system, service or application. The request error rate threshold refers to the maximum error rate allowed for business requests under specific time or conditions. The request cycle refers to a preset request time period. For example, a request cycle can contain multiple time windows. Specifically, the overall duration of the time period is not limited here.
[0051] Specifically, after the user initiates a service request based on the cloud management platform, the terminal needs to obtain the request quantity threshold, request error rate threshold and request period configured for the service request to determine the specific circumstances of the service request. It can be understood that the action of the terminal obtaining the request quantity threshold, request error rate threshold and request period configured for the service request initiated based on the cloud management platform can be active or passive. For example, the request quantity threshold configured for the service request initiated based on the cloud management platform obtained by the terminal can be 10, 20 times, etc., the request error rate threshold can be 5%, 6%, etc., and the request period can be ten minutes, twenty minutes, etc.
[0052] Step S204, when the current cycle is determined to end based on the request cycle, determine the first request error rate of multiple service requests initiated by the target user in the cycle before the current cycle and the second request error rate of multiple service requests initiated by the target user in the current cycle.
[0053] The current cycle refers to the cycle ending at the current time. The target user refers to the user who initiates the service request. The first request error rate refers to the request error rate of multiple service requests initiated by the target user in the cycle before the current cycle. The second request error rate refers to the request error rate of multiple service requests initiated by the target user in the current cycle.
[0054] Specifically, Figure 3As shown, in the case of determining that the current cycle ends based on the request cycle, the terminal can obtain the number of requests and the number of request errors for the service requests initiated by the target user in the cycle before the current cycle, determine the first request error rate of multiple service requests initiated by the target user in the cycle before the current cycle based on the number of requests and the number of request errors, and obtain the number of requests and the number of request errors for the service requests initiated by the target user in the current cycle, and determine the second request error rate of multiple service requests initiated by the target user in the current cycle based on the number of requests and the number of request errors.
[0055] Step S206: If the second request error rate is greater than the error rate threshold and the first request error rate, then the request quantity threshold is attenuated according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
[0056] The update quantity threshold refers to the request quantity threshold after a certain update correction.
[0057] Specifically, after determining the first request error rate and the second request error rate, the terminal can first determine the numerical value between the second request error rate and the error rate threshold. If the second request error rate is less than the error rate threshold, the request quantity threshold is set to the update quantity threshold of the next cycle after the current cycle. If the second request error rate is greater than the error rate threshold and the first request error rate, it means that the request error rate of the current cycle is increasing compared with the previous cycle, and the second request error rate of the current cycle has exceeded the request error rate threshold, and intervention is required. Therefore, the request quantity threshold needs to be attenuated according to the second request error rate and the first request error rate to obtain the update quantity threshold of the next cycle after the current cycle.
[0058] In a specific embodiment, the terminal can obtain the historical request error rates of each of the multiple historical periods before the previous period, and determine the error rate enhancement period group according to the numerical relationship between each historical request error rate and the first request error rate, wherein the error rate enhancement period group includes the current period and the period before the current period, the error rate enhancement period group includes at least two time-continuous request periods, and the request error rate of any enhancement period other than the first request period in the error rate enhancement period group is greater than the request error rate of the period before the enhancement period, and then, according to the error rate enhancement period group, the second request error rate and the first request error rate, the request quantity threshold is attenuated to obtain the update quantity threshold of the period after the current period. In another specific embodiment, the terminal can also establish an attenuation processing model, and use the second request error rate and the first request error rate as inputs of the attenuation processing model, and the output obtained is the update quantity threshold of the period after the current period.
[0059] Step S208: The update quantity threshold is determined as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next cycle.
[0060] The maximum number of allowed requests refers to the maximum number of business requests that the cloud management platform can process or accept in the next cycle.
[0061] Specifically, after determining the update quantity threshold, the terminal can determine the update quantity threshold as the maximum allowed number of business requests initiated by the target user based on the cloud management platform in the next cycle. That is, in the next cycle, the user can only initiate business requests based on the cloud management platform that are less than or equal to the maximum allowed number of requests.
[0062] The above-mentioned service request management method obtains the request quantity threshold, request error rate threshold and request cycle configured for the service request initiated based on the cloud management platform, and can determine the specific situation of the service request configuration. When the end of the current cycle is determined based on the request cycle, the first request error rate of multiple service requests initiated by the target user in the previous cycle of the current cycle and the second request error rate of multiple service requests initiated by the target user in the current cycle are determined, and the request error rate of each of the current cycle and the previous cycle of the current cycle can be determined. If the second request error rate is greater than the error rate threshold and the first request error rate, it is characterized that the error rate of the current cycle is relatively high and higher than the error rate of the previous cycle. Therefore, it is necessary to perform attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain the updated quantity threshold of the next cycle of the current cycle, and determine the updated quantity threshold as the maximum allowed request quantity of the service request initiated by the target user based on the cloud management platform in the next cycle, so as to adaptively reduce the maximum allowed request quantity of the next cycle of the current cycle to avoid the situation where the number of service requests initiated is too large when the error rate is too high, which is conducive to improving the flexibility of service request management.
[0063] In an exemplary embodiment, the request quantity threshold is attenuated according to the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current period, including: obtaining the historical request error rate of each of the multiple historical periods before the previous period; determining the error rate enhancement cycle group according to the numerical relationship between each historical request error rate and the first request error rate; and attenuating the request quantity threshold according to the error rate enhancement cycle group, the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current period.
[0064] Among them, the historical cycle refers to the request cycles that have been carried out except the current cycle and the cycle before the current cycle. The historical request error rate is the request error rate corresponding to the historical cycle. The error rate enhancement cycle group includes the current cycle and the cycle before the current cycle; the error rate enhancement cycle group includes at least two time-continuous request cycles, and the request error rate of any enhancement cycle in the error rate enhancement cycle group except the first request cycle is greater than the request error rate of the cycle before the enhancement cycle.
[0065] Specifically, if the request error rate increases, the maximum allowed number of requests for the next cycle needs to be adaptively reduced. If the request error rate decreases, the maximum allowed number of requests for the next cycle needs to be adaptively increased. Therefore, when the second request error rate is greater than the error rate threshold and the first request error rate, the terminal can first obtain the historical request error rates of multiple historical cycles before the previous cycle, determine the historical request situation corresponding to the historical cycle, and then determine the error rate enhancement cycle group based on the numerical relationship between each historical request error rate and the first request error rate, thereby determining the continuous error rate enhancement situation, and finally, based on the error rate enhancement cycle group, the second request error rate and the first request error rate, the request quantity threshold is attenuated to obtain the updated quantity threshold for the next cycle of the current cycle.
[0066] In this embodiment, based on the numerical relationship between each historical request error rate and the first request error rate, the error rate enhancement period group is determined, and the continuous enhancement of the error rate corresponding to the current period can be determined, and then the update quantity threshold of the next period after the current period is determined. The maximum allowed request number of the business request in the next period can be flexibly adjusted according to the change of the error rate.
[0067] In an exemplary embodiment, the request quantity threshold is attenuated according to the error rate enhancement cycle group, the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current cycle, including: determining an attenuation factor based on the period number of request cycles included in the error rate enhancement cycle group and the first request number corresponding to the first request cycle in the error rate enhancement cycle group; and attenuating the request quantity threshold according to the attenuation factor, the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current cycle.
[0068] The first request quantity refers to the maximum allowed request quantity corresponding to the first request period in the error rate enhancement period group. In this embodiment, the principle of updating the maximum allowed request quantity is based on exponential function decay. As shown in the following formula:
[0069]
[0070] Where ml is the request quantity threshold, t represents the attenuation factor, which starts from 1 and gradually increases by 1 until s, p1 represents the first cycle request error rate corresponding to the first p consecutive time windows, pn represents the second request error rate corresponding to the nth p consecutive time windows, and n takes a value greater than 1, 2, 3, 4, 5..., and p1 and pn are not 0.
[0071] Specifically, the terminal can determine the number of consecutive times of error rate enhancement according to the number of cycles including the request cycle in the error rate enhancement cycle group, and then determine the first attenuation factor corresponding to the first request cycle according to the first request number corresponding to the first request cycle in the error rate enhancement cycle group, perform numerical calculation based on the first attenuation factor and the consecutive times to determine the attenuation factor t, and finally perform attenuation processing on the request quantity threshold ml according to the attenuation factor t, the second request error rate pn, and the first cycle request error rate p1 to determine the update quantity threshold of the next cycle of the current cycle. It can be understood that when the user only makes service requests for two request cycles, the first cycle request error rate is the first request error rate. When the user makes service requests for more than two request cycles, it is necessary to actively obtain the first cycle request error rate.
[0072] In this embodiment, the attenuation factor is determined based on the number of request cycles included in the error rate enhancement cycle group and the first request number corresponding to the first request cycle in the error rate enhancement cycle group. Finally, the update quantity threshold of the subsequent cycle is determined according to the attenuation factor. The update quantity threshold of the subsequent cycle can be flexibly and adaptively modified based on the update changes of the request error rate, thereby improving the flexibility of business request management.
[0073] In an exemplary embodiment, the service request management method also includes: if the second request error rate is greater than the error rate threshold and less than the first request error rate, determining the error rate reduction cycle group based on the numerical relationship between each historical request error rate and the first request error rate; the error rate reduction cycle group includes the current cycle and the previous cycle of the current cycle.
[0074] Among them, the error rate attenuation cycle group includes at least two time-continuous request cycles, and the request error rate of any attenuation cycle in the error rate attenuation cycle group except the first request cycle is less than the request error rate of the previous cycle of the attenuation cycle; according to the error rate attenuation cycle group, the second request error rate and the first request error rate, the request quantity threshold is attenuated to obtain the update quantity threshold of the next cycle of the current cycle.
[0075] Specifically, if the request error rate decreases, the maximum allowed number of requests for the next cycle needs to be adaptively increased; if the request error rate increases, the maximum allowed number of requests for the next cycle needs to be adaptively reduced. Therefore, when the second request error rate is greater than the error rate threshold and less than the first request error rate, the terminal can determine the error rate reduction cycle group based on the numerical relationship between each historical request error rate and the first request error rate, thereby determining the continuous error rate reduction situation, and finally, according to the error rate reduction cycle group, the second request error rate and the first request error rate, the request number threshold is attenuated to obtain the update number threshold of the next cycle of the current cycle. It can be understood that the request number threshold is the maximum allowed number of requests corresponding to each request cycle, and the adjusted update number threshold can only be less than or equal to the request number threshold. Therefore, even if the request error rate is decreasing, the request number threshold is still being attenuated, but the attenuation factor will decrease. Correspondingly, in the exponential decay function, the update number threshold will increase.
[0076] In this embodiment, based on the numerical relationship between each historical request error rate and the first request error rate, the error rate reduction period group is determined, and the continuous reduction of the error rate corresponding to the current period can be determined, and then the update quantity threshold of the next period after the current period is determined. The maximum allowed request number of business requests in the next period can be flexibly adjusted according to the change in the error rate.
[0077] In an exemplary embodiment, the request quantity threshold is attenuated according to the error rate attenuation cycle group, the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current cycle, including: determining an attenuation factor based on the period number of request cycles included in the error rate attenuation cycle group and the first request number corresponding to the first request cycle in the error rate attenuation cycle group; and attenuating the request quantity threshold according to the attenuation factor, the second request error rate and the first request error rate to obtain an updated quantity threshold for a period subsequent to the current cycle.
[0078] Specifically, the terminal can determine the number of consecutive times of error rate reduction according to the number of cycles including the request cycle in the error rate reduction cycle group, and then determine the first attenuation factor corresponding to the first request cycle according to the first request number corresponding to the first request cycle in the error rate reduction cycle group, perform numerical calculation based on the first attenuation factor and the consecutive times to determine the attenuation factor t, and finally perform attenuation processing on the request quantity threshold ml according to the attenuation factor t, the second request error rate pn, and the first cycle request error rate p1 to determine the update quantity threshold of the next cycle of the current cycle. It can be understood that when the user only makes service requests for two request cycles, the first cycle request error rate is the first request error rate. When the user makes service requests for more than two request cycles, it is necessary to actively obtain the first cycle request error rate.
[0079] In this embodiment, the attenuation factor is determined based on the number of request cycles included in the error rate attenuation cycle group and the first request number corresponding to the first request cycle in the error rate attenuation cycle group. Finally, the update quantity threshold of the subsequent cycle is determined according to the attenuation factor. The update quantity threshold of the subsequent cycle can be flexibly and adaptively modified based on the update changes of the request error rate, thereby improving the flexibility of business request management.
[0080] In an exemplary embodiment, the business request management method also includes: if the second request error rate is less than the error rate threshold, the request quantity threshold is determined as the maximum allowed number of requests for business requests initiated by the target user in the next period based on the cloud management platform; if the second request error rate is greater than the error rate threshold and equal to the first request error rate, the maximum allowed number of requests for the current period is determined as the maximum allowed number of requests for business requests initiated by the target user in the next period based on the cloud management platform.
[0081] Specifically, if the second request error rate is less than the error rate threshold, it is considered that the second request error rate is low and there is no need to change the maximum allowed number of requests for the next cycle. Therefore, the request number threshold is determined as the maximum allowed number of requests for business requests initiated by the target user in the next cycle based on the cloud management platform; if the second request error rate is greater than the error rate threshold and is equal to the first request error rate, the table request error rate is relatively stable, and the maximum allowed number of requests for the current cycle can be determined as the maximum allowed number of requests for business requests initiated by the target user in the next cycle based on the cloud management platform.
[0082] In this embodiment, the maximum allowed number of requests in the next cycle is flexibly changed according to the change of the second request error rate, which can improve the flexibility of service request management.
[0083] In a specific embodiment, Figure 4 As shown, after determining the second request error rate and the first request error rate, the specific steps performed are:
[0084] Step S401, determining whether the second request error rate is greater than an error rate threshold;
[0085] If not, executing step S402, determining the request quantity threshold as the maximum allowed request quantity of the service request initiated by the target user based on the cloud management platform in the next cycle;
[0086] If yes, execute step S403 to determine whether the second request error rate is greater than the first request error rate;
[0087] If not, execute step S404 to obtain the historical request error rates of each of the multiple historical periods before the previous period; determine the error rate reduction period group according to the numerical relationship between each historical request error rate and the first request error rate; perform attenuation processing on the request quantity threshold according to the error rate reduction period group, the second request error rate and the first request error rate to obtain the update quantity threshold of the next period of the current period;
[0088] If so, execute step S405 to obtain the historical request error rate of each of the multiple historical periods before the previous period; determine the error rate enhancement period group based on the numerical relationship between each historical request error rate and the first request error rate; and attenuate the request quantity threshold based on the error rate enhancement period group, the second request error rate and the first request error rate to obtain the update quantity threshold of the next period after the current period.
[0089] In a specific embodiment, a service request management method in a specific implementation scenario is provided, including:
[0090] Redis statistical error rate method:
[0091] S01. Count the total number of requests in a fixed time interval;
[0092] S02. Count the total number of request errors at fixed time intervals;
[0093] S03. Error rate ev = error / total;
[0094] Overall process:
[0095] S01. Request quantity threshold ml;
[0096] S02. Minimum number of requests nl;
[0097] S03. Request error rate threshold el;
[0098] S04. Maximum allowed number of requests newm;
[0099] S05. The error rate of the first time window is denoted by ev1, and the error rate of the pth time window is denoted by evp;
[0100] S06. After the cloud management platform receives the user request, the terminal queries Redis and calculates the average error rate of the current p consecutive time windows aev=(ev1+ev2+ev3+...+evp) / p;
[0101] S07. If the average error rate aev = 0, directly set newm = ml;
[0102] S08. Determine the relationship between the second request error rate and the request error rate threshold el. If it is less than or equal to el, the maximum number of retries remains unchanged newm=ml, and then newm request retries are performed; at the same time, newm, the request cycle, and the request error rate of the current p time windows are updated;
[0103] S09. If it is greater than el, reset the current maximum number of allowed requests according to the exponential decay dynamic strategy, and then perform newm request retries; at the same time, update newm, the request cycle, and the request error rate of the current p time windows;
[0104] S10. Execute in sequence and dynamically change the maximum allowed number of requests.
[0105] Specifically, taking an embodiment in a practical situation as an example, it is divided into three stages.
[0106] like Figure 5 As shown, this is stage one:
[0107] S01. The first request quantity refers to the maximum allowed request quantity corresponding to the first request period in the error rate enhancement period group. In this embodiment, the principle of updating the maximum allowed request quantity is based on exponential function decay. As follows:
[0108]
[0109] Where ml is the request quantity threshold, t represents the attenuation factor, which starts from 1 and gradually increases by 1 until s, p1 represents the first cycle request error rate corresponding to the first p consecutive time windows, pn represents the second request error rate corresponding to the nth p consecutive time windows, and n takes a value greater than 1, 2, 3, 4, 5..., and p1 and pn are not 0.
[0110] S02.p2 represents the request error rate from the current time window to the previous p time windows, that is, the second request error rate, p1 represents the request error rate of the first request cycle p time windows, that is, the first cycle request error rate, when p2 is greater than pl, set the maximum allowed number of requests newm=f(1);
[0111] like Figure 6 As shown, this is stage two:
[0112] S01. Assume that p2 is the current cycle, and p3 is the request error rate of p time windows in the cycle after the current cycle;
[0113] S02.p2 represents p2 in stage 1;
[0114] S03. When p3>p2, continue to reduce the maximum number of retries newm=f(2);
[0115] S04. Repeat the above process. If p4 is still greater than p3 in the next step, continue to decrease the maximum allowable request quantity, i.e., newm = f(3), until newm <= nl;
[0116] S05. In the subsequent process, once newm <= nl, stop decreasing the maximum allowable request quantity and set newm = nl;
[0117] As Figure 7 shown, this is Phase III:
[0118] S01. p4 represents the request error rate of p time windows in the next cycle after p3;
[0119] S02. p3 represents p3 in Phase 2;
[0120] S03. When p4 < p3, modify and increase the maximum number of retries, i.e., newm = f(1);
[0121] S04. Repeat the above process. If p5 is still less than p4 in the next step, continue to increase the maximum allowable request quantity, i.e., newm = f(0) = ml;
[0122] S05. In the subsequent process, once newm = ml, stop increasing the maximum allowable request quantity.
[0123] In a specific embodiment, as Figure 8 shown, a service request management method is further provided, including:
[0124] Step S801: Obtain the request quantity threshold, request error rate threshold, and request cycle configured for the service requests initiated based on the cloud management platform;
[0125] Step S802: When it is determined that the current cycle ends based on the request cycle, determine the first request error rate of multiple service requests initiated by the target user in the previous cycle of the current cycle, and the second request error rate of multiple service requests initiated by the target user in the current cycle;
[0126] Step S803: If the second request error rate is greater than the error rate threshold and the first request error rate, obtain the historical request error rates of multiple historical cycles before the previous cycle;
[0127] Step S804: Determine the error rate enhancement cycle group according to the numerical relationship between each historical request error rate and the first request error rate;
[0128] The error rate enhancement period group includes the current period and the period before the current period; the error rate enhancement period group includes at least two time-continuous request periods, and the request error rate of any enhancement period in the error rate enhancement period group except the first request period is greater than the request error rate of the period before the enhancement period;
[0129] Step S805, determining a decay factor based on the number of request cycles included in the error rate enhancement cycle group and the first request number corresponding to the first request cycle in the error rate enhancement cycle group;
[0130] Step S806, performing attenuation processing on the request quantity threshold according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period;
[0131] Step S807: if the second request error rate is greater than the error rate threshold and less than the first request error rate, determine the error rate reduction period group according to the numerical relationship between each historical request error rate and the first request error rate;
[0132] The error rate reduction cycle group includes the current cycle and the cycle before the current cycle; the error rate reduction cycle group includes at least two time-continuous request cycles, and the request error rate of any reduction cycle in the error rate reduction cycle group except the first request cycle is less than the request error rate of the cycle before the reduction cycle;
[0133] Step S808, determining a decay factor based on the number of request cycles included in the error rate reduction cycle group and the first request number corresponding to the first request cycle in the error rate reduction cycle group;
[0134] Step S809, performing attenuation processing on the request quantity threshold according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period;
[0135] Step S810, determining the update quantity threshold as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next cycle;
[0136] Step S811: If the second request error rate is less than the error rate threshold, the request quantity threshold is determined as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next period;
[0137] Step S812: If the second request error rate is greater than the error rate threshold and equal to the first request error rate, the maximum allowed number of requests in the current cycle is determined as the maximum allowed number of requests for business requests initiated by the target user based on the cloud management platform in the next cycle.
[0138] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages 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 carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a service request management device for implementing the service request management method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more service request management device embodiments provided below can refer to the limitations of the service request management method above, and will not be repeated here.
[0140] In an exemplary embodiment, Fig. 9 As shown, a service request management device 900 is provided, comprising: a data acquisition module 902, an error rate determination module 904, an attenuation processing module 906 and a request quantity determination module 908, wherein:
[0141] The data acquisition module 902 is used to obtain the request quantity threshold, request error rate threshold and request cycle configured for the service request initiated by the cloud management platform;
[0142] An error rate determination module 904 is used to determine, when determining that the current cycle ends based on the request cycle, a first request error rate of multiple service requests initiated by the target user in a cycle before the current cycle, and a second request error rate of multiple service requests initiated by the target user in the current cycle;
[0143] an attenuation processing module 906, configured to, if the second request error rate is greater than the error rate threshold and the first request error rate, perform attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period;
[0144] The request quantity determination module 908 is used to determine the update quantity threshold as the maximum allowed request quantity of the service request initiated by the target user based on the cloud management platform in the next cycle.
[0145] In an exemplary embodiment, the attenuation processing module 906 includes:
[0146] A request error rate determination unit, used to obtain historical request error rates of each of a plurality of historical periods before a previous period;
[0147] A cycle group determination unit, configured to determine an error rate enhancement cycle group according to a numerical relationship between each historical request error rate and the first request error rate; the error rate enhancement cycle group includes a current cycle and a cycle before the current cycle; the error rate enhancement cycle group includes at least two time-continuous request cycles, and the request error rate of any enhancement cycle in the error rate enhancement cycle group except the first request cycle is greater than the request error rate of the cycle before the enhancement cycle;
[0148] The first attenuation processing unit is used to perform attenuation processing on the request quantity threshold according to the error rate enhancement period group, the second request error rate and the first request error rate to obtain the update quantity threshold of the next period after the current period.
[0149] In an exemplary embodiment, the first attenuation processing unit is specifically configured to:
[0150] Determining a decay factor based on the number of request cycles included in the error rate enhancement cycle group and the first number of requests corresponding to the first request cycle in the error rate enhancement cycle group;
[0151] The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
[0152] In an exemplary embodiment, the service request management device 900 further includes an error rate reduction period group determination module, including:
[0153] an error rate reduction cycle group determining unit, configured to determine an error rate reduction cycle group according to a numerical relationship between each historical request error rate and the first request error rate if the second request error rate is greater than an error rate threshold and less than the first request error rate; the error rate reduction cycle group includes a current cycle and a cycle before the current cycle; the error rate reduction cycle group includes at least two time-continuous request cycles, and the request error rate of any reduction cycle in the error rate reduction cycle group except the first request cycle is less than the request error rate of the cycle before the reduction cycle;
[0154] The second attenuation processing unit is used to perform attenuation processing on the request quantity threshold according to the error rate attenuation period group, the second request error rate and the first request error rate to obtain the update quantity threshold of the next period after the current period.
[0155] In an exemplary embodiment, the second attenuation processing unit is specifically configured to:
[0156] Determine a decay factor based on the number of request cycles included in the error rate attenuation cycle group and the first number of requests corresponding to the first request cycle in the error rate attenuation cycle group;
[0157] The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
[0158] In an exemplary embodiment, the service request management device 900 further includes a second request error rate determination module, which is specifically configured to:
[0159] If the second request error rate is less than the error rate threshold, the request quantity threshold is determined as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next period;
[0160] If the second request error rate is greater than the error rate threshold and equal to the first request error rate, the maximum allowed number of requests in the current cycle is determined as the maximum allowed number of requests for business requests initiated by the target user based on the cloud management platform in the next cycle.
[0161] Each module in the above-mentioned service request management device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0162] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used 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 the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a service request management method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0163] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0164] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above method when executing the computer program.
[0165] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0166] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above method when executed by a processor.
[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A service request management method, characterized in that: The method comprises: Obtain the request quantity threshold, request error rate threshold, and request cycle configured for business requests initiated based on the cloud management platform; In a case where it is determined that the current cycle ends based on the request cycle, determining a first request error rate of multiple service requests initiated by the target user in a cycle previous to the current cycle, and a second request error rate of multiple service requests initiated by the target user in the current cycle; If the second request error rate is greater than the error rate threshold and the first request error rate, performing attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period; The update quantity threshold is determined as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the subsequent period.
2. The method according to claim 1, characterized in that The attenuating the request quantity threshold according to the second request error rate and the first request error rate to obtain the update quantity threshold of the next cycle after the current cycle includes: Obtaining historical request error rates of respective multiple historical periods before the previous period; An error rate enhancement period group is determined according to a numerical relationship between each of the historical request error rates and the first request error rate; the error rate enhancement period group includes the current period and a period before the current period; the error rate enhancement period group includes at least two time-continuous request periods, and the request error rate of any enhancement period in the error rate enhancement period group except the first request period is greater than the request error rate of the period before the enhancement period; The request quantity threshold is attenuated according to the error rate enhancement period group, the second request error rate, and the first request error rate to obtain an update quantity threshold of a period subsequent to the current period.
3. The method according to claim 2, characterized in that The attenuating the request quantity threshold according to the error rate enhancement period group, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period includes: Determining a decay factor based on the number of request cycles included in the error rate enhancement cycle group and the first number of requests corresponding to the first request cycle in the error rate enhancement cycle group; The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
4. The method according to claim 2, characterized in that: The method further comprises: If the second request error rate is greater than the error rate threshold and less than the first request error rate, an error rate reduction cycle group is determined according to a numerical relationship between each of the historical request error rates and the first request error rate; the error rate reduction cycle group includes the current cycle and a cycle before the current cycle; the error rate reduction cycle group includes at least two time-continuous request cycles, and the request error rate of any reduction cycle in the error rate reduction cycle group except the first request cycle is less than the request error rate of the cycle before the reduction cycle; The request quantity threshold is attenuated according to the error rate attenuation cycle group, the second request error rate, and the first request error rate to obtain an update quantity threshold of a period subsequent to the current period.
5. The method according to claim 4, characterized in that The attenuating the request quantity threshold according to the error rate attenuation cycle group, the second request error rate, and the first request error rate to obtain the update quantity threshold of the next cycle after the current cycle includes: Determining a decay factor based on the number of request cycles included in the error rate attenuation cycle group and the first number of requests corresponding to the first request cycle in the error rate attenuation cycle group; The request quantity threshold is attenuated according to the attenuation factor, the second request error rate, and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period.
6. The method according to claim 1, characterized in that The method further comprises: If the second request error rate is less than the error rate threshold, determining the request quantity threshold as the maximum allowed number of service requests initiated by the target user based on the cloud management platform in the next period; If the second request error rate is greater than the error rate threshold and equal to the first request error rate, the maximum allowed number of requests for the current cycle is determined as the maximum allowed number of requests for business requests initiated by the target user based on the cloud management platform in the next cycle.
7. A service request management device, characterized in that: The device comprises: A data acquisition module is used to obtain a request quantity threshold, a request error rate threshold, and a request cycle configured for a business request initiated based on a cloud management platform; an error rate determination module, configured to determine, when determining that a current cycle ends based on the request cycle, a first request error rate of a plurality of service requests initiated by a target user in a cycle previous to the current cycle, and a second request error rate of a plurality of service requests initiated by the target user in the current cycle; an attenuation processing module, configured to, if the second request error rate is greater than the error rate threshold and the first request error rate, perform attenuation processing on the request quantity threshold according to the second request error rate and the first request error rate to obtain an update quantity threshold for a period subsequent to the current period; The request quantity determination module is used to determine the update quantity threshold as the maximum allowed request quantity of the business request initiated by the target user based on the cloud management platform in the subsequent period.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Control and routing method and system for requests, storage medium and electronic equipment
CN108540468A
Request control method, related equipment and computer storage medium
CN110120973A
Flow control method, device, computer equipment and storage medium
CN113992586A
Method and device for dynamically determining timeout threshold value, electronic equipment and medium
CN114710406A
Server operation and maintenance method and device based on multiple cloud platforms, equipment and medium
CN117596187A